[issue41566] Include much faster DEFLATE implementations in Python's gzip and zlib libraries. (isa-l)

2020-08-18 Thread Ruben Vorderman
Ruben Vorderman added the comment: I just find out that libdeflate does not support streaming: https://github.com/ebiggers/libdeflate/issues/73 . I should have read the manual better. So that explains the memory usage. Because of that I don't think it is suitable for usage in CPython.

[issue41513] Scale by power of two in math.hypot()

2020-08-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +21032 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/21916 ___ Python tracker ___

[issue41566] Include much faster DEFLATE implementations in Python's gzip and zlib libraries. (isa-l)

2020-08-18 Thread Ruben Vorderman
Ruben Vorderman added the comment: > That might be an option then. CPython could use the existing library if it is > available. Dynamic linking indeed seems like a great option here! Users who care about this will probably have the 'isal' and 'libdeflateO' packages installed on their

[issue41565] from os.path import join join('3', '{:3') return '{:3' in windows

2020-08-18 Thread Eryk Sun
Eryk Sun added the comment: > I mean,os.path.join('3', '{:3') return '{:3' in windows, However, > os.path.join('3', '{:3') return '3/{:3'in linux, output result not > '3' in windows, why? The implementation of ntpath.join handles "{:" as a drive. Thus "{:3" is a drive-relative path, i.e.

[issue41565] from os.path import join join('3', '{:3') return '{:3' in windows

