classification
Title: Method cache is broken in Py3
Type: behavior Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, scoder
Priority: normal Keywords: patch

Created on 2008-05-25 08:05 by scoder, last changed 2008-05-25 09:32 by georg.brandl. This issue is now closed.

Files
File name Uploaded Description Edit
py3k-method-cache-fix.patch scoder, 2008-05-25 09:28 Patch that fixes the type tests
Messages (3)
msg67328 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2008-05-25 08:05
The method cache is deactivated in current Py3. As Lisandro Dalcín
noticed, the following code in typeobject.c always returns false for a
Py3 identifier:

#define MCACHE_CACHEABLE_NAME(name)                                     \
		PyString_CheckExact(name) &&                            \
		PyString_GET_SIZE(name) <= MCACHE_MAX_ATTR_SIZE
msg67337 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2008-05-25 09:28
Here is a patch that fixes this.
msg67338 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-25 09:32
Committed patch as r63621. Thanks!
History
Date User Action Args
2008-05-25 09:32:29georg.brandlsetstatus: open -> closed
resolution: accepted
messages: + msg67338
nosy: + georg.brandl
2008-05-25 09:28:08scodersetfiles: + py3k-method-cache-fix.patch
keywords: + patch
messages: + msg67337
2008-05-25 08:05:48scodercreate