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 — Resolve 3.13 issues for `ctypes._endian` by max-muoto · Pull Request #12372 · python/typeshed

Conversation

@max-muoto

@max-muoto max-muoto commented Jul 20, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Starting in 3.13, we're no long doing a star import from ctypes: python/cpython#105768

Sorry, something went wrong.

Uh oh!

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

All reactions
@max-muoto
Resolve 3.13 issues
dd6cbc6
@max-muoto max-muoto changed the title Resolve 3.13 issues Resolve 3.13 issues for ctypes._endian Jul 20, 2024
@max-muoto
max-muoto marked this pull request as draft July 20, 2024 17:20
@max-muoto
Tweak
8829053
@github-actions

This comment has been minimized.

Sign in to view
max-muoto added 7 commits July 20, 2024 12:32
@max-muoto
Tewak
da8970b
@max-muoto
Tweak
e0979e7
@max-muoto
Fix ignore
a774c5f
@max-muoto
Fix
46c4989
@max-muoto
Fixes
f23f72c
@max-muoto
Fix
cb76782
@max-muoto
Fixes
db29e15
@max-muoto
max-muoto marked this pull request as ready for review July 20, 2024 17:50
@github-actions

This comment has been minimized.

Sign in to view
@max-muoto
Merge branch 'main' into fix-ctypes-_endian
9d68b01
@github-actions

This comment has been minimized.

Sign in to view
srittau
srittau reviewed Jul 20, 2024
View reviewed changes
Comment thread stdlib/ctypes/_endian.pyi Outdated

if sys.version_info >= (3, 12):
if sys.version_info >= (3, 13):
from ctypes import Array as Array, Structure, Union

@srittau srittau Jul 20, 2024

Copy link
Copy Markdown
Collaborator

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.

Why add Array as new re-export?

Sorry, something went wrong.

Uh oh!

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

All reactions

@max-muoto max-muoto Jul 20, 2024

Copy link
Copy Markdown
Contributor Author

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.

It's exported in the implementation: https://github.com/python/cpython/blob/094375b9b7e087a4f0f60541dc7f2dc53be92646/Lib/ctypes/_endian.py#L2

Sorry, something went wrong.

Uh oh!

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

All reactions

@JelleZijlstra JelleZijlstra Jul 21, 2024

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.

It's just imported there. This is a private module, and it doesn't seem like it's intentionally re-exported.

Sorry, something went wrong.

Uh oh!

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

All reactions

@max-muoto max-muoto Jul 21, 2024

Copy link
Copy Markdown
Contributor Author

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.

I see, was trying to match the runtime as closely as possible, but makes sense.

Sorry, something went wrong.

Uh oh!

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

All reactions

@max-muoto max-muoto Jul 21, 2024

Copy link
Copy Markdown
Contributor Author

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.

2074c3d

Sorry, something went wrong.

Uh oh!

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

All reactions
@max-muoto
Address feedback
2074c3d
JelleZijlstra
JelleZijlstra reviewed Jul 21, 2024
View reviewed changes
Comment thread stdlib/ctypes/_endian.pyi Outdated

if sys.version_info >= (3, 12):
if sys.version_info < (3, 13):
from _ctypes import RTLD_GLOBAL as RTLD_GLOBAL, RTLD_LOCAL as RTLD_LOCAL

@JelleZijlstra JelleZijlstra Jul 21, 2024

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.

All of these look like incidental re-exports, can we remove all the as imports?

Looks like it used to do from ctypes import *.

Sorry, something went wrong.

Uh oh!

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

All reactions

@max-muoto max-muoto Jul 21, 2024

Copy link
Copy Markdown
Contributor Author

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.

adb8d10

Sorry, something went wrong.

Uh oh!

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

All reactions

@max-muoto max-muoto Jul 21, 2024

Copy link
Copy Markdown
Contributor Author

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.

Let me also add an ignore for older Python versions.

Sorry, something went wrong.

Uh oh!

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

All reactions
@github-actions

This comment has been minimized.

Sign in to view
@max-muoto
Remove as imports
adb8d10
@github-actions

This comment has been minimized.

Sign in to view
max-muoto and others added 5 commits August 3, 2024 16:39
@max-muoto
Add ignores
a77c345
@max-muoto
Merge branch 'main' into fix-ctypes-_endian
eb99228
@pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hooks
b66502c
@max-muoto
Fix 3.12
63be585
@pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hooks
5f1b730
@max-muoto

max-muoto commented Aug 3, 2024

Copy link
Copy Markdown
Contributor Author

@JelleZijlstra Should be ready for another look, apologies for the delay.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions

github-actions Bot commented Aug 3, 2024

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

All reactions

Sorry, something went wrong.

Uh oh!

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

@JelleZijlstra
JelleZijlstra merged commit 0fd6cd2 into python:main Aug 3, 2024
max-muoto added a commit to max-muoto/typeshed that referenced this pull request Aug 17, 2024
@max-muoto
Resolve 3.13 issues for ctypes._endian (python#12372)
8f08609
max-muoto added a commit to max-muoto/typeshed that referenced this pull request Sep 8, 2024
@max-muoto
Resolve 3.13 issues for ctypes._endian (python#12372)
e6f3c3b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@srittau srittau srittau left review comments
@JelleZijlstra JelleZijlstra JelleZijlstra left review comments

Uh oh!

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

Assignees

No one assigned

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.

3 participants

@max-muoto @srittau @JelleZijlstra
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.