Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project edits for pr517 #534

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8a11c5c
modification in tests
Jan 28, 2019
f53c43c
removing obsolete examples
Jan 28, 2019
1396abb
removing old style (yield from) in docs
Jan 28, 2019
6f08679
rename psycopg2 to psycopg2-binary in docs
Jan 28, 2019
52df1ed
added note in docs about going to python3.5.2+
Jan 28, 2019
b76222a
interim fix due to issues #533
Jan 28, 2019
a8d454a
add docs example and style
Jan 29, 2019
bfbb7ba
refactor docs
Jan 29, 2019
c4f5968
add isort and deleted obsolete non-asynchronous cursor iteration
Jan 30, 2019
325f48a
fix async iter for python 3.5
Jan 30, 2019
3935e8d
add readthedocs.yml
Jan 30, 2019
9098886
travis allow failures python:nightly
Jan 31, 2019
f146b1a
travis allow failures python:nightly
Jan 31, 2019
6d6cb25
travis allow failures python:nightly
Jan 31, 2019
44a9a54
travis allow failures python:nightly
Jan 31, 2019
3826cb7
travis remove docker cache
Jan 31, 2019
d347c0b
fix code style yml
Feb 2, 2019
a39c9ea
refactor
Feb 2, 2019
eb1a0e1
sync master
Mar 13, 2019
76ccf6c
fix docs
Mar 13, 2019
d0b157b
normalized version c to rc pep440
Mar 13, 2019
a1dd506
edit docs
Mar 14, 2019
8d86ae9
refactor sa connection
Mar 14, 2019
a12c0d6
sync pr517
Mar 14, 2019
c230b86
fix travis
Mar 14, 2019
7940492
fix travis
Mar 14, 2019
1af7564
fix travis
Mar 14, 2019
71b4f58
fix test
Mar 14, 2019
7aa0e18
Update aiopg/cursor.py
vir-mir Sep 20, 2019
073921c
Update docs/one_cursor.rst
vir-mir Sep 20, 2019
2006d87
Update .readthedocs.yml
vir-mir Sep 20, 2019
03412b0
Update CONTRIBUTING.rst
vir-mir Sep 20, 2019
6795ec5
Update CONTRIBUTING.rst
vir-mir Sep 20, 2019
e6afb32
Update CONTRIBUTING.rst
vir-mir Sep 20, 2019
d5fa21b
Update CONTRIBUTING.rst
vir-mir Sep 20, 2019
655d436
Update CONTRIBUTING.rst
vir-mir Sep 20, 2019
2b01c1f
Update CONTRIBUTING.rst
vir-mir Sep 20, 2019
2a1afbb
Update CONTRIBUTING.rst
vir-mir Sep 20, 2019
81514dc
Update CONTRIBUTING.rst
vir-mir Sep 20, 2019
a72f3ac
Update CONTRIBUTING.rst
vir-mir Sep 20, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[settings]
line_length=79
multi_line_output=3
include_trailing_comma=True
indent=' '
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
12 changes: 12 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

build:
image: latest

python:
version: 3.7
vir-mir marked this conversation as resolved.
Show resolved Hide resolved
install:
- requirements: requirements.txt
- method: pip
path: .
vir-mir marked this conversation as resolved.
Show resolved Hide resolved
system_packages: true
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ script:
- make cov-ci
- python setup.py check -rms

matrix:
allow_failures:
- python: "nightly"

env:
global:
- PYTHON=python
Expand All @@ -58,4 +62,4 @@ deploy:
on:
tags: true
all_branches: true
python: 3.5
python: 3.5
18 changes: 0 additions & 18 deletions ACKS.txt

This file was deleted.

69 changes: 33 additions & 36 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,119 +1,116 @@
CHANGES
-------

0.16.0 (2019-01-25)
^^^^^^^^^^^^^^^^^^^

