[issue44571] itertools: takedowhile()

2021-10-11 Thread paul rubin


paul rubin  added the comment:

Oh wow, before_and_after will go into the itertools module per that patch?  I 
found this issue while looking for a way to this, but had written the following 
implementation:

def span(pred, xs):
# split xs into two iterators a,b where a() is the prefix of xs 
# that satisfies the predicate, and b() is the rest of xs.  
# Similar to Data.List.Span in Haskell. 

ixs = iter(xs)
t = None
def a():
nonlocal t
for x in ixs:
if pred(x): yield x
else: break
t = x
def b():
return itertools.chain([t], ixs)
return a, b

def tspan():  # test
xs = [1,3,5,2,4,6,8]
def odd(x): return x%2==1
# This should print [1,3,5] then [2,4,6,8]  
for p in span(odd, xs):
print(list(p()))

--
nosy: +phr

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45428] py_compile fails to read filenames from stdin

2021-10-11 Thread Graham Inggs


New submission from Graham Inggs :

py_compile fails to read a list of filenames to be compiled from standard 
input.  This is a regression in 3.10.

example

files-to-compile.txt is a text file containing hello.py and goodbye.py on 
separate lines.  hello.py and goodbye.py must exist.

python3.10 -m py_compile - 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45415] Assert oparg < INSTR_OFFSET()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Steve:
> Also +Victor, because I think we should switch back to debug builds in CI in 
> order to catch failed assertions before they get merged.

Ken Jin:
> So I don't see why Windows is special.

The Python test suite is way slower on Windows when Python is built in debug 
mode: 19 min 41 sec (debug) instead of 12 min 19 sec (release) on Windows x64: 
1.6x slower.

* https://bugs.python.org/issue45115#msg401141
* https://github.com/python/cpython/pull/28181

I would prefer to not make our workflow slower. IMO it's ok to miss a few bugs 
in pre-commit checks, and only catch them on Windows debug buildbots. In my 
experience, it happens less than once per months. It's more like 2 or 3 times 
per year.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45415] Assert oparg < INSTR_OFFSET()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

> *facepalm* on myself, for not even thinking of that. Indeed, clearing all my 
> .pyc files fixes it.

This issue has been fixed, no? Can it be closed?

commit 5e173f5db17cbb2e3f2139a3c5ccb6b81ac59785
Author: Mark Shannon 
Date:   Sat Oct 9 14:17:22 2021 +0100

Bump MAGIC_NUMBER to reflect change in JUMP_ABSOLUTE semantics. (GH-28829)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +27165
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/28864

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27166
pull_request: https://github.com/python/cpython/pull/28865

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Vinay: Oh, thanks for the fix! Using os.path.isfile() is a reasonable fix to 
detect if the file is a device.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45426] PANDAS INSTALLATION PIP FAILED ON WINDOWS 11

2021-10-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

Please report this on the pandas bug tracker: 
https://github.com/pandas-dev/pandas/issues

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45426] PANDAS INSTALLATION PIP FAILED ON WINDOWS 11

2021-10-11 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

> $ ./python -X tracemalloc -m test -v test_logging -m test_should_not_rollover

FYI you can use -X tracemalloc=10 to get a more complete traceback.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45427] importlib.readers.MultiplexedPath

2021-10-11 Thread Eric V. Smith


Eric V. Smith  added the comment:

Can you provide a short code snippet that we can run that demonstrates the 
problem?

Looking at the code, and not knowing much about it, maybe iterating over the 
paths with .iterdir() is what you want?

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-11 Thread STINNER Victor


New submission from STINNER Victor :

In bpo-21302, the Windows implementation of time.sleep() was modified to use a 
waitable timer:

New changeset 58f8adfda3c2b42f654a55500e8e3a6433cb95f2 by Victor Stinner in 
branch 'main':
bpo-21302: time.sleep() uses waitable timer on Windows (GH-28483)
https://github.com/python/cpython/commit/58f8adfda3c2b42f654a55500e8e3a6433cb95f2

It now calls the functions:

* CreateWaitableTimerW()
* SetWaitableTimer()
* WaitForMultipleObjects()

While SetWaitableTimer() has a resolution of 100 ns, the timer has a resolution 
of 15.6 ms in practice.

