Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/stubtest-unused-whitelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10-dev']
fail-fast: false

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10-dev']
fail-fast: false

steps:
Expand Down
25 changes: 25 additions & 0 deletions tests/stubtest_whitelists/linux-py310.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
dbm.ndbm
locale.nl_langinfo
readline.add_history
readline.append_history_file
readline.get_history_item
readline.insert_text
readline.parse_and_bind
readline.read_history_file
readline.read_init_file
readline.remove_history_item
readline.replace_history_item
readline.set_auto_history
readline.set_completer
readline.set_completer_delims
readline.set_completion_display_matches_hook
readline.set_history_length
readline.set_pre_input_hook
readline.set_startup_hook
readline.write_history_file
termios.tcdrain
termios.tcflow
termios.tcflush
termios.tcgetattr
termios.tcsendbreak
termios.tcsetattr
260 changes: 260 additions & 0 deletions tests/stubtest_whitelists/py310.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
_ast.ImportFrom.level
_collections_abc.AsyncGenerator.ag_await
_collections_abc.AsyncGenerator.ag_code
_collections_abc.AsyncGenerator.ag_frame
_collections_abc.AsyncGenerator.ag_running
_collections_abc.AsyncGenerator.asend
_collections_abc.AsyncGenerator.athrow
_collections_abc.Container.__contains__
_collections_abc.Coroutine.send
_collections_abc.Coroutine.throw
_collections_abc.Generator.send
_collections_abc.Generator.throw
_collections_abc.ItemsView.__reversed__
_collections_abc.KeysView.__reversed__
_collections_abc.ValuesView.__reversed__
# This was changed in Python 3.9.2.
_curses.color_pair
_dummy_thread
ast.Bytes.__new__
ast.Ellipsis.__new__
ast.ExtSlice.__new__
ast.ImportFrom.level
ast.Index.__new__
ast.NameConstant.__new__
ast.Num.__new__
ast.Str.__new__
asyncio.compat # module removed in 3.7
asyncio.Future.__init__ # Usually initialized from c object
asyncio.Future._callbacks # Usually initialized from c object
asyncio.futures.Future.__init__ # Usually initialized from c object
asyncio.futures.Future._callbacks # Usually initialized from c object
builtins.dict.get
collections.abc.AsyncGenerator.ag_await
collections.abc.AsyncGenerator.ag_code
collections.abc.AsyncGenerator.ag_frame
collections.abc.AsyncGenerator.ag_running
collections.abc.ItemsView.__reversed__
collections.abc.KeysView.__reversed__
collections.abc.ValuesView.__reversed__
contextlib.nullcontext # not a function at runtime
contextvars.Context.__init__
contextvars.Context.get
copy.PyStringMap
curses.color_pair
dataclasses.field
dummy_threading
enum.Enum._generate_next_value_
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve
ftplib.FTP.__init__
ftplib.FTP_TLS.__init__
functools.partialmethod.__get__
functools.singledispatchmethod.__call__
gettext.install
gettext.translation
hmac.new # Stub is a white lie; see comments in the stub
http.client.HTTPSConnection.__init__
http.cookiejar.DefaultCookiePolicy.__init__
http.server.SimpleHTTPRequestHandler.__init__
importlib.abc.Traversable.__init__ # Inherits __init__ from typing.Protocol
ipaddress.IPv4Interface.hostmask
ipaddress.IPv6Interface.hostmask
ipaddress._BaseNetwork.broadcast_address
ipaddress._BaseNetwork.hostmask
logging.FileHandler.__init__
logging.handlers.BaseRotatingHandler.__init__
logging.handlers.RotatingFileHandler.__init__
logging.handlers.TimedRotatingFileHandler.__init__
logging.handlers.WatchedFileHandler.__init__
macpath # module removed in 3.8
macurl2path # module removed in 3.7
mmap.MADV_[A-Z_]+ # platform dependent constants
multiprocessing.spawn._main
nntplib.NNTP.starttls
os.getgrouplist
os.sendfile
pickle.Pickler.reducer_override
# platform.uname_result's processor field is now dynamically made to exist
platform.uname_result.__new__
platform.uname_result._fields
platform.uname_result.processor
queue.SimpleQueue.__init__
select.epoll.register
smtplib.LMTP.__init__
smtplib.SMTP.sendmail
sre_constants.RANGE_IGNORE
ssl.PROTOCOL_SSLv3 # Depends on ssl compilation
ssl.RAND_egd # Depends on openssl compilation
symtable.SymbolTable.has_exec
sys.UnraisableHookArgs # Not exported from sys
time.CLOCK_PROF
time.CLOCK_UPTIME
types.ClassMethodDescriptorType.__get__
types.CodeType.replace
types.GenericAlias.__getattr__
types.MethodDescriptorType.__get__
types.WrapperDescriptorType.__get__
typing.ForwardRef._evaluate
typing.SupportsAbs.__init__
typing.SupportsBytes.__init__
typing.SupportsComplex.__init__
typing.SupportsFloat.__init__
typing.SupportsIndex.__init__
typing.SupportsInt.__init__
typing.SupportsRound.__init__
typing._SpecialForm.__init__
typing._TypedDict.__delitem__
typing._TypedDict.__ior__
typing._TypedDict.__or__
typing._TypedDict.copy
typing._TypedDict.items
typing._TypedDict.keys
typing._TypedDict.pop
typing._TypedDict.setdefault
typing._TypedDict.update
typing._TypedDict.values
weakref.WeakValueDictionary.update
webbrowser.Opera.raise_opts
xml.etree.ElementTree.XMLParser.__init__ # Defined in C so has general signature
xml.etree.cElementTree.XMLParser.__init__ # Defined in C so has general signature

