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: Expose _Py_ReleaseInternedStrings
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, gvanrossum, loewis
Priority: normal Keywords: patch

Created on 2002-06-06 15:45 by barry, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
release.txt barry, 2002-06-06 15:45
Messages (8)
msg40228 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-06-06 15:45
An implementation of the idea expressed here:

http://mail.python.org/pipermail/python-dev/2002-June/025067.html

This exposes the clearing of the intern dictionary to
Python via gc.release_interns().  Patch includes doc
updates and a test case.
msg40229 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-06-06 15:59
Logged In: YES 
user_id=6380

Um, that's totally unsafe. See
http://mail.python.org/pipermail/python-dev/2002-June/025071.html
msg40230 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-06-06 16:02
Logged In: YES 
user_id=12800

Yes, I know why this isn't right.  Notes:

- we probably want to incref the string pointed to by
ob_intern so that the reference is counted in the interned
string's refcount

- when the referent is freed, we'll need to decref the ob_intern

this addresses

http://mail.python.org/pipermail/python-dev/2002-June/025071.html
msg40231 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-06-06 16:03
Logged In: YES 
user_id=12800

Guido also suggests to move this sys instead of gc (although
gc isn't totally out of the question).  Maybe Neil has an
opinion one way or the other?
msg40232 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-06-07 16:39
Logged In: YES 
user_id=6380

Barry, are you going to do an implementation of what we
decided on? If not, maybe unassign this and let someone else
submit one.
msg40233 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-06-07 17:51
Logged In: YES 
user_id=12800

I'm planning to, yes.  I may not get to it until early next
week though, so if someone is motivated to do it before
then, let me know (or steal the assignment).
msg40234 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-06-08 10:02
Logged In: YES 
user_id=21627

Could not this get exposed as str.some_static_method?
msg40235 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-07-12 17:36
Logged In: YES 
user_id=12800

I'm closing this as rejected since others have more time and
energy to do this (i.e. murder intern strings :) right.
History
Date User Action Args
2022-04-10 16:05:23adminsetgithub: 36703
2002-06-06 15:45:52barrycreate