[issue40279] Documentation example of module init function lacks error handling

2020-04-24 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 882a7f44da08c6fb210bd9a17f80903cbca84034 by Miss Islington (bot) in branch '3.8': bpo-40279: Add some error-handling to the module initialisation docs example (GH-19705) (GH-19710)

[issue40279] Documentation example of module init function lacks error handling

2020-04-24 Thread Stefan Behnel
Stefan Behnel added the comment: Hi Cajetan, thank you for your contribution! That's a nice documentation improvement. -- nosy: -miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue40279] Documentation example of module init function lacks error handling

2020-04-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +19031 pull_request: https://github.com/python/cpython/pull/19710 ___ Python tracker

[issue40279] Documentation example of module init function lacks error handling

2020-04-24 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset d4f3923d5901ef1ccdbe6ad6c5a753af90832a0f by Cajetan Rodrigues in branch 'master': bpo-40279: Add some error-handling to the module initialisation docs example (GH-19705)

[issue40386] Strange behavior during invalid import of modules without if __name__ == "__main__"

2020-04-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Trying using "import this" instead of "import this.main". The latter does an "import this" and then attempts to load a "main" package that doesn't exist. You're observed the expected behavior. See

[issue40385] Tools/checkpyc.py has been broken since PEP 552

2020-04-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset f82807746d26b4c047f7f3115065f20bb63fb5ff by Ammar Askar in branch 'master': closes bpo-40385: Remove Tools/scripts/checkpyc.py (GH-19709) https://github.com/python/cpython/commit/f82807746d26b4c047f7f3115065f20bb63fb5ff --

[issue40385] Tools/checkpyc.py has been broken since PEP 552

2020-04-24 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch pull_requests: +19030 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19709 ___ Python tracker ___

[issue40386] Strange behavior during invalid import of modules without if __name__ == "__main__"

2020-04-24 Thread wyz23x2
Change by wyz23x2 : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40386] Strange behavior during invalid import of modules without if __name__ == "__main__"

2020-04-24 Thread wyz23x2
wyz23x2 added the comment: Sorry, it's "of 'this' is run", not "un". -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40386] Strange behavior during invalid import of modules without if __name__ == "__main__"

2020-04-24 Thread wyz23x2
Change by wyz23x2 : -- components: +Library (Lib) versions: +Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue40386] Strange behavior during invalid import of modules without if __name__ == "__main__"

2020-04-24 Thread wyz23x2
New submission from wyz23x2 : This behavior: Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> import this.main The Zen of Python, by Tim Peters Beautiful is better than

[issue34990] year 2038 problem in compileall.py

2020-04-24 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +19029 pull_request: https://github.com/python/cpython/pull/19708 ___ Python tracker ___

[issue40385] Tools/checkpyc.py has been broken since PEP 552

2020-04-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: I'd vote for axing it. -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue40383] weakref class name are hardcoded in reprs

2020-04-24 Thread OhBonsai
Change by OhBonsai : -- assignee: -> docs@python components: +Documentation -Extension Modules nosy: +docs@python title: some class name are hardcoded in reprs -> weakref class name are hardcoded in reprs ___ Python tracker

[issue13645] import machinery vulnerable to timestamp collisions

2020-04-24 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: -19023 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40384] IDLE: Undesired highlight

2020-04-24 Thread Alex
Alex <2423067...@qq.com> added the comment: The sharp is at line 2, not line 3. I made a mistake. -- ___ Python tracker ___ ___

[issue40385] Tools/checkpyc.py has been broken since PEP 552

2020-04-24 Thread Ammar Askar
New submission from Ammar Askar : Looks like checkpyc.py has been broken since PEP 552 was implemented https://github.com/python/cpython/blob/0e80b561d442769631d66f1cc8813ac30f97378e/Tools/scripts/checkpyc.py#L44-L46 It fails to read the 4 bytes for the `flags` field nor does it handle hash

[issue40384] IDLE: Undesired highlight

2020-04-24 Thread Alex
New submission from Alex <2423067...@qq.com>: In this code: def a(): # def def b(): When I delete the # at line 3, the keyword 'def' become blue. -- assignee: terry.reedy components: IDLE messages: 367249 nosy: Alex-Python-Programmer, terry.reedy priority: normal severity: normal

[issue40383] some class name are hardcoded in reprs

2020-04-24 Thread OhBonsai
Change by OhBonsai : -- keywords: +patch pull_requests: +19027 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19707 ___ Python tracker ___

[issue40383] some class name are hardcoded in reprs

2020-04-24 Thread OhBonsai
New submission from OhBonsai : Same with #21861 #27541 hard-coding in https://github.com/python/cpython/blob/master/Objects/weakrefobject.c#L162 __repr__ - Reproducing >>> import weakref >>> class ExtendRef(weakref.ref): pass ... >>> class Obj(): pass ... >>> eref = ExtendRef(Obj())

[issue27620] IDLE: Add keyboard equivalents for mouse actions.

2020-04-24 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +19026 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/19706 ___ Python tracker

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: SystemRandom is a weird special case. Otherwise, almost every PRNG is going to need seed(), getstate(), and setstate(). A base class should each offer some reusable code to minimize the burden on the subclass: * The existing seed method allows multiple

[issue40334] PEP 617: new PEG-based parser

2020-04-24 Thread Guido van Rossum
Guido van Rossum added the comment: @Anthony: Presumably some of these will be unavoidable. I see you have PYPY-specific checks in your code already. You could also help by sending us the test programs and the different output produced by the old and the new parser. You could either create

[issue37551] IDLE: Quitting with a new, unsaved editor window causes an exception

2020-04-24 Thread Cajetan Rodrigues
Cajetan Rodrigues added the comment: Cannot reproduce on Ubuntu 19.10 with idle3.9 (Python 3.9.0a5+ (heads/master:a25a04fea5, Apr 20 2020, 22:35:10)) -- nosy: +cajetan.rodrigues ___ Python tracker

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-04-24 Thread Guido van Rossum
Guido van Rossum added the comment: In commit 0e80b561d442769631d66f1cc8813ac30f97378e a What's New section was added. -- ___ Python tracker ___

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2020-04-24 Thread Nikolay Bryskin
Change by Nikolay Bryskin : -- nosy: +nikicat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40334] PEP 617: new PEG-based parser

2020-04-24 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 0e80b561d442769631d66f1cc8813ac30f97378e by Guido van Rossum in branch 'master': bpo-40334: Add What's New sections for PEP 617 and PEP 585 (GH-19704) https://github.com/python/cpython/commit/0e80b561d442769631d66f1cc8813ac30f97378e

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2020-04-24 Thread Christian Heimes
Christian Heimes added the comment: That's a very dangerous trick and I advise against it. You are modifying the global linker path and inject custom OpenSSL libraries into it. This may affect and disrupt other programs or OS core tools. Instead compile the _ssl and _hashlib module with

[issue40378] ast.parse fails to trigger SyntaxWarning that normal execution does

2020-04-24 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > This does seem like a bug and prematurely closed, I'm a bit disappointed in > the current resolution I would love to see it moved as a new step in the execution pipeline that we cane extend easily and use externally (like PyAST_Validate). But I'm not

[issue40279] Documentation example of module init function lacks error handling

2020-04-24 Thread Cajetan Rodrigues
Change by Cajetan Rodrigues : -- keywords: +patch pull_requests: +19024 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19705 ___ Python tracker

[issue40340] Programming FAQ about "How do I convert a string to a number?" contains a typo

2020-04-24 Thread Kyle Stanley
Kyle Stanley added the comment: New changeset 5aafa548794d23b6d4cafb4fd88289cd0ba2a2a8 by Cajetan Rodrigues in branch 'master': bpo-40340: Separate examples more clearly in the programming FAQ (GH-19688) https://github.com/python/cpython/commit/5aafa548794d23b6d4cafb4fd88289cd0ba2a2a8

[issue40335] Regression in multiline SyntaxError offsets

2020-04-24 Thread Anthony Sottile
Anthony Sottile added the comment: cool, reported there as well! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40334] PEP 617: new PEG-based parser

2020-04-24 Thread Anthony Sottile
Anthony Sottile added the comment: :waves: -- seeing a lot of failures in pyflakes' testsuite around SyntaxErrors https://github.com/PyCQA/pyflakes/pull/532 (you can reproduce with `path/to/python -m unittest discover pyflakes` without needing any dependencies installed) -- nosy:

[issue40335] Regression in multiline SyntaxError offsets

2020-04-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > pyflakes's testsuite has many failures under the new parser Can you report this also on the PEP 617 issue? -- ___ Python tracker

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think what we're doing with the documentation update is fine. We can add a warning on stderr to the tool in 3.11. But I don't expect people will be using the tool _from_ the latest CPython 3.x by then. 2to3 is already included with Python 2.7 and the

