[issue35224] PEP 572: Assignment Expressions

2019-06-16 Thread Jörn Heissler

Jörn Heissler  added the comment:

I tried and it appears to work: https://github.com/python/cpython/pull/14139

As I'm not familiar with cpython code, chances are that I missed something 
important.

--

___
Python tracker 

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



[issue35224] PEP 572: Assignment Expressions

2019-06-16 Thread Jörn Heissler

Change by Jörn Heissler :


--
pull_requests: +13980
pull_request: https://github.com/python/cpython/pull/14139

___
Python tracker 

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



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-06-16 Thread Alejandro Gonzalez


Alejandro Gonzalez  added the comment:

>Getting the module name from the caller's frame is an expensive operation. It 
>is safe to set __module__ to None. In such case the pickle module is able to 
>find the proper module containing the definition of the class.

Wow, indeed it works. I also tried it from another module other than `__main__` 
and it works.

Checking the source, I see the "magic" happens in pickle's `whichmodule` 
function when looping over `sys.modules` if `__module__` is not found. If that 
case, why check for `__module__` in the first place? wouldn't it be simpler to 
always loop over sys.modules? Is it to avoid looping over `sys.modules` 
whenever possible?

--

___
Python tracker 

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



[issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn

2019-06-16 Thread Martin Panter


Martin Panter  added the comment:

Looking at the code, this would be caused by Issue 31233. I expect 3.7+ is 
affected. 3.6 has similar code, but the leaking looks to be disabled by 
default. 2.7 doesn't collect a "_threads" list at all.

Looks like Victor was aware of the leak when he changed the code: 
, but maybe he pushed the code 
and then forgot about the problem.

A possible problem with Norihiro's solution is modifying the "_threads" list 
from multiple threads without any synchronization. (Not sure if that is a 
problem, or is it guaranteed to be okay due to GIL etc?) Also, since the thread 
is removing itself from the list, it will still run a short while after the 
removal, so there is a window when the "server_close" method will not wait for 
that thread. Might also defeat the "dangling thread" accounting that I believe 
was Victor's motivation for his change.

Wei's proposal is to check for cleaning up when a new request is handled. That 
relies on a new request coming in to free up memory. Perhaps we could use 
similar strategy to the Forking mixin, which I believe cleans up expired 
children periodically, without relying on a new request.

--
keywords: +3.7regression
nosy: +martin.panter, vstinner

___
Python tracker 

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



[issue37297] function changed when pickle bound method object

2019-06-16 Thread George Xie


Change by George Xie :


--
keywords: +patch
Added file: 
https://bugs.python.org/file48424/0001-fix-bound-method-__reduce__-bug.patch

___
Python tracker 

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



[issue31233] socketserver.ThreadingMixIn leaks running threads after server_close()

2019-06-16 Thread Martin Panter


Martin Panter  added the comment:

FYI the change here to remember all the thread objects ever created looks to be 
the cause of the memory leak reported in Issue 37193

--
nosy: +martin.panter

___
Python tracker 

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



[issue37311] Solaris 11.3 w/ Studio 12.6 test_support fail

2019-06-16 Thread Gordon Marler


New submission from Gordon Marler :

This failure confuses me, as it seems to occur in a test_rmtree subtest, and 
there's a warning that test_support is modifying something towards the end:

$ python -m test -W test_support

...

==
ERROR: test_rmtree (test.test_support.TestSupport)
--
Traceback (most recent call last):
  File 
"/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/support/__init__.py",
 line 309, in _force_run
return func(*args)
PermissionError: [Errno 13] Permission denied: '@test_11251_tmpd/subdir'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/test_support.py",
 line 73, in test_rmtree
support.rmtree(dirpath)
  File 
"/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/support/__init__.py",
 line 431, in rmtree
_rmtree(path)
  File 
"/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/support/__init__.py",
 line 411, in _rmtree
_rmtree_inner(path)
  File 
"/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/support/__init__.py",
 line 410, in _rmtree_inner
_force_run(path, os.unlink, fullname)
  File 
"/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/test/support/__init__.py",
 line 315, in _force_run
return func(*args)
PermissionError: [Errno 1] Not owner: '@test_11251_tmpd/subdir'

--

Ran 42 tests in 34.112s

FAILED (errors=1, skipped=1)
Warning -- files was modified by test_support
  Before: []
  After:  ['@test_11251_tmpd/']
test test_support failed
test_support failed in 34 sec 255 ms

== Tests result: FAILURE ==

1 test failed:
test_support

Total duration: 34 sec 322 ms
Tests result: FAILURE

--
components: Tests
messages: 345794
nosy: gmarler
priority: normal
severity: normal
status: open
title: Solaris 11.3 w/ Studio 12.6 test_support fail
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue37310] Solaris 11.3 w/ Studio 12.6 test_ctypes fail

2019-06-16 Thread Gordon Marler


New submission from Gordon Marler :

