[issue44001] typing.Literal: args must be hashable, not immutable

2021-07-18 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests:  -25771

___
Python tracker 

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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-07-18 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal
nosy_count: 4.0 -> 5.0
pull_requests: +25771
pull_request: https://github.com/python/cpython/pull/27228

___
Python tracker 

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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-05 Thread Ken Jin


Change by Ken Jin :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-04 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset ab0a54adad8ddf488ccfb92970be9e4027673d19 by Jelle Zijlstra in 
branch '3.9':
[3.9] bpo-44001: improve Literal documentation (GH-25877). (#25897)
https://github.com/python/cpython/commit/ab0a54adad8ddf488ccfb92970be9e4027673d19


--

___
Python tracker 

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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-04 Thread Ken Jin


Ken Jin  added the comment:

Well something was amiss: the 3.9 backport PR ;-).

Sorry for closing this issue too early. I didn't notice there was still one 
more to go.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-04 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
pull_requests: +24569
pull_request: https://github.com/python/cpython/pull/25897

___
Python tracker 

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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-04 Thread Ken Jin


Ken Jin  added the comment:

Jelle, thanks for fixing up the docs. You're right here - anything that can be 
an element in a frozenset or used as a key in a dict works. And the current 
docs for sets says that means anything hashable: 
https://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset

If you feel anything's amiss. Please don't hesitate to re-open this issue.

--
nosy: +kj
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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-04 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 2046fb35e4e0986523bd0f6214fc318a414c8b97 by Miss Islington (bot) 
in branch '3.10':
bpo-44001: improve Literal documentation (GH-25877) (#25882)
https://github.com/python/cpython/commit/2046fb35e4e0986523bd0f6214fc318a414c8b97


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +24557
pull_request: https://github.com/python/cpython/pull/25882

___
Python tracker 

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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-03 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


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

___
Python tracker 

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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-01 Thread Jelle Zijlstra


New submission from Jelle Zijlstra :

After the changes from bpo-42345, the Literal documentation claims that 
"Literal objects will now raise a TypeError exception during equality 
comparisons if one of their parameters are not immutable." But in fact it's 
*unhashable* types that raise an error; mutable but hashable types such as 
functions or custom objects work fine.

I'll submit a PR for this but may wait until GH-25787 is resolved.

--
assignee: Jelle Zijlstra
components: Documentation
messages: 392608
nosy: Jelle Zijlstra
priority: normal
severity: normal
status: open
title: typing.Literal: args must be hashable, not immutable
versions: Python 3.10, Python 3.9

___
Python tracker 

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