[issue44687] io.BufferedReader:peek() closes underlying file, breaking peek/read expectations

2021-09-24 Thread Jun De
Jun De added the comment: Awesome! To be honest I was very inclined to add test cases for this edge case, but while some existing test cases use native objects like io.BytesIO, the one that our edge case uses is HTTPResponse from `urllib3.response.py`. Should I still go ahead with writing

[issue44687] io.BufferedReader:peek() closes underlying file, breaking peek/read expectations

2021-09-24 Thread Jun De
Jun De added the comment: Yeap Steve, I was thinking the same thing. I've taken the buffered data into consideration when checking if the file is closed in my fix, feel free to take a look and let me know what you think :) -- ___ Python tracker

[issue44687] io.BufferedReader:peek() closes underlying file, breaking peek/read expectations

2021-09-19 Thread Jun De
Change by Jun De : -- keywords: +patch nosy: +AngstyDuck nosy_count: 1.0 -> 2.0 pull_requests: +26859 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28457 ___ Python tracker <https://bugs.python.org/i

[issue44155] Race condition when using multiprocessing BaseManager and Pool in Python3

2021-05-24 Thread Jun
Change by Jun : -- keywords: +patch nosy: +junnplus nosy_count: 1.0 -> 2.0 pull_requests: +24924 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26332 ___ Python tracker <https://bugs.python.org/i

[issue43207] InspectLoader.is_package is not an abstract method

2021-02-12 Thread Jun
New submission from Jun : In the documentation of importlib: https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader It says InspectLoader.is_package is an abstract method while it is not in the implementation. @abc.abstractmethod decorator was removed with this commit

[issue38507] Improve the documentation of the nested list initialization

2019-10-17 Thread JUN-WEI SONG
JUN-WEI SONG added the comment: sorry that I did not notice it already documented -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38507] Improve the documentation of the nested list initialization

2019-10-17 Thread JUN-WEI SONG
New submission from JUN-WEI SONG : When I used the nested list, I need to initialize the nested list, so I used this expression: >>> nested_list = [[]] * 5 see also: https://stackoverflow.com/questions/12791501/python-initializing-a-list-of-lists So I later learned that such an e

[issue36988] zipfile: string IndexError on extract

2019-05-21 Thread JUN-WEI SONG
JUN-WEI SONG added the comment: The following output throws error when using unzip -t $ unzip -t file0.zip Output: Archive: file0.zip : mismatching "local" filename (zipfile_extract.pyUT^I), continuing with "central" filename version testing:

[issue36260] Zip Bomb vulnerability

2019-05-17 Thread JUN-WEI SONG
JUN-WEI SONG added the comment: Dear friends, We moved a little bit forward to improve the writing. :) -- ___ Python tracker <https://bugs.python.org/issue36

[issue36260] Zip Bomb vulnerability

2019-05-17 Thread JUN-WEI SONG
Change by JUN-WEI SONG : -- keywords: +patch pull_requests: +13288 stage: resolved -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue34509] Starting to use gcc-8 on CI

2019-05-16 Thread Jun Aruga
Jun Aruga added the comment: Sure, alright. Thanks for informing me. On Thu, 16 May 2019 at 00:08, Zachary Ware wrote: > > > Zachary Ware added the comment: > > We do now have at least one builder using GCC 8 (ware-gentoo-x86) and one > using GCC 9 (cstratak-fedor

[issue36260] Cpython/Lib vulnerability found and request a patch submission

2019-05-02 Thread JUN-WEI SONG
JUN-WEI SONG added the comment: Thank you very much for your reply. Based on discussions above, consensuses are improving the zipfile documentation. And we (JUN-WEI SONG & KunYu Chen) would like to work on this. With opinions of Serhiy Storchaka, Christian Heimes and the idea

[issue36502] The behavior of str.isspace() for U+00A0 and U+202F is different from what is documented

2019-04-02 Thread Jun
New submission from Jun : I was looking for a list of Unicode codepoints that str.isspace() returns true. According to https://docs.python.org/3/library/stdtypes.html#str.isspace, it's "Whitespace characters are those characters defined in the Unicode character database as “

[issue36260] Cpython/Lib vulnerability found and request a patch submission

2019-04-02 Thread JUN-WEI SONG
JUN-WEI SONG added the comment: Hello Python community, With Christian Heimes’ suggestion, we manipulate appropriate warning to inform users that they may encounter zip bomb issues when using the zipfile module. The warning we would like to add in the zipfile documentation is shown below

[issue36462] CVE-2019-9674 : zip bomb vulnerability in Lib/zipfile.py

2019-03-28 Thread JUN-WEI SONG
JUN-WEI SONG added the comment: Thanks to the python community, both of these issues are the same. I also think it's a good thing to make related documentation to reduce this type of problem rather than implementing it on a low-level zipfile module. Perhaps we can customize

[issue36260] Cpython/Lib vulnerability found and request a patch submission

2019-03-28 Thread JUN-WEI SONG
JUN-WEI SONG added the comment: Thank you python community, these two issues are indeed the same problem. I also think that it is good to make a related document to reduce such problems. -- stage: -> resolved status: -> closed ___ Python t

[issue36462] CVE-2019-9674 : zip bomb vulnerability in Lib/zipfile.py

2019-03-28 Thread JUN-WEI SONG
New submission from JUN-WEI SONG : Dear Python Community, we found a python module vulnerability during these days and we got a CVE number, CVE-2019-9674 after reported it to cve.mitre.org. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-9674 The reserved information of CVE-2019

[issue34509] Starting to use gcc-8 on CI

2018-08-26 Thread Jun Aruga
Jun Aruga added the comment: > it would be better to set up a buildbot running GCC 8, or switching one of > our existing workers to it. We want to keep the pre-merge CI as stable as > possible, and using a bleeding-edge compiler doesn't strike me as > particularly stable.

[issue34509] Starting to use gcc-8 on CI

2018-08-26 Thread Jun Aruga
Change by Jun Aruga : -- keywords: +patch pull_requests: +8418 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34509> ___ ___ Python-

[issue34509] Starting to use gcc-8 on CI

2018-08-26 Thread Jun Aruga
New submission from Jun Aruga : This ticket is from below conversation on python-dev mailing list. https://mail.python.org/pipermail/python-dev/2018-August/155011.html Right now the Python project Travis CI is running on gcc-4.8.4 for coverage testing. I want to replace it or add the latest

[issue31865] html.unescape does not work as per documentation

2017-10-24 Thread Jun Hui Lee
New submission from Jun Hui Lee <cardinle...@gmail.com>: html.unescape(s) Convert all named and numeric character references (e.g. , , ) But running this gives: >>> html.unescape(', , ') '>, >, ' -- assignee: docs@python components: Documentation messages: 304

[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2016-11-15 Thread Jun Wu
Jun Wu added the comment: haypo: The file.__iter__ EINTR issue may be better discussed as a separate bug report. It's not related to stdin or EOF or Windows. Since we have some EINTR fixes for Python 2.7.4, I think it's reasonable to fix the remaining EINTR issues for 2.7.13+. If I have read

[issue25634] Add a dedicated subclass for attribute missing errors

2015-11-19 Thread Jun Wang
Jun Wang added the comment: I think this is a common problem while using both __getattr__ and descriptor/property. A descriptor example: class Descriptor(): def __get__(self, instance, owner=None): raise AttributeError('Implicitly suppressed') class A(): d

[issue25634] Add a dedicated subclass for attribute missing errors

2015-11-16 Thread Jun Wang
New submission from Jun Wang: See this simple example: class A(): def __init__(self, x=None): self.x = x @property def t(self): return self.x.t def __getattr__(self, name): return 'default' print(A().t

process.popen with Japanese args = UTF8 JAVA

2014-03-08 Thread Jun Tanaka
Hello, I have tried to process.popen to run java program with Japanese language. test.java is compiled with utf8 '日本語' below means Japanese in Japanese. but it does not work. Anyone who knows this matter well. Please help. Jun python code sentence = '日本語' filename = 'japanese' java_file = 'test

Re: Python-list Digest, Vol 110, Issue 106

2012-11-14 Thread Jun Tanaka
soon. Jun -- http://mail.python.org/mailman/listinfo/python-list

Re: Get the IP address of WIFI interface

2011-05-16 Thread Jun Hu
Thanks, this code works perfectly in ubuntu 10.04. one question though, is dbus usually implemented in other distribution of linux? On Mon, May 16, 2011 at 12:57 PM, Anssi Saari a...@sci.fi wrote: Neal Becker ndbeck...@gmail.com writes: One possible solution in Linux is asking NetworkManager,

Re: Get the IP address of WIFI interface

2011-05-15 Thread Jun Hu
Thanks for the tip, it is really helpful! however the class of Win32_NetworkAdapterConfiguration doesn't include the interface type (you can NOT tell if it is a wifi interface), so I change the code a bit like following: import wmi wlan_int_id=None for nic in wmi.WMI().Win32_NetworkAdapter():

Re: Get the IP address of WIFI interface

2011-05-15 Thread Jun Hu
On Sun, May 15, 2011 at 2:14 PM, Andrew Berg bahamutzero8...@gmail.comwrote: One thing I found out about Win32_NetworkAdapterConfiguration is that it only contains /current/ information and not the stored info that it uses when making an initial connection (you can see and edit this info in

Re: Get IP address of WIFI interface

2011-05-14 Thread Jun Hu
Thanks, is there any other way without using external command? On Fri, May 13, 2011 at 10:41 PM, Ishwor Gurung ishwor.gur...@gmail.comwrote: Hi. On 14 May 2011 14:46, Far.Runner far.run...@gmail.com wrote: Hi Python Experts: There are two network interfaces on my laptop, one is 100M

How to get the IP address of the wifi interface?

2011-05-13 Thread Jun Hu
Hi python experts: There are two network interfaces on my laptop, one is 100M Ethernet, the other is wifi, both are connected and have IP addresses. The question is: how to get the ip address of WIFI interface without parsing the output of a shell command like ipconfig or ifconfig? OS: Windows or

Copy/paste through LAN

2009-07-22 Thread Jun
in advance. Jun -- http://mail.python.org/mailman/listinfo/python-list

Drawing in PDF

2009-06-29 Thread Jun
HEllo, I've a pdf file, and i want to draw some additional stuff on it, by example : some markup notation. Anyone has idea how to do that ? thank you in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Drawing in PDF

2009-06-29 Thread Jun
On Jun 30, 12:09 am, Emile van Sebille em...@fenx.com wrote: On 6/29/2009 2:51 PM Jun said... HEllo, I've a pdf file, and i want to draw some additional stuff on it, by example : some markup notation. Anyone has idea how to do that ? thank you in advance. ISTM that reportlab's

Re: Drawing in PDF

2009-06-29 Thread Jun
On Jun 30, 12:22 am, Emile van Sebille em...@fenx.com wrote: On 6/29/2009 3:14 PM Jun said... On Jun 30, 12:09 am, Emile van Sebille em...@fenx.com wrote: On 6/29/2009 2:51 PM Jun said... HEllo, I've a pdf file, and i want to draw some additional stuff on it, by example : some markup

Re: Biased random?

2007-08-27 Thread Jun-geun Park
Ivan Voras wrote: Hi, I have a list of items, and need to choose several elements from it, almost random. The catch is that the elements from the beginning should have more chance of being selected than those at the end (how much more? I don't care how the envelope of probability looks like

Re: Biased random?

2007-08-27 Thread Jun-geun Park
Jun-geun Park wrote: Ivan Voras wrote: Hi, I have a list of items, and need to choose several elements from it, almost random. The catch is that the elements from the beginning should have more chance of being selected than those at the end (how much more? I don't care how the envelope

Re: Threaded Design Question

2007-08-09 Thread Jun-geun Park
[EMAIL PROTECTED] wrote: Hi all! I'm implementing one of my first multithreaded apps, and have gotten to a point where I think I'm going off track from a standard idiom. Wondering if anyone can point me in the right direction. The script will run as a daemon and watch a given directory for