Building a 64-bit Python 3.7.3 on Solaris 11.3 with Studio 12.6, and these 
test_ctypes tests fail:

python -m test -v test_ctypes

...

==
FAIL: test_ints (ctypes.test.test_bitfields.C_Test)
--
Traceback (most recent call last):
  File 
"/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/ctypes/test/test_bitfields.py",
 line 40, in test_ints
self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii')))
AssertionError: -1 != 1

==
FAIL: test_shorts (ctypes.test.test_bitfields.C_Test)
--
Traceback (most recent call last):
  File 
"/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/ctypes/test/test_bitfields.py",
 line 47, in test_shorts
self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii')))
AssertionError: -1 != 1

==
FAIL: test_pass_by_value (ctypes.test.test_structures.StructureTestCase)
--
Traceback (most recent call last):
  File 
"/perfwork/gitwork/python/solaris/components/python/python373/Python-3.7.3/Lib/ctypes/test/test_structures.py",
 line 416, in test_pass_by_value
self.assertEqual(s.first, 0xdeadbeef)
AssertionError: 195948557 != 3735928559

--

Ran 472 tests in 3.545s

FAILED (failures=3, skipped=94)
test test_ctypes failed
test_ctypes failed

--
components: Tests, ctypes
messages: 345793
nosy: gmarler
priority: normal
severity: normal
status: open
title: Solaris 11.3 w/ Studio 12.6 test_ctypes fail
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue37189] PyRun_String not exported in python38.dll

2019-06-16 Thread PyScripter


PyScripter  added the comment:

This does break PyScripter Python for Delphi as well.  The question whether 
this change was intentional in which case it would need to be explained and 
documented, or accidental and will be reversed begs an answer.

--
nosy: +pyscripter

___
Python tracker 

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



[issue36956] Calling "functions" used to implement generators/comps easily cause crash

2019-06-16 Thread Hunter Turcin


Change by Hunter Turcin :


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



[issue35224] PEP 572: Assignment Expressions

2019-06-16 Thread Guido van Rossum

Guido van Rossum  added the comment:

Do you want to give it a try yourself?

On Sun, Jun 16, 2019 at 14:42 Jörn Heissler  wrote:

>
> Jörn Heissler  added the comment:
>
> Hello,
>
> https://www.python.org/dev/peps/pep-0572/#change-to-evaluation-order
> mentions a change of evaluation order for dict comprehensions. It looks
> like this is not implemented yet (as of commit 66d47da8).
>
> Will this be implemented in this issue, or should I create a new one?
>
> Thanks
>
> --
> nosy: +joernheissler
>
> ___
> Python tracker 
> 
> ___
>
-- 
--Guido (mobile)

--

___
Python tracker 

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



[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2019-06-16 Thread miss-islington


miss-islington  added the comment:


New changeset e784f9f1c3fdd2102aae3fc0fe226408ff3a6029 by Miss Islington (bot) 
in branch '3.8':
bpo-28805: document METH_FASTCALL (GH-14079)
https://github.com/python/cpython/commit/e784f9f1c3fdd2102aae3fc0fe226408ff3a6029


--

___
Python tracker 

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



[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2019-06-16 Thread miss-islington


miss-islington  added the comment:


New changeset b101fa7783615051a89500e488708b955eac94c5 by Miss Islington (bot) 
in branch '3.7':
bpo-28805: document METH_FASTCALL (GH-14079)
https://github.com/python/cpython/commit/b101fa7783615051a89500e488708b955eac94c5


--
nosy: +miss-islington

___
Python tracker 

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



[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2019-06-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13979
pull_request: https://github.com/python/cpython/pull/14137

___
Python tracker 

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



[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2019-06-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13978
pull_request: https://github.com/python/cpython/pull/14136

___
Python tracker 

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



[issue34162] idlelib/NEWS.txt for 3.8.0 (and backports)

2019-06-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Closed prematurely.  This continues until last IDLE addition to 3.8.0

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

___
Python tracker 

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



[issue37309] idlelib/NEWS.txt for 3.9.0 and backports

2019-06-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

However, this starts with first merge that does not go in 3.8.0, which will be 
after 3.8.0c1.

--

___
Python tracker 

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



[issue34162] idlelib/NEWS.txt for 3.8.0 (and backports)

2019-06-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Master became 3.9.0a0 as of 2019 June 4.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
superseder:  -> idlelib/NEWS.txt for 3.9.0 and backports

___
Python tracker 

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



[issue37309] idlelib/NEWS.txt for 3.9.0 and backports

2019-06-16 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Master is 3.9.0a0 as of 2019 June 4.

--
assignee: terry.reedy
components: IDLE
messages: 345785
nosy: terry.reedy
priority: normal
severity: normal
stage: commit review
status: open
title: idlelib/NEWS.txt for 3.9.0 and backports
type: enhancement
versions: 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



[issue37295] Possible optimizations for math.comb()

2019-06-16 Thread Boštjan Mejak

Boštjan Mejak  added the comment:

Performance improvements is what a beta build exists for in the first place.

--
nosy: +PedanticHacker

___
Python tracker 

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



[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-06-16 Thread Gil Forcada Codinachs


Gil Forcada Codinachs  added the comment:

At least test_namespace_pkgs is already moved, see 
https://bugs.python.org/issue21097

Should then this issue be closed?

I see that there are a few other tests that have import on its name and are 
outside either test_import or test_importlib:

- test_pkgimport.py
- test_threaded_import.py
- test_zipimport.py
- test_zipimport_support.py
- threaded_import_hangers.py

Should those be actually moved to test_importlib?

--
nosy: +gforcada

___
Python tracker 

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



[issue35224] PEP 572: Assignment Expressions

2019-06-16 Thread Jörn Heissler

Jörn Heissler  added the comment:

Hello,

https://www.python.org/dev/peps/pep-0572/#change-to-evaluation-order mentions a 
change of evaluation order for dict comprehensions. It looks like this is not 
implemented yet (as of commit 66d47da8).

Will this be implemented in this issue, or should I create a new one?

Thanks

--
nosy: +joernheissler

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-06-16 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue37220] test_idle crash on Windows 2.7 when run with -R:

2019-06-16 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords:  -patch
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



[issue9267] Update pickle opcode documentation in pickletools for 3.x

2019-06-16 Thread Gil Forcada Codinachs


Gil Forcada Codinachs  added the comment:

pickletools documentation is here:

https://docs.python.org/3/library/pickletools.html#module-pickletools

Sources are here:

https://github.com/python/cpython/blob/master/Doc/library/pickletools.rst

--
nosy: +gforcada

___
Python tracker 

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



[issue37220] test_idle crash on Windows 2.7 when run with -R:

2019-06-16 Thread miss-islington


miss-islington  added the comment:


New changeset 2acaf496b71224ff6d170ea12b0876d65195be7b by Miss Islington (bot) 
in branch '3.8':
bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957)
https://github.com/python/cpython/commit/2acaf496b71224ff6d170ea12b0876d65195be7b


--

___
Python tracker 

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



[issue37220] test_idle crash on Windows 2.7 when run with -R:

2019-06-16 Thread miss-islington


miss-islington  added the comment:


New changeset 0c45aee8036a27fb76d6d8d4bac61c3715aec22d by Miss Islington (bot) 
in branch '3.7':
bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957)
https://github.com/python/cpython/commit/0c45aee8036a27fb76d6d8d4bac61c3715aec22d


--
nosy: +miss-islington

___
Python tracker 

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



[issue37220] test_idle crash on Windows 2.7 when run with -R:

2019-06-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13977
pull_request: https://github.com/python/cpython/pull/14135

___
Python tracker 

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



[issue37220] test_idle crash on Windows 2.7 when run with -R:

2019-06-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 66d47da86aff15be34adbec02596bb3188684c0d by Terry Jan Reedy in 
branch 'master':
bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957)
https://github.com/python/cpython/commit/66d47da86aff15be34adbec02596bb3188684c0d


--

___
Python tracker 

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



[issue37220] test_idle crash on Windows 2.7 when run with -R:

2019-06-16 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
pull_requests: +13976
pull_request: https://github.com/python/cpython/pull/14134

___
Python tracker 

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



[issue37294] concurrent.futures.ProcessPoolExecutor and multiprocessing.pool.Pool fail with super

2019-06-16 Thread Géry

Géry  added the comment:

George Xie found the root cause of this issue (a bug in the function 
method_reduce in cpython/Objects/classobject.c):

https://stackoverflow.com/questions/56609847/why-do-concurrent-futures-processpoolexecutor-and-multiprocessing-pool-pool-fail/56614748#56614748

and he filed the specific bug here:

https://bugs.python.org/issue37297

The issue looks serious as it creates an infinite recursion that crashed my 
laptop several times today.

--

___
Python tracker 

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



[issue37297] function changed when pickle bound method object

2019-06-16 Thread Géry

Géry  added the comment:

As you stated on Stackoverflow, the fact that the function `A.f` becomes the 
function `B.f` after a pickling-unpickling sequence creates an infinite 
recursive call of `B.f` in worker processes started with 
`multiprocessing.pool.Pool().apply(super().f)` or 
`concurrent.futures.ProcessPoolExecutor().submit(super().f)` in `B.f` where B 
is a subclass of A. This infinite recursion has crashed my laptop several times 
today, so it looks like it is a rather critical issue.

--

___
Python tracker 

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



[issue37300] a Py_XINCREF in classobject.c are not necessary

2019-06-16 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset c83356cae2e375324ff4a3fb5d574ebde5c827a9 by Benjamin Peterson 
(Hai Shi) in branch 'master':
closes bpo-37300: Remove unnecessary Py_XINCREF in classobject.c. (GH-14120)
https://github.com/python/cpython/commit/c83356cae2e375324ff4a3fb5d574ebde5c827a9


--
nosy: +benjamin.peterson
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



[issue34796] Tkinter scrollbar issues on Mac.

2019-06-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

IDLE currently uses whatever 'ttk.Scrollbar' is. Unlike Windows, there are no 
top and bottom arrows, but this is also true with Safari, so I presume normal.

"Clicking trough near slider has no effect".  True for large file and small 
slider, not for medium file with large slider.

"Clicking top of slider treated as clicking on trough above slider.  True for 
about top 2 mm of the slider, when click and hold does not grab the slider.  If 
the slider is not at the top, it moves up.

So ttk slider becomes less useful as the file gets large, and only half usable 
at about 3000 lines and up.

--

___
Python tracker 

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



[issue37297] function changed when pickle bound method object

2019-06-16 Thread Géry

Change by Géry :


--
nosy: +brett.cannon, pitrou, rhettinger, serhiy.storchaka

___
Python tracker 

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



[issue34796] Tkinter scrollbar issues on Mac.

2019-06-16 Thread Christopher A. Chavez


Christopher A. Chavez  added the comment:

> Apparently, the current ttk.Scrollbar on the 8.6.8 we currently deliver 
> should sort of work.

I'm not sure if that is the case, though I have not tested with 8.6.8 (I do not 
currently have access to High Sierra or earlier). Based on a comment by the 
developer (Marc Culler) in https://core.tcl-lang.org/tk/tktview?name=0d63621b6c 
it sounds like the Ttk scrollbar is a completely new implementation for 8.6.10, 
whereas before (8.6.9.1? 8.6.8?) any code requesting a Ttk scrollbar on Aqua 
normally got a non-Ttk scrollbar instead.

--

___
Python tracker 

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



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-06-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

>>> from abc import *
>>> A = ABCMeta('A', (), {})
>>> A.__module__
'abc'
>>> import pickle, pickletools
>>> pickletools.dis(pickletools.optimize(pickle.dumps(A)))
Traceback (most recent call last):
  File "", line 1, in 
_pickle.PicklingError: Can't pickle : attribute lookup A on abc 
failed
>>> A.__module__ = None
>>> pickletools.dis(pickletools.optimize(pickle.dumps(A)))
0: \x80 PROTO  4
2: \x95 FRAME  15
   11: \x8c SHORT_BINUNICODE '__main__'
   21: \x8c SHORT_BINUNICODE 'A'
   24: \x93 STACK_GLOBAL
   25: .STOP
highest protocol among opcodes = 4

--

___
Python tracker 

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



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-06-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Getting the module name from the caller's frame is an expensive operation. It 
is safe to set __module__ to None. In such case the pickle module is able to 
find the proper module containing the definition of the class.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34796] Tkinter scrollbar issues on Mac.

2019-06-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Christopher, I submitted before seeing your message.  Thank you for the 
additional info, which verifies that this is an upstream issue.  Apparently, 
the current ttk.Scrollbar on the 8.6.8 we currently deliver should sort of work.

--
resolution:  -> third party
stage: test needed -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue34796] Tkinter scrollbar issues on Mac.

2019-06-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This should probably be closed as 3rd party, but someone needs to verify that 
the bug is in tk.  In the meanwhile, let it sit.

Vlad's test works perfectly on Windows with 8.6.9.  In multiple tries, mouse at 
(x, Y <= 16) is top arrow, (x, y >= 17) is slider.

--
nosy:  -ronaldoussoren
stage: needs patch -> test needed
versions: +Python 3.9 -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34796] Tkinter scrollbar issues on Mac.

2019-06-16 Thread Ned Deily


Ned Deily  added the comment:

As far as I recall, the scrollbar issue did seem to be fixed in 8.6.9.1 so that 
was one plus for updating.  But, as described in Issue35485, updating 
introduced other, far more serious new problems so we decided to revert to 
8.6.8 and wait for a new official release.

--

___
Python tracker 

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



[issue34796] Tkinter scrollbar issues on Mac.

2019-06-16 Thread Christopher A. Chavez


Christopher A. Chavez  added the comment:

I have not successfully reproduced the issue here with tkinter 3.7.3 using 
8.6.9.1 or recent core-8-6-branch on macOS Mojave.

I understand the reporter of this issue believed this was not an upstream Tk 
issue. However there's a recently opened upstream ticket relating to scrollbars 
on Aqua which may be of interest: 
https://core.tcl-lang.org/tk/info/8476b757811b3694

At the moment, one of the Tk Aqua developers appears to advise against using 
the normal (non-Ttk) scrollbar at all on macOS because it has never worked 
properly and likely will not be fixed, and instead suggests using the new Ttk 
scrollbar implementation, which should be available in 8.6.10.

--

___
Python tracker 

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



[issue36429] Fix starting IDLE with pyshell

2019-06-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Yep.  I changes the headers but must have neglected to hit [Submit Changes].

--

___
Python tracker 

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



[issue36429] Fix starting IDLE with pyshell

2019-06-16 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue34506] Traceback logged when SSL handshake fails

2019-06-16 Thread Ned Deily


Change by Ned Deily :


--
components: +asyncio
nosy: +asvetlov, yselivanov

___
Python tracker 

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



[issue34796] Tkinter scrollbar issues on Mac.

2019-06-16 Thread Ned Deily


Ned Deily  added the comment:

> Since then, there do not seem to have been any official releases of 8.6.9 so 
> we remain with 8.6.8

That is: there have been no official releases of Tk past 8.6.9.1 which was 
tried, along with the then current HEAD of the 8.6 maintenance branch, back in 
December.

--

___
Python tracker 

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



[issue34796] Tkinter scrollbar issues on Mac.

2019-06-16 Thread Ned Deily


Ned Deily  added the comment:

As far as I recall, we have only ever shipped 8.6.8 in final releases since we 
started providing a built-in Tcl/Tk in the python.org macOS installers as of 
3.7.0, 3.6.8, and 2.7.16 (https://www.python.org/download/mac/tcltk/).  There 
was the disastrous attempt to update to 8.6.9+ during the 3.7.2rc phase which 
we ultimately reverted prior to 3.7.2 final, as documented in Issue35485.  
Since then, there do not seem to have been any official releases of 8.6.9 so we 
remain with 8.6.8.  It would probably be a good thing for someone to work with 
the Tk folks on seeing whether the problems seen are being resolved but it's 
not something I expect to have time for in the foreseeable future.

--

___
Python tracker 

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



[issue37308] Possible mojibake in mmap.mmap() when using the tagname parameter on Windows

2019-06-16 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue37308] Possible mojibake in mmap.mmap() when using the tagname parameter on Windows

2019-06-16 Thread Zackery Spytz


New submission from Zackery Spytz :

mmap.mmap() passes a char * encoded as UTF-8 to CreateFileMappingA() when the 
tagname parameter is used.

This was reported by Eryk Sun on PR 14114.

--
components: Extension Modules, Windows
messages: 345763
nosy: ZackerySpytz, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Possible mojibake in mmap.mmap() when using the tagname parameter on 
Windows
type: behavior
versions: Python 2.7, 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



