@@ -39,13 +39,13 @@ is currently implemented only in Python-space; C libraries invoked
39
39
from the Python runtime are unaware of Python's ``LC_NUMERIC``
40
40
setting. This is done to avoid changing the behavior of certain
41
41
low-level functions that are used by the Python parser and related
42
- code [2 ]_.
42
+ code [1 ]_.
43
43
44
44
However, this presents a problem for extension modules that wrap C
45
45
libraries. Applications that use these extension modules will
46
46
inconsistently display and convert floating-point values.
47
47
48
- James Henstridge, the author of PyGTK [3 ]_, has additionally
48
+ James Henstridge, the author of PyGTK [2 ]_, has additionally
49
49
pointed out that the ``setlocale()`` function also presents
50
50
thread-safety issues, since a thread may call the C library
51
51
``setlocale()`` outside of the GIL, and cause Python to parse and
@@ -66,7 +66,7 @@ Example Problem
66
66
===============
67
67
68
68
The initial problem that motivated this PEP is related to the
69
- GtkSpinButton [4 ]_ widget in the GTK+ UI toolkit, wrapped by the
69
+ GtkSpinButton [3 ]_ widget in the GTK+ UI toolkit, wrapped by the
70
70
PyGTK module. The widget can be set to numeric mode, and when
71
71
this occurs, characters typed into it are evaluated as a number.
72
72
@@ -123,18 +123,18 @@ Potential Code Contributions
123
123
============================
124
124
125
125
This problem was initially reported as a problem in the GTK+
126
- libraries [5 ]_; since then it has been correctly diagnosed as an
126
+ libraries [4 ]_; since then it has been correctly diagnosed as an
127
127
inconsistency in Python's implementation. However, in a fortunate
128
128
coincidence, the glib library (developed primarily for GTK+, not
129
129
to be confused with the GNU C library) implements a number of
130
- ``LC_NUMERIC``-agnostic functions (for an example, see [6 ]_) for
130
+ ``LC_NUMERIC``-agnostic functions (for an example, see [5 ]_) for
131
131
reasons similar to those presented in this paper.
132
132
133
133
In the same GTK+ problem report, Havoc Pennington suggested that
134
134
the glib authors would be willing to contribute this code to the
135
135
PSF, which would simplify implementation of this PEP considerably.
136
136
Alex Larsson, the original author of the glib code, submitted a
137
- PSF Contributor Agreement [7 ]_ on 2003-08-20 [8 ]_ to ensure the code
137
+ PSF Contributor Agreement [6 ]_ on 2003-08-20 [7 ]_ to ensure the code
138
138
could be safely integrated; this agreement has been received and
139
139
accepted.
140
140
@@ -153,7 +153,7 @@ as members of the GTK+ and glib teams have said they are fine with
153
153
relicensing the code, and a PSF contributor agreement has been
154
154
mailed in to ensure this safety.
155
155
156
- Tim Peters has pointed out [9 ]_ that there are situations involving
156
+ Tim Peters has pointed out [8 ]_ that there are situations involving
157
157
threading in which the proposed change is insufficient to solve
158
158
the problem completely. A complete solution, however, does not
159
159
currently exist.
@@ -163,41 +163,41 @@ Implementation
163
163
==============
164
164
165
165
An implementation was developed by Gustavo Carneiro <gjc at
166
- inescporto.pt>, and attached to Sourceforge.net bug 774665 [10 ]_
166
+ inescporto.pt>, and attached to Sourceforge.net bug 774665 [9 ]_
167
167
168
- The final patch [11 ]_ was integrated into Python CVS by Martin v.
168
+ The final patch [10 ]_ was integrated into Python CVS by Martin v.
169
169
Löwis on 2004-06-08, as stated in the bug report.
170
170
171
171
172
172
References
173
173
==========
174
174
175
- .. [2 ] Python locale documentation for embedding,
175
+ .. [1 ] Python locale documentation for embedding,
176
176
http://docs.python.org/library/locale.html
177
177
178
- .. [3 ] PyGTK homepage, http://www.daa.com.au/~james/pygtk/
178
+ .. [2 ] PyGTK homepage, http://www.daa.com.au/~james/pygtk/
179
179
180
- .. [4 ] GtkSpinButton screenshot (demonstrating problem),
180
+ .. [3 ] GtkSpinButton screenshot (demonstrating problem),
181
181
http://www.async.com.br/~kiko/spin.png
182
182
183
- .. [5 ] GNOME bug report, http://bugzilla.gnome.org/show_bug.cgi?id=114132
183
+ .. [4 ] GNOME bug report, http://bugzilla.gnome.org/show_bug.cgi?id=114132
184
184
185
- .. [6 ] Code submission of g_ascii_strtod and g_ascii_dtostr (later
185
+ .. [5 ] Code submission of g_ascii_strtod and g_ascii_dtostr (later
186
186
renamed g_ascii_formatd) by Alex Larsson,
187
187
http://mail.gnome.org/archives/gtk-devel-list/2001-October/msg00114.html
188
188
189
- .. [7 ] PSF Contributor Agreement,
189
+ .. [6 ] PSF Contributor Agreement,
190
190
https://www.python.org/psf/contrib/contrib-form/
191
191
192
- .. [8 ] Alex Larsson's email confirming his agreement was mailed in,
192
+ .. [7 ] Alex Larsson's email confirming his agreement was mailed in,
193
193
https://mail.python.org/pipermail/python-dev/2003-August/037755.html
194
194
195
- .. [9 ] Tim Peters' email summarizing LC_NUMERIC trouble with Spambayes,
195
+ .. [8 ] Tim Peters' email summarizing LC_NUMERIC trouble with Spambayes,
196
196
https://mail.python.org/pipermail/python-dev
67ED
/2003-September/037898.html
197
197
198
- .. [10 ] Python bug report, https://bugs.python.org/issue774665
198
+ .. [9 ] Python bug report, https://bugs.python.org/issue774665
199
199
200
- .. [11 ] Integrated LC_NUMERIC-agnostic patch,
200
+ .. [10 ] Integrated LC_NUMERIC-agnostic patch,
201
201
https://sourceforge.net/tracker/download.php?group_id=5470&atid=305470&file_id=89685&aid=774665
202
202
203
203
0 commit comments