[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-27 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 59af59c2dfa52dcd5605185263f266a49ced934c by Erlend Egeberg Aasland in branch 'main': bpo-42972: Fully support GC for pyexpat, unicodedata, and dbm/gdbm heap types (GH-26376) https://github.com/python/cpython/commit

[issue43892] Make match patterns explicit in the AST

2021-04-29 Thread Nick Coghlan
Nick Coghlan added the comment: After the next docs build, the documentation for the explicit AST nodes should be available https://docs.python.org/dev/library/ast.html#pattern-matching -- resolution: -> fixed stage: commit review -> resolved status: open -&g

[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-04-27 Thread Nick Coghlan
Nick Coghlan added the comment: Another instance at https://github.com/python/cpython/pull/25585/checks?check_run_id=2447701034 I unlinked the previously linked PR, as that looked to be for bpo-43539 rather than this issue. -- nosy: +ncoghlan

[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-04-27 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: patch review -> needs patch ___ Python tracker <https://bugs.python.org/issue41682> ___ ___ Python-bugs-list mailing list Un

[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-04-27 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: -24157 ___ Python tracker <https://bugs.python.org/issue41682> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-04-27 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <https://bugs.python

[issue43892] Make match patterns explicit in the AST

2021-04-26 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: ncoghlan -> brandtbucher ___ Python tracker <https://bugs.python.org/issue43892> ___ ___ Python-bugs-list mailing list Un

[issue43892] Make match patterns explicit in the AST

2021-04-26 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: patch review -> commit review ___ Python tracker <https://bugs.python.org/issue43892> ___ ___ Python-bugs-list mai

[issue43892] Make match patterns explicit in the AST

2021-04-26 Thread Nick Coghlan
Nick Coghlan added the comment: PR is green now, and I don't have any further changes I want to make, so Brandt, please feel free to merge if you're happy with the proposed AST nodes, and the way I've gone about implementing them. If you'd like some adjustments, it probably makes the most

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: PR against the main repo is now up: https://github.com/python/cpython/pull/25585 A couple of things in the unparser tripped me up (ast_unparse.c only handles annotation expressions, the way ast._Unparser.visit() is defined means NodeVisitor.generic_visit

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +24305 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25585 ___ Python tracker <https://bugs.python.org/issu

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: Working on the unparser picked up an inconsistency I had previously missed: aside from named expressions, "target" attributes in the AST are generally full expression subnodes, rather than identifier attributes. Identifier attributes on nodes are

[issue43892] Make match patterns explicit in the AST

2021-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: Interesting idea - I had missed that you were suggested "identifier*" for the cls node. It's simple enough to check for Name-or-Attribute in the AST validator though, and sticking with a standard expr_ty node means getting a lot of standar

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: Setting clear timing expectations, given beta is so close: I'm not expecting to have time to finish the unparser work over the weekend, but I do expect to have time to finish it on Monday evening my time (UTC+10

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: https://github.com/ncoghlan/cpython/pull/9/commits/54940a3817df3046da3f9c51d4d426a73b2ec786 implements Brandt's suggestion of disallowing NULL keys in MatchMapping and instead passing in an explicit "rest" identifier to capture the extra keys.

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: To get the "0+0" matching case rejected again I had to flesh out a bit more of the AST validator. This initial piece of the validator replaces the previously pattern-matching-specific AST optimisation code that refused to fold BinOp expressions th

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: Segfaults are fixed (I had a couple of cases where I wasn't checking for NULL, and another where I was looking up MatchMapping attributes on a MatchClass node). test_patma passes except for test cases 240, 241, and 242, which look like genuine regressions

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: My proposed MatchConstant node name was bothering me, as most constants are actually matched by equality in MatchValue, the same way variables are. So I'm switching my proposed name for that node to be MatchSingleton, since that better reflects the key

[issue43892] Make match patterns explicit in the AST

2021-04-23 Thread Nick Coghlan
Nick Coghlan added the comment: I've removed the "?" from the end attributes for pattern nodes. The draft PR branch now compiles, but I've clearly made a mistake somewhere as it segfaults when trying to compile test_patma.py. --

[issue43897] Implement support for validation of pattern matching ASTs

2021-04-22 Thread Nick Coghlan
Change by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <https://bugs.python.org/issue43897> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43897] Implement support for validation of pattern matching ASTs

2021-04-22 Thread Nick Coghlan
Change by Nick Coghlan : -- priority: normal -> critical ___ Python tracker <https://bugs.python.org/issue43897> ___ ___ Python-bugs-list mailing list Un

[issue43892] Make match patterns explicit in the AST

2021-04-22 Thread Nick Coghlan
Nick Coghlan added the comment: The draft PR moved because I messed up the previous branch name: https://github.com/ncoghlan/cpython/pull/9/files It's to the point where everything except symtable.c compiles. I put an initial skeleton of a validator in, but only enough to check

[issue43892] Make match patterns explicit in the AST

2021-04-22 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: patch review -> needs patch ___ Python tracker <https://bugs.python.org/issue43892> ___ ___ Python-bugs-list mailing list Un

[issue43892] Make match patterns explicit in the AST

2021-04-22 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +24241 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25521 ___ Python tracker <https://bugs.python.org/issu

[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: https://www.python.org/dev/peps/pep-0642/#representing-patterns-explicitly-in-the-abstract-syntax-tree covers the rationale for why it is potentially problematic to reuse expression nodes for match patterns: it doesn't semantically align with the fact

[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: It's specifically the definition of "match_case" in the AST that is affected: match_case = (pattern pattern, expr? guard, stmt* body) pattern = MatchAlways | MatchValue(expr value) | MatchConstant(constant value) | Mat

[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: Agreed. I had wanted the AST to be part of the PEPs specifically *because* it's a public API, but didn't check until today whether or not the original PEP 634 implementation had been merged as-is, or with a cleaned up AST definition. https://github.com

[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan
New submission from Nick Coghlan : In the SC submission ticket for PEP 642 (https://github.com/python/steering-council/issues/43 ), Guido indicated he was in favour of the more explicit pattern matching AST changes suggested in that PEP. This ticket covers adapting the pattern matching

[issue43133] Accept file mode "rw" to open-or-create a file and seek to the start

2021-02-04 Thread Nick Coghlan
New submission from Nick Coghlan : After yet again trying to use "rw" to open a file in read/write mode, having it fail, and then having to look up the docs to remind myself that the correct spelling is "r+", I'm finally filing this to suggest we make the obvious "rw

[issue42783] asyncio.sleep(0) idiom is not documented

2021-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: I merged the update to the 3.10 docs, but the automated backport to 3.9 to update the online docs failed. -- resolution: -> fixed stage: patch review -> backport needed versions: +Python 3.10, Python 3.9 ___

[issue42783] asyncio.sleep(0) idiom is not documented

2021-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 5c30145afb6053998e3518befff638d207047f00 by Simon Willison in branch 'master': bpo-42783: Documentation for asyncio.sleep(0) (#24002) https://github.com/python/cpython/commit/5c30145afb6053998e3518befff638d207047f00 -- nosy: +ncoghlan

[issue42455] Add decorator_factory function to functools module

2021-01-05 Thread Nick Coghlan
Nick Coghlan added the comment: Sorry, I meant to include this comment as well: The other filter I applied here was "Could someone figure out the boilerplate code themselves in less time than it would take them to find, read, and understand the documentation for the new helper fun

[issue42455] Add decorator_factory function to functools module

2021-01-05 Thread Nick Coghlan
Nick Coghlan added the comment: I think the idea is a plausible and well-presented suggestion, but I'm afraid I'm still going to agree with the view that we shouldn't add this. >From a maintainability point of view, *generically* detecting the difference >between "appl

[issue33944] Deprecate and remove code execution in pth files

2020-12-31 Thread Nick Coghlan
Nick Coghlan added the comment: PEP 648 has been posted with a proposal to migrate sitecustomize.py, usersitecustomize.py and arbitrary code execution in pth files to a directory based `__sitecustomize__` structure: https://www.python.org/dev/peps/pep-0648

[issue42642] logging: add high priority log level for warnings being cleared

2020-12-14 Thread Nick Coghlan
New submission from Nick Coghlan : When using the logging module for long running services, there's one limitation of the predefined logging levels that I semi-regularly run into: the only entirely reliable log level for reporting that a WARNING state has been cleared is itself WARNING

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-14 Thread Nick Coghlan
Change by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <https://bugs.python.org/issue42260> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> fixed status: open -> closed ___ Python tracker <https://bugs.python.org/issue42282> ___ ___ Python-bugs-list

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: Since this was only a performance issue, I'm not planning to backport it to earlier releases. -- stage: patch review -> resolved ___ Python tracker <https://bugs.python.org/issu

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 8805a4dad201473599416b2c265802b8885f69b8 by Nick Coghlan in branch 'master': bpo-42282: Fold constants inside named expressions (GH-23190) https://github.com/python/cpython/commit/8805a4dad201473599416b2c265802b8885f69b8

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +22093 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23190 ___ Python tracker <https://bugs.python.org/issu

[issue42282] Constant folding is skipped in named expressions

2020-11-07 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker <https://bugs.python.org/issue42282> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue42282] Constant folding is skipped in named expressions

2020-11-06 Thread Nick Coghlan
New submission from Nick Coghlan : While working on the PEP 642 reference implementation I removed the "default:" case from the switch statement in astfold_expr as part of making sure the new SkippedBinding node was being handled everywhere it needed to be. This change

[issue40952] GCC overflow warnings (format-overflow, stringop-overflow)

2020-11-06 Thread Nick Coghlan
Nick Coghlan added the comment: I *think* the lnotab one is the compiler failing to detect that the pointer has been updated to point inside the body of a Python object, but I'm also not 100% sure that it's a false alarm. -- nosy: +ncoghlan

[issue42186] unittest overrides more serious warnings filter added before unittest.main()

2020-10-30 Thread Nick Coghlan
Nick Coghlan added the comment: Closing the old one as partially fixed, and linking here as a superseder makes sense to me, so I went ahead and did that. -- ___ Python tracker <https://bugs.python.org/issue42

[issue15626] unittest.main negates -bb option and programmatic warning configuration

2020-10-30 Thread Nick Coghlan
Nick Coghlan added the comment: Issue #42186 now covers the request to have a way to tell unittest to leave the warnings filter alone even if it's set programmatically rather than by modifying ``sys.warnoptions``. (Changing version to 3.7 to indicate when the interaction with `-bb

[issue15626] unittest.main negates -bb option and programmatic warning configuration

2020-10-30 Thread Nick Coghlan
Change by Nick Coghlan : -- superseder: -> unittest overrides more serious warnings filter added before unittest.main() ___ Python tracker <https://bugs.python.org/issu

[issue32002] test_c_locale_coercion fails when the default LC_CTYPE != "C"

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Removing issue assignment, as I'm no longer actively investigating this. -- assignee: ncoghlan -> ___ Python tracker <https://bugs.python.org/issu

[issue30672] PEP 538: Unexpected locale behaviour on *BSD (including Mac OS X)

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Removing issue assignment, as I'm not actively investigating this. -- assignee: ncoghlan -> ___ Python tracker <https://bugs.python.org/issu

[issue34206] Move and clarify Py_Main documentation

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Added 3.8 back in to the target versions. However, if the automatic backport doesn't work for that branch, I'll probably skip it rather than fixing any conflicts. -- versions: +Python 3.8 ___ Python tracker <ht

[issue34206] Move and clarify Py_Main documentation

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Adjusted target versions, as I never previously got around to merging this PR. -- versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue34

[issue31898] Add a `recommended-packages.txt` file

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Removing the issue assignment, as I'm not actively working on this (although I still think it's a reasonable idea). -- assignee: ncoghlan -> ___ Python tracker <https://bugs.python.org/issu

[issue31899] Ensure backwards compatibility with recommended packages

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Removing the issue assignment, as I'm not actively working on this (although I still think it's a reasonable idea). -- assignee: ncoghlan -> ___ Python tracker <https://bugs.python.org/issu

[issue17490] Improve ast.literal_eval test suite coverage

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Belatedly removing the issue assignment here, as I'm not actively working on this. I've also marked this as an easy newcomer friendly task, as all that's involved is taking the `test_ast.py` changes from https://bugs.python.org/file29520

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Belatedly clearing the issue assignment here - while I do still sometimes ponder this problem, I haven't been actively working on it since the 2017 core sprint where Greg & I made our last serious attempt at trying to improve the situation. Mark'

[issue24048] remove_module() needs to save/restore exception state

2020-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Belatedly marking this as resolved. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34820] binascii.c:1578:1: error: the control flow of function ‘binascii_crc32’ does not match its profile data (counter ‘arcs’)

2020-06-17 Thread Nick Coghlan
Nick Coghlan added the comment: I'm seeing this as well when attempting to run an optimised Python 3.8 build on an old Debian 9 system (with the curses and socket extension modules). For example: cpython/Modules/socketmodule.c: In function ‘PyInit__socket’: cpython/Modules/socketmodule.c

[issue33944] Deprecate and remove code execution in pth files

2020-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: While it's still not entirely accurate, I've tweaked the title on the issue to refer to the arbitrary code execution behavior. Getting "Make pth file sys.path modifications easier to debug" in there as well would be rat

[issue33944] Deprecate and remove code execution in pth files

2020-05-12 Thread Nick Coghlan
Change by Nick Coghlan : -- title: Deprecate and remove pth files -> Deprecate and remove code execution in pth files ___ Python tracker <https://bugs.python.org/issu

[issue28180] Implementation of the PEP 538: coerce C locale to C.utf-8

2020-03-22 Thread Nick Coghlan
Nick Coghlan added the comment: The test cases for locale coercion *not* triggering still assume that bpo-19977, using surrogateescape on the standard streams in the POSIX locale, has been implemented (since that was implemented in Python 3.5). Hence the various test cases complaining

[issue39976] Add "**other_popen_kwargs" to subprocess API signatures in docs

2020-03-16 Thread Nick Coghlan
New submission from Nick Coghlan : Two of my colleagues missed the "The arguments shown above are merely the most common ones, ..." caveat on the subprocess.run documentation, and assumed that Python 3.5 only supported the "cwd" option in the low level Popen API, and no

[issue39892] Enable DeprecationWarnings by default when not explicit in unittest.main()

2020-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: Issue 10535 says they should already be on by default in unittest. I seem to recall checking that was still true when implementing the default warning filter changes in 3.7. -- ___ Python tracker <ht

[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-15 Thread Nick Coghlan
Nick Coghlan added the comment: Petr's point that any subclass state should be managed in the subclass cleanup functions is a good one, so I withdraw my concern: * custom module subclasses should clean up like any other class instance * the module slots are then only needed if the module

[issue39725] unrelated `from None` exceptions hide prior exception information

2020-03-15 Thread Nick Coghlan
Nick Coghlan added the comment: Tweaked title to be "hide" rather "lose" (all the info is theoretically still there in various places, it's just hidden by the default traceback printing machinery, and hard to extract from the exception tree). Issue #18861 is

[issue34822] Simplify AST for slices

2020-03-07 Thread Nick Coghlan
Nick Coghlan added the comment: The one thing in the PR that makes me slightly wary is the point Vedran raised: in the old AST _Unparser code, the fact that index tuples containing slices should be printed without parentheses was encapsulated in the ExtSlice node type, but with Index

[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-07 Thread Nick Coghlan
Nick Coghlan added the comment: One of the intended use cases for Py_mod_create is to return instances of ModuleType subclasses rather than straight ModuleType instances. And those are definitely legal to define: >>> import __main__ >>> class MyModule(type(__main__)

[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-02-08 Thread Nick Coghlan
Nick Coghlan added the comment: As Petr notes, as long as all subinterpreters share the GIL, and share str instances, then the existing _Py_IDENTIFIER mechanism will work fine for both single phase and multi-phase initialisation. However, that constraint also goes the other way: as long

[issue39487] Merge duplicated _Py_IDENTIFIER identifiers in C code

2020-01-29 Thread Nick Coghlan
Nick Coghlan added the comment: In the subinterpreter context: perhaps it would make sense to move *all* Py_IDENTIFIER declarations to file scope? That would make it much clearer which of our extension modules actually have hidden state for caching purposes. If we did that though, we'd

[issue39487] Merge duplicated _Py_IDENTIFIER identifiers in C code

2020-01-29 Thread Nick Coghlan
Nick Coghlan added the comment: My apologies, my comment above was based on an outdated understanding of how the identifier structs get initialised (it's the usage that initialises them, not the declaration). That means this is a useful refactoring to help identify blockers to full

[issue39487] Merge duplicated _Py_IDENTIFIER identifiers in C code

2020-01-29 Thread Nick Coghlan
Nick Coghlan added the comment: We can't make this change, as it means the statics get initialised before the Python interpreter has been initialised, and won't be reinitialised if the interpreter is destroyed and recreated. -- nosy: +ncoghlan resolution: -> rejected stage: pa

[issue39153] Clarify refcounting semantics of PyDict_SetItem[String]

2020-01-29 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset e1e80002e28e1055f399a20918c49d50d093709e by Joannah Nanjekye in branch 'master': bpo-39153: Clarify C API *SetItem refcounting semantics (GH-18220) https://github.com/python/cpython/commit/e1e80002e28e1055f399a20918c49d50d093709e

[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-01-27 Thread Nick Coghlan
Change by Nick Coghlan : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue39465> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-01-27 Thread Nick Coghlan
New submission from Nick Coghlan : Both https://github.com/python/cpython/pull/18066 (collections module) and https://github.com/python/cpython/pull/18032 (asyncio module) ran into the problem where porting them to multi-phase initialisation involves replacing their usage

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-01-20 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 1e420f849d0c094098543d2c27d35eaec69b2784 by Nick Coghlan in branch 'master': bpo-35134: Migrate frameobject.h contents to cpython/frameobject.h (GH-18052) https://github.com/python/cpython/commit/1e420f849d0c094098543d2c27d35eaec69b2784

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2020-01-20 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +17475 pull_request: https://github.com/python/cpython/pull/18052 ___ Python tracker <https://bugs.python.org/issue35

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2020-01-18 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +17447 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18052 ___ Python tracker <https://bugs.python.org/issu

[issue39048] Change the lookup order of __aenter__ and __aexit__ for async with

2020-01-14 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> fixed stage: -> resolved status: open -> closed type: behavior -> enhancement versions: -Python 3.8 ___ Python tracker <https://bugs.python

[issue39048] Change the lookup order of __aenter__ and __aexit__ for async with

2020-01-14 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 1d1b97ae643dd8b22d87785ed7bd2599c6c8dc8d by Nick Coghlan (Géry Ogam) in branch 'master': bpo-39048: Look up __aenter__ before __aexit__ in async with (GH-17609) https://github.com/python/cpython/commit/1d1b97ae643dd8b22d87785ed7bd2599c6c8dc8d

[issue39301] Specification of bitshift on integers should clearly state floor division used

2020-01-11 Thread Nick Coghlan
Nick Coghlan added the comment: Aye, adding "floor" to the existing footnote would be the minimal fix. I'm just wondering whether it's also worth stating that this means that positive integers saturate at zero, while negative integers satu

[issue26515] Update extending/embedding docs to new way to build modules in C

2020-01-11 Thread Nick Coghlan
Nick Coghlan added the comment: Changed target version as per Petr's comment (PEP 573 is close to being accepted for 3.9 - it just needs some editing to improve clarity in the PEP itself, rather than needing any changes to the technical proposal) -- versions: +Python 3.9 -Python 3.6

[issue39302] Language reference does not clearly describe modern operand coercion

2020-01-11 Thread Nick Coghlan
New submission from Nick Coghlan : While reviewing ISO-IECJTC1-SC22-WG23's latest draft of their Python security annex, I found a description of operand coercion that was based on the legacy coercion model described at https://docs.python.org/2.5/ref/coercion-rules.html That's still

[issue39301] Specification of bitshift on integers should clearly state floor division used

2020-01-10 Thread Nick Coghlan
New submission from Nick Coghlan : While reviewing ISO-IECJTC1-SC22-WG23's latest draft of their Python security annex, I noticed that https://docs.python.org/3.7/library/stdtypes.html#bitwise-operations-on-integer-types doesn't explicitly state that *floor* division is used for right shift

[issue37194] Move new vector private declarations to the internal C API

2020-01-07 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: -17306 ___ Python tracker <https://bugs.python.org/issue37194> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36476] Runtime finalization assumes all other threads have exited.

2019-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: Thinking about that idea further, I don't think that change would help much, since the relevant operations should already be checking for thread termination when they attempt to reacquire the GIL. That means what we're missing is: 1. When daemon threads

[issue36476] Runtime finalization assumes all other threads have exited.

2019-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: Perhaps we need a threading.throw() API, similar to the one we have for generators and coroutines? If we had that, then Py_FinalizeEx() could gain a few new features: * throw SystemExit into all daemon threads and then give them a chance to terminate before

[issue20443] __code__. co_filename should always be an absolute path

2019-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: With the sys.argv[0] change reverted, I think this overall issue is fixed now - code objects will get absolute paths, while sys.argv[0] will continue to reflect how __main__ was identified. -- priority: -> normal resolution: -> fixed stage:

[issue39037] Fix the trial order of the __exit__ and __enter__ methods in the with statement documentation

2019-12-29 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 226e6e7d4326cf91ef37e13528eb1f62de1bb832 by Nick Coghlan (Géry Ogam) in branch 'master': bpo-39037: Fix lookup order of magic methods in with statement documentation (GH-17608) https://github.com/python/cpython/commit

[issue39161] Py_NewInterpreter docs need updating for multi-phase initialization

2019-12-29 Thread Nick Coghlan
New submission from Nick Coghlan : The Py_NewInterpreter docs only cover the behaviour of extension modules that use single-phase initialization: https://docs.python.org/3/c-api/init.html#c.Py_NewInterpreter Multi-phase initialization allows each subinterpreter to get its own copy

[issue39153] Clarify refcounting semantics of PyDict_SetItem[String]

2019-12-29 Thread Nick Coghlan
Nick Coghlan added the comment: Right, that's why I don't think the other "*SetItem*" operations should get a Sphinx note - just a sentence, as was already done for PySequence_SetItem. If it weren't for PyList_SetItem being different, none of the others would need the clarificat

[issue39153] Clarify refcounting semantics of PyDict_SetItem[String]

2019-12-29 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> needs patch type: -> enhancement versions: +Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.or

[issue39153] Clarify refcounting semantics of PyDict_SetItem[String]

2019-12-29 Thread Nick Coghlan
New submission from Nick Coghlan : The documentation for PyList_SetItem is explicit that it steals a reference to the passed in value, and drops the reference for any existing entry: https://docs.python.org/3.3/c-api/list.html?highlight=m#PyList_SetItem The documentation for PyDict_SetItem

[issue39033] zipimport raises NameError: name '_boostrap_external' is not defined

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 79f02fee1a542c440fd906fd54154c73fc0f8235 by Nick Coghlan (Xtreak) in branch 'master': bpo-39033: Fix NameError in zipimport during hash validation (GH-17588) https://github.com/python/cpython/commit/79f02fee1a542c440fd906fd54154c73fc0f8235

[issue38021] Modify AIX platform_tag so it provides PEP425 needs

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for your patience Michael! I made some cosmetic changes to the error handling logic that you may want to include in the PyPA patches. (I'd intended to make it so that a malformed build date resulted in the "Unknown" "9898" build dat

[issue38021] Modify AIX platform_tag so it provides PEP425 needs

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 39afa2d3147e4b05a1161cc90dbf09b95072c2bb by Nick Coghlan (Michael Felt) in branch 'master': bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303) https://github.com/python/cpython/commit/39afa2d3147e4b05a1161cc90dbf09b95072c2bb

[issue37292] _xxsubinterpreters: Can't unpickle objects defined in __main__

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: There's a reason multiprocessing in spawn mode jumps through the hoops that it does: it's the only way to get __main__ pickling to work when you're not forking the entire process. You also don't want to naively re-run __main__ in the subprocess for the same

[issue36375] PEP 499 implementation: "python -m foo" binds the main module as both __main__ and foo in sys.modules

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: Leaving the relationship between pickle and __name__ alone wasn't an oversight, as folks already rely on that to gracefully transition from single-file modules to multi-file packages without breaking pickle compatibility in either direction. The trick

[issue39037] Fix the trial order of the __exit__ and __enter__ methods in the with statement documentation

2019-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: It's a matter of historical timing: PEP 343 was written before try/except/finally was allowed, when try/finally and try/except were still distinct statements. However, PEP 341 was *also* accepted and implemented for Python 2.5, allowing for the modern try

[issue38021] Modify AIX platform_tag so it provides PEP425 needs

2019-12-08 Thread Nick Coghlan
Nick Coghlan added the comment: There's a compatibility problem with changing the AIX distutils platform prefix from aix to AIX: any existing code that does "distutils.get_platform().startswith('aix')" will break. (There isn't any code in the standard library that does that, it

[issue38021] Modify AIX platform_tag so it provides PEP425 needs

2019-12-08 Thread Nick Coghlan
Nick Coghlan added the comment: Removing 3.9 from the target versions, as similar to other platform tag improvements, emulation on older release versions will be the domain of cross-version libraries, rather than changing the standard library in a maintenance. -- versions: -Python

[issue38021] pep425 tag for AIX is inadequate

2019-11-23 Thread Nick Coghlan
Nick Coghlan added the comment: For folks that aren't aware, Michael and I have been discussing the AIX package tagging problem via email since his initial distutils-sig posts about it. It's genuinely murky as fixing the AIX problem doesn't *technically* require any PEP 425 changes

[issue36375] PEP 499 implementation: "python -m foo" binds the main module as both __main__ and foo in sys.modules

2019-11-12 Thread Nick Coghlan
Nick Coghlan added the comment: [Belatedly updating this issue with the current status as of March] Cameron's implementation generally looks good, but there are couple of compatibility/migration questions that we need to consider, as spelled out in the PEP update that added me as BDFL

  1   2   3   4   5   6   7   8   9   10   >