We could use the undocumented CREATE_WAITABLE_TIMER_HIGH_RESOLUTION flag with 
CreateWaitableTimerEx(). See: https://bugs.python.org/issue21302#msg403550

See also:

* 
https://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
* https://vstinner.readthedocs.io/windows.html#time

--
components: Library (Lib)
messages: 403631
nosy: vstinner
priority: normal
severity: normal
status: open
title: [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION
type: enhancement
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

> That said, using a waitable timer leaves the door open for improvement in 
> future versions of Python. In particular, it's possible to get higher 
> resolution in newer versions of Windows 10 and Windows 11 with 
> CreateWaitableTimerExW() and the undocumented flag 
> CREATE_WAITABLE_TIMER_HIGH_RESOLUTION (2).

I created bpo-45429 "[Windows] time.sleep() should use 
CREATE_WAITABLE_TIMER_HIGH_RESOLUTION".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

This issue is closed. If you consider that time.sleep() has a bug or could be 
enhanced, please open a new issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also: https://groups.google.com/a/chromium.org/g/scheduler-dev/c/0GlSPYreJeY

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

The Go programming language called timeBeginPeriod(1) to get more accurate 
timers. With the following change, it can now use a high resolution timer 
(CREATE_WAITABLE_TIMER_HIGH_RESOLUTION) to sleep:
https://go-review.googlesource.com/c/go/+/248699/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 15188b115a2da815556053372c912a81a74be43b by Serhiy Storchaka in 
branch 'main':
bpo-45401: Fix a resource warning in test_logging (GH-28864)
https://github.com/python/cpython/commit/15188b115a2da815556053372c912a81a74be43b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27168
pull_request: https://github.com/python/cpython/pull/28867

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27167
pull_request: https://github.com/python/cpython/pull/28866

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45430] PEP 523 no longer works

2021-10-11 Thread Mark Shannon


New submission from Mark Shannon :

https://github.com/python/cpython/pull/28488 breaks PEP 523 as it bypasses 
_PyEval_EvalFrame.

The fix is simple, we need to check tstate->interp->eval_frame.

--
assignee: Mark.Shannon
components: Interpreter Core
messages: 403637
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: PEP 523 no longer works
type: behavior
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44571] itertools: takedowhile()

2021-10-11 Thread paul rubin


paul rubin  added the comment:

Bah, the above doesn't work in the cases where the iterator is empty or 
(different symptom) where the tail part is empty.  Rather than posting a 
corrected version (unless someone wants it) I'll just say not to use that code 
fragment, but that the intended API still looks reasonable.  I do support 
having some kind of solution but don't want to keep stretching out an already 
closed discussion unless people think there is more to say.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45430] PEP 523 no longer works

2021-10-11 Thread Mark Shannon


Change by Mark Shannon :


--
keywords: +patch
pull_requests: +27169
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28871

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2021-10-11 Thread STINNER Victor


New submission from STINNER Victor :

#include  should only define names which start with "Py" (Py, _Py, 
PY, _PY), but it now defines a structure called "CFrame" in 
Include/cpython/pystate.h.

We should either make the whole PyThreadState structure private (move it to the 
internal C API), or rename CFrame (to PyCFrame?).