# positional-only complaints
builtins.bytearray.pop
builtins.bytearray.remove
collections.OrderedDict.fromkeys
collections.OrderedDict.setdefault
collections.abc.AsyncGenerator.asend
collections.abc.AsyncGenerator.athrow
collections.abc.Container.__contains__
collections.abc.Coroutine.send
collections.abc.Coroutine.throw
collections.abc.Generator.send
collections.abc.Generator.throw
contextlib.AsyncExitStack.callback
contextlib.AsyncExitStack.push_async_callback
contextlib.ExitStack.callback
contextvars.ContextVar.reset
contextvars.ContextVar.set
io.IncrementalNewlineDecoder.setstate
lzma.LZMACompressor.compress
lzma.is_check_supported
os.initgroups
os.pipe2
os.posix_fadvise
os.posix_fallocate
os.sched_getaffinity
os.sched_getparam
os.sched_getscheduler
os.sched_rr_get_interval
os.sched_setaffinity
os.sched_setparam
os.sched_setscheduler
os.setresgid
os.setresuid
os.waitid
pwd.getpwnam
pwd.getpwuid
random.SystemRandom.getrandbits
secrets.SystemRandom.getrandbits
signal.sigtimedwait
signal.sigwaitinfo
trace.Trace.runfunc
zipfile.ZipExtFile.seek
# These enums derive from (str, Enum). See comment in py3_common.txt
pstats.SortKey.__new__
tkinter.EventType.__new__

# Rest of these errors are new in Python 3.10:
_bootlocale
_markupbase.ParserBase.error
array.array.index
asyncio.create_subprocess_shell
asyncio.proactor_events._ProactorReadPipeTransport.__init__
asyncio.subprocess.create_subprocess_shell
builtins.aiter
dataclasses.dataclass
distutils.command.bdist_wininst
formatter
importlib.abc.ResourceReader.is_resource
importlib.machinery.BuiltinImporter.create_module
importlib.machinery.BuiltinImporter.exec_module
importlib.machinery.FrozenImporter.create_module
importlib.machinery.PathFinder.invalidate_caches
inspect.Signature.from_callable
inspect.get_annotations
inspect.signature
locale.strcoll
locale.strxfrm
logging.Formatter.__init__
logging.LoggerAdapter.__init__
logging.PercentStyle.__init__
os.path.realpath
parser
pathlib.Path.write_text
py_compile.main
pyclbr.Class.__init__
pyclbr.Function.__init__
sched.Event.__new__
sched.Event._fields
signal.default_int_handler
sqlite3.Connection.__exit__
sqlite3.Connection.create_aggregate
sqlite3.Connection.create_collation
sqlite3.Connection.create_function
sqlite3.Connection.executemany
sqlite3.Connection.executescript
sqlite3.Connection.interrupt
sqlite3.Connection.iterdump
sqlite3.Connection.rollback
sqlite3.Connection.set_authorizer
sqlite3.Connection.set_progress_handler
sqlite3.Connection.set_trace_callback
sqlite3.Cursor.close
sqlite3.Cursor.execute
sqlite3.Cursor.executemany
sqlite3.Cursor.executescript
sqlite3.Cursor.setinputsizes
sqlite3.Cursor.setoutputsize
sqlite3.Row.keys
sqlite3.complete_statement
sqlite3.dbapi2.Connection.__exit__
sqlite3.dbapi2.Connection.create_aggregate
sqlite3.dbapi2.Connection.create_collation
sqlite3.dbapi2.Connection.create_function
sqlite3.dbapi2.Connection.executemany
sqlite3.dbapi2.Connection.executescript
sqlite3.dbapi2.Connection.interrupt
sqlite3.dbapi2.Connection.iterdump
sqlite3.dbapi2.Connection.rollback
sqlite3.dbapi2.Connection.set_authorizer
sqlite3.dbapi2.Connection.set_progress_handler
sqlite3.dbapi2.Connection.set_trace_callback
sqlite3.dbapi2.Cursor.close
sqlite3.dbapi2.Cursor.execute
sqlite3.dbapi2.Cursor.executemany
sqlite3.dbapi2.Cursor.executescript
sqlite3.dbapi2.Cursor.setinputsizes
sqlite3.dbapi2.Cursor.setoutputsize
sqlite3.dbapi2.Row.keys
sqlite3.dbapi2.complete_statement
sqlite3.dbapi2.enable_callback_tracebacks
sqlite3.dbapi2.enable_shared_cache
sqlite3.dbapi2.register_adapter
sqlite3.dbapi2.register_converter
sqlite3.enable_callback_tracebacks
sqlite3.enable_shared_cache
sqlite3.register_adapter
sqlite3.register_converter
statistics.harmonic_mean
symbol
tempfile.TemporaryDirectory.__init__
tkinter.font.nametofont
traceback.format_exception
traceback.format_exception_only
traceback.print_exception
typing.ParamSpec.__init__
typing.ParamSpec.args
typing.ParamSpec.kwargs
unicodedata.ucnhash_CAPI
unittest.mock.create_autospec
zipfile.Path.open
7 changes: 7 additions & 0 deletions tests/stubtest_whitelists/win32-py310.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_msi.CreateRecord
_msi.FCICreate
_msi.OpenDatabase
sqlite3.Connection.enable_load_extension
sqlite3.Connection.load_extension
sqlite3.dbapi2.Connection.enable_load_extension
sqlite3.dbapi2.Connection.load_extension