-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to import 'collections.abc' using python 3.13.1 #10112
Unable to import 'collections.abc' using python 3.13.1 #10112
Comments
Thanks, we'll jump on this 👍 |
Reopening to keep visibility until we bump astroid later today. |
Polling other contributors, can anyone reproduce this locally? @zenlyj @mbyrnepr2 |
LGTM @jacobtylerwalls (venv3131) markbyrne@Marks-MacBook-Air-2 programming % python -m pylint --version
pylint 4.0.0-dev0
astroid 3.3.6
Python 3.13.1 (v3.13.1:06714517797, Dec 3 2024, 14:00:22) [Clang 15.0.0 (clang-1500.3.9.4)]
(venv3131) markbyrne@Marks-MacBook-Air-2 programming % cat x.py
import collections.abc
(venv3131) markbyrne@Marks-MacBook-Air-2 programming % python -V
Python 3.13.1
(venv3131) markbyrne@Marks-MacBook-Air-2 programming % python -m pylint x.py
************* Module x
x.py:1:0: C0114: Missing module docstring (missing-module-docstring)
x.py:1:0: W0611: Unused import collections.abc (unused-import)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
(venv3131) markbyrne@Marks-MacBook-Air-2 programming % |
reproducible on my end
with the following:
|
Thanks. By chance is anyone testing on linux locally? If it wasn't clear, I have doubts that astroid 3.3.6 fixed anything. |
I have linux but didn't find an easy way to install 3.13.1 yet. |
i got the error testing with astroid 3.3.6 environment is WSL2, Ubuntu 20.04.6 LTS if it helps |
Here you can see my failed GitHub action due to the error: https://github.com/Torom/BotLi/actions/runs/12241011421/job/34145142509
|
Thanks, our own actions are failing too, however I'm doubtful we can work on it until we have a contributor who can debug it locally. |
With https://github.com/pyenv/pyenv it is very easy to install any Python version, including 3.13.1. |
Thank you @Torom ! I managed to fix my issue with |
All right, I can reproduce the
Switching to
I'm wondering if the race condition fixed in the initial issue is bypassing our astroid brain mechanism, but this is just intuition. Let me know if there's any particular test/debug I could do Jacob, I'll be able to dig into this in ~= 20 hours. |
Wonderful. I'd sniff around |
python-3.13.1 broke compatibility with pylint. Revert this one the pylint issue [1] is fixed. [1] pylint-dev/pylint#10112 [2] pylint-dev/astroid#2656
The bug is: pylint-dev/pylint#10112 Fortunately, collections.abc is used only once, in the Ansible plugin, for type checking.
The bug is: pylint-dev/pylint#10112 Fortunately, collections.abc is used only once, in the Ansible plugin, for type checking.
python-3.13.1 broke compatibility with pylint. Revert this one the pylint issue [1] is fixed. [1] pylint-dev/pylint#10112 [2] pylint-dev/astroid#2656
Fix for If anybody who is running into this issue could try to test out the |
That's a workaround for pylint-dev/pylint#10112. Also, properly filter out linting for "schedule" event.
* Run tests under 3.13.0-rc2 * Work around lack of wheels for some packages * Use newer gevent on Python 3.13 * Use Python 3.13 final * Add legacy-cgi package on Python>=3.13 * Require grpcio>=1.66.2 on 3.13 * Require gevent>=24.10.3 on 3.13 * poetry lock --no-update * poetry update pylint * Upgrade psycopg2 * Require newer confluent-kafka on Python 3.13 * Ignore mypy error * Add pylint import-error disable for collections.abc Workaround for pylint-dev/pylint#10112 * Upgrade some pytest-related packages * Fix some tests broken by package upgrades * Fix missing teardown functions in cassandra tests These caused tests to hang under Python 3.13. * Remove now-unnecessary workarounds for packages without wheels * poetry update * Remove now-unnecessary "type: ignore" comment
We have enabled the github action which found this issue. Pylint works fine! |
This PR contains the following updates: | Package | Type | Update | Change | Pending | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---|---|---|---| | [astral-sh/ruff-pre-commit](https://redirect.github.com/astral-sh/ruff-pre-commit) | repository | patch | `v0.9.0` -> `v0.9.1` | | [![age](https://developer.mend.io/api/mc/badges/age/github-tags/astral-sh%2fruff-pre-commit/v0.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/github-tags/astral-sh%2fruff-pre-commit/v0.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/github-tags/astral-sh%2fruff-pre-commit/v0.9.0/v0.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/github-tags/astral-sh%2fruff-pre-commit/v0.9.0/v0.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [astroid](https://redirect.github.com/pylint-dev/astroid) | | patch | `==3.3.6` -> `==3.3.8` | | [![age](https://developer.mend.io/api/mc/badges/age/pypi/astroid/3.3.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/astroid/3.3.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/astroid/3.3.6/3.3.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/astroid/3.3.6/3.3.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [charset-normalizer](https://redirect.github.com/jawah/charset_normalizer) ([changelog](https://redirect.github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md)) | | patch | `==3.4.0` -> `==3.4.1` | | [![age](https://developer.mend.io/api/mc/badges/age/pypi/charset-normalizer/3.4.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/charset-normalizer/3.4.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/charset-normalizer/3.4.0/3.4.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/charset-normalizer/3.4.0/3.4.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [coverage](https://redirect.github.com/nedbat/coveragepy) | | patch | `==7.6.9` -> `==7.6.10` | | [![age](https://developer.mend.io/api/mc/badges/age/pypi/coverage/7.6.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/coverage/7.6.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/coverage/7.6.9/7.6.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/coverage/7.6.9/7.6.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [pylint](https://redirect.github.com/pylint-dev/pylint) ([changelog](https://pylint.readthedocs.io/en/latest/whatsnew/3/)) | | patch | `==3.3.2` -> `==3.3.3` | | [![age](https://developer.mend.io/api/mc/badges/age/pypi/pylint/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/pylint/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/pylint/3.3.2/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pylint/3.3.2/3.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | pyparsing | | patch | `==3.2.0` -> `==3.2.1` | | [![age](https://developer.mend.io/api/mc/badges/age/pypi/pyparsing/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/pyparsing/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/pyparsing/3.2.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pyparsing/3.2.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [pytest-subprocess](https://redirect.github.com/aklajnert/pytest-subprocess) | | patch | `==1.5.2` -> `==1.5.3` | | [![age](https://developer.mend.io/api/mc/badges/age/pypi/pytest-subprocess/1.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/pytest-subprocess/1.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/pytest-subprocess/1.5.2/1.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pytest-subprocess/1.5.2/1.5.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [responses](https://redirect.github.com/getsentry/responses) ([changelog](https://redirect.github.com/getsentry/responses/blob/master/CHANGES)) | | patch | `==0.25.3` -> `==0.25.5` | `0.25.6` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/responses/0.25.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/responses/0.25.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/responses/0.25.3/0.25.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/responses/0.25.3/0.25.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | Note: The `pre-commit` manager in Renovate is not supported by the `pre-commit` maintainers or community. Please do not report any problems there, instead [create a Discussion in the Renovate repository](https://redirect.github.com/renovatebot/renovate/discussions/new) if you have any questions. --- ### Release Notes <details> <summary>astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit)</summary> ### [`v0.9.1`](https://redirect.github.com/astral-sh/ruff-pre-commit/releases/tag/v0.9.1) [Compare Source](https://redirect.github.com/astral-sh/ruff-pre-commit/compare/v0.9.0...v0.9.1) See: https://github.com/astral-sh/ruff/releases/tag/0.9.1 </details> <details> <summary>pylint-dev/astroid (astroid)</summary> ### [`v3.3.8`](https://redirect.github.com/pylint-dev/astroid/blob/HEAD/ChangeLog#Whats-New-in-astroid-338) [Compare Source](https://redirect.github.com/pylint-dev/astroid/compare/v3.3.7...v3.3.8) \============================ Release date: 2024-12-23 - Fix inability to import `collections.abc` in python 3.13.1. The reported fixes in astroid 3.3.6 and 3.3.7 did not actually fix this issue. Closes [pylint-dev/pylint#10112](https://redirect.github.com/pylint-dev/pylint/issues/10112) ### [`v3.3.7`](https://redirect.github.com/pylint-dev/astroid/blob/HEAD/ChangeLog#Whats-New-in-astroid-337) [Compare Source](https://redirect.github.com/pylint-dev/astroid/compare/v3.3.6...v3.3.7) \============================ Release date: 2024-12-20 This release was yanked. - Fix inability to import `collections.abc` in python 3.13.1. The reported fix in astroid 3.3.6 did not actually fix this issue. Closes [pylint-dev/pylint#10112](https://redirect.github.com/pylint-dev/pylint/issues/10112) </details> <details> <summary>jawah/charset_normalizer (charset-normalizer)</summary> ### [`v3.4.1`](https://redirect.github.com/jawah/charset_normalizer/blob/HEAD/CHANGELOG.md#341-2024-12-24) [Compare Source](https://redirect.github.com/jawah/charset_normalizer/compare/3.4.0...3.4.1) ##### Changed - Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend. - Enforce annotation delayed loading for a simpler and consistent types in the project. - Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8 ##### Added - pre-commit configuration. - noxfile. ##### Removed - `build-requirements.txt` as per using `pyproject.toml` native build configuration. - `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile). - `setup.cfg` in favor of `pyproject.toml` metadata configuration. - Unused `utils.range_scan` function. ##### Fixed - Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. ([#​572](https://redirect.github.com/jawah/charset_normalizer/issues/572)) - Deprecation warning "'count' is passed as positional argument" when converting to Unicode bytes on Python 3.13+ </details> <details> <summary>nedbat/coveragepy (coverage)</summary> ### [`v7.6.10`](https://redirect.github.com/nedbat/coveragepy/blob/HEAD/CHANGES.rst#Version-7610--2024-12-26) [Compare Source](https://redirect.github.com/nedbat/coveragepy/compare/7.6.9...7.6.10) - Fix: some descriptions of missing branches in HTML and LCOV reports were incorrect when multi-line statements were involved (`issue 1874`\_ and `issue 1875`\_). These are now fixed. - Fix: Python 3.14 `defers evaluation of annotations <pep649_>`\_ by moving them into separate code objects. That code is rarely executed, so coverage.py would mark them as missing, as reported in `issue 1908`\_. Now they are ignored by coverage automatically. - Fixed an obscure and mysterious problem on PyPy 3.10 seemingly involving mocks, imports, and trace functions: `issue 1902`\_. To be honest, I don't understand the problem or the solution, but `git bisect` helped find it, and now it's fixed. - Docs: re-wrote the :ref:`subprocess` page to put multiprocessing first and to highlight the correct use of :class:`multiprocessing.Pool <python:multiprocessing.pool.Pool>`. .. \_issue 1874:[https://github.com/nedbat/coveragepy/issues/1874](https://redirect.github.com/nedbat/coveragepy/issues/1874)4 .. \_issue 1875[https://github.com/nedbat/coveragepy/issues/1875](https://redirect.github.com/nedbat/coveragepy/issues/1875)75 .. \_issue 190[https://github.com/nedbat/coveragepy/issues/1902](https://redirect.github.com/nedbat/coveragepy/issues/1902)902 .. \_issue 19[https://github.com/nedbat/coveragepy/issues/1908](https://redirect.github.com/nedbat/coveragepy/issues/1908)1908 .. \_pep649: https://docs.python.org/3.14/whatsnew/3.14.html#pep-649-deferred-evaluation-of-annotations .. \_changes\_7-6-9: </details> <details> <summary>pylint-dev/pylint (pylint)</summary> ### [`v3.3.3`](https://redirect.github.com/pylint-dev/pylint/releases/tag/v3.3.3) [Compare Source](https://redirect.github.com/pylint-dev/pylint/compare/v3.3.2...v3.3.3) ## What's new in Pylint 3.3.3? Release date: 2024-12-23 ## False Positives Fixed - Fix false positives for `undefined-variable` for classes using Python 3.12 generic type syntax. Closes [#​9335](https://redirect.github.com/pylint-dev/pylint/issues/9335) - Fix a false positive for `use-implicit-booleaness-not-len`. No lint should be emitted for generators (`len` is not defined for generators). Refs [#​10100](https://redirect.github.com/pylint-dev/pylint/issues/10100) ## Other Bug Fixes - Fix `Unable to import 'collections.abc' (import-error)` on Python 3.13.1. Closes [#​10112](https://redirect.github.com/pylint-dev/pylint/issues/10112) </details> <details> <summary>aklajnert/pytest-subprocess (pytest-subprocess)</summary> ### [`v1.5.3`](https://redirect.github.com/aklajnert/pytest-subprocess/blob/HEAD/HISTORY.rst#153-2025-01-04) [Compare Source](https://redirect.github.com/aklajnert/pytest-subprocess/compare/1.5.2...1.5.3) Features * `#​171 <https://github.com/aklajnert/pytest-subprocess/pull/171>`_, `#​178 <https://github.com/aklajnert/pytest-subprocess/pull/178>`_: Allow to access keyword arguments passed to Popen. Bug fixes - `#​180 <https://github.com/aklajnert/pytest-subprocess/pull/180>`\_: Fixed an incorrect wait timeout calculation. - `#​170 <https://github.com/aklajnert/pytest-subprocess/pull/170>`\_: Wrapped ProcessDispatcher.dispatch into FakePopenWrapper as it was causing TypeError when Popen is used as a type. - `#​169 <https://github.com/aklajnert/pytest-subprocess/pull/169>`\_: Get rid of using thread in AsyncFakePopen as it causes thread.join() to hang indefinitely. </details> <details> <summary>getsentry/responses (responses)</summary> ### [`v0.25.5`](https://redirect.github.com/getsentry/responses/blob/HEAD/CHANGES#0255) [Compare Source](https://redirect.github.com/getsentry/responses/compare/0.25.3...0.25.5) - Fix readme issue that prevented 0.25.4 from being published to pypi. </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every weekend" in timezone Etc/UTC, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/canonical/charmcraft). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Bug description
Configuration
Command used
Pylint output
Expected behavior
Not seeing the Unable to import 'collections.abc' (import-error)
Other messages are due to the tiny example
likely due to
python/cpython@d46d291
Pylint version
OS / Environment
tested with github actions using
Ubuntu
22.04.5
LTS
Additional dependencies
The text was updated successfully, but these errors were encountered: