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 unnecessary dependencies #75

Closed
myint opened this issue Nov 6, 2013 · 15 comments
Closed

Don't install unnecessary dependencies #75

myint opened this issue Nov 6, 2013 · 15 comments
Labels
bug Something isn't working
Milestone

Comments

@myint
Copy link
Member

myint commented Nov 6, 2013

argparse, configparser, and ordereddict really should not be installed on Python 2.7. At best this is unnecessary. At worst it is clobbering things.

@timothycrosley
Copy link
Member

Agreed! Will fix this prior to next release, Thanks!

@timothycrosley
Copy link
Member

Closing as I fixed this upstream in pies2 (modules that are already present python2.7 are no longer installed)

@myint
Copy link
Member Author

myint commented Dec 1, 2013

A future reference for Python 2.7 users: isort breaks pyflakes. It somehow installs enum32 and ipaddress along with several other packages. (I'm not sure why there needs to be so many dependencies for a simple utility.) One of them breaks pyflakes with the following error.

AttributeError: 'ClassDef' object has no attribute 'keywords'

@timothycrosley
Copy link
Member

@myint Those packages are installed with Pies: A python 3 and 2 compatibility layer. Because of the way it works, by definition if you only have one app that uses it, there will be more then necessary. However, nothing in pies uses any crazy hacks that would apply outside of programs that import it, and for the most part simply provides backported modules - that again should have no affect unless directly imported.

On my own box I did indeed encounter this issue - but it seemed for me to be an issue with pyflakes itself, it happened even after I uninstalled pies + isort (ran pip freeze to verify) and even when runnning pylakes in its own virtualenv.

In any case, I think this should be reported to the pyflakes project directly, and as a work around if it is indeed isort - you can run isort in a virtualenv so any included modules don't affect your main project installation.

@myint
Copy link
Member Author

myint commented Dec 1, 2013

I isolated the cause to pies2overrides.

@timothycrosley
Copy link
Member

Found the root cause:

https://github.com/pyflakes/pyflakes/blob/master/pyflakes/checker.py#L10

That's a very non-standard way to determine the version of python, especially when theres a direct api call to get the major version... will create a pull request against pyflakes

@myint
Copy link
Member Author

myint commented Dec 1, 2013

Right. The maintainer of pyflakes seems to be taking some time off. I haven't seen any activity in a while.

I committed a workaround for my personal use that removes use of all external dependencies (myint-archive/isort@ea01d52).

@acdha
Copy link
Contributor

acdha commented Jan 23, 2014

@timothycrosley Thanks for the pointer in your comment. PyCQA/pyflakes@72263b4 was merged so there's a light at the end of this tunnel but there hasn't been a PyPI release yet.

@timothycrosley
Copy link
Member

@acdha, there is now also an alternative with the fix released to pypi: https://github.com/timothycrosley/frosted

@timothycrosley
Copy link
Member

Speaking of which, @myint - any interest in creating an autofrosted? If you do I will enthusiastically link to it from the frosted repository :)

@acdha
Copy link
Contributor

acdha commented Jan 23, 2014

@timothycrosley I saw that – has anyone created a frosted flake8 fork yet?

@timothycrosley
Copy link
Member

@acdha, not yet - but frosted has only been live for 4 days so my hopes are high - may start one myself if someone doesn't step up to the plate, or contribute if someone does (the preferable option).

@myint
Copy link
Member Author

myint commented Jan 24, 2014

I got my patches into pyflakes and Florent added full Python 3.4 support. So I'm happy with pyflakes.

@timothycrosley
Copy link
Member

@myint that's fair enough, I will probably try to integrate it myself in some fashion, if it is alright with you. In any case any insights or pull requests from you or Florent will continue to be appreciated and accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants