GithubHelp home page GithubHelp logo

Python 3.10: third-party python modules need update (setuptools: No module named 'symbol', pex: cannot import name 'iterable' from 'collections') about buck HOT 10 CLOSED

rpuntaie avatar rpuntaie commented on April 27, 2024 3
Python 3.10: third-party python modules need update (setuptools: No module named 'symbol', pex: cannot import name 'iterable' from 'collections')

from buck.

Comments (10)

rpuntaie avatar rpuntaie commented on April 27, 2024 1

It fixes "No module named 'symbol'", but then

third-party/py/pex/pex/base.py", line 6
ImportError: cannot import name 'Iterable' from 'collections'

I made the title a bit more general.

from buck.

bigfootjon avatar bigfootjon commented on April 27, 2024 1

It fixes "No module named 'symbol'", but then

third-party/py/pex/pex/base.py", line 6
ImportError: cannot import name 'Iterable' from 'collections'

I made the title a bit more general.

Could be related to this issue: Azure/azure-cli#20444 (comment)

I believe collections no longer exports Iterable in Python3.10, it is now exported from collections.abc

Ref: https://docs.python.org/3/whatsnew/3.10.html which says:

Remove deprecated aliases to Collections Abstract Base Classes from the collections module. (Contributed by Victor Stinner in bpo-37324.)

from buck.

aadsm avatar aadsm commented on April 27, 2024 1

I believe collections no longer exports Iterable in Python3.10, it is now exported from collections.abc

Exactly. I believe that's what @jc65536 was referring to in his comment, where a solution is provided by importing the Iterable from collections.abc instead.

from buck.

aadsm avatar aadsm commented on April 27, 2024

This pr might fix it, I didn't actually tried it though, I only read the code: 1e57b5c

from buck.

bigfootjon avatar bigfootjon commented on April 27, 2024

I think the real solution might be to upgrade the vendored PEX dep

from buck.

jc65536 avatar jc65536 commented on April 27, 2024

It fixes "No module named 'symbol'", but then

third-party/py/pex/pex/base.py", line 6
ImportError: cannot import name 'Iterable' from 'collections'

I made the title a bit more general.

Could be related to this issue: Azure/azure-cli#20444 (comment)

from buck.

aadsm avatar aadsm commented on April 27, 2024

I think the real solution might be to upgrade the vendored PEX dep

Absolutely, is this something you're planning to work on? If yes, then I'll just cancel my PR, otherwise we can ship this one to unblock people using python 3.10.

from buck.

bigfootjon avatar bigfootjon commented on April 27, 2024

Absolutely, is this something you're planning to work on?

I unfortunately don't have a good way to build Buck manually right now in my spare time and I have higher priority things when I'm at work. I want to help fix this but I just don't have the bandwidth :(

I'm happy to review the PR though, unless someone from the Buck team is monitoring this problem.

(I do work at Meta but I don't work anywhere near Buck, I just use Buck in a hobby project)

from buck.

bigfootjon avatar bigfootjon commented on April 27, 2024

I went ahead and just patched the import collections and import symbols lines. Upgrading PEX is what should happen, but I don't have the expertise to do so.

from buck.

bigfootjon avatar bigfootjon commented on April 27, 2024

@lisroach added support, and I ported this to the OSS version. This should be available in the next weekly release

from buck.

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.