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 — Check for type consistency for `PyUnicodeError` API · Issue #127691 · python/cpython

Check for type consistency for PyUnicodeError API #127691

New issue
Copy link
New issue
Copy link
Closed
Closed
Check for type consistency for PyUnicodeError API#127691
Copy link
Assignees
picnixz
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

Description

@picnixz
picnixz
opened on Dec 6, 2024
Issue body actions

Feature or enhancement

Proposal:

This is a follow-up to #123380 (comment).

The idea is to add assertion type-checks when calling helper functions on unicode objects:

    assert(PyObject_TypeCheck(exc, (PyTypeObject*)&PyExc_UnicodeError));

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

  • gh-127691: add type checks when using PyUnicodeError objects #127694

Activity

  1. picnixz
    added
    type-featureA feature request or enhancementA feature request or enhancement
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Dec 6, 2024
  2. picnixz
    self-assigned this
    on Dec 6, 2024
  3. encukou
    added a commit that references this issue on Dec 13, 2024

    gh-127691: add type checks when using `PyUnicodeError` objects (GH-12…

    8bc1818
  4. encukou commented on Dec 13, 2024

    @encukou
    encukou
    on Dec 13, 2024
    Member
    More actions

    Thank you for the fix!
    Do you want to add more, or should we close the issue?

  5. picnixz commented on Dec 13, 2024

    @picnixz
    picnixz
    on Dec 13, 2024
    MemberAuthor
    More actions

    I don't think I'll add more for this specific task. If I find something else I forgot, I'll just reuse it. I'll close this one as completed. Thanks for the merge!

    Reacted by Petr Viktorin
  6. picnixz
    closed this as completedon Dec 13, 2024
  7. srinivasreddy
    added a commit that references this issue on Jan 8, 2025

    pythongh-127691: add type checks when using `PyUnicodeError` objects (p…

    a7aa09b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @picnixz
    picnixz

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

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.