Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

tuple constants are for optimisations, not source #28

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

davidszotten
Copy link

my reading of https://docs.python.org/3/library/ast.html#ast.unparse and https://discuss.python.org/t/ast-constant-value-tuple-s-and-frozenset-s/22578 is that tuple constants cannot come from parsing python source, they are only for optimised bytecode

see also astral-sh/ruff#5812

@charliermarsh charliermarsh merged commit b996b21 into astral-sh:main Jul 17, 2023
@davidszotten
Copy link
Author

thanks. how do i get a new release tagged?

@charliermarsh
Copy link
Member

If you want to open a PR in Ruff to upgrade to b996b21ffca562ecb2086f632a6a0b05c245c24a, I can create the tag in this repo once that's merged.

@charliermarsh
Copy link
Member

(We just use the SHA in Cargo.toml, so you don't need the tag to migrate Ruff to the new version -- but the existence of the tag ensures that the commit exists in perpetuity and isn't dropped in the event of a force push or similar.)

@charliermarsh
Copy link
Member

Or @zanieb may end up doing the upgrade now anyway.

@davidszotten
Copy link
Author

ah, i misunderstood the comment in Cargo.toml and though i was supposed to tag _before (or as part of) changing the revision in there

davidszotten added a commit to davidszotten/ruff that referenced this pull request Jul 17, 2023
zanieb added a commit to astral-sh/ruff that referenced this pull request Jul 17, 2023
zanieb added a commit to astral-sh/ruff that referenced this pull request Jul 17, 2023
c.f. astral-sh/RustPython-Parser#28

Tests: No snapshots changed

---------

Co-authored-by: Zanie <contact@zanie.dev>
evanrittenhouse pushed a commit to evanrittenhouse/ruff that referenced this pull request Jul 19, 2023
c.f. astral-sh/RustPython-Parser#28

Tests: No snapshots changed

---------

Co-authored-by: Zanie <contact@zanie.dev>
konstin pushed a commit to astral-sh/ruff that referenced this pull request Jul 19, 2023
c.f. astral-sh/RustPython-Parser#28

Tests: No snapshots changed

---------

Co-authored-by: Zanie <contact@zanie.dev>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants