-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix for redirect issue #2030
fix for redirect issue #2030
Conversation
- fixes Makefile to run when you have py2 + py3 installed - removes ClientRedirectError - ran isort based on recommendations from make test
@asvetlov unfortunately when running the tests locally I'm getting "ValueError: option names {'--fast'} already added" so this may take a few iterations. Let me know what you think. |
ah figured it out, I had pytest-aiohttp installed, perhaps should detect/try uninstalling this first before running tests |
another strange thing is running isort locally gave me a different result for background_tasks.py than through appveyor. Perhaps needs to be pinned? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is good but I have concern about changes not related to the issue directly.
Makefile
Outdated
@@ -1,9 +1,11 @@ | |||
# Some simple testing tasks (sorry, UNIX only). | |||
|
|||
pytest := python3 -m pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is intention for this variable? It's basically an alias for just pytest
, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is so I could run the tests locally, where I have py2 + py3 installed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, with this change you can run the tests outside virtualenv, still want me revert? it makes no different inside virtual env but fixes it outside virtual env
Makefile
Outdated
all: test | ||
|
||
.install-deps: requirements/dev.txt | ||
@pip install -U -r requirements/dev.txt | ||
@pip3 install -U -r requirements/dev.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiohttp development assumes virtual environment usage.
In proper virtual env pip
is just an alias for pip3
if python is python3
demos/polls/aiohttpdemo_polls/db.py
Outdated
import sqlalchemy as sa | ||
|
||
import aiopg.sa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please drop this file from PR. The change is not related to issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when I run the tests locally flake said to run isort against this file, still want me to revert?
tox.ini
Outdated
@@ -43,7 +43,7 @@ deps = | |||
|
|||
commands = | |||
flake8 aiohttp examples tests | |||
python setup.py check -rm | |||
python3 setup.py check -rm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again we are in python3 virtual environment here.
Don't need python3
command.
Well, your changes about But I'm striving to have relative small PRs for solving one issue per PR. |
Codecov Report
@@ Coverage Diff @@
## master #2030 +/- ##
==========================================
- Coverage 97.05% 97.05% -0.01%
==========================================
Files 38 38
Lines 7700 7697 -3
Branches 1347 1347
==========================================
- Hits 7473 7470 -3
Misses 103 103
Partials 124 124
Continue to review full report at Codecov.
|
Last thing: drop |
added, btw should adding files to changes/ be documented in CONTRIBUTING.rst? |
No, sorry. I very ask you to make a PR for CONTRIBUTING.rst update. |
changes/2030.feature
Outdated
@@ -0,0 +1,3 @@ | |||
ClientRedirectError is no longer raised |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we don't publish aiohttp release with ClientRedirectError
the name should be changed to RuntimeError
(used to be raised in aiohttp 2.2)
Thanks for your patience :) |
@thehesiod |
@asvetlov no worries, thank you too for the review! |
resolves #2022
ran isort based on recommendations from make testgave different results