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

Don't install gaiohttp if python < 3.3 #801

Merged
merged 1 commit into from
Jun 23, 2014
Merged

Don't install gaiohttp if python < 3.3 #801

merged 1 commit into from
Jun 23, 2014

Conversation

asvetlov
Copy link
Collaborator

See #788
That prevents syntax warning on library installation step.
The patch enumerates all python modules directly without handy autodiscovery (setuptools.find_packages).
It still uses setuptools for making console scripts etc, I don't think that we need to remove it.

@davisp
Copy link
Collaborator

davisp commented Jun 22, 2014

Looks like you're not collecting from the tests/ directory.

@asvetlov
Copy link
Collaborator Author

Yes, I don't include tests/ and examples/ in list of installed modules -- they are not included for now also:
packages = find_packages(exclude=['examples', 'tests']),

python setup.py sdist adds everything into gunicorn-xx.x.x.tar.gz archive but installing this distribution doesn't install gunicorn.workers.gaiohttp module if python < (3, 3)

@asvetlov
Copy link
Collaborator Author

@benoitc please review

@davisp
Copy link
Collaborator

davisp commented Jun 23, 2014

Derp. My bad. I was just skimming to check that it wasn't a behavior change and misread exclude as include.

+1

@asvetlov
Copy link
Collaborator Author

@davisp no problem, thanks.

@benoitc
Copy link
Owner

benoitc commented Jun 23, 2014

+1 LGTM

asvetlov added a commit that referenced this pull request Jun 23, 2014
Don't install gaiohttp if python < 3.3
@asvetlov asvetlov merged commit 0be33fe into master Jun 23, 2014
@asvetlov asvetlov deleted the gaiohttp_setup branch June 23, 2014 18:10
@asvetlov
Copy link
Collaborator Author

Done!

@nrvnrvn
Copy link

nrvnrvn commented Jul 28, 2014

So now pypi package does not contain gaiohttp.py file, resulting in

Traceback (most recent call last):
  File "/home/nrevin/.virtualenvs/venv/lib/python3.4/site-packages/gunicorn/util.py", line 139, in load_class
    mod = import_module('.'.join(components))
  File "/home/nrevin/.virtualenvs/venv/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
ImportError: No module named 'gunicorn.workers.gaiohttp'

@benoitc
Copy link
Owner

benoitc commented Jul 28, 2014

@nicorevin thanks for the feedback, working on it in #830 . I will make a new release later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants