Skip to content

Python: Update .expected to support Python 3.10#7844

Closed
RasmusWL wants to merge 2 commits intogithub:mainfrom
RasmusWL:python-3.10
Closed

Python: Update .expected to support Python 3.10#7844
RasmusWL wants to merge 2 commits intogithub:mainfrom
RasmusWL:python-3.10

Conversation

@RasmusWL
Copy link
Copy Markdown
Member

@RasmusWL RasmusWL commented Feb 4, 2022

This PR should be merged together with internal PR that changes the test to use Python 3.10 (so the tests on this PR will fail).

The changes required does mean that 3 tests won't pass when using previous python versions, but I don't see any way around it.

@RasmusWL RasmusWL added the depends on internal PR This PR should only be merged in sync with an internal Semmle PR label Feb 4, 2022
@RasmusWL RasmusWL requested a review from a team as a code owner February 4, 2022 13:52
@github-actions github-actions bot added the Python label Feb 4, 2022
@RasmusWL RasmusWL force-pushed the python-3.10 branch 3 times, most recently from b4a245e to 6cfaeb6 Compare February 9, 2022 09:52
This _does_ mean that those 3 tests won't pass when using previous
python versions, but I don't see any way around it.

From https://docs.python.org/3/whatsnew/3.10.html:

> The exception socket.timeout is now an alias of TimeoutError.
> (Contributed by Christian Heimes in bpo-42413.)

I think the new `__annotations__` property comes from this change, but
not 100% sure

> Class and module objects now lazy-create empty annotations dicts on
> demand. The annotations dicts are stored in the object’s __dict__ for
> backwards compatibility. This improves the best practices for working
> with __annotations__; for more information, please see Annotations
> Best Practices. (Contributed by Larry Hastings in bpo-43901.)
With previous commit, I had to change output for Python 3.10, but that
was obviously not enough, since the test is also run for Python 2 :|

Since there already was a
/home/rasmus/work/code/ql/python/ql/test/2/library-tests/PointsTo/imports/`
test folder, and it wasn't obvious that one of these PointsTo imports
tests were a subset of the other, I renamed the old shared one slightly.
@RasmusWL RasmusWL marked this pull request as draft June 7, 2022 12:40
@RasmusWL
Copy link
Copy Markdown
Member Author

superseded by #14791

@RasmusWL RasmusWL closed this Nov 15, 2023
@RasmusWL RasmusWL deleted the python-3.10 branch November 15, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

depends on internal PR This PR should only be merged in sync with an internal Semmle PR Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant