Run stubtest on py313 with macos and Windows in CI (#12020)

This commit is contained in:
Alex Waygood
2024-05-23 14:55:15 -04:00
committed by GitHub
parent 044428446f
commit dccc4e1f07
12 changed files with 139 additions and 79 deletions

View File

@@ -37,7 +37,7 @@ jobs:
# tkinter doesn't import on macOS-12
os: ["ubuntu-latest", "windows-latest", "macos-11"]
# TODO unpin the 3.11 and 3.12 micro versions
python-version: ["3.8", "3.9", "3.10", "3.11.8", "3.12.2"]
python-version: ["3.8", "3.9", "3.10", "3.11.8", "3.12.2", "3.13"]
fail-fast: false
steps:
@@ -57,26 +57,6 @@ jobs:
- name: Run stubtest
run: python tests/stubtest_stdlib.py
stubtest-stdlib-py313:
name: Check py313-linux stdlib with stubtest
# TODO: get it passing on all platforms and add it to the main matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
cache-dependency-path: requirements-tests.txt
allow-prereleases: true
check-latest: true
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Install mypy from git
run: pip install git+https://github.com/python/mypy@e8a26308d5d06925cf769b62f41ef2e4bc546ada
- name: Run stubtest
run: python tests/stubtest_stdlib.py
stubtest-third-party:
name: Check third party stubs with stubtest
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}

View File

@@ -33,7 +33,7 @@ jobs:
# tkinter doesn't import on macOS 12
os: ["ubuntu-latest", "windows-latest", "macos-11"]
# TODO unpin 3.11 and 3.12 micro versions
python-version: ["3.8", "3.9", "3.10", "3.11.8", "3.12.2"]
python-version: ["3.8", "3.9", "3.10", "3.11.8", "3.12.2", "3.13"]
fail-fast: false
steps:
@@ -52,23 +52,3 @@ jobs:
run: pip install git+https://github.com/python/mypy@e8a26308d5d06925cf769b62f41ef2e4bc546ada
- name: Run stubtest
run: python tests/stubtest_stdlib.py
stubtest-stdlib-py313:
name: Check py313-linux stdlib with stubtest
# TODO: get it passing on all platforms and add it to the main matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
cache-dependency-path: requirements-tests.txt
allow-prereleases: true
check-latest: true
- name: Install dependencies
run: pip install -r requirements-tests.txt
- name: Install mypy from git
run: pip install git+https://github.com/python/mypy@e8a26308d5d06925cf769b62f41ef2e4bc546ada
- name: Run stubtest
run: python tests/stubtest_stdlib.py

View File

@@ -1,28 +1,44 @@
# new in py313
_pyrepl.curses
_pyrepl.fancy_termios
_pyrepl.readline
_pyrepl.simple_interact
_pyrepl.unix_console
_pyrepl.unix_eventqueue
asyncio.unix_events.EventLoop
asyncio.unix_events._UnixSelectorEventLoop.create_unix_server
asyncio.unix_events.__all__
fcntl.F_GETNOSIGPIPE
fcntl.F_OFD_GETLK
fcntl.F_OFD_SETLK
fcntl.F_OFD_SETLKW
fcntl.F_RDAHEAD
fcntl.F_SETNOSIGPIPE
mmap.MAP_HASSEMAPHORE
mmap.MAP_JIT
mmap.MAP_NOCACHE
mmap.MAP_NOEXTEND
mmap.MAP_NORESERVE
mmap.MAP_RESILIENT_CODESIGN
mmap.MAP_RESILIENT_MEDIA
mmap.MAP_TPRO
mmap.MAP_TRANSLATED_ALLOW_EXECUTE
mmap.MAP_UNIX03
os.grantpt
os.posix_openpt
os.ptsname
os.unlockpt
os.waitid
os.waitid_result
pathlib.Path.group
pathlib.Path.owner
posix.grantpt
posix.posix_openpt
posix.ptsname
posix.unlockpt
posix.waitid
posix.waitid_result
readline.backend
time.clock_gettime_ns
time.CLOCK_MONOTONIC_RAW_APPROX
time.CLOCK_UPTIME_RAW_APPROX
webbrowser.MacOSX
_curses.A_ITALIC
curses.A_ITALIC
# TODO: fix
_curses.unget_wch

View File

