[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-01-22 Thread Eryk Sun
Eryk Sun added the comment: > no need to remove that message. I was discussing the wrong API. It's not directly relevant that Windows API functions that access the process environment are protected by the PEB lock. Python primarily uses [_w]environ, a copy of the process environment that's

[issue38860] GenericPyCData_new does not invoke new or init

2020-01-22 Thread Justin Capella
Justin Capella added the comment: Becca were you still interested in this issue? Anyone agree the unit test seems to have a bug if that is intended behavior? Is there a better forum for discussion about design/behavior, maybe the more generic issue of GenericPyCData_new using tp_alloc inste

[issue39397] Mac : fail to launch Python 3.8

2020-01-22 Thread Sebastien Foo
Sebastien Foo added the comment: Thanks a lot for you help, my issue is solved. My ~/.zshrc was having a LANG env var set to LANG=en_US I just commented out this line and everything works fine. I don't know why this was set like that. Thanks again for your time you can close this ticket

[issue39417] Link to "Python Packaging User Guide: Creating and using virtual environments" is broken

2020-01-22 Thread Angel Cervera Claudio
New submission from Angel Cervera Claudio : The link "See also: Python Packaging User Guide: Creating and using virtual environments" Is broken. The problem is in line 30 of https://github.com/python/cpython/blob/3.8/Doc/library/venv.rst I don't know the right link, so I can not fix it. I a

[issue39417] Link to "Python Packaging User Guide: Creating and using virtual environments" is broken

2020-01-22 Thread Ammar Askar
Ammar Askar added the comment: Hi Angel, thank you for the report! The file that corresponds to that documentation is here https://github.com/python/cpython/blob/master/Doc/library/venv.rst and we'd be happy to have you make a PR for it :) -- nosy: +ammar2 _

[issue39417] Link to "Python Packaging User Guide: Creating and using virtual environments" is broken

2020-01-22 Thread Ammar Askar
Ammar Askar added the comment: Oh and I think the new link should point here: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment -- ___ Python tracker

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-22 Thread Inada Naoki
Inada Naoki added the comment: New changeset 5bbac8cbdf140ebce446ea4e7db2b20a5d7b8402 by Inada Naoki in branch 'master': bpo-39377: json: Update doc about the encoding option. (GH-18076) https://github.com/python/cpython/commit/5bbac8cbdf140ebce446ea4e7db2b20a5d7b8402 -- __

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-22 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue39411] pyclbr rewrite using AST

2020-01-22 Thread Batuhan
Batuhan added the comment: Thanks for the suggestions Terry, I didn't want to change any behavior or make any feature addition (except is_async as stated in issue description) in this PR. > The change is needed 2 other places. Could be part of this PR or another one. I have a friend who w

[issue39418] str.strip() should have a means of adding to the default behaviour

2020-01-22 Thread Natalie Amery
New submission from Natalie Amery : If I want to remove the default set of 'whitespace' characters plus something else from a string there's currently no way to cleanly specify that. In addition there's no way to programatically acquire what characters are considered whitespace so you can't

[issue39418] str.strip() should have a means of adding to the default behaviour

2020-01-22 Thread Natalie Amery
Natalie Amery added the comment: Oops, sorry, that should say 'strip' througout not 'split'. My bad. -- ___ Python tracker ___ ___

[issue39418] str.strip() should have a means of adding to the default behaviour

2020-01-22 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is a new feature, not a bug, so it will apply only to 3.9. All older versions are in feature freeze. > there's no way to programatically acquire what characters are considered > whitespace https://docs.python.org/3/library/stdtypes.html#str.isspace h

[issue39397] Mac : fail to launch Python 3.8

2020-01-22 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset f84f65be5602e561fef04b66bb487fbc4e560db5 by Victor Stinner in branch '3.8': bpo-39413: os.unsetenv() is not available on Windows (GH-18108) https://github.com/python/cpython/commit/f84f65be5602e561fef04b66bb487fbc4e560db5 -- _

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +17501 pull_request: https://github.com/python/cpython/pull/18114 ___ Python tracker ___ __

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread miss-islington
miss-islington added the comment: New changeset 570724667d37fcb160cdef2b34190dc36e28155c by Miss Islington (bot) in branch '3.7': bpo-39413: os.unsetenv() is not available on Windows (GH-18108) https://github.com/python/cpython/commit/570724667d37fcb160cdef2b34190dc36e28155c -- nosy

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17502 pull_request: https://github.com/python/cpython/pull/18115 ___ Python tracker ___ __

[issue39418] str.strip() should have a means of adding to the default behaviour

2020-01-22 Thread Steven D'Aprano
Steven D'Aprano added the comment: There's a discrepancy between the string.whitespace constant and actual whitespace as tested by the str.isspace() method. I've found five ASCII whitespace characters (as reported by isspace) which aren't in the string.whitespace constant, and 18 non-ASCII w

[issue39416] Document default numeric string formats

2020-01-22 Thread Karl O. Pinc
Karl O. Pinc added the comment: On Wed, 22 Jan 2020 06:09:41 + "Eric V. Smith" wrote: > Eric V. Smith added the comment: > > Is the lack of this documentation causing some confusion somewhere? > This isn't rhetorical, I'm genuinely curious what problem you're > trying to solve. I'd say

[issue39418] str.strip() should have a means of adding to the default behaviour

2020-01-22 Thread Natalie Amery
Natalie Amery added the comment: https://bugs.python.org/issue25433 has a summary of the issue about what actually constitutes whitespace from the perspective of improving the documentation. In terms of what strip does it turns out that string.whitespace is a red herring. A list of whitespa

[issue39418] str.strip() should have a means of adding to the default behaviour

2020-01-22 Thread Steven D'Aprano
Steven D'Aprano added the comment: Attached is a script I used to test: * that str.isspace() currently matches the definition given in the docs; * that string.whitespace contains all whitespace characters, and nothing but whitespace; * that str.strip() strips off all whitespace characters,

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2020-01-22 Thread Erik Aronesty
Erik Aronesty added the comment: > The Scripts/bin thing is not specific to venv - for whatever reason, the > original Windows implementation chose to use "Scripts" rather than "bin" That's irrelevant to the PR, which solves the problem in a compatible way. There's no compatibility issues

[issue39419] Core dump when trying to use workaround for custom warning category (Fatal Python error: init_sys_streams: can't initialize sys standard streams)

2020-01-22 Thread Gerrit Holl
New submission from Gerrit Holl : Pythons commandline warning filter cannot currently handle custom warning categories. See https://bugs.python.org/issue22543 I tried a workaround as suggested on Stack Overflow to filter on a warning category de

[issue39082] AsyncMock is unable to correctly patch static or class methods

2020-01-22 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +17503 pull_request: https://github.com/python/cpython/pull/18116 ___ Python tracker ___ ___

[issue39082] AsyncMock is unable to correctly patch static or class methods

2020-01-22 Thread Matt Kokotovich
Matt Kokotovich added the comment: I'd love to see this issue resolved, as it is keeping me from being able to switch to 3.8. I have a PR with Karthikeyan's suggestion, as I agree it makes more sense and could apply to more cases: https://github.com/python/cpython/pull/18116 -- __

[issue39395] The os module should unset() environment variable at exit

2020-01-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- type: -> crash versions: +Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue39395] The os module should unset() environment variable at exit

2020-01-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue39406 is a new feature. In any case we should fix potential crash in older Python versions. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue39395] The os module should unset() environment variable at exit

2020-01-22 Thread STINNER Victor
Change by STINNER Victor : -- versions: -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39395] The os module should unset() environment variable at exit

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: > Issue39406 is a new feature. In any case we should fix potential crash in > older Python versions. Python 3.8 and older are not affected by this issue since they never destroy the posix_putenv_garbage dictionary: memory is never released. --

[issue39420] Windows: convertenviron() doesn't parse environment variables properly

2020-01-22 Thread STINNER Victor
New submission from STINNER Victor : os.environ is created by convertenviron() of posixmodule.c. The Windows implementation calls _wgetenv(L"") to initialize _wenviron, and then parses the _wenviron string. The _wenviron string is parsed by search for the first "=" character to split between