[issue40279] Documentation example of module init function lacks error handling

2020-04-24 Thread Cajetan Rodrigues
Cajetan Rodrigues added the comment: At the risk of sounding like a jerk, I'd very much want to say that copy-pasters should get what they deserve :) But then I remember I was once a copy-paster too! Hello again, Stefan :) Thanks for watching out for the community - I'll be happy to fix

[issue40335] Regression in multiline SyntaxError offsets

2020-04-24 Thread Anthony Sottile
Anthony Sottile added the comment: pyflakes's testsuite has many failures under the new parser -- is the expectation that those will be fixed by 3.9 final? -- ___ Python tracker

[issue40378] ast.parse fails to trigger SyntaxWarning that normal execution does

2020-04-24 Thread Anthony Sottile
Anthony Sottile added the comment: I would really like to be able to trigger all warnings consistently and statically without executing the code. This is useful (for instance) for this simple script which validates the ast:

[issue40378] ast.parse fails to trigger SyntaxWarning that normal execution does

2020-04-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not a bug. Execution includes more stages than ast.parse(). -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue40381] plistlib doesn't handle poorly-formatted plists

2020-04-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40378] ast.parse fails to trigger SyntaxWarning that normal execution does

2020-04-24 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: This is probably because that these warnings raised during code generation, rather then AST Validation / generation. -- nosy: +BTaskaya ___ Python tracker

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-24 Thread Carl Meyer
Carl Meyer added the comment: @gregory.p.smith What do you think about the question I raised above about how to make this deprecation visible to users of the 2to3 CLI tool, assuming the plan is to remove both? -- ___ Python tracker

[issue40335] Regression in multiline SyntaxError offsets

2020-04-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: And the regression happens because we are ignoring that test currently due to the new parser not currently reporting the same offsets: https://github.com/python/cpython/blob/master/Lib/test/test_exceptions.py#L181 --

[issue40335] Regression in multiline SyntaxError offsets

2020-04-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: With the old parser it works: ~/github/python/master master* ❯ ./python -X oldparser t.py 3.9.0a5+ (heads/master:503de7149d, Apr 24 2020, 22:02:28) [GCC 9.3.0] SyntaxError: - line: 8 - offset: 8 - text: "'''\n\ndef bar():\npass\n\ndef baz():\n

[issue40335] Regression in multiline SyntaxError offsets

2020-04-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Yeah, I can confirm after bisecting that the commit that introduced the regression is the new parser: c5fc15685202cda73f7c3f5c6f299b0945f58508 is the first bad commit commit c5fc15685202cda73f7c3f5c6f299b0945f58508 Author: Pablo Galindo Date: Wed

[issue40335] Regression in multiline SyntaxError offsets

2020-04-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg367225 ___ Python tracker ___ ___ Python-bugs-list

[issue40335] Regression in multiline SyntaxError offsets

2020-04-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hu.actually, no. This is something else... -- ___ Python tracker ___ ___

[issue40367] ImportError: libffi.so.6

2020-04-24 Thread Éric Araujo
Éric Araujo added the comment: How did you get the Python installed in /opt/python/3.8.1? Maybe it was compiled against libffi 6, then you updated the system to libffi 7, so that Python would need a rebuild. -- nosy: +eric.araujo ___ Python

[issue40335] Regression in multiline SyntaxError offsets

2020-04-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is likely due to the new parser (see PEP 617). Do you get the same problem running with -X oldparser ? -- ___ Python tracker

[issue39089] Update IDLE's credits

2020-04-24 Thread Tal Einat
Tal Einat added the comment: Looks pretty good to me. I've been working on IDLE since... 2003/2004, beginning with a private fork of IDLE-fork. I began actually contributing to the main CPython version of IDLE in 2005. -- ___ Python tracker

[issue40031] Python Configure IDLE 'Ok' and 'Apply' buttons do not seem to work.

2020-04-24 Thread Tal Einat
Tal Einat added the comment: Saaheer, could you please run IDLE by opening a command window (Run -> cmd.exe) or PowerShell, then running `python -m idlelib`? Then when this happens, please check the command / PowerShell window to see whether an error message and/or traceback has appeared

[issue40335] Regression in multiline SyntaxError offsets

