[issue37375] Fix a code style in dictobject.c

2019-06-23 Thread hai shi
Change by hai shi : -- components: Interpreter Core nosy: shihai1991 priority: normal severity: normal status: open title: Fix a code style in dictobject.c ___ Python tracker _

[issue37375] Fix a code style in dictobject.c

2019-06-23 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +14141 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14317 ___ Python tracker ___

[issue37375] Fix a code style in dictobject.c

2019-06-23 Thread hai shi
New submission from hai shi : # A small code style question: PyDictObject*mp should add a space:) PyDictObject *mp = (PyDictObject *)op -- ___ Python tracker ___ __

[issue37373] Configuration of windows event loop for libraries

2019-06-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: I doubt if we should split a proactor loop into two objects in two threads. I see no strong objections but have a feeling that we'll get other problems in this way. asyncio is just not designed for this mode. The proposal looks like a very dirty hack and smel

[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2019-06-23 Thread Géry
Géry added the comment: @Julien, @Barry Now that the PRs are merged, I think that we can close this issue. -- ___ Python tracker ___ __

[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2019-06-23 Thread Géry
Géry added the comment: Oops, sorry, only one of the two PRs has been merged. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue37376] pprint for types.SimpleNamespace

2019-06-23 Thread Carl Bordum Hansen
New submission from Carl Bordum Hansen : Currently, pprint.pprint does not help you at all when pretty-printing SimpleNamespaces. I have implemented support for this. -- components: Library (Lib) messages: 346318 nosy: carlbordum, fdrake, serhiy.storchaka priority: normal severity: nor

[issue37376] pprint for types.SimpleNamespace

2019-06-23 Thread Carl Bordum Hansen
Change by Carl Bordum Hansen : -- keywords: +patch pull_requests: +14142 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14318 ___ Python tracker _

[issue35224] PEP 572: Assignment Expressions

2019-06-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: All buildbots for 3.8 and master are green again :) -- ___ Python tracker ___ ___ Python-b

[issue32934] logging.handlers.BufferingHandler capacity is unclearly specified

2019-06-23 Thread Enrico Zini
Enrico Zini added the comment: Thanks! Clarifying "number of records buffered" would perfectly solve the problem for me. -- ___ Python tracker ___ ___

[issue37377] unicode error should raise a value error

2019-06-23 Thread hai shi
New submission from hai shi : >>> "\x1" File "", line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-2: truncated \xXX escape I think rasing the valueError would be exact.(pep223 agree this behavior: https://www.python.org/dev/peps/pep-0223/#bdfl-prono

[issue37378] FatalError: initfsencoding python couldn't find codec Module not found: Encodings

2019-06-23 Thread Lokesh Chandak
New submission from Lokesh Chandak : I encountered this issue when using pip. Whenever I try to install a package, it shows a Fatal error, saying that the module encodings was not found, followed by a reboot. The blue screen shows this message: KMode exception not handled. What failed: dipsp.s

[issue37379] Provide triggering AttributeError exception to __getattr__ for reraising

2019-06-23 Thread nother
New submission from nother : Not sure where to file this suggestion properly and how. Currently when mixing attributes and properties it can happen that an AttributeError not raised intentionally by @property getter can cause @property to vanish from from classinstance. This happens when on t

[issue37377] unicode error should raise a value error

2019-06-23 Thread Steven D'Aprano
Steven D'Aprano added the comment: It is a *syntax* error. You have written bad syntax, just as the error message says. Your \xXX code is too short, only 1 hex digit instead of 2. I disagree that this should be a value error: it isn't a bad value, it is bad syntax. I don't know what the cont

[issue37379] Provide triggering AttributeError exception to __getattr__ for reraising

2019-06-23 Thread Steven D'Aprano
Steven D'Aprano added the comment: Could you supply a *simple* demonstration of a class showing this problem? I've looked at the uploaded "test6.py" (what happened to the other 5?) and don't see anything to do with either __getattr__ or property in it. -- nosy: +steven.daprano versio

[issue37377] unicode error should raise a value error

2019-06-23 Thread hai shi
hai shi added the comment: Got it, thank for your detailed explanation, steven. -- stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue18299] Change script_helper to use universal_newlines=True in _assert_python

2019-06-23 Thread hai shi
Change by hai shi : -- nosy: -shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue35224] PEP 572: Assignment Expressions

2019-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: So issue29652 can be closed now? Was all concerns of previous discussions addressed? I suggest to increment the magic number by 1, not by 10. The space of magic numbers is finite. Add please a What's New entry for this change. -- nosy: +serhiy.st

[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 914d6b79735e5eabaf4e4d77e3f2ad4eae0beb9a by Serhiy Storchaka in branch '3.8': [3.8] bpo-35431: Test math.comb() and math.perm() for OverflowError only on CPython. (GH-14146) (#14226) https://github.com/python/cpython/commit/914d6b79735e5eabaf

[issue35224] PEP 572: Assignment Expressions

2019-06-23 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +14143 pull_request: https://github.com/python/cpython/pull/14319 ___ Python tracker ___ ___

[issue35224] PEP 572: Assignment Expressions

2019-06-23 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +14144 pull_request: https://github.com/python/cpython/pull/14320 ___ Python tracker ___ ___

[issue35224] PEP 572: Assignment Expressions

2019-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +14145 pull_request: https://github.com/python/cpython/pull/14321 ___ Python tracker ___ __

[issue35224] PEP 572: Assignment Expressions

2019-06-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset b3ca7972c8d8c6479b6542ce28e0f7a6ebd5b8fe by Pablo Galindo in branch 'master': bpo-35224: Bump the pyc magic number by 1 instead of by 10 in last modification (GH-14320) https://github.com/python/cpython/commit/b3ca7972c8d8c6479b6542ce28e

[issue37378] FatalError: initfsencoding python couldn't find codec Module not found: Encodings

2019-06-23 Thread Inada Naoki
Inada Naoki added the comment: There may be a broken pip.exe in your computer. Try `python -VV` to check what python are you using. After that, try `python -m pip`, instead of `pip`. -- nosy: +inada.naoki ___ Python tracker

[issue35224] PEP 572: Assignment Expressions

2019-06-23 Thread miss-islington
miss-islington added the comment: New changeset 175b2e974586152c1d4cdea589b971d7ecad4d30 by Miss Islington (bot) in branch '3.8': bpo-35224: Bump the pyc magic number by 1 instead of by 10 in last modification (GH-14320) https://github.com/python/cpython/commit/175b2e974586152c1d4cdea589b971

[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2019-06-23 Thread Ruslan Kuprieiev
New submission from Ruslan Kuprieiev : subprocess keeps the list of active processes in its `_active` list. Whenever you try to Popen a new process, it is immediately (like right in the first line of Popen.__init__ [1]) trying to go clean up the old ones. If one of the processes in that list

[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2019-06-23 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20181] Derby #12: Convert 50 sites to Argument Clinic across 4 files

2019-06-23 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +14146 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14326 ___ Python tracker ___

[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2019-06-23 Thread Eryk Sun
Eryk Sun added the comment: See issue 36067 for a related discussion. The _active list and _cleanup function are not required in Windows. When a process exits, it gets rundown to free its handle table and virtual memory. Only the kernel object remains, which is kept alive by pointer and hand

[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2019-06-23 Thread finefoot
finefoot added the comment: This is still an issue: https://stackoverflow.com/questions/56716470/python-multiprocessing-nested-shared-objects-doesnt-work-with-queue Is there a specific reason, why https://github.com/python/cpython/pull/4819 doesn't get reviewed? -- nosy: +finefoot

[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2019-06-23 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +14147 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14327 ___ Python tracker ___ __

[issue20181] Derby #12: Convert 50 sites to Argument Clinic across 4 files

2019-06-23 Thread Zackery Spytz
Zackery Spytz added the comment: PR 14326 converts Modules/readline.c. As the parser module is slated for removal in 3.9 (according to PEP 594), Modules/parsermodule.c should not be converted. -- nosy: +ZackerySpytz ___ Python tracker

[issue37379] Provide triggering AttributeError exception to __getattr__ for reraising

2019-06-23 Thread nother
nother added the comment: Ah sorry, sure. Attached some examples hope they are not too artificially simple to still render real world scenarios. The one loaded was just the test that a function called from within the except block inside another method can use raise keyword to reraise excepti

[issue37379] Provide triggering AttributeError exception to __getattr__ for reraising

2019-06-23 Thread nother
nother added the comment: The first two exampel should produce the same result not throwing any exception. The third example should as it does report that prop is not available for instance. The fourth example should pass on the AttributeError raised for the not available attr2 instead of r

[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2019-06-23 Thread Ruslan Kuprieiev
Ruslan Kuprieiev added the comment: Hi Eryk! Thanks for a swift reply! So the current plan for fixing it is: 1) disable _cleanup, _active, and remove _internal_poll() for windows 2) ignore EBADF(OSError: [WinError 6] The handle is invalid) in terminate() and probably some other methods Plea

[issue8579] Add missing tests for FlushKey, LoadKey, and SaveKey in winreg

2019-06-23 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: @Claudiu.Popa are you still interested in working on this, If so please open a pull request for review. -- nosy: +nanjekyejoannah ___ Python tracker __

[issue37379] Provide triggering AttributeError exception to __getattr__ for reraising

2019-06-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue37375] Fix a code style in dictobject.c

2019-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, but we usually do not accept pure cosmetic PRs. -- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue37375] Fix a code style in dictobject.c

2019-06-23 Thread hai shi
hai shi added the comment: Thanks, got it. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue37374] Minidom does not have to escape quote inside text segments

2019-06-23 Thread Mitar
Mitar added the comment: FYI, this is exactly how ElementTree.tostring does it. So this would make ElementTree.tostring behave the same as minidom. @dhilst: I do not think a parameter is needed here. This is completely compatible with HTML. It is just that currently an additional unnecessary

[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2019-06-23 Thread Eryk Sun
Eryk Sun added the comment: > 1) disable _cleanup, _active, and remove _internal_poll() for windows _active only gets appended to in __del__. We can skip the entire body of __del__. Also, calling _cleanup can be skipped in __init__. _internal_poll is required for poll(). 2) ignore EBADF(OSE

[issue34556] Add --upgrade to venv module

2019-06-23 Thread Cooper Lees
Cooper Lees added the comment: I believe so - Would love it could be included with latest 3.8 or is there no chance of that? -- ___ Python tracker ___ ___

[issue37381] Script using ProactorEventLoop does not exit cleanly on Windows with multiple subprocesses

2019-06-23 Thread William D. Jones
New submission from William D. Jones : On Windows 7, when using ProactorEventLoop, when asyncio.subprocess.terminate is called on the last subprocess when multiple subprocesses are spawned*, the last subprocess will never exit, and the Python interpreter will never exit. Spawning an instance

[issue37381] Script using ProactorEventLoop does not exit cleanly on Windows with multiple subprocesses

2019-06-23 Thread William D. Jones
William D. Jones added the comment: Update: It turns out multiple spawned subprocesses are NOT required. If I replace "(short_fut, _) = await spawn()" with "short_fut = asyncio.ensure_future(asyncio.sleep(4))", the hang still occurs. -- ___ Python

[issue37373] Configuration of windows event loop for libraries

2019-06-23 Thread Ben Darnell
Ben Darnell added the comment: Yeah, it's definitely a hack. The argument for it, at best, is "practicality beats purity". The solution is two simple lines, but those lines need to be repeated in every project that depends on Tornado and cares about Windows, now or in the future. How many pr

[issue37373] Configuration of windows event loop for libraries

2019-06-23 Thread Yury Selivanov
Yury Selivanov added the comment: +1 to what Ben said. Andrew, > The proposal looks like a very dirty hack and smells as it is. I wonder why are you feeling like that about this idea. I don't think this is a hack at all. There's no native API, so we're forced to use another approach. > T

[issue36661] Missing dataclass decorator import in dataclasses module docs

2019-06-23 Thread Mark turner
Mark turner added the comment: I tried a couple of the examples from the docs and found the setup to be a little confusing amd inconsistent. For example, the decorator line "@decorator" requires you to use from dataclasses import dataclass while the example line "mylist: List[int] = field(d

[issue37284] Not obvious that new required attrs of sys.implementation must have a PEP.

2019-06-23 Thread Giovanni Cappellotto
Change by Giovanni Cappellotto : -- keywords: +patch pull_requests: +14148 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14328 ___ Python tracker

[issue37381] Script using ProactorEventLoop does not exit cleanly when subprocesses are spawned.

2019-06-23 Thread William D. Jones
Change by William D. Jones : -- title: Script using ProactorEventLoop does not exit cleanly on Windows with multiple subprocesses -> Script using ProactorEventLoop does not exit cleanly when subprocesses are spawned. ___ Python tracker

[issue37374] Minidom does not have to escape quote inside text segments

2019-06-23 Thread Daniel Hilst Selli
Daniel Hilst Selli added the comment: This changes behavior in an irreversible way. A parameter would make it reversible. -- ___ Python tracker ___ __

[issue37348] Optimize PyUnicode_FromString for short ASCII strings

2019-06-23 Thread Inada Naoki
Inada Naoki added the comment: New changeset 770847a7db33b3d4c451b42372b6942687aa6121 by Inada Naoki in branch 'master': bpo-37348: optimize decoding ASCII string (GH-14283) https://github.com/python/cpython/commit/770847a7db33b3d4c451b42372b6942687aa6121 -- ___

[issue37348] Optimize PyUnicode_FromString for short ASCII strings

2019-06-23 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue37378] FatalError: initfsencoding python couldn't find codec Module not found: Encodings

2019-06-23 Thread Lokesh Chandak
Lokesh Chandak added the comment: Thank Inada Naoki, I can confirm that python -m pip works as normal and I can resume my work. However pip is still causing the errors, and not just pip, it was also the same for pip3 and pip3.7 as well as easy_install. I guess I will wait for future updates

[issue37378] FatalError: initfsencoding python couldn't find codec Module not found: Encodings

2019-06-23 Thread Inada Naoki
Inada Naoki added the comment: You can use `where pip` to find which pip is used. And you can check `PATH` environment variable and remove unused PATHs. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue36661] Missing dataclass decorator import in dataclasses module docs

2019-06-23 Thread Prateek Nayak
Change by Prateek Nayak : -- keywords: +patch pull_requests: +14149 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14329 ___ Python tracker ___ __

[issue37348] Optimize PyUnicode_FromString for short ASCII strings

2019-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please measure the performance for long strings (1000, 1 and 10 characters): a long ASCII string and a long ASCII string ending with a non-ASCII character? -- ___ Python tracker

[issue34556] Add --upgrade to venv module

2019-06-23 Thread Vinay Sajip
Vinay Sajip added the comment: > included with latest 3.8 or is there no chance of that? Unfortunately not, I think, as it missed the cut for 3.8beta1. Never mind! Thanks for your contribution. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: