Update allowlists (#5376)

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2021-05-08 12:48:12 -07:00
committed by GitHub
parent 3fa5988a2a
commit 9cdd5220c2
11 changed files with 20 additions and 191 deletions

View File

@@ -1,3 +1,2 @@
dbm.ndbm
locale.nl_langinfo
posixpath.realpath

View File

@@ -1,5 +1,2 @@
ctypes.wintypes
os.MFD_HUGE_32MB
os.MFD_HUGE_512MB
time.CLOCK_PROF
time.CLOCK_UPTIME

View File

@@ -1,5 +1,4 @@
_posixsubprocess.cloexec_pipe
builtins.WindowsError
_?curses.ACS_.* # ACS codes are initialized only after initscr call.
curses.COLORS
curses.COLOR_PAIRS

View File

@@ -13,7 +13,6 @@ _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__

View File

@@ -12,12 +12,12 @@ asyncio.staggered # Added in Python 3.8
asyncio.threads # Added in Python 3.9
asyncio.trsock # Added in Python 3.8
builtins.str.maketrans
bz2.BZ2Compressor.compress # does not accept keyword arguments even though signature says it does
cmath.log
collections.AsyncGenerator.ag_await
collections.AsyncGenerator.ag_code
collections.AsyncGenerator.ag_frame
collections.AsyncGenerator.ag_running
collections.Callable
collections.UserString.maketrans
contextlib._GeneratorContextManager.__init__
enum.Enum._generate_next_value_
@@ -36,7 +36,6 @@ pyexpat.XMLParserType.ExternalEntityParserCreate # C signature is wrong - funct
random.Random.randrange # missing undocumented arg _int
random.randrange # missing undocumented arg _int
sched.Event.__doc__ # __slots__ is overridden
secrets.SystemRandom.getstate
sre_compile.dis
typing.AsyncGenerator.ag_await
typing.AsyncGenerator.ag_code
@@ -61,20 +60,11 @@ typing.NamedTuple._replace
typing.Sequence.index
typing.runtime_checkable
unittest.async_case # Added in Python 3.8
urllib.parse.parse_qs
urllib.parse.parse_qsl
uuid.UUID.int
xml.etree.ElementTree.TreeBuilder.start # Discrepancy between Python and C modules, fixed in bpo-39495
xml.etree.cElementTree.TreeBuilder.start # bpo-39495
xml.parsers.expat.XMLParserType.ExternalEntityParserCreate # C signature is wrong - function gets only positional args
# These enums derive from (int, IntEnum) or (str, Enum). See comment in py3_common.txt
enum.IntFlag.__new__
re.RegexFlag.__new__
socket.AddressInfo.__new__
socket.MsgFlag.__new__
ssl.Options.__new__
ssl.VerifyFlags.__new__
ssl.VerifyMode.__new__
tkinter.EventType.__new__
builtins.memoryview.__iter__ # C type that implements __getitem__
@@ -94,20 +84,5 @@ collections.Sequence.index # Supporting None in end is not mandatory
# as part of a security fix. These excludes can be removed when the GitHub
# action workflow uses Python versions that include the fix (adding a
# separator argument).
cgi.FieldStorage.__init__
cgi.parse
cgi.parse_multipart
urllib.parse.parse_qs
urllib.parse.parse_qsl
# These enums derive from (int, IntEnum) or (str, Enum). Strangely,
# at runtime, they inherit Enum.__new__, not int.__new__ or
# str.__new__ as the mro would dictate, which is why stubtest balks.
enum.IntEnum.__new__
http.HTTPStatus.__new__
inspect._ParameterKind.__new__
signal.Handlers.__new__
signal.Sigmasks.__new__
signal.Signals.__new__
socket.AddressFamily.__new__
socket.SocketKind.__new__

View File

@@ -13,18 +13,17 @@ asyncio.threads # Added in Python 3.9
asyncio.trsock # Added in Python 3.8
builtins.dict.get
builtins.str.maketrans
bz2.BZ2Compressor.compress # does not accept keyword arguments even though signature says it does
cmath.log
collections.AsyncGenerator.ag_await
collections.AsyncGenerator.ag_code
collections.AsyncGenerator.ag_frame
collections.AsyncGenerator.ag_running
collections.Callable
collections.UserString.maketrans
collections.abc.AsyncGenerator.ag_await
collections.abc.AsyncGenerator.ag_code
collections.abc.AsyncGenerator.ag_frame
collections.abc.AsyncGenerator.ag_running
concurrent.futures.ProcessPoolExecutor.map
contextvars.Context.__init__ # Default C __init__ signature is wrong
contextvars.ContextVar.get
contextlib.nullcontext # not a function at runtime
@@ -44,7 +43,6 @@ queue.SimpleQueue.__init__ # Default C __init__ signature is wrong
random.Random.randrange # missing undocumented arg _int
random.randrange # missing undocumented arg _int
sched.Event.__doc__ # __slots__ is overridden
secrets.SystemRandom.getstate
ssl.PROTOCOL_SSLv3 # Depends on ssl compilation
ssl.RAND_egd # Depends on openssl compilation
types.ClassMethodDescriptorType.__get__
@@ -57,8 +55,6 @@ typing._SpecialForm.__init__
typing._SpecialForm.__new__
typing.runtime_checkable
unittest.async_case # Added in Python 3.8
urllib.parse.parse_qs
urllib.parse.parse_qsl
uuid.UUID.int
uuid.UUID.is_safe
uuid.getnode # undocumented, unused parameter getters that was later removed
@@ -66,15 +62,7 @@ xml.etree.ElementTree.TreeBuilder.start # Discrepancy between Python and C modu
xml.etree.cElementTree.TreeBuilder.start # bpo-39495
xml.parsers.expat.XMLParserType.ExternalEntityParserCreate # C signature is wrong - function gets only positional args
# These enums derive from (int, IntEnum) or (str, Enum). See comment in py3_common.txt
enum.IntFlag.__new__
pstats.SortKey.__new__
re.RegexFlag.__new__
socket.AddressInfo.__new__
socket.MsgFlag.__new__
ssl.Options.__new__
ssl.TLSVersion.__new__
ssl.VerifyFlags.__new__
ssl.VerifyMode.__new__
tkinter.EventType.__new__
builtins.memoryview.__iter__ # C type that implements __getitem__
@@ -94,20 +82,5 @@ collections.Sequence.index # Supporting None in end is not mandatory
# as part of a security fix. These excludes can be removed when the GitHub
# action workflow uses Python versions that include the fix (adding a
# separator argument).
cgi.FieldStorage.__init__
cgi.parse
cgi.parse_multipart
urllib.parse.parse_qs
urllib.parse.parse_qsl
# These enums derive from (int, IntEnum) or (str, Enum). Strangely,
# at runtime, they inherit Enum.__new__, not int.__new__ or
# str.__new__ as the mro would dictate, which is why stubtest balks.
enum.IntEnum.__new__
http.HTTPStatus.__new__
inspect._ParameterKind.__new__
signal.Handlers.__new__
signal.Sigmasks.__new__
signal.Signals.__new__
socket.AddressFamily.__new__
socket.SocketKind.__new__

View File

@@ -15,15 +15,13 @@ 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
asyncio.run # Bugfix involving this was backported to 3.8
asyncio.runners.run # It just hasn't been released yet
asyncio.threads # Added in Python 3.9
builtins.dict.get
bz2.BZ2Compressor.compress # does not accept keyword arguments even though signature says it does
collections.AsyncGenerator.ag_await
collections.AsyncGenerator.ag_code
collections.AsyncGenerator.ag_frame
collections.AsyncGenerator.ag_running
collections.Callable
collections.ItemsView.__reversed__
collections.KeysView.__reversed__
collections.ValuesView.__reversed__
@@ -57,7 +55,6 @@ queue.SimpleQueue.__init__ # Default C __init__ signature is wrong
random.Random.randrange # missing undocumented arg _int
random.randrange # missing undocumented arg _int
sched.Event.__doc__ # __slots__ is overridden
secrets.SystemRandom.getstate
select.epoll.register
ssl.PROTOCOL_SSLv3 # Depends on ssl compilation
ssl.RAND_egd # Depends on openssl compilation
@@ -86,15 +83,7 @@ xml.etree.ElementTree.XMLParser.__init__ # Defined in C so has general signatur
xml.etree.cElementTree.TreeBuilder.start # bpo-39495
xml.etree.cElementTree.XMLParser.__init__ # Defined in C so has general signature
# These enums derive from (int, IntEnum) or (str, Enum). See comment in py3_common.txt
enum.IntFlag.__new__
pstats.SortKey.__new__
re.RegexFlag.__new__
socket.AddressInfo.__new__
socket.MsgFlag.__new__
ssl.Options.__new__
ssl.TLSVersion.__new__
ssl.VerifyFlags.__new__
ssl.VerifyMode.__new__
tkinter.EventType.__new__
builtins.memoryview.__iter__ # C type that implements __getitem__
@@ -109,25 +98,3 @@ collections.Generator.gi_running
collections.Generator.gi_yieldfrom
collections.Mapping.get # Adding None to the Union messed up mypy
collections.Sequence.index # Supporting None in end is not mandatory
# The following methods were changed in point releases from Python 3.6 to 3.9
# as part of a security fix. These excludes can be removed when the GitHub
# action workflow uses Python versions that include the fix (adding a
# separator argument).
cgi.FieldStorage.__init__
cgi.parse
cgi.parse_multipart
urllib.parse.parse_qs
urllib.parse.parse_qsl
# These enums derive from (int, IntEnum) or (str, Enum). Strangely,
# at runtime, they inherit Enum.__new__, not int.__new__ or
# str.__new__ as the mro would dictate, which is why stubtest balks.
enum.IntEnum.__new__
http.HTTPStatus.__new__
inspect._ParameterKind.__new__
signal.Handlers.__new__
signal.Sigmasks.__new__
signal.Signals.__new__
socket.AddressFamily.__new__
socket.SocketKind.__new__

View File

@@ -3,18 +3,9 @@ _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__
@@ -29,12 +20,12 @@ 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
asyncio.proactor_events._ProactorBasePipeTransport.__del__
builtins.dict.get
collections.AsyncGenerator.ag_await
collections.AsyncGenerator.ag_code
collections.AsyncGenerator.ag_frame
collections.AsyncGenerator.ag_running
collections.Callable
collections.ItemsView.__reversed__
collections.KeysView.__reversed__
collections.ValuesView.__reversed__
@@ -47,9 +38,7 @@ collections.abc.KeysView.__reversed__
collections.abc.ValuesView.__reversed__
contextlib.nullcontext # not a function at runtime
contextvars.Context.__init__ # Default C __init__ signature is wrong
curses.color_pair
dataclasses.field
dataclasses.InitVar.__class_getitem__ # stubtest bug. doesn't do the right thing with overload + implicit classmethod __class_getitem__
dummy_threading
enum.Enum._generate_next_value_
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve
@@ -74,8 +63,6 @@ logging.handlers.WatchedFileHandler.__init__
macpath # module removed in 3.8
macurl2path # module removed in 3.7
multiprocessing.spawn._main
os.MFD_HUGE_32MB
os.MFD_HUGE_512MB
os.getgrouplist
os.sendfile
pickle.Pickler.reducer_override # implemented in C pickler
@@ -85,7 +72,6 @@ platform.uname_result._fields
platform.uname_result.processor
queue.SimpleQueue.__init__ # Default C __init__ signature is wrong
sched.Event.__doc__ # __slots__ is overridden
secrets.SystemRandom.getstate
select.epoll.register
smtplib.LMTP.__init__
ssl.PROTOCOL_SSLv3 # Depends on ssl compilation
@@ -118,70 +104,12 @@ typing._TypedDict.pop
typing._TypedDict.setdefault
typing._TypedDict.update
typing._TypedDict.values
unittest.doModuleCleanups
weakref.WeakValueDictionary.update
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.AsyncGenerator.asend
collections.AsyncGenerator.athrow
collections.Container.__contains__
collections.Coroutine.send
collections.Coroutine.throw
collections.Generator.send
collections.Generator.throw
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 (int, IntEnum) or (str, Enum). See comment in py3_common.txt
enum.IntFlag.__new__
pstats.SortKey.__new__
re.RegexFlag.__new__
socket.AddressInfo.__new__
socket.MsgFlag.__new__
ssl.Options.__new__
ssl.TLSVersion.__new__
ssl.VerifyFlags.__new__
ssl.VerifyMode.__new__
tkinter.EventType.__new__
builtins.memoryview.__iter__ # C type that implements __getitem__
@@ -196,25 +124,3 @@ collections.Generator.gi_running
collections.Generator.gi_yieldfrom
collections.Mapping.get # Adding None to the Union messed up mypy
collections.Sequence.index # Supporting None in end is not mandatory
# The following methods were changed in point releases from Python 3.6 to 3.9
# as part of a security fix. These excludes can be removed when the GitHub
# action workflow uses Python versions that include the fix (adding a
# separator argument).
cgi.FieldStorage.__init__
cgi.parse
cgi.parse_multipart
urllib.parse.parse_qs
urllib.parse.parse_qsl
# These enums derive from (int, IntEnum) or (str, Enum). Strangely,
# at runtime, they inherit Enum.__new__, not int.__new__ or
# str.__new__ as the mro would dictate, which is why stubtest balks.
enum.IntEnum.__new__
http.HTTPStatus.__new__
inspect._ParameterKind.__new__
signal.Handlers.__new__
signal.Sigmasks.__new__
signal.Signals.__new__
socket.AddressFamily.__new__
socket.SocketKind.__new__

View File

@@ -48,7 +48,6 @@ codecs.CodecInfo.incrementaldecoder
codecs.CodecInfo.incrementalencoder
codecs.CodecInfo.streamreader
codecs.CodecInfo.streamwriter
collections.Callable # Some typecheckers need this as specialform
# Coroutine and Generator properties are added programmatically
collections.ChainMap.get # Adding None to the underlying Mapping Union messed up mypy
# Coroutine and Generator properties are added programmatically

View File

@@ -1,3 +1,10 @@
# The following methods were changed in point releases from Python 3.6 to 3.9
# as part of a security fix. These excludes can be removed when the GitHub
# action workflow uses Python versions that include the fix (adding a
# separator argument).
cgi.FieldStorage.__init__
cgi.parse
hashlib.scrypt
os.startfile
posixpath.splitunc # This doesn't exist, but our hands are tied by check_consistent

View File

@@ -1 +1,9 @@
os.startfile
# The following methods were changed in point releases from Python 3.6 to 3.9
# as part of a security fix. These excludes can be removed when the GitHub
# action workflow uses Python versions that include the fix (adding a
# separator argument).
cgi.FieldStorage.__init__
cgi.parse
cgi.parse_multipart
os.startfile