[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-02 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-02 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-02 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-02 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-02 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/pyth

[issue41900] XML C14N serialisation fails with default namespace

2020-10-02 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/pyth

[issue41900] XML C14N serialisation fails with default namespace

2020-10-02 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/cpyt

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

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

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

[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

[Python-ideas] Re: PEP 637 - support for indexing with keyword arguments

2020-09-29 Thread Stefan Behnel
Salve Stefano, Stefano Borini schrieb am 23.09.20 um 22:55: > "Support for indexing with keyword arguments" has now been merged with > the assigned PEP number 637. Cool, this looks like a great addition to the language! One thing that I'm missing from the PEP is the C side of things, though. How

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

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

Re: [lxml] A strip_tags question

2020-09-14 Thread Stefan Behnel
Hi Martin, Martin Mueller schrieb am 14.09.20 um 22:50: > I have texts that are linguistically and every token is wrapped in a or > element, like so: > > > and > therein > take > delight > : > > > I'd like to strip the annotation and generate a plain file

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

[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

Re: [lxml] Using iterparse with a parser

2020-09-04 Thread Stefan Behnel
Ryan Gentner schrieb am 04.09.20 um 18:22: > I am trying to use iterparse() in lieu of parse(). According to the > documentation, parse() can employ a parser, whereas iterparse() leaves no > option for this. > > I have xml files using utf-8 characters and latin1 encoded characters. > > How can I

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

[Python-ideas] Re: Accelerate zlib and gzip libraries with Intel's Storage Acceleration Libraries

2020-08-17 Thread Stefan Behnel
Steven D'Aprano schrieb am 17.08.20 um 17:00: > On Mon, Aug 17, 2020 at 04:08:54PM +0200, Stefan Behnel wrote: > >> I re-opened the ticket to allow for some discussion over there in order to >> understand the implications better. But I agree that a third-party package >&

[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

[Python-ideas] Re: Accelerate zlib and gzip libraries with Intel's Storage Acceleration Libraries

2020-08-17 Thread Stefan Behnel
Antoine Pitrou schrieb am 17.08.20 um 15:00: > On Mon, 17 Aug 2020 08:49:23 - > "Ruben Vorderman" wrote: >> Dear python developers, >> >> As a bioinformatician I work a lot with gzip-compressed data. Recently I >> discovered Intel's Storage Acceleration Libraries at >> https://github.com/inte

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

[Python-ideas] Re: Tracebacks for C code in Python

2020-08-16 Thread Stefan Behnel
Ram Rachum schrieb am 15.08.20 um 21:08: > Here's something that's been bugging me for years. I'll suggest something, > but since I'm a total newbie about this area, it's possible that everything > I'm saying is impossible or doesn't make sense. > > I'm working with some Pandas code now, and there

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

Re: [lxml] XPointer function support?

2020-08-04 Thread Stefan Behnel
C. Fan Du schrieb am 03.08.20 um 03:04: > I have been an lxml user but not a veteran. It seems to me that currently > lxml does not support XPointer functions such as string-range() or > range-to(). Have I missed anything? Thanks for your help! lxml does not currently wrap the XPointer API of libx

Re: [Cython] Infer types and array.pxd

2020-08-02 Thread Stefan Behnel
Am 2. August 2020 17:02:39 MESZ schrieb da-woods: > I'm not convinced that compiler directives like "infer_types" should > propagate into the cimported files at all. > > It seems reasonable to me that these should be controlled by the author > of the pxd file, not by the eventual cimporter. I agr

Re: [Cython] Infer types and array.pxd

2020-08-02 Thread Stefan Behnel
Oliver Haas schrieb am 02.08.20 um 13:44: > The array.pxd ( > https://github.com/cython/cython/blob/master/Cython/Includes/cpython/array.pxd) > requires infer_types = True when cimported. Is there a reason not to > explicitly type the variable op as array in the lines 134 and 141? The return type

Re: [lxml] lxml.etree.iterparse schema validation does not validate

2020-07-28 Thread Stefan Behnel
Kai Hillmann schrieb am 28.07.20 um 10:58: > I'm not sure whether I use the iterparse interface correctly but I did a > look inside the tests for it (src/lxml/tests/test_xmlschema.py) and > found out that the validation results of iterparse provided with a > schema and schema.validate or schema.ass

Re: [lxml] Interpretation of AssertionError

2020-07-28 Thread Stefan Behnel
Hi, Per schrieb am 27.07.20 um 13:01: > lxml seems to raise AssertionErrors quite often. How should they be > interpreted? My understanding is that AssertionErrors in general should be > interpreted as "this thing that shouldn't happen just happened", i.e. > basically a bug rather than an error th

[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

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

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

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

[Python-Dev] Re: PEP 620: Hide implementation details from the C API

2020-07-02 Thread Stefan Behnel
Victor Stinner schrieb am 02.07.20 um 00:07: > Le mer. 1 juil. 2020 à 23:43, Eric V. Smith a écrit : >> >> On 7/1/2020 3:43 PM, Stefan Behnel wrote: >>> Petr Viktorin schrieb am 30.06.20 um 14:51: >>>> For example, could we only deprecate the bad parts

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

[Python-Dev] Re: PEP 620: Hide implementation details from the C API

2020-07-01 Thread Stefan Behnel
Petr Viktorin schrieb am 30.06.20 um 14:51: > For example, could we only deprecate the bad parts, but not remove them > until the experiments actually show that they are preventing a beneficial > change? Big nod on this one. Stefan ___ Python-Dev mailin

[Python-Dev] Re: PEP 620: Hide implementation details from the C API

2020-06-26 Thread Stefan Behnel
Victor Stinner schrieb am 26.06.20 um 14:39: > Well, the general problem is to track when the caller ends using a resource. Although that is less of a problem if you only allow exposing the internal data representation and nothing else. In that case, you can tie the lifetime of the data access to

[Python-Dev] Re: PEP 620: Hide implementation details from the C API

2020-06-24 Thread Stefan Behnel
Gustavo Carneiro schrieb am 24.06.20 um 19:19: > On Wed, 24 Jun 2020 at 17:22, Victor Stinner wrote: >> The question becomes: how to promote the limited C API? Should it >> become the default, rather than an opt-in option? > > It would be interesting to find out what is the performance impact of u

[Python-Dev] Re: PEP 620: Hide implementation details from the C API

2020-06-24 Thread Stefan Behnel
Victor Stinner schrieb am 24.06.20 um 17:40: > My practical problem is how to prevent C extensions accessing the > PyFloatObject.ob_fval member directly. Do extensions really do that in their code? I mean, there *is* a macro for doing exactly this thing, which suggests that users should exactly *n

[Python-Dev] Re: PEP 620: Hide implementation details from the C API

2020-06-24 Thread Stefan Behnel
Victor Stinner schrieb am 24.06.20 um 02:14: > Le mar. 23 juin 2020 à 16:56, Stefan Behnel a écrit : >>> Members of ``PyObject`` and ``PyTupleObject`` structures have not >>> changed since the "Initial revision" commit (1990) >> >> While I see an

[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

[Python-Dev] Re: PEP 620: Hide implementation details from the C API

2020-06-23 Thread Stefan Behnel
Hi Victor, thanks for your continued work on improving the C-API. I'll comment on the PEP inline. Victor Stinner schrieb am 22.06.20 um 14:10: > PEP available at: https://www.python.org/dev/peps/pep-0620/ > [...] > Motivation > == > > The C API blocks CPython evolutions > --

[Python-Dev] Re: (PEP 620) C API for efficient loop iterating on a sequence of PyObject** or other C types

2020-06-23 Thread Stefan Behnel
Victor Stinner schrieb am 23.06.20 um 11:18: > Maybe an object can > generate a temporary PyObject** view which requires to allocate > resources (like memory) and the release function would release these > resources. I agree that this is more explicit when it comes to resource management, but ther

[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

[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

[Python-Dev] Re: Cython and incompatible C API changes

2020-06-22 Thread Stefan Behnel
Victor Stinner schrieb am 17.06.20 um 13:25: > Le mer. 17 juin 2020 à 12:38, Petr Viktorin a écrit : >>> There is an ongoing discussion about always requiring to run Cython >>> when installing a C extension which uses Cython. >> >> Do you have a link to that discussion? Yeah, I was wondering, too.

[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

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

[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

[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

[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

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

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

Re: [lxml] Is the serialisation of elements with a present but empty `text` reliable / guaranteed?

2020-06-09 Thread Stefan Behnel
Xavier Morel schrieb am 09.06.20 um 08:24: > Specifically, that lxml currently treats a text of `None` and a text of an > empty string differently, and only creates a self-closing element in the > former case: > > >>> e = etree.Element('foo') > >>> etree.tostring(e, encoding='unicode') > '' > >>>

[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

[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

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

[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

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