[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: The old, long discussion of Shell indents is #7676 and a preceding issue reference therein. My replacement is #37892. The PR patch is simple enough to apply by to existing 3.7.5 and 3.8.0 installs. -- stage: patch review -> test needed

[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-10-30 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +16533 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/17008 ___ Python tracker

[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Interesting. The result of making these changes is legal code looking like >>> if a: if b: c = 3 This has been proposed as the way Shell should work, but rejected as likely too confusing to beginners as the indented code does not look indented

[issue38648] Py_tp_free is specified twice in Python-ast.c

2019-10-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset bdac32e9fe25fdb97a7172a93aabd1ffead89462 by Benjamin Peterson (Max Bernstein) in branch 'master': closes bpo-38648: Remove double tp_free slot in Python-ast.c. (GH-17002)

[issue38576] CVE-2019-18348: CRLF injection via the host part of the url passed to urlopen()

2019-10-30 Thread Anselmo Melo
Change by Anselmo Melo : -- nosy: +Anselmo Melo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 951b6c314a8567be3b5d901059fde866c79f5ff0 by Serhiy Storchaka in branch '3.7': [3.7] bpo-38600: NULL -> ``NULL``. (GH-17001) (GH-17004) https://github.com/python/cpython/commit/951b6c314a8567be3b5d901059fde866c79f5ff0 --

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2c921c65e9d0aa7e3a38c96a22d5eec56724da72 by Serhiy Storchaka in branch '3.8': [3.8] bpo-38600: NULL -> ``NULL``. (GH-17001) (GH-17003) https://github.com/python/cpython/commit/2c921c65e9d0aa7e3a38c96a22d5eec56724da72 --

[issue38651] Add WolfSSL support

2019-10-30 Thread Daniel Johnson
New submission from Daniel Johnson : WolfSSL is an SSL library targeted at embedded development that focuses on size and speed. It's also FIPS certified which is is important for anyone working with federal agencies. WolfSSL website: https://www.wolfssl.com/ WolfSSL github:

[issue23903] Generate PC/python3.def by scraping headers

2019-10-30 Thread Steve Dower
Steve Dower added the comment: Reawakening this issue so we can finish it off - the stable ABI has been declared "clean" on python-dev, so there shouldn't be any more concerns about APIs leaking in now. We can assume that everything accessible from the header files should be included in

[issue38650] Add constantness to PyStructSequence_UnnamedField

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16532 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17005 ___ Python tracker

[issue38650] Add constantness to PyStructSequence_UnnamedField

2019-10-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently the variable PyStructSequence_UnnamedField has type "char *". It is used as a special value for setting to the name field of PyStructSequence_Field. But the type of the name field is "const char *". I propose to change the declaration of

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16531 pull_request: https://github.com/python/cpython/pull/17004 ___ Python tracker ___

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16530 pull_request: https://github.com/python/cpython/pull/17003 ___ Python tracker ___

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e835b31d2b212c3c7820364398979cae2a9740b2 by Serhiy Storchaka in branch 'master': bpo-38600: NULL -> ``NULL``. (GH-17001) https://github.com/python/cpython/commit/e835b31d2b212c3c7820364398979cae2a9740b2 --

[issue38649] tkinter messagebox is sloppy

2019-10-30 Thread David Lambert
New submission from David Lambert : Does aksokcancel return "true" or True ? The docstring should say True This is pervasive throughout the module. tkinter has such a mishmash of numbers supplied as strings, strings supplied as constants making this carelessness egregious. On the topic

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f2ba17be2aec873741c2d8a55b1342afa360aec2 by Serhiy Storchaka in branch '3.8': [3.8] bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) (GH-16999)

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7f7f986cc485c40d80bae504333e3946ce9e96ba by Serhiy Storchaka in branch '3.7': [3.7] bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) (GH-17000)

[issue38648] Py_tp_free is specified twice in Python-ast.c

2019-10-30 Thread Maxwell Bernstein
Change by Maxwell Bernstein : -- keywords: +patch pull_requests: +16529 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17002 ___ Python tracker

[issue38648] Py_tp_free is specified twice in Python-ast.c

2019-10-30 Thread Maxwell Bernstein
New submission from Maxwell Bernstein : This looks like a typo due to copy-paste. -- messages: 355726 nosy: tekknolagi priority: normal severity: normal status: open title: Py_tp_free is specified twice in Python-ast.c versions: Python 3.8 ___

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16528 pull_request: https://github.com/python/cpython/pull/17001 ___ Python tracker ___

[issue38647] Why only the MacOSXOSAScript in webbrowser does not have the name property?

2019-10-30 Thread Yoshihiro Nagano
New submission from Yoshihiro Nagano : Hello. I am using the webbrowser library in macOS and just found that only the MacOSXOSAScript object has `_name` property instead of `name.` All of the other class, which is inherited from the BaseBrowser, has `name` property. Are there any specific

[issue38637] fix GROWTH_RATE comments bug

2019-10-30 Thread Brandt Bucher
Brandt Bucher added the comment: This PR was closed as invalid for the same reasons Steven mentioned above. -- nosy: +brandtbucher resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue38646] Invalid check on the result of pthread_self() leads to libpython startup failure