[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-22 Thread Dk0n9
Change by Dk0n9 : -- components: Extension Modules nosy: dk0n9 priority: normal severity: normal status: open title: Use-after-free in heappushpop() of heapq module type: crash versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python track

[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-22 Thread Dk0n9
New submission from Dk0n9 : The variable `heap` in heappushpop does not add a reference count ```c cmp = PyObject_RichCompareBool(PyList_GET_ITEM(heap, 0), item, Py_LT); if (cmp < 0) return NULL; if (cmp == 0) { Py_INCREF(item); return item; } ``` POC: ``

[issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits

2020-01-22 Thread Alex Rebert
Change by Alex Rebert : -- pull_requests: +17504 pull_request: https://github.com/python/cpython/pull/18117 ___ Python tracker ___ _

[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-22 Thread Dong-hee Na
Dong-hee Na added the comment: Reproducible. It looks similar to bpo-38588. We will apply the same solution as we did at bpo-38588? or do we plan to apply the solution which is suggested on msg359023? -- nosy: +corona10, inada.naoki, pablogsal ___

[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-22 Thread Dong-hee Na
Change by Dong-hee Na : -- stage: -> needs patch versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-22 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue39408] Add support for SQLCipher

2020-01-22 Thread Manjusaka
Manjusaka added the comment: To be serious, I don't think using SQLCipher is a good idea for CPython Cause, SQLCipher is always released by the source code, not the binary. That means we should compile and manage the binary on different platforms, sush as ffi on windows, Openssl on Windows.

[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: To be honest, given how many ways this bug happens I think its time to consider msg359023. -- ___ Python tracker ___

[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-22 Thread Dong-hee Na
Dong-hee Na added the comment: > To be honest, given how many ways this bug happens I think its time to > consider msg359023. +1 to me also -- ___ Python tracker ___ ___

[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: AS this discussion will take a while and likely will have deeper consequences, in the meantime I created PR18118 to specifically fix this. -- stage: patch review -> needs patch ___ Python tracker

[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-22 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +17505 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18118 ___ Python tracker ___

[issue39422] datetime.datetime.strptime incorrectly interpretting format '%Y%m%d'

2020-01-22 Thread Cleland Loszewski
New submission from Cleland Loszewski : ```python from datetime import datetime print(datetime.strptime('2020016', '%Y%m%d')) print(datetime.strptime('20200116', '%Y%m%d')) ``` The former string has a format that does not match '%Y%m%d', but the latter does. Both report the same datatime outpu

[issue39423] Process finished with exit code -1073741819 (0xC0000005) when trying to access data from a pickled file

2020-01-22 Thread mapf
New submission from mapf : I have a program where I create some relatively nested data and within the same session, I have no issues accessing the data. I then use picke.dump() with pickle.HIGHEST_PROTOCOL to save the data so I can access it in a later session. These files are usually over 2GB

[issue31405] shutil.which doesn't find files without PATHEXT extension on Windows

2020-01-22 Thread Manjusaka
Manjusaka added the comment: Hello Anthony would you mind to execute this command on your PC? python -c "import os; print(os.environ.get("PATHEXT", "").split(os.pathsep))" and show the result about this code? -- nosy: +Manjusaka ___ Python tracke

[issue39422] datetime.datetime.strptime incorrectly interpretting format '%Y%m%d'

2020-01-22 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue39423] Process finished with exit code -1073741819 (0xC0000005) when trying to access data from a pickled file

2020-01-22 Thread mapf
mapf added the comment: I forgot to mention that sometimes, when I dump and load the data in the same session and try to access / use the data in question, I get the following Error: "Fatal Python error: GC object already tracked" -- ___ Python tr

[issue39421] Use-after-free in heappushpop() of heapq module

2020-01-22 Thread Dong-hee Na
Dong-hee Na added the comment: @pablogsal I agree with hotfix is needed and also for discussion. I left a comment for PR 18118. Please take a look :) -- ___ Python tracker __

[issue31405] shutil.which doesn't find files without PATHEXT extension on Windows

2020-01-22 Thread Anthony Sottile
Anthony Sottile added the comment: sure, it's the standard PATHEXT (basically a fresh vm from modern.ie) -- the only reason I noticed this is I was reading the source: https://github.com/python/cpython/blob/5bbac8cbdf140ebce446ea4e7db2b20a5d7b8402/Lib/shutil.py#L1367-L1373 C:\Users\IEUser>

[issue39424] test_signal: test_pidfd_send_signal() uses deprecated assertRaisesRegexp() method

2020-01-22 Thread STINNER Victor
New submission from STINNER Victor : test_signal.test_pidfd_send_signal() should use assertRaisesRegex() rather than assertRaisesRegexp(): $ ./python -Werror -m test -v test_signal -m test_pidfd_send_signal (...) == ERROR: te

[issue39422] datetime.datetime.strptime incorrectly interpretting format '%Y%m%d'

2020-01-22 Thread SilentGhost
SilentGhost added the comment: They do not "report same datetime output". Did you mean to use '20200106' as the second input string? Because, leading zeros being optional for certain format specifiers is a documented feature of strptime. -- nosy: +SilentGhost status: open -> pending

[issue39425] list.count performance regression

2020-01-22 Thread Dong-hee Na
New submission from Dong-hee Na : ./python.exe -m pyperf timeit -s 'a = [1]*100' 'a.count(1)' Current Master: Mean +- std dev: 1.05 us +- 0.03 us My patch: Mean +- std dev: 423 ns +- 11 ns This is the side-effect of pr 17022. -- assignee: corona10 messages: 360488 nosy: corona10 prio

[issue39425] list.count performance regression

2020-01-22 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +inada.naoki, pablogsal, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue39425] list.count performance regression

2020-01-22 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +17506 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18119 ___ Python tracker ___

[issue38495] print built-in function docs bug

2020-01-22 Thread Julien Palard
Julien Palard added the comment: PR 17062 about stating it's a space by default has been rejected. I also feel we should just enhance the space width in the prototype. I personally see the space, but as it's in italic, I can understand it's very easy to miss it. I like the `font-family: mono

[issue39420] Windows: convertenviron() doesn't parse environment variables properly

2020-01-22 Thread Eryk Sun
Eryk Sun added the comment: > The problem is that the _wputenv() function allows to insert variable > names containing the "=" character No, it does not. Your experiments uncovered bugs elsewhere with the implementations of _wgetenv and WINAPI GetEnvironmentVariableW, but this isn't one of

[issue39425] list.count performance regression

2020-01-22 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue39425] list.count performance regression

2020-01-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +17508 pull_request: https://github.com/python/cpython/pull/18121 ___ Python tracker ___ __

[issue39425] list.count performance regression

2020-01-22 Thread miss-islington
miss-islington added the comment: New changeset 14d80d0b605d8b148e14458e4c1853a940071462 by Miss Islington (bot) (Dong-hee Na) in branch 'master': bpo-39425: Fix list.count performance regression (GH-18119) https://github.com/python/cpython/commit/14d80d0b605d8b148e14458e4c1853a940071462 --

[issue39425] list.count performance regression

2020-01-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +17507 pull_request: https://github.com/python/cpython/pull/18120 ___ Python tracker ___ __

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-22 Thread Manuel Barkhau
Change by Manuel Barkhau : -- pull_requests: +17509 pull_request: https://github.com/python/cpython/pull/18122 ___ Python tracker ___ __

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2020-01-22 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue39425] list.count performance regression

2020-01-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset fdb21609d944941f0732df72dc3d07a7a9a7efea by Pablo Galindo (Miss Islington (bot)) in branch '3.8': bpo-39425: Fix list.count performance regression (GH-18119) (GH-18120) https://github.com/python/cpython/commit/fdb21609d944941f0732df72dc3d

[issue39425] list.count performance regression

2020-01-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks for the PR, Dong-hee Na :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue39425] list.count performance regression

2020-01-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 9e06d61af30bac4fcacb7973f826147ccc010392 by Pablo Galindo (Miss Islington (bot)) in branch '3.7': bpo-39425: Fix list.count performance regression (GH-18119) (GH-18121) https://github.com/python/cpython/commit/9e06d61af30bac4fcacb7973f826

[issue39422] datetime.datetime.strptime incorrectly interpretting format '%Y%m%d'

2020-01-22 Thread Cleland Loszewski
Cleland Loszewski added the comment: You're right, I did mean the second string to report '20200106'. Looking closer, I see that I was reading the documentation incorrectly and getting hung up on an introduced ambiguity. ```python from datetime import datetime print(datetime.strptime('202001

[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2020-01-22 Thread Brett Cannon
Brett Cannon added the comment: The problem with the hybrid exception is that importlib would then still raise a different exception from import itself, so the discrepancy would persist. And if you updated import you could then break people in another way where they were catching ValueError

[issue39426] Pickler docstring misstates default and highest protocols

2020-01-22 Thread Mark Dickinson
New submission from Mark Dickinson : >From the pickle.Pickler docstring: > The optional *protocol* argument tells the pickler to use the given > protocol; supported protocols are 0, 1, 2, 3 and 4. The default > protocol is 3; a backward-incompatible protocol designed for Python 3. That's out

[issue39426] Pickler docstring misstates default and highest protocols

2020-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Good catch. Do you want to submit a PR? -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue39426] Pickler docstring misstates default and highest protocols

2020-01-22 Thread Mark Dickinson
Mark Dickinson added the comment: > Do you want to submit a PR? Not immediately. I'll add it to my to-do list, but definitely won't complain if someone else gets there first. -- ___ Python tracker

[issue39426] Pickler docstring misstates default and highest protocols

2020-01-22 Thread Mark Dickinson
Change by Mark Dickinson : -- assignee: docs@python -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue39400] pydoc: Use of MANPAGER variable is incorrect

2020-01-22 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +17510 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18123 ___ Python tracker ___ __

[issue38076] Make struct module PEP-384 compatible

2020-01-22 Thread Dino Viehland
Dino Viehland added the comment: With either fix, or with both, on Linux I still see this hang at shutdown. Victor mentioned the fact that he had to hit Ctrl-C on Linux to see this, and I have to do the same thing. Then with the fixes in place the original test case still hangs on shutdown.

[issue39353] Deprecate the binhex module, binhex4 and hexbin4 standards

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset beea26b57e8c80f1eff0f967a0f9d083a7dc3d66 by Victor Stinner in branch 'master': bpo-39353: Deprecate the binhex module (GH-18025) https://github.com/python/cpython/commit/beea26b57e8c80f1eff0f967a0f9d083a7dc3d66 --

[issue39353] Deprecate the binhex module, binhex4 and hexbin4 standards

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: > I agree with deprecating binhex. Good :-) It's now deprecated. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17511 pull_request: https://github.com/python/cpython/pull/18124 ___ Python tracker ___ __

