[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-07 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset bffce2cbb5543bc63a67e33ad599328a12f2b00a by Miss Islington (bot) 
in branch '3.9':
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a 
base (GH-29298) (GH-29928)
https://github.com/python/cpython/commit/bffce2cbb5543bc63a67e33ad599328a12f2b00a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-06 Thread Chris Wesseling


Change by Chris Wesseling :


--
nosy:  -CharString, CharString

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-05 Thread miss-islington


miss-islington  added the comment:


New changeset cb68c0a3a4aeb4ec58ab1f71b70bc8bfecbceef6 by Miss Islington (bot) 
in branch '3.10':
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a 
base (GH-29298)
https://github.com/python/cpython/commit/cb68c0a3a4aeb4ec58ab1f71b70bc8bfecbceef6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 2b318ce1c988b7b6e3caf293d55f289e066b6e0f by Serhiy Storchaka in 
branch 'main':
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a 
base (GH-29298)
https://github.com/python/cpython/commit/2b318ce1c988b7b6e3caf293d55f289e066b6e0f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-05 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +28151
pull_request: https://github.com/python/cpython/pull/29927

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28152
pull_request: https://github.com/python/cpython/pull/29928

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-10-29 Thread Ken Jin


Change by Ken Jin :


--
pull_requests:  -27577

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-10-29 Thread Chris Wesseling


Change by Chris Wesseling :


--
pull_requests: +27577
pull_request: https://github.com/python/cpython/pull/29273

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-10-29 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -27570

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-10-29 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -27569

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-10-28 Thread Chris Wesseling


Change by Chris Wesseling :


--
nosy: +CharString, CharString
nosy_count: 4.0 -> 5.0
pull_requests: +27569, 27570
pull_request: https://github.com/python/cpython/pull/29273

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-10-28 Thread Chris Wesseling


Change by Chris Wesseling :


--
nosy: +CharString
nosy_count: 4.0 -> 5.0
pull_requests: +27569
pull_request: https://github.com/python/cpython/pull/29273

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-10-28 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +27562
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29298

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-10-28 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

resolve_bases() returns incorrect result:

>>> import types
>>> types.resolve_bases((list[int],))
(list[int],)

Expected (list,).

new_class() fails:

>>> types.new_class('L', (list[int],), {})
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/types.py", line 77, in new_class
return meta(name, resolved_bases, ns, **kwds)
   ^^
TypeError: GenericAlias expected 2 arguments, got 3

Both work well with typing.List[int].

--
components: Library (Lib)
messages: 405265
nosy: gvanrossum, kj, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: resolve_bases() and new_class() do not work with type alias of a 
built-in type
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com