[lxml] Re: Consider keeping manylinux1 wheels for Python 3.6

2024-05-16 Thread Stefan Behnel
James Belchamber schrieb am 15.05.24 um 22:37: Would you be able to do the same thing for aarch64? manylinux1 never supported aarch64: https://github.com/pypa/manylinux?tab=readme-ov-file#manylinux1-centos-5-based---eol Stefan ___ lxml - The

[lxml] nested CDATA - was Re: Building on Windows

2024-05-02 Thread Stefan Behnel
Hi, Gertjan Klein schrieb am 02.05.24 um 17:52: Op 25-04-2024 om 16:58 schreef Stefan Behnel: I'm trying to write a conversion program that outputs XML[2]. It must match the output of an existing program. Semantically it already does, but I'd like it to match the way CDATA is handled

[lxml] Re: Building on Windows

2024-04-25 Thread Stefan Behnel
Gi, Gertjan Klein schrieb am 21.04.24 um 16:12: I'd like to try a tiny change to the CDATA class. In order to try, I have to be able to build lxml. Unfortunately, on Windows. Yeah, supporting Windows is everything but trivial due to the general lack of platform provided build support. Thus,

[lxml] Re: Consider keeping manylinux1 wheels for Python 3.6

2024-04-04 Thread Stefan Behnel
I've uploaded a simple Py3.6 manylinux1 wheel for x86_64. https://files.pythonhosted.org/packages/b8/93/768dabd4032e15dc6e7ca6767c132685545b7b0e12549dfa923fd2bd/lxml-5.2.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl Please try it out. Stefan Stefan Behnel schrieb am 03.04.24

[lxml] Re: Consider keeping manylinux1 wheels for Python 3.6

2024-04-03 Thread Stefan Behnel
Hi, thanks for the report. Miro Hrončok schrieb am 03.04.24 um 15:55: I've noticed that lxml 5.1+ upgraded the manylinux wheels to a newer tag. That came from the migration to cibuildwheel and was only partly intended. The default ensurpip-bundled pip version in Python 3.6 does not support

[lxml] Re: 5.2.0 doesn't build

2024-04-01 Thread Stefan Behnel
Hi, thanks for the report. da.ve.k.gu...@...com schrieb am 01.04.24 um 20:10: I'm attempting to develop a project that has been operational for a while. The project makes use of mixbox which references this library. It seems that version 5.2.0 of lxml was released yesterday. Strangely, pytoml

[lxml] Re: What replaced xpath.evaluate() ?

2024-02-16 Thread Stefan Behnel
lpsm...@uw.edu schrieb am 16.02.24 um 00:38: I'm maintaining older code, which just broke because lxml took out xpath.evaluate(). The only note in the lxml changelog about it says it was 'redundant', meaning (I assume) that there's a better way to do the same thing, but there's no

[lxml] Re: Streaming read/write

2024-01-21 Thread Stefan Behnel
Charlie Clark schrieb am 19.01.24 um 15:00: On 18 Jan 2024, at 18:10, Charlie Clark wrote: Apart from the fact that this currently doesn't work, I imagine that both Elements and their children would happily be passed to the write, which could lead to an almighty mess. Getting this to work

[lxml] Re: Streaming read/write

2024-01-18 Thread Stefan Behnel
Hi Charlie, Charlie Clark schrieb am 18.01.24 um 12:13: I was recently wondering about the best way to edit XML documents using both a streaming reader and writer. I'm sure this is possible using iterparse and xmlfile but I seem to remember that iterparse produces the full tree so that parent

Re: [Cython] Ready for Cython 3.1 ?

2023-11-06 Thread Stefan Behnel
Stefan Behnel schrieb am 05.11.23 um 23:06: I'd like to ease our feature development by using more modern Python features in our code base and by targeting less Python versions in Cython 3.1 compared to the "all things supported" Cython 3.0. I created a 3.0.x maintenance branch a

Re: [Cython] Ready for Cython 3.1 ?

2023-11-06 Thread Stefan Behnel
Lisandro Dalcin schrieb am 06.11.23 um 09:05: On Mon, 6 Nov 2023 at 01:19, Stefan Behnel wrote: it looks like Cython 3.0.6 is going to be a "most things fixed" kind of release for the 3.0.x release series. I'm having issues using CYTHON_LIMITED_API with some Python versions (<

Re: [Cython] Ready for Cython 3.1 ?

2023-11-06 Thread Stefan Behnel
da-woods schrieb am 06.11.23 um 08:48: > I also consider Cython 3.1 a prime target for better Limited API support. Yes - but I wouldn't treat complete support as a blocker (I don't think this is what you meant though). It's experimental in 3.0 and I don't expect it to "fully" work in 3.1.

