Bug 245239 - default stop for slices is 32 bit maxint on x86_64
Summary: default stop for slices is 32 bit maxint on x86_64
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 5
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: James Antill
QA Contact: Fedora Extras Quality Assurance
Whiteboard: bzcl34nup
Depends On:
TreeView+ depends on / blocked
Reported: 2007-06-21 20:25 UTC by Peter Berry
Modified: 2008-04-04 13:51 UTC (History)
2 users (show)

Fixed In Version: python-2.5.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-04-04 13:51:01 UTC
Type: ---

Attachments (Terms of Use)
Test case (292 bytes, text/x-python)
2007-06-21 20:25 UTC, Peter Berry
no flags Details

Description Peter Berry 2007-06-21 20:25:11 UTC
Description of problem:
http://docs.python.org/ref/slicings.html says that the default 'stop' for a
slice is sys.maxint (I have been told this is only the case for classic classes;
new style classes use None instead). On FC5 for x86_64 it is the 32 bit maxint,
but should be the 64 bit one.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
See attached test case. Run with python ./slicebug.py. The class implements a
custom __getitem__; indexing an instance with a slice returns the slice's stop.
If the stop is not explicitly specified, it should be the same as sys.maxint and
so the script should print "okay".
Actual results:
[pwb@silver python]$ python slicebug.py
bug: slice stop is 2147483647, sys.maxint is 9223372036854775807

Expected results:
[pwb@silver python]$ python slicebug.py

Additional info:
Apparently the bug is present on 2.4.4 on Gentoo as well, but I don't have any
way to test more recent versions.

Comment 1 Peter Berry 2007-06-21 20:25:11 UTC
Created attachment 157567 [details]
Test case

Comment 2 petrosyan 2008-03-14 08:56:38 UTC
Fedora Core 5 and Fedora Core 6 are no longer maintained. Is this bug still
present in Fedora 7 or Fedora 8?

Comment 3 Bug Zapper 2008-04-04 07:25:55 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 4 James Antill 2008-04-04 13:51:01 UTC
 This was "fixed" in python 2.5.x

Note You need to log in before you can comment on or make changes to this bug.