[issue40812] _tkinter build failed when install Python-3.6.10
New submission from zhang : building '_tkinter' extension gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -DWITH_APPINIT=1 -I./Include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python/Python-3.6.10/include -I. -I/usr/local/include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10 -c /YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/_tkinter.c -o build/temp.linux-x86_64-3.6/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/_tkinter.o -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/tcltk/8.6.8/include/ gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -DWITH_APPINIT=1 -I./Include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python/Python-3.6.10/include -I. -I/usr/local/include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Include -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10 -c /YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/tkappinit.c -o build/temp.linux-x86_64-3.6/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/tkappinit.o -I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/tcltk/8.6.8/include/ gcc -pthread -shared build/temp.linux-x86_64-3.6/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/_tkinter.o build/temp.linux-x86_64-3.6/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python-3.6.10/Modules/tkappinit.o -L/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/Python/Python-3.6.10/lib -L/usr/local/lib -o build/lib.linux-x86_64-3.6/_tkinter.cpython-36m-x86_64-linux-gnu.so -L/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T06/zhangxq/software/tcltk/8.6.8/lib/ warning: building with the bundled copy of libffi is deprecated on this platform. It will not be distributed with Python 3.7 *** WARNING: renaming "_tkinter" since importing it failed: build/lib.linux-x86_64-3.6/_tkinter.cpython-36m-x86_64-linux-gnu.so: undefined symbol: Tcl_GetCharLength -- components: Build messages: 370281 nosy: zhang priority: normal severity: normal status: open title: _tkinter build failed when install Python-3.6.10 type: compile error versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue40812> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40812] _tkinter build failed when install Python-3.6.10
zhang added the comment: configure command :./configure --prefix=/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T/zzz/software/Python/Python-3.6.10/ --with-tcltk-includes='-I/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T/zzz/software/tcltk/8.6.8/include/' --with-tcltk-libs='-L/YZGROUP4/STORAGE/personalbio/Work/Transcriptome/T/zzz/software/tcltk/8.6.8/lib/' -- ___ Python tracker <https://bugs.python.org/issue40812> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter
zhang added the comment: Josh,Did you solve this problem?I met the same error when install python. *** WARNING: renaming "_tkinter" since importing it failed: build/lib.linux-x86_64-3.6/_tkinter.cpython-36m-x86_64-linux-gnu.so: undefined symbol: Tcl_GetCharLength -- nosy: +zhang ___ Python tracker <https://bugs.python.org/issue31817> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46498] Add new triplets for loongarch64
Change by Zhang Na : -- components: Build files: loongarch64.diff keywords: patch nosy: zhangna01 priority: normal severity: normal status: open title: Add new triplets for loongarch64 type: compile error versions: Python 3.9 Added file: https://bugs.python.org/file50579/loongarch64.diff ___ Python tracker <https://bugs.python.org/issue46498> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46498] Add new triplets for loongarch64
Change by Zhang Na : -- pull_requests: +29118 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30939 ___ Python tracker <https://bugs.python.org/issue46498> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46498] Add new triplets for loongarch64
Zhang Na added the comment: loongarch64.diff has been modified according to the new toolchain spec. -- Added file: https://bugs.python.org/file50590/loongarch64-new.diff ___ Python tracker <https://bugs.python.org/issue46498> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1115] Minor Change For Better cross compile
New submission from Zhang Zengbo: Some test in configure.in is AC_TRY_RUN, which can be replaced by AC_TRY_COMPILE, achieve the same goal and give better support for cross compiling. This patch is for svn reversion 57996. -- files: autocheck.patch messages: 55678 nosy: zengbo severity: minor status: open title: Minor Change For Better cross compile versions: Python 2.6 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1115> __Index: configure.in === --- configure.in ï¼çæ¬ 57996ï¼ +++ configure.in ï¼å·¥ä½å¯æ¬ï¼ @@ -802,10 +802,10 @@ AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing) ac_save_cc="$CC" CC="$CC -fno-strict-aliasing" - AC_TRY_RUN([int main() { return 0; }], + AC_TRY_COMPILE([],[int main() { return 0; }], ac_cv_no_strict_aliasing_ok=yes, ac_cv_no_strict_aliasing_ok=no, - ac_cv_no_strict_aliasing_ok=no) + ) CC="$ac_save_cc" AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok) if test $ac_cv_no_strict_aliasing_ok = yes @@ -866,10 +866,10 @@ AC_CACHE_VAL(ac_cv_opt_olimit_ok, [ac_save_cc="$CC" CC="$CC -OPT:Olimit=0" -AC_TRY_RUN([int main() { return 0; }], +AC_TRY_COMPILE([],[int main() { return 0; }], ac_cv_opt_olimit_ok=yes, ac_cv_opt_olimit_ok=no, - ac_cv_opt_olimit_ok=no) + ) CC="$ac_save_cc"]) AC_MSG_RESULT($ac_cv_opt_olimit_ok) if test $ac_cv_opt_olimit_ok = yes; then @@ -888,10 +888,10 @@ AC_CACHE_VAL(ac_cv_olimit_ok, [ac_save_cc="$CC" CC="$CC -Olimit 1500" - AC_TRY_RUN([int main() { return 0; }], + AC_TRY_COMPILE([],[int main() { return 0; }], ac_cv_olimit_ok=yes, ac_cv_olimit_ok=no, -ac_cv_olimit_ok=no) +) CC="$ac_save_cc"]) AC_MSG_RESULT($ac_cv_olimit_ok) if test $ac_cv_olimit_ok = yes; then @@ -3444,6 +3444,7 @@ }], [AC_MSG_RESULT(yes) AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], + AC_MSG_RESULT(no), AC_MSG_RESULT(no)) AC_CHECK_TYPE(socklen_t,, ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11320] Can't call Py_SetPath() on pointer returned by Py_GetPath()
Debao Zhang added the comment: Hello everyone, I have found the reason for the problem. >From the manual http://docs.python.org/py3k/c-api/init.html#Py_SetPath , we can see that: After we call Py_SetPath,both sys.prefix and sys.exec_prefix will be empty. However, sys.prefix will be used in the sysconfig.py to generate the makefile' s name, and the empty sys.prefix will cause the wrong path: lib/python3.2/config-3.2m/Makefile sysconfig.py imported by site.py, and site.py used in the Py_InitializeEx. So ... -- nosy: +dbzhang800 ___ Python tracker <http://bugs.python.org/issue11320> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13542] Memory leak in multiprocessing.pool
New submission from Yang Zhang : Calling Pool.map (and friends) on empty lists [] causes Pool._cache to hang on to the MapResults forever: tp = ThreadPool(5) xs = tp.map(lambda x: 'a' * int(10e6), range(100)) # now using 1GB mem = 100 * 10MB strs del xs gc.collect() # still using 1GB mem tp.close(); tp.join() # now using ~0GB mem -- components: Library (Lib) messages: 148937 nosy: yang priority: normal severity: normal status: open title: Memory leak in multiprocessing.pool type: resource usage versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue13542> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13542] Memory leak in multiprocessing.pool
Yang Zhang added the comment: Oops, sorry - pasted a wrong example. In [38]: tp = ThreadPool(5) In [39]: xs = tp.map(lambda x: x, []) In [40]: xs Out[40]: [] In [41]: tp._cache Out[41]: {3: } -- ___ Python tracker <http://bugs.python.org/issue13542> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding
New submission from Dongying Zhang : I've been trying to parse xml string using python, codes following: #-*- coding: utf-8 -*- import xml.etree.ElementTree as xmlet s = '' xmlet.fromstring(s) Then: $ python2.6 test.py or: $ pypy test.py Traceback message came out like this: Traceback (most recent call last): File "test.py", line 4, in xmlet.fromstring(s) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/etree/ElementTree.py", line 963, in XML parser.feed(text) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/etree/ElementTree.py", line 1245, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: unknown encoding: line 1, column 30 I've seen this in following cases: Python2.5.6 on Mac OS X Lion Python2.6.5 on Ubuntu 10.04 pypy1.7.0 on Mac OS X Lion But not in these cases: Python2.6.7 on Mac OS X Lion Python2.7.1 on Mac OS X Lion -- components: Library (Lib) files: test.py messages: 149602 nosy: dongying priority: normal severity: normal status: open title: xml.etree.ElementTree says unknown encoding of a regular encoding versions: Python 2.6 Added file: http://bugs.python.org/file23974/test.py ___ Python tracker <http://bugs.python.org/issue13612> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding
Changes by Dongying Zhang : -- versions: +3rd party ___ Python tracker <http://bugs.python.org/issue13612> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding
Changes by Dongying Zhang : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue13612> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11226] subprocesses experience mysterious delay in receiving stdin EOF
New submission from Yang Zhang : I'm seeing this issue on all the multiple Ubuntu 10.04 boxes I've tried. I reduced a problem I was seeing in my application down into the following test case. In this code, a parent process concurrently spawns 2 (you can spawn more) subprocesses that read a big message from the parent over stdin, sleep for 5 seconds, and write something back. However, there's unexpected waiting happening somewhere, causing the code to complete in 10 seconds instead of the expected 5. If you set verbose=True, you can see that the straggling subprocess is receiving most of the messages, then waiting for the last chunk of 3 chars---it's not detecting that the pipe has been closed. Furthermore, if I simply don't do anything with the second process (doreturn=True), the first process will never see the EOF. Further down is some example output. When trying this out, you may need to increase the message size to see the behavior occur. from subprocess import * from threading import * from time import * from traceback import * import sys verbose = False doreturn = False msg = (20*4096+3)*'a' def elapsed(): return '%7.3f' % (time() - start) if sys.argv[1:]: start = float(sys.argv[2]) if verbose: for chunk in iter(lambda: sys.stdin.read(4096), ''): print >> sys.stderr, '..', time(), sys.argv[1], 'read', len(chunk) else: sys.stdin.read() print >> sys.stderr, elapsed(), '..', sys.argv[1], 'done reading' sleep(5) print msg else: start = time() def go(i): print elapsed(), i, 'starting' p = Popen(['python','stuckproc.py',str(i), str(start)], stdin=PIPE, stdout=PIPE) if doreturn and i == 1: return print elapsed(), i, 'writing' p.stdin.write(msg) print elapsed(), i, 'closing' p.stdin.close() print elapsed(), i, 'reading' p.stdout.read() print elapsed(), i, 'done' ts = [Thread(target=go, args=(i,)) for i in xrange(2)] for t in ts: t.start() for t in ts: t.join() Example output: 0.001 0 starting 0.003 1 starting 0.005 0 writing 0.016 1 writing 0.093 0 closing 0.093 0 reading 0.094 1 closing 0.094 1 reading 0.098 .. 1 done reading 5.103 1 done 5.108 .. 0 done reading 10.113 0 done -- components: Library (Lib) messages: 128699 nosy: yaaang priority: normal severity: normal status: open title: subprocesses experience mysterious delay in receiving stdin EOF type: behavior versions: Python 2.6 ___ Python tracker <http://bugs.python.org/issue11226> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11226] subprocesses experience mysterious delay in receiving stdin EOF
Yang Zhang added the comment: After way too much time, I figured it out, after a quote from this post jumped out at me: See the "I/O on Pipes and FIFOs" section of pipe(7) ("man 7 pipe") "If all file descriptors referring to the write end of a pipe have been closed, then an attempt to read(2) from the pipe will see end-of- file (read(2) will return 0)." I should've known this, but it never occurred to me - had nothing to do with Python in particular. What was happening was: the subprocesses were getting forked with open (writer) file descriptors to each others' pipes. As long as there are open writer file descriptors to a pipe, readers won't see EOF. E.g.: p1=Popen(..., stdin=PIPE, ...) # creates a pipe the parent process can write to p2=Popen(...) # inherits the writer FD - as long as p2 exists, p1 won't see EOF Turns out there's a close_fds parameter to Popen, so the solution is to pass close_fds=True. All simple and obvious in hindsight, but still managed to cost at least a couple eyeballs good chunks of time. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue11226> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8054] "as_string" method in email's mime objects encode text segmentedly
New submission from Dongying Zhang : The as_string method in mime classes in module email.mime use base64 to encode the text, but segmentedly while the text contents non-acsii characters and is in type of unicode. This behavior confuse some of the email servers. For example: === #-*- coding: utf-8 -*- import base64 from email.mime.text import MIMEText content = u'''Hello: 这是一封测试邮件. Please remove this message after reading, and I hope this won't bother you for a long time ''' m = MIMEText(content, 'plain', 'utf-8') print m.as_string() m = MIMEText(content.encode('utf-8'), 'plain', 'utf-8') print m.as_string() print base64.encodestring(content.encode('utf-8')) === The first as_string method gives: --- SGVsbG86CiAgICDov5nmmK/kuIDlsIHmtYvor5Xpgq7ku7YuCiAgIFBsZWFzZSByZW1vdmUgdGhpcyBtZXNzYWdlIGFmdGVyIA== cmVhZGluZywKICAgYW5kIEkgaG9wZSB0aGlzIHdvbid0IGJvdGhlciB5b3UgZm9yIGEgbG9uZyB0 aW1lCg== --- Please notice that there is a '==' at the end of the first line. The output of both the second as_string and base64.encodestring method maybe more appropriate, which is: --- SGVsbG86CiAgICDov5nmmK/kuIDlsIHmtYvor5Xpgq7ku7YuCiAgIFBsZWFzZSByZW1vdmUgdGhp cyBtZXNzYWdlIGFmdGVyIHJlYWRpbmcsCiAgIGFuZCBJIGhvcGUgdGhpcyB3b24ndCBib3RoZXIg eW91IGZvciBhIGxvbmcgdGltZQo= -- components: IO files: test.py messages: 100380 nosy: zhangdongying severity: normal status: open title: "as_string" method in email's mime objects encode text segmentedly type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file16428/test.py ___ Python tracker <http://bugs.python.org/issue8054> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8054] "as_string" method in email's mime objects encode text segmentedly
Dongying Zhang added the comment: Hello R. David Murray: Thanks for your care. The examples I given both in message and file is just the same. You got the 'UnicodeEncodeError' because your system default encoding is ascii. The declaration of encoding at the top didn't help with this situation. To solve this, you can add following lines at the import part of the codes. = import sys reload(sys) sys.setdefaultencoding('utf-8') = Then it should work by executing it directly or in a terminal (but not in IDLE). You can try the new file I submit. Thanks! -- Added file: http://bugs.python.org/file16446/utf8_test.py ___ Python tracker <http://bugs.python.org/issue8054> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37855] Compiling Python 3.7.4 with Intel compilers 2019
New submission from Zhiyong Zhang : Compilation of Python 3.7.4 with Intel icc/2019 failed with the following errors: icpc -c -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -g -O0 -Wall -O3 -fp-model strict -fp-model source -xHost -ipo -prec-div -prec-sqrt -std=c++11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fp-model strict -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fp-model strict -IObjects -IInclude -IPython -I. -I../Include-DPy_BUILD_CORE -o Programs/python.o ../Programs/python.c In file included from ../Include/Python.h(75), from ../Programs/python.c(3): ../Include/pyatomic.h(32): error: identifier "memory_order_relaxed" is undefined _Py_memory_order_relaxed = memory_order_relaxed, ^ In file included from ../Include/Python.h(75), from ../Programs/python.c(3): ../Include/pyatomic.h(33): error: identifier "memory_order_acquire" is undefined _Py_memory_order_acquire = memory_order_acquire, ^ In file included from ../Include/Python.h(75), from ../Programs/python.c(3): ../Include/pyatomic.h(34): error: identifier "memory_order_release" is undefined _Py_memory_order_release = memory_order_release, ^ In file included from ../Include/Python.h(75), from ../Programs/python.c(3): ../Include/pyatomic.h(35): error: identifier "memory_order_acq_rel" is undefined _Py_memory_order_acq_rel = memory_order_acq_rel, ^ In file included from ../Include/Python.h(75), from ../Programs/python.c(3): ../Include/pyatomic.h(36): error: identifier "memory_order_seq_cst" is undefined _Py_memory_order_seq_cst = memory_order_seq_cst ^ In file included from ../Include/Python.h(75), from ../Programs/python.c(3): ../Include/pyatomic.h(40): error: identifier "atomic_uintptr_t" is undefined atomic_uintptr_t _value; ^ In file included from ../Include/Python.h(75), from ../Programs/python.c(3): ../Include/pyatomic.h(44): error: identifier "atomic_int" is undefined atomic_int _value; ^ -- components: Installation messages: 349734 nosy: zyzhang2006 priority: normal severity: normal status: open title: Compiling Python 3.7.4 with Intel compilers 2019 type: compile error versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue37855> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37882] Code folding in IDLE
New submission from George Zhang : Congrats on adding line numbers to IDLE. With this change, a change to add code folding could be done more easily as the folding can reference the line numbers. Many other IDEs have code folding but IDLE should also have it. Code folding could be done with a +/- to the right of the line numbers and can show/hide the indented suite under the header (compound statements). It should use indentation as tool to figure out which parts can be folded. Blank lines don't count. Single line compound statements cannot be folded. Something like this: 1 - | def spam(ham): 2 - | if ham: 3| eggs() 4| 5 + | def frob(): 8| 9 - | FOO = ( 10 | 1, 2, 3, 4, 11 | 5, 6, 7, 8, 12 | ) 13 | 14 | BAR = ( 17 | ) 18 | 19 | if True: print("True") 20 | -- assignee: terry.reedy components: IDLE messages: 349922 nosy: GeeVye, terry.reedy priority: normal severity: normal status: open title: Code folding in IDLE versions: Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue37882> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37882] Code folding in IDLE
Change by George Zhang : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue37882> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
New submission from George Zhang : I've just started using IDLE's module/path browsers and they offer a lot! Putting aside the issue of them opening in separate windows, they have a small change that could be made to improve them. Both browsers have scrollbars, but (for me at least) I cannot scroll using my mouse. I propose adding support for scrolling similar to the editor/shell windows. -- assignee: terry.reedy components: IDLE messages: 350043 nosy: GeeVye, terry.reedy priority: normal severity: normal status: open title: Add scrolling for IDLE browsers type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- keywords: +patch pull_requests: +15072 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15360 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
George Zhang added the comment: I looked at the code for scrolling and moved it over to the ScrolledCanvas and TreeNode (because it uses a Label that sits on the canvas, meaning we have to rebind it here). I haven't figured out how to add the scroll-by-pressing-down-and-moving way but I'll look further into it. About the factoring out part, the ScrolledCanvas and TreeNode are both used by the two browsers, meaning that no code has to be added to them. In the future, a factory function could be made that when called with a canvas, it returns an event callback function that can be bound to the canvas. When called, it scrolls depending on the event type and other info. -- ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: -15072 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: +15076, 15077 pull_request: https://github.com/python/cpython/pull/15360 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: +15076 pull_request: https://github.com/python/cpython/pull/15360 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: -15077 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: -15076 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
Change by George Zhang : -- pull_requests: +15079 pull_request: https://github.com/python/cpython/pull/15368 ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
George Zhang added the comment: Looks like my PRs are getting out of hand... This is the final PR :P -- ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
George Zhang added the comment: I renamed mousescroll to handlescroll as it's an independent callback function and I think it fits its use case better. I can keep it as mousescroll if you like though. The handlescroll function is now a standalone module function in tree.py and the EditorWindow imports it for use (instead of creating its own function). Its signature is `handlescroll(event, widget=None)` where event is the event (yeah...) and widget is an optional argument that overrides the widget to call `yview(SCROLL, lines, "units")` on. The second argument was added so that the nasty labels don't have to use the same function but with one line changed (we redirect handlescroll to use `self.canvas` because `event.widget` would refer to the Label which has no yview function). I've added tests on handlescroll with different events. I've also added a test on multicall that checks to test if MultiCallCreator overrides yview. Sorry about the PR closing and reopening. I was panicking about commiting more than once and saw that I should make a new branch for the patch (instead of using master branch). -- ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37902] Add scrolling for IDLE browsers
George Zhang added the comment: Also, how should I get the new code coverage percentage (or should it be ignored for now)? I'm thinking of adding a few more tests that send invalid events which would raise KeyError but I don't think that this behaviour will be used (and it's not documented). Should it give a more specific error message? The test for multicall is only targeting the MultiCall class that gets returned. How should it check for any possible subclasses of it? -- ___ Python tracker <https://bugs.python.org/issue37902> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37461] email.parser.Parser hang
Change by George Zhang : -- pull_requests: +15136 pull_request: https://github.com/python/cpython/pull/15430 ___ Python tracker <https://bugs.python.org/issue37461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37461] email.parser.Parser hang
Change by George Zhang : -- pull_requests: +15137 pull_request: https://github.com/python/cpython/pull/15432 ___ Python tracker <https://bugs.python.org/issue37461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL
Xiang Zhang added the comment: >It may be better to apply it even to the developed version. There is nothing >wrong with creating the tee iterator in one thread and using it the other >thread. Or using the tee iterators with external locking. I afraid that PR >15567 can break a legitimate code. +1 on this. I think it's better to also apply #15625 to master branch. I don't think we should prevent creating the iterator in one thread and using it in others. -- ___ Python tracker <https://bugs.python.org/issue34410> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38168] Refleaks in setint() of mmapmodule.c
Change by Xiang Zhang : -- pull_requests: +15786 pull_request: https://github.com/python/cpython/pull/16176 ___ Python tracker <https://bugs.python.org/issue38168> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38168] Refleaks in setint() of mmapmodule.c
Xiang Zhang added the comment: New changeset 68d8c122972d7a49627b983af4ccbfad9f5ade17 by Xiang Zhang in branch '2.7': [2.7] bpo-38168: Fix a possbile refleak in setint() of mmapmodule.c (GH-16136) (GH-16176) https://github.com/python/cpython/commit/68d8c122972d7a49627b983af4ccbfad9f5ade17 -- nosy: +xiang.zhang ___ Python tracker <https://bugs.python.org/issue38168> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38168] Refleaks in setint() of mmapmodule.c
Change by Xiang Zhang : -- components: +Extension Modules -Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue38168> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38391] Typo in tutorial code (does not compile)
Xiang Zhang added the comment: New changeset 038503e08ac5b10601b95d5adc2c2cab7be10163 by Xiang Zhang (Krishna Oza) in branch 'master': bpo-38391: Fixing a typo for Py_DECREF (GH-16616) https://github.com/python/cpython/commit/038503e08ac5b10601b95d5adc2c2cab7be10163 -- nosy: +xiang.zhang ___ Python tracker <https://bugs.python.org/issue38391> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38391] Typo in tutorial code (does not compile)
Change by Xiang Zhang : -- assignee: -> docs@python components: +Documentation -Demos and Tools nosy: +docs@python resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue38391> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34953] Implement `mmap.mmap.__repr__`
Change by Xiang Zhang : -- components: +Extension Modules -Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue34953> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34953] Implement `mmap.mmap.__repr__`
Xiang Zhang added the comment: New changeset d8ca2354ed30c12b9ce37c4535222b700a727b32 by Xiang Zhang (Taine Zhao) in branch 'master': bpo-34953: Implement `mmap.mmap.__repr__` (GH-9891) https://github.com/python/cpython/commit/d8ca2354ed30c12b9ce37c4535222b700a727b32 -- ___ Python tracker <https://bugs.python.org/issue34953> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error
New submission from Michael Zhang : Discovered this while trying to use a function in `boto3`. Seems like when tzlocal() is passed with a 0 to datetime.datetime.fromtimestamp(), it throws an "[Errno 22] Invalid argument" error. Using 3.7.4 via Anaconda on Windows 10, and tzlocal().tznames's local timezone for me is EST/EDT. Can replicate through this: ``` import datetime from dateutil.tz import tzlocal print(datetime.datetime.fromtimestamp(0, tzlocal())) ``` -- messages: 355720 nosy: mzhang13 priority: normal severity: normal status: open title: datetime.datetime.fromtimestamp(0, tzlocal()) throws error type: crash versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue38645> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error
Michael Zhang added the comment: I think it might be something Windows specific; the original comment includes the version and code to reproduce. -- ___ Python tracker <https://bugs.python.org/issue38645> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38645] datetime.datetime.fromtimestamp(0, tzlocal()) throws error
Michael Zhang added the comment: Yeah, seconded with my own tracing as well. -- ___ Python tracker <https://bugs.python.org/issue38645> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32408] Performance regression in urllib.proxy_bypass_environment
Xiang Zhang added the comment: I think this issue has already been solved by #39507. The time difference is: before: time python3 -c 'import urllib.request; urllib.request.proxy_bypass_environment("1.1.1.1")' real0m0.912s user0m0.902s sys 0m0.010s after: time python3 -c 'import urllib.request; urllib.request.proxy_bypass_environment("1.1.1.1")' real0m0.105s user0m0.086s sys 0m0.019s -- nosy: +serhiy.storchaka resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue32408> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32408] Performance regression in urllib.proxy_bypass_environment
Xiang Zhang added the comment: Sorry, it's #39057 -- ___ Python tracker <https://bugs.python.org/issue32408> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'
Change by Yao Zhang <792641...@qq.com>: -- components: Parser nosy: lys.nikolaou, pablogsal, zz792641209 priority: normal severity: normal status: open title: Cython cannot compile 'a = 5/6' and return 'a = 0' type: compile error versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue44171> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'
Yao Zhang <792641...@qq.com> added the comment: I'm not going to report the problem yet, I'm a rookie, and this is my first time to report the problem -- 原始邮件 -- 发件人: "Python tracker" https://bugs.python.org/issue44171>; ___ -- ___ Python tracker <https://bugs.python.org/issue44171> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'
Yao Zhang <792641...@qq.com> added the comment: However, in the source code, the source code runs normally, and when compiled and encapsulated with Cython, an exception occurs,Trigger divisible 'a = 5 // 6',this possibility does not exist.I checked it out :'a = 1,b = 5 / 6 + a',return :'a = 0' -- 原始邮件 -- 发件人: "Python tracker" https://bugs.python.org/issue44171>; ___ -- ___ Python tracker <https://bugs.python.org/issue44171> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'
Yao Zhang <792641...@qq.com> added the comment: However, in the source code, the source code runs normally, and when compiled and encapsulated with Cython, an exception occurs,Trigger divisible 'a = 5 // 6',this possibility does not exist.I checked it out :'a = 1,b = 5 / 6 + a',return :'b = 0' -- 原始邮件 -- 发件人: "Python tracker" https://bugs.python.org/issue44171> ___ -- ___ Python tracker https://bugs.python.org/issue44171>; ___ -- ___ Python tracker <https://bugs.python.org/issue44171> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'
Yao Zhang <792641...@qq.com> added the comment: Thank you for your patient answer, but I still don't understand.I have uploaded my file (*.py).I hope you can solve my problem. I want 'a=5/6' to return 'a= 0.833.. 'after compilation. -- 原始邮件 -- 发件人: "Python tracker" https://github.com/cython/cython/issues/ When you do that, you'll want to show the actual code you're having a problem with. You're using both "//" and "/" here. As Pablo said, you're probably having a problem with integer division ("//"). -- ___ Python tracker https://bugs.python.org/issue44171>; ___ -- Added file: https://bugs.python.org/file50050/problem.py ___ Python tracker <https://bugs.python.org/issue44171> ___#:The following code outputs a *. Pyd file after being compiled in Cython a = 5 / 6 print(a) #:return :a = 0 b = 1 a = 5 / 6 + b#: return : a = 0 print(a) a = 5 a = a / 6 #:return : a = 0.8334 print(a) #:After the *.pyd file is generated, run the following code ''' >> import problem >> 0 >> 0 >> 0.8334 ''' ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'
Yao Zhang <792641...@qq.com> added the comment: I want 'a=5/6' to return 'a= 0.833.. 'after compilation. -- Added file: https://bugs.python.org/file50051/problem.py ___ Python tracker <https://bugs.python.org/issue44171> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45006] Add data_offset field to ZipInfo
New submission from Kelvin Zhang : Currently python's zipfile module does not have a way query starting offset of compressed data. This might be handy when the user wants to copy compressed data as is. Therefore I propose adding a data_offset field to zipfile.ZipInfo, which stores the offset to beginning of compressed data. -- components: Library (Lib) messages: 400306 nosy: zhangxp1998 priority: normal severity: normal status: open title: Add data_offset field to ZipInfo type: enhancement versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue45006> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45006] Add data_offset field to ZipInfo
Change by Kelvin Zhang : -- keywords: +patch pull_requests: +26408 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27961 ___ Python tracker <https://bugs.python.org/issue45006> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45779] multiprocessing initializer error with CPython 3.9.6 on Apple Silicon
New submission from Zhang Zheng : Hi, I have encountered an error when working with concurrent.futures.ProcessPoolExecutor API, with CPython 3.9.6 on Apple Silicon, the error can not be reproduced with CPython 3.9.6 Linux/X86 build, so I think this might be related to the arch. I have created a github repo with the code in poc.py file, and the error message in README, please let me know if there's anything more I can provide to help the investigation to the problem. -- components: Library (Lib) messages: 406108 nosy: zhangzheng priority: normal severity: normal status: open title: multiprocessing initializer error with CPython 3.9.6 on Apple Silicon type: behavior versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue45779> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45779] multiprocessing initializer error with CPython 3.9.6 on Apple Silicon
Zhang Zheng added the comment: Hi, I have encountered an error when working with concurrent.futures.ProcessPoolExecutor API, with CPython 3.9.6 on Apple Silicon, the error can not be reproduced with CPython 3.9.6 Linux/X86 build, so I think this might be related to the arch. I have created a github repo with the code in poc.py file, and the error message in README, please let me know if there's anything more I can provide to help the investigation to the problem. https://github.com/simsicon/multiprocessing-initializer -- ___ Python tracker <https://bugs.python.org/issue45779> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39279] Don't allow non-Ascii digits in platform.py
Xiang Zhang added the comment: I can't understand the rational for rejecting localized digits though I don't know who will use them in practise. I'd rather fix it until there is a real problem with it. -- nosy: +xiang.zhang ___ Python tracker <https://bugs.python.org/issue39279> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39279] Don't allow non-Ascii digits in platform.py
Xiang Zhang added the comment: @Ezio, at least for my config they are all ASCII digits. But still I don't think there is any rush to change current behaviour. -- ___ Python tracker <https://bugs.python.org/issue39279> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39955] argparse print_help breaks when help is blank space
New submission from Ying Zhang : Code is attached. Comments in line. from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter parser1 = ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter) parser1.add_argument('--foo', default='default_value_for_foo', required=False) # this will not print the default value for foo. I think this is not the most natural choice, given that the user has asked for ArgumentDefaultsHelpFormatter, but acceptable since the user didn't define help here. parser1.add_argument('--bar', help='', default='default_value_for_bar', required=False) # this will not print the default value for bar. Again, acceptable but I feel not the most natural. parser1.add_argument('--baz', help=' ', default='default_value_for_baz', required=False) # this will print the default value for baz. parser1.print_help() parser2 = ArgumentParser() parser2.add_argument('--baz', help=' ', default='default_value_for_baz', required=False) # this will break, which surprises me. parser2.print_help() Result: python argparse_help_demo.py usage: argparse_help_demo.py [-h] [--foo FOO] [--bar BAR] [--baz BAZ] optional arguments: -h, --help show this help message and exit --foo FOO --bar BAR --baz BAZ (default: default_value_for_baz) Traceback (most recent call last): File "argparse_help_demo.py", line 21, in parser2.print_help() File "/nfs/statbuild/zhangyi/conda_envs/net37_env0/lib/python3.7/argparse.py", line 2474, in print_help self._print_message(self.format_help(), file) File "/nfs/statbuild/zhangyi/conda_envs/net37_env0/lib/python3.7/argparse.py", line 2458, in format_help return formatter.format_help() File "/nfs/statbuild/zhangyi/conda_envs/net37_env0/lib/python3.7/argparse.py", line 284, in format_help help = self._root_section.format_help() File "/nfs/statbuild/zhangyi/conda_envs/net37_env0/lib/python3.7/argparse.py", line 215, in format_help item_help = join([func(*args) for func, args in self.items]) File "/nfs/statbuild/zhangyi/conda_envs/net37_env0/lib/python3.7/argparse.py", line 215, in item_help = join([func(*args) for func, args in self.items]) File "/nfs/statbuild/zhangyi/conda_envs/net37_env0/lib/python3.7/argparse.py", line 215, in format_help item_help = join([func(*args) for func, args in self.items]) File "/nfs/statbuild/zhangyi/conda_envs/net37_env0/lib/python3.7/argparse.py", line 215, in item_help = join([func(*args) for func, args in self.items]) File "/nfs/statbuild/zhangyi/conda_envs/net37_env0/lib/python3.7/argparse.py", line 527, in _format_action parts.append('%*s%s\n' % (indent_first, '', help_lines[0])) IndexError: list index out of range -- components: Library (Lib) messages: 364091 nosy: Ying Zhang priority: normal severity: normal status: open title: argparse print_help breaks when help is blank space type: crash versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue39955> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40039] [CVE-2020-10796] Python multiprocessing Remote Code Execution vulnerability
Change by Junyu Zhang : -- components: Library (Lib) files: Python-multiprocessing-RCE-vulnerability.pdf nosy: Junyu Zhang priority: normal severity: normal status: open title: [CVE-2020-10796] Python multiprocessing Remote Code Execution vulnerability type: security versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48994/Python-multiprocessing-RCE-vulnerability.pdf ___ Python tracker <https://bugs.python.org/issue40039> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40039] [CVE-2020-10796] Python multiprocessing Remote Code Execution vulnerability
New submission from Junyu Zhang : description: When we were using python to develop a distributed process service, I noticed that the default serialization parameter of Manager and ManagerBase in multiprocessing was pickl, and it didn't seem to be mentioned in the official website's documentation. This is unsafe unless our server is completely You can trust recv data, but if authkey is not set or leaked, it will cause RCE on the server side, so I applied for a CVE-ID to remind everyone to use this security issue. For details of the vulnerability and the poc code, please refer to the pdf file. -- ___ Python tracker <https://bugs.python.org/issue40039> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40039] [CVE-2020-10796] Python multiprocessing Remote Code Execution vulnerability
Junyu Zhang added the comment: Thank you for your reply, this report is indeed the situation prompted by the warning. There will be few problems in the single-machine deployment mode. Of course, it is also possible to take advantage of the possibility of elevation of privilege. In the distributed deployment mode, the client script is leaked. The resulting authkey leak will also cause RCE problems. I have an idea. If ManagerBase can allow users to customize the serialization operation, it may be greatly relieved. Your suggestion is that I need to submit this to secur...@python.org Report it? -- ___ Python tracker <https://bugs.python.org/issue40039> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40039] [CVE-2020-10796] Python multiprocessing Remote Code Execution vulnerability
Junyu Zhang added the comment: Thank you for your reply. Yes, under normal circumstances, keys are generally not leaked. I may have only considered the following attacks at the time: 1. If the client script of the distributed process is on another machine, or the key is leaked due to accidental leak. 2. When the attacker has obtained some server permissions, but not the highest permissions, and this distributed service process runs with the highest management permissions, and the attacker has read permissions to the script code, this may cause a Simple elevation. Of course, after thinking about it carefully, I found that the above problem is just a conjecture, so now I have decided to give up reporting it as CVE, unless I find such a situation. -- ___ Python tracker <https://bugs.python.org/issue40039> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40114] support maxsize argument for lru_cache's user_function option
Change by brendon zhang : -- components: Library (Lib) nosy: brendon-zh...@hotmail.com, rhettinger priority: normal severity: normal status: open title: support maxsize argument for lru_cache's user_function option type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue40114> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40114] support maxsize argument for lru_cache's user_function option
Change by brendon zhang : -- keywords: +patch pull_requests: +18588 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19226 ___ Python tracker <https://bugs.python.org/issue40114> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40114] support maxsize argument for lru_cache's user_function option
New submission from brendon zhang : Existing implementation of lru_cache user_function option supports typed_code argument, but does not support maxsize argument, because when we pass in the user function as a positional argument, it gets assigned to the maxsize parameter, and therefore there is no way to pass the actual maxsize value. The PR implementation supports both signatures lru_cache(maxsize=128, typed=False) lru_cache(user_function, maxsize=128, typed=False) -- ___ Python tracker <https://bugs.python.org/issue40114> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40114] support maxsize argument for lru_cache's user_function option
brendon zhang added the comment: Two concerns is 1. the method signature (inspect.signature(lru_cache)) is not (maxsize=128, typed=False) anymore, and so it is poor documentation. 2. not good reuse of TypeErrors related to incorrect number of inputs / type of inputs. -- ___ Python tracker <https://bugs.python.org/issue40114> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40114] support maxsize argument for lru_cache's user_function option
brendon zhang added the comment: update: ignore concern #1. I used __text_signature__ attribute to reset the inspect signature to something useful https://github.com/python/cpython/pull/19226/commits/eea367f64d2a83d0987a3f7a155ac015306e960b -- ___ Python tracker <https://bugs.python.org/issue40114> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40114] support maxsize argument for lru_cache's user_function option
brendon zhang added the comment: "lru_cache(maxsize=128, typed=False)(user_function)" oh ok! I overlooked that you could do this. There isn't really a need then for supporting user_function w/ the maxsize argument in single call. "The code in the PR is valiant attempt but is way too tricky for my tastes" Yeah. I think only after looking back at the code after writing it I see it is too convoluted. I guess the code can remain as some artifact to show why not to down this path (unless some convenient way to implement it is introduced in the future). -- ___ Python tracker <https://bugs.python.org/issue40114> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40114] support maxsize argument for lru_cache's user_function option
Change by brendon zhang : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue40114> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40114] support maxsize argument for lru_cache's user_function option
brendon zhang added the comment: np! -- ___ Python tracker <https://bugs.python.org/issue40114> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] max() performance regression (quadratic time)
New submission from brendon zhang : There is a performance regression of the max (and also min) function implementation starting in python 3.7. I provide code and associated benchmarks in the file attachment. -- components: Library (Lib) files: maxbug.py messages: 365978 nosy: brendon-zh...@hotmail.com priority: normal severity: normal status: open title: max() performance regression (quadratic time) type: performance versions: Python 3.7 Added file: https://bugs.python.org/file49043/maxbug.py ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] max() performance regression (quadratic time)
brendon zhang added the comment: Something about calling max() in deeply nested recursion context appears to make the overall complexity O(n^2) instead of O(n) -- ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] max() performance regression (quadratic time)
brendon zhang added the comment: You can get the replicate this issue even when removing lru_cache(None) and calling max with iterable of size 1. eg. best = max(solve(j) for j in [i-1]) -- ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] max() performance regression (quadratic time)
brendon zhang added the comment: update: it is specifically caused by passing in a generator expression to max(), where the generator invokes recursive function. I added another file to demonstrate this -- Added file: https://bugs.python.org/file49044/maxbug2.py ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] max() performance regression (quadratic time)
brendon zhang added the comment: this affects ALL builtin functions (eg all(), any(), sum(), sorted(), etc...) that accept generator as input and exhaust it. -- ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] generator exhaustion for builtin functions in recursion is O(depth)
Change by brendon zhang : -- title: max() performance regression (quadratic time) -> generator exhaustion for builtin functions in recursion is O(depth) ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] generator exhaustion for builtin functions in nested call is O(depth)
Change by brendon zhang : -- title: generator exhaustion for builtin functions in recursion is O(depth) -> generator exhaustion for builtin functions in nested call is O(depth) ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] recursive call within generator expression is O(depth)
Change by brendon zhang : -- title: generator exhaustion for builtin functions in nested call is O(depth) -> recursive call within generator expression is O(depth) ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] recursive call within generator expression is O(depth)
brendon zhang added the comment: update 2: This affects ALL functions which exhaust a generator expression. If that generator expression makes a recursive call, then the cost of evaluating it is O(depth), when it should be only O(1). You can see demonstrate that this doesn't just affect builtins, by replacing max() with a custom implementation such as, def custommax(it): best = -999 for x in it: if x > best: best = x return best -- ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] recursive call within generator expression is O(depth)
Change by brendon zhang : -- nosy: +rhettinger, vstinner ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] recursive call within generator expression is O(depth)
brendon zhang added the comment: Okay, I attached a complete minimal example below. In your shell, run ulimit -S -s unlimited Then try executing with various python versions 3.6 and 3.7 python3.6 benchbug.py python3.7 benchbug.py You will notice that python 3.7 has a significant performance regression. It is likely a bug. -- Added file: https://bugs.python.org/file49047/consumerbug.py ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] recursive call within generator expression is O(depth)
brendon zhang added the comment: hmm, I can't edit my previous posts. I meant to say python3.6 consumerbug.py python3.7 consumerbug.py -- ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] recursive call within generator expression is O(depth)
brendon zhang added the comment: No, the example you provided does not trigger the same bug. It is explicitly to do with calling recursively from within the generator expression. -- ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] recursive call within generator expression is O(depth)
brendon zhang added the comment: reduce the upper bound for the recursion depth until it does not segfault eg hi = 12 -- ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40225] recursive call within generator expression is O(depth)
brendon zhang added the comment: did you remember to run `ulimit -S -s unlimited`? If you don't increase the soft stack limit, your OS will kill the program. -- ___ Python tracker <https://bugs.python.org/issue40225> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43338] [feature request] Please provide offical installers for security releases
New submission from Zhang Boyang : Hello, Thanks for developing Python! I noticed there is no offical installers for security releases of old python version. This looks a little strange to me. As a python user & developer, it's often to stay with some old version of python, because some package's version constraints, or we need to support old platforms. The offical installer is the most trusted installaion source, but it's not provided with security releases. Lacking of installers makes installaion extreme difficult (impossible for end users), and there's no (free) way for a individual to create a code signed copy of python. Non-code-signed binarys will lead a lot of problem on recent operating systems. The choice of providing no offical installer leads a lot of user stay with lastest bug-fix release and not upgrading to latest security releases. Individuals who want to stay with a old version must either use lastest bug-fix release or risk running a non-code-signed python binary. The former lacks recent python security fix, and the latter is vulnerable to binary modifications such as virus infection. To sum up, if offical installer is provided, it will make life a lot easier for users who want to stay with old python version. It would be appreciated if you could accept my feature request. Thank you! -- components: Installation messages: 387774 nosy: zby1234 priority: normal severity: normal status: open title: [feature request] Please provide offical installers for security releases type: enhancement versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue43338> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43409] [Win] Call subprocess.Popen() twice makes Thread.join() interruptible and deadlock
New submission from Zhang Boyang : Please run joinbug.py and press Ctrl-C twice. = The output = 1st join PLEASE PRESS CTRL-C TWICE, IGNORE THE 'Press any key to continue' Press any key to continue . . . Press any key to continue . . . thread exit Traceback (most recent call last): File "D:\xxx\joinbug.py", line 21, in t.join() # subprocess.Popen() makes join() can be interrupted File "C:\Users\xxx\AppData\Local\Programs\Python\Python39\lib\threading.py", line 1033, in join self._wait_for_tstate_lock() File "C:\Users\xxx\AppData\Local\Programs\Python\Python39\lib\threading.py", line 1049, in _wait_for_tstate_lock elif lock.acquire(block, timeout): KeyboardInterrupt 2nd join (stuck here) = Expected behaviour = either join uninterruptible or the 2nd join doesn't deadlock. -- components: Windows files: joinbug.py messages: 388156 nosy: paul.moore, steve.dower, tim.golden, zach.ware, zby1234 priority: normal severity: normal status: open title: [Win] Call subprocess.Popen() twice makes Thread.join() interruptible and deadlock type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49853/joinbug.py ___ Python tracker <https://bugs.python.org/issue43409> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41555] re.sub replaces twice
New submission from S. Zhang : The following command produced "name.tsvtsv" with version 3.7.1 and 3.8.5 instead of the expected "name.tsv" from version 2.7.5, 3.5.6, and 3.6.7. Changing * to + produced expected "name.tsv". python -c 'import re; v="name.txt";v = re.sub("[^\.]*$", "tsv", v);print(v)' -- messages: 375436 nosy: spz1st priority: normal severity: normal status: open title: re.sub replaces twice type: behavior versions: Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue41555> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41555] re.sub replaces twice
S. Zhang added the comment: Thanks. But if talking about empty matches, there would be endless empty matches at the end in such cases. So in my opinion, [^\.]*$ should match txt plus the empty match because the greedy rule applies here. On Fri, Aug 14, 2020 at 10:37 PM Ma Lin wrote: > > Ma Lin added the comment: > > The re.sub() doc said: > Changed in version 3.7: Empty matches for the pattern are replaced when > adjacent to a previous non-empty match. > > IMO 3.7+ behavior is more reasonable, and it fixed a bug, see issue25054. > > -- > nosy: +malin > > ___ > Python tracker > <https://bugs.python.org/issue41555> > ___ > -- ___ Python tracker <https://bugs.python.org/issue41555> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41555] re.sub replaces twice
S. Zhang added the comment: Okay. Thanks. On Sat, Aug 15, 2020 at 9:07 AM Ma Lin wrote: > > Ma Lin added the comment: > > There can be at most one empty match at a position. IIRC, Perl's regex > engine has very similar behavior. > If don't want empty match, use + is fine. > > -- > > ___ > Python tracker > <https://bugs.python.org/issue41555> > ___ > -- ___ Python tracker <https://bugs.python.org/issue41555> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30434] multiprocessing AuthenticationError "digest sent was rejected"
Change by Xiang Zhang : -- resolution: -> out of date stage: test needed -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue30434> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41555] re.sub replaces twice
S. Zhang added the comment: Thanks. On Mon, Aug 17, 2020 at 7:40 PM Pablo Galindo Salgado < rep...@bugs.python.org> wrote: > > Change by Pablo Galindo Salgado : > > > -- > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > ___ > Python tracker > <https://bugs.python.org/issue41555> > ___ > -- ___ Python tracker <https://bugs.python.org/issue41555> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42357] Wrong Availability for signal.SIGCHLD
Change by Maiyun Zhang : -- keywords: +patch pull_requests: +22177 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23285 ___ Python tracker <https://bugs.python.org/issue42357> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42357] Wrong Availability for signal.SIGCHLD
New submission from Maiyun Zhang : The availability for `signal.SIGCHLD` is not correct. This seems to be present since Python 3.7 -- assignee: docs@python components: Documentation messages: 380981 nosy: docs@python, myzhang1029 priority: normal severity: normal status: open title: Wrong Availability for signal.SIGCHLD versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue42357> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34763] Treat U+4E17 as a numeric value
Xiang Zhang added the comment: unicode.org doesn't list "丗" as numeric so I think there is nothing we can do. -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34763> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37441] Fix a param error in exceptions.rst
Xiang Zhang added the comment: New changeset aeecf380660ea459d85bb5f59d76bb54f757b5be by Xiang Zhang (Hai Shi) in branch 'master': bpo-37441: Fix wrong PyErr_SetImportErrorSubclass signature in doc (GH-14453) https://github.com/python/cpython/commit/aeecf380660ea459d85bb5f59d76bb54f757b5be -- nosy: +xiang.zhang ___ Python tracker <https://bugs.python.org/issue37441> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37441] Fix a param error in exceptions.rst
Change by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37441> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37513] Fix a type error in ctypes.rst
Xiang Zhang added the comment: Should be TypeError. It's changed from ValueError to TypeError in https://bugs.python.org/issue1831. -- nosy: +xiang.zhang ___ Python tracker <https://bugs.python.org/issue37513> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com