← 返回首页
gh-99284: [ctypes] remove `_use_broken_old_ctypes_structure_semantics_` by sobolevn · Pull Request #99285 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-99284: [ctypes] remove _use_broken_old_ctypes_structure_semantics_#99285

Merged
gpshead merged 4 commits into
python:mainfrom
sobolevn:issue-99284
Nov 19, 2022
Merged

gh-99284: [ctypes] remove _use_broken_old_ctypes_structure_semantics_#99285
gpshead merged 4 commits into
python:mainfrom
sobolevn:issue-99284

Conversation

sobolevn commented Nov 9, 2022
edited
Loading

Copy link
Copy Markdown
Member

sobolevn changed the title Issue 99284 gh-99275: [ctypes] remove _use_broken_old_ctypes_structure_semantics_ Nov 9, 2022
sobolevn changed the title gh-99275: [ctypes] remove _use_broken_old_ctypes_structure_semantics_ gh-99284: [ctypes] remove _use_broken_old_ctypes_structure_semantics_ Nov 9, 2022

sobolevn commented Nov 9, 2022

Copy link
Copy Markdown
Member Author

I've messed up the issue number, sorry!

gpshead commented Nov 13, 2022

Copy link
Copy Markdown
Member

Looks like this hack was added in ~2006. Some research of existing code to see if anything still relies on it is warranted before merging, it seems very unlikely. if so we'd want a deprecation period.

gpshead self-assigned this Nov 13, 2022
gpshead requested a review from vstinner November 13, 2022 19:34

Copy link
Copy Markdown
Member Author

Quoting the original issue:

I've never seen this before, so I went and searched for this on the internet: https://cs.github.com/?scopeName=All+repos&scope=&q=_use_broken_old_ctypes_structure_semantics_

I've done a minimal research. I was not able to find any references to it.
Even Google does not have any significant references: https://www.google.com/search?newwindow=1&q=_use_broken_old_ctypes_structure_semantics_&nfpr=1&sa=X&ved=2ahUKEwiXxoHT_av7AhUQuIsKHcpYAfAQvgUoAXoECAUQAg&biw=1280&bih=726&dpr=2

I don't feel qualified in this specific module and its history to make an educated decision here. However, deprecation period is always a good idea 👍

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

LGTM, but please complete the doc.

This attribute was untested and undocumented. I never heard about it.

Looks like not a single GitHub project uses it.

I ran a code search in PyPI top 5000 projects: no projects use it.

$ ./search_pypi_top.py PYPI-2020-09-01/ '_use_broken_old_ctypes_structure_semantics_' -q Found 0 matching lines in 0 projects

Comment thread Misc/NEWS.d/next/Library/2022-11-09-12-36-12.gh-issue-99284.9p4J2l.rst Outdated Show resolved Hide resolved

gpshead left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Thanks! FWIW I also searched our huge internal codebase at Google, nothing found that uses this odd thing.

gpshead merged commit a3360fa into python:main Nov 19, 2022
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Footer

© 2026 GitHub, Inc.