2020-08-18 Thread Paul Moore
Paul Moore added the comment: I think the key point here is that os.path.join is *meant* to have platform-native semantics, so it treats '{:' as a drive letter on Windows, but Linux doesn't have drive letters, so os.path.join treats '{:' as a normal part of a filename on Linux. --

[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

2020-08-18 Thread Michael Felt
Michael Felt added the comment: As much as I wish I had the skills to do the cherry picking - I am not going to touch this. The AIX bots for 3.9 branch continue to report broken for test_io (ENV change) - as they still wait for the backport for that branch! --

[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-18 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41565] from os.path import join join('3', '{:3') return '{:3' in windows

2020-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because '{' in '{:3' is a drive letter. When you open file with path '{:3' you open file with name '3' in the current directory of drive '{', not file with name '{:3' on current drive and directory. It is not a Python bug. If you think there is a bug,

[issue41565] from os.path import join join('3', '{:3') return '{:3' in windows

2020-08-18 Thread Eryk Sun
Eryk Sun added the comment: It's worth mentioning that pathlib restricts the first character of a Windows drive name to the set of ASCII letters in pathlib._WindowsFlavour.drive_letters. For example: >>> Path('3') / 'C:3' WindowsPath('C:3') vs. >>> Path('3') / '{:3'

[issue41513] Scale by power of two in math.hypot()

2020-08-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Hmm, I tried-out a C implementation and the timings weren't bad, 60% slower in exchange for always being correctly rounded. Do you all think that would be worth it? # New correctly rounded $ ./python.exe -m timeit -r11 -s 'from math import hypot'

[issue41574] Python[11231:143796] WARNING: running implicitly; please run panels using NSSavePanel rather than NSApplication.

2020-08-18 Thread Prudent
New submission from Prudent : I am writing codes for opening file dialog to select a file by clicking a button. The function I used was "askopenfilename()" in tkinter.filedialog module. However, a warning displayed when I ran the code. And, the file filter option was also disabled after one

[issue41565] from os.path import join join('3', '{:3') return '{:3' in windows

2020-08-18 Thread song super
song super <2262720...@qq.com> added the comment: Think you very much,I am a college student, do not understand these underlying principles, this problem is I wrote a program on Linux, later moved to the windows system found, thank you very much for your answers -- nosy: +2262720766

[issue41574] Python[11231:143796] WARNING: running implicitly; please run panels using NSSavePanel rather than NSApplication.

2020-08-18 Thread Prudent
Prudent added the comment: Yes, you are right. Just now, I re-installed Python3.8.5. But when I opened my .py file with tkinter and ran it, it still linked to the old Tcl/Tk(8.5.9) in Python3.7.5. However, when I ran the command "python3 -m tkinter" to check its version. It showed me the

[issue41553] encoded-word abused for header line folding causes RFC 2047 violation

2020-08-18 Thread Mika Hawkins
Mika Hawkins added the comment: Truly for the vault changes. I thought we had fixed the bug that was causing message-id to get encoded, yet perhaps it despite everything exists in 3.7? I don't recall when we fixed it (and I might be recollecting incorrectly!) With respect to

[issue41576] document BaseException in favour of bare except in error tutorial

2020-08-18 Thread Thomas Grainger
Change by Thomas Grainger : -- assignee: docs@python components: Documentation nosy: docs@python, graingert priority: normal pull_requests: 21033 severity: normal status: open title: document BaseException in favour of bare except in error tutorial

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

2020-08-18 Thread Cheryl Sabella
Cheryl Sabella added the comment: @epaine, thank you for taking a look at that PR and for your feedback. I agree with you that the changes can still be taken further than we've already done. `init_validators` was added after the initial refactoring and I'm not sure if we've gone back to

[issue41575] Please use active voice "Return foobar" instead of passive voice "foobar is returned"

2020-08-18 Thread Denilson Figueiredo de Sá
New submission from Denilson Figueiredo de Sá : When reading the documentation for call_soon(), call_later(), call_at(), and several other functions, the sentence that describes the return value is in passive voice: https://docs.python.org/3/library/asyncio-eventloop.html > An instance of

[issue41574] Python[11231:143796] WARNING: running implicitly; please run panels using NSSavePanel rather than NSApplication.

2020-08-18 Thread E. Paine
E. Paine added the comment: To help us to reproduce the issue, please give your Python version, Tcl/Tk patchlevel (`tkinter.test.support.get_tk_patchlevel()`), MacOS version and a small demonstration script (along with exact keystrokes/clicks if necessary). I suspect this is another Tcl/Tk

[issue41574] Python[11231:143796] WARNING: running implicitly; please run panels using NSSavePanel rather than NSApplication.

2020-08-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: How did you install Python? Did you use the installer on Python.org or some other method? A script that demonstrates the problem would be useful as well, I've tried to reproduce the problem in an interactive session in the terminal: >>> from tkinter

[issue41574] Python[11231:143796] WARNING: running implicitly; please run panels using NSSavePanel rather than NSApplication.

2020-08-18 Thread Prudent
Prudent added the comment: The versions of Python, Tcl/Tk and MacOS I used are 3.8.5, 8.5.9 and the newest Catalina 10.15.6, respectively. Your words give me a hint about the version of Tcl/Tk. So I checked it. The version I used seems too old, the newest version for it is 8.6. In my

[issue41574] Python[11231:143796] WARNING: running implicitly; please run panels using NSSavePanel rather than NSApplication.

2020-08-18 Thread E. Paine
E. Paine added the comment: Ned, does it appear like Python is using the MacOS built-in Tcl version? My (very limited) understanding is that Python will default to the Tcl version packaged with it (which is currently 8.6.8). -- ___ Python tracker

[issue41576] document BaseException in favour of bare except in error tutorial

2020-08-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : What a problem do you try to solve? What is wrong with the current documentation? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue41576] document BaseException in favour of bare except in error tutorial

2020-08-18 Thread Thomas Grainger
Thomas Grainger added the comment: it seems odd to document digging around in sys.exc_info() in favour of the more ergonomic syntax to do the same thing -- ___ Python tracker

[issue41573] Correct wrong sentences in General FAQ

2020-08-18 Thread Mika Hawkins
Mika Hawkins added the comment: Submitted. Regards, Mika Hawkins -- nosy: +Mika_Hawkins ___ Python tracker ___ ___

[issue39345] Py_Initialize Hangs on Windows 10

2020-08-18 Thread Fieschi
Change by Fieschi : -- nosy: +feellemon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41560] pathlib.Path.glob fails on empty string

2020-08-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-18 Thread Stefan Krah
Stefan Krah added the comment: The original patch is a bit dated, do we still need the export symbol generation? https://www.ibm.com/support/knowledgecenter/en/SSGH3R_16.1.0/com.ibm.xlcpp161.aix.doc/proguide/compiling_shared_aix.html "Use the -G option to create a shared library from the

[issue41483] Do not acquire lock in MemoryHandler.flush() if no target defined

2020-08-18 Thread Irit Katriel
Irit Katriel added the comment: I think it is unlikely that this change would make a measurable speedup (benchmarks would be needed to prove that it does). And even if it does, it's for the case where no target has been set, in which case the logger isn't doing anything anyway. Why is this

[issue23802] patch: __deepcopy__ memo dict argument usage

2020-08-18 Thread Irit Katriel
Irit Katriel added the comment: This seems resolved, can it be closed? -- nosy: +iritkatriel ___ Python tracker ___ ___

[issue23802] patch: __deepcopy__ memo dict argument usage

2020-08-18 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue41585] policy.max_line_length is incorrectly assumed to never be None

2020-08-18 Thread Erik Quaeghebeur
New submission from Erik Quaeghebeur : I got the following error (Python 3.7.8): Traceback (most recent call last): File "/home/equaeghe/.local/bin/html2alternative.py", line 68, in replaceable.add_alternative(plain) File "/usr/lib/python3.7/email/message.py", line 1153, in

[issue19521] Parallel build race condition on AIX since python-2.7

2020-08-18 Thread David Edelsohn
David Edelsohn added the comment: Yes, export file generation still is required. Python does not need to utilize runtime linking. Using -G is a very bad choice and severely discouraged with severe performance and other penalties. -- ___ Python

[issue39345] Py_Initialize Hangs on Windows 10

2020-08-18 Thread Steve Dower
Steve Dower added the comment: Are you able to capture a process dump at the hang? I haven't seen this anywhere else, and don't even know how to go about trying to reproduce it with this information - Py_Initialize is called by every single Python process, so there's something special about

[issue35024] Incorrect logging in importlib when '.pyc' file creation fails

2020-08-18 Thread Brett Cannon
Brett Cannon added the comment: It looks like it! Thanks, Irit! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41577] Cannot use ProcessPoolExecutor if in a decorator?

2020-08-18 Thread Bob Fang
New submission from Bob Fang : I have this minimal example: ``` from functools import wraps from concurrent import futures import random def decorator(func): num_process = 4 def impl(*args, **kwargs): with futures.ProcessPoolExecutor() as executor: fs = []

[issue41513] Scale by power of two in math.hypot()

2020-08-18 Thread Tim Peters
Tim Peters added the comment: About speed, the fsum() version I posted ran about twice as fast as the all-Decimal approach, but the add_on() version runs a little slower than all-Decimal. I assume that's because fsum() is coded in C while the add_on() prototype makes mounds of additional

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-08-18 Thread Brett Cannon
Brett Cannon added the comment: Or to be more clear, the RHS subclass must provide a **different** implementation of the method than the LHS. -- ___ Python tracker ___

[issue41565] from os.path import join join('3', '{:3') return '{:3' in windows

2020-08-18 Thread Eryk Sun
Change by Eryk Sun : -- status: open -> closed type: compile error -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing

[issue41577] Cannot use ProcessPoolExecutor if in a decorator?

2020-08-18 Thread Bob Fang
Change by Bob Fang : -- versions: +Python 3.6, Python 3.7, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-08-18 Thread Brett Cannon
Change by Brett Cannon : -- assignee: docs@python -> brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-08-18 Thread Brett Cannon
New submission from Brett Cannon : https://docs.python.org/3/reference/datamodel.html#object.__ror__ has a note saying: "If the right operand's type is a subclass of the left operand's type and that subclass provides the reflected method for the operation, this method will be called before

[issue41577] Cannot use ProcessPoolExecutor if in a decorator?

2020-08-18 Thread Kyle Stanley
Kyle Stanley added the comment: Due to the way pickle works, it's not presently possible to serialize wrapped functions directly, at least not in a way that allows you to pass it to executor.submit() within the inner function (AFAICT). I'm also not certain what it would involve to provide

[issue31861] add aiter() and anext() functions to operator module

2020-08-18 Thread Dima Tisnek
Dima Tisnek added the comment: Might as well re-target for 3.10 as 3.9 seems feature-complete now. -- versions: +Python 3.10 -Python 3.8 ___ Python tracker ___

[issue41513] Scale by power of two in math.hypot()

2020-08-18 Thread Tim Peters
Tim Peters added the comment: Here's a "correct rounding" fail for the add_on approach: xs = [16.004] * 9 decimal result = 48.01065814103642 which rounds to float 48.014 add_on result: 48.01 That's about 0.50026 ulp too small -

[issue41541] [PATCH] Make pty.spawn set window size

2020-08-18 Thread Soumendra Ganguly
Soumendra Ganguly added the comment: v0.5 had introduced minor mistakes + one hack [ was using master instead of slave to set window size ]. v0.6 removes all such mistakes. -- Added file: https://bugs.python.org/file49404/pty.diff ___ Python

[issue41513] Scale by power of two in math.hypot()

2020-08-18 Thread Tim Peters
Tim Peters added the comment: > That's about 0.50026 ulp too small - shocking ;-) Actually, that's an illusion due to the limited precision of Decimal. The rounded result is exactly 1/2 ulp away from the infinitely precise result - it's a nearest/even tie case. To make analysis

[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

2020-08-18 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- keywords: +patch pull_requests: +21034 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21920 ___ Python tracker

[issue41586] Allow to set pipe size on subprocess.Popen.

2020-08-18 Thread Ruben Vorderman
New submission from Ruben Vorderman : Pipes block if reading from an empty pipe or when writing to a full pipe. When this happens the program waiting for the pipe still uses a lot of CPU cycles when waiting for the pipe to stop blocking. I found this while working with xopen. A library that