pyparsing ParseResults.pop() fails with NameError: global name 'index' is not defined

Bug #1381564 reported by Данило Шеган
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyparsing (Ubuntu)
Fix Released
Medium
Barry Warsaw

Bug Description

pyparsing 2.0.2 (included in Ubuntu 14.10) ParseResults.pop() fails with

  Traceback (most recent call last):
    File "pyparsing-test.py", line 4, in <module>
      res.pop()
    File "/usr/lib/python2.7/dist-packages/pyparsing.py", line 422, in pop
      ret = self[index]
  NameError: global name 'index' is not defined

for a minimal test case like

  from pyparsing import Word
  test = Word("test")
  res = test.parseString("test")
  res.pop()

This is fixed upstream in pyparsing 2.0.3 with the following patch:

  http://sourceforge.net/p/pyparsing/code/269/tree//trunk/src/pyparsing.py?diff=51924a4d34309d2f53936e05:268

This bug affects Landscape (mostly for development, but still).

Revision history for this message
Robie Basak (racb) wrote :

Thanks. Looks like 2.0.3 is tagged upstream but not yet released.

It would be easiest to fix this in Debian and then sync (looks like a bugfix only release, with test suite additions, so it seems pretty safe).

But to make Utopic before release, we need to cherry-pick the fix, or pull in 2.0.3 from svn or something. This would be better than having to do an SRU after release though.

I don't have upload permission and it sounds like you don't need this fixed in Utopic so I'll leave it for now. Please shout if you do need this in Utopic though.

Changed in pyparsing (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Данило Шеган (danilo) wrote :

Thanks for the quick turn-around, Robie!

There actually is a 2.0.3 release at pypi: https://pypi.python.org/pypi/pyparsing/2.0.3#downloads

FWIW, not having this in would result in a bunch of Canonical Landscape engineers (>15) unable to switch to Utopic for development, so consider me shouting :)

Revision history for this message
Barry Warsaw (barry) wrote :

Should be relatively straightforward to update Debian to the latest and then sync to Utopic. I'll start looking at that. If it's a pure bug fix release, it won't require an FFE, but it will require approval by the release team, since final freeze is today.

Changed in pyparsing (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
milestone: none → ubuntu-14.10
status: Triaged → In Progress
Revision history for this message
Barry Warsaw (barry) wrote :

I just uploaded 2.0.3+dfsg1-1 to unstable. As soon as it lands there, I'll do a sync to utopic. Can you give ubuntu-release a heads up that this needs to be approved?

Changed in pyparsing (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Данило Шеган (danilo) wrote :

Cheers Barry, much appreciated!

It seems it's all done and released in main:
  http://packages.ubuntu.com/source/utopic/pyparsing
  https://launchpad.net/ubuntu/utopic/+source/pyparsing/2.0.3+dfsg1-1

Let me know if I still need to ping ubuntu-release for an approval.

Revision history for this message
Barry Warsaw (barry) wrote : Re: [Bug 1381564] Re: pyparsing ParseResults.pop() fails with NameError: global name 'index' is not defined

On Oct 17, 2014, at 08:57 AM, Данило Шеган wrote:

>Cheers Barry, much appreciated!

No problem!

>It seems it's all done and released in main:
> http://packages.ubuntu.com/source/utopic/pyparsing
> https://launchpad.net/ubuntu/utopic/+source/pyparsing/2.0.3+dfsg1-1
>
>Let me know if I still need to ping ubuntu-release for an approval.

Nope, we're good to go for the unicorn!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.