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

Packaging 21.0 #4264

Closed
2 tasks done
frenzymadness opened this issue Jul 8, 2021 · 4 comments · Fixed by #4362 or #4749
Closed
2 tasks done

Packaging 21.0 #4264

frenzymadness opened this issue Jul 8, 2021 · 4 comments · Fixed by #4362 or #4749

Comments

@frenzymadness
Copy link

According to my testing in Fedora with more than 180 RPM packages, poetry and poetry-core packages are compatible with the latest packaging version 21.0. The main reason for the major release is that packaging 21 no longer supports Python < 3.6.

So I think that you can update it.

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.
@hroncok
Copy link
Contributor

hroncok commented Aug 18, 2021

According to my testing in Fedora with more than 180 RPM packages, poetry and poetry-core packages are compatible with the latest packaging version 21.0.

I am afraid there is a problem: https://src.fedoraproject.org/rpms/poetry/pull-request/17#comment-83627

@hroncok
Copy link
Contributor

hroncok commented Aug 18, 2021

Packaging 21.0 also drops support for Python 2.7 and Poetry executes a file from it with the venv's Python interpreter:

poetry/poetry/utils/env.py

Lines 1491 to 1519 in cd51129

def get_supported_tags(self) -> List[Tag]:
file_path = Path(packaging.tags.__file__)
if file_path.suffix == ".pyc":
# Python 2
file_path = file_path.with_suffix(".py")
with file_path.open(encoding="utf-8") as f:
script = decode(f.read())
script = script.replace(
"from ._typing import TYPE_CHECKING, cast",
"TYPE_CHECKING = False\ncast = lambda type_, value: value",
)
script = script.replace(
"from ._typing import MYPY_CHECK_RUNNING, cast",
"MYPY_CHECK_RUNNING = False\ncast = lambda type_, value: value",
)
script += textwrap.dedent(
"""
import json
print(json.dumps([(t.interpreter, t.abi, t.platform) for t in sys_tags()]))
"""
)
output = self.run_python_script(script)
return [Tag(*t) for t in json.loads(output)]

@sammko
Copy link

sammko commented Feb 19, 2022

#5216 is a result of packaging 21. (Archlinux testing repo). Downstream https://bugs.archlinux.org/task/73867

Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants