GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PEP 695: not all name collisions are tested · Issue #105437 · python/cpython

PEP 695: not all name collisions are tested #105437

New issue
Copy link
New issue
Copy link
Closed
Closed
PEP 695: not all name collisions are tested#105437
Copy link
Assignees
sobolevn
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@sobolevn
sobolevn
opened on Jun 7, 2023
Issue body actions

Right now there are two tests for name colisions of type parameters of type aliases and functions:

  • cpython/Lib/test/test_type_params.py

    Lines 11 to 12 in 27c68a6

    def test_name_collision_01(self):
    check_syntax_error(self, """def func[**A, A](): ...""")
  • cpython/Lib/test/test_type_aliases.py

    Lines 11 to 12 in 27c68a6

    def test_name_collision_01(self):
    check_syntax_error(self, """type TA1[A, **A] = None""", "duplicate type parameter 'A'")

They only test A and **A collide. But, PEP clearly states that A and *A collide as well.
I will send a PR.

I am really sorry that I have to put all my review comments to #103764 as separate issues, but I've missed my chance to properly review the PEP's implementation.

Linked PRs

  • gh-105437: Improve tests of type params names for PEP 695 #105438
  • [3.12] gh-105437: Improve tests of type params names for PEP 695 (GH-105438) #105452

Activity

  1. sobolevn
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    testsTests in the Lib/test dirTests in the Lib/test dir
    topic-typing
    on Jun 7, 2023
  2. sobolevn
    self-assigned this
    on Jun 7, 2023
  3. sobolevn
    added 2 commits that reference this issue on Jun 7, 2023

    pythongh-105437: Improve tests of type params names for PEP 695

    1ade077

    pythongh-105437: Improve tests of type params names for PEP 695

    3d82559
  4. JelleZijlstra
    added a commit that references this issue on Jun 7, 2023

    gh-105437: Improve tests of type params names for PEP 695 (#105438)

    76883af
  5. miss-islington
    added a commit that references this issue on Jun 7, 2023

    pythongh-105437: Improve tests of type params names for PEP 695 (pyth…

    47d6df0
  6. JelleZijlstra
    added a commit that references this issue on Jun 7, 2023

    [3.12] gh-105437: Improve tests of type params names for PEP 695 (GH-…

    d36aa24
  7. AlexWaygood
    closed this as completedon Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sobolevn
    sobolevn

Labels

testsTests in the Lib/test dirTests in the Lib/test dirtopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.