[issue39361] [C API] Document PyTypeObject.tp_print removal in What's New In Python 3.9

2020-01-22 Thread Ammar Askar
Change by Ammar Askar : -- keywords: +patch pull_requests: +17512 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18125 ___ Python tracker ___

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset b73dd02ea744288831f71363a7467552c09875ea by Victor Stinner in branch 'master': Revert "bpo-39413: Implement os.unsetenv() on Windows (GH-18104)" (GH-18124) https://github.com/python/cpython/commit/b73dd02ea744288831f71363a7467552c09875ea -

[issue39406] Implement os.putenv() with setenv() if available

2020-01-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17513 pull_request: https://github.com/python/cpython/pull/18126 ___ Python tracker ___ __

[issue24337] Implement `http.client.HTTPMessage.__repr__` to make debugging easier

2020-01-22 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +17514 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18127 ___ Python tracker ___ __

[issue24337] Implement `http.client.HTTPMessage.__repr__` to make debugging easier

2020-01-22 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz versions: +Python 3.9 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list maili

[issue24337] Implement `http.client.HTTPMessage.__repr__` to make debugging easier

2020-01-22 Thread R. David Murray
R. David Murray added the comment: Thanks for the PR, but I've noted an issue on the review. In any case we should agree on what goes in the repr here in this issue before actually implementing anything. -- ___ Python tracker

[issue39406] Implement os.putenv() with setenv() if available

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0852c7dd52ac42e7843ddfef44571494e4c86070 by Victor Stinner in branch 'master': bpo-39406: os.putenv() avoids putenv_dict on Windows (GH-18126) https://github.com/python/cpython/commit/0852c7dd52ac42e7843ddfef44571494e4c86070 -- __

[issue39406] Implement os.putenv() with setenv() if available

2020-01-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17515 pull_request: https://github.com/python/cpython/pull/18128 ___ Python tracker ___ __

[issue39411] pyclbr rewrite using AST

2020-01-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: A separate doc change issue and PR would be fine. Should we add a note explaining the module name as a contraction of an originally restricted scope? Make me nosy and invite review. Actually, a doc issue for the module as is should *fully* explain readmodu

[issue39425] list.count performance regression

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: The following result is a little bit surprising: >>> nan=float("nan"); ([nan]*5).count(nan) 5 >>> nan == nan False But in fact, the optimization doesn't change the value. It was already 5 previously. In fact, PyObject_RichCompareBool() has a fast path if th

[issue39425] list.count performance regression

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: > In fact, PyObject_RichCompareBool() has a fast path if the two object > pointers are equal It's documented: https://docs.python.org/dev/c-api/object.html?highlight=pyobject_richcomparebool#c.PyObject_RichCompareBool -- ___

[issue39406] Implement os.putenv() with setenv() if available

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset b477d19a6b7751b0c933b239dae4fc96dbcde9c4 by Victor Stinner in branch 'master': bpo-39406: Implement os.putenv() with setenv() if available (GH-18128) https://github.com/python/cpython/commit/b477d19a6b7751b0c933b239dae4fc96dbcde9c4 --

[issue39425] list.count performance regression

2020-01-22 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > The following result is a little bit surprising: haha, I went to exactly the same journey when reviewing this PR :) -- ___ Python tracker _

[issue39366] Remove deprecated nntplib method

2020-01-22 Thread Berker Peksag
Berker Peksag added the comment: New changeset 1f0f102dec506fd06f912b74dd2be64a7fba0d3f by Berker Peksag (Dong-hee Na) in branch 'master': bpo-39366: Remove xpath() and xgtitle() methods of NNTP (GH-18035) https://github.com/python/cpython/commit/1f0f102dec506fd06f912b74dd2be64a7fba0d3f ---

[issue39406] Implement os.putenv() with setenv() if available

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: > Maybe use SetEnvironmentVariable() on Windows? In bpo-39413, I implemented os.unsetenv() on Windows using SetEnvironmentVariable(), but Eryk reported that SetEnvironmentVariable() does not update the CRT API (_environ, _wenviron, getenv, etc.). So

[issue39406] Implement os.putenv() with setenv() if available

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: The initial issue has been fixed, so I close the issue. Big thanks to Eryk Sun for your great help, thanks also Serhiy Storchaka. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue39366] Remove deprecated nntplib method

2020-01-22 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the PR! I'm glad these previously deprecated functions are now gone. -- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Pyt

[issue39395] The os module should unset() environment variable at exit

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: I closed bpo-39406: os.putenv() is now implemented with setenv() if available. The internal putenv_dict is no longer used on Windows and if setenv() is available. Now only non-Windows platforms without setenv() are affected by this issue. -- __

[issue39425] list.count performance regression

2020-01-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17516 pull_request: https://github.com/python/cpython/pull/18130 ___ Python tracker ___ __

[issue39427] python -X options are not documented in the CLI --help

2020-01-22 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : When running python --help there is no documentation on the -X opt options available. It just says: -X opt : set implementation-specific option without what 'opt' can be. -- assignee: pablogsal components: Interpreter Core messages: 360516

[issue39427] python -X options are not documented in the CLI --help

2020-01-22 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +17517 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18131 ___ Python tracker __

[issue39353] Deprecate the binhex module, binhex4 and hexbin4 standards

2020-01-22 Thread Martin Panter
Martin Panter added the comment: Is there a recommended replacement for calculating CRC-CCITT? Do it yourself in Python code, or use a particular external module? -- nosy: +martin.panter ___ Python tracker

[issue39353] Deprecate the binhex module, binhex4 and hexbin4 standards

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: > Is there a recommended replacement for calculating CRC-CCITT? Do it yourself > in Python code, or use a particular external module? What is your use case? -- ___ Python tracker

[issue39353] Deprecate the binhex module, binhex4 and hexbin4 standards

2020-01-22 Thread Martin Panter
Martin Panter added the comment: Building and verifying the checksum in "RTA protocol" that uses this: . But I understand CRC-CCITT is one of the two popular 16-bit CRC polynomials, used in m

[issue35182] Popen.communicate() breaks when child closes its side of pipe but not exits

2020-01-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset d3ae95e1e945ed20297e1c38ba43a18b7a868ab6 by Gregory P. Smith (Alex Rebert) in branch 'master': bpo-35182: fix communicate() crash after child closes its pipes (GH-17020) (GH-18117) https://github.com/python/cpython/commit/d3ae95e1e945ed20297e

  1   2   >