@@ -1,8 +1,17 @@
# TODO: triage these (new in py313)
_decimal
_pyrepl.curses
_pyrepl.fancy_termios
_pyrepl.readline
_pyrepl.simple_interact
_pyrepl.unix_console
_pyrepl.unix_eventqueue
_stat.SF_SETTABLE
_stat.SF_SUPPORTED
_stat.SF_SYNTHETIC
asyncio.unix_events.EventLoop
asyncio.unix_events._UnixSelectorEventLoop.create_unix_server
asyncio.unix_events.__all__
decimal.Context.abs
decimal.Context.add
decimal.Context.canonical
@@ -115,26 +124,39 @@ fcntl.RWH_WRITE_LIFE_MEDIUM
fcntl.RWH_WRITE_LIFE_NONE
fcntl.RWH_WRITE_LIFE_NOT_SET
fcntl.RWH_WRITE_LIFE_SHORT
mmap.MAP_32BIT
mmap.MAP_NORESERVE
os.POSIX_SPAWN_CLOSEFROM
os.TFD_CLOEXEC
os.TFD_NONBLOCK
os.TFD_TIMER_ABSTIME
os.TFD_TIMER_CANCEL_ON_SET
os.grantpt
os.posix_openpt
os.ptsname
os.timerfd_create
os.timerfd_gettime
os.timerfd_gettime_ns
os.timerfd_settime
os.timerfd_settime_ns
os.unlockpt
pathlib.Path.group
pathlib.Path.owner
posix.POSIX_SPAWN_CLOSEFROM
posix.TFD_CLOEXEC
posix.TFD_NONBLOCK
posix.TFD_TIMER_ABSTIME
posix.TFD_TIMER_CANCEL_ON_SET
posix.grantpt
posix.posix_openpt
posix.ptsname
posix.timerfd_create
posix.timerfd_gettime
posix.timerfd_gettime_ns
posix.timerfd_settime
posix.timerfd_settime_ns
posix.unlockpt
readline.backend
stat.SF_SETTABLE
stat.SF_SUPPORTED
stat.SF_SYNTHETIC
@@ -143,6 +165,7 @@ syslog.LOG_LAUNCHD
syslog.LOG_NETINFO
syslog.LOG_RAS
syslog.LOG_REMOTEAUTH
time.clock_gettime_ns
# Exists on some Linux builds, and is documented,
# but is unavailable in Github Actions on Linux with Python 3.12

View File

@@ -15,19 +15,13 @@ _json.encode_basestring_ascii
_pyrepl.commands
_pyrepl.completing_reader
_pyrepl.console
_pyrepl.curses
_pyrepl.fancy_termios
_pyrepl.historical_reader
_pyrepl.input
_pyrepl.keymap
_pyrepl.pager
_pyrepl.reader
_pyrepl.readline
_pyrepl.simple_interact
_pyrepl.trace
_pyrepl.types
_pyrepl.unix_console
_pyrepl.unix_eventqueue
_pyrepl.utils
_thread.interrupt_main
_thread.lock
@@ -61,9 +55,6 @@ asyncio.queues.Queue.shutdown
asyncio.queues.QueueShutDown
asyncio.queues.__all__
asyncio.streams.StreamWriter.__del__
asyncio.unix_events.EventLoop
asyncio.unix_events._UnixSelectorEventLoop.create_unix_server
asyncio.unix_events.__all__
bdb.Bdb.dispatch_opcode
bdb.Bdb.set_stepinstr
bdb.Bdb.user_opcode
@@ -160,24 +151,16 @@ math.fma
mimetypes.MimeTypes.guess_file_type
mimetypes.__all__
mimetypes.guess_file_type
mmap.MAP_32BIT
mmap.mmap.seekable
mmap.MAP_NORESERVE
multiprocessing.managers.DictProxy.__class_getitem__
multiprocessing.managers.ListProxy.__class_getitem__
multiprocessing.shared_memory.SharedMemory.__init__
os.grantpt
os.posix_openpt
os.ptsname
os.unlockpt
pathlib.Path.__enter__
pathlib.Path.__exit__
pathlib.Path.from_uri
pathlib.Path.glob
pathlib.Path.group
pathlib.Path.is_dir
pathlib.Path.is_file
pathlib.Path.owner
pathlib.Path.read_text
pathlib.Path.rglob
pathlib.PurePath.parser
@@ -197,10 +180,6 @@ platform.AndroidVer
platform.IOSVersionInfo
platform.android_ver
platform.ios_ver
posix.grantpt
posix.posix_openpt
posix.ptsname
posix.unlockpt
pstats.FunctionProfile.__replace__
pstats.StatsProfile.__replace__
pydoc.HTMLDoc.docdata
@@ -217,7 +196,6 @@ pydoc.pipepager
pydoc.plainpager
pydoc.tempfilepager
pydoc.ttypager
readline.backend
site.gethistoryfile
site.register_readline
sqlite3.Connection.iterdump
@@ -227,7 +205,6 @@ sre_constants.SRE_FLAG_TEMPLATE
sre_parse.SRE_FLAG_TEMPLATE
tarfile.TarFile.__init__
threading.stack_size
time.clock_gettime_ns
tkinter.Misc.after_info
tkinter.Misc.busy
tkinter.Misc.busy_cget

