[Patches] [ python-Patches-710576 ] Backport to 2.2.2 of codec registry fix
SourceForge.net
noreply@sourceforge.net
Sun, 30 Mar 2003 13:12:10 -0800
Patches item #710576, was opened at 2003-03-27 09:09
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=710576&group_id=5470
Category: Core (C code)
Group: Python 2.2.x
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Geert Jansen (geertj)
Assigned to: Martin v. Löwis (loewis)
Summary: Backport to 2.2.2 of codec registry fix
Initial Comment:
Hi,
attached is a backport to Python 2.2.2 of the patch that
fixes bug:
#663074: codec registry and Python embedding problem
which is discussed here:
http://sourceforge.net/tracker/index.php?func=detail&aid=663074&group_id=5470&atid=105470
If there will be a Python 2.2.3 release, I suggest this patch
is applied. Currently, mod_python programs cannot use
encodings, because mod_python is one of the (few?)
programs that uses multiple subinterpreters.
About the patch: it is a backport of Gustavo Niemeyer's
patch for 2.3 CVS. I had to adapt it a little bit because in
2.2 there is no codec error registry.
Greetings,
Geert Jansen
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2003-03-30 23:12
Message:
Logged In: YES
user_id=21627
Thanks for the patch. Committed (with changes) as
pystate.h 2.18.16.3
NEWS 1.337.2.4.2.69
codecs.c 2.13.26.3
pystate.c 2.20.16.3
pythonrun.c 2.153.6.5
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2003-03-30 22:45
Message:
Logged In: YES
user_id=6380
(c) is okay with me. Since PyInterpreterState is always
allocated by the Python core, I can't see how this could
possibly break something.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-03-29 15:16
Message:
Logged In: YES
user_id=21627
This patch breaks binary compatibility, as it changes the
layout of PyInterpreterState. We could reduce the risk of
breakage by moving the new members at the end of the struct.
Assigning to Guido for pronouncement: Should this
a) be rejected?
b) be accepted as is? (arguing that nobody uses the
interpreter state, anyway)
c) accepted with the proposed change (i.e.
sizeof(PyInterpreterState) still changes, but the offset of
the existing members doesn't).
----------------------------------------------------------------------
Comment By: M.-A. Lemburg (lemburg)
Date: 2003-03-28 09:40
Message:
Logged In: YES
user_id=38388
Looks ok.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-03-28 01:00
Message:
Logged In: YES
user_id=21627
Marc-Andre, can you take a look? If not, please unassign it.
----------------------------------------------------------------------
Comment By: Geert Jansen (geertj)
Date: 2003-03-27 09:25
Message:
Logged In: YES
user_id=537938
Here is the patch. It is tested and verified to fix the problem by
two people. I also verified that it passes the test suite.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=710576&group_id=5470