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 — Add tests for setting and deleting attributes defined in C · Issue #156106 · python/cpython

Add tests for setting and deleting attributes defined in C #156106

New issue
Copy link
New issue
Copy link
Open
8 / 88 of 8 issues completed
Open
Add tests for setting and deleting attributes defined in C#156106
8 / 88 of 8 issues completed
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dir

Description

@serhiy-storchaka
serhiy-storchaka
opened on Aug 20, 2026
Issue body actions

CPython defines 375 attributes with PyMemberDef and PyGetSetDef (excluding the _test* modules), but the test suite never assigns to 187 of them and never deletes 332 of them.

Deletion in particular is almost untested, although it is a separate code path: the setter is called with NULL, and an implementation which does not expect this crashes or leaves the object in a broken state.

Three bugs found this way are gh-156099, gh-156100 and gh-156101; gh-152817 is another one.

The following PR adds writing and deleting tests for each writable attribute.

Linked PRs

  • gh-156106: Add tests for setting and deleting attributes defined in C #156107
  • [3.14] gh-156106: Add tests for setting and deleting attributes defined in C (GH-156107) #156184
  • [3.13] gh-156106: Add tests for setting and deleting attributes defined in C (GH-156107) #156191
  • [3.15] gh-156106: Add tests for setting and deleting attributes defined in C (GH-156107) #159086

Activity

  1. serhiy-storchaka
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Aug 20, 2026
  2. serhiy-storchaka
    added sub-issues on Aug 21, 2026
    • del ssl.SSLContext().keylog_filename crashes #156099
    • del sqlite3.Connection.autocommit crashes #156100
    • PyLong_AsInt32() and friends modify *value when they raise OverflowError #156101
    • segfault after deleting row_factory attr of sqlite3 cursor #152817
    • ctypes: crash when deleting Pointer.contents on the free-threaded build #156124
    • ssl: a failed assignment or deletion of _SSLContext._msg_callback clears the callback #156166
  3. serhiy-storchaka
    added 2 commits that reference this issue on Aug 21, 2026

    gh-156106: Add tests for setting and deleting attributes defined in C (…

    cdca502

    [3.14] gh-156106: Add tests for setting and deleting attributes defin…

    ccaacd8
  4. serhiy-storchaka
    added sub-issues on Aug 21, 2026
    • Crash when deleting frame.f_trace_opcodes in 3.13 #156189
    • A failed assignment to an attribute defined with PyMemberDef changes its value in 3.13 #156196
  5. serhiy-storchaka
    added a commit that references this issue on Aug 21, 2026

    [3.13] gh-156106: Add tests for setting and deleting attributes defin…

    8be8128
  6. serhiy-storchaka
    closed this as completedon Aug 31, 2026
  7. serhiy-storchaka
    reopened this on Aug 31, 2026
  8. serhiy-storchaka
    added a commit that references this issue on Oct 9, 2026

    [3.15] gh-156106: Add tests for setting and deleting attributes defin…

    225018d
  9. kevinprimeraquecreo-stack
    added this to Project_VKon Oct 18, 2026
  10. github-project-automation
    moved this to Todo in Project_VKon Oct 18, 2026
  11. kevinprimeraquecreo-stack
    added this to Project_VKon Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirTests in the Lib/test dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — 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.