Coder Social home page Coder Social logo

Comments (15)

timothycrosley avatar timothycrosley commented on May 22, 2024

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

from isort.

timothycrosley avatar timothycrosley commented on May 22, 2024

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

from isort.

myint avatar myint commented on May 22, 2024

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'

from isort.

timothycrosley avatar timothycrosley commented on May 22, 2024

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

from isort.

myint avatar myint commented on May 22, 2024

I isolated the cause to pies2overrides.

from isort.

timothycrosley avatar timothycrosley commented on May 22, 2024

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

from isort.

timothycrosley avatar timothycrosley commented on May 22, 2024

https://github.com/timothycrosley/pyflakes/compare/pyflakes:master...patch-1?quick_pull=1

from isort.

myint avatar myint commented on May 22, 2024

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

from isort.

acdha avatar acdha commented on May 22, 2024

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

from isort.

timothycrosley avatar timothycrosley commented on May 22, 2024

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

from isort.

timothycrosley avatar timothycrosley commented on May 22, 2024

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

from isort.

acdha avatar acdha commented on May 22, 2024

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

from isort.

timothycrosley avatar timothycrosley commented on May 22, 2024

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

from isort.

myint avatar myint commented on May 22, 2024

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

from isort.

timothycrosley avatar timothycrosley commented on May 22, 2024

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

from isort.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.