This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: weakref class name are hardcoded in reprs
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: corona10, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2020-04-25 03:05 by OhBonsai, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 19707 open OhBonsai, 2020-04-25 03:12
Messages (1)
msg367248 - (view) Author: OhBonsai (OhBonsai) * Date: 2020-04-25 03:05
Same with #21861 #27541

hard-coding in https://github.com/python/cpython/blob/master/Objects/weakrefobject.c#L162  __repr__ 

----- Reproducing
>>> import weakref
>>> class ExtendRef(weakref.ref): pass
... 
>>> class Obj(): pass
... 
>>> eref = ExtendRef(Obj())
>>> eref
<weakref at 0x1046bc520; dead>

----- Expect the subclass name
>>> eref
<ExtendRef at 0x1046bc520; dead>
History
Date User Action Args
2022-04-11 14:59:29adminsetgithub: 84563
2020-11-17 06:57:50OhBonsaisetnosy: - OhBonsai
2020-04-26 21:56:52taleinatsetnosy: - taleinat
2020-04-26 09:59:10OhBonsaisetnosy: - docs@python
components: + Library (Lib), - Documentation
2020-04-26 06:04:58OhBonsaisetnosy: + serhiy.storchaka
2020-04-25 03:39:58OhBonsaisetassignee: docs@python

nosy: + docs@python
components: + Documentation, - Extension Modules
title: some class name are hardcoded in reprs -> weakref class name are hardcoded in reprs
2020-04-25 03:12:47OhBonsaisetkeywords: + patch
stage: patch review
pull_requests: + pull_request19027
2020-04-25 03:05:17OhBonsaicreate