Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Python 3.7 #426

Merged
merged 7 commits into from
Jul 23, 2018
Merged

Python 3.7 #426

merged 7 commits into from
Jul 23, 2018

Conversation

kkaiser
Copy link
Contributor

@kkaiser kkaiser commented Jul 19, 2018

fixes #425

@kkaiser
Copy link
Contributor Author

kkaiser commented Jul 19, 2018

seems like sudo needs to be enabled in travis to support python 3.7: travis-ci/travis-ci#9815 (comment)

@kkaiser kkaiser changed the title Python3.7 Python 3.7 Jul 19, 2018
@webknjaz
Copy link
Contributor

Yes, sudo+xenial just for that job

@@ -538,7 +538,7 @@ class MyPool(ConnectionsPool):
server.tcp_address,
minsize=10, loop=loop)

with await pool as conn:
with (await pool) as conn:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not async with?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be rewritten to async with pool.get() as conn. The deprecation warning is not triggered on ConnectionsPool objects. Rewriting as async with pool as conn generates an AttributeError because __aexit__ is not implemented like in _AsyncConnectionContextManager.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, then it's a part of the fix.

@codecov
Copy link

codecov bot commented Jul 19, 2018

Codecov Report

Merging #426 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
- Coverage   96.69%   96.66%   -0.03%     
==========================================
  Files          56       56              
  Lines        7825     7825              
  Branches      546      546              
==========================================
- Hits         7566     7564       -2     
  Misses        187      187              
- Partials       72       74       +2
Impacted Files Coverage Δ
tests/pool_test.py 99.67% <100%> (ø) ⬆️
tests/sentinel_failover_test.py 86.46% <0%> (-1.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 050e4dd...812c808. Read the comment docs.

@popravich popravich merged commit 4945289 into aio-libs-abandoned:master Jul 23, 2018
@popravich
Copy link
Contributor

Thanks

asgoel pushed a commit to ramjet-labs/aioredis that referenced this pull request Aug 31, 2018
…ed#426)

* avoid deprecation warnings

* adjust test

* add python 3.7 to travis

* add python 3.7 to appveyor

* sudo:true on xenial for travis

* remove 3.7 from travis

* added python 3.7 to setup.py
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

calling close triggers deprecation warning in python 3.7
3 participants