[issue33544] Asyncio Event.wait() and Condition.wait() is a hold over from before awaitable, and should be awaitable

2018-05-16 Thread Jason Fried
New submission from Jason Fried : wait is a very overloaded word in asyncio. Events and Conditions are not consistent with the rest of asyncio. Why don't Future and Task have wait() methods? well because they are awaitable Some subjective reasoning: Every time I go to use one of these thing

[issue33451] Start pyc file lock the file

2018-05-16 Thread Eryk Sun
Eryk Sun added the comment: In Python/pythonrun.c, PyRun_SimpleFileExFlags() reopens the PYC file in binary mode, passes it to run_pyc_file(), and only closes it after executing the script. The file should instead be closed in run_pyc_file(), before calling PyEval_EvalCode(). -- nosy

[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-05-16 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +6582 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue33543] `make html` broken

2018-05-16 Thread Ned Deily
Ned Deily added the comment: Or just "make venv html". If you already have sphinx installed somewhere, you can just: pip install python-docs-theme -- nosy: +ned.deily resolution: -> works for me stage: -> resolved status: open -> closed ___ Pytho

[issue33545] Docs for uuid don't mention that uuid1 can repeat in some circumstances

2018-05-16 Thread merelymoray
New submission from merelymoray : https://docs.python.org/3.6/library/uuid.html#uuid.UUID uuid.uuid1(node=None, clock_seq=None) Generate a UUID from a host ID, sequence number, and the current time. If node is not given, getnode() is used to obtain the hardware address. If clock_seq is given,

[issue5286] urrlib2 digest authentication problems

2018-05-16 Thread Petr Viktorin
Petr Viktorin added the comment: I withdraw the patch (and I should have done that years ago). Nowadays, hopefully Requests does the right thing. -- resolution: -> out of date stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers

2018-05-16 Thread Eric V. Smith
Change by Eric V. Smith : -- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable

2018-05-16 Thread Jason Fried
Jason Fried added the comment: Removed Condition from this request, because it has an __await__ method for supporting the the deprecated pattern with async cond: I'll open a different bug, for Condition behavior for 3.9 when we can remove the deprecated pattern. -- title: Asyncio

[issue401713] Free extension DLLs' handles during the Py_Finalize()

2018-05-16 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue23402] dynload_shlib does not close ldl handles when the interpreter is shut down

2018-05-16 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue14597] Cannot unload dll in ctypes until script exits

2018-05-16 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue1144263] reload() is broken for C extension objects

2018-05-16 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X

2018-05-16 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +6583 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable

2018-05-16 Thread Jason Fried
Change by Jason Fried : -- keywords: +patch pull_requests: +6584 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue33546] asyncio.Condition should become awaitable in 3.9

2018-05-16 Thread Jason Fried
New submission from Jason Fried : In 3.9 we can remove the deprecated pattern for accepting __enter__ and __exit__ for locks. This will free up __await__ for Condition to use for replacing .wait() which is wart from before awaitables. My new proposed behavior is await cond which would be

[issue33543] `make html` broken

2018-05-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 16, 2018, at 13:34, Ned Deily wrote: > > Or just "make venv html". Shouldn’t the html target depend on venv then? -- ___ Python tracker ___

[issue1025395] email.Utils.parseaddr fails to parse valid addresses

2018-05-16 Thread ioanatia
Change by ioanatia : -- keywords: +patch pull_requests: +6585 stage: test needed -> patch review ___ Python tracker ___ ___ Python-

[issue21145] Add the @cached_property decorator

2018-05-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree this would be a useful addition to the stdlib. The code might seem reasonably short, but implementing new descriptors is an advanced topic (I'd rather avoid it myself). -- ___ Python tracker

[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-05-16 Thread Eric Snow
Eric Snow added the comment: New changeset 6d2cd9036c0ab78a83de43d1511befb7a7fc0ade by Eric Snow in branch 'master': bpo-32604: Improve subinterpreter tests. (#6914) https://github.com/python/cpython/commit/6d2cd9036c0ab78a83de43d1511befb7a7fc0ade --

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Eric V. Smith
Eric V. Smith added the comment: Larry points out that one potential use case is a base class that defines some awesome __init__ that you want to use. Without init=False, there’s no good way to use it. -- ___ Python tracker

[issue33533] Provide an async-generator version of as_completed

2018-05-16 Thread Hrvoje Nikšić
Change by Hrvoje Nikšić : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable

2018-05-16 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: Deprecating Event.wait would be incorrect because Event was designed to mimic the threading.Event class which has a (blocking) wait() method[1]. Supporting `await event` is still worthwhile, though. [1] https://docs.python.org/2/library/threading.html#threadin

[issue32216] Document PEP 557 Data Classes (dataclasses module)

2018-05-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: New changeset 713a9367366c88662c39ed20dd6bce22399299f1 by Barry Warsaw in branch 'master': bpo-32216: Update dataclasses documentation (#6913) https://github.com/python/cpython/commit/713a9367366c88662c39ed20dd6bce22399299f1 --

[issue32216] Document PEP 557 Data Classes (dataclasses module)

2018-05-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +6586 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32216] Document PEP 557 Data Classes (dataclasses module)

2018-05-16 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mai

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-16 Thread Ned Deily
Change by Ned Deily : -- keywords: +patch pull_requests: +6587 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue26510] [argparse] Add required argument to add_subparsers

2018-05-16 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +6588 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Really? Why doesn't this work in the derived dataclass? def __init__(self, *args, **kws): super().__init__(*args, **kws) -- ___ Python tracker

[issue33537] Help on importlib.resources outputs the builtin open description

2018-05-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks, I will add an __all__ _zipimport_get_resource_reader gets called from C and it's the way we trampoline from the inscrutable zipimport.c into something we can more reasonably implement the ResourceReader API. There's a comment above _ZipImportResour

[issue33537] Help on importlib.resources outputs the builtin open description

2018-05-16 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- assignee: -> barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33435] incorrect detection of information of some distributions

2018-05-16 Thread Petr Viktorin
Petr Viktorin added the comment: I understand that's what distro (https://github.com/nir0s/distro) is based on -- but a lot of complexity is required on top of that. -- ___ Python tracker ___

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-16 Thread Ned Deily
Ned Deily added the comment: Several of the core developers here at the PyCon US sprints in Cleveland have discussed this issue. It seems like there legitimate arguments for either behavior. But, while none of us are argparse experts, we all were persuaded by Wolfgang's and Brian's argument

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Eric V. Smith
Eric V. Smith added the comment: I think the concern is: from dataclasses import * class B: def __init__(self, a, b, c): # do something with a, b, c, and maybe use fields(self) to figure out we have a "i" field self.i = a + b + c @dataclass(init=False) class C(B) i: i

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-16 Thread Anthony Sottile
Anthony Sottile added the comment: Considering the huge popularity of these SO questions, I don't think this should be reverted: - https://stackoverflow.com/questions/23349349/argparse-with-required-subparser - https://stackoverflow.com/questions/22990977/why-does-this-argparse-code-behave-di

[issue33537] Help on importlib.resources outputs the builtin open description

2018-05-16 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- pull_requests: +6589 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue32216] Document PEP 557 Data Classes (dataclasses module)

2018-05-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: New changeset 0c62e09774e445a185fd192524454ce697ca123b by Barry Warsaw (Miss Islington (bot)) in branch '3.7': bpo-32216: Update dataclasses documentation (GH-6913) (#6918) https://github.com/python/cpython/commit/0c62e09774e445a185fd192524454ce697ca123b --

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 16, 2018, at 16:09, Eric V. Smith wrote: > > I think the concern is: > > from dataclasses import * > > class B: >def __init__(self, a, b, c): ># do something with a, b, c, and maybe use fields(self) to figure out > we have a "i" field >

[issue33543] `make html` broken

2018-05-16 Thread Ned Deily
Ned Deily added the comment: > Shouldn’t the html target depend on venv then? Back when we added support for blurb, I tried to make it such that "make html" could easily use already installed versions of sphinx-build and blurb and not require a venv. I had a particular use case for that. Bu

[issue33547] Relative imports do not replace local variables

2018-05-16 Thread Rolf Campbell
New submission from Rolf Campbell : Relative imports do not replace local variables, but also don't fail. This can cause some very strange outcomes like this simple example: touch a.py; python3.6 -c 'a=7; b=5; from . import a as b; print(a,b)' I would expect this to produce "7 ", but instead,

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Eric V. Smith
Eric V. Smith added the comment: The concern is that you've created an awesome base class, and you've written 500 dataclasses that are derived from it, but you want to use the base class's __init__ for all 500. Do you really want to add a __init__ to each of the 500 classes? We're trying to r

[issue33403] asyncio.tasks.wait does not allow to set custom exception when return_when=FIRST_EXCEPTION

2018-05-16 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: """ At the moment this can be done but it will cancel all the coroutines with any exception that is raised and at some occasions this may not be desired. """ Does wait() really "cancel all the coroutines"? The documentation doesn't mention wait() canceling any

[issue33547] Relative imports do not replace local variables

2018-05-16 Thread Rolf Campbell
Rolf Campbell added the comment: Under simple circumstances, this is only reproducible when either directly in an interactive Python session (or as -c), but I encountered this type of problem in a much more complicated project which was NOT running as part of an interactive Python session (or

[issue33548] tempfile._candidate_tempdir_list should consider common TEMP locations

2018-05-16 Thread Steve Dower
New submission from Steve Dower : In Lib/tempfile.py, we currently look at some non-standard Windows-specific locations to find potential TEMP directories, but we should also look in the more common user and system ones. -- assignee: steve.dower components: Windows messages: 316868 nos

[issue32392] subprocess.run documentation does not have **kwargs

2018-05-16 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Let's add 'env=None' to the signature of subprocess.run(): +1 -- ___ Python tracker ___ ___ Pyt

[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-05-16 Thread Alexander Belopolsky
Change by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 16, 2018, at 16:48, Eric V. Smith wrote: > Do you really want to add a __init__ to each of the 500 classes? Well, of course *I* do, but I’m weird like that. > That is, the base class could legitimately being doing something with the > derived class

[issue26819] _ProactorReadPipeTransport pause_reading()/resume_reading() broken if called before any read is perfored

2018-05-16 Thread Zvi Effron
Change by Zvi Effron : -- keywords: +patch pull_requests: +6591 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address

2018-05-16 Thread Zvi Effron
Change by Zvi Effron : -- keywords: +patch pull_requests: +6592 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword.

2018-05-16 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : `Lib/xml/dom/xmlbuilder's DocumentLS try to catch the use of `obj.asyc` and warn that it's now `obj.async_`. Though now that async is a proper keyword `obj.async` is anyway SyntaxError, so the warning will likely almost never be displayed. I guess one

[issue33547] Relative imports do not replace local variables

2018-05-16 Thread R. David Murray
R. David Murray added the comment: It's importing 'a' from '.', which I guess in this context means from the current namespace (__main__), and a is 7. You'll note that 'b' did get repointed, but it got repointed to what 'a' points to, instead of to 5. If it really wasn't replacing the local

[issue33522] Enable CI builds on Visual Studio Team Services

2018-05-16 Thread Steve Dower
Steve Dower added the comment: New changeset e5f41d2f1e0b8b8e61d5fa427c19bd1ea90fd9a3 by Steve Dower in branch 'master': bpo-33522: Enable CI builds on Visual Studio Team Services (#6865) https://github.com/python/cpython/commit/e5f41d2f1e0b8b8e61d5fa427c19bd1ea90fd9a3 -- __

[issue33522] Enable CI builds on Visual Studio Team Services

2018-05-16 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +6593 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue33549] xmlbuilder's `_AsyncDeprecatedProperty` make no sens now that async is a keyword.

2018-05-16 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- keywords: +patch pull_requests: +6594 stage: -> patch review ___ Python tracker ___ ___ Python-bu

[issue33522] Enable CI builds on Visual Studio Team Services

2018-05-16 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +6595 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

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

2018-05-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Environment variables aren't system-wide, they are > per-process (though they can be inherited by child processes). Yes, that is how they work. It is not how they are used. Environment variables are commonly set in shell start-up scripts such as .bashr

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

2018-05-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 15, 2018, at 22:58, Carl Meyer wrote: > Our use case includes a webserver process that embeds Python; I'm not sure if > we could pass a CLI arg to it or not. I think you pretty much have to have an environment variable, as there are just too many pl

[issue33522] Enable CI builds on Visual Studio Team Services

2018-05-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +6596 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue1322] Deprecate platform.dist() and platform.linux_distribution() functions

2018-05-16 Thread Petr Viktorin
Petr Viktorin added the comment: For the record, I opened an issue on `distro` about the vicious circle of distro detection instead of feature detection: https://github.com/nir0s/distro/issues/221 -- ___ Python tracker

[issue33550] Sigpipe handling issue should be documented

2018-05-16 Thread Alfred Perlstein
New submission from Alfred Perlstein : A common anti-pattern in python used to get rid of "ugly" brokenpipe messages is to set the SIGPIPE handler to SIG_DFL, this however will cause your program to seemingly randomly exit if it makes any socket connections during its lifetime. (see github PR

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Guido van Rossum
Guido van Rossum added the comment: I find it a satisfying outcome that we decided *not* to remove this in the last week before rc1. While it's true that dataclasses are a new feature in 3.7.0, considerable effort went into stabilizing the betas. Let's close this issue. -- _

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Eric V. Smith
Eric V. Smith added the comment: Okay. I'm sure Ned is relieved! -- priority: release blocker -> resolution: -> wont fix stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue33428] pathlib.Path.glob does not follow symlinks

2018-05-16 Thread Brian Sheldon
Brian Sheldon added the comment: Windows does not implement symlinks as junctions. Windows has hardlinks, symlinks and junctions which are all distinctly different in behaviour. I don't doubt that this is a Windows-specific issue, although I have not tested other platforms. Path.glob and .r

[issue33475] Fix converting AST expression to string and optimize parenthesis

2018-05-16 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 64fddc423fcbe90b8088446c63385ec0aaf3077c by Łukasz Langa (Serhiy Storchaka) in branch 'master': bpo-33475: Fix and improve converting annotations to strings. (GH-6774) https://github.com/python/cpython/commit/64fddc423fcbe90b8088446c63385ec0aaf3077

[issue33051] IDLE: Create new tab for editor options in configdialog

2018-05-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I expected that this would be needed eventually. Any particular reason why now? -- ___ Python tracker ___ ___

[issue33551] The string prefixes u and f can't used together

2018-05-16 Thread Aifu LIU
New submission from Aifu LIU : The string prefixes u and f can't used together, for example: >>> age = 30 >>> s = uf'年龄:{age}' File "", line 1 s = uf'年龄:{age}' ^ SyntaxError: invalid syntax >>> -- components: Unicode messages: 316883 nosy: Aifu LIU, ezio.melotti

[issue33551] The string prefixes u and f can't used together

2018-05-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: Why would you want to do that? -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bu

[issue33475] Fix converting AST expression to string and optimize parenthesis

2018-05-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +6598 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X

2018-05-16 Thread Ned Deily
Ned Deily added the comment: New changeset c2f082e9d164acfa8f96de9526f0f47ae92c426a by Ned Deily (Zvezdan Petkovic) in branch 'master': bpo-13631: Fix the order of initialization for readline libedit on macOS. (GH-6915) https://github.com/python/cpython/commit/c2f082e9d164acfa8f96de9526f0f47a

[issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X

2018-05-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +6599 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue33521] Add 1.32x faster C implementation of asyncio.isfuture().

2018-05-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner versions: -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing

<    1   2