Skip to content

fix(types): add typing and collections.abc module prefix #5663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
May 19, 2025
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
fc436dd
Fix Python 3.8 type hints and add module prefix
gentlegiantJGC May 14, 2025
7f59a8b
style: pre-commit fixes
pre-commit-ci[bot] May 14, 2025
cf1610c
Add module prefix to Union
gentlegiantJGC May 15, 2025
78b2f91
Rename macros
gentlegiantJGC May 15, 2025
ac9a3fd
Improve comment
gentlegiantJGC May 15, 2025
aaff285
Comment out 3.8 type hint macros
gentlegiantJGC May 15, 2025
f27cc9e
Add Iterable module prefix
gentlegiantJGC May 15, 2025
1d143be
Add module prefix to Iterator
gentlegiantJGC May 15, 2025
6806f11
Add module prefix to Callable
gentlegiantJGC May 15, 2025
4faee40
Re-add accidentally deleted brackets
gentlegiantJGC May 15, 2025
64345df
Add module prefix to Optional
gentlegiantJGC May 15, 2025
22f9ceb
Add module prefix to Final
gentlegiantJGC May 15, 2025
345f974
Add module prefix to ClassVar
gentlegiantJGC May 15, 2025
7915d6e
Add module prefix to TypeGuard
gentlegiantJGC May 15, 2025
299a65a
Add module prefix to TypeIs
gentlegiantJGC May 15, 2025
88d408b
Add module prefix to NoReturn
gentlegiantJGC May 15, 2025
f125949
Add module prefix to Never
gentlegiantJGC May 15, 2025
6a013af
Add module prefix to Literal
gentlegiantJGC May 15, 2025
99700bb
Add module prefix to Callable
gentlegiantJGC May 15, 2025
9b93079
Add module prefix to Sequence
gentlegiantJGC May 15, 2025
21663a3
Add module prefix to Iterator
gentlegiantJGC May 15, 2025
edc52b5
Merge branch 'master' into fix-type-hints-3-9
gentlegiantJGC May 15, 2025
5751384
style: pre-commit fixes
pre-commit-ci[bot] May 15, 2025
edb4ba3
Remove type hint macros
gentlegiantJGC May 16, 2025
e684a4d
style: pre-commit fixes
pre-commit-ci[bot] May 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into fix-type-hints-3-9
  • Loading branch information
gentlegiantJGC committed May 15, 2025
commit edc52b520d068f0ddf8394123c2240603c61de1b
7 changes: 7 additions & 0 deletions include/pybind11/detail/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@
# define PYBIND11_SUBINTERPRETER_SUPPORT
#endif

// 3.12 Compatibility
#if 0x030C0000 <= PY_VERSION_HEX
# define PYBIND11_BUFFER_TYPE_HINT "collections.abc.Buffer"
#else
# define PYBIND11_BUFFER_TYPE_HINT "typing_extensions.Buffer"
#endif

// Python 3.9+ Compatibility #5663
//#if 0x03090000 <= PY_VERSION_HEX
#define PYBIND11_TYPE_HINT_ITERABLE "collections.abc.Iterable"
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.