Issue1716

classification
Title: xrange slicing raises NPE
Type: Severity: normal
Components: Core Versions:
Milestone:
process
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.

Files
File name Uploaded Description Edit Remove
xrange_slicing_raises_TypeError.patch Trundle, 2011-06-09.00:52:05
Messages
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>
java.lang.NullPointerException
	at org.python.core.PySystemState.displayhook(PySystemState.java:1234)
	at org.python.core.PySystemStateFunctions.__call__(PySystemState.java:1409)
	at org.python.core.PyObject.invoke(PyObject.java:3585)
	at org.python.core.Py.printResult(Py.java:1800)
	at org.python.pycode._pyx1.f$0(<stdin>:1)
	at org.python.pycode._pyx1.call_function(<stdin>)
	at org.python.core.PyTableCode.call(PyTableCode.java:165)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.Py.runCode(Py.java:1261)
	at org.python.core.Py.exec(Py.java:1305)
	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:215)
	at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:89)
	at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:70)
	at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:46)
	at org.python.util.InteractiveConsole.push(InteractiveConsole.java:110)
	at org.python.util.InteractiveConsole.interact(InteractiveConsole.java:90)
	at org.python.util.jython.run(jython.java:317)
	at org.python.util.jython.main(jython.java:129)

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 http://hg.python.org/jython/rev/353121061da9 Thanks Andreas Stührk!
msg7629 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-06.18:25:27
Patch actually applied in these:
2.5 http://hg.python.org/jython/rev/3345d6e15c79
2.7 http://hg.python.org/jython/rev/d77503b7a755
History
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