GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-99284: [ctypes] remove `_use_broken_old_ctypes_structure_semantics_` by sobolevn · Pull Request #99285 · python/cpython

Conversation

@sobolevn

@sobolevn sobolevn commented Nov 9, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: [ctypes] Do we still need _use_broken_old_ctypes_structure_semantics_? #99284

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added the awaiting review label Nov 9, 2022
@sobolevn
sobolevn force-pushed the issue-99284 branch from d6324a3 to 45cec36 Compare November 9, 2022 09:48
@sobolevn sobolevn changed the title Issue 99284 gh-99275: [ctypes] remove _use_broken_old_ctypes_structure_semantics_ Nov 9, 2022
@bedevere-bot bedevere-bot mentioned this pull request Nov 9, 2022
No exception set but raise SystemError when setting _fields_ of ctypes.Structure in __init_subclass__ #99275
Closed
@sobolevn 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
@bedevere-bot bedevere-bot mentioned this pull request Nov 9, 2022
[ctypes] Do we still need _use_broken_old_ctypes_structure_semantics_? #99284
Closed
@sobolevn
pythongh-99284: [ctypes] remove `_use_broken_old_ctypes_structure_sem…
63d1574
…antics_`
@sobolevn
sobolevn force-pushed the issue-99284 branch from 45cec36 to 63d1574 Compare November 9, 2022 09:52
@sobolevn

sobolevn commented Nov 9, 2022

Copy link
Copy Markdown
Member Author

I've messed up the issue number, sorry!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gpshead

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

sobolevn commented Nov 13, 2022

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 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner
vstinner approved these changes Nov 18, 2022
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gpshead reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Misc/NEWS.d/next/Library/2022-11-09-12-36-12.gh-issue-99284.9p4J2l.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Nov 18, 2022
@sobolevn
Address review
1388dd0
@sobolevn
sobolevn force-pushed the issue-99284 branch from 7f45ebc to 1388dd0 Compare November 18, 2022 17:50
sobolevn added 2 commits November 18, 2022 21:15
@sobolevn
Merge branch 'main' into issue-99284
decbe2c
@sobolevn
Update globals-to-fix.tsv
7962b11
gpshead
gpshead approved these changes Nov 19, 2022
View reviewed changes

@gpshead gpshead left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gpshead
gpshead merged commit a3360fa into python:main Nov 19, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead gpshead approved these changes
@vstinner vstinner vstinner approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@gpshead gpshead

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@sobolevn @gpshead @vstinner @bedevere-bot
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.