* Fix select priority name (#525)
* Fix select priority name `#525 <https://github.com/aio-libs/aiopg/issues/525>`_
vir-mir marked this conversation as resolved.
Show resolved Hide resolved

* Rename `psycopg2` to `psycopg2-binary` to fix deprecation warning (#507)
* Rename `psycopg2` to `psycopg2-binary` to fix deprecation warning `#507 <https://github.com/aio-libs/aiopg/issues/507>`_

* Fix #189 hstore when using ReadDictCursor (#512)
* Fix `#189 <https://github.com/aio-libs/aiopg/issues/189>`_ hstore when using ReadDictCursor `#512 <https://github.com/aio-libs/aiopg/issues/512>`_

* close cannot be used while an asynchronous query is underway (#452)
* close cannot be used while an asynchronous query is underway `#452 <https://github.com/aio-libs/aiopg/issues/452>`_

* sqlalchemy adapter trx begin allow transaction_mode (#498)
* sqlalchemy adapter trx begin allow transaction_mode `#498 <https://github.com/aio-libs/aiopg/issues/498>`_


0.15.0 (2018-08-14)
^^^^^^^^^^^^^^^^^^^

* Support Python 3.7 (#437)
* Support Python 3.7 `#437 <https://github.com/aio-libs/aiopg/issues/437>`_

0.14.0 (2018-05-10)
^^^^^^^^^^^^^^^^^^^

* Add ``get_dialect`` func to have ability to pass ``json_serializer`` #451
* Add ``get_dialect`` func to have ability to pass ``json_serializer`` `#451 <https://github.com/aio-libs/aiopg/issues/451>`_

0.13.2 (2018-01-03)
^^^^^^^^^^^^^^^^^^^

* Fixed compatibility with SQLAlchemy 1.2.0 #412
* Fixed compatibility with SQLAlchemy 1.2.0 `#412 <https://github.com/aio-libs/aiopg/issues/412>`_

* Added support for transaction isolation levels #219
* Added support for transaction isolation levels `#219 <https://github.com/aio-libs/aiopg/issues/219>`_


0.13.1 (2017-09-10)
^^^^^^^^^^^^^^^^^^^

* Added connection poll recycling logic #373
* Added connection poll recycling logic `#373 <https://github.com/aio-libs/aiopg/issues/373>`_


0.13.0 (2016-12-02)
^^^^^^^^^^^^^^^^^^^

* Add `async with` support to `.begin_nested()` #208
* Add `async with` support to `.begin_nested()` `#208 <https://github.com/aio-libs/aiopg/issues/208>`_

* Fix connection.cancel() #212 #223
* Fix connection.cancel() `#212 <https://github.com/aio-libs/aiopg/issues/212>`_ `#223 <https://github.com/aio-libs/aiopg/issues/223>`_

* Raise informative error on unexpected connection closing #191
* Raise informative error on unexpected connection closing `#191 <https://github.com/aio-libs/aiopg/issues/191>`_

* Added support for python types columns issues #217
* Added support for python types columns issues `#217 <https://github.com/aio-libs/aiopg/issues/217>`_

* Added support for default values in SA table issues #206
* Added support for default values in SA table issues `#206 <https://github.com/aio-libs/aiopg/issues/206>`_


0.12.0 (2016-10-09)
^^^^^^^^^^^^^^^^^^^

* Add an on_connect callback parameter to pool #141
* Add an on_connect callback parameter to pool `#141 <https://github.com/aio-libs/aiopg/issues/141>`_

* Fixed connection to work under both windows and posix based systems #142
* Fixed connection to work under both windows and posix based systems `#142 <https://github.com/aio-libs/aiopg/issues/142>`_

0.11.0 (2016-09-12)
^^^^^^^^^^^^^^^^^^^

* Immediately remove callbacks from a closed file descriptor #139
* Immediately remove callbacks from a closed file descriptor `#139 <https://github.com/aio-libs/aiopg/issues/139>`_

* Drop Python 3.3 support

0.10.0 (2016-07-16)
^^^^^^^^^^^^^^^^^^^

* Refactor tests to use dockerized Postgres server #107
* Refactor tests to use dockerized Postgres server `#107 <https://github.com/aio-libs/aiopg/issues/107>`_

* Reduce default pool minsize to 1 #106
* Reduce default pool minsize to 1 `#106 <https://github.com/aio-libs/aiopg/issues/106>`_

* Explicitly enumerate packages in setup.py #85
* Explicitly enumerate packages in setup.py `#85 <https://github.com/aio-libs/aiopg/issues/85>`_

* Remove expired connections from pool on acquire #116
* Remove expired connections from pool on acquire `#116 <https://github.com/aio-libs/aiopg/issues/116>`_

* Don't crash when Connection is GC'ed #124
* Don't crash when Connection is GC'ed `#124 <https://github.com/aio-libs/aiopg/issues/124>`_

* Use loop.create_future() if available

0.9.2 (2016-01-31)
^^^^^^^^^^^^^^^^^^

* Make pool.release return asyncio.Future, so we can wait on it in
`__aexit__` #102
`__aexit__` `#102 <https://github.com/aio-libs/aiopg/issues/102>`_

* Add support for uuid type #103
* Add support for uuid type `#103 <https://github.com/aio-libs/aiopg/issues/103>`_

0.9.1 (2016-01-17)
^^^^^^^^^^^^^^^^^^

* Documentation update #101
* Documentation update `#101 <https://github.com/aio-libs/aiopg/issues/101>`_

0.9.0 (2016-01-14)
^^^^^^^^^^^^^^^^^^

* Add async context managers for transactions #91
* Add async context managers for transactions `#91 <https://github.com/aio-libs/aiopg/issues/91>`_

* Support async iterator in ResultProxy #92
* Support async iterator in ResultProxy `#92 <https://github.com/aio-libs/aiopg/issues/92>`_

* Add async with for engine #90
* Add async with for engine `#90 <https://github.com/aio-libs/aiopg/issues/90>`_

0.8.0 (2015-12-31)
^^^^^^^^^^^^^^^^^^

* Add PostgreSQL notification support #58
* Add PostgreSQL notification support `#58 <https://github.com/aio-libs/aiopg/issues/58>`_

* Support pools with unlimited size #59
* Support pools with unlimited size `#59 <https://github.com/aio-libs/aiopg/issues/59>`_

* Cancel current DB operation on asyncio timeout #66
* Cancel current DB operation on asyncio timeout `#66 <https://github.com/aio-libs/aiopg/issues/66>`_

* Add async with support for Pool, Connection, Cursor #88
* Add async with support for Pool, Connection, Cursor `#88 <https://github.com/aio-libs/aiopg/issues/88>`_

0.7.0 (2015-04-22)
^^^^^^^^^^^^^^^^^^
Expand Down
64 changes: 41 additions & 23 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,37 @@ Instruction for contributors
Developer environment
---------------------

First clone the git repo::
First clone the git repo
vir-mir marked this conversation as resolved.
Show resolved Hide resolved

$ git clone [email protected]:aio-libs/aiopg.git
$ cd aiopg
.. code-block:: shell

$ git clone [email protected]:aio-libs/aiopg.git
$ cd aiopg

After that you need to create and activate a virtual environment. I
recommend using :term:`virtualenvwrapper` but just :term:`virtualenv` or
:term:`venv` will also work. For ``virtualenvwrapper``::
:term:`venv` will also work. For :term:`virtualenvwrapper`
vir-mir marked this conversation as resolved.
Show resolved Hide resolved

.. code-block:: shell

$ mkvirtualenv aiopg -p `which python3`

$ mkvirtualenv aiopg -p `which python3`
For `venv` (for example; put the directory wherever you want)
vir-mir marked this conversation as resolved.
Show resolved Hide resolved

For ``venv`` (for example; put the directory wherever you want)::
.. code-block:: shell

$ python3 -m venv ../venv_directory
$ source ../venv_directory/bin/activate
$ python3 -m venv ../venv_directory
$ source ../venv_directory/bin/activate

Just as when doing a normal install, you need the :term:`libpq` library::
Just as when doing a normal install, you need the :term:`libpq` library
vir-mir marked this conversation as resolved.
Show resolved Hide resolved

$ sudo apt-get install libpq-dev
.. code-block:: shell

$ sudo apt-get install libpq-dev

**UPD**

The latest ``aiopg`` test suite uses docker container for running
The latest `aiopg` test suite uses docker container for running
vir-mir marked this conversation as resolved.
Show resolved Hide resolved
Postgres server. See
https://docs.docker.com/engine/installation/linux/ubuntulinux/ for
instructions for Docker installing.
Expand All @@ -35,37 +43,47 @@ No local Postgres server needed.

In the virtual environment you need to install *aiopg* itself and some
additional development tools (the development tools are needed for running
the test suite and other development tasks)::
the test suite and other development tasks)

.. code-block:: shell

$ pip install -Ue .
$ pip install -Ur requirements.txt
$ pip install -Ue .
$ pip install -Ur requirements.txt

That's all.

To run all of the *aiopg* tests do::
To run all of the *aiopg* tests do
vir-mir marked this conversation as resolved.
Show resolved Hide resolved

$ make test
.. code-block:: shell

$ make test

This command runs :term:`pep8` and :term:`pyflakes` first and then executes
the *aiopg* unit tests.


When you are working on solving an issue you will probably want to run
some specific test, not the whole suite::
some specific test, not the whole suite
vir-mir marked this conversation as resolved.
Show resolved Hide resolved

.. code-block:: shell

$ py.test -s -k test_initial_empty
$ py.test -s -k test_initial_empty

For debug sessions I prefer to use :term:`ipdb`, which is installed
as part of the development tools. Insert the following line into your
vir-mir marked this conversation as resolved.
Show resolved Hide resolved
as part of the development tools. Insert the following line into your
code in the place where you want to start interactively debugging the
execution process::
execution process
vir-mir marked this conversation as resolved.
Show resolved Hide resolved

import ipdb; ipdb.set_trace()
.. code-block:: py3

import ipdb; ipdb.set_trace()

The library is reasonably well covered by tests. There is a make
target for generating the coverage report::
target for generating the coverage report
vir-mir marked this conversation as resolved.
Show resolved Hide resolved

.. code-block:: shell

$ make cov
$ make cov


Contribution
Expand Down
12 changes: 12 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* Alexander <[email protected]>
* Eugene Krevenets <[email protected]>
* Fantix King
* Lena Kryvonos
* Low Kian Seong <[email protected]>
* Marco Paolini
* Michal Kuffa
* Nikolay Novik <[email protected]>
* Petr Viktorin <[email protected]>
* R\. David Murray <[email protected]>
* Ryan Hodge
* Theron Luhn <[email protected]>
11 changes: 3 additions & 8 deletions MAINTAINERS.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
Maintainers
-----------

The list of *aiopg* maintainers.

Andrew Svetlov <[email protected]>
Alexey Popravka <[email protected]>
Alexey Firsov <[email protected]>
* Andrew Svetlov <[email protected]>
* Alexey Firsov <[email protected]>
* Alexey Popravka <[email protected]>
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include LICENSE.txt
include CHANGES.txt
include README.rst
include MAINTAINERS.txt
graft aiopg
global-exclude *.pyc
exclude tests/**
Loading