[issue45198] __set_name__ documentation not clear about its usage with non-descriptor classes

2021-09-18 Thread miss-islington


miss-islington  added the comment:


New changeset 7ab114bf1fa0f28ee267a4c69e597cc49a186a14 by Miss Islington (bot) 
in branch '3.10':
bpo-45198: __set_name__ documentation not clear about its usage with 
non-descriptor classes (GH-28439)
https://github.com/python/cpython/commit/7ab114bf1fa0f28ee267a4c69e597cc49a186a14


--

___
Python tracker 

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



[issue45002] won't match correct version of tcl/tk

2021-09-18 Thread 郑之为

郑之为  added the comment:

OK... It's fine now, tests are still failing

--
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



[issue45216] Remove redundand information from difflib docstrings

2021-09-18 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
keywords: +patch
nosy: +sobolevn
nosy_count: 2.0 -> 3.0
pull_requests: +26848
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28445

___
Python tracker 

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



[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +26849
pull_request: https://github.com/python/cpython/pull/28446

___
Python tracker 

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



[issue5846] Deprecate obsolete functions in unittest

2021-09-18 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> It is an internal function. We can remove it without deprecation.

How convenient :)

--

___
Python tracker 

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



[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 28446 makes TestCase.debug() honoring the skipping decorator.

The difference with PR 13180:

1. It does not run setUp() and tearDown() for tests decorated with the skipping 
decorator, as TestCase.run().
2. It has the same behavior for tests decorated with the skipping decorator and 
tests using skipTest() or raising a SkipTest -- raises a SkipTest.
3. Tests actually test the skipping decorator.

--
type: enhancement -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

___
Python tracker 

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



[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Since the behavior of debug() was different for the following cases:

@skip('skipping')
def test1(self):
pass
@othedecorator
@skip('skipping')
def test2(self):
pass
def test3(self):
self.skipTest('skipping')

I consider it as a bug and will backport the fix.

--

___
Python tracker 

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



[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset dea59cf88adf5d20812edda330e085a4695baba4 by Serhiy Storchaka in 
branch 'main':
bpo-36674: Honour the skipping decorators in TestCase.debug() (GH-28446)
https://github.com/python/cpython/commit/dea59cf88adf5d20812edda330e085a4695baba4


--

___
Python tracker 

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



[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +26850
pull_request: https://github.com/python/cpython/pull/28447

___
Python tracker 

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



[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26851
pull_request: https://github.com/python/cpython/pull/28448

___
Python tracker 

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



[issue45198] __set_name__ documentation not clear about its usage with non-descriptor classes

2021-09-18 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
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



[issue45216] Remove redundand information from difflib docstrings

2021-09-18 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +tim.peters

___
Python tracker 

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



[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread miss-islington


miss-islington  added the comment:


New changeset 7e465a6b8273dc0b6cb484c65664f618afa22484 by Miss Islington (bot) 
in branch '3.9':
bpo-36674: Honour the skipping decorators in TestCase.debug() (GH-28446)
https://github.com/python/cpython/commit/7e465a6b8273dc0b6cb484c65664f618afa22484


--

___
Python tracker 

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



[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread miss-islington


miss-islington  added the comment:


New changeset 753f7af22e78456726496fd5d8bf38e7e6567e4e by Miss Islington (bot) 
in branch '3.10':
bpo-36674: Honour the skipping decorators in TestCase.debug() (GH-28446)
https://github.com/python/cpython/commit/753f7af22e78456726496fd5d8bf38e7e6567e4e


--

___
Python tracker 

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



[issue45238] Fix debug() in IsolatedAsyncioTestCase

2021-09-18 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Currently debug() does not work in IsolatedAsyncioTestCase subclasses. It runs 
synchronous code (setUp(), tearDown(), synchronous tests and cleanup 
functions), but does not run any asynchronous code (asyncSetUp(), 
asyncTearDown(), asynchronous tests and cleanup functions) and produces 
warnings "RuntimeWarning: coroutine 'xxx' was never awaited".

--
components: Library (Lib), asyncio
messages: 402132
nosy: asvetlov, ezio.melotti, michael.foord, rbcollins, serhiy.storchaka, 
yselivanov
priority: normal
severity: normal
status: open
title: Fix debug() in IsolatedAsyncioTestCase
type: behavior
versions: Python 3.10, 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



[issue45238] Fix debug() in IsolatedAsyncioTestCase

2021-09-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See issue45238 for debug() in IsolatedAsyncioTestCase.

--

___
Python tracker 

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



[issue45216] Remove redundant information from difflib docstrings

2021-09-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
title: Remove redundand information from difflib docstrings -> Remove redundant 
information from difflib docstrings

___
Python tracker 

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



[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Dieter Maurer


Dieter Maurer  added the comment:

Thank you for working on this issue!

--

___
Python tracker 

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



[issue45134] Protocol dealloc not called if Server is closed

2021-09-18 Thread Mark


Change by Mark :


--
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



[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-18 Thread Ken Jin


Ken Jin  added the comment:

@Pablo,
> If  is correct ...

For some verification, I benched pyperformance on Win10 AMD64, with the Python 
3.10a7 and 3.10rc2 x64 binaries downloaded directly from python.org website 
release pages. The results corroborate with neonene's (please see the attached 
file). In short, there was a 1.09x slowdown on average.

FYI, `pyperf system tune` doesn't work on Windows. So I manually disabled turbo 
boost and intel speedstep, but I didn't have time to research setting core 
affinity and the other stabilizations. Nonetheless, most of the benches were 
stable.

> I am marking this as a release blocker until there is some agreement.
Got it. Setting as advised.

--
priority: high -> release blocker
Added file: https://bugs.python.org/file50286/310a7_vs_310rc2_bench.txt

___
Python tracker 

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



[issue24076] sum() several times slower on Python 3 64-bit

2021-09-18 Thread Guido van Rossum


Guido van Rossum  added the comment:

@Stefan
> FWIW, a PGO build of Py3.7 is now about 20% *faster* here than my Ubuntu 
> 16/04 system Python 2.7

Does that mean we can close this issue? Or do I misunderstand what you are 
comparing? 32 vs. 64 bits? PGO vs. non-PGO?

OTOH on my Mac I still find that 3.10 with PGO is still more than twice as slow 
than 2.7.

Thinking about it that's a bit odd, since (presumably) the majority of the work 
in sum() involves a long int result (even though the values returned by range() 
all fit in 30 bits, the sum quickly exceeds that).

(earlier)
> I suspect that adding a free-list for single-digit PyLong objects (the most 
> common case) would provide some visible benefit.

If my theory is correct that wouldn't help this particular case, right?

FWIW just "for i in [x]range(15, 10**9, 15): pass" is about the same speed in 
Python 2.7 as in 3.11.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue24138] Speed up range() by caching and modifying long objects

2021-09-18 Thread Guido van Rossum


Guido van Rossum  added the comment:

Should we try the free list for integers again?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue24138] Speed up range() by caching and modifying long objects

2021-09-18 Thread Guido van Rossum


Guido van Rossum  added the comment:

(Never mind, that should have gone to https://bugs.python.org/issue24165, which 
is the integer freelist -- conclusion there in 2015 was also that it didn't do 
much.)

--

___
Python tracker 

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



[issue45026] More compact range iterator

2021-09-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Iterating large integers:

$ ./python -m pyperf timeit -s 'r = range(0, 10**20, 3**35)' 'for i in r: pass'

baseline: Mean +- std dev: 223 us +- 10 us
PR 27986: Mean +- std dev: 128 us +- 4 us
PR 28176: Mean +- std dev: 99.0 us +- 3.7 us

$ ./python -m pyperf timeit -s 'r = range(0, 10**20, 3**35)' 'list(r)'
baseline: Mean +- std dev: 191 us +- 13 us
PR 27986: Mean +- std dev: 107 us +- 7 us
PR 28176: Mean +- std dev: 91.3 us +- 2.4 us

Unpickling:

$ ./python -m pyperf timeit -s 'from pickle import dumps, loads; p = 
dumps([iter(range(i)) for i in range(1000)])' 'loads(p)'
baseline: Mean +- std dev: 535 us +- 29 us
PR 27986: Mean +- std dev: 420 us +- 15 us
PR 28176: Mean +- std dev: 418 us +- 17 us

$ ./python -m pyperf timeit -s 'from pickle import dumps, loads; p = 
dumps([iter(range(i*10**10)) for i in range(1000)])' 'loads(p)'
baseline: Mean +- std dev: 652 us +- 37 us
PR 27986: Mean +- std dev: 530 us +- 43 us
PR 28176: Mean +- std dev: 523 us +- 17 us

Seems PR 28176 is slightly faster than PR 27986 in iterating long integers.

--

___
Python tracker 

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



[issue24165] Free list for single-digits ints

2021-09-18 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue45239] email.utils.parsedate_tz raises UnboundLocalError if time has more than 2 dots in it

2021-09-18 Thread Ben Hoyt


New submission from Ben Hoyt :

In going through some standard library code, I found that the 
email.utils.parsedate_tz() function 
(https://docs.python.org/3/library/email.utils.html#email.utils.parsedate_tz) 
has a bug if the time value is in dotted format and has more than 2 dots in it, 
for example: "12.34.56.78". Per the docs, it should return None in the case of 
invalid input.

This is happening because in the case that handles the '.' separator (instead 
of the normal ':'), there's no else clause to return None when there's not 2 or 
3 segments.

>From 
>https://github.com/python/cpython/blob/dea59cf88adf5d20812edda330e085a4695baba4/Lib/email/_parseaddr.py#L118-L132:

if len(tm) == 2:
[thh, tmm] = tm
tss = '0'
elif len(tm) == 3:
[thh, tmm, tss] = tm
elif len(tm) == 1 and '.' in tm[0]:
# Some non-compliant MUAs use '.' to separate time elements.
tm = tm[0].split('.')
if len(tm) == 2:
[thh, tmm] = tm
tss = 0
elif len(tm) == 3:
[thh, tmm, tss] = tm
# HERE: need "else: return None"
else:
return None

We simply need to include that additional "else: return None" block in the '.' 
handling case.

I'll submit a pull request that fixes this soon (and adds a test for this case).

--
components: Library (Lib)
messages: 402140
nosy: barry, benhoyt
priority: normal
severity: normal
status: open
title: email.utils.parsedate_tz raises UnboundLocalError if time has more than 
2 dots in it
versions: Python 3.10

___
Python tracker 

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



[issue45239] email.utils.parsedate_tz raises UnboundLocalError if time has more than 2 dots in it

2021-09-18 Thread Ben Hoyt


Ben Hoyt  added the comment:

For reference, here's a repro case:

$ python3.10 -c 'import email.utils; \
email.utils.parsedate_tz("Wed, 3 Apr 2002 12.34.56.78+0800")'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.10/email/_parseaddr.py", line 50, in parsedate_tz
res = _parsedate_tz(data)
  File "/usr/local/lib/python3.10/email/_parseaddr.py", line 134, in 
_parsedate_tz
thh = int(thh)
UnboundLocalError: local variable 'thh' referenced before assignment

--

___
Python tracker 

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



[issue45239] email.utils.parsedate_tz raises UnboundLocalError if time has more than 2 dots in it

2021-09-18 Thread Ben Hoyt


Change by Ben Hoyt :


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

___
Python tracker 

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



[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-18 Thread Eryk Sun


Change by Eryk Sun :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue45240] Add +REPORT_NDIFF option to pdb tests that use doctest

2021-09-18 Thread Andrei Kulakov


New submission from Andrei Kulakov :

It would be useful to have +REPORT_NDIFF option applied to pdb doctests because 
it makes it much more convenient to add / modify pdb tests, to fix pdb bugs, 
add pdb features.

I've worked on two pdb issues in the last few months and I wasn't aware of 
+REPORT_NDIFF, and so I was just looking at the output of failing tests (which 
are very long for some pdb tests), and comparing them manually.

This option, when enabled, automatically provides diff with in-line highlighted 
difference for a failed doctest. Otherwise two chunks of text are provided, 
'EXPECTED' and 'GOT ...'.

--
assignee: andrei.avk
components: Tests
messages: 402142
nosy: andrei.avk, kj
priority: normal
severity: normal
status: open
title: Add +REPORT_NDIFF option to pdb tests that use doctest
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



[issue45240] Add +REPORT_NDIFF option to pdb tests that use doctest

2021-09-18 Thread Andrei Kulakov


Change by Andrei Kulakov :


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

___
Python tracker 

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



[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-09-18 Thread Ma Lin


Ma Lin  added the comment:

> In my case, pgo got stuck on linking with the object.h.

Me too. Since commit 28d28e0 (the first commit to slow down the PGO build), if 
add `__forceinline` attribute to _Py_DECREF() function in object.h, the PGO 
build hangs (>50 minutes).

So PR 28427 may not be a short-term solution.

--

___
Python tracker 

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