| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…s on custom objects
…s on wrapped partial functions
…t stringized annotations
|
Thanks @dr-carlos for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, something went wrong.
…age (pythonGH-141286) * Test `get_annotations(format=Format.VALUE)` for stringized annotations on custom objects * Test `get_annotations(format=Format.VALUE)` for stringized annotations on wrapped partial functions * Update test_stringized_annotations_with_star_unpack() to actually test stringized annotations * Test __annotate__ returning a non-dict * Test passing globals and locals to stringized `get_annotations()` (cherry picked from commit 06b6228) Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
|
GH-141353 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
…rage (GH-141286) (#141353) gh-141174: Improve `annotationlib.get_annotations()` test coverage (GH-141286) * Test `get_annotations(format=Format.VALUE)` for stringized annotations on custom objects * Test `get_annotations(format=Format.VALUE)` for stringized annotations on wrapped partial functions * Update test_stringized_annotations_with_star_unpack() to actually test stringized annotations * Test __annotate__ returning a non-dict * Test passing globals and locals to stringized `get_annotations()` (cherry picked from commit 06b6228) Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot ARM64 macOS 3.x (tier-2) has failed when building commit 06b6228. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/725/builds/12289 Failed tests:
Summary of the results of the build (if available): == Click to see traceback logsremote: Enumerating objects: 9, done.
remote: Counting objects: 11% (1/9)
remote: Counting objects: 22% (2/9)
remote: Counting objects: 33% (3/9)
remote: Counting objects: 44% (4/9)
remote: Counting objects: 55% (5/9)
remote: Counting objects: 66% (6/9)
remote: Counting objects: 77% (7/9)
remote: Counting objects: 88% (8/9)
remote: Counting objects: 100% (9/9)
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 20% (1/5)
remote: Compressing objects: 40% (2/5)
remote: Compressing objects: 60% (3/5)
remote: Compressing objects: 80% (4/5)
remote: Compressing objects: 100% (5/5)
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0)
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to '06b62282c79dd69293a3eefb4c55f5acc6312cb2'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 06b62282c79 gh-141174: Improve `annotationlib.get_annotations()` test coverage (#141286)
Switched to and reset branch 'main'
make: *** [buildbottest] Error 2 |
Sorry, something went wrong.
This seems to be a false positive - obviously this commit doesn't touch test_urllib2net, and the issue is an FTP timeout. |
Sorry, something went wrong.
|
Petr said that that test is being disabled on buildbots, it's frequently flaky. |
Sorry, something went wrong.
…age (python#141286) * Test `get_annotations(format=Format.VALUE)` for stringized annotations on custom objects * Test `get_annotations(format=Format.VALUE)` for stringized annotations on wrapped partial functions * Update test_stringized_annotations_with_star_unpack() to actually test stringized annotations * Test __annotate__ returning a non-dict * Test passing globals and locals to stringized `get_annotations()`
| Back | FazBrowse Home | New Git URL |
All lines in get_annotations(), _rewrite_star_unpack(), and _get_and_call_annotate() should now be covered by tests.
Branch coverage for evaluating stringized annotations on classes with no module or a module which cannot be imported was intentionally not included, as I couldn't find a realistic case and it didn't seem like a behaviour that needed to be reproducible. Happy to add a new test for this.
Also happy to remove the test which covers the branch of 'what if we unwrap a partial object but functools has never been imported', as this isn't a very realistic situation either.