2019-10-30 Thread Tom Lane
New submission from Tom Lane : Assorted code in the Python core supposes that the result of pthread_self() cannot be equal to PYTHREAD_INVALID_THREAD_ID, ie (void *) -1. If it is, you get a crash at interpreter startup. Unfortunately, this supposition is directly contrary to the POSIX

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16527 pull_request: https://github.com/python/cpython/pull/17000 ___ Python tracker ___

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16526 pull_request: https://github.com/python/cpython/pull/16999 ___ Python tracker ___

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-30 Thread Batuhan
Batuhan added the comment: $ ./python -m pyperf timeit -s "from math import floor" --duplicate 100 "floor(12345.6)" Before: Mean +- std dev: 52.5 ns +- 2.6 ns After: Mean +- std dev: 71.0 ns +- 1.7 ns $ ./python -m pyperf timeit -s "from math import ceil" --duplicate 100 "ceil(12345.6)"

[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-10-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1d8da61f5ad26274556e0bbce260ce292d0402a1 by Victor Stinner in branch 'master': bpo-38631: Avoid Py_FatalError() in readline (GH-16998) https://github.com/python/cpython/commit/1d8da61f5ad26274556e0bbce260ce292d0402a1 --

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +belopolsky, p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error

2019-10-30 Thread Michael Zhang
New submission from Michael Zhang : Discovered this while trying to use a function in `boto3`. Seems like when tzlocal() is passed with a 0 to datetime.datetime.fromtimestamp(), it throws an "[Errno 22] Invalid argument" error. Using 3.7.4 via Anaconda on Windows 10, and tzlocal().tznames's

[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-10-30 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +16525 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16998 ___ Python tracker ___

[issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8

2019-10-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset a4ed6ed9f3779b6eda41bb65f5c09004a2b937ef by Victor Stinner in branch 'master': bpo-38614: Increase asyncio test_communicate() timeout (GH-16995) https://github.com/python/cpython/commit/a4ed6ed9f3779b6eda41bb65f5c09004a2b937ef --

[issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8

2019-10-30 Thread STINNER Victor
STINNER Victor added the comment: PR 16995 should be backported to 3.7 and 3.8, but I will backport it once PR 16964 will be backported. -- ___ Python tracker ___

[issue38644] Pass explicitly tstate to function calls

2019-10-30 Thread STINNER Victor
STINNER Victor added the comment: PR 16997 is a first step. The second step will be to pass tstate to: * _PyObject_Vectorcall() * _PyObject_MakeTpCall() * _Py_CheckFunctionResult() (I have a local branch that I have to rewrite on top of PR 16997.) --

[issue38644] Pass explicitly tstate to function calls

2019-10-30 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +16524 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16997 ___ Python tracker ___

[issue38644] Pass explicitly tstate to function calls

2019-10-30 Thread STINNER Victor
New submission from STINNER Victor : Follow-up of bpo-36710 for function calls. -- components: Interpreter Core messages: 355716 nosy: vstinner priority: normal severity: normal status: open title: Pass explicitly tstate to function calls versions: Python 3.9

[issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base

2019-10-30 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +16523 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16996 ___ Python tracker ___

[issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base

2019-10-30 Thread Zackery Spytz
New submission from Zackery Spytz : If a base other than 2, 8, or 16 is passed to PyNumber_ToBase(), an assertion failure will occur. An exception should be raised instead. This was mentioned in bpo-38249 (msg353039). -- components: Interpreter Core messages: 355715 nosy:

[issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8

2019-10-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16522 pull_request: https://github.com/python/cpython/pull/16995 ___ Python tracker ___

[issue38642] python3.7.3 seems to cause add-apt-repository to rejct or not find gi library

2019-10-30 Thread Marco Ippolito
New submission from Marco Ippolito : Following the indications found here: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository I was trying to install Docker Engine in Ubuntu 18.04.02 Server Edition. The first installation's steps went fine but I encountered

[issue38641] lib2to3 does not support py38 return/yield syntax with starred expressions

2019-10-30 Thread Vlad Emelianov
Change by Vlad Emelianov : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38641] lib2to3 does not support py38 return/yield syntax with starred expressions

2019-10-30 Thread Vlad Emelianov
New submission from Vlad Emelianov : Lib2to3 does not support changes made in https://bugs.python.org/issue32117 ```python def test(): my_list = ["value2", "value3"] yield "value1", *my_list return "value1", *my_list ``` The idea is to use `testlist_star_expr` instead of

[issue32117] Tuple unpacking in return and yield statements

2019-10-30 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +16520 pull_request: https://github.com/python/cpython/pull/16994 ___ Python tracker ___

[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-10-30 Thread Stephen Paul Chappell
Stephen Paul Chappell added the comment: When I start IDLE and the shell window appears, my first task is to press "Alt + T" to change from using tabs to spaces and then "Alt + U" to change from using 8 spaces to 4. This allows code pasted from the shell into an editor window or other IDE

[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread miss-islington
miss-islington added the comment: New changeset dcb338ea1b8f14e21dde3564658b9040df996349 by Miss Skeleton (bot) in branch '3.8': bpo-38640: Allow break and continue in always false while loops (GH-16992) https://github.com/python/cpython/commit/dcb338ea1b8f14e21dde3564658b9040df996349

[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks, Hugo Dupras for the report! :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +16519 pull_request: https://github.com/python/cpython/pull/16993 ___ Python tracker ___

[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 6c3e66a34b95fff07df0ad5086104dd637a091ce by Pablo Galindo in branch 'master': bpo-38640: Allow break and continue in always false while loops (GH-16992) https://github.com/python/cpython/commit/6c3e66a34b95fff07df0ad5086104dd637a091ce

[issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8

2019-10-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 24c6258269acd842914450f55491690ba87dded9 by Victor Stinner in branch 'master': bpo-38614: Add timeout constants to test.support (GH-16964) https://github.com/python/cpython/commit/24c6258269acd842914450f55491690ba87dded9 --

[issue28029] Replace and empty strings

2019-10-30 Thread STINNER Victor
STINNER Victor added the comment: > Because of possible compatibility issue (very unlikely) this change is done > only in master and will not be backported. Yeah, I agree. It would be a mistake to change the Python behavior in a minor release. --

[issue38630] subprocess.Popen.send_signal() should poll the process

2019-10-30 Thread STINNER Victor
STINNER Victor added the comment: > subprocess.Popen.send_signal() doesn't check if the process exited since the > poll() method has been called for the last time. If the process exit just > before os.kill() is called, the signal can be sent to the wrong process if > the process identified

[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +16518 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16992 ___ Python tracker

[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +3.8regression nosy: +pablogsal, serhiy.storchaka ___ Python tracker ___ ___

[issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0

2019-10-30 Thread Mark Dickinson
Mark Dickinson added the comment: > Maybe we should hold-off on adding negative number support unless a > compelling use case arises. +100. It makes little sense mathematically, and I'm sceptical that such use cases exist in real life. -- ___

[issue28029] Replace and empty strings

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because of possible compatibility issue (very unlikely) this change is done only in master and will not be backported. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 2.7, Python 3.5,

[issue28029] Replace and empty strings

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 865c3b257fe38154a4320c7ee6afb416f665b9c2 by Serhiy Storchaka in branch 'master': bpo-28029: Make "".replace("", s, n) returning s for any n != 0. (GH-16981) https://github.com/python/cpython/commit/865c3b257fe38154a4320c7ee6afb416f665b9c2

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 25fc088607c855060ed142296dc1bd0125fad1af by Serhiy Storchaka in branch 'master': bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) https://github.com/python/cpython/commit/25fc088607c855060ed142296dc1bd0125fad1af

[issue38636] IDLE regression: toggle tabs and change indent width functions

2019-10-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Both the menu items and the short cuts for these two functions on the Format menu give these call errors. They are only visible if IDLE is started from a console. They work in 3.6; the regression is due to #36390. These 2 functions were moved separately

[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Hugo Dupras
New submission from Hugo Dupras : In python 3.8 the following code raises an exception, which was not the case with previous python. ``` while False: ... break ``` It raises the following exception: SyntaxError: 'break' outside loop. This `while False` loop was used to temporary

[issue38639] Optimize floor(), ceil() and trunc() for floats

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16517 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16991 ___ Python tracker

[issue38639] Optimize floor(), ceil() and trunc() for floats

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: Optimize floor() and ceil() for floats -> Optimize floor(), ceil() and trunc() for floats ___ Python tracker ___

[issue38639] Optimize floor() and ceil() for floats

2019-10-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently math.floor(), math.ceil() and math.trunc() look up special methods __floor__, __ceil__ and __trunc__ correspondingly and execute them if found. Otherwise they execute common code for floats. There are no special slots for these methods, so

[issue38638] Backtrace of exit phase of context managers

2019-10-30 Thread Alexander Kurakin
New submission from Alexander Kurakin : class CM: def __init__(self): pass def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): raise RuntimeError() if __name__ == '__main__': with CM() as cm: print('Hello') $

[issue30548] typo in documentation for create_autospec

2019-10-30 Thread Erik Byström
Erik Byström added the comment: Yes, you're right. I do think the docs are a bit misleading. Maybe something like this would make it more clear? "If a class is used as a spec then the returned object will be a mock of that class. When the constructor of the returned mock class is invoked an

[issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0

2019-10-30 Thread Steven D'Aprano
Steven D'Aprano added the comment: Have you read the rest of the thread? There is a compelling reason to support harmonic mean including zero (resistors in parallel) but not yet any compelling reason to support negative values. If you have a good use-case for harmonic mean of negative

[issue38613] Optimize some set operations in dictkeys object

2019-10-30 Thread Inada Naoki
Inada Naoki added the comment: done. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0

2019-10-30 Thread gaoxinge
gaoxinge added the comment: Your point makes sense. We should still also consider the `int`, `Decimal`, `Fraction`, `math.nan`, `math.inf`, `np.int` and so on. So - `geometric mean`: input should be positive (>= 0) - `harmonic mean`: input should be nonzero (!= 0) - `mean` or `fmean`: no