[issue44732] Rename types.Union to types.UnionType

2021-07-26 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
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



[issue44732] Rename types.Union to types.UnionType

2021-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 8a37e8cf45105fbb592c31ebd30501bbdea5ab81 by Miss Islington (bot) 
in branch '3.10':
bpo-44732: Rename types.Union to types.UnionType (GH-27342)
https://github.com/python/cpython/commit/8a37e8cf45105fbb592c31ebd30501bbdea5ab81


--

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-26 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 2b8ad9e6c5f0a66e9ca2d15f85336d8a3eefefb0 by Hasan in branch 
'main':
bpo-44732: Rename types.Union to types.UnionType (#27342)
https://github.com/python/cpython/commit/2b8ad9e6c5f0a66e9ca2d15f85336d8a3eefefb0


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +25903
pull_request: https://github.com/python/cpython/pull/27365

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-25 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

I agree that UnionType is marginally better so we should rename it. It doesn't 
seem worth doing if this doesn't make it in in time for 3.10, though. With the 
advent of PEP 604 typing.Union will hopefully become irrelevant.

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-25 Thread Guido van Rossum

Guido van Rossum  added the comment:

Agreed. I think we should do it, Serhiy’s reasoning makes sense.

We should just update the PEP and add a note that this was changed during the 
beta period.

--

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is a feature added to 3.10 so if we change it before the release there is 
no deprecation period needed. On the other hand if we don't get it to 3.10 is 
going to be much difficult to rename.

--

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-24 Thread Hasan


Hasan  added the comment:

should have a deprecation period and if so, how long?

--

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-24 Thread Hasan


Change by Hasan :


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

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-24 Thread Hasan


Hasan  added the comment:

If nobody works on it i would like to fix it

--
nosy: +AliyevH

___
Python tracker 

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



[issue44732] Rename types.Union to types.UnionType

2021-07-24 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

There are differences between typing.Union and types.Union:

* typing.Union is indexable, types.Union is not.
* types.Union is a class, typing.Union is not.

types.Union corresponds to typing._UnionGenericAlias, not typing.Union. It is 
confusing that typing.Union and types.Union have the same name. Note also that 
most classes in the types module have the "Type" suffix: FunctionType, 
MethodType, ModuleType, etc. I think that it would be better to rename 
types.Union to types.UnionType.

--
components: Interpreter Core
messages: 398128
nosy: gvanrossum, kj, pablogsal, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Rename types.Union to types.UnionType
versions: Python 3.10, Python 3.11

___
Python tracker 

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