Skip to content

Fix and allow classes with missing metaclasses #9136

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 2 commits into from
Nov 8, 2022
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
1,047 changes: 1,047 additions & 0 deletions stubs/SQLAlchemy/@tests/stubtest_allowlist.txt

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions stubs/aiofiles/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.isatty
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.rollover
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.tell
aiofiles.tempfile.temptypes.AsyncTemporaryDirectory.cleanup

# Metaclass differs:
aiofiles.base.AiofilesContextManager
aiofiles.tempfile.AiofilesContextManagerTempDir
4 changes: 4 additions & 0 deletions stubs/cryptography/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
version = "3.3.*"
obsolete_since = "3.4.4"

[tool.stubtest]
# See https://github.com/python/typeshed/issues/9127
skip = true
3 changes: 3 additions & 0 deletions stubs/invoke/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Metaclass differs:
invoke.parser.ParseMachine
invoke.parser.parser.ParseMachine
2 changes: 1 addition & 1 deletion stubs/jmespath/jmespath/functions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ def signature(*arguments: _Signature) -> Callable[[_F], _F]: ...
class FunctionRegistry(type):
def __init__(cls, name, bases, attrs) -> None: ...

class Functions:
class Functions(metaclass=FunctionRegistry):
FUNCTION_TABLE: Any
def call_function(self, function_name, resolved_args): ...
2 changes: 1 addition & 1 deletion stubs/peewee/peewee.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1546,7 +1546,7 @@ class _BoundModelsContext(_callable_context_manager):
def __enter__(self): ...
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...

class Model:
class Model(metaclass=ModelBase):
__data__: Incomplete
__rel__: Incomplete
def __init__(self, *args, **kwargs) -> None: ...
Expand Down
3 changes: 3 additions & 0 deletions stubs/protobuf/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ google.protobuf.descriptor.ServiceDescriptor.__new__
# Set to None at runtime - which doesn't match the Sequence base class.
# It's a hack - just allow it.
google.protobuf.internal.containers.BaseContainer.__hash__

# Metaclass differs:
google.protobuf.descriptor.OneofDescriptor
6 changes: 6 additions & 0 deletions stubs/python-dateutil/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ dateutil.tz.tz.tzoffset.instance
dateutil.tz.tz.tzstr.instance
dateutil.tz.tzoffset.instance
dateutil.tz.tzstr.instance

# Metaclass differs:
dateutil.tz.tzoffset
dateutil.tz.tzutc
dateutil.tz.tz.tzoffset
dateutil.tz.tz.tzutc
55 changes: 55 additions & 0 deletions stubs/redis/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,58 @@ redis.asyncio.sentinel.Sentinel.master_for
redis.asyncio.sentinel.Sentinel.slave_for
redis.sentinel.Sentinel.master_for
redis.sentinel.Sentinel.slave_for

# Metaclass differs:
redis.RedisCluster
redis.asyncio.Redis
redis.asyncio.client.MonitorCommandInfo
redis.asyncio.client.Pipeline
redis.asyncio.client.Redis
redis.asyncio.connection.ConnectKwargs
redis.client.Pipeline
redis.client.Redis
redis.cluster.ClusterPipeline
redis.cluster.RedisCluster
redis.commands.AsyncCoreCommands
redis.commands.CoreCommands
redis.commands.RedisClusterCommands
redis.commands.cluster.ClusterDataAccessCommands
redis.commands.cluster.ClusterManagementCommands
redis.commands.cluster.ClusterMultiKeyCommands
redis.commands.cluster.RedisClusterCommands
redis.commands.core.ACLCommands
redis.commands.core.AsyncACLCommands
redis.commands.core.AsyncBasicKeyCommands
redis.commands.core.AsyncClusterCommands
redis.commands.core.AsyncCoreCommands
redis.commands.core.AsyncDataAccessCommands
redis.commands.core.AsyncGeoCommands
redis.commands.core.AsyncHashCommands
redis.commands.core.AsyncHyperlogCommands
redis.commands.core.AsyncListCommands
redis.commands.core.AsyncManagementCommands
redis.commands.core.AsyncModuleCommands
redis.commands.core.AsyncPubSubCommands
redis.commands.core.AsyncScanCommands
redis.commands.core.AsyncScriptCommands
redis.commands.core.AsyncSetCommands
redis.commands.core.AsyncSortedSetCommands
redis.commands.core.AsyncStreamCommands
redis.commands.core.BasicKeyCommands
redis.commands.core.ClusterCommands
redis.commands.core.CoreCommands
redis.commands.core.DataAccessCommands
redis.commands.core.GeoCommands
redis.commands.core.HashCommands
redis.commands.core.HyperlogCommands
redis.commands.core.ListCommands
redis.commands.core.ManagementCommands
redis.commands.core.ModuleCommands
redis.commands.core.PubSubCommands
redis.commands.core.ScanCommands
redis.commands.core.ScriptCommands
redis.commands.core.SetCommands
redis.commands.core.SortedSetCommands
redis.commands.core.StreamCommands
redis.commands.json.Pipeline
redis.commands.timeseries.Pipeline
3 changes: 3 additions & 0 deletions stubs/requests/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ requests.packages.target
requests.charset_normalizer_version
requests.chardet_version
requests.utils.HEADER_VALIDATORS

# Metaclass differs:
requests.adapters.Retry
4 changes: 4 additions & 0 deletions stubs/tqdm/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
tqdm.contrib.discord

# Metaclass differs:
tqdm.rich.FractionColumn
tqdm.rich.RateColumn
3 changes: 3 additions & 0 deletions stubs/urllib3/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ urllib3.util.connection.poll
urllib3.util.connection.select
urllib3.util.ssl_.create_default_context
urllib3.util.ssl_.ssl_wrap_socket

# Metaclass differs:
urllib3.util.retry.Retry