[Patches] [ python-Patches-565378 ] Expose _Py_ReleaseInternedStrings

noreply@sourceforge.net noreply@sourceforge.net
Fri, 12 Jul 2002 10:36:33 -0700


Patches item #565378, was opened at 2002-06-06 11:45
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=565378&group_id=5470

Category: Core (C code)
Group: Python 2.3
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Barry A. Warsaw (bwarsaw)
Assigned to: Barry A. Warsaw (bwarsaw)
Summary: Expose _Py_ReleaseInternedStrings

Initial Comment:
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.


----------------------------------------------------------------------

>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-07-12 13:36

Message:
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.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-06-08 06:02

Message:
Logged In: YES 
user_id=21627

Could not this get exposed as str.some_static_method?

----------------------------------------------------------------------

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-06-07 13:51

Message:
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).

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-06-07 12:39

Message:
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.

----------------------------------------------------------------------

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-06-06 12:03

Message:
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?

----------------------------------------------------------------------

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-06-06 12:02

Message:
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


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-06-06 11:59

Message:
Logged In: YES 
user_id=6380

Um, that's totally unsafe. See
http://mail.python.org/pipermail/python-dev/2002-June/025071.html

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=565378&group_id=5470