--
components: C API
messages: 403639
nosy: Mark.Shannon, vstinner
priority: normal
severity: normal
status: open
title: [C API] Rename CFrame or hide it to only export names starting with Py
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-45316: [C API] Functions not exported with PyAPI_FUNC().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45316] [C API] Functions not exported with PyAPI_FUNC()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-45431: [C API] Rename CFrame or hide it to only export names 
starting with Py.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also the old isssue with "READONLY": bpo-2897 "PyMemberDef missing in 
limited API / Deprecate structmember.h".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset ac421c348bf422f9a0d85fe0a1de3fa3f4886650 by Miss Islington (bot) 
in branch '3.9':
bpo-45401: Change shouldRollover() methods to only rollover regular f… 
(GH-28822) (#28866)
https://github.com/python/cpython/commit/ac421c348bf422f9a0d85fe0a1de3fa3f4886650


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 5aca34f17c4baf8e4882a7e8a827cff06ac6ef25 by Miss Islington (bot) 
in branch '3.10':
bpo-45401: Change shouldRollover() methods to only rollover regular f… 
(GH-28822) (#28867)
https://github.com/python/cpython/commit/5aca34f17c4baf8e4882a7e8a827cff06ac6ef25


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27170
pull_request: https://github.com/python/cpython/pull/28872

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27171
pull_request: https://github.com/python/cpython/pull/28873

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45427] importlib.readers.MultiplexedPath

2021-10-11 Thread David Rajaratnam


David Rajaratnam  added the comment:

Thanks for the quick response. I think the attached file shows the issue. 

In the directory where you download and run this file create a sub-directory 
'data'. Then running the file creates the output (note: I've truncated the path 
name):

> Traverse data: MultiplexedPath('<>/data') ( 'importlib.readers.MultiplexedPath'>)

I think the idea behind MultiplexedPath() is that it merges together multiple 
base/root directories so even though in this case it is a single path it 
wouldn't necessarily be the case in general. So while it makes sense that for 
some MultiplexedPath object X that str(X) isn't itself a proper directory path, 
however, there seems to be no method/property to access these root paths.

Note: Traverable.iterdir() iterates over the files/sub-directories in the 
root(s) so doesn't return the root path(s) themselves.

A further note. If you add a file `data/__init__.py` then data is now a package 
and running the code this time returns a PosixPath object (on a posix system): 

> Traverse data: <>/data ()
> X: <>/data/__init__.py ()
> X: <>/data/__pycache__ ()

--
Added file: https://bugs.python.org/file50342/navigate.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42253] xml.dom.minidom.rst missing standalone documentation

2021-10-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset c7e81fcf9548ab6a0a4828d6f2db9ece9d204826 by Jens Diemer in branch 
'main':
bpo-42253: Update xml.dom.minidom.rst (GH-23126)
https://github.com/python/cpython/commit/c7e81fcf9548ab6a0a4828d6f2db9ece9d204826


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42253] xml.dom.minidom.rst missing standalone documentation

2021-10-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27173
pull_request: https://github.com/python/cpython/pull/28875

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42253] xml.dom.minidom.rst missing standalone documentation

2021-10-11 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27172
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28874

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Marc, thanks for the update.

Will there be a Tcl/Tk release soonish that includes this fix? 

Alternatively, is there patch that we can apply to the latest release when 
building the copy of Tk included with the installers?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2021-10-11 Thread Mark Shannon


Mark Shannon  added the comment:

Struct names aren't exported as symbols.

$ nm ./python | grep CFrame

So, I assume that are worried about name clashes for code that has
#include "Python.h".


Isn't the threadstate struct supposed to be opaque?
If so, then shouldn't it be moved to an internal header?


I don't want to add a "Py" prefix to the name of the CFrame struct.
The names of the various frames are confusing enough, without adding a "Py" 
prefix to something that isn't a Python frame.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45430] PEP 523 no longer works

2021-10-11 Thread Mark Shannon


Change by Mark Shannon :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Mark Shannon:
> Struct names aren't exported as symbols.

Right.

> So, I assume that are worried about name clashes for code that has
> #include "Python.h".

Right :-)

> Isn't the threadstate struct supposed to be opaque?

Technically, it's public. I'm working on making it opaque in bpo-39947.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45411] Add Mimetypes for Subtitle Files

2021-10-11 Thread Julien Palard


Julien Palard  added the comment:


New changeset d74da9e140441135a4eddaef9a37f00f32579038 by Josephine-Marie in 
branch 'main':
bpo-45411: Update mimetypes.py (GH-28792)
https://github.com/python/cpython/commit/d74da9e140441135a4eddaef9a37f00f32579038


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20028] csv: Confusing error message when giving invalid quotechar in initializing dialect

2021-10-11 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset ab62051152cb24470056ffaeb9107c8b4311375e by Dong-hee Na in branch 
'main':
bpo-20028: Empty escapechar/quotechar is not allowed for csv.Dialect (GH-28833)
https://github.com/python/cpython/commit/ab62051152cb24470056ffaeb9107c8b4311375e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20028] csv: Confusing error message when giving invalid quotechar in initializing dialect

2021-10-11 Thread Dong-hee Na


Change by Dong-hee Na :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Marc Culler


Marc Culler  added the comment:

Hi Ronald,
There is no calendar scheduling for Tk releases.  Don Porter decides when they 
happen.  But I think we are due for another one soonish.  In case it doesn't 
happen before the next Python release I will attach the patch file for commit 
a32262e9.  (Note that this is subject to change - I still need to test on 
10.14.) I believe that this patch is completely self-contained and can be 
applied to the 8.6.11 release.

(Hint: Tk uses fossil as its SCM system.  On a fossil timeline, clicking any 
two nodes generates their diff.  The Tk timeline is at 
https://core.tcl-lang.org/tk/timeline)

--
keywords: +patch
Added file: https://bugs.python.org/file50343/openfile.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-11 Thread Randolf Scholz

Randolf Scholz  added the comment:

Dear Raymond,

I think decorator chaining is a very useful concept. At the very least, if all 
decorators are functional (following the `functools.wraps` recipe), things work 
out great -- we even get associativity of function composition if things are 
done properly!

The question is: can we get similar behaviour when allowing decoration with 
stateful objects, i.e. classes? This seems a lot more difficult. At the very 
least, in the case of `@classmethod` I think one can formulate a 
straightforward desiderata:

### Expectation

- `classmethod(property)` should still be a `property`!
- More generally: `classmethod(decorated)` should always be a subclass of 
`decorated`!

Using your pure-python versions of property / classmethod from 
, I was able to write down a 
variant of `classmethod` that works mostly as expected in conjunction with 
`property`. The main idea is rewrite the `classmethod` to dynamically be a 
subclass of whatever it wrapped; roughly:

```python
def ClassMethod(func):
  class Wrapped(type(func)):
  def __get__(self, obj, cls=None):
  if cls is None:
  cls = type(obj)
  if hasattr(type(self.__func__), '__get__'):
  return self.__func__.__get__(cls)
  return MethodType(self.__func__, cls)
  return Wrapped(func)
```

I attached a full MWE. Unfortunately, this doesn't fix the `help` bug, though 
it is kind of weird because the decorated class-property now correctly shows up 
under the "Readonly properties" section. Maybe `help` internally checks 
`isinstance(cls.func, property)` at some point instead of 
`isinstance(cls.__dict__["func"], property)`?

### Some further Proposals / Ideas

1. Decorators could always have an attribute that points to whatever object 
they wrapped. For the sake of argument, let's take `__func__`.
   ⟹ raise Error when typing `@decorator` if `not hasattr(decorated, 
"__func__")`
   ⟹ Regular functions/methods should probably by default have `__func__` as a 
pointer to themselves?
   ⟹ This could hae several subsidiary benefits, for example, currently, how 
would you implement a pair of decorators `@print_args_and_kwargs` and 
`@time_execution` such that both of them only apply to the base function, no 
matter the order in which they are decorating it? The proposed `__func__` 
convention would make this very easy, almost trivial.
2. `type.__setattr__` could support checking if `attr` already exists and has 
`__set__` implemented.
  ⟹ This would allow true class-properties with `getter`, `setter` and 
`deleter`. I provide a MWE here: 

3. I think an argument can be made that it would be really, really cool if `@` 
could become a general purpose function composition operator?
  ⟹ This is already kind of what it is doing with decorators
  ⟹ This is already exacltly what it is doing in numpy -- matrix multiplication 
\*is\* the composition of linear functions.
  ⟹ In fact this is a frequently requested feature on python-ideas!
  ⟹ But here is probably the wrong place to discuss this.

--
Added file: https://bugs.python.org/file50344/ClassPropertyIdea.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-11 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2021-10-11 Thread Dong-hee Na


Dong-hee Na  added the comment:

> There is IBM effort to do this in container level, so that os.cpu_count() 
> will return right result in container

Good news!

--
nosy: +corona10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45373] ./configure --enable-optimizations should enable LTO

2021-10-11 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-11 Thread Rahul Lakshmanan


Rahul Lakshmanan  added the comment:

Thanks for the answer!

When I upgraded Python to 3.8.12, the issue went away.

Can be closed.

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45432] sys.argv is processed strangely under Windows

2021-10-11 Thread Paul


New submission from Paul :

here is my test file:
'''
import sys
print(sys.argv)
'''

when I then try 'python test.py ^test' the ^ character is stripped away, this 
doesn't happen on Linux. This also doesn't happen if I put ^test in quotes 
(only ") the ' quotes don't work

--
components: Windows
messages: 403656
nosy: paul.moore, paulhippler21, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: sys.argv is processed strangely under Windows
type: behavior
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45432] sys.argv is processed strangely under Windows

2021-10-11 Thread Zachary Ware


Zachary Ware  added the comment:

This is Windows behavior, not Python; ^ is an escape character in cmd.exe.  Try 
for example `echo test ^| python -c "print('hello world')"` with and without 
the ^ character.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45432] sys.argv is processed strangely under Windows

2021-10-11 Thread Paul


Paul  added the comment:

oh ok. thx

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-19007: "precise time.time() under Windows 8: use 
GetSystemTimePreciseAsFileTime".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread Mark Dickinson


Mark Dickinson  added the comment:

+1 for the removals. (We should fix #44970 too, but as you say that's a 
separate issue. And I suspect that the Py_ADJUST_ERANGE1() use for float pow 
should be replaced, too.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

Please help me.  Am new to Python, and don't know enough to post here, but I 
will try.  Have written a couple of programs that use tkinter, especially 
tkinter.filedialog.askopenfilenames, and as everyone else mine has quit working 
since Monterey. I have a macOS Monterey version beta( 21A5543b ).  Am 
using Python3 v3.10.0.  Have tried using v3.11.0a1, but could not even compile, 
says that import ( PIL ) does not exist.  Put back v 3.10.0 and am back to no 
filedialog.  Is Apple attempting to do away with the file API.  Just asking. 
Thank you.

--
nosy: +guydestefano
versions:  -Python 3.11, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Marc Culler


Marc Culler  added the comment:

No, Apple is not going to do away with their NSOpenPanel.  There is always some 
churn when they release a new OS.  Subtle changes to APIs can occur with no 
warning and no documentation.  Sometimes they are bugs. Sometimes they 
disappear when the OS is released.  Sometimes they are permanent.  I would not 
recommend using a beta version of the OS to develop your tkinter app.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread Mike Gilbert


New submission from Mike Gilbert :

In https://bugs.python.org/issue44751, crypt.h was removed from Python.h. This 
would imply that libpython is not meant to expose any crypt-related symbols.

In fact, it looks like libpython does not use crypt() or crypt_r() at all. 
These are only used by cryptmodule.

In configure.ac, we have this this logic to determine if crypt_r() is available:

```
# We search for both crypt and crypt_r as one or the other may be defined
# This gets us our -lcrypt in LIBS when required on the target platform.
AC_SEARCH_LIBS(crypt, crypt)
AC_SEARCH_LIBS(crypt_r, crypt)

AC_CHECK_FUNC(crypt_r,
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE  /* Required for crypt_r()'s prototype in glibc. */
#include 
]], [[
struct crypt_data d;
char *r = crypt_r("", "", &d);
]])],
[AC_DEFINE(HAVE_CRYPT_R, 1, [Define if you have the crypt_r() function.])],
[])
)
```

The AC_SEARCH_LIBS macro adds "-lcrypt" to LIBS, and this gets passed down to 
the link command for libpython. This is probably not intentional.

The HAVE_CRYPT_R value is used in _cryptmodule.c. setup.py performs its own 
check for libcrypt when building the module.

I think the value of LIBS should be saved before the AC_SEARCH_LIBS calls and 
restored after the AC_CHECK_FUNC call. I have tested this locally on Gentoo 
Linux, and it seems to work fine.

I will work on a pull request.

--
components: C API
messages: 403663
nosy: floppymaster
priority: normal
severity: normal
status: open
title: libpython should not be linked with libcrypt
type: compile error
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

Thank you very
Guy DeStefano

On Mon, Oct 11, 2021 at 2:10 PM Marc Culler  wrote:

>
> Marc Culler  added the comment:
>
> No, Apple is not going to do away with their NSOpenPanel.  There is always
> some churn when they release a new OS.  Subtle changes to APIs can occur
> with no warning and no documentation.  Sometimes they are bugs. Sometimes
> they disappear when the OS is released.  Sometimes they are permanent.  I
> would not recommend using a beta version of the OS to develop your tkinter
> app.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

Thank you very much for the reply. Sorry for previous text.
Guy DeStefano

On Mon, Oct 11, 2021 at 2:10 PM Marc Culler  wrote:

>
> Marc Culler  added the comment:
>
> No, Apple is not going to do away with their NSOpenPanel.  There is always
> some churn when they release a new OS.  Subtle changes to APIs can occur
> with no warning and no documentation.  Sometimes they are bugs. Sometimes
> they disappear when the OS is released.  Sometimes they are permanent.  I
> would not recommend using a beta version of the OS to develop your tkinter
> app.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45253] mimetypes cannot detect mime of mka files