2020-04-24 Thread Anthony Sottile
Anthony Sottile added the comment: This seems to have regressed again $ ./python --version --version Python 3.9.0a5+ (heads/master:503de7149d, Apr 24 2020, 13:34:49) [GCC 7.5.0] $ ./python t.py File "/home/asottile/workspace/cpython/t.py", line 8

[issue40382] Make 'rt' the default for open in docs

2020-04-24 Thread Facundo Batista
New submission from Facundo Batista : This is mostly a confusion about 'r' being a synonym of 'rt', while it's more explicit if we consider 'r' as one default, and 't' as other (as other parts of the documentation do). Doing `help(open)` we get: mode is an optional string that specifies

[issue40381] plistlib doesn't handle poorly-formatted plists

2020-04-24 Thread Clay Caviness
Clay Caviness added the comment: I expect the answer here to be "plistlib is correct, that's a poorly formatted plist", but since plistlib is "for reading and writing the “property list” files used mainly by Mac OS X and supports both binary and XML plist files", and Apple's own tooling

[issue40381] plistlib doesn't handle poorly-formatted plists

2020-04-24 Thread Clay Caviness
New submission from Clay Caviness : Some Info.plist files are poorly formatted. I am using plistlib to read Info.plist file from various .app bundles. On some, plistlib.load raises a ValueError when trying to parse. Examining one of these Info.plist files, it turns out *it* is poorly

[issue40377] APPDATA location in Microsoft Store version

2020-04-24 Thread Steve Dower
Steve Dower added the comment: You're welcome! We're all involved - apart from a little bit of startup code, it's exactly the same as the regular install. Right now, I'd say you have a case that needs the regular installer, in order to avoid the appdata redirection. As for changing it, it

[issue40380] Errors during make test python 3.8.2

2020-04-24 Thread Steven Fleck
New submission from Steven Fleck : I'm having some issues with installing python 3.8.2. I'm installing it in my personal workspace on my university's computing resources (linux). I've installed many programs here, but python is giving me some issues. Ultimately, I'm failing 5 tests:

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2020-04-24 Thread Jan Wilmans
Jan Wilmans added the comment: I couldn't get this to work at all, python 3.7 compiled fine, but at the end it reports: ''' *** WARNING: renaming "_ssl" since importing it failed: libssl.so.1.1: cannot open shared object file: No such file or directory *** WARNING: renaming "_hashlib" since

[issue13645] import machinery vulnerable to timestamp collisions

2020-04-24 Thread Ammar Askar
Change by Ammar Askar : -- nosy: +ammar2 nosy_count: 8.0 -> 9.0 pull_requests: +19023 pull_request: https://github.com/python/cpython/pull/19651 ___ Python tracker ___

[issue40348] Programming FAQ about "What is delegation?": Fix typos

2020-04-24 Thread Éric Araujo
Éric Araujo added the comment: Thanks! Would you like to make the changes yourself? -- nosy: +eric.araujo ___ Python tracker ___

[issue40379] multiprocessing's default start method of fork()-without-exec() is broken

2020-04-24 Thread Itamar Turner-Trauring
Itamar Turner-Trauring added the comment: Looks like as of 3.8 this only impacts Linux/non-macOS-POSIX, so I'll amend the above to say this will also make it consistent with macOS. -- ___ Python tracker

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread Tim Peters
Tim Peters added the comment: To be serious about numpy ;-) , people consuming a great many random outputs will eventually move to numpy out of necessity (speed). So for that reason alone it's good to mimic what they do. But more fundamentally, they have more people with relevant deep

[issue40334] PEP 617: new PEG-based parser

2020-04-24 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +19022 pull_request: https://github.com/python/cpython/pull/19704 ___ Python tracker ___

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 503de7149d03bdcc671dcbbb5b64f761bb192b4d by Carl Meyer in branch 'master': bpo-40360: Deprecate lib2to3 module in light of PEP 617 (GH-19663) https://github.com/python/cpython/commit/503de7149d03bdcc671dcbbb5b64f761bb192b4d --

[issue40379] multiprocessing's default start method of fork()-without-exec() is broken

2020-04-24 Thread Itamar Turner-Trauring
New submission from Itamar Turner-Trauring : By default, multiprocessing uses fork() without exec() on POSIX. For a variety of reasons this can lead to inconsistent state in subprocesses: module-level globals are copied, which can mess up logging, threads don't survive fork(), etc.. The end

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-04-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: Okay,the pending deprecation is in. Keeping open as a reminder to turn that into a real DeprecationWarning in 3.10 after the 3.9 branch is cut. We'll then want to track reminding us to remove it in 3.12. --

