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

fix for redirect issue #2030

Merged
merged 10 commits into from
Jun 29, 2017
Merged

Conversation

thehesiod
Copy link
Contributor

@thehesiod thehesiod commented Jun 27, 2017

resolves #2022

  • fixes Makefile to run when you have py2 + py3 installed
  • removes ClientRedirectError
  • ran isort based on recommendations from make test gave different results

- fixes Makefile to run when you have py2 + py3 installed
- removes ClientRedirectError
- ran isort based on recommendations from make test
@thehesiod thehesiod changed the title fix for github.com/aio-libs/aiohttp/issues/2022 fix for redirect issue Jun 27, 2017
@thehesiod
Copy link
Contributor Author

@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.

@thehesiod
Copy link
Contributor Author

ah figured it out, I had pytest-aiohttp installed, perhaps should detect/try uninstalling this first before running tests

@thehesiod
Copy link
Contributor Author

another strange thing is running isort locally gave me a different result for background_tasks.py than through appveyor. Perhaps needs to be pinned?

Copy link
Member

@asvetlov asvetlov left a 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
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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
Copy link
Member

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

import sqlalchemy as sa

import aiopg.sa
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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.

@asvetlov
Copy link
Member

Well, your changes about python3 and pip3 make sense maybe (but we encourage virtualenv usage in our doc for developers: http://aiohttp.readthedocs.io/en/stable/contributing.html

But I'm striving to have relative small PRs for solving one issue per PR.
If you want apply pip3 changes etc -- let's create another PR but keep this one minimalistic.

@codecov-io
Copy link

codecov-io commented Jun 28, 2017

Codecov Report

Merging #2030 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
aiohttp/client_exceptions.py 100% <ø> (ø) ⬆️
tests/autobahn/client.py 97.07% <0%> (ø) ⬆️

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 afbff7b...fdf6685. Read the comment docs.

@asvetlov
Copy link
Member

Last thing: drop changes/2009.feature and add a new changelog file please.

@thehesiod
Copy link
Contributor Author

added, btw should adding files to changes/ be documented in CONTRIBUTING.rst?

@asvetlov
Copy link
Member

No, sorry.
But it is mentioned in GitHub Pull Request template .githib/PULL_REQUEST_TEMPLATE.md.

I very ask you to make a PR for CONTRIBUTING.rst update.

@@ -0,0 +1,3 @@
ClientRedirectError is no longer raised
Copy link
Member

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)

@asvetlov asvetlov merged commit 384a183 into aio-libs:master Jun 29, 2017
@asvetlov
Copy link
Member

Thanks for your patience :)

@asvetlov
Copy link
Member

@thehesiod CONTRIBUTING.rst updated

@thehesiod
Copy link
Contributor Author

@asvetlov no worries, thank you too for the review!

@thehesiod thehesiod deleted the thehesiod/redirect branch July 3, 2017 21:01
@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bot:chronographer:provided There is a change note present in this PR outdated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[enhancement] ability to return redirect responses which don't have 'location' header
3 participants