[issue34134] multiprocessing memory huge usage

2018-07-18 Thread Windson Yang
Change by Windson Yang : -- keywords: +patch pull_requests: +7859 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34134> ___ ___ Py

[issue34159] asyncio basic event loop stuck with no tasks scheduled or ready

2018-07-19 Thread Windson Yang
Windson Yang added the comment: Would you mind adding an example file? -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.org/issue34159> ___ ___

[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Windson Yang
Windson Yang added the comment: Hi, Orlando, this link maybe useful: https://devguide.python.org/documenting/ -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.org/issue34

[issue33635] OSError when using pathlib.Path.rglob() to list device files

2018-07-20 Thread Windson Yang
Windson Yang added the comment: I tried to fix this issue and I found this should be related to os.stat() in os.py. But I can't find the os.stat() API in the file, any ideas? -- nosy: +Windson Yang ___ Python tracker <https://bugs.py

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-20 Thread Windson Yang
Windson Yang added the comment: > A. This does not happen, creating a Pool, deleting it and collecting the > garbage, does not call terminate. Would you give me an example how you delete the Pool and collecting the garbage? If you use context manager, It will call terminate() function

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-21 Thread Windson Yang
Windson Yang added the comment: A patch would just add def __del__(self): self.terminate() in the Pool object. -- ___ Python tracker <https://bugs.python.org/issue34

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-22 Thread Windson Yang
Change by Windson Yang : -- nosy: +zach.ware ___ Python tracker <https://bugs.python.org/issue34172> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-22 Thread Windson Yang
Windson Yang added the comment: Add a __del__ method in the Pool class should work. But I'm not sure we should do this. -- ___ Python tracker <https://bugs.python.org/is

[issue29750] smtplib doesn't handle unicode passwords

2018-07-26 Thread Windson Yang
Windson Yang added the comment: @Vadim Pushtaev I also want to work on it. If you wanna work together. Maybe we can talk on zulipchat. :D -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.org/issue29

[issue33741] UnicodeEncodeError onsmtplib.login(MAIL_USER, MAIL_PASSWORD)

2018-08-26 Thread Windson Yang
Change by Windson Yang : -- pull_requests: +8410 ___ Python tracker <https://bugs.python.org/issue33741> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29750] smtplib doesn't handle unicode passwords

2018-08-26 Thread Windson Yang
Change by Windson Yang : -- keywords: +patch pull_requests: +8411 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue34552] Clarify built-in types comparisons

2018-08-30 Thread Windson Yang
New submission from Windson Yang : In https://docs.python.org/3.5/library/stdtypes.html#comparisons "some types (for example, function objects) support only a degenerate notion of comparison where any two objects of that type are unequal." We had some discussion at zulipchat alrea

[issue34552] Clarify built-in types comparisons

2018-09-02 Thread Windson Yang
Change by Windson Yang : -- keywords: +patch pull_requests: +8497 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34552> ___ ___ Py

[issue29750] smtplib doesn't handle unicode passwords

2018-09-02 Thread Windson Yang
Windson Yang added the comment: I added a pitch to support utf-8. -- ___ Python tracker <https://bugs.python.org/issue29750> ___ ___ Python-bugs-list mailin

[issue34576] SimpleHTTPServer: warn users on security

2018-09-04 Thread Windson Yang
Windson Yang added the comment: The SimpleHTTPServer module has been merged into http.server in Python 3. So we add this to python2 document? -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.org/issue34

[issue34753] Use coroutine object or coroutine function instead of coroutine

2018-09-20 Thread Windson Yang
New submission from Windson Yang : A PR https://github.com/python/cpython/pull/9408 solved an ambiguous problem about coroutine. Which led me to https://docs.python.org/3/library/asyncio-task.html#awaitables > Note that in this documentation the term “coroutine” can be used for two > c

[issue34753] Use coroutine object or coroutine function instead of coroutine