[issue40378] ast.parse fails to trigger SyntaxWarning that normal execution does

2020-04-24 Thread Anthony Sottile
New submission from Anthony Sottile : compare the following: ``` if False: 'foo'(1) ``` $ python3.9 Python 3.9.0a5 (default, Mar 23 2020, 23:11:30) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> ast.parse(b"if False: 'foo'(1)")

[issue40374] collections.abc docs table: Mapping missing __reversed__

2020-04-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40374] collections.abc docs table: Mapping missing __reversed__

2020-04-24 Thread Thor Whalen
Thor Whalen added the comment: Dennis, Thanks for the (very complete) explanation. I induced to err because of the following confusing facts: ``` from collections.abc import Mapping, Sequence import sys if sys.version_info <= (2, 7): assert '__reversed__' not in dir(Mapping) elif

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: Fun fact. When I wrote my "class NumpyRandom(random.BaseRandom):" example, I found a quite serious bug in numpy: "default_rng.integers(2**32) always return 0" https://github.com/numpy/numpy/issues/16066 Even numpy is not perfect yet :-) --

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread Mark Dickinson
Mark Dickinson added the comment: [Tim] > Mark, you don't count ;-) Yes, I was suspecting I'd fail the "real world" test. Fair enough. :-) -- ___ Python tracker ___

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread Tim Peters
Tim Peters added the comment: Mark, you don't count ;-) Neither do I. Of course I've subclassed Random too, to experiment with other base generators (including PCG variants). But they're throwaways, and I don't care that it can require staring at the code to make as many changes as

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: I see 3 options to fix randbytes() in subclasses: (A) Remove the randbytes() optimization (C implementation): always implement it with getrandbits(). (B) Add BaseRandom base class: PR 19631. (C) Modify __init_subclass__() to implement randbytes() with

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread Mark Dickinson
Mark Dickinson added the comment: [Victor] > Honestly, if you consider that BaseRandom base class is not worth it, I will > just abandon this idea. It's not that I think it's not worth it (I'm not currently convinced either way). It's more that if we're going to make a change, then it's

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: Raymond Hettinger: "It is not okay to flat out ignore the opposing comments from the module maintainers. Being on the steering committee isn't a license to do whatever you want, ignoring published APIs, breaking user code, and ignoring other contributors.

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: Mark: > With the various competing options and the lack of agreement on what (if > anything) should be done, this feels like PEP territory. Honestly, if you consider that BaseRandom base class is not worth it, I will just abandon this idea. I'm not

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: Antoine: > However, if we want to think about a new subclassing API, it may be worth > looking at the recent Numpy changes. Numpy added a new random generator API > recently, with a design based on composition rather than inheritance (and > also they

[issue40375] Add the UNSELECT command to imaplib

2020-04-24 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9216] FIPS support for hashlib

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: Christian Heimes: "Instead if doing a FIPS test, users and applications should perform a feature test and handle the error. The approach is future-proof and can also cover crypto policies restriction like minimum key sizes." Alright, I see. Thanks for your

[issue40334] PEP 617: new PEG-based parser

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: Lysandros: > This is now fixed. Thanks, that was quick ;-) -- ___ Python tracker ___ ___

[issue9216] FIPS support for hashlib

2020-04-24 Thread Christian Heimes
Christian Heimes added the comment: I'm against exposing the function as hashlib.get_fips_mode() because it is an internal implementation detail. I don't want to confuse users or make users think that "if hashlib.get_fips_mode()" is sufficient for feature tests. For starters there are

[issue9216] FIPS support for hashlib

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: Petr Viktorin and Christian Heimes convinced me that it's a bad idea to expose OpenSSL FIPS_mode() as a public hashlib.get_fips_mode() function. It is too specific to OpenSSL. For example, FIPS_mode() result is a number which is specific to OpenSSL. Other

[issue9216] FIPS support for hashlib

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: I'm trying to understand how "portable" is it to expose OpenSSL FIPS_mode() as hashlib.get_fips_mode() which would return a boolean (True or False). It seems like FIPS is more complex than that. Other crypto libraries which implement FIPS have a different

[issue40370] AIX: ld_so_aix not found during test of test_peg_generator

2020-04-24 Thread Michael Felt
Michael Felt added the comment: Thanks for the quick response. I see both bots are good. -- ___ Python tracker ___ ___

[issue40334] PEP 617: new PEG-based parser

2020-04-24 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: > test_peg_generator leaks references. This is now fixed. -- ___ Python tracker ___ ___

[issue40334] PEP 617: new PEG-based parser

2020-04-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 24ffe705c30e36c82940d75fd1454256634d0b3c by Lysandros Nikolaou in branch 'master': bpo-40334: Rewrite test_c_parser to avoid memory leaks (GH-19694) https://github.com/python/cpython/commit/24ffe705c30e36c82940d75fd1454256634d0b3c

[issue9216] FIPS support for hashlib

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: > I'm fine with a used_for_security flag and functions to get/set FIPS state. > Something like hashlib.get_fips_mode() is useful for testing. I proposed PR 19703 to expose OpenSSL FIPS_mode() as hashlib.get_fips_mode(). FIPS support was introduced in

[issue9216] FIPS support for hashlib

2020-04-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +19021 pull_request: https://github.com/python/cpython/pull/19703 ___ Python tracker ___

[issue40377] APPDATA location in Microsoft Store version

2020-04-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40377] APPDATA location in Microsoft Store version

2020-04-24 Thread Stephan Troyer
New submission from Stephan Troyer : In Microsoft Store apps, access to %APPDATA% and %LOCALAPPDATA% gets transparently redirected to an app specific location (such as %LOCALAPPDATA%\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\). This is perfect for saving settings

[issue40376] documentation for os.getgrouplist potentially misleading

2020-04-24 Thread Jens Holzkämper
Change by Jens Holzkämper : -- keywords: +patch pull_requests: +19020 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19702 ___ Python tracker ___

[issue40376] documentation for os.getgrouplist potentially misleading

2020-04-24 Thread Jens Holzkämper
New submission from Jens Holzkämper : https://docs.python.org/3/library/os.html#os.getgrouplist states „Return list of group ids that user belongs to. If group is not in the list, it is included; typically, group is specified as the group ID field from the password record for user.“, but the

[issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom()

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: Thanks Ed Maste, Conrad Meyer, Kyle Evans and Kubilay Kocak! I ran a benchmark: vstinner@freebsd$ env/bin/python -m pyperf command -v -- ./python -c 'import subprocess, sys; args=[sys.executable, "-sS", "-c", "pass"]; subprocess.run(args)' The

[issue37790] subprocess.Popen() is extremely slow (with close_fds=True which is the default) on Illumos

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: I merged FreeBSD changes: New changeset 162c567d164b5742c0d1f3f8bd8c8bab9c117cd0 by Victor Stinner in branch 'master': bpo-38061: os.closerange() uses closefrom() on FreeBSD (GH-19696)

[issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom()

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset e6f8abd500751a834b6fff4f107ecbd29f2184fe by Victor Stinner in branch 'master': bpo-38061: subprocess uses closefrom() on FreeBSD (GH-19697) https://github.com/python/cpython/commit/e6f8abd500751a834b6fff4f107ecbd29f2184fe --

[issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom()

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 162c567d164b5742c0d1f3f8bd8c8bab9c117cd0 by Victor Stinner in branch 'master': bpo-38061: os.closerange() uses closefrom() on FreeBSD (GH-19696) https://github.com/python/cpython/commit/162c567d164b5742c0d1f3f8bd8c8bab9c117cd0 --

[issue37790] subprocess.Popen() is extremely slow (with close_fds=True which is the default) on Illumos

2020-04-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think we would accept a PR since it would probably be trivial, but someone has to submit it :-) -- ___ Python tracker ___

[issue37790] subprocess.Popen() is extremely slow (with close_fds=True which is the default) on Illumos

2020-04-24 Thread John Levon
John Levon added the comment: closefrom() is on both Solaris and illumos too - and might even have originated there as an API - so if that's the issue, it should be trivially fixable -- ___ Python tracker

[issue40286] Add randbytes() method to random.Random

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: Raymond: > The randbytes() method needs to depend on genrandbits(). I created PR 19700 which allows to keep the optimization (C implementation in _randommodule.c) and Random subclasses implement randbytes() with getrandbits(). --

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-24 Thread STINNER Victor
STINNER Victor added the comment: I created this issue to address Raymond's comment: "The randbytes() method needs to depend on genrandbits()." https://bugs.python.org/issue40286#msg366860 I wrote PR 19700 to address that and only that. With PR 19700, Random subclasses get a randbytes()

  1   2   >