Skip to content

Commit

Permalink
Merge branch 'release/0.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
prawn-cake committed Sep 19, 2015
2 parents 9368e0b + 36345b4 commit 7904bbf
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.1
current_version = 0.1.2
tag = False
tag_name = {new_version}
commit = True
Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
ENV_DIR=$(CURDIR)/.env
PYTHON=$(ENV_DIR)/bin/python
NOSE=$(ENV_DIR)/bin/nosetests
COVERAGE=$(ENV_DIR)/bin/coverage
PROJECT_NAME=pgclient
CODE_DIR=$(CURDIR)/$(PROJECT_NAME)

Expand All @@ -29,15 +28,10 @@ test: env
.PHONY: system_test
system_test: env
# target: test - Run system_test
@$(NOSE) $(CODE_DIR)/system_test/system_test.py
@$(NOSE) --with-coverage $(CODE_DIR)/system_test/system_test.py


.PHONY: test_ci
test_ci: env
# target: test_ci - Run tests command adapt for CI systems
@$(NOSE) $(CODE_DIR)/tests

.PHONY: test_coverage
# target: test_coverage - Run tests with coverage
test_coverage: env
@$(COVERAGE) run --source=$(PROJECT_NAME) $(NOSE) $(CODE_DIR)/tests.py
@$(NOSE) --with-coverage $(CODE_DIR)/tests
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
[![Coverage Status](https://coveralls.io/repos/prawn-cake/pgclient/badge.svg?branch=master&service=github)](https://coveralls.io/github/prawn-cake/pgclient?branch=master)


pgclient - yet another pool-based psycopg2 wrapper.
pgclient - yet another pool-based python2/3 compatible psycopg2 wrapper.

The client is fully based on thread-safe connections pool and safe transactions executing

*Tested on python2.7+, python3.4+*


Quick start
===========
Expand Down
2 changes: 1 addition & 1 deletion pgclient/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__version__ = '0.1.1'
__version__ = '0.1.2'
2 changes: 1 addition & 1 deletion pgclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _get_cursor(self, cursor_factory=None):
conn.commit()
except psycopg2.DatabaseError as err:
conn.rollback()
raise psycopg2.DatabaseError(err.message)
raise psycopg2.DatabaseError(str(err))
finally:
self.release_conn(conn)

Expand Down
2 changes: 1 addition & 1 deletion pgclient/system_test/system_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_rollback_transaction(self):
self.TABLE_NAME),
(None, ))
print('abc')
self.assertIn('null value in column', err.exception.message)
self.assertIn('null value in column', str(err.exception))
print('transaction finished')

def test_connection_pool_overflow(self):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='pgclient',
version='0.1.1',
version='0.1.2',
packages=['pgclient'],
url='https://github.com/prawn-cake/pgclient',
license='MIT',
Expand Down

0 comments on commit 7904bbf

Please sign in to comment.