bpo-42345: Fix three issues with typing.Literal parameters by uriyyo · Pull Request #23294 · python/cpython · GitHub

github.com

Tin mới

uriyyo:fix-issue-42345

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

bpo-42345: Literal equality no longer depends on order of arguments

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

Use value and type for Literal equality check

View reviewed changes

Lib/test/test_typing.py

Return Literal equality test

Use typed lru_cache for Literal type

View reviewed changes

Update signature of _tp_cache function

Add Literal arguments deduplication

View reviewed changes

awaiting core review

awaiting core review

needs backport to 3.9

needs backport to 3.9

: Fix three issues with typing.Literal parameters (

bpo-42345: Fix hash implementation of typing.Literal #23383

: Fix hash implementation of typing.Literal (

[3.9] bpo-42345: Fix hash implementation of typing.Literal (GH-23383) #23408

bpo-42345: Fix hash implementation of typing.Literal (

: Fix hash implementation of typing.Literal (

bpo-42345: Fix three issues with typing.Literal parameters (

bpo-42345: Fix hash implementation of typing.Literal (

Incorrect deduplication of Enum values in Union[Literal[1], Literal[SomeEnum.one]] #103592

Fix various things with Literal python/typing_extensions#145

python3-typing-extensions: upgrade 4.5.0 -> 4.6.2

python/cpython#74690

python/cpython#103034

python/cpython#31628

python/cpython#101827

python/cpython#104048