[pull] main from python:main#31
Merged
pull[bot] merged 6 commits intowebfutureiorepo:mainfrom Feb 21, 2025
Merged
Conversation
…in str (#129570) Co-authored-by: Victor Stinner <vstinner@python.org>
First, write the test name without color. Then, write the test name and the result with color. Each test is displayed twice. Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
) Fix UBSan failures for `keyobject`, `lru_list_elem`, `lru_cache_object`. Suppress unused return values. Change `_PyPartialObject_CAST` (from #124733) to `partialobject_CAST` for consistency with the current style for these macros
Fix UBSan failures for `simplequeueobject` Suppress unused return values
Fix UBSan failures for `RandomObject` Suppress unused return values
Reviewer's Guide by SourceryThis pull request includes changes to improve type safety by introducing Updated class diagram for partialobjectclassDiagram
class partialobject {
PyObject* fn
PyObject* args
PyObject* kw
PyObject* dict
PyObject* weakreflist
}
note for partialobject "Added partialobject_CAST macro"
Updated class diagram for keyobjectclassDiagram
class keyobject {
PyObject* cmp
PyObject* object
}
note for keyobject "Added keyobject_CAST macro"
Updated class diagram for lru_list_elemclassDiagram
class lru_list_elem {
PyObject *key
PyObject *result
}
note for lru_list_elem "Added lru_list_elem_CAST macro"
Updated class diagram for lru_cache_objectclassDiagram
class lru_cache_object {
PyObject *cache
PyObject *func
PyObject *wrapper
lru_list_elem root
Py_ssize_t hits
Py_ssize_t misses
Py_ssize_t maxsize
int typed
PyObject *weakreflist
}
note for lru_cache_object "Added lru_cache_object_CAST macro"
Updated class diagram for simplequeueobjectclassDiagram
class simplequeueobject {
RingBuf buf
PyObject *mutex
PyObject *not_empty
PyObject *not_full
Py_ssize_t maxsize
PyObject *weakreflist
}
note for simplequeueobject "Added simplequeueobject_CAST macro"
Updated class diagram for RandomObjectclassDiagram
class RandomObject {
uint32_t state[N]
}
note for RandomObject "Added RandomObject_CAST macro"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
Summary by Sourcery
This pull request includes several bug fixes and enhancements across different modules. It ensures that
unicodedata.normalize()returns astrobject, improves code readability by introducing*_CASTmacros, and simplifies the logic inLib/test/libregrtest/main.py.Bug Fixes:
unicodedata.normalize()now always returns astrobject, even when given a subclass ofstras input.Enhancements:
*_CASTmacros for type casting in_functools,_queue, and_randommodules.previous_testvariable inLib/test/libregrtest/main.pyto simplify the logic and improve readability.