2018-09-20 Thread Windson Yang
Windson Yang added the comment: Sure, I found around 7 places may need to change, I can fix some of them right, and I will put the rest links which I'm not sure in the PR comment. -- ___ Python tracker <https://bugs.python.org/is

[issue34397] remove redundant overflow checks in tuple and list implementations

2018-09-21 Thread Windson Yang
Windson Yang added the comment: Hello, Tim Peters. I wonder why we need to add size_t here: assert((size_t)Py_SIZE(a) + (size_t)Py_SIZE(b) <= (size_t)PY_SSIZE_T_MAX); AFAIK, PY_SSIZE_T_MAX = ((Py_ssize_t)(((size_t)-1)>>1)) which is signed, either Py_SIZE(a) or Py_SIZE(b) is a

[issue34753] Use coroutine object or coroutine function instead of coroutine

2018-09-23 Thread Windson Yang
Change by Windson Yang : -- keywords: +patch pull_requests: +8928 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34753> ___ ___ Py

[issue34912] Update overflow checks in resize_buffer

2018-10-05 Thread Windson Yang
New submission from Windson Yang : In [resize_buffer](https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Modules/_io/stringio.c#L85) /* For simplicity, stay in the range of the signed type. Anyway, Python doesn't allow strings to be longer than

[issue34965] Python on Docker container using flask is going down after sometime

2018-10-12 Thread Windson Yang
Windson Yang added the comment: Hello, Srikanth, We can't fix/find the bug by the info you give, Would you mind provide the traceback log after crashing? -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.org/is

[issue35118] Add peek() or first() method in queue

2018-10-30 Thread Windson Yang
New submission from Windson Yang : I found other languages like Java and C++ have the method to access the first value in Queue like first() and peek(). Since we use deque_ to create Queue now, it's easy to implement in python using the index. Otherwise, we can add this to the docume

[issue35117] set.discard should return True or False based on if element existed.

2018-10-30 Thread Windson Yang
Windson Yang added the comment: I guess we can implement using ref_count? However, I agreed "The use of variables that haven't been defined or set (implicitly or explicitly) is almost always a bad thing in any language since it indicates that the logic of the program hasn'

[issue35118] Add peek() or first() method in queue

2018-10-30 Thread Windson Yang
Windson Yang added the comment: For deque, we can add peek() function to deque or just make it clear in the document that we can use deque[0] to access the first element(I can only find index method in the document) For Queue, I found Java and C++ has the function like first() or peek

[issue34965] Python on Docker container using flask is going down after sometime

2018-10-31 Thread Windson Yang
Windson Yang added the comment: Hello, Srikanth, I think you have to look through the docker documents like https://docs.docker.com/config/containers/logging/ -- ___ Python tracker <https://bugs.python.org/issue34

[issue35118] Add peek() or first() method in queue

2018-10-31 Thread Windson Yang
Change by Windson Yang : -- keywords: +patch pull_requests: +9576 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35118> ___ ___ Py

[issue34912] Update overflow checks in resize_buffer

2018-10-31 Thread Windson Yang
Windson Yang added the comment: Sorry, Stefan Behnel, I still don't get it. alloc will always bigger than size after the if else case: if (size < alloc / 2) { /* Major downsize; resize down to exact size. */ alloc = size + 1; } else if (size

[issue35120] SSH tunnel support to ftp lib

2018-10-31 Thread Windson Yang
Windson Yang added the comment: Hello, Mohit Sharma. Would you mind adding more details about the bug? -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.org/issue35

[issue35105] Document that CPython accepts "invalid" identifiers

2018-10-31 Thread Windson Yang
Windson Yang added the comment: I agreed we should document it, it' not obvious to me at least. -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.org/is

[issue35113] inspect.getsource returns incorrect source for classes when class definition is part of multiline strings

2018-11-01 Thread Windson Yang
Windson Yang added the comment: Yes, the code located at https://github.com/python/cpython/blob/7cd25434164882c2093ea41ccfc7b95a05cd5cbd/Lib/inspect.py#L794 I think to use a comment status var would be a solution, Do you have any idea to fix it? -- nosy: +Windson Yang

[issue35140] encoding problem: gbk

2018-11-01 Thread Windson Yang
Windson Yang added the comment: If I understand your question correctly, you should save the file(the one contain Chinese chars) with GBK encoding using your editor. Otherwise, your editor would save it using the default encoding which led to python can't decode it corr

[issue35140] encoding problem: gbk

2018-11-02 Thread Windson Yang
Windson Yang added the comment: Thank you, Lin. Can you reproduce on your machine, I guess it is related to terminal encoding or text file ending. However, I can't reproduce on macOS. -- ___ Python tracker <https://bugs.python.org/is

[issue35140] encoding problem: gbk

2018-11-02 Thread Windson Yang
Windson Yang added the comment: It's fine @anmikf, keep practice :D. Let's recap what happened: Run encoding_problem_gbk.py on Windows10 using Python 3.7.0 will cause "SyntaxError: encoding problem: gbk". But it will run as expected if 1. The file has less than less than

[issue35140] encoding problem: coding:gbk cause syntaxError

2018-11-02 Thread Windson Yang
Change by Windson Yang : -- title: encoding problem: gbk -> encoding problem: coding:gbk cause syntaxError ___ Python tracker <https://bugs.python.org/issu

[issue35146] Bad Regular Expression Broke re.findall()

2018-11-02 Thread Windson Yang
Windson Yang added the comment: The last line "re.error: nothing to repeat at position 0" shows that you should not put raw * as the first element, use \* instead. -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.o

[issue35121] Cookie domain check returns incorrect results

2018-11-02 Thread Windson Yang
Windson Yang added the comment: I wonder https://github.com/python/cpython/blob/master/Lib/test/test_http_cookiejar.py#L420 ("http://foo.bar.com/";, "com", True), ("http://foo.com/";, "com", True), are expected b

[issue35131] Cannot access to customized paths within .pth file

2018-11-02 Thread Windson Yang
Windson Yang added the comment: Hello, Valentin Zhao, do you have time to fix it? Or I can create a PR -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.org/issue35

[issue35105] Document that CPython accepts "invalid" identifiers

2018-11-08 Thread Windson Yang
Windson Yang added the comment: I try to create a PR for it. Should we add 'CPython implementation detail' at the document? Because this happens at cpython as well as pypy. BTW, where should we add the document? I have two choices. * https://docs.python.org/3/reference/datamodel.h

[issue35131] Cannot access to customized paths within .pth file

2018-11-08 Thread Windson Yang
Windson Yang added the comment: I tried to create a PR for it, However, I don't know how to handle the code at https://github.com/python/cpython/blob/d4c76d960b/Lib/site.py#L159 So how to check UnicodeDecodeError when we just open the file, I use readlines() but it may use too many m

[issue35201] Recursive '**' matches non-existent directories.

2018-11-09 Thread Windson Yang
Change by Windson Yang : -- versions: +Python 3.5, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue35201> ___ ___ Python-bugs-list mailin

[issue34628] urllib.request.urlopen fails when userinfo is present in URL

2018-11-09 Thread Windson Yang
Windson Yang added the comment: First, we can add some check at https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Lib/http/client.py#L871 and raise an error if the URL contains userinfo part. Second, we should catch some exception in urllib.request.urlopen, if

[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2018-11-12 Thread Windson Yang
Windson Yang added the comment: I will work on it today :D -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.org/issue25438> ___ ___ Python-bug

[issue35250] Minor parameter documentation mismatch for turtle

2018-11-15 Thread Windson Yang
Windson Yang added the comment: Yes, you are right. A quick fix would change 'num' to 'btn' in parameters in https://docs.python.org/3.3/library/turtle.html?highlight=turtle#turtle.onclick. I think they are the same thing. Do you want to create a patch? --

[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2018-11-16 Thread Windson Yang
Change by Windson Yang : -- keywords: +patch, patch, patch pull_requests: +9824, 9825, 9826 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2018-11-16 Thread Windson Yang
Change by Windson Yang : -- keywords: +patch pull_requests: +9824 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2018-11-16 Thread Windson Yang
Change by Windson Yang : -- keywords: +patch, patch pull_requests: +9824, 9826 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35267] reproducible deadlock with multiprocessing.Pool

2018-11-16 Thread Windson Yang
Windson Yang added the comment: Hello, dzhu. I can reproduce on my OSX, since you already dive into the code, do you have any idea to fix or improve it? -- nosy: +Windson Yang ___ Python tracker <https://bugs.python.org/issue35

[issue19935] IPv6 urlparse error on python 2.6

2013-12-09 Thread Yu Yang
New submission from Yu Yang: Actually, there is a bug which has been fixed this issue on python 2.7 and python 3.3. http://bugs.python.org/issue2987. Open this issue aims for back port this fix to python 2.6. -- components: Library (Lib) messages: 205657 nosy: yuyangbj priority

[issue19935] IPv6 urlparse error on python 2.6

2013-12-09 Thread Yu Yang
Yu Yang added the comment: As the OpenStack support python 2.6, python 2.7 and python 3.3, and IPv6 management network is supported by OpenStack, so we need to back port urlparse problem for IPv6 to python 2.6, otherwise there will be limitation on python 2.6

[issue19935] IPv6 urlparse error on python 2.6

2013-12-09 Thread Yu Yang
Yu Yang added the comment: @Christian Heimes, thanks for your response. -- ___ Python tracker <http://bugs.python.org/issue19935> ___ ___ Python-bugs-list mailin

[issue6750] threading issue in __builtins__.print

2009-08-21 Thread Jackson Yang
New submission from Jackson Yang : # Bug Description In a multi-threaded environment, the Win32 Python3000 built-in function "print" may give the output several times. # How to Reproduce: import threading event = threading.Event() class Test(threading.Thread): def __init__

[issue7137] Socket documentation not updated

2009-10-14 Thread Yang Zhang
New submission from Yang Zhang : e.g., the doc still says socket.makefile([mode[, bufsize]]), which aren't the actual python3 params. -- assignee: georg.brandl components: Documentation messages: 94070 nosy: georg.brandl, yang severity: normal status: open title: Socket document

[issue7137] Socket documentation not updated

2009-10-14 Thread Yang Zhang
Changes by Yang Zhang : -- versions: +Python 3.2 -Python 3.1 ___ Python tracker <http://bugs.python.org/issue7137> ___ ___ Python-bugs-list mailing list Unsub

[issue7145] UTF-16 BOM is not written by socket.makefile (but is expected by read)

2009-10-15 Thread Yang Zhang
New submission from Yang Zhang : When I call s.makefile('r',encoding='utf-16').read(), this expects a BOM, but s.makefile('w',encoding='utf-16').write('hello') doesn't produce it. This is asymmetric. BTW is there a way to prevent the re

[issue7145] UTF-16 BOM is not written by socket.makefile (but is expected by read)

2009-10-15 Thread Yang Zhang
Yang Zhang added the comment: To answer my own question: specify UTF-16BE or UTF-16LE -- ___ Python tracker <http://bugs.python.org/issue7145> ___ ___ Python-bug

[issue6328] login() function failed in smtplib with message "argument 1 must be bytes or buffer, not str"

2009-06-23 Thread Gehua Yang
New submission from Gehua Yang : Hi folks, I encountered the following error with this Python code snippet. (I ran it with Python 3.0.1). Judging from the error as shown in IDLE debugger, the error was buried inside python. try: server = smtplib.SMTP(EmailConfig.smtpServerName

[issue22908] ZipExtFile in zipfile can be seekable

2014-11-20 Thread Iridium Yang
New submission from Iridium Yang: The ZipExtFile class in zipfile module does not provide a seek method like GzipFile. As a result, it is hard to manipulate files without extract all the content. For example, a very large tar file compressed with zip. The TarFile module can operate on file

[issue25258] HtmlParser doesn't handle void element tags correctly

2015-09-28 Thread Chenyun Yang
New submission from Chenyun Yang: For void elements such as (, ), there doesn't need to have xhtml empty end tag. HtmlParser which relies on the XHTML empty end syntax failed to handle this situation. from HTMLParser import HTMLParser # create a subclass and override the handler me

[issue25258] HtmlParser doesn't handle void element tags correctly

2015-09-29 Thread Chenyun Yang
Chenyun Yang added the comment: I think the bug is mostly about inconsistent behavior: and shouldn't be parsed differently. This causes problem in the case that the parser won't be able to know consistently whether it has ended the visit of tag. I propose one fix which will

[issue25258] HtmlParser doesn't handle void element tags correctly

2015-10-02 Thread Chenyun Yang
Chenyun Yang added the comment: the example you give for is a different case. , are void elements which are allowed to have no close tag; without is a browser implementation detail, most browser autocompletes . Without the parser calls the handle_endtag(), the client code which uses

[issue25258] HtmlParser doesn't handle void element tags correctly

2015-10-02 Thread Chenyun Yang
Chenyun Yang added the comment: I am fine with either handle_startendtag or handle_starttag, The issue is that the behavior is consistent for the two equally valid syntax ( and are handled differently); this inconsistent cannot be fixed from the inherited class as (handle_* calls are

[issue25258] HtmlParser doesn't handle void element tags correctly

2015-10-02 Thread Chenyun Yang
Chenyun Yang added the comment: Correct for previous comment, consistent -> not consistent On Fri, Oct 2, 2015 at 1:16 PM, Chenyun Yang wrote: > > Chenyun Yang added the comment: > > I am fine with either handle_startendtag or handle_starttag, > > The issue is that the b

[issue25258] HtmlParser doesn't handle void element tags correctly

2015-10-03 Thread Chenyun Yang
Chenyun Yang added the comment: handle_startendtag is also called for non-void elements, such as , so the override example will break in those situation. The compatible patch I proposed right now is just one liner checker: # http://www.w3.org/TR/html5/syntax.html#void-elements <ht

[issue26617] Assertion failed in gc with __del__ and weakref

2016-03-22 Thread Yang Ke
Yang Ke added the comment: The crash may be raised on both Windows OS and Linux. We got crashed under Ubuntu 14.04, while a similar issue was found https://bugs.python.org/issue23187#msg238139 last year under Windows OS. We actually raise such bug working on a program with asyncio and

[issue9681] small typo in online documentation

2010-08-25 Thread Winston C. Yang
New submission from Winston C. Yang : See http://docs.python.org/library/subprocess.html 17.1.1.2. Exceptions containing traceback information from the child[']s point of view -- messages: 114901 nosy: wcyang priority: normal severity: normal status: open title: small typo in o

[issue10172] code block has no syntax coloring

2010-10-22 Thread Winston C. Yang
New submission from Winston C. Yang : The following code block in http://docs.python.org/tutorial/errors.html has no syntax coloring: import sys try: f = open('myfile.txt') s = f.readline() i = int(s.strip()) except IOError as (errno, strerror): print "I/O

[issue21502] freeze.py not working properly on Mac OSX 10.9

2014-05-13 Thread Jiang-Nan Yang
New submission from Jiang-Nan Yang: Command: python3.4 /Library/Frameworks/Python.framework/Versions/3.4/share/doc/python3.4/examples/Tools/freeze/freeze.py okcointrade.py Error: Reporting needed directory %s not found Basically the problem is on lines 235~239: config should be config-3.4m

[issue21502] freeze.py not working properly on Mac OSX 10.9

2014-05-13 Thread Jiang-Nan Yang
Changes by Jiang-Nan Yang : -- nosy: -ronaldoussoren, yjiangnan versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue21502> ___ ___ Python-bug

<    1   2   3