Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-145202: Fix crash in unicodedata's GraphemeBreakIterator and Segment#145216

Merged
serhiy-storchaka merged 2 commits intopython:mainfrom
serhiy-storchaka:unicodedata-iter_graphemes-clear
Feb 26, 2026
Merged

gh-145202: Fix crash in unicodedata's GraphemeBreakIterator and Segment#145216
serhiy-storchaka merged 2 commits intopython:mainfrom
serhiy-storchaka:unicodedata-iter_graphemes-clear

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedFeb 25, 2026
edited by bedevere-appbot
Loading

Remove the tp_clear slots and make Segment members read-only.

… SegmentRemove the tp_clear slots and make Segment members read-only.
Copy link
Contributor

@sergey-miryanovsergey-miryanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, small nitpick.

@serhiy-storchaka
Copy link
MemberAuthor

It is difficult to implement the absence of something. There are other GC classes that do not implement tp_clear. They will also crash if we add tp_clear without updating tp_dealloc.

I added tests to ensure that these classes work with the garbage collector.

sergey-miryanov reacted with thumbs up emoji

@serhiy-storchakaserhiy-storchaka merged commit812ef66 intopython:mainFeb 26, 2026
49 checks passed
@serhiy-storchakaserhiy-storchaka deleted the unicodedata-iter_graphemes-clear branchFebruary 26, 2026 09:30
bkap123 pushed a commit to bkap123/cpython that referenced this pull requestFeb 28, 2026
… Segment (pythonGH-145216)Remove the tp_clear slots and make Segment members read-only.Also add tests for reference loops involving GraphemeBreakIteratorand Segment.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@sergey-miryanovsergey-miryanovsergey-miryanov approved these changes

@colesburycolesburycolesbury approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@serhiy-storchaka@sergey-miryanov@colesbury

[8]ページ先頭

©2009-2026 Movatter.jp