Bug 245239 - default stop for slices is 32 bit maxint on x86_64
default stop for slices is 32 bit maxint on x86_64
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: James Antill
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-06-21 16:25 EDT by Peter Berry
Modified: 2008-04-04 09:51 EDT (History)
2 users (show)

See Also:
Fixed In Version: python-2.5.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-04 09:51:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Peter Berry 2007-06-21 16:25:11 EDT
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 16:25:11 EDT
Created attachment 157567 [details]
Test case
Comment 2 petrosyan 2008-03-14 04:56:38 EDT
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 03:25:55 EDT
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 09:51:01 EDT
 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.