[issue31506] Improve the error message logic for object_new & object_init

2017-12-09 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the feedback and updates folks! If we decide to make any further changes, I think they will be best handled as a new issue :) -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue24991] Define instance mutability explicitly on type objects?

2017-12-09 Thread Nick Coghlan
Nick Coghlan added the comment: I updated some of the issue metadata and added a question mark to the issue title to help make it clearer that this would require a PEP level conceptual enhancement to the language, rather than being about documenting an existing concept. PEP 557's

[issue32225] Implement PEP 562: module __getattr__ and __dir__

2017-12-09 Thread Nick Coghlan
Change by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker <https://bugs.python.org/issue32225> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32225] Implement PEP 562: module __getattr__ and __dir__

2017-12-09 Thread Nick Coghlan
New submission from Nick Coghlan : For documentation of this feature, I'd suggest adding a new subsection after https://docs.python.org/3/reference/datamodel.html#customizing-attribute-access (but at the same level), called "Customizing module attribute access". That can then

[issue27505] Missing documentation for setting module __class__ attribute

2017-12-09 Thread Nick Coghlan
Nick Coghlan added the comment: This is still a valid docs issue, although PEP 562's module __getattr__ and __dir__ will provide a simpler alternative for most of the cases that previously required setting the __class__ attribute: https://www.python.org/dev/peps/pep-0562/ So I

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

2017-12-16 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 9c19b020249c451891affd81751947321a1e6957 by Nick Coghlan in branch 'master': bpo-32002: Refactor C locale coercion tests (GH-4369) https://github.com/python/cpython/commit/9c19b020249c451891affd81751947

[issue32145] Wrong ExitStack Callback recipe

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: Regarding super().__init__(): I added ExitStack to contextlib2 first, so I was thinking in the Py2/3 compatible subset when I wrote the original docs. We can freely change that for the standard library recipes. Regarding the "how to create a copy"

