[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your example Terry. There was one dubious place which I did not 
change because I did not know how to trigger the execution of it. Now the 
clipboard is fixed.

--

___
Python tracker 

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



[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

A week ago, I thought that the astral solution was to always replace with the 
\U escape.  With this patch, we can and should send them to read-only text 
windows, and let the OS and font display it or a substitute.  On Windows, at 
least, the emoji which beginners most often want to use get displayed.

Elsewhere, we will have to check and do some follow-up patches.  For using file 
names with astral chars results, on Windows, in six large boxes, and when the 
file is saved, it is saved in a new file with the boxes, not the original file. 
 Such file names are not added to the recent files list, or maybe list boxes 
cannot handle them.

Code is another issue.  Astral chars in files could be replaced when read.  
Unfortunately, I believe some are legal identifier chars.  On the clipboard, on 
Windows, astral chars become sequences of 6 surrogates.

>>> r.clipboard_clear()
>>> r.clipboard_append('')
>>> r.clipboard_get()
'\udced\udca0\udcbd\udced\udcba\udc80'

Perhaps we should try to intercept paste and replace such sequences with the \U 
escape.

--

___
Python tracker 

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



[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-03 Thread Tim Peters


Tim Peters  added the comment:

My understanding is that the CFFI types at issue don't even have 
Py_TPFLAGS_HAVE_GC.  They're completely invisible to gc.  As Armin says in the 
CFFI issue report (linked to earlier), he never got the impression from the 
docs that he needed to implement anything related to cyclic gc.

Since Armin is extremely capable, conscientious, and reasonable, that tells me 
our docs are lacking.

It was intended at the start that the worst that could happen if a type ignored 
the gc protocols was that memory may leak.  That story changed radically when 
weakrefs with callbacks were added - but nobody knew it at the time because the 
weakref design gave no thought to cyclic gc.  It's been driven by segfaults 
ever since ;-)

We're doing all we can to keep non-cooperating code "working", and will 
continue to do so.  But who knows?  The next segfault may be one we can't hack 
around.  It's fundamentally insane to expect any gc to work perfectly when it 
may be blind to what the object graph _is_.

--

___
Python tracker 

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



[issue38337] inspect: getmembers calls properties

2019-10-03 Thread hongweipeng


hongweipeng  added the comment:

I mean why member `__class__` is expected to be `)`. 
I check PR16521,for __class__, it always gets `)`.

--

___
Python tracker 

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



[issue38350] ./configure --with-pydebug should use -O0 rather than -Og

2019-10-03 Thread Ned Deily


Change by Ned Deily :


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



[issue38346] Wrong behavior when using `assert_called_with` with mutable object

2019-10-03 Thread Jim Jeon


Jim Jeon  added the comment:

Thank you all for the kind answers.
I didn't know copying could cause so many problems.

@veky
Thank you for the example.
But it seems that the example will actually raise and I think it should.
I am talking f.assert_called_with(b) when `b` has same values of `a` before it 
is mutated. I thought the function's purpose is to check values of the exact 
moment the function is called.

@xtreak
Thanks for the related issue. I didn't consider `identity comparison` 
situations. Definitely that could cause problems.

@mariocj89
> copy does not fully capture "the value of the object when it was passed" for 
> custom types.
Thank you for the kind answer, it was really helpful to me. Now I understand 
why copying is so dangerous.

--

___
Python tracker 

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



[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f0c85793d2a087974969f7eea6ca24bbd1178d53 by Victor Stinner in 
branch 'master':
bpo-38353: Rework ismodule() in getpath.c (GH-16574)
https://github.com/python/cpython/commit/f0c85793d2a087974969f7eea6ca24bbd1178d53


--

___
Python tracker 

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



[issue37700] shutil.copyfile does not raise SpecialFileError for socket files

2019-10-03 Thread AWhetter


Change by AWhetter :


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

___
Python tracker 

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



[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16166
pull_request: https://github.com/python/cpython/pull/16574

___
Python tracker 

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



[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 03a8a56faca0c1851051269e3517d70cbce830b7 by Victor Stinner in 
branch 'master':
bpo-38353: Add subfunctions to getpath.c (GH-16572)
https://github.com/python/cpython/commit/03a8a56faca0c1851051269e3517d70cbce830b7


--

___
Python tracker 

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



[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e982d8b64f5d358c578bfca5cdfe4524dbc74000 by Victor Stinner in 
branch 'master':
bpo-38353: Fix compiler warning in internal headers (GH-16573)
https://github.com/python/cpython/commit/e982d8b64f5d358c578bfca5cdfe4524dbc74000


--

___
Python tracker 

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



[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:

On my Fedora 30, GCC doesn't complain on "typedef struct pyruntimestate 
_PyRuntimeState;". But clang on macOS emits a warning, saying that it's 
C11-only feature. So I modified the internal header files to use "struct 
pyruntimestate" instead, to avoid any compilation issue.

--

___
Python tracker 

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



[issue38367] test_regrtest hanged on AMD64 Windows10 3.x

2019-10-03 Thread STINNER Victor


New submission from STINNER Victor :

https://buildbot.python.org/all/#/builders/3/builds/3617

...
0:25:50 load avg: 0.00 running: test_regrtest (13 min 48 sec)
0:26:20 load avg: 0.00 running: test_regrtest (14 min 18 sec)
0:26:50 load avg: 0.00 running: test_regrtest (14 min 48 sec)
0:27:02 load avg: 0.00 [419/419/1] test_regrtest crashed (Exit code 1)

(...)

0:27:02 load avg: 0.00 Re-running failed tests in verbose mode
0:27:02 load avg: 0.00 Re-running test_regrtest in verbose mode

Timeout (0:15:00)!
Thread 0x2ee0 (most recent call first):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 1457 in 
_readerthread
  File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 882 in 
run
  File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 944 in 
_bootstrap_inner
  File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 902 in 
_bootstrap

Thread 0x2140 (most recent call first):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 1039 in 
_wait_for_tstate_lock
  File "D:\buildarea\3.x.bolen-windows10\build\lib\threading.py", line 1023 in 
join
  File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 1486 in 
_communicate
  File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 1113 in 
communicate
  File "D:\buildarea\3.x.bolen-windows10\build\lib\subprocess.py", line 499 in 
run
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 
504 in run_command
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 
529 in run_python
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 
584 in run_tests
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_regrtest.py", line 
610 in test_module_autotest
  File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 616 
in _callTestMethod
  File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 659 
in run
  File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 719 
in __call__
  File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 
in run
  File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 
in __call__
  File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 
in run
  File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 
in __call__
  File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 
in run
  File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 
in __call__
  File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\runner.py", line 
176 in run
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", 
line 2032 in _run_suite
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", 
line 2128 in run_unittest
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 
209 in _test_module
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 
234 in _runtest_inner2
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 
270 in _runtest_inner
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 
140 in _runtest
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 
193 in runtest
  File 
"D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest_mp.py", 
line 67 in run_tests_worker
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", 
line 654 in _main
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", 
line 634 in main
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", 
line 712 in main
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\regrtest.py", line 43 
in _main
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\regrtest.py", line 47 
in 
  File "D:\buildarea\3.x.bolen-windows10\build\lib\runpy.py", line 85 in 
_run_code
  File "D:\buildarea\3.x.bolen-windows10\build\lib\runpy.py", line 192 in 
_run_module_as_main

(...)

1 re-run test:
test_regrtest

Total duration: 27 min 35 sec
Tests result: FAILURE then SUCCESS


Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", 
line 1049, in temp_dir
yield path
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", 
line 1101, in temp_cwd
yield cwd_dir
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", 
line 634, in main
self._main(tests, kwargs)
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", 
line 707, in _main
sys.exit(0)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 

[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16165
pull_request: https://github.com/python/cpython/pull/16573

___
Python tracker 

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



[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-03 Thread Eric V. Smith


Eric V. Smith  added the comment:

I don't see that as an improvement, especially when the goal is to not change 
any functionality.

But maybe I'm just used to truth tables. To me, the truth table makes it clear 
that each case is handled correctly.

--
assignee:  -> eric.smith
nosy: +eric.smith

___
Python tracker 

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



[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16164
pull_request: https://github.com/python/cpython/pull/16572

___
Python tracker 

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



[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-03 Thread Io Mintz


New submission from Io Mintz :

The dataclasses._hash_action table is currently a bit hard to read. It could be 
generated once from the if-else tree written in 
https://bugs.python.org/issue32929#msg312829 instead, which would both be 
easier to read and easier to maintain, while still maintaining the efficiency 
of the current dictionary.

--
components: Library (Lib)
messages: 353887
nosy: iomintz
priority: normal
pull_requests: 16163
severity: normal
status: open
title: dataclasses: generate the _hash_action table from the if-else tree
type: enhancement
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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-10-03 Thread Zachary Ware


Change by Zachary Ware :


--
nosy:  -Amin Radjabov, chipstuff, emniclap, mwr256, paul.moore, steve.dower, 
taleinat, terry.reedy, 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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-10-03 Thread Zachary Ware


Zachary Ware  added the comment:

This issue seems to have become a spam magnet, so I'm clearing the nosy list to 
keep it out of our inboxes.

--

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-10-03 Thread Zachary Ware


Change by Zachary Ware :


--
nosy:  -Printer Setup, jacksmait, prince_parker

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-10-03 Thread Zachary Ware


Change by Zachary Ware :


--
Removed message: https://bugs.python.org/msg345856

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-10-03 Thread Zachary Ware


Change by Zachary Ware :


--
hgrepos:  -383

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-10-03 Thread Zachary Ware


Change by Zachary Ware :


--
Removed message: https://bugs.python.org/msg353882

___
Python tracker 

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



[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c515b573af1189fc46ddcd3323c53ed073b84848 by Victor Stinner in 
branch 'master':
bpo-38353: Fix compiler warning in pycore_initconfig.h (GH-16570)
https://github.com/python/cpython/commit/c515b573af1189fc46ddcd3323c53ed073b84848


--

___
Python tracker 

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



[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:

> Or even fatal error out?  There's no reason to have Py_TPFLAGS_HAVE_GC but 
> not implement tp_traverse, AFAIR.

Well... It would prefer a smooth transition.

Such sanity checks which mostly concerns developers perfectly fit the -X dev 
mode.

I mean, calling Py_FatalError() only in development mode would be acceptable, 
rather than blocking the usage of C extensions which are working "perfectly 
well" on Python 3.7.

--

___
Python tracker 

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



[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-03 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

> Would it make any sense to add an opt-in option to emit a warning when a new 
> type is created with Py_TPFLAGS_HAVE_GC but it doesn't implement tp_traverse?

Or even fatal error out?  There's no reason to have Py_TPFLAGS_HAVE_GC but not 
implement tp_traverse, AFAIR.

--

___
Python tracker 

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



[issue38235] Docs of logging module says argument is named "lvl". TypeError.

2019-10-03 Thread AWhetter


Change by AWhetter :


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

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-10-03 Thread jacksmait


jacksmait  added the comment:

if you are facing problem with printer problems then click on 
http://www.printertechsupportphonenumbers.com/printer-driver-support/ and get 
solution of windows 10 printer driver is unavailable, printer driver is 
unavailable and etc or free contact us at +1-866-760-2639

--
nosy: +jacksmait

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-03 Thread miss-islington


miss-islington  added the comment:


New changeset 4de3fbe27f672dcd9c24d3e99258f39b12c365a5 by Miss Islington (bot) 
in branch '3.7':
bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463)
https://github.com/python/cpython/commit/4de3fbe27f672dcd9c24d3e99258f39b12c365a5


--

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-03 Thread miss-islington


miss-islington  added the comment:


New changeset 8edde5caabc611c6320fd104244abe3a409cf0b6 by Miss Islington (bot) 
in branch '3.8':
bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463)
https://github.com/python/cpython/commit/8edde5caabc611c6320fd104244abe3a409cf0b6


--
nosy: +miss-islington

___
Python tracker 

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



[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16161
pull_request: https://github.com/python/cpython/pull/16570

___
Python tracker 

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



[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 86ec5c65fe04ece16f3aada5292cc62726062ad0 by Victor Stinner in 
branch 'master':
bpo-38353: Fix calculate_argv0_path() for symlinks (GH-16549)
https://github.com/python/cpython/commit/86ec5c65fe04ece16f3aada5292cc62726062ad0


--

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16160
pull_request: https://github.com/python/cpython/pull/16569

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16159
pull_request: https://github.com/python/cpython/pull/16568

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-10-03 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset b23a8423a923077e4f83d3f328bb7542b4c940ed by Yury Selivanov 
(idomic) in branch 'master':
bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463)
https://github.com/python/cpython/commit/b23a8423a923077e4f83d3f328bb7542b4c940ed


--

___
Python tracker 

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



[issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:

> Since this sounds like a regression being introduced by 3.8.0, should the 
> reversion be included in 3.8.0 final or can it wait for 3.8.1?

IMHO PR 16558 is safe: it adds code which already existed in Python 2.7, and 
likely previously. For me it's a low risk of regression between rc1 and final.

I set the priority to release blocker, but Lukasz is the last one to take the 
final decision on including the fix or not.

Well, right now, I don't consider that PR 16558 is ready to be merged.

--
priority: normal -> release blocker

___
Python tracker 

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



[issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API

2019-10-03 Thread Eddie Elizondo


Eddie Elizondo  added the comment:

Woops, just realized that you already documented this, thanks! Btw, Victor 
already merged a fix for the windows compiler warning. This issue can be closed 
now

--

___
Python tracker 

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



[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:

> 1. Docs should be changed to encourage implementing the full gc protocol for 
> "all" containers.  Spell out what can go wrong if they don't.  Be upfront 
> about that history has, at times, proved us too optimistic about that ever 
> since weakrefs were added.

Would it make any sense to add an opt-in option to emit a warning when a new 
type is created with Py_TPFLAGS_HAVE_GC but it doesn't implement tp_traverse? 
Maybe also emit a warning if it doesn't implement tp_clear?

Maybe it could be a ResourceWarning emitted in development mode, when -X dev is 
used on the command line.

--

___
Python tracker 

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



[issue38346] Wrong behavior when using `assert_called_with` with mutable object

2019-10-03 Thread Mario Corchero


Mario Corchero  added the comment:

This might be painful in certain scenarios, like when using wraps on functions 
that modify the arguments:

```
def func(d):
  return d.pop("key")
>>> def func(d):
...   return d.pop("key")
...
>>> m = Mock(wraps=func)
>>> m({"key": 1})
1
>>> m.assert_called_with({"key": 1})
#raises
```

But I think "not fixing" this through copy is reasonable, especially when doing 
copy can also break assertions on objects that cannot be copied, which can 
happen if they implement their own __copy__ and some other situations. 
Additionally, copy does not fully capture "the value of the object when it was 
passed" for custom types.

A copying mock was published under pypi in 
https://github.com/wimglenn/copyingmock but doesn't seem to get a lot of 
attention, if this was interesting by users it could be added as a new type of 
Mock, or maybe just a mixin that users could add to any existing mock if they 
wished.

--

___
Python tracker 

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



[issue34938] Fix mimetype.init() to account for from import

2019-10-03 Thread AWhetter


Change by AWhetter :


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

___
Python tracker 

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



[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-10-03 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

I remember julien wanting to check this out during a discussion we had at the 
sprints hence the loop in.

--
nosy: +mdk

___
Python tracker 

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



[issue38337] inspect: getmembers calls properties

2019-10-03 Thread Jonas Drotleff


Jonas Drotleff  added the comment:

> The results of this example are different from mine(version 3.7.4)

I do not really see any difference. What do you mean?

--
nosy:  -Sanjay

___
Python tracker 

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



[issue38337] inspect: getmembers calls properties

2019-10-03 Thread hongweipeng


hongweipeng  added the comment:

The results of this example are different from mine(version 3.7.4).
```
__init__
--- getmembers from instance ---
Access property
[('__class__', ), ... ('var', 'Hello')]
--- getmembers from class---
[('__class__', ),'var', )]
```

--
nosy: +hongweipeng

___
Python tracker 

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



[issue26093] __qualname__ different when calling generator object w/ functions.partial

2019-10-03 Thread Dong-hee Na


Dong-hee Na  added the comment:

Python 3.9.0a0 (heads/bpo-31722:fc4a044a3c, Oct  4 2019, 03:10:14)
[Clang 11.0.0 (clang-1100.0.33.8)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import functools
>>> def f():
... def g():
... yield 1
... return g
...
>>> functools.partial(f())().__qualname__ == f()().__qualname__
True
>>> functools.partial(f())().__qualname__
'f..g'
>>> f()().__qualname__
'f..g'

Looks like that this issue is fixed

--
nosy: +corona10
resolution:  -> fixed
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



[issue7980] time.strptime not thread safe

2019-10-03 Thread Paul Ganssle


Paul Ganssle  added the comment:

>From what I can tell, this is a Python 2.7-only bug, and it's not a security 
>issue, so I think we can close the issue as either "wontfix" (because we won't 
>fix it in Python 2) or "fixed" (because it is already fixed in Python 3), 
>depending on your perspective.

--
nosy: +p-ganssle

___
Python tracker 

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



[issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal

2019-10-03 Thread Ned Deily


Ned Deily  added the comment:

Since this sounds like a regression being introduced by 3.8.0, should the 
reversion be included in 3.8.0 final or can it wait for 3.8.1?

--
keywords: +3.8regression
nosy: +lukasz.langa, ned.deily

___
Python tracker 

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



[issue32758] Stack overflow when parse long expression to AST

2019-10-03 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +16157
pull_request: https://github.com/python/cpython/pull/16566

___
Python tracker 

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



[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-03 Thread Tim Peters


Tim Peters  added the comment:

Loose ends.  Telegraphic because typing is hard.

1. Docs should be changed to encourage implementing the full gc protocol for 
"all" containers.  Spell out what can go wrong if they don't.  Be upfront about 
that history has, at times, proved us too optimistic about that ever since 
weakrefs were added.

2. Surprise finalizers (SF).  All weakrefs to trash objects were already 
cleared.  So if a SF can access trash, it must be via a chain of strong refs.  
But in that case, they wouldn't be trash to begin with (since they're reachable 
from the SF, which is a S because we believed it wasn't trash).

So best optimistic guess is that only this can go wrong:  we promise that a 
finalizer will run at most once (even if the object is resurrected), but a SF 
neither records that it has been run nor recognizes that (if so) it's already 
been run.  IOW, a finalizer will be run at most once when it's not a surprise, 
but will run every time it is a SF.

3. get_objects() exposing invalid objects.  That's no good.  Not due to missing 
tp_traverse, but that the aggregate of trash objects revealed by tp_traverses 
exceed the aggregate of those reclaimed by tp_clears and subsequent refcounting.

Must not move invalids to older generation.  Move to new internal (to 
delete_garbage) list instead.  That list should be empty at delete_garbage's 
end.  If not, I'd be happy to die with a fatal runtime error.  Else, e.g.,

- add to count of trash objects that could not be collected

- append them to gc.garbage, each as the sole attribute of a new (say) 
`_GCInvalid` container, whose repr/str only shows the address of the invalid 
object.  So the top-level objects in gc.garbage remain valid, but the daring 
can access the invalid objects indirectly.  At least their type pointers should 
be intact.

--

___
Python tracker 

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



[issue32758] Stack overflow when parse long expression to AST

2019-10-03 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +16156
pull_request: https://github.com/python/cpython/pull/16565

___
Python tracker 

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



[issue37631] EXTRA_CFLAGS get overrided by CFLAGS_NODIST

2019-10-03 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue38357] print adding extra bytes in hex above x7F

2019-10-03 Thread Brett Cannon


Brett Cannon  added the comment:

@Artificial please see the various blog posts and explanations about why the 
clear separation between bytes and text came to be and thus this change isn't 
"unnecessarily complicated".

--
nosy: +brett.cannon

___
Python tracker 

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



[issue14364] Argparse incorrectly handles '--' as argument to option

2019-10-03 Thread Jonas Schäfer

Jonas Schäfer  added the comment:

Since I have been adversely affected by this bug ([1]), I looked at the patches.

I combined issue14364.test.patch (which adds test cases for --foo=--) and 
dbldash.patch in my local working tree and that seems to resolve the issue 
(tests pass if and only if I apply dbldash.patch and my reproducer from [1]) 
passes too).

The patches do not contain any type of metainformation, so I’m not comfortable 
with submitting this as a PR. I am also not at all familiar with the process of 
managing the changelog etc.

This should serve as a confirmation that this issue can be resolved with the 
patches. Someone more familiar than me with the process could take up the task 
to get this merged.

Note: As you can see in [1], this issue has already caused data loss.

   [1]: https://github.com/borgbackup/borg/issues/4769

--
nosy: +jssfr

___
Python tracker 

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



[issue38359] pyw.exe opens console window in Windows 10

2019-10-03 Thread Steve Dower

Steve Dower  added the comment:

This is resolved as far as I'm concerned - leaving open for Łukasz to 
cherrypick and close.

--
stage: patch review -> backport needed

___
Python tracker 

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



[issue38355] ntpath.realpath() fails on sys.executable

2019-10-03 Thread Steve Dower

Steve Dower  added the comment:

This is resolved as far as I'm concerned - leaving open for Łukasz to 
cherrypick and close.

--
stage: patch review -> backport needed

___
Python tracker 

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



[issue38359] pyw.exe opens console window in Windows 10

2019-10-03 Thread miss-islington


miss-islington  added the comment:


New changeset e74fa70bcc379de1ce956273c5386fc8a7b9c5e6 by Miss Islington (bot) 
in branch '3.8':
bpo-38359: Ensures pyw.exe launcher reads correct registry key (GH-16561)
https://github.com/python/cpython/commit/e74fa70bcc379de1ce956273c5386fc8a7b9c5e6


--
nosy: +miss-islington

___
Python tracker 

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



[issue38355] ntpath.realpath() fails on sys.executable

2019-10-03 Thread miss-islington


miss-islington  added the comment:


New changeset 6067e1d2bebccc2e73dd729d25c98df7bc9e2d59 by Miss Islington (bot) 
in branch '3.8':
bpo-38355: Fix ntpath.realpath failing on sys.executable (GH-16551)
https://github.com/python/cpython/commit/6067e1d2bebccc2e73dd729d25c98df7bc9e2d59


--
nosy: +miss-islington

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread miss-islington


miss-islington  added the comment:


New changeset f9016e5fc9424d41c8e53de84f8699e78769a14a by Miss Islington (bot) 
in branch '3.7':
[3.8] bpo-36670, regrtest: Fix WindowsLoadTracker() for partial line (GH-16550) 
(GH-16560)
https://github.com/python/cpython/commit/f9016e5fc9424d41c8e53de84f8699e78769a14a


--

___
Python tracker 

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



[issue38363] No Module named ..." and UTF-8 Byte Order Marks

2019-10-03 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

False alarm, see Stephen Tucker's message here

https://bugs.python.org/issue38365#msg353854

File name has a trailing space which is why it wasn't found.

--
nosy: +steven.daprano
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



[issue38365] Issue 38363 - False Alarm - Sorry!

2019-10-03 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Please don't create a *second* bug report to say that your previous bug report 
was erroneous. Just go and close the first one.

--
nosy: +steven.daprano
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



[issue38355] ntpath.realpath() fails on sys.executable

2019-10-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16154
pull_request: https://github.com/python/cpython/pull/16563

___
Python tracker 

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



[issue38355] ntpath.realpath() fails on sys.executable

2019-10-03 Thread Steve Dower


Steve Dower  added the comment:


New changeset a0e3d27e4e3cb5b67e325df080fb18b70c2910cf by Steve Dower in branch 
'master':
bpo-38355: Fix ntpath.realpath failing on sys.executable (GH-16551)
https://github.com/python/cpython/commit/a0e3d27e4e3cb5b67e325df080fb18b70c2910cf


--

___
Python tracker 

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



[issue38359] pyw.exe opens console window in Windows 10

2019-10-03 Thread Steve Dower


Steve Dower  added the comment:


New changeset 353fb1ecbfd58752dabae115c4964095e1e35e5f by Steve Dower in branch 
'master':
bpo-38359: Ensures pyw.exe launcher reads correct registry key (GH-16561)
https://github.com/python/cpython/commit/353fb1ecbfd58752dabae115c4964095e1e35e5f


--

___
Python tracker 

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



[issue38359] pyw.exe opens console window in Windows 10

2019-10-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16155
pull_request: https://github.com/python/cpython/pull/16564

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the bug report. I was impacted by the bug with my French locale as 
well.

I pushed a fix based on Lorenz Mende's work, with minor changes. I also 
enhanced WindowsLoadTracker to handle partial write and report parsing errors 
as warnings rather than exception.

I pushed other changes to enhance regrtest in general.

The load average is not updated every second and it's value is initialized from 
the arithmetic mean of the first 5 values of the Processor Queue Length.

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



[issue38365] Issue 38363 - False Alarm - Sorry!

2019-10-03 Thread Stephen Tucker


New submission from Stephen Tucker :

Hi,

Issue 38363 is a false alarm - I am sorry to have wasted your time.

My mistake was that the file that had the BOM in it also had a space at the
end of the filename. I removed the space and the module was found OK.

Sorry again.

Stephen Tucker.

--
messages: 353854
nosy: Stephen_Tucker
priority: normal
severity: normal
status: open
title: Issue 38363 - False Alarm - Sorry!

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16153
pull_request: https://github.com/python/cpython/pull/16562

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset de3195c937d5fca0d79cc93dbafa76c0f89ca5b8 by Victor Stinner in 
branch '3.8':
[3.8] bpo-36670, regrtest: Fix WindowsLoadTracker() for partial line (GH-16550) 
(GH-16560)
https://github.com/python/cpython/commit/de3195c937d5fca0d79cc93dbafa76c0f89ca5b8


--

___
Python tracker 

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



[issue38359] pyw.exe opens console window in Windows 10

2019-10-03 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue38359] pyw.exe opens console window in Windows 10

2019-10-03 Thread Steve Dower


Change by Steve Dower :


--
nosy: +lukasz.langa
priority: normal -> release blocker

___
Python tracker 

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



[issue38359] pyw.exe opens console window in Windows 10

2019-10-03 Thread Steve Dower


Steve Dower  added the comment:

I know what this is - in issue38133 I added support for the PEP 514 
ExecutablePath key, but didn't add a check for WindowedExecutablePath for the 
pyw.exe case.

I'll add it.

--
assignee:  -> steve.dower
keywords: +3.8regression
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



[issue38333] add type signatures to library function docs

2019-10-03 Thread Guido van Rossum


Guido van Rossum  added the comment:

Since this discussion went down in flames quickly, I'm closing it. Another 
issue can be opened once someone has a concrete design of what this should look 
like in the formatted docs, an example that does this for a few libraries, and 
a prototype of a tool that extracts signatures from typeshed.

--

___
Python tracker 

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



[issue38333] add type signatures to library function docs

2019-10-03 Thread Guido van Rossum


Change by Guido van Rossum :


--
resolution:  -> postponed
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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16151
pull_request: https://github.com/python/cpython/pull/16560

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16150
pull_request: https://github.com/python/cpython/pull/16559

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 098e25672f1c3578855d5ded4f5147795c9ed956 by Victor Stinner in 
branch 'master':
bpo-36670: Enhance regrtest (GH-16556)
https://github.com/python/cpython/commit/098e25672f1c3578855d5ded4f5147795c9ed956


--

___
Python tracker 

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



[issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects

2019-10-03 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +asvetlov, yselivanov

___
Python tracker 

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



[issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects

2019-10-03 Thread Martijn Pieters


New submission from Martijn Pieters :

This is a follow-up to #33261, which added general support for detecting 
generator / coroutine / async generator functions wrapped in partials. It 
appears that partialmethod objects were missed out.

While a partialmethod object will produce a functools.partial() object on 
binding to an instance, the .func attribute of that partial is a bound method, 
not a function, and the current _has_code_flag implementation unwraps methods 
*before* it unwraps partials.

Next, binding to a class produces a 
partialmethod._make_unbound_method.._method wrapper function. 
_unwrap_partial can't unwrap this, as it doesn't handle this case; it could 
look for the `_partialmethod` attribute and follow that to find the `.func` 
attribute.

Test case:

import inspect
import functools

class Foo:
async def bar(self, a): return a
ham = partialmethod(bar, "spam")

print(inspect.iscoroutinefunction(Foo.bar)  # True
print(inspect.iscoroutinefunction(Foo.ham)  # False
instance = Foo()
print(inspect.iscoroutinefunction(instance.bar)  # True
print(inspect.iscoroutinefunction(instance.ham)  # False

--
components: Library (Lib)
messages: 353849
nosy: mjpieters
priority: normal
severity: normal
status: open
title: inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction 
can't handle  partialmethod objects
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-03 Thread Ma Lin


Ma Lin  added the comment:

> Thus this breaks editing the physical line past the astral character. We 
> cannot do anything with this.

I tried, it's sad the experience is not very good.

--
nosy: +Ma Lin

___
Python tracker 

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



[issue38333] add type signatures to library function docs

2019-10-03 Thread Vedran Čačić

Vedran Čačić  added the comment:

https://www.python.org/dev/peps/pep-0484/#non-goals

I really have nothing more to say.

--

___
Python tracker 

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



[issue34455] Tkinter crashing when pressing Command + ^ (OSX)

2019-10-03 Thread Kevin Walzer


Kevin Walzer  added the comment:

We have committed some fixes to the keyboard code in the past year that seem to 
have fixed this issue. I do not see it in 8.6.10, now as a RC. I believe this 
bug is obsolete at this point.

--

___
Python tracker 

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



[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-03 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +16149
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/16558

___
Python tracker 

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



[issue38362] platform.system() comparison problem

2019-10-03 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

This is nothing to do with platform.system. You can see the same behaviour with 
any string comparison, or ints.

The `is` operator is not a cute way of spelling `==`, it tests for object 
identity, not equality. It tests whether the two arguments are the same object. 
The Python interpreter caches some strings, and some ints, to save memory, so 
the result of ``expression is "somestring"`` will depend on the operating 
system, the version of Python, what happens to be in the cache, and whatever 
memory optimization tricks are being used by the interpreter.

Never use ``is`` for testing whether two things are equal. Only use it for 
testing object identity, like ``obj is None``.

By the way, this question about ``is`` has been asked many, many times on 
places like Stackoverflow. If you have any further questions about this, you 
should check the answers there.

--
nosy: +steven.daprano
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



[issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal

2019-10-03 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


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

___
Python tracker 

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



[issue1375011] http.cookies, Cookie.py: Improper handling of duplicate cookies

2019-10-03 Thread karl


karl  added the comment:

Relevant spec
https://tools.ietf.org/html/rfc6265

--
nosy: +karlcow

___
Python tracker 

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



[issue38362] platform.system() comparison problem

2019-10-03 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Using "is" could be dependent on how the string is interned to refer to the 
same string during comparison for identity. Using == is more reliable and 
correct.

--
nosy: +xtreak

___
Python tracker 

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



[issue38348] Make python -m ast more configurable

2019-10-03 Thread Batuhan


Batuhan  added the comment:

I was checking typed_ast and i wanted to know which parts changed and
implement that parts to astor. But there was no flags for --type-comments
False.

Also it can be handy to have an indention option to change it for fitting
tree into the terminal width.

On Thu, Oct 3, 2019, 11:45 AM Serhiy Storchaka 
wrote:

>
> Serhiy Storchaka  added the comment:
>
> Why do you need this feature?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue38363] No Module named ..." and UTF-8 Byte Order Marks

2019-10-03 Thread Stephen Tucker


New submission from Stephen Tucker :

Hi,

I am running Python 2.7.10 on Windows 10.

I have discovered that if a .py source text file (that is, a Module text
file) starts with a UTF-8 Byte Order Mark, the module does not get "found"
by the  import  statement.

I have just spent an inordinate amount of time reaching this conclusion.

I realise that 2.7.10 is probably not being supported any more, however,
please let me ask the questions anyway:

Could ...
   Either:   ... the error message please be more helpful? (Like, for
example,  "Module begins with a Byte Order Mark")
   Or:... the BOM be allowed at the start of a Module?

Thanks.

Stephen Tucker.

--
messages: 353841
nosy: Stephen_Tucker
priority: normal
severity: normal
status: open
title: No Module named ..." and UTF-8 Byte Order Marks

___
Python tracker 

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



[issue38362] platform.system() comparison problem

2019-10-03 Thread Светломир Балевски

New submission from Светломир Балевски :

Hi, I am using platform.system(). On linux I am using python3.6. 
>>> platform.system()
'Linux'
>>> platform.system() is 'Linux'
False 
>>> platform.system() == 'Linux'
True 

On Windows with python 3.7:
[‎10/‎3/‎2019 2:42 PM]  
>>> platform.system()
'Windows'
>>> platform.system() is 'Windows'
True
>>> platform.system() == 'Windows'
True 

Is this a known problem?

--
components: Library (Lib)
messages: 353840
nosy: Светломир Балевски
priority: normal
severity: normal
status: open
title: platform.system() comparison problem
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue38361] syslog: Default "ident" in syslog.openlog() shouldn't contain slash

2019-10-03 Thread Vaclav Bartos


New submission from Vaclav Bartos :

When `syslog.openlog()` is called without parameters (or `syslog.syslog()` is 
called directly), the `ident` parameter should be set to "sys.argv[0] with 
leading path components stripped" (citation from docs).

I suppose this means that when sys.argv[0] is "/some/path/to/script", the ident 
should be set to "script" (this is the behavior in Python 2.7)

However, in Python 3.x, it gets set to "/script", i.e. the last slash is 
included in the string. I suppose this is not intended, it is just a "one-off" 
error in parsing the string.

The fix is trivial, see the linked GitHub PR.


To reproduce the bug:

$ python3
>>> import sys
>>> import syslog
>>> sys.argv[0] = "/some/path/to/script"
>>> syslog.syslog("TEST MESSAGE")
>>> 
$ tail -n 1 /var/log/messages
Oct  3 11:11:46 localhost /script: TEST MESSAGE

--
components: Extension Modules
messages: 353839
nosy: vaclavbartos
priority: normal
pull_requests: 16147
severity: normal
status: open
title: syslog: Default "ident" in syslog.openlog() shouldn't contain slash
type: behavior
versions: 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



[issue38360] single-argument form of -isysroot should be supported

2019-10-03 Thread Joshua Root


New submission from Joshua Root :

The path associated with the -isysroot compiler flag can be supplied either as 
a separate argument or in the same argument as -isysroot itself. The places in 
library code that do special handling of this flag should support both forms, 
but currently only support the two separate arguments form. This means that the 
flag may not be removed when pointing to a nonexistent SDK or when a different 
SDK is specified in the user's CFLAGS, and at worst a ValueError is raised in 
compiler_fixup.

--
components: Distutils, macOS
messages: 353838
nosy: dstufft, eric.araujo, jmr, ned.deily, ronaldoussoren
priority: normal
pull_requests: 16146
severity: normal
status: open
title: single-argument form of -isysroot should be supported
type: behavior
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



[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2019-10-03 Thread karl


karl  added the comment:

@gaurav The pull request 
https://github.com/python/cpython/pull/10870
has been closed in favor of 
https://github.com/python/cpython/pull/15773
which has already been merged.

So we can probably close here.

--
message_count: 7.0 -> 8.0
nosy: +karlcow
nosy_count: 7.0 -> 8.0
pull_requests: +16145
pull_request: https://github.com/python/cpython/pull/15773

___
Python tracker 

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



[issue38359] pyw.exe opens console window in Windows 10

2019-10-03 Thread Andrew Ushakov


New submission from Andrew Ushakov :

pyw.exe (Python Launcher for Windows Version 3.8.121.1013) opens a console 
window at startup. To reproduce, run command below from the console:

D:>pyw -c "import time; time.sleep(10)"

By the way command:

D:>pythomw -c "import time; time.sleep(10)"

works as expected, silently.

--
components: Windows
messages: 353836
nosy: Andrew Ushakov, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: pyw.exe opens console window in Windows 10
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16144
pull_request: https://github.com/python/cpython/pull/16556

___
Python tracker 

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



[issue19683] test_minidom has many empty tests

2019-10-03 Thread karl

karl  added the comment:

err… Errata on my previous comment.

"""
Simple implementation of the Level 1 DOM.

Namespaces and other minor Level 2 features are also supported.
"""
https://github.com/python/cpython/blob/c65119d5bfded03f80a9805889391b66fa7bf551/Lib/xml/dom/minidom.py#L1-L3


https://www.w3.org/TR/REC-DOM-Level-1/

--

___
Python tracker 

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



[issue38358] ASSERTION ERROR WHILE USING TENSORFLOW

2019-10-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is a tracker for bugs in Python itself. Tensorflow is a third-party 
library. Please use an appropriate bug tracker for reporting issues with 
tensorflow.

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



[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

>From the point of view of Tk, the astral character "" looks like either two 
>invisible characters "\ud83d\udcbb" or as four characters "ð\x9f\x92»" (two of 
>them are invisible). Thus this breaks editing the physical line past the 
>astral character. We cannot do anything with this.

It also breaks syntax highlighting up to 100 lines past the astral character. 
We can add a workaround for this, but I am not sure it is worth. The solution 
could be complex and slow down the common case. In any case it is a different 
issue.

File names with astral characters now are shown correctly in most cases. Astral 
characters are not shown in the title of the window, perhaps it is font 
depending.

Opening a file name with astral characters works in the command line, but it 
does not work via the file open dialog. This looks like a bug in Tk, we cannot 
workaround it (or at least the possible workaround would be ugly and partial).

--

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16143
pull_request: https://github.com/python/cpython/pull/16555

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16142
pull_request: https://github.com/python/cpython/pull/16554

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c65119d5bfded03f80a9805889391b66fa7bf551 by Victor Stinner in 
branch 'master':
bpo-36670: Enhance regrtest WindowsLoadTracker (GH-16553)
https://github.com/python/cpython/commit/c65119d5bfded03f80a9805889391b66fa7bf551


--

___
Python tracker 

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



[issue38348] Make python -m ast more configurable

2019-10-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Why do you need this feature?

--

___
Python tracker 

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



  1   2   >