python-pyxml: add a patch to fix syntax errors
PATCH 1/1 python-pyxml: add a patch to fix syntax errors
From: Yegor Yefremov <[email protected]>
Patch renames variable 'as' to 'pas' to avoid reserved keyword usage.
--- .../python-pyxml-fix-syntax-errors.patch | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 package/python-pyxml/python-pyxml-fix-syntax-errors.patch
package/python-pyxml/python-pyxml-fix-syntax-errors.patch new file +60 -0
@@ -0,0 +1,60 @@ +python-pyxml: fix syntax errors + +Rename 'as' variable to 'pas' to avoid reserved keyword usage. + +Signed-off-by: Yegor Yefremov <[email protected]> +--- + xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py | 10 +++++----- + xml/xpath/ParsedAbbreviatedRelativeLocationPath.py | 4 ++-- + 2 files changed, 7 insertions(+), 7 deletions(-) + +--- a/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py ++++ b/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py +@@ -24,8 +24,8 @@ + self._rel = rel + nt = ParsedNodeTest.ParsedNodeTest('node', '') + ppl = ParsedPredicateList.ParsedPredicateList([]) +- as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self') +- self._step = ParsedStep.ParsedStep(as, nt, ppl) ++ pas = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self') ++ self._step = ParsedStep.ParsedStep(pas, nt, ppl) + return + + def evaluate(self, context): +@@ -36,7 +36,7 @@ + rt = self._step.select(context) + res = [] + l = len(rt) +- ++ + sub_rt = [] + for ctr in range(l): + n = rt[ctr] +@@ -51,7 +51,7 @@ + context.setNodePosSize(origState) + return result + select = evaluate +- ++ + def pprint(self, indent=''): + print indent + str(self) + self._step.pprint(indent + ' ') +@@ -65,4 +65,4 @@ + + def __repr__(self): + return '/%s/%s' % (repr(self._step), repr(self._rel)) +- ++ +--- a/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py ++++ b/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py +@@ -28,8 +28,8 @@ + self._right = right + nt = ParsedNodeTest.ParsedNodeTest('node','') + ppl = ParsedPredicateList.ParsedPredicateList([]) +- as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self') +- self._middle = ParsedStep.ParsedStep(as, nt, ppl) ++ pas = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self') ++ self._middle = ParsedStep.ParsedStep(pas, nt, ppl) + + def evaluate(self, context): + res = []
Signature · 1 line
2.1.4
PATCH 1/1 python-pyxml: add a patch to fix syntax errors
Yegor, Clayton,
Quoted 5 lines · yegorslists at googlemail.com
From: Yegor Yefremov <[email protected]>
Patch renames variable 'as' to 'pas' to avoid reserved keyword usage.
Signed-off-by Yegor Yefremov <[email protected]>
I was surprised that issue was not fixed upstream, so I looked a bit. It has been reported upstream in June this year:
https://mail.python.org/pipermail/xml-sig/2015-June/012271.html
But the answer at
https://mail.python.org/pipermail/xml-sig/2015-June/012272.html was pretty clear:
PyXML is bitrotten and obsolete. You'll find the functionality it previously provided is now included in the Python standard library;
And later in the thread:
PyXML has been largely obsolete since around Python 2.1 (circa 2001). The last PyXML release was in 2004, and the project page very specifically advertises it as unmaintained, out of date, do not use. Specifically, the "as" keyword has been reserved since Python 2.5 (roughly 10 years ago), which is only one of many things which could cause such an old package to no longer function.
So, the big question is: Clayton, why did you submit the pyxml package for addition in Buildroot ? It is not used as a dependency in any other package as far as I can see, and it is an obsolete and deprecated XML library, since more than 10 years.
Can we get rid of it from Buildroot ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 python-pyxml: add a patch to fix syntax errors
Thomas, Yegor, Clayton, All,
On 2015-12-14 14:03 +0100, Thomas Petazzoni spake thusly:
Quoted 8 lines
Yegor, Clayton,
Quoted 5 lines · yegorslists at googlemail.com
From: Yegor Yefremov <[email protected]>
Patch renames variable 'as' to 'pas' to avoid reserved keyword usage.
Signed-off-by Yegor Yefremov <[email protected]>
[--SNIP--]
Quoted 6 lines
But the answer at
https://mail.python.org/pipermail/xml-sig/2015-June/012272.html was pretty clear:PyXML is bitrotten and obsolete. You'll find the functionality it previously provided is now included in the Python standard library;
[--SNIP--]
Quoted 1 line
Can we get rid of it from Buildroot ?
Unless Clayton (the original submitter) or Yegor (the reporter of the breakage) actually use it, It'd be of the opinion to get rid of it.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 python-pyxml: add a patch to fix syntax errors
Quoted 16 lines · Yann E. MORIN
Thomas, Yegor, Clayton, All,
On 2015-12-14 14:03 +0100, Thomas Petazzoni spake thusly:
Quoted 8 lines
Yegor, Clayton,
Quoted 5 lines · yegorslists at googlemail.com
From: Yegor Yefremov <[email protected]>
Patch renames variable 'as' to 'pas' to avoid reserved keyword usage.
Signed-off-by Yegor Yefremov <[email protected]>[--SNIP--]
Quoted 4 lines
But the answer at
https://mail.python.org/pipermail/xml-sig/2015-June/012272.html was pretty clear:
Quoted 7 lines
Quoted 2 lines
PyXML is bitrotten and obsolete. You'll find the functionality it previously provided is now included in the Python standard library;
[--SNIP--]
Quoted 1 line
Can we get rid of it from Buildroot ?
Unless Clayton (the original submitter) or Yegor (the reporter of the breakage) actually use it, It'd be of the opinion to get rid of it.
I'm also for removing this package. One positive thing about this package is, that Samuel could find a way to track down Python compile errors in the future.
Yegor
PATCH 1/1 python-pyxml: add a patch to fix syntax errors
Yegor, All,
On 2015-12-15 23:03 +0100, Yegor Yefremov spake thusly:
Quoted 19 lines · Yann E. MORIN
Quoted 18 lines
Thomas, Yegor, Clayton, All,
On 2015-12-14 14:03 +0100, Thomas Petazzoni spake thusly:
Quoted 8 lines
Yegor, Clayton,
Quoted 5 lines · yegorslists at googlemail.com
From: Yegor Yefremov <[email protected]>
Patch renames variable 'as' to 'pas' to avoid reserved keyword usage.
Signed-off-by Yegor Yefremov <[email protected]>[--SNIP--]
Quoted 6 lines
But the answer at
https://mail.python.org/pipermail/xml-sig/2015-June/012272.html was pretty clear:PyXML is bitrotten and obsolete. You'll find the functionality it previously provided is now included in the Python standard library;
Quoted 7 lines
Quoted 5 lines
[--SNIP--]
Quoted 1 line
Can we get rid of it from Buildroot ?
Unless Clayton (the original submitter) or Yegor (the reporter of the breakage) actually use it, It'd be of the opinion to get rid of it.
I'm also for removing this package.
Care to send a path removing it, then, please? ;-)
Quoted 3 lines
One positive thing about this
package is, that Samuel could find a way to track down Python compile errors in the future.
Muhahaha! :-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'