[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2019-06-16 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 5600b5e1b24a3491e83f1b3038a7ea047a34c0bf by Inada Naoki (Jeroen 
Demeyer) in branch 'master':
bpo-28805: document METH_FASTCALL (GH-14079)
https://github.com/python/cpython/commit/5600b5e1b24a3491e83f1b3038a7ea047a34c0bf


--
nosy: +inada.naoki

___
Python tracker 

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



[issue37295] Possible optimizations for math.comb()

2019-06-16 Thread Mark Dickinson


Mark Dickinson  added the comment:

(1), (4) and (5) sound good to me.

For (1), it might make sense to ignore the 32-bit vs. 64-bit distinction and 
use `uint64_t` for the internal computations. Then we can do up to n = 62 
regardless of platform.

(2) feels like too much extra complication to me, but that would become clearer 
with an implementation.

For (3), I somewhat agree that the factorial method should be avoided.

For (4), I don't see how/when the GIL could be released: doesn't the algorithm 
involve lots of memory allocations/deallocations and reference count 
adjustments?

Can the suggested performance improvements go into 3.8, or should they wait for 
3.9? It's not clear to me whether a performance improvement after feature 
freeze is okay or not.

--

___
Python tracker 

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



[issue34506] Traceback logged when SSL handshake fails

2019-06-16 Thread Aymeric Augustin


Aymeric Augustin  added the comment:

The same issue was reported in the bug tracker for websockets: 
https://github.com/aaugustin/websockets/issues/614

--
nosy: +aymeric.augustin

___
Python tracker 

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



[issue34831] Asyncio Tutorial

2019-06-16 Thread Ned Deily


Change by Ned Deily :


--
nosy:  -ned.deily

___
Python tracker 

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



[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2019-06-16 Thread hai shi


hai shi  added the comment:

got it, Eric

--

___
Python tracker 

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



[issue36429] Fix starting IDLE with pyshell

2019-06-16 Thread Tal Einat


Tal Einat  added the comment:

Terry, it looks like you merged a fix for this. Should this be closed?

--
nosy: +taleinat

___
Python tracker 

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



[issue34796] Tkinter scrollbar issues on Mac.

2019-06-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Ned, is the version of tcl/tk on Mac the same in 3.8.0b1 and upcoming 3.7.4 as 
it was last September?  (8.6.8 in 3.7.3, not sure in Sept.)

--

___
Python tracker 

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



[issue36964] `python3 -m venv NAME`: virtualenv is not portable

2019-06-16 Thread Marco Sulla


Marco Sulla  added the comment:

> I don't like the idea of changing what VIRTUAL_ENV gets set to when I 
> believe you should recreate the virtual environment as necessary and 
> risk surprising people who expect VIRTUAL_ENV to function as it does 
> today and has for years.

(Talking to the wind) Well, didn't you have software tests?

--

___
Python tracker 

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



[issue34831] Asyncio Tutorial

2019-06-16 Thread Caleb Hattingh


Caleb Hattingh  added the comment:

FYI I'm going to be using the 3rd-party prompt-toolkit for the chat client. 
(The server depends only on asyncio only).  I put several hours research into 
finding a way for the CLI chat client to be not terrible, but it gets very 
complicated trying to manage stdin and stdout with asyncio.  OTOH 
prompt-toolkit just gives us exactly what we need, and the code looks short, 
neat and easy to understand. I hope that's ok (that I'll be mentioning a 3rd 
party lib in the tutorial).

--

___
Python tracker 

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



[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2019-06-16 Thread Eric V. Smith


Eric V. Smith  added the comment:

Since ++i already has a meaning, it won't become a syntax error without an 
extremely good reason, and I don't think this case meets that standard.

But as Steven says, if you want to pursue it, you should start with a 
discussion on python-ideas.

--
nosy: +eric.smith

___
Python tracker 

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



[issue37306] "~/" not working with open() function in posix systems

2019-06-16 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Support for "~" isn't strictly part of the POSIX file system standard, it is a 
*shell* shortcut. As far as the file system is concerned, "~" is just a regular 
character like any other.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-16 Thread SilentGhost


SilentGhost  added the comment:

It's the same behaviour as for isinstance, could be enough to add "classinfo is 
treated as in isinstance call" to avoid duplication. This would also solve 
short-cutting imprecision.

--

___
Python tracker 

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



[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-16 Thread Franklin? Lee


Franklin? Lee  added the comment:

> > It's likely also false that every entry will be checked, since presumably 
> > the function uses short-circuit logic.

> This, however, would be good to verify first.

Verified.
https://github.com/python/cpython/blob/36dcaab7fde5d2e54cdeff5b705b5adcb27726dd/Objects/abstract.c#L2517

It loops through the tuple until it finds success or error.

--

___
Python tracker 

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



[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-16 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

docstring for issubclass is a bit clear on the behavior


issubclass(cls, class_or_tuple, /)
Return whether 'cls' is a derived from another class or is the same class.

A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to
check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)
or ...`` etc.

--
nosy: +xtreak

___
Python tracker 

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



[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-16 Thread Franklin? Lee


Franklin? Lee  added the comment:

My mistake. I selected all versions after checking issubclass for 2.7 and 
several 3.x, but added the isinstance notes later without paying attention to 
versions.

I copied the isinstance text from 3.2 docs. As you said, it's not the current 
text.

--

___
Python tracker 

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



[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-16 Thread SilentGhost


SilentGhost  added the comment:

> It's likely also false that every entry will be checked, since presumably the 
> function uses short-circuit logic.

This, however, would be good to verify first.

--

___
Python tracker 

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



[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-16 Thread SilentGhost


SilentGhost  added the comment:

Where are you seeing the text you've quoted for isinstance? You've marked as 
all versions affected, but for the master docs the text for isinstance is 
different and is unambiguous re treatment of tuple classinfo.

I agree with all your points about issubclass

--
nosy: +SilentGhost

___
Python tracker 

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



[issue37306] "~/" not working with open() function in posix systems

2019-06-16 Thread SilentGhost


SilentGhost  added the comment:

Yes, '~' is not working out of the box and never had. You need to use 
os.path.expanduser or pathllib.Path.expanduser to get the useable path.

--
nosy: +SilentGhost
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



[issue37306] "~/" not working with open() function in posix systems

2019-06-16 Thread flipchan


flipchan  added the comment:

scratch """
However, "~/" is working with os.path modules:   
 os.path.isfile("~/.hey")

"""
that's not working either

--

___
Python tracker 

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



[issue37307] isinstance/issubclass doc isn't clear on whether it's an AND or an OR.

2019-06-16 Thread Franklin? Lee


New submission from Franklin? Lee :

isinstance:
> If classinfo is not a class (type object), it may be a tuple of type objects, 
> or may recursively contain other such tuples (other sequence types are not 
> accepted).

issubclass:
> classinfo may be a tuple of class objects, in which case every entry in 
> classinfo will be checked.

It is unclear from the docs whether
issubclass(bool, (int, float))
should return True (because bool is a subclass of int),
or False (because bool is NOT a subclass of float).
(It returns True.)

It's likely also false that every entry will be checked, since presumably the 
function uses short-circuit logic.

issubclass's doc also doesn't mention the recursive tuple case that 
isinstance's doc has.

--
assignee: docs@python
components: Documentation
messages: 345744
nosy: docs@python, leewz
priority: normal
severity: normal
status: open
title: isinstance/issubclass doc isn't clear on whether it's an AND or an OR.
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6, 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



[issue37306] "~/" not working with open() function in posix systems

2019-06-16 Thread flipchan


New submission from flipchan :

"~/" being a shortcut to the current home directory on posix systems(bsd/linux).
its not working with the build in open() function open:

It works to get the path as a string:
with open(str(Path.home())+'/.hey', wb') as minfil: 
  
minfil.write(nycklen)

But not out of the box:
with open('~/.hey', 'wb') as minfil:
minfil.write(nycklen)  
 

   
However, "~/" is working with os.path modules:   
 os.path.isfile("~/.hey")


Tested with Python 3.6.8

--
components: Library (Lib)
messages: 345743
nosy: flipchan
priority: normal
severity: normal
status: open
title: "~/" not working with open() function in posix systems
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



[issue37289] regression in Cython when pickling objects

2019-06-16 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +13974
pull_request: https://github.com/python/cpython/pull/14127

___
Python tracker 

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



[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2019-06-16 Thread hai shi


hai shi  added the comment:

Thank for your suggestion,Steven. If python can not support post-increment and 
-decrement operators now, i think ++i should raise syntax error as i++.

--

___
Python tracker 

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



[issue28869] __module__ attribute is not set correctly for a class created by direct metaclass call

2019-06-16 Thread Alejandro Gonzalez


Change by Alejandro Gonzalez :


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

___
Python tracker 

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



[issue37301] CGIHTTPServer doesn't handle long POST requests

2019-06-16 Thread SilentGhost


Change by SilentGhost :


--
nosy: +georg.brandl

___
Python tracker 

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



[issue37305] Add MIME type for Web App Manifest

2019-06-16 Thread Filip Š

New submission from Filip Š :

Web App Manifest ( https://w3c.github.io/manifest/ ) is "JSON-based manifest 
file that provides developers with a centralized place to put metadata 
associated with a web application".

Although it is not required, it is recommended by W3C ( 
https://w3c.github.io/manifest/#media-type-registration ) that manifest uses 
`application/manifest+json` media type and `.webmanifest` extension.

This should also be used by Python's mimetypes module.


I can submit PR for this, but I don't know if it should be added to `types_map` 
or `common_types`. It is currently not registered with IANA, but it is "for 
community review and will be submitted to the IESG for review, approval, and 
registration with IANA".

If it is not strictly needed for MIME type that it is registered with IANA, I 
will add it to `types_map`. If it is, I will add it `common_types` and later 
move it to `types_map` when it will be registered. What should I choose?

--
messages: 345741
nosy: filips123
priority: normal
severity: normal
status: open
title: Add MIME type for Web App Manifest
type: enhancement

___
Python tracker 

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



[issue37301] CGIHTTPServer doesn't handle long POST requests

2019-06-16 Thread shajianrui


shajianrui  added the comment:

I have the same problem, and use a similar walk-around:
1. I set the rbufsize to -1
2. I use self.connection.recv instead of self.rfile.read(), like this:
while select.select([self.connection], [], [], 0)[0]:
if not self.connection.recv(1):

However, when I go through the code, I find that at line 967 in server.py(I am 
using python 3.7), there is a comment:
# Make rfile unbuffered -- we need to read one line and then pass
# the rest to a subprocess, so we can't use buffered input.
rbufsize = 0

Seems for some reasons the author set rfile unbuffered, and I know nothing 
about it.

If you know much about it, please give me some hints, thank you.

--
nosy: +shajianrui

___
Python tracker 

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



[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2019-06-16 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

For the reasons already discussed on the Stackoverflow link you gave, Python 
does not have pre- and post-increment and -decrement operators, and probably 
never will.

I'm closing this ticket as Won't Fix, but if you wish to discuss it further, 
you can raise it on Python-Ideas for community feedback. If there is 
significant interest, you can then write a PEP for it, and if the PEP is 
approved, then you can re-open this ticket and provide a PR or patch.


https://mail.python.org/mailman3/lists/python-ideas.python.org/

https://www.python.org/dev/peps/

--
nosy: +steven.daprano
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13972
pull_request: https://github.com/python/cpython/pull/14125

___
Python tracker 

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



[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2019-06-16 Thread hai shi


New submission from hai shi :

compiler need support unary operation of in(de)crement or all of it should have 
syntax error.I have found many user have confused about it(such 
as:https://stackoverflow.com/questions/2632677/python-integer-incrementing-with).
 Of course, it is a big change of grammar and it need core developer team to 
make decision.

If core developer team support it, i will try my best to do it;)

The behavior is:

$ ./python
Python 3.8.0a4+ (heads/master:e225beb, Jun  4 2019, 00:35:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> i = 1;
>>> ++i
1
>>> i++
  File "", line 1
i++
  ^
SyntaxError: invalid syntax

--
components: Interpreter Core
messages: 345738
nosy: shihai1991
priority: normal
severity: normal
status: open
title: compiler need support in(de)crement operation or all of it should have 
syntax error.
type: behavior

___
Python tracker 

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



[issue34796] Tkinter scrollbar issues on Mac.

2019-06-16 Thread Christopher A. Chavez


Change by Christopher A. Chavez :


--
nosy: +chrstphrchvz

___
Python tracker 

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



[issue37297] function changed when pickle bound method object

2019-06-16 Thread Géry

Change by Géry :


--
nosy: +maggyero

___
Python tracker 

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



[issue37300] a Py_XINCREF in classobject.c are not necessary

2019-06-16 Thread hai shi


New submission from hai shi :

a Py_XINCREF in classobject.c are not necessary

--

___
Python tracker 

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



[issue35121] Cookie domain check returns incorrect results

2019-06-16 Thread STINNER Victor


STINNER Victor  added the comment:

Again, well done Karthikeyan Singaravelan!

--

___
Python tracker 

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



[issue35647] Cookie path check returns incorrect results

2019-06-16 Thread STINNER Victor


STINNER Victor  added the comment:

Well done Karthikeyan Singaravelan! I planned to review your 2.7 change,
but I didn't manage to find time for that. So thanks Serhiy for merging it!

--

___
Python tracker 

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



[issue35922] robotparser crawl_delay and request_rate do not work with no matching entry

2019-06-16 Thread Tal Einat

Tal Einat  added the comment:

Rémi, thanks for the great work writing the PR and quickly going through 
several iterations of reviews and revisions!

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



[issue35922] robotparser crawl_delay and request_rate do not work with no matching entry

2019-06-16 Thread miss-islington


miss-islington  added the comment:


New changeset 45d6547acfb9ae1639adbe03dd14f38cd0642ca2 by Miss Islington (bot) 
in branch '3.7':
bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or 
request rate (GH-11791)
https://github.com/python/cpython/commit/45d6547acfb9ae1639adbe03dd14f38cd0642ca2


--

___
Python tracker 

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



[issue35922] robotparser crawl_delay and request_rate do not work with no matching entry

2019-06-16 Thread miss-islington


miss-islington  added the comment:


New changeset 58a1a76baefc92d9e2392a5dbf65e39e44fb8f55 by Miss Islington (bot) 
in branch '3.8':
bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or 
request rate (GH-11791)
https://github.com/python/cpython/commit/58a1a76baefc92d9e2392a5dbf65e39e44fb8f55


--
nosy: +miss-islington

___
Python tracker 

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



[issue37295] Possible optimizations for math.comb()

2019-06-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Optimizations 2 and 3 look something like this:

bc75 = [comb(75, r) for r in range(75//2+1)]
bc150 = [comb(150, r) for r in range(150//2+1)]
bc225 = [comb(225, r) for r in range(225//2+1)]

def comb(n, k):
if n < 0 or k < 0: raise ValueError
if k > n: return 0
k = min(k, n-k)
if k > n // 3 and n < 100_000:
return factorial(n) // (factorial(r) * factorial(n-r))
if 75 <= n <= 75 + k:
c, num, den, times = bc75[75-(n-k)], 75+1, 75-(n-k)+1, n-75
elif 150 <= n <= 150 + k:
c, num, den, times = bc150[150-(n-k)], 150+1, 150-(n-k)+1, n-150
elif 225 <= n <= 225 + k:
c, num, den, times = bc225[225-(n-k)], 225+1, 225-(n-k)+1, n-225
else:
c, num, den, times = 1, n-k+1, 1, k
for i in range(times):
c = c * num // den
num += 1
den += 1
return c

--

___
Python tracker 

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



[issue35922] robotparser crawl_delay and request_rate do not work with no matching entry

2019-06-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13971
pull_request: https://github.com/python/cpython/pull/14122

___
Python tracker 

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



[issue35922] robotparser crawl_delay and request_rate do not work with no matching entry

2019-06-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13970
pull_request: https://github.com/python/cpython/pull/14121

___
Python tracker 

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



[issue35922] robotparser crawl_delay and request_rate do not work with no matching entry

2019-06-16 Thread Tal Einat

Tal Einat  added the comment:


New changeset 8047e0e1c620f69cc21f9ca48b24bf2cdd5c3668 by Tal Einat (Rémi 
Lapeyre) in branch 'master':
bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or 
request rate (GH-11791)
https://github.com/python/cpython/commit/8047e0e1c620f69cc21f9ca48b24bf2cdd5c3668


--

___
Python tracker 

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



[issue37303] Rename parameter name of imghdr what

2019-06-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Inlike to sndhdr.what(), imghdr.what() accepts not only file names, by file 
objects theirself. The feature was added at 1997 in 
45ac47c0b2798cc3a29cf5111694aba5e9347e08.

--
nosy: +serhiy.storchaka
resolution:  -> rejected
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