Mark Dickinson dicki...@gmail.com added the comment:
PyNumber_Int deprecated in r69517, r69518.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4910
Mark Dickinson dicki...@gmail.com added the comment:
Thanks again for reviewing, Benjamin. nb_long renamed in r68651, merged
to 3.0 (along with a few other long-int cleanups) in r68666.
There seems to be a consensus on deprecating PyNumber_Int. I'll leave
this open until that's taken care
Mark Dickinson dicki...@gmail.com added the comment:
Here's a patch that deprecates PyNumber_Int in favour of PyNumber_Long:
- move PyNumber_Int definition from abstract.h to intobject.h (and
fix up comments at the top of intobject.h)
- mark PyNumber_Int as deprecated in the c-api docs, with
Benjamin Peterson benja...@python.org added the comment:
+1 for applying the last patch.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4910
___
___
Mark Dickinson dicki...@gmail.com added the comment:
Thanks, Benjamin! Checked in in r68553, backported to 3.0 in r68556.
Here's the second patch, which fixes almost all remaining uses of nb_long
but stops short of actually removing/renaming the nb_long slot.
Notes:
(1) I haven't tested the
Benjamin Peterson benja...@python.org added the comment:
On Thu, Jan 15, 2009 at 10:48 AM, Mark Dickinson rep...@bugs.python.org wrote:
Mark Dickinson dicki...@gmail.com added the comment:
Thanks, Benjamin! Checked in in r68553, backported to 3.0 in r68556.
Here's the second patch, which
Mark Dickinson dicki...@gmail.com added the comment:
I wonder if we should mark
PyNumber_Long as deprecated in the docs, though.
It would be nice to standardize on one of (PyNumber_Long, PyNumber_Int)
and document the other as deprecated.
Maybe it would make more sense to stick with
Mark Dickinson dicki...@gmail.com added the comment:
Second patch applied in r68619 (py3k) and r68620 (3.0 maintenance branch).
Here's the third and final patch: rename the nb_long slot to nb_reserved,
and change its type to (void *).
Added file:
Mark Dickinson dicki...@gmail.com added the comment:
Here's a patch against the py3k branch that gets rid of the two existing
uses of nb_long in the core:
- in PyNumber_Long, conversion was attempted first using nb_int and
then using nb_long. The patch simply removes the nb_long code, so
Mark Dickinson dicki...@gmail.com added the comment:
That was a pretty poor patch. Here's a better one:
- added Misc/NEWS entry
- added tests to check that __long__ is never called
- removed Modules/_struct.c change, in the interests of
keeping the patch focused.
Added file:
Benjamin Peterson benja...@python.org added the comment:
The first installment looks good!
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4910
___
___
11 matches
Mail list logo