Skip to content

Commit 3ab03de

Browse files
authored
Upgrade to latest 3.12 and 3.13 versions for stubtest (#12131)
1 parent 9197ace commit 3ab03de

File tree

16 files changed

+64
-117
lines changed

16 files changed

+64
-117
lines changed

.github/workflows/daily.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ jobs:
3636
matrix:
3737
# various modules aren't available on macos-13 and higher
3838
os: ["ubuntu-latest", "windows-latest", "macos-12"]
39-
# TODO: unpin 3.12 and 3.13 micro versions once https://github.com/actions/setup-python/issues/886 is resolved
40-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12.3", "3.13.0-beta.1"]
39+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
4140
fail-fast: false
4241

4342
steps:

.github/workflows/stubtest_stdlib.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ jobs:
3232
matrix:
3333
# various modules aren't available on macos-13 and higher
3434
os: ["ubuntu-latest", "windows-latest", "macos-12"]
35-
# TODO: unpin 3.12 and 3.13 micro versions once https://github.com/actions/setup-python/issues/886 is resolved
36-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12.3", "3.13.0-beta.1"]
35+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
3736
fail-fast: false
3837

3938
steps:

pyrightconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"reportUnknownVariableType": "none",
1919
// Extra strict settings
2020
"reportCallInDefaultInitializer": "error",
21-
"reportImplicitStringConcatenation": "error",
2221
"reportUnnecessaryTypeIgnoreComment": "error",
2322
// Leave "type: ignore" comments to mypy
2423
"enableTypeIgnoreComments": false,

pyrightconfig.stricter.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@
105105
"reportIncompleteStub": "none",
106106
// Extra strict settings
107107
"reportCallInDefaultInitializer": "error",
108-
"reportImplicitStringConcatenation": "error",
108+
// implicit string concatenation is useful for long deprecation messages
109+
"reportImplicitStringConcatenation": "none",
109110
"reportUnnecessaryTypeIgnoreComment": "error",
110111
// Leave "type: ignore" comments to mypy
111112
"enableTypeIgnoreComments": false,

stdlib/@tests/stubtest_allowlists/darwin-py313.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ asyncio.unix_events.EventLoop
33
asyncio.unix_events._UnixSelectorEventLoop.create_unix_server
44
asyncio.unix_events.__all__
55
fcntl.F_GETNOSIGPIPE
6+
fcntl.F_OFD_GETLK
7+
fcntl.F_OFD_SETLK
8+
fcntl.F_OFD_SETLKW
69
fcntl.F_RDAHEAD
710
fcntl.F_SETNOSIGPIPE
811
mmap.MAP_HASSEMAPHORE
@@ -23,6 +26,7 @@ os.waitid_result
2326
posix.grantpt
2427
posix.posix_openpt
2528
posix.ptsname
29+
posixpath.splitroot
2630
posix.unlockpt
2731
posix.waitid
2832
posix.waitid_result
@@ -34,6 +38,9 @@ _curses.unget_wch
3438
_curses.window.get_wch
3539
curses.window.get_wch
3640

41+
# Exists locally on MacOS but not on GitHub
42+
(mmap.MAP_32BIT)?
43+
3744
# These entries looks like a `setup-python` bug:
3845
(dbm.gnu)?
3946
(_?locale.bind_textdomain_codeset)?

stdlib/@tests/stubtest_allowlists/darwin.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ select.kqueue.__init__ # default C signature is wrong
66
select.POLLMSG # system dependent
77

88
# Sometimes these seem to exist on darwin, sometimes not
9+
(_curses.A_ITALIC)?
10+
(curses.A_ITALIC)?
911
(_socket.MSG_NOSIGNAL)?
1012
(socket.MsgFlag.MSG_NOSIGNAL)?
1113
(socket.MSG_NOSIGNAL)?
Lines changed: 1 addition & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# TODO: triage these (new in py313)
2-
_decimal
32
_stat.SF_SETTABLE
43
_stat.SF_SUPPORTED
54
_stat.SF_SYNTHETIC
@@ -22,7 +21,6 @@ fcntl.RWH_WRITE_LIFE_MEDIUM
2221
fcntl.RWH_WRITE_LIFE_NONE
2322
fcntl.RWH_WRITE_LIFE_NOT_SET
2423
fcntl.RWH_WRITE_LIFE_SHORT
25-
mmap.MAP_32BIT
2624
mmap.MAP_NORESERVE
2725
os.POSIX_SPAWN_CLOSEFROM
2826
os.TFD_CLOEXEC
@@ -46,6 +44,7 @@ posix.TFD_TIMER_CANCEL_ON_SET
4644
posix.grantpt
4745
posix.posix_openpt
4846
posix.ptsname
47+
posixpath.splitroot
4948
posix.timerfd_create
5049
posix.timerfd_gettime
5150
posix.timerfd_gettime_ns
@@ -62,104 +61,6 @@ syslog.LOG_NETINFO
6261
syslog.LOG_RAS
6362
syslog.LOG_REMOTEAUTH
6463

65-
# Python 3.13.0b2 will use the _decimal C extension and this will be resolved. https://github.com/python/typeshed/pull/12061#issuecomment-2139352738
66-
decimal.Context.abs
67-
decimal.Context.add
68-
decimal.Context.canonical
69-
decimal.Context.compare
70-
decimal.Context.compare_signal
71-
decimal.Context.compare_total
72-
decimal.Context.compare_total_mag
73-
decimal.Context.copy_abs
74-
decimal.Context.copy_decimal
75-
decimal.Context.copy_negate
76-
decimal.Context.copy_sign
77-
decimal.Context.create_decimal
78-
decimal.Context.create_decimal_from_float
79-
decimal.Context.divide
80-
decimal.Context.divide_int
81-
decimal.Context.divmod
82-
decimal.Context.exp
83-
decimal.Context.fma
84-
decimal.Context.is_canonical
85-
decimal.Context.is_finite
86-
decimal.Context.is_infinite
87-
decimal.Context.is_nan
88-
decimal.Context.is_normal
89-
decimal.Context.is_qnan
90-
decimal.Context.is_signed
91-
decimal.Context.is_snan
92-
decimal.Context.is_subnormal
93-
decimal.Context.is_zero
94-
decimal.Context.ln
95-
decimal.Context.log10
96-
decimal.Context.logb
97-
decimal.Context.logical_and
98-
decimal.Context.logical_invert
99-
decimal.Context.logical_or
100-
decimal.Context.logical_xor
101-
decimal.Context.max
102-
decimal.Context.max_mag
103-
decimal.Context.min
104-
decimal.Context.min_mag
105-
decimal.Context.minus
106-
decimal.Context.multiply
107-
decimal.Context.next_minus
108-
decimal.Context.next_plus
109-
decimal.Context.next_toward
110-
decimal.Context.normalize
111-
decimal.Context.number_class
112-
decimal.Context.plus
113-
decimal.Context.quantize
114-
decimal.Context.remainder
115-
decimal.Context.remainder_near
116-
decimal.Context.rotate
117-
decimal.Context.same_quantum
118-
decimal.Context.scaleb
119-
decimal.Context.shift
120-
decimal.Context.sqrt
121-
decimal.Context.subtract
122-
decimal.Context.to_eng_string
123-
decimal.Context.to_integral
124-
decimal.Context.to_integral_exact
125-
decimal.Context.to_integral_value
126-
decimal.Context.to_sci_string
127-
decimal.ConversionSyntax.handle
128-
decimal.Decimal.__abs__
129-
decimal.Decimal.__add__
130-
decimal.Decimal.__divmod__
131-
decimal.Decimal.__eq__
132-
decimal.Decimal.__floordiv__
133-
decimal.Decimal.__ge__
134-
decimal.Decimal.__gt__
135-
decimal.Decimal.__le__
136-
decimal.Decimal.__lt__
137-
decimal.Decimal.__mod__
138-
decimal.Decimal.__mul__
139-
decimal.Decimal.__neg__
140-
decimal.Decimal.__pos__
141-
decimal.Decimal.__pow__
142-
decimal.Decimal.__radd__
143-
decimal.Decimal.__rdivmod__
144-
decimal.Decimal.__rfloordiv__
145-
decimal.Decimal.__rmod__
146-
decimal.Decimal.__rmul__
147-
decimal.Decimal.__round__
148-
decimal.Decimal.__rsub__
149-
decimal.Decimal.__rtruediv__
150-
decimal.Decimal.__str__
151-
decimal.Decimal.__sub__
152-
decimal.Decimal.__truediv__
153-
decimal.Decimal.from_float
154-
decimal.DecimalException.handle
155-
decimal.DivisionByZero.handle
156-
decimal.DivisionImpossible.handle
157-
decimal.DivisionUndefined.handle
158-
decimal.InvalidContext.handle
159-
decimal.InvalidOperation.handle
160-
decimal.Overflow.handle
161-
decimal.setcontext
162-
16364
# Exists on some Linux builds, and is documented,
16465
# but is unavailable in Github Actions on Linux with Python 3.12
16566
(os|posix).CLONE_NEWTIME

stdlib/@tests/stubtest_allowlists/py313.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ _thread.lock
1515
_thread.stack_size
1616
_thread.start_joinable_thread
1717
_thread.start_new_thread
18-
_tkinter.TkappType.gettrace
19-
_tkinter.TkappType.settrace
2018
_tkinter.create
2119
asyncio.AbstractEventLoop.create_server
2220
asyncio.AbstractServer.abort_clients
@@ -110,6 +108,7 @@ mailbox.Maildir.get_info
110108
mailbox.Maildir.remove_flag
111109
mailbox.Maildir.set_flags
112110
mailbox.Maildir.set_info
111+
os.path.splitroot
113112
pdb.Pdb.MAX_CHAINED_EXCEPTION_DEPTH
114113
pdb.Pdb.completedefault
115114
pdb.Pdb.completenames
@@ -158,7 +157,6 @@ tkinter.Text.count
158157
tkinter.Wm.wm_attributes
159158
tkinter.tix
160159
trace.CoverageResults.write_results
161-
traceback.StackSummary.should_show_carets # https://github.com/python/cpython/pull/112670#discussion_r1613952301
162160
turtle.RawTurtle.settiltangle
163161
turtle.__all__
164162
turtle.settiltangle
@@ -260,7 +258,6 @@ _weakref.ProxyType.__reversed__ # Doesn't really exist
260258
argparse._MutuallyExclusiveGroup.add_mutually_exclusive_group # deprecated, forwards arguments to super
261259
ast.ImportFrom.level # None on the class, but never None on instances
262260
builtins.property.__set_name__ # Doesn't actually exist
263-
builtins.str.format_map # stubtest says `mapping` is pos-or-keyword but in reality it is pos-only
264261
collections\.UserList\.index # ignoring pos-or-keyword parameter
265262
dataclasses.KW_ONLY # white lies around defaults
266263
enum.auto.__init__ # The stub for enum.auto is nothing like the implementation

stdlib/@tests/stubtest_allowlists/win32-py312.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
_winapi.GetLongPathName
2+
_winapi.GetShortPathName
3+
ntpath.exists
4+
os.path.exists
5+
16
# Undocumented internal method, not really for public consumption.
27
# (Hard to add types for unless we add stubs for the undocumented _overlapped module...)
38
asyncio.IocpProactor.finish_socket_func

stdlib/@tests/stubtest_allowlists/win32-py313.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ ctypes._endian.oledll
3131
ctypes._endian.windll
3232
nt.fchmod
3333
nt.lchmod
34+
ntpath.exists
35+
ntpath.lexists
36+
ntpath.splitroot
3437
os.fchmod
3538
os.lchmod
39+
os.path.exists
40+
os.path.lexists
3641
stat.SF_SETTABLE
3742
stat.SF_SUPPORTED
3843
stat.SF_SYNTHETIC

0 commit comments

Comments
 (0)