[issue24991] Define instance mutability explicitly on type objects?

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: Declaring "I intend for instances of this class to be immutable" isn't a fuzzy concept - it's in the same vein as other type hints, like "I intend for this to be a string". The part that's fuzzy is how well Python actually en

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: When executing a sys.path entry, you're executing that *entire* entry (whether it's a directory or zipfile). This isn't a bug, and it isn't in conflict with the assurances offered by isolated mode (it would only be a problem if running

[issue32324] [Security] "python3 directory" inserts "directory" at sys.path[0] even in isolated mode

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: (However, the behaviour Steve is describing suggests that sys.path[0] initialisation may have problems on Windows that the test suite isn't picking up - "-I" should *not* add the script directory to the path, and directory execution shoul

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: Yep, the requirement for supporting multiple interpreters is just that you either avoid relying on C global state entirely, or else correctly synchronise access to it. Multi-phase initialisation just provides a few nudges in the direction of doing that more

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-25 Thread Nick Coghlan
Nick Coghlan added the comment: _PyCoreConfig.ignore_environment was part of the initial PEP 432 implementation that I wrote. It's that due to the design goal that once the refactoring is complete, an embedding application should be able to control *all* the settings through the c

[issue32445] Skip creating redundant wrapper functions in ExitStack.callback

2017-12-29 Thread Nick Coghlan
New submission from Nick Coghlan : While discussing https://bugs.python.org/issue32145, I noticed that ExitStack.callback *always* adds a wrapper function, even when the `args` and `kwds` parameters are both empty. For plain callbacks that aren't receiving any extra arguments, it wou

[issue32145] Wrong ExitStack Callback recipe

2017-12-29 Thread Nick Coghlan
Nick Coghlan added the comment: I'm not clear on what you mean about allowing arbitrary names for the instance creation function - at that point we're back to subclasses not being able to use the default `pop_all()` implementation at all, and needing to duplicate the state transfe

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-29 Thread Nick Coghlan
Nick Coghlan added the comment: Another point in favour of the JSR approach is that it should make it easier for tools like coverage.py to continue mapping opcode coverage to line coverage. I also like Serhiy's proposed strategy of separating the initial introduction of the compiler

[issue10381] Add timezone support to datetime C API

2017-12-29 Thread Nick Coghlan
Nick Coghlan added the comment: Would it be possible to deprecate (or at least stop enhancing) the current datetime C API and add a new capsule based one instead? We're trying to get extension module authors to *stop* relying on C level globals, since it causes problems with: - memory

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-12-29 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker <https://bugs.python.org/issue31975> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-12-29 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +4929 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue10381] Add timezone support to datetime C API

2017-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: On 31 December 2017 at 01:34, Paul Ganssle wrote: > That said, I think it would be really good if we could get a fast path for > timezone creation and access to the UTC singleton into the Python 3.7 > release. I think it's kind of a big dispari

[issue10381] Add timezone support to datetime C API

2017-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: https://bugs.python.org/issue32459 covers defining a module-reloading-friendly way of using capsules. For this issue, I now think it makes sense to just ignore that problem, and add whatever you need to the existing API

[issue32459] Capsule API usage docs are incompatible with module reloading (etc)

2017-12-30 Thread Nick Coghlan
New submission from Nick Coghlan : After commenting [1] on the fact that the current datetime module C API [2] is problematic due to its reliance on C level global variables, I discovered that this is actually the outcome of our recommended approach to using capsules to export a C API as

[issue32145] Wrong ExitStack Callback recipe

2018-01-01 Thread Nick Coghlan
Nick Coghlan added the comment: As per the comment at https://bugs.python.org/issue32445#msg309356, there's a bug in my suggested changes to `ExitStack.pop_all()`: the right method to call is ExitStack.push(), *not* ExitStack.callback() (the latter adds a wrapper function to mak

[issue32445] Skip creating redundant wrapper functions in ExitStack.callback

2018-01-01 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, you're right, I wasn't thinking clearly when I filed this - the correct public API method to transfer existing exit stack entries to a new stack would be "ExitStack.push()". I'll make a note of that on the original issue. ---

[issue32479] inconsistent ImportError message executing same import statement

2018-01-02 Thread Nick Coghlan
Nick Coghlan added the comment: Since the problem is specific to Python 2.7 and has been resolved in the importlib based import implementation, I'm inclined to close this as "Won't Fix". The only reason I haven't is that if someone really wanted to dig in

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: Issue 32206 covers doing this for `pdb`. It relies on directly accessing private APIs in the `runpy` module, but we can live with that, since `pdb` is part of the standard library. -- dependencies: +Run modules with pdb, cProfile command-line should

[issue32206] Run modules with pdb

2018-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: Linking back to the overall RFE for improved executable module support for standard library modules that run other scripts: https://bugs.python.org/issue9325 -- nosy: +ncoghlan ___ Python tracker <ht

[issue32206] Run modules with pdb

2018-01-05 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 9f1e5f1b7f074e026843a5d70834233a95a6bf9d by Nick Coghlan (Mario Corchero) in branch 'master': bpo-32206: Pdb can now run modules (GH-4752) https://github.com/python/cpython/commit/9f1e5f1b7f074e026843a5d7083423

[issue32206] Run modules with pdb

2018-01-05 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <https://bugs.python

[issue32206] Run modules with pdb

2018-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: Re-opening for the CLI help updates. -- resolution: fixed -> stage: resolved -> needs patch status: closed -> open ___ Python tracker <https://bugs.python.or

[issue30579] Allow traceback objects to be instantiated/mutated/annotated

2018-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset e46a8af450210ee5c7f0459ad6beddbc626ae60f by Nick Coghlan (Nathaniel J. Smith) in branch 'master': bpo-30579: Allow TracebackType creation and tb_next mutation from Python (GH-4793) https://github.com/python/cpyt

[issue30579] Allow traceback objects to be instantiated/mutated/annotated

2018-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: +1 for creating separate issues and linking them from this one - while the risk of breaking anything seems low, if we do cause a regression, multiple issues and PRs provide better traceability than one giant issue for everything. (I'm also not aware of a

[issue31975] Add a default filter for DeprecationWarning in __main__

2018-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: I think https://github.com/python/cpython/pull/4458 is ready to go now, but I expect it would benefit from a review before I merge it. If anyone has the time to take a look, it would be much appreciated :) However, I'd also like to get it in for 3.7.0a4

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks. I've added the dependencies, and also granted you triage permissions on the tracker, so you should be able to edit dependencies yourself in the future. -- dependencies: +Add an option to profile to run library module as a script, Add an o

[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: As David noted, we updated all the URL parsing functions to be polymorphic back in 3.2: https://docs.python.org/3/library/urllib.parse.html#parsing-ascii-encoded-bytes We left the quoting functions alone, because they already had their own way of dealing with

[issue31975] Add a default filter for DeprecationWarning in __main__

2018-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 9b99747386b690007027c3be2a5d7cfe3d3634f5 by Nick Coghlan in branch 'master': bpo-31975 (PEP 565): Show DeprecationWarning in __main__ (GH-4458) https://github.com/python/cpython/commit/9b99747386b690007027c3be2a5d7c

[issue31975] Add a default filter for DeprecationWarning in __main__

2018-01-07 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-10 Thread Nick Coghlan
Nick Coghlan added the comment: While I do think it makes sense to enhance `dis` in this regard, I'm also thinking it might be better to have that automatically fall back to a `python -m inspect module:qualname` style lookup in the event that `os.path.exists(infile)` is false

[issue32004] Allow specifying code packing order in audioop adpcm functions

2018-01-10 Thread Nick Coghlan
Nick Coghlan added the comment: Adjusting target versions, as even though the status quo leads to mishandling some input data, the fix is a feature request to make the behaviour configurable, which restricts the change to 3.7+. -- nosy: +ncoghlan versions: -Python 2.7, Python 3.4

[issue33501] split existing optimization levels into granular options

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: PSF link for Diana Clark's thread on python-ideas about this: https://mail.python.org/pipermail/python-ideas/2017-September/047224.html (this is the same thread Brett linked, just to the PSF archives rather than Google G

[issue33388] Support PEP 566 metadata in dist.py

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: If these warnings are being emitted when using setuptools, that's a bug in setuptools (as it should be ensuring these are handled without warnings), and can be reported over on https://github.com/pypa/setuptools/ If these warnings are being emitted when

[issue13474] Mention of "-m" Flag Missing From Doc on Execution Model

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: I've assigned the PR and issue to myself, as the proposed addition in the PR isn't quite right, but it isn't immediately obvious why not. The gist of the problem is that the current docs are actually correct and complete: modules are the first

[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: The behaviour I'd expect to see: "module:qual.name" -> "imports module, accesses module.qual.name" "module.qual.name" -> "no implicit import, accesses module.qual.name" "package.subm

[issue33547] Relative imports do not replace local variables

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: As David notes, the issue in the example is the fact that you're setting "__main__.a", so "a.py" never gets imported as a module - it gets a hit on the parent module attribute, and hence stops there. -- resolution: -> n

[issue33499] Environment variable to set alternate location for pycache tree

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: Regarding environment variables, note that they get used in two *very* different ways: 1. The "persistent shell setting" case that Raymond describes. While setting PYTHONBYTECODEPATH to always point to a RAM disk could make quite a bit of sens

[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, sorry, I misinterpreted Petr's comment, and then didn't look at the details of your PR before commenting. Having fixed that mistake, I agree that making the naive approach "just work&quo

[issue31656] Bitwise operations for bytes-type

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: Issue 19251 is still under consideration, so marking this as a duplicate, rather than as rejected. -- nosy: +ncoghlan resolution: rejected -> duplicate superseder: -> bitwise ops for bytes of equal length ___

[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: I'm back in the embedded software world now, and hence working with the combination of: - low level serial formats (including fixed length CAN packets) - C firmware developers that are quite capable of writing supporting C-in-Python code using the sta

[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: This issue isn't at the stage where a PR would help - the core question is still "Should we add better native support for multi-byte bitwise operations?", not the specifics of what they API might look like or how we would implement it.

[issue19251] bitwise ops for bytes of equal length

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the link Serhiy (I'd forgotten about the struct changes proposed in PEP 3118), but the existing struct formatting codes are fine for my purposes. The question is whether we might be able to avoid some bytes->Python-objects->bytes cycl

[issue33499] Environment variable to set alternate location for pycache tree

2018-05-17 Thread Nick Coghlan
Nick Coghlan added the comment: I believe the main argument for -X options is the fact that cmd on Windows doesn't offer a nice way of setting environment variables as part of the command invocation (hence "-X utf8", for example). As far as setting values for X options goes,

[issue19251] bitwise ops for bytes of equal length

2018-05-18 Thread Nick Coghlan
Nick Coghlan added the comment: I think Antoine's right that another venue (such as python-ideas) might be a better venue for this discussion, but I'll still try to explain the potential analogy I see to bytes.upper()/.lower()/etc: those operations let you treat ASCII segments in

[issue21145] Add the @cached_property decorator

2018-05-18 Thread Nick Coghlan
Nick Coghlan added the comment: I think it would make sense to remove the exception wrapping from the __set_name__ calls - I don't think we're improving the ease of understanding the tracebacks by converting everything to a generic RuntimeError, and we're hurting the U

[issue33576] Remove exception wrapping from __set_name__ calls

2018-05-18 Thread Nick Coghlan
New submission from Nick Coghlan : Type creation currently wraps all exceptions raised by __set_name__ calls with a generic RuntimeError: https://github.com/python/cpython/blob/master/Objects/typeobject.c#L7263 Unfortunately, this makes it difficult to use __set_name__ for descriptor

[issue21145] Add the @cached_property decorator

2018-05-18 Thread Nick Coghlan
Nick Coghlan added the comment: I filed https://bugs.python.org/issue33576 to cover removing the exception wrapping from __set_name__ errors. -- ___ Python tracker <https://bugs.python.org/issue21

[issue33576] Remove exception wrapping from __set_name__ calls

2018-05-19 Thread Nick Coghlan
Nick Coghlan added the comment: Hmm, I wonder if the UX problem with the current chaining might be solved in a different way, by doing something similar to what we did for codec exceptions (where we want to try to mention the codec name, but also don't want to change the exception type

[issue19251] bitwise ops for bytes of equal length

2018-05-19 Thread Nick Coghlan
Nick Coghlan added the comment: While it does match Christian's original suggestion, I'm not taking the "bytes" in the issue title as literally requiring that the feature be implemented as operator support on the bytes type (implementing it on memoryview or a new view ty

[issue33576] Make exception wrapping less intrusive for __set_name__ calls

2018-05-19 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, the "transparent exception chaining" code falls into the category of code that I'm both proud of (since it works really well in typical cases [1]) and somewhat horrified by (since the *way* it works tramples over several principles

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2018-05-19 Thread Nick Coghlan
Nick Coghlan added the comment: I think the reference to RuntimeWarning in the docs is a typo (if it was only going to be a warning, it could have been that from the start), and that reference to RuntimeError in the code comment is correct. So there's also a docs fix to make in 3.6 an

[issue23188] Provide a C helper function to chain raised (but not yet caught) exceptions

2018-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: Also see https://github.com/python/cpython/blob/55edd0c185ad2d895b5d73e47d67049bc156b654/Objects/exceptions.c#L2713 for the version we use in a few places to implicitly update the exception message, while keeping the exception type and state the same (and

[issue33607] [subinterpreters] Explicitly track object ownership (and allocator).

2018-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: Rather than tracking this per object, you could potentially track it per arena at the memory allocator level instead. Then if you really need the info (e.g. when running the debug allocator), you can check it in a reliable way, but in the normal case, you

[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2018-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: Adding a low level callback based mechanism to ask another interpreter to do work seems like a good way to go to me. As an example of why that might be needed, consider the case of sharing a buffer exporting object with another subinterpreter: when the

[issue33547] Relative imports do not replace local variables

2018-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: Yes, while weird, that's expected behaviour. Rather than being due to absolute vs relative imports, the difference arises from the fact that in "import pkg.module", the request is explicitly for a submodule, so the submodule import always happ

[issue32911] Doc strings no longer stored in body of AST

2018-05-25 Thread Nick Coghlan
Nick Coghlan added the comment: Ouch, I'd completely missed the fact that this would affect the parsing of bare strings to a simple AST (I was focused on functions and classes, as in Mark's original example). So even though I'm the author of https://bugs.python.org/issue

[issue33547] Relative imports do not replace local variables

2018-05-25 Thread Nick Coghlan
Nick Coghlan added the comment: Not as a statement, but you can force it with importlib.import_module: $ python3 -c "import pkg; pkg.submodule = 1; import importlib; importlib.import_module('.submodule', 'pkg'); print(pkg.submodule)" pkg pkg.submodule We'

[issue33648] unused with_c_locale_warning option in configure should be removed

2018-05-25 Thread Nick Coghlan
Nick Coghlan added the comment: Huh, I thought I cleaned those out when I made the compilation unconditional. I guess not :) The actual fix looks good to me, but the autoconf regeneration looks unexpectedly noisy, so I've asked Benjamin Peterson to take a look

[issue32911] Doc strings no longer stored in body of AST

2018-05-26 Thread Nick Coghlan
Nick Coghlan added the comment: Just noting that I'm going to attempt an alternative, hopefully lower impact, approach at implementing the reversion, which will be to modify Parser/asdl_c.py to inject the following constructor postamble for ASDL nodes that define both a "b

[issue32911] Doc strings no longer stored in body of AST

2018-05-26 Thread Nick Coghlan
Nick Coghlan added the comment: After looking at potential implementation approaches, I believe the following would be the ASDL code generator changes needed to present the docstring as part of the body in the Python API, while keeping it as a separate attribute in the C API: * in ast2obj

[issue33409] Clarify the interaction between locale coercion & UTF-8 mode

2018-05-27 Thread Nick Coghlan
Nick Coghlan added the comment: Ned, just adding you to the nosy list here, as I don't think this is a release blocker per se (since nothing's actually *broken*), but the current state of the PEP 538/540 docs is such that it isn't going to be clear to most readers why both m

[issue33409] Clarify the interaction between locale coercion & UTF-8 mode

2018-05-28 Thread Nick Coghlan
Nick Coghlan added the comment: I'm aiming for this week, so with the docstring-AST-induced delay I should even meet the original rc1 goal :) -- ___ Python tracker <https://bugs.python.org/is

[issue32911] Doc strings no longer stored in body of AST

2018-05-30 Thread Nick Coghlan
Nick Coghlan added the comment: In that case, closing this as resolved. Folks interested in the idea of a "suite" compilation mode to compile a series of statements without special-casing the first one as a potential docstring, as well as the idea of a dedicated DocString AST nod

[issue33693] test test_webbrowser failed

2018-05-30 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> duplicate stage: -> resolved status: open -> closed type: compile error -> behavior ___ Python tracker <https://bugs.python

[issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register

2018-05-30 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31014> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue21142] Daily/weekly ABI scan?

2018-06-01 Thread Nick Coghlan
Nick Coghlan added the comment: Updated link to the ABI tracker report: https://abi-laboratory.pro/tracker/timeline/python/ (The stable ABI report still has a separate entry on http://upstream.rosalinux.ru/ but it links to the same report as I've linked above) I'm bumping thi

[issue19982] Add a "target" parameter to runpy.run_path and runpy.run_module

2018-06-04 Thread Nick Coghlan
Change by Nick Coghlan : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue19982> ___ ___ Python-bugs-list mailing list Unsub

[issue31215] Add version changed notes for OpenSSL 1.1.0 compatibility

2018-06-05 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 9ef1b0690b90c526798b6b3125b0fa7ae98319a2 by Nick Coghlan (Mayank Singhal) in branch 'master': bpo-31215: Add version changed notes for OpenSSL 1.1.0 compatibility (GH-7346) https://github.com/python/cpyt

[issue33745] 3.7.0b5 changes the line number of empty functions with docstrings

2018-06-05 Thread Nick Coghlan
Nick Coghlan added the comment: While I wouldn't describe this as completely intentional (as it's an artifact of the change-and-revert dance with 3.7 previously removing docstring nodes from the AST entirely), I also wouldn't want to change it again at this late stage of the

[issue33783] Use proper class markup for random.Random docs

2018-06-06 Thread Nick Coghlan
New submission from Nick Coghlan : Talking to Berker on http://psf.upfronthosting.co.za/roundup/meta/issue644 I noticed that docs for random.Random are currently embedded in the module preamble text for https://docs.python.org/3/library/random.html and hence really easy to miss. It would be

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 66f02aa32f1e4adb9f24cf186f8c495399d5ce9b by Nick Coghlan (wim glenn) in branch 'master': bpo-11874: fix assertion failure in argparse metavar handling (GH-1826) https://github.com/python/cpython/commit/66f02aa32f1e4adb9f24cf186f8c49

[issue24089] argparse crashes with AssertionError

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 66f02aa32f1e4adb9f24cf186f8c495399d5ce9b by Nick Coghlan (wim glenn) in branch 'master': bpo-11874: fix assertion failure in argparse metavar handling (GH-1826) https://github.com/python/cpython/commit/66f02aa32f1e4adb9f24cf186f8c49

[issue25058] Right square bracket argparse metavar

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 66f02aa32f1e4adb9f24cf186f8c495399d5ce9b by Nick Coghlan (wim glenn) in branch 'master': bpo-11874: fix assertion failure in argparse metavar handling (GH-1826) https://github.com/python/cpython/commit/66f02aa32f1e4adb9f24cf186f8c49

[issue14046] argparse: assertion failure if optional argument has square/round brackets in metavar

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 66f02aa32f1e4adb9f24cf186f8c495399d5ce9b by Nick Coghlan (wim glenn) in branch 'master': bpo-11874: fix assertion failure in argparse metavar handling (GH-1826) https://github.com/python/cpython/commit/66f02aa32f1e4adb9f24cf186f8c49

[issue33409] Clarify the interaction between locale coercion & UTF-8 mode

2018-06-08 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +7172 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue33745] 3.7.0b5 changes the line number of empty functions with docstrings

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: The rationale for documenting it in the porting section is that even though this isn't a guaranteed stable interface, the output *does* potentially affect development tools like Ned's coverage.py, as well as other implementations attempting to adhe

[issue11874] argparse assertion failure with brackets in metavars

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the PR, and your patience! The change has now been merged for all active 3.x versions. It turns out the 2.7 argparse code is still close enough to the 3.x code for the automated backport to work, so the CI for that is currently running

[issue31215] Add version changed notes for OpenSSL 1.1.0 compatibility

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: Merged for 2.7 in https://github.com/python/cpython/commit/458ed1b237150f5c59b6ab3e1a5241a672ac8cbd Thank you for the PRs, Mayank! -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue33331] Clean modules in the reversed order

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: I think the key concern here is that we *don't* consistently add modules to sys.modules in the order their bodies are executed: we add them in a kind of sawtooth order based on the imports from __main__, and the order of import statements in the imp

[issue33331] Clean modules in the reversed order

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: It also occurred to me to ask whether or not moving modules to the end of sys.modules each time they're successfully imported would help solve the problem (albeit at the expense of making import cache hits more expensive). I don't think it does, tho

[issue33409] Clarify the interaction between locale coercion & UTF-8 mode

2018-06-08 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 1bcb8a636857e3383d65aaf196f93edb949f2e79 by Nick Coghlan in branch 'master': bpo-33409: Clarify PEP 538/540 relationship (GH-7534) https://github.com/python/cpython/commit/1bcb8a636857e3383d65aaf196f93e

[issue33409] Clarify the interaction between locale coercion & UTF-8 mode

2018-06-09 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue11874] argparse assertion failure with brackets in metavars

2018-06-09 Thread Nick Coghlan
Change by Nick Coghlan : -- stage: backport needed -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue11874> ___ ___ Pyth

[issue22555] Tracking issue for adjustments to binary/text boundary handling

2018-06-09 Thread Nick Coghlan
Nick Coghlan added the comment: With PEPs 538 and 540 merged for Python 3.7 (so we'll almost always use UTF-8 instead of ASCII when the platform nominates the C or POSIX locale as the currently active one), and Windows previously switching to assuming UTF-8 instead of mbcs for b

[issue22264] Add wsgiref.util.dump_wsgistr & load_wsgistr

2018-06-09 Thread Nick Coghlan
Nick Coghlan added the comment: We don't have anyone clamouring for this, and the third party module https://ftfy.readthedocs.io/en/latest/ has a lot more utilities for working with messy binary inputs and incorrectly decoded text than we'd ever add to the standard library, so I&

[issue22555] Tracking issue for adjustments to binary/text boundary handling

2018-06-09 Thread Nick Coghlan
Nick Coghlan added the comment: Correction: I just rejected my proposed wsgiref in issue 22264 as failing to make a sufficient case for their practical utility, so that one is closed as well :) -- ___ Python tracker <https://bugs.python.

[issue22555] Tracking issue for adjustments to binary/text boundary handling

2018-06-09 Thread Nick Coghlan
Nick Coghlan added the comment: Adding a link to the first post in a series of articles from Victor Stinner regarding the evolution over time of the text encoding assumptions in Python 3's operating system interfaces: https://vstinner.github.io/python30-listdir-undecodable-filenames

[issue33499] Environment variable to set alternate location for pycache tree

2018-06-15 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset b193fa996a746111252156f11fb14c12fd6267e6 by Nick Coghlan (Carl Meyer) in branch 'master': bpo-33499: Add PYTHONPYCACHEPREFIX env var for alt bytecode cache location. (GH-6834) https://github.com/python/cpyt

[issue33499] Environment variable to set alternate location for pycache tree

2018-06-15 Thread Nick Coghlan
Nick Coghlan added the comment: Merged as PYTHONPYCACHEPREFIX=path, -X pycache_prefix=path and sys.pycache_prefix :) I'll also update PEP 304 with a note saying a variant of the idea was eventually accepted for Python 3.8. -- resolution: -> fixed stage: patch review -&g

[issue33499] Environment variable to set alternate location for pycache tree

2018-06-15 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +7357 ___ Python tracker <https://bugs.python.org/issue33499> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33095] Cross-reference isolated mode from relevant locations

2018-06-17 Thread Nick Coghlan
Nick Coghlan added the comment: xtreak: if you're familiar with GitHub workflows, then we now accept docs and code updates as GitHub PRs: https://devguide.python.org/pullrequest/ The parts about running the tests aren't exactly relevant here, what's more relevant

[issue33468] Add try-finally contextlib.contextmanager example

2018-06-20 Thread Nick Coghlan
Nick Coghlan added the comment: Right, the HTML example was always a bit cutesy (hence the disclaimer in the header), but it's hard to come up with a good illustrative example that isn't already a native context manager in the standard library. Perhaps it would make sense to

<    23   24   25   26   27   28   29   30   31   32   >