2021-10-11 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

mkv (matroska) is not registered with IANA here: 
http://www.iana.org/assignments/media-types/media-types.xhtml

Therefore according to the comment in mimetypes.py, it should not be added.

Also note that .mkv is also not in mimetypes.py, so it's being loaded from your 
system's mime types, so if you want .mka to work as well, make sure it's 
registered on your system rather than in Python's mimetypes.py .

I will close this as not a bug, please comment here if you think it should stay 
open.

--
nosy: +andrei.avk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45253] mimetypes cannot detect mime of mka files

2021-10-11 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
nosy: +kj

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45253] mimetypes cannot detect mime of mka files

2021-10-11 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Ned Deily


Ned Deily  added the comment:

@Guy, thanks for your interest but in the future please don't use the issue 
tracker as a help forum. There are lots of places to ask about such matters; 
https://www.python.org/about/help/ has a good list of resources and, among the 
Python-specific mailing lists at https://www.python.org/about/help/, there are 
ones specifically for Python usage on macOS 
(https://mail.python.org/mailman/listinfo/pythonmac-sig) and Tkinter usage 
(https://mail.python.org/mailman/listinfo/tkinter-discuss).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

I appreciate the information, In the future I will do as is stated.  Thanks
for the reply.
Guy DeStefano

On Mon, Oct 11, 2021 at 2:24 PM Ned Deily  wrote:

>
> Ned Deily  added the comment:
>
> @Guy, thanks for your interest but in the future please don't use the
> issue tracker as a help forum. There are lots of places to ask about such
> matters; https://www.python.org/about/help/ has a good list of resources
> and, among the Python-specific mailing lists at
> https://www.python.org/about/help/, there are ones specifically for
> Python usage on macOS (
> https://mail.python.org/mailman/listinfo/pythonmac-sig) and Tkinter usage
> (https://mail.python.org/mailman/listinfo/tkinter-discuss).
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 659812b451aefe1f0e5f83540296519a5fb8f313 by Olaf van der Spek in 
branch 'main':
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
https://github.com/python/cpython/commit/659812b451aefe1f0e5f83540296519a5fb8f313


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27175
pull_request: https://github.com/python/cpython/pull/28880

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +27174
pull_request: https://github.com/python/cpython/pull/28879

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a by Victor Stinner in 
branch 'main':
bpo-45412: Remove Py_SET_ERRNO_ON_MATH_ERROR() macro (GH-28820)
https://github.com/python/cpython/commit/2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread Mike Gilbert


Change by Mike Gilbert :


--
keywords: +patch
pull_requests: +27176
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28881

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45428] py_compile fails to read filenames from stdin

2021-10-11 Thread Stefano Rivera


Change by Stefano Rivera :


--
nosy: +stefanor

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread miss-islington


miss-islington  added the comment:


New changeset bb4f885892be0c337db3a81ef2936be0b3855de3 by Miss Islington (bot) 
in branch '3.10':
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
https://github.com/python/cpython/commit/bb4f885892be0c337db3a81ef2936be0b3855de3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread miss-islington


miss-islington  added the comment:


New changeset 320084fe7de90319928d8f3e597d5bca04db13f3 by Miss Islington (bot) 
in branch '3.9':
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
https://github.com/python/cpython/commit/320084fe7de90319928d8f3e597d5bca04db13f3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Olaf van der Spek, I merged your PR and backported it to 3.9 and 3.10 
branches.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27177
pull_request: https://github.com/python/cpython/pull/28882

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

> +1 for the removals. (We should fix #44970 too, but as you say that's a 
> separate issue. And I suspect that the Py_ADJUST_ERANGE1() use for float pow 
> should be replaced, too.)

Well, it's scary of use functions which are documented as:

 * Caution:
 *This isn't reliable.  See Py_OVERFLOWED comments.
 *X and Y may be evaluated more than once.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27178
pull_request: https://github.com/python/cpython/pull/28884

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor


New submission from STINNER Victor :

I would like to remove #include  from Python.h, and make Python.h 
smaller.

--
components: C API
messages: 403675
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Clean-up the Python.h header file
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

>  *This isn't reliable.  See Py_OVERFLOWED comments.

Oops, Py_OVERFLOWED() has been removed: I created PR 28884 to fix the comment.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Sadly, a recent build failure (at commit 
560a79f94e94de66a18f2a5e4194c2fe51e2adf1) still write "Uncaught thread 
exception" at the top of logs:
---
0:00:11 load avg: 6.07 [315/427/1] test_ftplib failed (env changed)
Warning -- Uncaught thread exception: Exception
Exception in thread Thread-67:
(...)
Exception
test__all__ (test.test_ftplib.MiscTestCase) ... ok
test_abort (test.test_ftplib.TestFTPClass) ... ok
(...)
Ran 94 tests in 3.234s
OK (skipped=1)
---

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27179
pull_request: https://github.com/python/cpython/pull/28885

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +27180
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28883

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45435] delete misleading faq entry about atomic operations

2021-10-11 Thread Thomas Grainger


Change by Thomas Grainger :


--
assignee: docs@python
components: Documentation
nosy: docs@python, graingert
priority: normal
severity: normal
status: open
title: delete misleading faq entry about atomic operations

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45436] test_configure_type() failed on

2021-10-11 Thread STINNER Victor


New submission from STINNER Victor :

x86 Gentoo Non-Debug with X 3.x:
https://buildbot.python.org/all/#/builders/58/builds/891

test.pythoninfo:

tkinter.TCL_VERSION: 8.6
tkinter.TK_VERSION: 8.6
tkinter.info_patchlevel: 8.6.11

2 tests failed:
test_tk test_ttk_guionly

==
FAIL: test_configure_type (tkinter.test.test_tkinter.test_widgets.MenuTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_tkinter/test_widgets.py",
 line 1244, in test_configure_type
self.checkEnumParam(widget, 'type',
^^^
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 151, in checkEnumParam
self.checkInvalidParam(widget, name, '',

  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 73, in checkInvalidParam
with self.assertRaises(tkinter.TclError) as cm:
^^^
AssertionError: TclError not raised

==
FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.ButtonTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py",
 line 173, in test_configure_compound
self.checkEnumParam(widget, 'compound',
^^^
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 151, in checkEnumParam
self.checkInvalidParam(widget, name, '',

  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 73, in checkInvalidParam
with self.assertRaises(tkinter.TclError) as cm:
^^^
AssertionError: TclError not raised

==
FAIL: test_configure_compound 
(tkinter.test.test_ttk.test_widgets.CheckbuttonTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py",
 line 173, in test_configure_compound
self.checkEnumParam(widget, 'compound',
^^^
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 151, in checkEnumParam
self.checkInvalidParam(widget, name, '',

  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 73, in checkInvalidParam
with self.assertRaises(tkinter.TclError) as cm:
^^^
AssertionError: TclError not raised

==
FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.LabelTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py",
 line 173, in test_configure_compound
self.checkEnumParam(widget, 'compound',
^^^
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 151, in checkEnumParam
self.checkInvalidParam(widget, name, '',

  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 73, in checkInvalidParam
with self.assertRaises(tkinter.TclError) as cm:
^^^
AssertionError: TclError not raised

==
FAIL: test_configure_compound 
(tkinter.test.test_ttk.test_widgets.MenubuttonTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py",
 line 173, in test_configure_compound
self.checkEnumParam(widget, 'compound',
^^^
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 151, in checkEnumParam
self.checkInvalidParam(widget, name, '',
^^^

[issue45437] Assignment to a list of dictionary wrong

2021-10-11 Thread Xin Sheng Zhou


New submission from Xin Sheng Zhou :

>>> details = [{}]*4
>>> details
[{}, {}, {}, {}]
>>> details[1]['A']=5
>>> details
[{'A': 5}, {'A': 5}, {'A': 5}, {'A': 5}]
>>>

--
messages: 403679
nosy: xinshengzhou
priority: normal
severity: normal
status: open
title: Assignment to a list of dictionary wrong
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45435] delete misleading faq entry about atomic operations

2021-10-11 Thread Thomas Grainger


Change by Thomas Grainger :


--
keywords: +patch
pull_requests: +27181
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28886

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_configure_type() failed on -> test_tk.test_configure_type() failed 
on x86 Gentoo Non-Debug with X 3.x

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-43139: test_ttk test_compound and test_tk test_type fails with Tk 
8.6.11.1.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43139] test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-45436: test_tk.test_configure_type() failed on x86 Gentoo 
Non-Debug with X 3.x.

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2021-10-11 Thread Gregory Szorc


Gregory Szorc  added the comment:

Note that this issue isn't macOS specific: you will get the same failure when 
cross-compiling targeting Linux. e.g. --build=x86_64-unknown-linux-gnu 
--host=i686-unknown-linux-gnu.

--
nosy: +indygreg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

> 2 tests failed:test_tk test_ttk_guionly

They also failed on:

* x86 Gentoo Non-Debug with X 3.9
* x86 Gentoo Non-Debug with X 3.10

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43139] test_ttk test_compound, test_tk test_type fail with Tk 8.6.11.1

2021-10-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1 -> 
test_ttk test_compound, test_tk test_type fail with Tk 8.6.11.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 47717d1186563695e798b40350d15b00d04a5237 by Victor Stinner in 
branch 'main':
bpo-45434: Cleanup Python.h header file (GH-28883)
https://github.com/python/cpython/commit/47717d1186563695e798b40350d15b00d04a5237


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2021-10-11 Thread Ned Deily


Ned Deily  added the comment:

> Note that this issue isn't macOS specific: you will get the same failure when 
> cross-compiling targeting Linux. e.g. --build=x86_64-unknown-linux-gnu 
> --host=i686-unknown-linux-gnu.

Can you be more specific? This particular issue isn't about cross-compiling. 
It's just about building for macOS on macOS. Under what circumstances is there 
a problem when trying to build one of the supported cross-compilation targets 
and does this proposed change fix that problem or create a new problem?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41123] Remove Py_UNICODE APIs except PEP 623

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner
nosy_count: 2.0 -> 3.0
pull_requests: +27182
pull_request: https://github.com/python/cpython/pull/28887

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27183
pull_request: https://github.com/python/cpython/pull/2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1ebd798fddef51e1f6fd40a4860278a1851ac268 by Victor Stinner in 
branch 'main':
bpo-45410: Add test.support.flush_std_streams() (GH-28885)
https://github.com/python/cpython/commit/1ebd798fddef51e1f6fd40a4860278a1851ac268


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a9fe1a8e5b4698937e06c2c419da92e6f78f2ee7 by Victor Stinner in 
branch 'main':
bpo-45412: Update _Py_ADJUST_ERANGE1() comment (GH-28884)
https://github.com/python/cpython/commit/a9fe1a8e5b4698937e06c2c419da92e6f78f2ee7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7103356455c8b0c2ba3523929327756413337a31 by Victor Stinner in 
branch 'main':
bpo-45412: Move _Py_SET_53BIT_PRECISION_START to pycore_pymath.h (GH-28882)
https://github.com/python/cpython/commit/7103356455c8b0c2ba3523929327756413337a31


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27184
pull_request: https://github.com/python/cpython/pull/28889

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 03ea862b8a8234176761240ba122254e9eb11663 by Victor Stinner in 
branch 'main':
bpo-45434: Python.h no longer includes  (GH-2)
https://github.com/python/cpython/commit/03ea862b8a8234176761240ba122254e9eb11663


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >