[issue38941] xml.etree.ElementTree.Element inconsistent warning for bool

2019-12-01 Thread Stefan Behnel
Stefan Behnel added the comment: Not so quick. :) You're probably aware of the details, but still, let me state clearly what this is about, to make sure that we're all on the same page here. (I'm also asking in Serhiy, because he did quite some work on ET in the past and has

[issue39011] ElementTree attributes replace "\r" with "\n"

2019-12-23 Thread Stefan Behnel
Stefan Behnel added the comment: I think we did it wrong in issue 17582. Parser behaviour is not a reason why the *serialisation* should modify the content. Luckily, fixing this does not impact the C14N serialisation (which aims to guarantee byte identical serialisation), but it changes the

[issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async?

2019-12-23 Thread Stefan Behnel
Stefan Behnel added the comment: FWIW, it seems reasonable to have a protocol for this. -- ___ Python tracker <https://bugs.python.org/issue38225> ___ ___ Pytho

[issue38597] C Extension import limit

2020-01-05 Thread Stefan Behnel
Stefan Behnel added the comment: Cython doesn't interfere with the C compiler setup in any way, that's left to distutils/setuptools (and the user). -- ___ Python tracker <https://bugs.python.o

[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-01-23 Thread Stefan Behnel
Change by Stefan Behnel : -- stage: -> needs patch ___ Python tracker <https://bugs.python.org/issue39432> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-01-23 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +scoder ___ Python tracker <https://bugs.python.org/issue39432> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-01-23 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +17536 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18150 ___ Python tracker <https://bugs.python.org/issu

[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-01-23 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue39432> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-01-28 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +steve.dower ___ Python tracker <https://bugs.python.org/issue39432> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-02-05 Thread Stefan Behnel
Stefan Behnel added the comment: Ok, this is merged into 3.9. To which versions should we backport it? Definitely 3.8, definitely not 3.5, probably not 3.6 (since it's not a security issue). Ned, what about 3.7? -- nosy: +ned.deily stage: patch review -> backpor

[issue39538] SystemError when set Element.attrib to non-dict

2020-02-05 Thread Stefan Behnel
Stefan Behnel added the comment: I agree that SystemError is the wrong response. Whether it needs to be AttributeError – probably fine to consider this an implementation detail. TypeError also seems ok in at least some of the cases. I think we should widen the code to expect some kind of

[issue39011] ElementTree attributes replace "\r" with "\n"

2020-02-10 Thread Stefan Behnel
Stefan Behnel added the comment: Your patch looks good to me. Could you please add (or adapt) the tests and then create a PR from it? You also need to write a NEWS entry for this change, and it also seems worth an entry in the "What's new" document. https://devguide.python

[issue39432] Distutils generates the wrong export symbol for unicode module names

2020-02-18 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 5bf58cef151249f1cca92166d1b70693348da9d8 by Miss Islington (bot) in branch '3.8': bpo-39432: Implement PEP-489 algorithm for non-ascii "PyInit_*" symbol names in distutils (GH-18150) (GH-18546) https://github.com/p

[issue39432] Distutils generates the wrong export symbol for unicode module names

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

[issue37534] In minidom module ability to add Standalone Document Declaraion is missing while generating XML documents

2020-02-29 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset dc04a0571e362cd3de040771d7705cb107ae26fc by Henry Harutyunyan in branch 'master': bpo-37534: Allow adding Standalone Document Declaration when generating XML documents (GH-14912) https://github.com/python/cpyt

[issue37534] In minidom module ability to add Standalone Document Declaraion is missing while generating XML documents

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

[issue39824] Multi-phase extension module (PEP 489): don't call m_traverse, m_clear nor m_free before the module state is allocated

2020-03-21 Thread Stefan Behnel
Stefan Behnel added the comment: > I think Cython makes use of PEP-489 so unless I am missing something all > generated extensions use PEP-489 structures. Cython doesn't make complete use of PEP-489 yet, specifically not of the module state feature (nor module subclasses). This c

[issue39011] ElementTree attributes replace "\r" with "\n"

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 5fd8123dfdf6df0a9c29363c8327ccfa0c1d41ac by mefistotelis in branch 'master': bpo-39011: Preserve line endings within ElementTree attributes (GH-18468) https://github.com/python/cpython/commit/5fd8123dfdf6df0a9c29363c8327cc

[issue39011] ElementTree attributes replace "\r" with "\n"

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

[issue17582] xml.etree.ElementTree does not preserve whitespaces in attributes

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: Also see the later fix in issue 39011, where the EOL normalisation in attribute text was removed again. This change was applied in Py3.9. -- ___ Python tracker <https://bugs.python.org/issue17

[issue32476] Add concat functionality to ElementTree xpath find

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: I think the use case of quote escaping is too niche for a feature like concat(), where I (at least) would expect to be able to dynamically concatenate text content, not just constant strings. There seem to be at least a few alternatives to the usage of

[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: This has been pending for a while too long, but the fixes look good to me. They should still go at least into Py3.8 and later. -- versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.6, Python 3.7 ___ Python

[issue13743] xml.dom.minidom.Document class is not documented

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 63e5b59c06fc99f95d274e7f181296e094cc3ee7 by Alex Itkes in branch 'master': bpo-13743: Add some documentation strings to xml.dom.minidom (GH-16355) https://github.com/python/cpython/commit/63e5b59c06fc99f95d274e7f181296

[issue13743] xml.dom.minidom.Document class is not documented

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: A first PR was applied, but I'll leave this ticket open since it changes nothing for the "Document" class. :) -- versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.5, Python 3.6, Python

[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 402e1cdb132f384e4dcde7a3d7ec7ea1fc7ab527 by Oren Milman in branch 'master': bpo-31758: Prevent crashes when using an uninitialized _elementtree.XMLParser object (GH-3997) https://github.com/python/cpyt

[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 61511488cf4e7a1cb57a38efba7e0a84a387fe58 by Miss Islington (bot) in branch '3.8': bpo-31758: Prevent crashes when using an uninitialized _elementtree.XMLParser object (GH-3997) (GH-19485) https://github.com/python/cpyt

[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: Let's add it to the last bug fix release of 3.7 as well. It fixes a crash bug, after all. -- stage: patch review -> backport needed versions: +Python 3.7 ___ Python tracker <https://bugs.python.org

[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 096e41aa4e558b28b7260fe01eb21414b1458b20 by Miss Islington (bot) in branch '3.7': [3.7] bpo-31758: Prevent crashes when using an uninitialized _elementtree.XMLParser object (GH-3997) (GH-19487) https://github.com/python/cpyt

[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks for the fix, Oren! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue40279] Documentation example of module init function lacks error handling

2020-04-13 Thread Stefan Behnel
New submission from Stefan Behnel : The example in the docs that shows how to initialise an embedded module gives a wrong impression about error handling. Most of the functions that it calls return error codes, but those do not get looked at. Innocent users who copy and paste the example may

[issue40279] Documentation example of module init function lacks error handling

2020-04-24 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset d4f3923d5901ef1ccdbe6ad6c5a753af90832a0f by Cajetan Rodrigues in branch 'master': bpo-40279: Add some error-handling to the module initialisation docs example (GH-19705) https://github.com/python/cpyt

[issue40279] Documentation example of module init function lacks error handling

2020-04-24 Thread Stefan Behnel
Stefan Behnel added the comment: Hi Cajetan, thank you for your contribution! That's a nice documentation improvement. -- nosy: -miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue40279] Documentation example of module init function lacks error handling

2020-04-24 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 882a7f44da08c6fb210bd9a17f80903cbca84034 by Miss Islington (bot) in branch '3.8': bpo-40279: Add some error-handling to the module initialisation docs example (GH-19705) (GH-19710) https://github.com/python/cpyt

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-04-28 Thread Stefan Behnel
Stefan Behnel added the comment: What can we do to move this forward? I see that the original PR was closed in January. Is there or will there be a new one? Can I help with anything? -- ___ Python tracker <https://bugs.python.org/issue38

[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-05-04 Thread Stefan Behnel
Stefan Behnel added the comment: Christian, I understand your complaint, but I've actually never seen code in the wild that didn't provide a fallback for the import, usually something like what Serhiy spelled out and explained above: try: import xml.etree.cElement

[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-05-05 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks Miro, that's beautiful. Good to know that I'm not the only one who doesn't read documentation. ;-) So, how do we deal with this? We can't warn about the deprecation without annoying everyone. We can't just remove the empty mod

[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-05-05 Thread Stefan Behnel
Stefan Behnel added the comment: It's not like the deprecation was hidden – the ET docs have this line right at the top: "Changed in version 3.3: This module will use a fast implementation whenever available. The xml.etree.cElementTree module is deprecated." https://do

[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-05-05 Thread Stefan Behnel
Stefan Behnel added the comment: >> But as I said, people don't read docs. > After seven, eight years we should do our users a service and point out the > deprecation with a concrete deadline. ¯\_(ツ)_/¯ Honestly, let's just keep it. Maybe we can add an invisible Pen

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2020-05-07 Thread Stefan Behnel
Stefan Behnel added the comment: Adding to the list above: "f_lasti" is used in "libpython.py", which is an almost exact copy of the one in CPython's "Tools/gdb/" for debugging Python code in gdb. If that implementation changes, we can probably adap

[issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash()

2020-05-09 Thread Stefan Behnel
New submission from Stefan Behnel : _PyDict_GetItemIdWithError() looks up interned strings, which always have their hash value initialised. It can call _PyDict_GetItem_KnownHash() directly. -- messages: 368506 nosy: scoder priority: low severity: normal stage: needs patch status: open

[issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash()

2020-05-09 Thread Stefan Behnel
Change by Stefan Behnel : -- components: +Interpreter Core keywords: +easy (C) ___ Python tracker <https://bugs.python.org/issue40575> ___ ___ Python-bugs-list m

[issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash()

2020-05-09 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +19329 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20018 ___ Python tracker <https://bugs.python.org/issu

[issue38787] PEP 573: Module State Access from C Extension Methods

2020-05-10 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +19334 pull_request: https://github.com/python/cpython/pull/20024 ___ Python tracker <https://bugs.python.org/issue38

[issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash()

2020-05-10 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 6067d4bc3ce5ff4cfa5b47ceecc84a3941bc031c by scoder in branch 'master': bpo-40575: Avoid unnecessary overhead in _PyDict_GetItemIdWithError() (GH-20018) https://github.com/python/cpython/commit/6067d4bc3ce5ff4cfa5b47ceecc84a

[issue40575] _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash()

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

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2020-05-12 Thread Stefan Behnel
Stefan Behnel added the comment: Since it's not clear from this ticket what the original problem was, is there a chance it could have been related to issue 35810? -- nosy: +scoder ___ Python tracker <https://bugs.python.org/is

[issue22622] ElementTree only writes declaration when passed encoding

2020-05-17 Thread Stefan Behnel
Stefan Behnel added the comment: Right, thanks. Closing since this works in Py3. -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43399] xml.etree.ElementTree.extend does not work with iterators when using the Python implementation

2021-03-04 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks for the report and the PR. I would argue that this can still be fixed in Py3.8, given the low impact (but not earlier). The behaviour is clearly wrong (in a subtle way) and most users won't notice it because they won't switch off the C a

[issue40703] PyType_FromSpec*() overwrites the type's "__module__"

2020-05-20 Thread Stefan Behnel
New submission from Stefan Behnel : The PyType_FromSpec() functions set the type's "__module__" attribute at the end: https://github.com/python/cpython/blob/0509c4547fc95cc32a91ac446a26192c3bfdf157/Objects/typeobject.c#L3154-L3172 There are only two possible cases, either it

[issue40703] PyType_FromSpec*() overwrites the type's "__module__"

2020-05-20 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +19553 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20273 ___ Python tracker <https://bugs.python.org/issu

[issue40724] Support buffer protocol with type specs

2020-05-22 Thread Stefan Behnel
New submission from Stefan Behnel : As far as I can see it in typeslots.h [1], the buffer protocol is still not supported when using type specs: /* Disabled, see #10181 */ #undef Py_bf_getbuffer #undef Py_bf_releasebuffer It seems that the discussion in issue 10181 did not lead anywhere at

[issue40724] Support buffer protocol with type specs

2020-06-05 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +19868 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20648 ___ Python tracker <https://bugs.python.org/issu

[issue40724] Support buffer protocol with type specs

2020-06-06 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset f7c4e236429606e1c982cacf24e10fc86ef4462f by scoder in branch 'master': bpo-40724: Support setting buffer slots from type specs (GH-20648) https://github.com/python/cpython/commit/f7c4e236429606e1c982cacf24e10f

[issue40724] Support buffer protocol with type specs

2020-06-07 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 1e4fa91104a03c44baa241326102cbec42d387f1 by Miss Islington (bot) in branch '3.9': bpo-40724: Support setting buffer slots from type specs (GH-20648) (GH-20683) https://github.com/python/cpython/commit/1e4fa91104a03c44baa241326102cb

[issue40724] Support buffer protocol with type specs

2020-06-07 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 1d711f2e31e02b2e9cbe4f109bf79541f56c35a2 by Miss Islington (bot) in branch '3.9': bpo-40724: Fix return type of test helper function heapctypewithbuffer_releasebuffer() (GH-20685) (GH-20690) https://github.com/python/cpyt

[issue40724] Support buffer protocol with type specs

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

[issue33187] Document ElementInclude (XInclude) support in ElementTree

2020-06-08 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 301f0d4ff9b6bd60599eea0612904f65a92e6dd9 by Shantanu in branch 'master': bpo-33187: Document 3.9 changes to xml.etree.ElementInclude.include (GH-20438) https://github.com/python/cpython/commit/301f0d4ff9b6bd60599eea0612904f

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2020-06-08 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 301f0d4ff9b6bd60599eea0612904f65a92e6dd9 by Shantanu in branch 'master': bpo-33187: Document 3.9 changes to xml.etree.ElementInclude.include (GH-20438) https://github.com/python/cpython/commit/301f0d4ff9b6bd60599eea0612904f

[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-06-10 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset ec88e1bca81a167e6d5c0ac635e22f84298cb1df by Serhiy Storchaka in branch 'master': bpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." (GH-20117) https://github.com/p

[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-06-10 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 3b97d1becbe08cf56c58d9c740a4622cbf6285fd by Miss Islington (bot) in branch '3.9': bpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." (GH-20117) (GH-20780) https://github.com/p

[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-06-10 Thread Stefan Behnel
Stefan Behnel added the comment: The xml.etree.cElementTree module is restored. We'll see about what to do with it later. It hurts less to keep it around than to delete it. I think this ticket can be closed. -- resolution: -> fixed stage: patch review -> resolved s

[issue40703] PyType_FromSpec*() overwrites the type's "__module__"

2020-06-10 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 24b8bad6d30ae4fb37ee686a073adfa5308659f9 by scoder in branch 'master': bpo-40703: Let PyType_FromSpec() set "type.__module__" only if it is not set yet. (GH-20273) https://github.com/p

[issue40703] PyType_FromSpec*() overwrites the type's "__module__"

2020-06-10 Thread Stefan Behnel
Change by Stefan Behnel : -- stage: patch review -> test needed ___ Python tracker <https://bugs.python.org/issue40703> ___ ___ Python-bugs-list mai

[issue40703] PyType_FromSpec*() overwrites the type's "__module__"

2020-06-10 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 9419158a3e67ba2eadf33215568003ed723b0a98 by Miss Islington (bot) in branch '3.9': bpo-40703: Let PyType_FromSpec() set "type.__module__" only if it is not set yet. (GH-20273) (GH-20782) https://github.com/p

[issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API

2020-06-16 Thread Stefan Behnel
Stefan Behnel added the comment: To add to the list, Cython also calls _Py_NewReference() in its async generator code, which uses a free-list. That code was mostly copied from the CPython-internal implementation. Other freelist implementations in Cython call PyObject_INIT() instead, so I

[issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API

2020-06-17 Thread Stefan Behnel
Stefan Behnel added the comment: I looked into the freelists a bit more and (as always) it's not quite that simple. Calling _Py_NewReference() allows keeping the "ob_type" pointer in place, whereas PyObject_INIT() requires a blank object in order to set the type and properly

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-06-19 Thread Stefan Behnel
Stefan Behnel added the comment: It should be replaced with an actual function, which can be inline in the non-limited case. -- nosy: +scoder stage: -> needs patch type: -> compile error versions: +Python 3.10, Python 3.9 -Python 3.6, Pyth

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-06-19 Thread Stefan Behnel
Stefan Behnel added the comment: You can see it from the tags on the commit, it was fixed in Py3.8. Duplicate of issue 33738. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6, P

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-06-20 Thread Stefan Behnel
Stefan Behnel added the comment: I ran into this, too. I agree that the "hackcheck" loop on heap types is probably wrong. https://github.com/python/cpython/blob/04fc4f2a46b2fd083639deb872c3a3037fdb47d6/Objects/typeobject.c#L5947-L5977 It was written at a time (Py2.3?) when (p

[issue35975] Put back the ability to parse files where async/await aren't keywords

2020-06-20 Thread Stefan Behnel
Stefan Behnel added the comment: I was made aware [1] that the addition of the "cf_feature_version" field broke the backwards compatibility of the "PyRun_StringFlags()" function [2]. Unlike what the docs of "PyCompilerFlags" [3] suggest, the new field is not

[issue35975] Put back the ability to parse files where async/await aren't keywords

2020-06-20 Thread Stefan Behnel
Stefan Behnel added the comment: I wasn't sure which is better – solve it or leave it. But it seems a) easy to adapt to on user side, and b) solvable in CPython in a way that allows code that wants to adapt to work across 3.8.x versions. Only code that does not get adapted would risk fa

[issue35975] Put back the ability to parse files where async/await aren't keywords

2020-06-20 Thread Stefan Behnel
Stefan Behnel added the comment: PRs look good to me. Here is a test that fails for me with the master branch and works with your fixes. It has a slightly odd place in the subinterpreter tests, but I would argue that it's not entirely misplaced there. You would want to know

[issue35975] Put back the ability to parse files where async/await aren't keywords

2020-06-21 Thread Stefan Behnel
Stefan Behnel added the comment: Feel free to use the patch in any way you like. -- ___ Python tracker <https://bugs.python.org/issue35975> ___ ___ Python-bug

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-06-21 Thread Stefan Behnel
Stefan Behnel added the comment: This SO answer by Martijn Pieters explains the background: https://stackoverflow.com/a/44854477 and links to the original python-dev discussion: https://mail.python.org/pipermail/python-dev/2003-April/034535.html The current implementation checks that the

[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread Stefan Behnel
Stefan Behnel added the comment: > Giving a direct access to an array or PyObject* (PyObject**) is causing > issues with other Python implementations, like PyPy, which don't use PyObject > internally. I'm wondering – if the intention is to help other implementations, then

[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread Stefan Behnel
Stefan Behnel added the comment: > Also, later, these structures may change to be more efficient. Tuples? Really? Ok, quoting PEP-620: > Members of … PyTupleObject structures have not changed since the "Initial > revision" commit (1990) I honestly think the reason for t

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-06-23 Thread Stefan Behnel
Change by Stefan Behnel : -- keywords: +patch pull_requests: +20258 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21092 ___ Python tracker <https://bugs.python.org/issu

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-06-23 Thread Stefan Behnel
Stefan Behnel added the comment: I chose to go through the MRO, which takes multiple inheritance into account. -- stage: patch review -> ___ Python tracker <https://bugs.python.org/issu

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-06-23 Thread Stefan Behnel
Change by Stefan Behnel : -- stage: -> patch review ___ Python tracker <https://bugs.python.org/issue39960> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-01 Thread Stefan Behnel
Change by Stefan Behnel : -- versions: -Python 3.7 ___ Python tracker <https://bugs.python.org/issue39960> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-02 Thread Stefan Behnel
Stefan Behnel added the comment: I think we missed the train for fixing 3.7 (which was questionable anyway), but I added a test, so it's ready for merging into 3.8+ (minus merge conflicts for the test in 3.8, probably). -- ___ Python tr

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-05 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +20487 pull_request: https://github.com/python/cpython/pull/21339 ___ Python tracker <https://bugs.python.org/issue39

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-05 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 8912c182455de83e27d5c120639ec91b18247913 by scoder in branch '3.8': bpo-39960: Allow heap types in the "Carlo Verre" hack check that override "tp_setattro()" (GH-21092) (GH-21339) https://gi

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-05 Thread Stefan Behnel
Stefan Behnel added the comment: Fixed in 3.8+. Closing. Thanks for the feedback. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-17 Thread Stefan Behnel
Stefan Behnel added the comment: The problem in the test added in PR 21473 is that there is an intermediate base type "object" in the hierarchy: class A(type): def __setattr__(cls, key, value): type.__setattr__(cls, key, value) class B: pass

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-17 Thread Stefan Behnel
Stefan Behnel added the comment: > intermediate base type "object" in the hierarchy Sorry, I meant an intermediate base type "B", which inherits its setattr from "object". -- ___ Python tracker &l

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +20664 pull_request: https://github.com/python/cpython/pull/21528 ___ Python tracker <https://bugs.python.org/issue41

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-18 Thread Stefan Behnel
Stefan Behnel added the comment: I pushed PR 21528 with a new proposal. See issue 41295. -- ___ Python tracker <https://bugs.python.org/issue39960> ___ ___ Pytho

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread Stefan Behnel
Stefan Behnel added the comment: PR 21528 works for all four test cases that we now have (1x test_capi.py, 3x test_descr.py). Any comments? We need to merge a fix before Monday to meet the deadline of the planned hotfix release. @kam193, could you please also test that change with your

[issue41273] asyncio: proactor read transport: use recv_into instead of recv

2020-07-18 Thread Stefan Behnel
Stefan Behnel added the comment: There have been sporadic buildbot failures in "test_asyncio" since this change, message being "1 test altered the execution environment", e.g. https://buildbot.python.org/all/#/builders/129/builds/1443 Could someone please check

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread Stefan Behnel
Stefan Behnel added the comment: > test_asyncio altered the execution environment That happened several times before in previous builds. I think there's just a part of the asyncio tests that is unreliable. I left a comment in issue 41273 since it might be related, the sporadic

[issue35018] Sax parser provides no user access to lexical handlers

2020-08-09 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset e28b8c93878072dc02b116108ef5443084290d47 by Zackery Spytz in branch 'master': bpo-35018: Sax parser should provide user access to lexical handlers (GH-20958) https://github.com/python/cpython/commit/e28b8c93878072dc02b116108ef544

[issue35018] Sax parser provides no user access to lexical handlers

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

[issue41566] Include much faster DEFLATE implementations in Python's gzip and zlib libraries. (isa-l)

2020-08-17 Thread Stefan Behnel
Stefan Behnel added the comment: > This has to be in a PEP No, the bug tracker seems fine for this. -- nosy: +scoder resolution: not a bug -> stage: resolved -> needs patch status: closed -> open type: -> performance ___ Python

[issue41566] Include much faster DEFLATE implementations in Python's gzip and zlib libraries. (isa-l)

2020-08-17 Thread Stefan Behnel
Stefan Behnel added the comment: What about building the library? The readme says it needs nasm? That's not a standard dependency for the CPython build currently, which relies solely on a C compiler. -- ___ Python tracker &

[issue41566] Include much faster DEFLATE implementations in Python's gzip and zlib libraries. (isa-l)

2020-08-17 Thread Stefan Behnel
Stefan Behnel added the comment: > libdeflate and isa-l use different compression ratio's for the levels. I don't see why these would need to translate 1:1. The zlib module is a Python API wrapper, it can do its own mapping here, or use the libraries selectively only for som

[issue41566] Include much faster DEFLATE implementations in Python's gzip and zlib libraries. (isa-l)

2020-08-20 Thread Stefan Behnel
Stefan Behnel added the comment: > On the whole I think the arguments to make a module are very strong. So I > think that is the appropriate way forward. If you take this route, please don't write it directly against the CPython C-API (as you would for a CPython stdlib module).

[issue40624] add support for != (not-equals) in ElementTree XPath

2020-09-07 Thread Stefan Behnel
Stefan Behnel added the comment: Agreed that adding "!=" would be a nice improvement, probably not very invasive. PR welcome. https://www.w3.org/TR/xpath-10/#booleans -- nosy: +scoder stage: -> needs patch type: -> enhancement versions: +Python

[issue39714] ElementTree limitation

2020-09-07 Thread Stefan Behnel
Stefan Behnel added the comment: I'd suggest feeding the data into the parser in chunks, or letting it read from a file-like object, or something like that. Also, you probably want to do incremental processing on the data (see the XMLPullParser and iterparse), because reading 3.5GB o

[issue39714] ElementTree parser limitation of input string size

2020-09-07 Thread Stefan Behnel
Change by Stefan Behnel : -- title: ElementTree limitation -> ElementTree parser limitation of input string size ___ Python tracker <https://bugs.python.org/issu

<    1   2   3   4   5   6   7   8   9   10   >