View File

@@ -4,3 +4,13 @@ tarfile.TarInfo.replace
# so are omitted from the stub
pathlib.Path.is_mount
pathlib.WindowsPath.is_mount
# pathlib functions that rely on modules that don't exist on Windows
pathlib.Path.owner
pathlib.Path.group
# Modules that don't exist on Windows
crypt
nis
ossaudiodev
spwd

View File

@@ -2,3 +2,13 @@
# so are omitted from the stub
pathlib.Path.is_mount
pathlib.WindowsPath.is_mount
# pathlib functions that rely on modules that don't exist on Windows
pathlib.Path.owner
pathlib.Path.group
# Modules that don't exist on Windows
crypt
nis
ossaudiodev
spwd

View File

@@ -2,3 +2,13 @@
# (Hard to add types for unless we add stubs for the undocumented _overlapped module...)
asyncio.IocpProactor.finish_socket_func
asyncio.windows_events.IocpProactor.finish_socket_func
# pathlib functions that rely on modules that don't exist on Windows
pathlib.Path.owner
pathlib.Path.group
# Modules that don't exist on Windows
crypt
nis
ossaudiodev
spwd

View File

@@ -1,3 +1,45 @@
# New in py313 (triage these!)
_msi
_stat.SF_SETTABLE
_stat.SF_SUPPORTED
_stat.SF_SYNTHETIC
_winapi.BatchedWaitForMultipleObjects
_winapi.CreateEventW
_winapi.CreateMutexW
_winapi.GetLongPathName
_winapi.GetShortPathName
_winapi.OpenEventW
_winapi.OpenMutexW
_winapi.ReleaseMutex
_winapi.ResetEvent
_winapi.STARTF_FORCEOFFFEEDBACK
_winapi.STARTF_FORCEONFEEDBACK
_winapi.STARTF_PREVENTPINNING
_winapi.STARTF_RUNFULLSCREEN
_winapi.STARTF_TITLEISAPPID
_winapi.STARTF_TITLEISLINKNAME
_winapi.STARTF_UNTRUSTEDSOURCE
_winapi.STARTF_USECOUNTCHARS
_winapi.STARTF_USEFILLATTRIBUTE
_winapi.STARTF_USEHOTKEY
_winapi.STARTF_USEPOSITION
_winapi.STARTF_USESIZE
_winapi.SetEvent
asyncio.windows_events.__all__
asyncio.windows_events.EventLoop
ctypes._endian.oledll
ctypes._endian.windll
nt.fchmod
nt.lchmod
os.fchmod
os.lchmod
stat.SF_SETTABLE
stat.SF_SUPPORTED
stat.SF_SYNTHETIC
subprocess.__all__
subprocess.STARTF_FORCEOFFFEEDBACK
subprocess.STARTF_FORCEONFEEDBACK
# Undocumented internal method, not really for public consumption.
# (Hard to add types for unless we add stubs for the undocumented _overlapped module...)
asyncio.IocpProactor.finish_socket_func

View File

@@ -10,3 +10,13 @@ pathlib.Path.is_mount
pathlib.WindowsPath.group
pathlib.WindowsPath.owner
pathlib.WindowsPath.is_mount
# pathlib functions that rely on modules that don't exist on Windows
pathlib.Path.owner
pathlib.Path.group
# Modules that don't exist on Windows
crypt
nis
ossaudiodev
spwd

View File

@@ -4,3 +4,13 @@ tarfile.TarInfo.replace
# so are omitted from the stub
pathlib.Path.is_mount
pathlib.WindowsPath.is_mount
# pathlib functions that rely on modules that don't exist on Windows
pathlib.Path.owner
pathlib.Path.group
# Modules that don't exist on Windows
crypt
nis
ossaudiodev
spwd

View File

@@ -20,18 +20,14 @@ _winapi.VirtualQuerySize
_curses
_posixsubprocess
asyncio.unix_events
crypt
dbm.gnu
dbm.ndbm
fcntl
grp
nis
ossaudiodev
posix
pwd
readline
resource
spwd
syslog
termios
xxlimited
@@ -52,10 +48,6 @@ curses.textpad
pty
tty
# pathlib functions that rely on modules that don't exist on Windows
pathlib.Path.owner
pathlib.Path.group
# Added in a patch release, backported to all security branches,
# but have yet to find their way to all GitHub Actions images
(sys.get_int_max_str_digits)?