Title: xrange slicing raises NPE
Type: Severity: normal
Components: Core Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: Trundle, alex.gronholm, fwierzbicki, pjenvey
Priority: normal Keywords: patch

Created on 2011-03-12.22:27:39 by pjenvey, last changed 2013-02-06.18:25:27 by fwierzbicki.

File name Uploaded Description Edit Remove
xrange_slicing_raises_TypeError.patch Trundle, 2011-06-09.00:52:05
msg6433 (view) Author: Philip Jenvey (pjenvey) Date: 2011-03-12.22:27:39

Jython 2.5.2 (Release_2_5maint:7220, Mar 12 2011, 17:25:54) 
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_17
Type "help", "copyright", "credits" or "license" for more information.
>>> xrange(3)[0:1]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
	at org.python.core.PySystemState.displayhook(
	at org.python.core.PySystemStateFunctions.__call__(
	at org.python.core.PyObject.invoke(
	at org.python.core.Py.printResult(
	at org.python.pycode._pyx1.f$0(<stdin>:1)
	at org.python.pycode._pyx1.call_function(<stdin>)
	at org.python.core.Py.runCode(
	at org.python.core.Py.exec(
	at org.python.util.PythonInterpreter.exec(
	at org.python.util.InteractiveInterpreter.runcode(
	at org.python.util.InteractiveInterpreter.runsource(
	at org.python.util.InteractiveInterpreter.runsource(
	at org.python.util.InteractiveConsole.push(
	at org.python.util.InteractiveConsole.interact(
	at org.python.util.jython.main(

java.lang.NullPointerException: java.lang.NullPointerException

Python 2.5.4 (r254:67916, Aug  2 2010, 20:09:39) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> xrange(3)[0:1]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: sequence index must be integer, not 'slice'
msg6545 (view) Author: Andreas Stührk (Trundle) Date: 2011-06-09.00:52:05
Patch that makes slicing a xrange object raise a TypeError.
msg7385 (view) Author: Alex Grönholm (alex.gronholm) Date: 2012-08-11.14:19:19
Fix looks simple enough to me. Ok to merge?
msg7386 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2012-08-11.17:35:06
Alex: This one and four others that I identified yesterday look good for merging - but I'd like to put out 2.5.3 final first on Monday. Would it help if I promise that 2.5.4 will come out *much* faster than 2.5.3 did? I'm thinking that 2.5.4 should come out in 1-3 months. I really want to get a final 2.5.3 out ASAP, but new bugfixes trigger another RC.
msg7387 (view) Author: Alex Grönholm (alex.gronholm) Date: 2012-08-11.17:36:59
As long as they aren't regressions from 2.5.2. I recall that at least one of them was a regression.
msg7398 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2012-08-13.20:16:29
Alex: while I agree that regressions are particularly annoying, this release is already way overdue - I will strive to get a 2.5.4 out soon (1-3 months is my goal). Do you remember which bug is a regression? I remember one about bytecode length limits, but that's too big a fix for any short term.
msg7627 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-06.17:15:11
oops fixed in 2.7 but I really should have fixed for 2.5.4 - will backport shortly and close.
msg7628 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-06.18:23:54
Fully fixed for 2.5 and 2.7 in Thanks Andreas Stührk!
msg7629 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-06.18:25:27
Patch actually applied in these:
Date User Action Args
2013-02-06 18:25:27fwierzbickisetmessages: + msg7629
2013-02-06 18:23:54fwierzbickisetstatus: open -> closed
priority: normal
resolution: fixed
messages: + msg7628
2013-02-06 17:15:11fwierzbickisetassignee: pjenvey -> fwierzbicki
messages: + msg7627
2012-08-13 20:16:29fwierzbickisetmessages: + msg7398
2012-08-11 17:36:59alex.gronholmsetmessages: + msg7387
2012-08-11 17:35:07fwierzbickisetmessages: + msg7386
2012-08-11 14:19:19alex.gronholmsetnosy: + alex.gronholm
messages: + msg7385
2012-08-10 20:59:44fwierzbickisetnosy: + fwierzbicki
2011-06-09 00:52:05Trundlesetfiles: + xrange_slicing_raises_TypeError.patch
keywords: + patch
messages: + msg6545
nosy: + Trundle
2011-03-12 22:27:39pjenveycreate