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

fix(co_positions): resolve issue caused by absence co_positions #395

Merged
merged 2 commits into from
Oct 29, 2023

Conversation

moaddib666
Copy link
Contributor

Attribute on billiard _Object class in the billiard/einfo.py;

Python 3.11 introduced a new attribute co_positions for code objects, inspired by PEP-0657. This has led to compatibility issues with the billiard library, specifically the _Object class in billiard/einfo.py, which lacks the co_positions attribute. This affects the error handling and logging mechanisms, resulting in AttributeError exceptions.

Resolves #386

…ribute on billiard _Object class in the `billiard/einfo.py`;

Python 3.11 introduced a new attribute `co_positions` for `code` objects, inspired by PEP-0657. This has led to compatibility issues with the `billiard` library, specifically the `_Object` class in `billiard/einfo.py`, which lacks the `co_positions` attribute. This affects the error handling and logging mechanisms, resulting in AttributeError exceptions.
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you try to add some basic unit tests?

@moaddib666
Copy link
Contributor Author

moaddib666 commented Oct 28, 2023

Hi, thx for fast response, will check what can be done regarding this tomorrow. I've checked that no unit test existing for this specific file so I skipped creation of the new one, so basically we need to cover all scenarios for different python versions.

@auvipy auvipy self-requested a review October 29, 2023 03:36
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please check and fix the CI faillures

@moaddib666 moaddib666 force-pushed the hotfix/python3.11-co-positions-support branch from 34a1eb1 to a3b9424 Compare October 29, 2023 10:20
@moaddib666
Copy link
Contributor Author

moaddib666 commented Oct 29, 2023

My fault after applying linters black and isort were added extra lines to the test cases that shifted expected exception posited, now fixed.

~/PycharmProjects/billiard $ tox -v -e 3.11-unit -- -v

============================================================ 27 passed, 53 skipped, 1 warning in 3.35s =============================================================
3.11-unit: exit 0 (3.65 seconds) /Users/moaddib/PycharmProjects/billiard> py.test -xv pid=33060
.pkg: _exit> python /Users/moaddib/PycharmProjects/billiard/.tox/.tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: exit None (0.00 seconds) /Users/moaddib/PycharmProjects/billiard> python /Users/moaddib/PycharmProjects/billiard/.tox/.tox/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ pid=33054
  3.11-unit: OK (5.45=setup[1.80]+cmd[3.65] seconds)
  congratulations :) (5.52 seconds)

@auvipy auvipy merged commit 17037e5 into celery:main Oct 29, 2023
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add support for ExceptionGroups - PEP-0654
2 participants