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

2021-04-20 Thread Stefan Behnel
Stefan Behnel added the comment: Coming back to this after a while. I would like to get rid of the work-around (read: huge hack) that we have in Cython for this check and thus would ask for the check to be removed in Py3.10. According to the discussion, no-one seemed to remember why

[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-17 Thread Stefan Behnel
Stefan Behnel added the comment: I support that there should be a simple way to do this from C. The way via importing the "gc" module and then looking up an attribute (possibly building a Unicode string) and calling a function in it involves several operations that can take

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-13 Thread Stefan Behnel
Stefan Behnel added the comment: The macros were moved to "Includes/cpython/", not to "Includes/internal/". That suggests to me that they should use "extern C", so that C++ code that wants to make use of CPython internals can use them. Basically, the wa

[issue40066] Enum: modify __repr__, __str__; update docs

2021-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: > why /shouldn't/ we make the change? It breaks doctests, and probably some other unit tests, too, e.g. for output formatting. What should we suggest users to do? Replace >>> get_flag(…) by >>> get_flag(…) == app_enums.Tr

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: These macros are a sort-of documented part of the C-API. At least, they were mentioned in a What's New document: https://docs.python.org/3/whatsnew/2.7.html?highlight=py_isspace#build-and-c-api-changes They were added here, for the Py2.7 release: https

[issue43618] random.shuffle loses most of the elements

2021-03-25 Thread Stefan Behnel
Stefan Behnel added the comment: Yes, this is neither a bug in CPython (or its stdlib) nor in lxml. It's how things work. Don't use these two together. -- resolution: -> third party stage: -> resolved status: open -> closed ___ Pytho

[issue43616] random.shuffle() crashes with Unhandled exception

2021-03-25 Thread Stefan Behnel
Stefan Behnel added the comment: Almost certainly not a bug in CPython's stdlib. Possibly something worth investigating in lxml, although, as stated in issue 43618, random.shuffle() simply does not work on lxml.etree Elements. -- resolution: -> third party stage: -> re

[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 accelerator

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

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

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

2020-11-08 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 97e8b1eaeaf3aa325c84ff2e13417c30414d0269 by Ammar Askar in branch 'master': bpo-40624: Add support for the XPath != operator in xml.etree (GH-22147) https://github.com/python/cpython/commit/97e8b1eaeaf3aa325c84ff2e13417c30414d0269

[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2020-10-28 Thread Stefan Behnel
Stefan Behnel added the comment: In general, since the C accelerator is enabled by default, and few people would consider disabling it explicitly, I generally consider the behaviour of the C implementation to be "right", if both implementations differ. As a single data point, the

[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2020-10-26 Thread Stefan Behnel
Stefan Behnel added the comment: The patch looks right. I'm not sure if this can still be changed in Py3.8, though, since that has been around for quite a while now. Admittedly, few people will disable the C accelerator module and thus whitness this issue, but for them, this is a breaking

[issue41756] Do not always use exceptions to return result from coroutine

2020-10-11 Thread Stefan Behnel
Stefan Behnel added the comment: > Don't forget to remove PyGen_Send() That's the function that allows sending data into a generator. It's also used internally by "PyIter_Send()". Are you really suggesting to remove it, or to make it underscore-private again? (As

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-04 Thread Stefan Behnel
Stefan Behnel added the comment: Closing since this works as designed. Users are responsible for avoiding concurrent tree modifications during iteration. -- resolution: -> not a bug stage: patch review -> resolved status: open -&g

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-04 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +21547 pull_request: https://github.com/python/cpython/pull/22546 ___ Python tracker <https://bugs.python.org/issue41

[issue33802] Regression in logging configuration

2020-10-03 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: -scoder ___ Python tracker <https://bugs.python.org/issue33802> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6721] Locks in the standard library should be sanitized on fork

2020-10-03 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: -scoder ___ Python tracker <https://bugs.python.org/issue6721> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33802] Regression in logging configuration

2020-10-03 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: -21521 ___ Python tracker <https://bugs.python.org/issue33802> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential)

2020-10-03 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: -scoder ___ Python tracker <https://bugs.python.org/issue36533> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6721] Locks in the standard library should be sanitized on fork

2020-10-03 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: -21519 ___ Python tracker <https://bugs.python.org/issue6721> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential)

2020-10-03 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: -21520 ___ Python tracker <https://bugs.python.org/issue36533> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33802] Regression in logging configuration

2020-10-03 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +scoder nosy_count: 9.0 -> 10.0 pull_requests: +21521 pull_request: https://github.com/python/cpython/pull/22474 ___ Python tracker <https://bugs.python.org/issu

[issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential)

2020-10-03 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +scoder nosy_count: 9.0 -> 10.0 pull_requests: +21520 pull_request: https://github.com/python/cpython/pull/22474 ___ Python tracker <https://bugs.python.org/issu

[issue6721] Locks in the standard library should be sanitized on fork

2020-10-03 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +scoder nosy_count: 29.0 -> 30.0 pull_requests: +21519 pull_request: https://github.com/python/cpython/pull/22474 ___ Python tracker <https://bugs.python.org/iss

[issue41900] XML C14N serialisation fails with default namespace

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

[issue41900] XML C14N serialisation fails with default namespace

2020-10-03 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset a0f2b664335eb689abdecc677e09a193f503af59 by Miss Skeleton (bot) in branch '3.9': bpo-41900: C14N 2.0 serialisation failed for unprefixed attributes when a default namespace was defined. (GH-22474) (GH-22507) https://github.com/python/cpython

[issue41900] XML C14N serialisation fails with default namespace

2020-10-03 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset cfed5343331350c5737b464970a31f7588319e8b by Miss Skeleton (bot) in branch '3.8': bpo-41900: C14N 2.0 serialisation failed for unprefixed attributes when a default namespace was defined. (GH-22474) (GH-22508) https://github.com/python/cpython

[issue41900] XML C14N serialisation fails with default namespace

2020-10-03 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 6a412c94b6b68e7e3632562dc7358a12ffd1447f by scoder in branch 'master': bpo-41900: C14N 2.0 serialisation failed for unprefixed attributes when a default namespace was defined. (GH-22474) https://github.com/python/cpython/commit

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-02 Thread Stefan Behnel
Change by Stefan Behnel : -- versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue41892> ___ ___ Python-bugs-list mailin

[issue41900] XML C14N serialisation fails with default namespace

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

[issue41900] XML C14N serialisation fails with default namespace

2020-10-01 Thread Stefan Behnel
New submission from Stefan Behnel : import xml.etree.ElementTree as ET xml=""" http://soap.sforce.com/2006/04/metadata;> """ print(ET.canonicalize(xml)) Fails with: ValueError: Namespace "" is not declared in scope when trying to build the QN

[issue31256] xml.etree.ElementTree: add support for doctype in tostring method

2020-10-01 Thread Stefan Behnel
Stefan Behnel added the comment: Yes, it fixed already. Thanks! -- nosy: +scoder resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41899] Poor example for Element.remove()

2020-10-01 Thread Stefan Behnel
Stefan Behnel added the comment: Closing as duplicate of issue 41891. Let's keep the discussion there. -- nosy: +scoder resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41899] Poor example for Element.remove()

2020-10-01 Thread Stefan Behnel
Change by Stefan Behnel : -- Removed message: https://bugs.python.org/msg377740 ___ Python tracker <https://bugs.python.org/issue41899> ___ ___ Python-bugs-list m

[issue41899] Poor example for Element.remove()

2020-10-01 Thread Stefan Behnel
Stefan Behnel added the comment: Closing as duplicate of issue 41892. Let's keep the discussion there. -- ___ Python tracker <https://bugs.python.org/issue41

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-09-30 Thread Stefan Behnel
Stefan Behnel added the comment: @WoodyWoo, you can (and should) do something like this: for ELEMchild in list(etroot): Modifying a container while iterating over it is usually not a good idea. The same applies to Python lists and dicts, for example. -- stage: patch review

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

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

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

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

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-09-30 Thread Stefan Behnel
Stefan Behnel added the comment: > That example is especially problematic. No, it's not. It uses .findall(), which returns a list. It's like when you make a copy of a list to iterate over, when you want to modify the original list in the loop. That could be made explicit in the t

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

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

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

2020-09-22 Thread Stefan Behnel
Stefan Behnel added the comment: FYI, https://github.com/cython/cython/pull/3427 has been merged into Cython. In Cython 3.0, compiled coroutines will disguise as non-compiled coroutines, from the PoV of asyncio. Restricting this ticket to Py3.10 since we're rather discussing a new feature

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

2020-09-20 Thread Stefan Behnel
Stefan Behnel added the comment: Closing again since GH-21528 has been merged in issue 41295. -- status: open -> closed ___ Python tracker <https://bugs.python.org/issu

[issue41756] Do not always use exceptions to return result from coroutine

2020-09-18 Thread Stefan Behnel
Stefan Behnel added the comment: BTW, just to give this a house number, I remember having measured a performance improvement of up to 70% at some point when switching from "generators always raise a StopIteration at the end" to "generators just return NULL" in Cython

[issue41756] Do not always use exceptions to return result from coroutine

2020-09-18 Thread Stefan Behnel
Stefan Behnel added the comment: I would also have preferred a more type specific function, but yeah, as long as the types for which the function would normally be used are special cased early enough in the implementation, it makes no big difference. Fine with me, too

[issue41756] Do not always use exceptions to return result from coroutine

2020-09-16 Thread Stefan Behnel
Stefan Behnel added the comment: I'm happy to see this moving forward. Not convinved of the "PyIter_Send()" name, though. I don't consider this part of the iterator protocol. It's specific to generators and coroutines. Cython would probably guard its usage by "P

[issue41756] Do not always use exceptions to return result from coroutine

2020-09-11 Thread Stefan Behnel
Stefan Behnel added the comment: Copying some of the design discussion from the PR here (https://github.com/python/cpython/pull/22196/files#r486730457), because it belongs into the ticket. Yury Selivanov proposed to add a new C-API function for this (naming changes by me): typedef

[issue41756] Do not always use exceptions to return result from coroutine

2020-09-11 Thread Stefan Behnel
Stefan Behnel added the comment: Big +1 from me, too, for the same reasons Yury gave. -- nosy: +scoder ___ Python tracker <https://bugs.python.org/issue41

[issue20198] xml.etree.ElementTree.ElementTree.write attribute sorting

2020-09-07 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue20198> ___ ___

[issue19483] Allow more low-level parser configuration in ElementTree

2020-09-07 Thread Stefan Behnel
Stefan Behnel added the comment: Changing subject to make it clear what this ticket is really about. -- title: Pure-Python ElementTree classes no longer available since 3.3 -> Allow more low-level parser configuration in ElementTree versions: +Python 3.10 -Python 3.3, Python

[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

[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 of XML

[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

[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). It i

[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 some compress

[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 <ht

[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

[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

[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/e28b8c93878072dc02b116108ef5443084290d47

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

2020-07-19 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 failu

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

2020-07-19 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: 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

[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
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: > intermediate base type "object" in the hierarchy Sorry, I meant an intermediate base type "B", which inherits its setattr from "object". -- ___ Python tracker &l

[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: 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-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-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://github.com/p

[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-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 tracker

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

2020-07-02 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-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-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 : -- keywords: +patch pull_requests: +20258 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21092 ___ Python tracker <https://bugs.python.org/issu

[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 fo

[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 why do

[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

[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

[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: 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 when

[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 failure

[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 n

[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

[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

[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

[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 ref-

[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: 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

[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/python/cpyt

[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 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/python/cpyt

[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 status

[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/python/cpyt

[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/python/cpyt

[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/301f0d4ff9b6bd60599eea0612904f65a92e6dd9

[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/301f0d4ff9b6bd60599eea0612904f65a92e6dd9

[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

[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/cpython/commit

[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/1e4fa91104a03c44baa241326102cbec42d387f1

[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/f7c4e236429606e1c982cacf24e10fc86ef4462f

[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-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

[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

  1   2   3   4   5   6   7   8   9   10   >