Re: [Cython] Should we start using the internal CPython APIs?

2023-11-05 Thread Stefan Behnel
da-woods schrieb am 04.11.23 um 14:45: I'm a bit late in replying to this but here are some unordered thoughts. * I'm fairly relaxed about using `Py_BUILD_CORE` if useful - I think we mostly do have good fallback paths for most things so can adapt quickly when stuff changes. I'm not

[Cython] Ready for Cython 3.1 ?

2023-11-05 Thread Stefan Behnel
Hi all, it looks like Cython 3.0.6 is going to be a "most things fixed" kind of release for the 3.0.x release series. Given the work that lies ahead of us for Cython 3.1, I think we're at a point to get started on that, making the future 3.0.x releases stable and "boring". As a reminder,

Re: [Cython] Should we start using the internal CPython APIs?

2023-10-30 Thread Stefan Behnel
Thank you for your comments so far. Stefan Behnel schrieb am 29.10.23 um 22:06: I seriously start wondering if we shouldn't just define "Py_BUILD_CORE" (or have our own "CYTHON_USE_CPYTHON_CORE_DETAILS" macro guard that triggers its #define) and include the internal &

[Cython] Should we start using the internal CPython APIs?

2023-10-29 Thread Stefan Behnel
Hi all, given the latest blow against exposing implementation details of CPython in their C-API (see https://github.com/cython/cython/pull/5767 for the endless story), I seriously start wondering if we shouldn't just define "Py_BUILD_CORE" (or have our own "CYTHON_USE_CPYTHON_CORE_DETAILS"

Re: [Cython] Can we remove the FastGIL implementation?

2023-09-20 Thread Stefan Behnel
da-woods schrieb am 19.09.23 um 21:38: I think the detail that was missing is you need to add the `#cython: fast_gil = True` to enable it. [...] So my conclusion is that from 3.11 onwards Python sped up their own GIL handling to about the same as we used to have, and fastgil has turned into a

[Cython] Can we remove the FastGIL implementation?

2023-09-19 Thread Stefan Behnel
Hi, I've seen reports that Cython's "FastGIL" implementation (which basically keeps the GIL state in a thread-local variable) is no longer faster than CPython's plain GIL implementation in recent Python 3.x versions. Potentially even slower. See the report in

[Cython] Cython 3.0.2 released

2023-08-27 Thread Stefan Behnel
Hi all, Cython 3.0.2 is released. It fixes two major regressions in 3.0.1, so please upgrade if that failed for you. https://cython.readthedocs.io/en/latest/src/changes.html Have fun, Stefan ___ cython-devel mailing list cython-devel@python.org

[Cython] Cython 3.0 final released

2023-07-17 Thread Stefan Behnel
Hi all, after close to five long years, I'm proud to announce the release of Cython 3.0. It's done. It's out. Finally! The full list of improvements compared to the 0.29.x release series is entirely incredible. https://cython.readthedocs.io/en/latest/src/changes.html Cython 3.0 is better

[Cython] Cython 3.0 RC 2 released

2023-07-12 Thread Stefan Behnel
Hi all, after close to five long years, we're almost there – I've pushed a release candidate for Cython 3.0 with a long list of bug fixes (followed by a second one with one important fix). https://cython.readthedocs.io/en/latest/src/changes.html Please give it some final testing. Unless we

[Cython] Current CI crashes in Py3.12

2023-06-04 Thread Stefan Behnel
Hi, just a note that the current CI crashes in Py3.12b1 are due to https://github.com/python/cpython/issues/104614 They fixed it and Py3.12b2 will hopefully support multiple inheritance of extension types again. It's expected next week (June 6th). Stefan

Re: [Cython] cython 3 migration update and next releases

2023-05-21 Thread Stefan Behnel
Dima Pasechnik schrieb am 21.05.23 um 11:38: On Sun, 21 May 2023, 10:21 Stefane Fermigier, wrote: IFAIK, 15k lines of Cython makes it among one of the largest Cython projects I'm aware of (I did some research a couple of years ago):

Re: [Cython] cython 3 migration update and next releases

2023-05-20 Thread Stefan Behnel
matus valo schrieb am 16.05.23 um 21:09: I would like to inform you about recent porting of projects to Cython 3. Recently, I participated in migration of 3 bigger projects to Cython 3: Thanks a lot for doing this, Matúš. It helps Cython as much as it helps these projects. When migrating

[Cython] Cython 3.0 beta 2 is released

2023-03-27 Thread Stefan Behnel
://cython.readthedocs.io/en/latest/src/changes.html#beta-2-2023-03-26 Have fun, Stefan Stefan Behnel schrieb am 26.02.23 um 11:31: Hi all, Cython 3.0 has left the alpha status – the first beta release is available from PyPI. The changes in this release are huge – and the full list of improvements compared

[lxml] Re: When is a number not a number

2023-03-03 Thread Stefan Behnel
Stefan Behnel schrieb am 03.03.23 um 09:00: Stefan Behnel schrieb am 02.03.23 um 08:50: Am March 1, 2023 3:15:22 PM UTC schrieb holger.jo...@lbbw.de: Probably a bug in _checkNumber(): https://github.com/lxml/lxml/blob/d01872ccdf7e1e5e825b6c6292b43e7d27ae5fc4/src/lxml/objectify.pyx#L974 Ah

[lxml] Re: When is a number not a number

2023-03-03 Thread Stefan Behnel
Stefan Behnel schrieb am 02.03.23 um 08:50: Am March 1, 2023 3:15:22 PM UTC schrieb holger.jo...@lbbw.de: Probably a bug in _checkNumber(): https://github.com/lxml/lxml/blob/d01872ccdf7e1e5e825b6c6292b43e7d27ae5fc4/src/lxml/objectify.pyx#L974 Ah, yes, it might be the isdigit() check, actually

[lxml] Re: When is a number not a number

2023-03-01 Thread Stefan Behnel
Am March 1, 2023 3:15:22 PM UTC schrieb holger.jo...@lbbw.de: >Probably a bug in _checkNumber(): >https://github.com/lxml/lxml/blob/d01872ccdf7e1e5e825b6c6292b43e7d27ae5fc4/src/lxml/objectify.pyx#L974 Ah, yes, it might be the isdigit() check, actually. That could be too broad. Not every digit is

[Python-announce] Cython 3.0 beta 1 is released

2023-02-26 Thread Stefan Behnel
Hi all, Cython 3.0 has left the alpha status – the first beta release is available from PyPI. https://cython.org/ https://pypi.org/project/Cython/ The changes in this release are huge – and the full list of improvements compared to the 0.29.x release series is entirely incredible. Cython

[Cython] Cython 3.0 beta 1 is released

2023-02-26 Thread Stefan Behnel
Hi all, Cython 3.0 has left the alpha status – the first beta release is available from PyPI. The changes in this release are huge – and the full list of improvements compared to the 0.29.x release series is entirely incredible. Cython 3.0 is better than any other Cython release before, in

[lxml] Re: Question about inheritance in cssselect.py

2022-12-23 Thread Stefan Behnel
Dani Litovsky Alcala schrieb am 10.06.22 um 17:34: lxml v.4.9 cssselect.py:CSSSelector.__init__ calls on `etree.XPath.__init__(self, path, namespaces=namespaces)` to initialize the parent class. Is there a reason why `super()` or even `super(CSSSelector, self)__init__...` is not used?

[lxml] Re: %s formatting in documentation (in stead of f-string)

2022-12-20 Thread Stefan Behnel
Hi, t.r...@247interfaces.nl schrieb am 19.12.22 um 17:58: Switching to lxml for xml parsing and generating, I was somewhat puzzeled by the usage line's like XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml; XHTML = "{%s}" % XHTML_NAMESPACE With more modern f-string's this could also be

[lxml] Re: zlib error

2022-12-15 Thread Stefan Behnel
Hi, Ajayi, Temitope schrieb am 14.12.22 um 17:21: It seems the version of zlib used in lxml is outdated. It currently shows up as zlib 1.2.11 instead of zlib 1.2.13 on scan reports and therefore vulnerable to CVE-2018-25032 and CVE-2022-37434. Can I get some help on if this is correct or I

[Cython] Cython 3.0 planning - Re: [cython-users] Re: Anything missing for 0.29.33 ?

2022-12-07 Thread Stefan Behnel
Hi Matúš, Matúš Valo schrieb am 06.12.22 um 15:58: I have a thought about Cython 3.0. Based on discussion in [1] we should be done with all breaking changes. There is also [2] but PR is already there [3] (I am not sure what is the state of the PR though). Is it possible to make final release

[lxml] Re: Turn three-line block into single?

2022-08-10 Thread Stefan Behnel
Gilles schrieb am 10.08.22 um 15:20: for row in tree.iter("wpt"):     lat,lon = row.attrib.values() Note that this assignment depends on the order of the two attributes in the XML document, i.e. in data that you may not control yourself. It will break if the provider of your input documents

[Cython] Welcome David Woods as a Cython core developer

2022-07-31 Thread Stefan Behnel
Hi everyone, with the release of the first 3.0 alpha that supports Python 3.11 (aptly named "alpha 11"), I'm happy to announce that David Woods has been promoted to a Cython core developer. David has shown an extraordinary commitment and dedication over the last years. His first merged

[Python-Dev] Re: Switching to Discourse

2022-07-21 Thread Stefan Behnel
h.vetin...@gmx.com schrieb am 18.07.22 um 18:04: One of the comments in the retro was: Searching the archives is much easier and have found me many old threads that I probably would have problem finding before since I haven’t been subscribed for that long. I'm actually reading python-dev,

[Python-Dev] Re: Switching to Discourse

2022-07-16 Thread Stefan Behnel
Petr Viktorin schrieb am 15.07.22 um 13:18: The discuss.python.org experiment has been going on for quite a while, and while the platform is not without its issues, we consider it a success. The Core Development category is busier than python-dev. According to staff, discuss.python.org is much

[Cython] Nested prange loops - (was: [cython-users] Converting to Python objects with nogil (inside prange for loop))

2022-07-15 Thread Stefan Behnel
Hi, nested prange loops seem to be a common gotcha for users. I can't say if there is ever a reason to do this, but at least I can't think of any. For me, this sounds like we should turn it into a compile time error – unless someone can think of a use case? Even in that case, I'd still emit a

[lxml] Re: Iterparse raises TypeError on attempt to clean up preceding siblings

2022-06-26 Thread Stefan Behnel
Am June 23, 2022 11:20:59 PM UTC schrieb Parfait G : >I see one fix is to also check if `elem.getparent() is not None`. >Thoughts? > >elem.clear() > while elem.getprevious() is not None and elem.getparent() is not None: >del elem.getparent()[0] The parent won't change during the loop,

[lxml] Re: Build problems on Python 3.11

2022-06-01 Thread Stefan Behnel
Charlie Clark schrieb am 31.05.22 um 17:54: while I don't see this locally, I'm getting problems on my CI with the Docker Image: ``` Compile failed: command '/usr/bin/gcc' failed with exit code 1   cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitw7u6s7rr.c -o

[Python-ideas] Re: Less is more? Smaller code and data to fit more into the CPU cache?

2022-04-05 Thread Stefan Behnel
Barry Scott schrieb am 27.03.22 um 22:23: On 22 Mar 2022, at 15:57, Jonathan Fine wrote: As you may have seen, AMD has recently announced CPUs that have much larger L3 caches. Does anyone know of any work that's been done to research or make critical Python code and data smaller so that more

The Cython compiler is 20 years old today !

2022-04-04 Thread Stefan Behnel
Dear Python community, it's now 20 years since Greg Ewing posted his first announcement of Pyrex, the tool that is now known and used under the name Cython. https://mail.python.org/pipermail/python-list/2002-April/126661.html It was a long way, and I've written up some of it in a blog post:

[Python-announce] The Cython compiler is 20 years old today !

2022-04-04 Thread Stefan Behnel
Dear Python community, it's now 20 years since Greg Ewing posted his first announcement of Pyrex, the tool that is now known and used under the name Cython. https://mail.python.org/pipermail/python-list/2002-April/126661.html It was a long way, and I've written up some of it in a blog post:

[Cython] The Cython compiler is 20 years old today !

2022-04-04 Thread Stefan Behnel
Dear Cython community, it's now 20 years since Greg Ewing posted his first announcement of Pyrex, the tool that is now known and used under the name Cython. https://mail.python.org/pipermail/python-list/2002-April/126661.html It was a long way, and I've written up some of it in a blog post:

Re: [xml] libxml2 2.9.23 download

2022-03-16 Thread Stefan Behnel
Hi, Jeffrey Walton via xml schrieb am 16.03.22 um 05:45: libxml2 2.9.13 seems to be missing from ftp://xmlsoft.org/libxml2/. As mentioned in the release announcement: https://mail.gnome.org/archives/xml/2022-February/msg9.html the releases have moved to

[lxml] Re: Is there an ElementTree class lookup hook?

2022-03-08 Thread Stefan Behnel
Salut encore, Xavier Morel schrieb am 04.03.22 um 12:58: lxml provides support for custom Element classes (as well as element-ish e.g. Comment or PI) via the `ElementDefaultClassLookup` registry, and the ability to hook it into a parser. But that registry does not seem to have a slot for the

[lxml] Re: Compatibility issues between `lxml.etree.set_element_class_lookup`` and `lxml.html`

2022-03-08 Thread Stefan Behnel
Salut, Xavier Morel schrieb am 07.03.22 um 13:27: Sorry for the bother, but I've been looking at `lxml.etree.set_element_class_lookup`[0] as a way to add validation and features to lxml usage without having to ban "standard" lxml constructs (and to control usage by dependencies as well). I

[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-03-05 Thread Stefan Behnel
Change by Stefan Behnel : -- status: open -> closed ___ Python tracker <https://bugs.python.org/issue46798> ___ ___ Python-bugs-list mailing list Unsubscrib

[lxml] Re: python lxml.objectify gives no attribute access to gco:CharacterString node

2022-03-04 Thread Stefan Behnel
Dr. Volker Jaenisch schrieb am 04.03.22 um 00:02: Am 03.03.22 um 23:54 schrieb Stefan Behnel: this reads like something you could implement on top of lxml.objectify, via subclassing and an appropriate element class lookup. This could really be a plain Python package that you could distribute

[lxml] Re: python lxml.objectify gives no attribute access to gco:CharacterString node

2022-03-03 Thread Stefan Behnel
Hi Volker, this reads like something you could implement on top of lxml.objectify, via subclassing and an appropriate element class lookup. This could really be a plain Python package that you could distribute on PyPI to give users an easy choice which interface they prefer. Not everything

[lxml] Re: python lxml.objectify gives no attribute access to gco:CharacterString node

2022-03-03 Thread Stefan Behnel
Dr. Volker Jaenisch schrieb am 03.03.22 um 18:19: Therefore I am currently working on enabling LXML to have _ properties in objectify. The changes are not too complicated since the source code quality is good. I am hopeful that after the weekend I will have full functional prototype. As

[issue46786] embed, source, track, wbr HTML elements not considered empty

2022-02-27 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46786] embed, source, track, wbr HTML elements not considered empty

2022-02-27 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 345572a1a0263076081020524016eae867677cac by Jannis Vajen in branch 'main': bpo-46786: Make ElementTree write the HTML tags embed, source, track, wbr as empty tags (GH-31406) https://github.com/python/cpython/commit

[issue46389] 3.11: unused generator comprehensions cause f_lineno==None

2022-02-25 Thread Stefan Behnel
Stefan Behnel added the comment: Possibly also related, so I though I'd mention it here (sorry if this is hijacking the ticket, seems difficult to tell). We're also seeing None values in f_lineno in Cython's test suite with 3.11a5: File "", line 1, in run_trace(py

Re: [xml] Release of libxml2 2.9.13

2022-02-23 Thread Stefan Behnel
Nick Wellnhofer schrieb am 23.02.22 um 11:36: I asked on GNOME infra if it is possible to offer .tar.gz downloads, but this would require changes to the upload script. Thanks for asking. Stefan ___ xml mailing list, project page http://xmlsoft.org/

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread Stefan Behnel
Stefan Behnel added the comment: I haven't looked fully into this yet, but I *think* that Cython can get rid of most of the direct usages of PyFrameObject by switching to the new InterpreterFrame struct instead. It looks like the important fields have now been moved over

[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-02-23 Thread Stefan Behnel
Stefan Behnel added the comment: > IMHO if the developer doesn't manage the XML itself it is VERY unreasonable > to use the document value and not the developer one. I disagree. If the document says "this is the default if no explicit value if given", then I consider t

Re: [xml] Release of libxml2 2.9.13

2022-02-22 Thread Stefan Behnel
Nick Wellnhofer via xml schrieb am 20.02.22 um 13:53: Version 2.9.13 of libxml2 is available at:     https://download.gnome.org/sources/libxml2/2.9/ Thank you for the release, Nick! Note that starting with this release, libxml2 tarballs are published on download.gnome.org instead of

[lxml] Re: v4.8.0 breaking regression?

2022-02-22 Thread Stefan Behnel
Charlie Clark schrieb am 22.02.22 um 17:51: On 22 Feb 2022, at 17:26, Stefan Behnel wrote: If you set STATIC_BUILD=true, and LIBXML_VERSION=2.9.12, lxml will use the git version instead of the release version. I just tried this but got the same result. Presumably, I did something wrong

[lxml] Re: v4.8.0 breaking regression?

2022-02-22 Thread Stefan Behnel
Bob Kline schrieb am 22.02.22 um 17:29: On Tue, Feb 22, 2022 at 11:20 AM Stefan Behnel wrote: ... Help with building more universal macOS wheels would be appreciated. What would that involve? Finding a good way to do it. :) As I wrote, cibuildwheels probably has a way to do it from Github

[lxml] Re: v4.8.0 breaking regression?

2022-02-22 Thread Stefan Behnel
Bob Kline schrieb am 21.02.22 um 17:14: got the expected (correct) output. This is on macOS 12.2.1 (M1). Another interesting data point is that although https://pypi.org/project/lxml/ claims that there are builds of 4.8.0 for Python 3.10, pip on this machine concluded that it needed to build

[issue46786] embed, source, track, wbr HTML elements not considered empty

2022-02-22 Thread Stefan Behnel
Stefan Behnel added the comment: Makes sense. That list hasn't been updated in 10 years. -- versions: -Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46

[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-02-22 Thread Stefan Behnel
Stefan Behnel added the comment: The question here is simply, which is considered more important: the default provided by the document, or the default provided by Python. I don't think it's a clear choice, but the way it is now does not seem unreasonable. Changing it would mean deliberate

[issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys

2022-02-18 Thread Stefan Behnel
Stefan Behnel added the comment: > Any reasons the PR still not merged? There was dissent about whether these constants should be added or not. It doesn't help to merge a PR that is not expected to provide a benefit. -- ___ Python tracker <

[Python-Dev] Re: PEP-657 and co_positions (was: Please update Cython *before* introcuding C API incompatible changes in Python)

2022-02-10 Thread Stefan Behnel
Petr Viktorin schrieb am 10.02.22 um 11:22: So, should there be a mechanism to set source/lineno/position on tracebacks/exceptions, rather than always requiring a frame for it? There's "_PyTraceback_Add()" currently, but it's incomplete in terms of what Cython would need. As it stands,

[Python-Dev] Re: PEP-657 and co_positions (was: Please update Cython *before* introcuding C API incompatible changes in Python)

2022-02-09 Thread Stefan Behnel
Andrew Svetlov schrieb am 09.02.22 um 19:40: Stefan, do you really need to emulate call stack with positions? Could the __note__ string with generated Cython part of exception traceback solve your needs (https://www.python.org/dev/peps/pep-0678/) ? Thanks for the link, but I think it would be

[Python-Dev] Re: PEP-657 and co_positions (was: Please update Cython *before* introcuding C API incompatible changes in Python)

2022-02-09 Thread Stefan Behnel
Guido van Rossum schrieb am 09.02.22 um 19:36: On Wed, Feb 9, 2022 at 9:41 AM Pablo Galindo Salgado wrote: On Wed, 9 Feb 2022 at 17:38, Stefan Behnel wrote: Pablo Galindo Salgado schrieb am 09.02.22 um 17:40: Should there be a getter/setter for co_positions? We consider the representation

[Python-Dev] PEP-657 and co_positions (was: Please update Cython *before* introcuding C API incompatible changes in Python)

2022-02-09 Thread Stefan Behnel
Pablo Galindo Salgado schrieb am 09.02.22 um 17:40: Should there be a getter/setter for co_positions? We consider the representation of co_postions private Yes, and that's the issue. so we don't want (for now) to ad getters/setters. If you want to get the position of a instruction, you

[Python-Dev] Re: Moving away from _Py_IDENTIFIER().

2022-02-08 Thread Stefan Behnel
Inada Naoki schrieb am 08.02.22 um 06:15: On Tue, Feb 8, 2022 at 1:47 PM Guido van Rossum wrote: Thanks for trying it! I'm curious why it would be slower (perhaps less locality? perhaps the ...Id... APIs have some other trick up their sleeve?) but since it's also messier and less backwards

[issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)

2022-02-08 Thread Stefan Behnel
Stefan Behnel added the comment: This is a backwards incompatible change, but unlikely to have a wide impact. I was thinking for a second if it's making the change in the right direction because it's not unreasonable to pass "None" for saying "I want no target". But it's

[Python-Dev] Re: Moving away from _Py_IDENTIFIER().

2022-02-04 Thread Stefan Behnel
Eric Snow schrieb am 04.02.22 um 17:35: On Fri, Feb 4, 2022 at 8:21 AM Stefan Behnel wrote: Correct. We (intentionally) have our own way to intern strings and do not depend on CPython's identifier framework. You're talking about __Pyx_StringTabEntry (and __Pyx_InitString())? Yes, that's

[Python-Dev] Re: Moving away from _Py_IDENTIFIER().

2022-02-04 Thread Stefan Behnel
Ronald Oussoren via Python-Dev schrieb am 03.02.22 um 14:46: On 2 Feb 2022, at 23:41, Eric Snow wrote: * a little less convenient: adding a global string requires modifying a separate file from the one where you actually want to use the string * strings can get "orphaned" (I'm planning on

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-04 Thread Stefan Behnel
Petr Viktorin schrieb am 03.02.22 um 13:47: On 02. 02. 22 11:50, Stefan Behnel wrote: Maybe we should advertise the two modes more. And make sure that both work. There are certainly issues with the current state of the "limited API" implementation, but that just needs work and te

[Python-Dev] Re: Moving away from _Py_IDENTIFIER().

2022-02-04 Thread Stefan Behnel
Victor Stinner schrieb am 03.02.22 um 22:46: Oh right, Cython seems to be a false positive. A code search found 3 references to __Pyx_PyObject_LookupSpecial(): PYPI-2022-01-26-TOP-5000/Cython-0.29.26.tar.gz: Cython-0.29.26/Cython/Compiler/ExprNodes.py: lookup_func_name =

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-02 Thread Stefan Behnel
Victor Stinner schrieb am 02.02.22 um 23:23: On Wed, Feb 2, 2022 at 3:54 PM Stefan Behnel wrote: So people using stable Python versions like Python 3.10 would not need Cython, but people testing the "next Python" (Python 3.11) would not have to manually removed generated C code. T

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-02 Thread Stefan Behnel
Ronald Oussoren via Python-Dev schrieb am 02.02.22 um 16:44: On 2 Feb 2022, at 11:50, Stefan Behnel wrote: Petr Viktorin schrieb am 02.02.22 um 10:22: - "normal" public API, covered by the backwards compatibility policy (users need to recompile for every minor release,

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-02 Thread Stefan Behnel
Petr Viktorin schrieb am 02.02.22 um 10:22: Moving off the internal (unstable) API would be great, but I don't think Cython needs to move all the way to the limited API. There are three "levels" in the C API: - limited API, with long-term ABI compatibility guarantees That's what

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-02 Thread Stefan Behnel
Victor Stinner schrieb am 02.02.22 um 11:35: I wish that there would be a 3rd option: ship C code generated by Cython *but* run Cython if this C code "looks" outdated, for example if building the C code fails with a compiler error. So, one thing I did yesterday was to make sure that .c files

[lxml] Re: Missing PDFs from lxml.de/lxml-VERSION.pdf?

2022-02-02 Thread Stefan Behnel
Hi, Thomas Schraitle schrieb am 02.02.22 um 08:20: not really remember, but some time ago it was possible to download the latest PDF from lxml.de/lxml-.pdf. This worked quite well, but now I get a 404. Is there a replacement that I can use? If not, would it be possible to build the PDF from

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-01 Thread Stefan Behnel
. On Tue, Feb 1, 2022 at 4:14 PM Stefan Behnel wrote: I'd rather make it more obvious to users what their intentions are. And there is already a way to do that – the Limited API. (and similarly, HPy) Your grammar confuses me. Do you want users to be clearer in expressing their intentions

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-01 Thread Stefan Behnel
Thomas Caswell schrieb am 01.02.22 um 23:15: I think it would be better to discourage projects from including the output of cython in their sdists. They should either have cython as a build-time requirement or provide built wheels (which are specific a platform and CPython version). The middle

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-01 Thread Stefan Behnel
Guido van Rossum schrieb am 02.02.22 um 00:21: On Tue, Feb 1, 2022 at 3:07 David wrote: Greg Ewing wrote: To address this there could be an option to choose between "compatible code" and "fast code", with the former restricting itself to the stable API. To some extent, that exists at the

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-01 Thread Stefan Behnel
Hi Irit, Irit Katriel via Python-Dev schrieb am 01.02.22 um 23:04: There two separate issues here. One is the timing of committing changes into cython, and the other is the process by which the cython devs learn about cpython development. On the first issue, you wrote: I'm reluctant to

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-01 Thread Stefan Behnel
Greg Ewing schrieb am 01.02.22 um 23:33: On 2/02/22 8:48 am, Guido van Rossum wrote: It seems to me that a big part of the problem is that Cython feels entitled to use arbitrary CPython internals. I think the reason for this is that Cython is trying to be two things at once: (1) an interface

[Python-Dev] Re: Please update Cython *before* introcuding C API incompatible changes in Python

2022-02-01 Thread Stefan Behnel
Christian Heimes schrieb am 01.02.22 um 16:42: On 01/02/2022 16.08, Victor Stinner wrote: I would prefer to introduce C API incompatible changes differently: first fix Cython, and *then* introduce the change. - (1) Propose a Cython PR and get it merged - (2) Wait until a new Cython version is

[lxml] Re: Restricting third party access for lxml github org?

2022-01-25 Thread Stefan Behnel
Hi Martijn! Martijn Faassen schrieb am 25.01.22 um 11:11: Hey lxmlers, I recently found out that older organizations by default grant third party access to any github OAuth application that a user has enabled. This means that if any of such applications is compromised, this organization is

Re: [Cython] question on submitting a possibly massive bug report

2022-01-25 Thread Stefan Behnel
website.reader via cython-devel schrieb am 25.01.22 um 01:09: I am not familiar with Cython, but have spent a few weeks looking at compiler warnings posted when the mathematical package called "sage v9.4" is compiled, which takes several hours to build, since hundreds of code units are

[issue45569] Drop support for 15-bit PyLong digits?

2022-01-12 Thread Stefan Behnel
Stefan Behnel added the comment: Cython should be happy with whatever CPython uses (as long as CPython's header files agree with CPython's build ;-) ). I saw the RasPi benchmarks on the ML. That would have been my suggested trial platform as well. https://mail.python.org/archives/list/python

Re: [xml] Resuming maintenance

2022-01-10 Thread Stefan Behnel
Nick Wellnhofer via xml schrieb am 10.01.22 um 15:20: Thanks to a donation from Google, I'm able to resume maintenance of libxml2 (and libxslt) for the remainder of 2022. I'm very happy to read this, Nick. All the best for 2022. Stefan ___ xml

[lxml] Re: question about a bug when lxml runs in a conda environment

2022-01-06 Thread Stefan Behnel
Martin Mueller schrieb am 31.12.21 um 18:06: I have used lxml extensively in a Pycharm environment that calls on a conda environment. Lately I encountered an odd error. The correct output of a marylamb.py script goes like this: http://www.tei-c.org/ns/1.0;> Mary had a little lamb,

[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Update vendored copy to expat 2.4.1

2022-01-01 Thread Stefan Behnel
Stefan Behnel added the comment: I'd like to ask for clarification regarding issue 45321, which adds the missing error constants to the `expat` module. I consider those new features – it seems inappropriate to add new module constants in the middle of a release series. However

[issue45321] Module xml.parsers.expat.errors misses error code constants of libexpat >=2.0

2021-12-31 Thread Stefan Behnel
Change by Stefan Behnel : -- components: +XML resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tra

[issue45321] Module xml.parsers.expat.errors misses error code constants of libexpat >=2.0

2021-12-31 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset e18d81569fa0564f3bc7bcfd2fce26ec91ba0a6e by Sebastian Pipping in branch 'main': bpo-45321: Add missing error codes to module `xml.parsers.expat.errors` (GH-30188) https://github.com/python/cpython/commit/e18d81569fa0564f3bc7bcfd2fce26ec91ba0a6e

[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-12-17 Thread Stefan Behnel
Stefan Behnel added the comment: FYI, we track the Cython side of this in https://github.com/cython/cython/issues/4500 -- ___ Python tracker <https://bugs.python.org/issue45

[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-12-17 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +scoder ___ Python tracker <https://bugs.python.org/issue45711> ___ ___ Python-bugs-list mailing list Unsubscribe:

[lxml] Re: ISO-20022 validation not possible with new xsd schema

2021-12-16 Thread Stefan Behnel
Bob Kline schrieb am 16.12.21 um 16:28: On Thu, Dec 16, 2021 at 1:37 AM Stefan Behnel wrote: Sadly, libxml2 is currently not maintained, ... Was there an announcement to that effect since the most recent release (which was in May of this year)? https://mail.gnome.org/archives/xml/2021-July

[lxml] Re: ISO-20022 validation not possible with new xsd schema

2021-12-15 Thread Stefan Behnel
Salut Jean! Am December 15, 2021 9:46:25 PM UTC schrieb Jean de Bosset: >The payment schema for ISO-20022 > >lxml.etree.XMLSchemaParseError: Element >'{http://www.w3.org/2001/XMLSchema}pattern': The value >'[\p{IsBasicLatin}\p{IsLatin-1Supplement}\p{IsLatinExtended-A}€ȘșȚț-[\p{C}]]+' >of the

[lxml] Re: Support for XSL/T 2.0

2021-12-15 Thread Stefan Behnel
Bob Kline schrieb am 15.12.21 um 16:29: Will lxml ever support XSL/T 2.0 (which achieved recommendation status 15 years ago)? lxml itself will never implement that. But if someone finds an implementation of XSLT 2.0 that lxml can integrate with, then there's a chance that it can be supported

[issue16392] [doc] import crashes on circular imports in ext modules

2021-12-13 Thread Stefan Behnel
Stefan Behnel added the comment: Given that PEP-489 has landed in Py3.5, which is already retired and has been for more than a year, I think we can just close this issue as outdated. -- resolution: -> out of date stage: needs patch -> resolved status: open -&g

  1   2   3   4   5   6   7   8   9   10   >