[issue13662] os.listdir bug

2011-12-25 Thread wang
New submission from wang : when I use os.list the return value is like this: ['some.xml', '\ufeff9158.xml'] but the file name have not the '\ufeff'. because this problem the script can't runing. -- messages: 150252 nosy: guxianminer priority: normal

[issue13662] os.listdir bug

2011-12-25 Thread wang
wang added the comment: only I double click the script file generate this problem. in IDE not this problem. -- ___ Python tracker <http://bugs.python.org/issue13

[issue13662] os.listdir bug

2011-12-25 Thread wang
wang added the comment: I mean in IDLE can run ok. the '\ufeff' is still have. -- ___ Python tracker <http://bugs.python.org/issue13662> ___ ___

[issue13662] os.listdir bug

2011-12-25 Thread wang
wang added the comment: I mean in IDLE can run ok. the '\ufeff' is still have. -- ___ Python tracker <http://bugs.python.org/issue13662> ___ ___

[issue13662] os.listdir bug

2011-12-25 Thread wang
Changes by wang : -- components: +Windows ___ Python tracker <http://bugs.python.org/issue13662> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5090] import tkinter library Visual C++ Concepts:C Run-Time Error R6034 when embeded python in c++

2009-01-28 Thread wang
New submission from wang : import tkinter library Visual C++ Concepts:C Run-Time Error R6034 when embeded python in c++ -- components: Tkinter messages: 80710 nosy: guxianminer severity: normal status: open title: import tkinter library Visual C++ Concepts:C Run-Time Error R6034 when

[issue5090] import tkinter library Visual C++ Concepts:C Run-Time Error R6034 when embeded python in c++

2009-01-28 Thread wang
wang added the comment: my compile is gcc 4.2.1 system is windows xp some other library can be import. such as:sys os c++ code line: Py_Initialize(); Py_SetProgramName(L"MyProgram"); module=PyImport_ImportModule("__main__"); moduledict=PyM

[issue14096] Python 3.1 IDLE has a bug.Can fix it?

2012-02-22 Thread wang
New submission from wang : paltform is windows. generate this bug: within IDLE edtor. first select some text. second press down the shift key. third press the end key. fourth press the home key. last IDLE quit with no message and document with no save. -- components: IDLE messages

[issue14096] IDLE quits unexpectedly when some keys are pressed

2012-02-22 Thread wang
wang added the comment: thanks. new version 3.2.2 have not this problem. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue43079] wrong IP address range given for ipv4_mapped

2022-01-19 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch nosy: +wangjiahua nosy_count: 2.0 -> 3.0 pull_requests: +28885 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30687 ___ Python tracker <https://bugs.python.org/i

[issue34875] Change .js mime to "text/javascript"

2022-01-21 Thread jiahua wang
Change by jiahua wang : -- nosy: +wangjiahua nosy_count: 3.0 -> 4.0 pull_requests: +28927 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/30740 ___ Python tracker <https://bugs.python.org/i

[issue46456] Add mime type "image/avif"

2022-01-21 Thread jiahua wang
New submission from jiahua wang : https://www.iana.org/assignments/media-types/image/avif -- components: Library (Lib) messages: 411134 nosy: wangjiahua priority: normal severity: normal status: open title: Add mime type "image/avif" versions: P

[issue46456] Add mime type "image/avif"

2022-01-23 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch pull_requests: +29010 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30823 ___ Python tracker <https://bugs.python.org/issu

[issue46484] Add test for Calendar().iterweekdays()

2022-01-23 Thread jiahua wang
New submission from jiahua wang : Apparently there is no test for Calendar().iterweekdays(). wangdeMacBook-Pro :: ~/cpython » grep -R iterweekdays Lib/test/ * Binary file Lib/test//__pycache__/test_calendar.cpython-311.pyc matches Doc/library/calendar.rst: .. method:: iterweekdays() Binary

[issue46484] Add test for Calendar().iterweekdays()

2022-01-23 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch pull_requests: +29012 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30825 ___ Python tracker <https://bugs.python.org/issu

[issue46157] Typo in JSON documentation

2022-01-24 Thread jiahua wang
Change by jiahua wang : -- nosy: +wangjiahua nosy_count: 5.0 -> 6.0 pull_requests: +29028 pull_request: https://github.com/python/cpython/pull/30846 ___ Python tracker <https://bugs.python.org/issu

[issue46498] Add new triplets for loongarch64

2022-01-25 Thread WANG Xuerui
New submission from WANG Xuerui : First of all I think the changes should probably go in main branch first, then backported to the older branches if possible; although IMO you'd be much better off just backporting and carrying the patch yourselves. Secondly the suggested patch i

[issue25948] Invalid MIME encoding generated by email.mime (line too long)

2022-01-27 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch nosy: +wangjiahua nosy_count: 3.0 -> 4.0 pull_requests: +29159 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30980 ___ Python tracker <https://bugs.python.org/i

[issue10754] os.path.isfile doesn't work with some greek characters

2010-12-21 Thread Wang Yanjin
New submission from Wang Yanjin : There is a file named "µTorrent.lnk" in the folder. Here is the code: #encoding=utf-8 import os for i in os.listdir('.'): print os.path.isfile(i), '\t', i a = input() and the output: True3.py False aμ汉字.

[issue10754] os.path.isfile doesn't work with some greek characters

2010-12-21 Thread Wang Yanjin
Wang Yanjin added the comment: I encoutered this problem on Winxp sp3. I have retested it on the win7, and it could return the correct value as it did on linux. -- ___ Python tracker <http://bugs.python.org/issue10

[issue10905] zipfile: fix arcname with leading '///' or '..'

2011-01-14 Thread Zhigang Wang
New submission from Zhigang Wang : We only support arcname with one leading '/', but not more. This patch fixes it. We don't support arcname with '..' well. The default behavior of unzip and 7z is to ignore all '..'. This patch does the same. Also updated t

[issue10905] zipfile: fix arcname with leading '///' or '..'

2011-01-14 Thread Zhigang Wang
Zhigang Wang added the comment: $ unzip -l t.zip Archive: t.zip Length DateTimeName - -- - 3 01-14-2011 21:11 ../foo 3 01-14-2011 21:11 foo - --- 6 2 files [zhigang

[issue10905] zipfile: fix arcname with leading '///' or '..'

2011-01-14 Thread Zhigang Wang
Zhigang Wang added the comment: Yes, in zipfile, we just overwrite it. Actually, ZipFile.extract() overwrite existing files already. If we want it more powerful, we can add a 'overwrite' parameter. But turning zipfile a full featured zip/unzip tool needs much more

[issue3058] Let SimpleXMLRPCServer pass client_address to called functions.

2008-06-07 Thread Kunshan Wang
New submission from Kunshan Wang <[EMAIL PROTECTED]>: I recently wrote a program making use of SimpleXMLRPCServer. It has a function that responds to the caller according to the caller's IP address. However the current SimpleXMLRPCServer does not allow me to do this (directly).

[issue4027] wrong page index number in reference book of python documentation

2008-10-03 Thread Ray Wang
New submission from Ray Wang <[EMAIL PROTECTED]>: the Glossary's index number is 3, which should be 75, so people could not navigate "Glossary" by clicking the title showed in Table of Content, or index link which is beside the content in Evince. -- assignee: ge

[issue4027] wrong page index number in reference book of python documentation

2008-10-04 Thread Ray Wang
Ray Wang <[EMAIL PROTECTED]> added the comment: hi, sorry for didn't present very clear. > Which version of the Ref Manual is this supposed to be? the newest python documentations, Release 2.6, October 2, 2008 > By Evince do you mean the Gnome document viewer? > http://ww

[issue7852] [PATCH] Drop "Computer" from "Apple Computer" in plistlib

2010-02-04 Thread Wang Chun
New submission from Wang Chun : Apple's official utilities had been dropped the word "Computer". We should follow them. imac:~$ cat test.py __import__('plistlib').writePlist({}, 'test.plist') imac:~$ python test.py imac:~$ cat test.py __import__('plis

[issue7852] [PATCH] Drop "Computer" from "Apple Computer" in plistlib

2010-02-05 Thread Wang Chun
Wang Chun added the comment: plutil is a command shipped with every Mac. See the example in my original post. -- ___ Python tracker <http://bugs.python.org/issue7

[issue4027] wrong page index number in reference book of python documentation

2008-10-15 Thread Ray Wang
Ray Wang <[EMAIL PROTECTED]> added the comment: any feedback here? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4027> ___ ___ Python-bugs

[issue4027] wrong page index number in reference book of python documentation

2008-10-15 Thread Ray Wang
Ray Wang <[EMAIL PROTECTED]> added the comment: > We are all volunteers here, and I see three replies. > This may or may not be trivial to fix, and may take some time. > Python docs are written in rst format and translated by Sphinx to > various formats. The main translat

[issue4027] wrong page index number in reference book of python documentation

2008-10-16 Thread Ray Wang
Ray Wang <[EMAIL PROTECTED]> added the comment: ah, thanks goodness, what a fortune that you are not ignoring this problem. I expect the fix could be happen in the near future. :) ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4027] wrong page index number in reference book of python documentation

2008-10-16 Thread Ray Wang
Ray Wang <[EMAIL PROTECTED]> added the comment: Woohoo, you are awesome, thanks a lot! ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4027> ___

[issue4027] wrong page index number in reference book of python documentation

2008-10-17 Thread Ray Wang
Ray Wang <[EMAIL PROTECTED]> added the comment: Thanks for your big efforts! ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4027> ___ __

[issue1982] Feature: extend strftime to accept milliseconds

2008-10-29 Thread Wang Chun
Wang Chun <[EMAIL PROTECTED]> added the comment: Ruby recently added support of millisecond and nanosecond to strftime. This is their changeset: http://redmine.ruby-lang.org/repositories/revision/ruby-19?rev=18731 To use the extended strftime, one can do: >> Time.now.strftime(&#x

[issue4227] unicode_literals and print_function do not work together.

2008-10-29 Thread Wang Chun
New submission from Wang Chun <[EMAIL PROTECTED]>: If "from __future__ import unicode_literals, print_function", unicode_literals works, but not print_function; If "from __future__ import print_function, unicode_literals", print_function works, but not unicode_litera

[issue2173] Python fails silently on bad locale

2008-11-12 Thread Wang Chun
Wang Chun <[EMAIL PROTECTED]> added the comment: This issue remains unsolved in the latest python 3.0rc2+ subversion repository as of 2008-11-13. -- nosy: +wangchun ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4515] Formatting error in "What's New in Python 3.0"

2008-12-03 Thread Peter Wang
New submission from Peter Wang <[EMAIL PROTECTED]>: In the section "Removed Syntax", there is some ReST markup that leaked through into the output: "The only acceptable syntax for relative imports is from .``[*module*] :keyword:`import` *name*; :keyword:`import` forms not

[issue4516] Another formatting error in "What's New in Python 3.0"

2008-12-03 Thread Peter Wang
New submission from Peter Wang <[EMAIL PROTECTED]>: In the "Library Changes" section, the next to last bullet point about string.letters has leaked through some ReST markup into the final output: ":data:string.letters`" -- assignee: georg.brandl components: Doc

[issue4629] getopt should not accept no_argument that ends with '='

2008-12-10 Thread Wang Chun
New submission from Wang Chun <[EMAIL PROTECTED]>: Consider the following program tmp.py: import sys, getopt print(getopt.getopt(sys.argv[1:], '', ['help'])) The program accept "--help" without a value: python helloworld.py --help But if someone invoke the

[issue4629] getopt should not accept no_argument that ends with '='

2008-12-10 Thread Wang Chun
Changes by Wang Chun <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file12325/getopt.py.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4650] getopt need re-factor...

2008-12-12 Thread Wang Chun
New submission from Wang Chun : I created #4629 a couple of days ago. And besides that issue, for Python 3.x, I guess we can remove getopt.error since Python 3.x does not have to backward compatible with Python 2.x. And another issue is, GetoptError does not render right error message with

[issue4651] getopt need re-factor...

2008-12-12 Thread Wang Chun
New submission from Wang Chun : I created #4629 a couple of days ago. And besides that issue, for Python 3.x, I guess we can remove getopt.error since Python 3.x does not have to backward compatible with Python 2.x. And another issue is, GetoptError does not render right error message with

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-13 Thread Javen Wang
New submission from Javen Wang : I encountered a very strange issue in file flush operation in Windows. Here's the scenario of my application: 1. The main thread of my application will create makefiles sequentially. 2. Once a makefile is generated, launch a separate process ca

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-14 Thread Javen Wang
Javen Wang added the comment: gagenellina, My application is a little bit different from your test code. It won't wait for the exit of new process and there're file writing operations during makefile running. I changed the test code to be real multi-process and tried many file si

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-14 Thread Javen Wang
Javen Wang added the comment: The created files are on local drive. I saw the problem on the laptop (XP-SP2), desktop(XP-SP3) and server (Win2003). But there's no such problem on the Linux and Mac boxes. I tried to use fopen/fwrite in my extension according to your suggestion. The pr

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-14 Thread Javen Wang
Javen Wang added the comment: There would be more chances to see the problem by doing this: C:\test\edk2> python.exe C:\test\tools\Source\Python\build\build.py -n 2 -p IntelFrameworkModulePkg\IntelFrameworkModulePkg.dsc -a IA32 -s ___ Python tracker &l

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-14 Thread Javen Wang
Javen Wang added the comment: Thank you very much for the trying. You might miss the step 4 in my previous message. The step is: C:\test\edk2> edksetup.bat C:\test\edk2> set PYTHONPATH=C:\test\tools\Source\Python C:\test\edk2> python.exe C:\test\tools\Source\Python\build\build.p

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-14 Thread Javen Wang
Javen Wang added the comment: I agree multithread programming is kind of difficult and tricky. But I don't think there's a race condition in _MultiThreadBuildPlatform method, because I do have only one producer. And the consumer consumes the product only when it's done (i.e. the

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-16 Thread Javen Wang
Javen Wang added the comment: I narrowed down the root cause in the GIL of Python. I read the source code of implementing os.fsync and found it's using Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS to enclose the calling of _commit() in order to be thread safe. I tried to add them in

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-19 Thread Javen Wang
Javen Wang added the comment: I'm quite certain that the makefile is generated before the "make" program is launched in separated process. Follow is the original code where the makefile is created (line 14) and a task is put in queue (line 19). It's executed in the main

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-20 Thread Javen Wang
Javen Wang added the comment: I did trace the order of file creation and process launch. It shows the file is indeed created before the process launch. I did another investigation. I added a new process, "cmd.exe /c copy Makefile NewMakefile", to copy the the Makefile created, j

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-20 Thread Javen Wang
Javen Wang added the comment: The test code and script which can reproduce the problem has been uploaded. Added file: http://bugs.python.org/file12808/test_file_flush.py ___ Python tracker <http://bugs.python.org/issue4

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-21 Thread Javen Wang
Javen Wang added the comment: I'm using Python2.5 in which close_fds is not available in Windows. And I cannot use Python2.6 because I need to redirect the stdout and stderr and there's performance concern. I have questions on the root cause: a. why doesn't fopen() has sha

[issue4944] os.fsync() doesn't work as expect in Windows

2009-01-22 Thread Javen Wang
Javen Wang added the comment: I don't have Python2.6 installed. I just have ever read a bench article comparing the performance between different version of Python, including 2.5, 2.6 and 3.0. That article shows, for the same script, Python2.6 has longer running time than Python2.

[issue46907] Update Windows and MacOS installer to SQLite 3.38.2

2022-03-27 Thread jiahua wang
Change by jiahua wang : -- nosy: +wangjiahua nosy_count: 9.0 -> 10.0 pull_requests: +30229 pull_request: https://github.com/python/cpython/pull/32149 ___ Python tracker <https://bugs.python.org/issu

[issue38420] defaultdict does not support parametric lambda

2019-10-09 Thread wang xuancong
New submission from wang xuancong : A very common use of defaultdict is that if the key exist, use the corresponding mapped target, if the key does not exist, use the key itself. However, current Python 2/3 defaultdict does not support parametric lambda function: >>> from collectio

[issue38315] Provide defaultdict variant that passes key to default_factory

2019-10-09 Thread wang xuancong
wang xuancong added the comment: I agree with Mark Amery. The reason why defaultdict still exists given that everything can be achieved by subclassing the built-in dict is because of convenience. I suggest maybe Python developer can put it into low priority instead. -- nosy

[issue38503] bug: string search can find \n, but can NEVER find \r

2019-10-17 Thread wang xuancong
New submission from wang xuancong : If I load a file which contains "\r" and "\n", I can find "\n", but not "\r". This behaviour is inconsistent in Python 3, but consistent in Python 2. >>> open('./3cjkxdnw/accessibilityLog/15701818

[issue38568] [3.7.5 x86_64 Linux] f-string parsing results in EOL

2019-10-23 Thread Ying Wang
New submission from Ying Wang : Hey, I encountered an interesting bug when trying to do string parsing using f-strings. I am currently under the impression that within the curly braces is any expression that can be successfully evaluated in a REPL. Here's the error: ```bash yin

[issue38568] [3.7.5 x86_64 Linux] f-string parsing results in EOL

2019-10-23 Thread Ying Wang
Ying Wang added the comment: Oh cool, I didn't know triple quotes can be used as part of f-strings! Thanks for the explanation! -- ___ Python tracker <https://bugs.python.org/is

[issue44028] Request for locals().update() to work, it is

2021-05-03 Thread wang xuancong
New submission from wang xuancong : In general, the ability to update local variables is very important and it simplifies life tremendously. For example, in machine learning, it allows saving/loading arbitrary-format datasets and arbitrary-structure neural networks (NN) using a single line

[issue44028] Request for locals().update() to work, it is

2021-05-04 Thread wang xuancong
wang xuancong added the comment: Of course, I am aware of that. As elite-level Python programmers, we should all be aware of security issues whenever we deal with exec() and eval(). -- ___ Python tracker <https://bugs.python.org/issue44

[issue44028] Request for locals().update() to work, it is

2021-05-09 Thread wang xuancong
wang xuancong added the comment: Thanks @terry.reedy for your expert-level good comments! 1. "In Python 3, the one *implementation*, and its lookup mode, are fixed. The slower implementation was dropped because it was not thought worth the bother." If I remember correctly, the p

[issue44790] Recursion causes Crash

2021-07-30 Thread Michael Wang
New submission from Michael Wang : Ultimately it seems that deep recursion after setting the recursion limit actually crashes python -- components: Interpreter Core files: bug.py messages: 398619 nosy: michaeljwang10 priority: normal severity: normal status: open title: Recursion

[issue44930] super-Matlab-style ranged list literal initialization

2021-08-16 Thread wang xuancong
New submission from wang xuancong : Different from Python 2, Python 3 has removed the capability to create a list from a range. In Python 2, we can use range(1,100,2) to create a list [1, 3, 5, ..., 99], but in Python 3, we can only use list(range(1,100,2)) or [*range(1,100,2)] where the

[issue44930] super-Matlab-style ranged list literal initialization

2021-08-17 Thread wang xuancong
wang xuancong added the comment: Another lazy explanation not wanting to improve anything -- ___ Python tracker <https://bugs.python.org/issue44930> ___ ___

[issue45230] Something wrong when Calculate "3==3 is not True"

2021-09-17 Thread Wang Bingchao
New submission from Wang Bingchao <819576...@qq.com>: I use python3.7 python3.6 python2.7, and run the following code: print(3==3 is not True) print(3==3 is True) print(3==2 is not True) print(3==2 is True) I got the same results as follow: True False False False but I don't th

[issue45441] Some links in the document is changed

2021-10-12 Thread jiahua wang
Change by jiahua wang : -- assignee: docs@python components: Documentation nosy: 180909, docs@python priority: normal pull_requests: 27191 severity: normal status: open title: Some links in the document is changed versions: Python 3.11 ___ Python

[issue45742] python -h can't find -R option

2021-11-06 Thread jiahua wang
New submission from jiahua wang : I input python -h on the command line, and I can't find any -R option. -- assignee: docs@python components: Documentation messages: 405891 nosy: 180909, docs@python priority: normal severity: normal status: open title: python -h can't find

[issue45712] Typo in "control flow" documentation

2021-11-07 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch nosy: +180909 nosy_count: 2.0 -> 3.0 pull_requests: +27714 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29460 ___ Python tracker <https://bugs.p

[issue19460] Add test for MIMENonMultipart

2021-11-27 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch nosy: +180909 nosy_count: 4.0 -> 5.0 pull_requests: +28049 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29817 ___ Python tracker <https://bugs.python.org/i

[issue28445] Wrong documentation for GzipFile.peek

2021-11-28 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch nosy: +180909 nosy_count: 4.0 -> 5.0 pull_requests: +28052 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29820 ___ Python tracker <https://bugs.python.org/i

[issue18717] test for request.urlretrieve

2021-11-28 Thread jiahua wang
Change by jiahua wang : -- nosy: +180909 nosy_count: 2.0 -> 3.0 pull_requests: +28054 pull_request: https://github.com/python/cpython/pull/29822 ___ Python tracker <https://bugs.python.org/issu

[issue19737] Documentation of globals() and locals() should be improved

2021-11-28 Thread jiahua wang
Change by jiahua wang : -- nosy: +180909 nosy_count: 5.0 -> 6.0 pull_requests: +28055 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29823 ___ Python tracker <https://bugs.python.org/i

[issue38619] [Doc] UUID.hex is lowercase

2021-11-28 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch nosy: +wangjiahua nosy_count: 5.0 -> 6.0 pull_requests: +28061 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29830 ___ Python tracker <https://bugs.python.org/i

[issue45114] bad example for os.stat

2021-11-29 Thread jiahua wang
Change by jiahua wang : -- keywords: +patch nosy: +wangjiahua nosy_count: 2.0 -> 3.0 pull_requests: +28074 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29845 ___ Python tracker <https://bugs.python.org/i

[issue28953] Use `raise from` when raising new IncompleteRead

2021-11-30 Thread jiahua wang
Change by jiahua wang : -- nosy: +wangjiahua nosy_count: 1.0 -> 2.0 pull_requests: +28088 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29861 ___ Python tracker <https://bugs.python.org/i

[issue28343] Bad encoding alias cp936 -> gbk: euro sign

2020-01-05 Thread Mingye Wang
Mingye Wang added the comment: b'\x80'.decode('cp936') is still broken on python 3.7. Working on a PR. -- versions: +Python 3.8, Python 3.9 ___ Python tracker <https://bug

[issue39732] plistlib should export UIDs in XML like Apple does

2020-02-23 Thread Mingye Wang
New submission from Mingye Wang : Although there is no native UID type in Apple's XML format, Apple's NSKeyedArchiver still works with it because it converts the UID to a dict of {"CF$UID": int(some_uint64_val)}. Plistlib should do the same. For a sample, see https://gi

[issue39732] plistlib should export UIDs in XML like Apple does

2020-02-23 Thread Mingye Wang
Change by Mingye Wang : -- keywords: +patch pull_requests: +17987 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18622 ___ Python tracker <https://bugs.python.org/issu

[issue39782] local varible referenced a Exception won't be collected in function

2020-02-28 Thread Wang Jie
New submission from Wang Jie : I referenced an Exception object in a function and found memory usage will increase constantly in the accident. I think it may be a bug. I wrote a minimal code to reproduce it. ```py from threading import local, Thread from time import sleep l = {} def t0

[issue39910] os.ftruncate on Windows should be sparse

2020-03-09 Thread Mingye Wang
New submission from Mingye Wang : Consider this interaction: cmd> echo > 1.txt cmd> python -c "__import__('os').truncate('1.txt', 1024 ** 3)" cmd> fsutil sparse queryFlag 1.txt Not only takes a long time as is typical for a zero-write, but also re

[issue39961] warning: this use of "defined" may not be portable (Mac OS)

2020-03-13 Thread Clem Wang
New submission from Clem Wang : pyenv install 3.8.2 results in: BUILD FAILED (OS X 10.15.3 using python-build 20180424) Inspect or clean up the working tree at /var/folders/jy/10md97xn3mz_x_b42l1r2r8cgp/T/python-build.20200313154805.37448 Results logged to /var/folders/jy

[issue39961] warning: this use of "defined" may not be portable (Mac OS)

2020-03-15 Thread Clem Wang
Clem Wang added the comment: Oops: forgot version numbers MacOS Catalina (10.15.13 19D76) 2.6 Ghz 6-Code Intel i7 32 GB RAM Homebrew 2.2.10 Homebrew/homebrew-core (git revision 58c0; last commit 2020-03-13) Homebrew/homebrew-cask (git revision ab52c7; last commit 2020-03-14) Not sure

[issue42527] UnicodeEncode error in BaseHttpRequestHandler class when send unicode data.

2020-12-01 Thread Yanfeng Wang
New submission from Yanfeng Wang : My environment: system: MacOS 10.15.x python: 3.9.0 when I inherit the BaseHTTPRequestHandler class, and call the send_error(error_di, msg) method in my own class's do_GET override function: the msg argument can't accept unicode string, an UnicodeE

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2021-02-23 Thread keven wang
keven wang added the comment: Agree w/ PR here to remove resource tracker unlinking as a quick fix: https://github.com/python/cpython/pull/15989 This will at least make the unlink behavior more controllable, which is not the case currently (on mac and linux). Would love to have this merged

[issue41352] FileIO.readall() should raise "UnsupportedOperation" when in "w" mode

2020-07-20 Thread Ziyi Wang
New submission from Ziyi Wang : Here are the two test cases: the one with FileIO.readall() fails def testReadWithWritingMode(self): r, w = os.pipe() w = os.fdopen(w, "w") w.write("hello") w.close() with io.FileIO(r, mode="w") as f:

[issue41437] SIGINT blocked by socket operations like recv on Windows

2020-07-29 Thread Zhiming Wang
New submission from Zhiming Wang : I noticed that on Windows, socket operations like recv appear to always block SIGINT until it's done, so if a recv hangs, Ctrl+C cannot interrupt the program. (I'm a *nix developer investigating a behavioral problem of my program on Windows,

[issue14527] How to link with a non-system libffi?

2020-09-14 Thread wang zhao
wang zhao added the comment: We managed to fixed on the server by following and got it sucuessfully compiled: -./configure --with-system-ffi LDFLAGS="-L /home/XXX/installs/libffi-3.3/lib64/" CPPFLAGS="-I /home/XXX/installs/libffi-3.3/include/" -LD_LIBRARY_PATH=$LD_LI

[issue42005] profile/cProfile CLI should catch BrokenPipeError

2020-10-10 Thread Zhiming Wang
New submission from Zhiming Wang : Since profile/cProfile CLI interface prints a sorted list of stats, using head to limit output to the most relevant entries should be a fairly natural thing to do. Unfortunately, BrokenPipeError isn't caught, causing quite a bit of pollution to the o

[issue42005] profile/cProfile CLI should catch BrokenPipeError

2020-10-10 Thread Zhiming Wang
Change by Zhiming Wang : -- keywords: +patch pull_requests: +21617 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22643 ___ Python tracker <https://bugs.python.org/issu

[issue39828] json.tool should catch BrokenPipeError

2020-10-10 Thread Zhiming Wang
Change by Zhiming Wang : -- nosy: +zmwangx nosy_count: 5.0 -> 6.0 pull_requests: +21618 pull_request: https://github.com/python/cpython/pull/22643 ___ Python tracker <https://bugs.python.org/issu

[issue14311] ConfigParser does not parse utf-8 files with BOM bytes

2012-03-14 Thread Sean Wang
New submission from Sean Wang : ConfigParser failed to parse a utf-8 file with BOM bytes('\xef\xbb\xbf'), it would raise ConfigParser.MissingSectionHeaderError. I think that other files with BOM would have the same problem; because the argument "SECTCRE" does not conside

[issue37258] Logging cache not cleared properly when setting level

2019-06-12 Thread David Wang
New submission from David Wang : If you call setLevel() on a subclass of logging.Logger, it does not reset the cache for that logger. This mean that if you make some logging calls, then call setLevel(), the logger still acts like it still has its old level. See the attached python file for a

[issue37678] Incorrect behaviour for user@password URI pattern in urlparse

2019-07-25 Thread Sean Wang
New submission from Sean Wang : When an IPV4 URL with 'username:password' in it, and the password contains special characters like #[]?, urlparse would act as unexcepted. example: urlparse('http://user:pass#?[w...@example.com:80/path') -- components: Library (L

[issue37780] A strange bug in eval() not present in Python 3

2019-08-06 Thread wang xuancong
New submission from wang xuancong : We all know that since: [False, True, False].count(True) gives 1 eval('[False, True, False].count(True)') also gives 1. However, in Python 2, eval('[False, True, False].count(True)', {}, Counter()) gives 3, while eval('[False

[issue36338] urlparse of urllib returns wrong hostname

2019-08-07 Thread Xianbo Wang
Xianbo Wang added the comment: Python2 urlparse.urlparse and urllib2.urlparse.urlparse have a similar IPv6 hostname parsing bug. >>> urlparse.urlparse('http://nevil.com[]').hostname >>> 'evil.com[' This is less practical to exploit since the parsed do

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-06-29 Thread winton Wang
New submission from winton Wang: datetime stiptime error according to "%U" format. Python version: 3.4.3, 2.7.13 ,3.6.0, 3.5.2 from datetime import datetime input: datetime.strptime('201726', '%Y%U') output: datetime.datetime(2007, 1, 1, 0, 0) -

[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-06-29 Thread winton Wang
winton Wang added the comment: the output: datetime.datetime(2017, 1, 1, 0, 0) I question about the week format if without the week of the weekday, the datetime should be the fist day of week as the default? -- ___ Python tracker <h

[issue30823] os.startfile("") craches Python 2.7, 3.4, 3.5

2017-07-01 Thread morris wang
New submission from morris wang: try... except... won't catch it. import os try: os.startfile("") except: pass crashes python, resulting in error message "python has stopped working" -- messages: 297487 nosy: morris wang priority: normal severity:

  1   2   3   >