[issue33081] multiprocessing Queue leaks a file descriptor associated with the pipe writer

2019-03-22 Thread Yongzhi Pan
Yongzhi Pan added the comment: On macOS with Python 3.7.2, using pitrou's code, I suspect Python does not delete some semaphores used by Queue. Run these: import multiprocessing import os import threading os.system('lsof -p {} | grep -v txt'.format(os.getpid())) q = multiprocessing.Queue

[issue33081] multiprocessing Queue leaks a file descriptor associated with the pipe writer

2019-03-21 Thread Yongzhi Pan
Change by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker <https://bugs.python.org/issue33081> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2016-01-14 Thread Yongzhi Pan
Changes by Yongzhi Pan <panyong...@gmail.com>: -- nosy: +fossilet ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18018> ___ __

[issue24752] SystemError when importing from a non-package directory

2015-07-30 Thread Yongzhi Pan
New submission from Yongzhi Pan: In an empty dir, e.g. Desktop, the following import raises SystemError: from . import foo Traceback (most recent call last): File stdin, line 1, in module SystemError: Parent module '' not loaded, cannot perform relative import The documentation says

[issue23589] Redundant sentence in FAQ

2015-03-06 Thread Yongzhi Pan
Yongzhi Pan added the comment: Or: In Python, variables inside a function that are only referenced but not assigned are implicitly global.? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23589

[issue23589] Redundant sentence in FAQ

2015-03-06 Thread Yongzhi Pan
Yongzhi Pan added the comment: What about changing the first sentence to: In Python, variables that are only referenced but not assigned inside a function are implicitly global.? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue23589] Redundant sentence in FAQ

2015-03-05 Thread Yongzhi Pan
New submission from Yongzhi Pan: In https://docs.python.org/3/faq/programming.html#what-are-the-rules-for-local-and-global-variables-in-python, two sentences of essentially the same meaning exist. I try to remove this redundancy. -- assignee: docs@python components: Documentation

[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2015-03-05 Thread Yongzhi Pan
Changes by Yongzhi Pan panyong...@gmail.com: -- nosy: +fossilet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14544 ___ ___ Python-bugs-list

[issue23589] Redundant sentence in FAQ

2015-03-05 Thread Yongzhi Pan
Yongzhi Pan added the comment: Updated diff as Raymond's wording. -- Added file: http://bugs.python.org/file38340/faq_fix_1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23589

[issue8350] Document lack of support for keyword arguments in C functions

2014-11-03 Thread Yongzhi Pan
Changes by Yongzhi Pan panyong...@gmail.com: -- nosy: +fossilet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8350 ___ ___ Python-bugs-list

[issue22379] Empty exception message of str.join

2014-09-27 Thread Yongzhi Pan
Yongzhi Pan added the comment: Do the patches still have problems? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22379 ___ ___ Python-bugs-list

[issue22379] Empty exception message of str.join

2014-09-16 Thread Yongzhi Pan
Yongzhi Pan added the comment: I tested it and find str of an exception does not contain the exception type: a = TypeError() str(a) '' a = TypeError('b', 3) a.args ('b', 3) str(a) ('b', 3) Am I missing some other circumstances? -- ___ Python

[issue22379] Empty exception message of str.join

2014-09-15 Thread Yongzhi Pan
Yongzhi Pan added the comment: I have updated the test for 3.5. The related tests pass after the patching. Are they OK now? There are two caveats: I did not update test_bytes in 2.7, and I did not add checkraises in test_bytes in 3.5. -- Added file: http://bugs.python.org/file36621

[issue22379] Empty exception message of str.join

2014-09-12 Thread Yongzhi Pan
Changes by Yongzhi Pan fossi...@users.sourceforge.net: -- versions: +Python 3.5 Added file: http://bugs.python.org/file36604/str_join_exception_message_1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22379

[issue22379] Empty exception message of str.join

2014-09-12 Thread Yongzhi Pan
Yongzhi Pan added the comment: I updated the patches. Since exceptions in 3 do not have a message attribute, I did not check them. Are they OK? -- Added file: http://bugs.python.org/file36605/test_for_35.diff ___ Python tracker rep

[issue22379] Empty exception message of str.join

2014-09-09 Thread Yongzhi Pan
New submission from Yongzhi Pan: In the 2.7 branch, the exception message of str.join is missing when the argument is non-sequence: ' '.join(None) Traceback (most recent call last): File stdin, line 1, in module TypeError I fix this with a patch. After this: ' '.join(None) Traceback

[issue14228] It is impossible to catch sigint on startup in python code

2013-12-17 Thread Yongzhi Pan
Changes by Yongzhi Pan fossi...@users.sourceforge.net: -- nosy: +fossilet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14228 ___ ___ Python-bugs

[issue18885] handle EINTR in the stdlib

2013-12-10 Thread Yongzhi Pan
Changes by Yongzhi Pan fossi...@users.sourceforge.net: -- nosy: +fossilet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18885 ___ ___ Python-bugs

[issue12634] Random Remarks in class documentation

2013-04-24 Thread Yongzhi Pan
Yongzhi Pan added the comment: It may be worth to noting that when creating property attribute using the property decorator, we may tend to name the method using nouns, like here: http://docs.python.org/2/library/functions.html#property This is when I once overided data attribute with method

[issue16438] Numeric operator predecence confusing

2012-11-21 Thread Yongzhi Pan
Yongzhi Pan added the comment: One possible solution: We do not list priorities of the operations, instead link to the precedence table in the language reference. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16438

[issue16470] Backport set and dictionary comprehensions in tutorial to 2.7

2012-11-16 Thread Yongzhi Pan
Yongzhi Pan added the comment: I updated the patch according to the code review. Hope now it is OK. -- Added file: http://bugs.python.org/file27995/set_and_dict_comprehensions_1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue2333] Backport set and dict comprehensions

2012-11-14 Thread Yongzhi Pan
Yongzhi Pan added the comment: I think metal means that the different ways set is repr'd in 2.7 and 3. In 2.7: In [9]: a = {x for x in 'abracadabra' if x not in 'abc'} In [10]: repr(a) Out[10]: set(['r', 'd']) In 3.2: In [6]: a = {x for x in 'abracadabra' if x not in 'abc'} In [7]: repr

[issue2333] Backport set and dict comprehensions

2012-11-13 Thread Yongzhi Pan
Yongzhi Pan added the comment: Great they are backported to 2.7. Dictionary and set comprehensions are not documented in the tutorial of 2.7, though they are in the language reference. Is it OK to add these to the tutorial? I've uploaded a patch. -- nosy: +fossilet Added file: http

[issue16470] Backport set and dictionary comprehensions in tutorial to 2.7

2012-11-13 Thread Yongzhi Pan
New submission from Yongzhi Pan: Dictionary and set comprehensions are backported to 2.7 in issue #2333. The are not documented in the tutorial of 2.7, though they are in the language reference. Is it OK to add these to the tutorial? I've uploaded a patch. -- assignee: docs@python

[issue16435] Python 3 doc link to Python 2 FAQ

2012-11-08 Thread Yongzhi Pan
New submission from Yongzhi Pan: http://docs.python.org/3/tutorial/whatnow.html The last paragraph links to http://www.python.org/doc/faq/, which defaults to Python 2 FAQ. -- assignee: docs@python components: Documentation messages: 175156 nosy: docs@python, fossilet priority: normal

[issue16436] Missing anchor in doc

2012-11-08 Thread Yongzhi Pan
New submission from Yongzhi Pan: http://docs.python.org/3/library/functions.html#func-frozenset http://docs.python.org/3/library/functions.html#func-set frozenset and set function have no links to their definitions. Also the anchor name is prefixed with func, which is different to other

[issue16437] issubclass doc improvement

2012-11-08 Thread Yongzhi Pan
New submission from Yongzhi Pan: http://docs.python.org/3/library/functions.html#issubclass classinfo may be a tuple of class objects. I suggest make it clear like isinstance, use something like this: classinfo may be a tuple of class objects and such tuples. -- assignee: docs@python

[issue16438] Numeric operator predecence confusing

2012-11-08 Thread Yongzhi Pan
New submission from Yongzhi Pan: http://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex All numeric types (except complex) support the following operations, sorted by ascending priority. It list '-' after '+', '/' after '*'. That is to mean '-' has higher precedence

[issue16439] Code not collapsed correctly

2012-11-08 Thread Yongzhi Pan
New submission from Yongzhi Pan: http://docs.python.org/3/library/stdtypes.html#str.title The second snippets is not collapsed correctly. -- assignee: docs@python components: Documentation messages: 175171 nosy: docs@python, fossilet priority: normal severity: normal status: open title

[issue16438] Numeric operator predecence confusing

2012-11-08 Thread Yongzhi Pan
Yongzhi Pan added the comment: I mean the text at the first link need fix. '+' and '-' are not on the same row. And the doc says: sorted by ascending priority, that means they have ascending priority. The table in the reference is just right

[issue16440] Exception type

2012-11-08 Thread Yongzhi Pan
New submission from Yongzhi Pan: http://docs.python.org/3/library/stdtypes.html#methods Attempting to set a method attribute results in a TypeError being raised. But in the example, if we do c.method.whoami = 'c', we get AttributeError instead of TypeError. -- assignee: docs@python

[issue12634] Random Remarks in class documentation

2012-11-04 Thread Yongzhi Pan
Changes by Yongzhi Pan fossi...@users.sourceforge.net: -- nosy: +fossilet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12634 ___ ___ Python-bugs

[issue16048] Tutorial-classes-remarks: replace paragraph

2012-11-03 Thread Yongzhi Pan
Changes by Yongzhi Pan fossi...@users.sourceforge.net: -- nosy: +fossilet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16048 ___ ___ Python-bugs

[issue6829] Frendly error message when inheriting from function

2012-10-31 Thread Yongzhi Pan
Changes by Yongzhi Pan fossi...@users.sourceforge.net: -- nosy: +fossilet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6829 ___ ___ Python-bugs

[issue16294] 8 space indent in tutorial

2012-10-21 Thread Yongzhi Pan
New submission from Yongzhi Pan: http://docs.python.org/py3k/tutorial/stdlib2.html#weak-references In the code example, the two class funtions' bodies have indents of 8 spaces. All other indents in the docs are 4 spaces. I suggest here we use 4 spaces also. -- assignee: docs@python

[issue16265] Code sample does not collapse correctly

2012-10-17 Thread Yongzhi Pan
New submission from Yongzhi Pan: http://docs.python.org/py3k/tutorial/inputoutput.html#fancier-output-formatting In the last but second code sample in that section, the code is not correctly colored and cannot be correctly collapsed. Expanded: table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab

[issue16266] Typo in tutorial

2012-10-17 Thread Yongzhi Pan
New submission from Yongzhi Pan: http://docs.python.org/py3k/tutorial/inputoutput.html#reading-and-writing-files The text: In text mode, the default is to convert platform-specific line endings (\n on Unix, \r\n on Windows) to just \n on reading and \n back to platform-specific line endings

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2012-10-11 Thread Yongzhi Pan
Changes by Yongzhi Pan fossi...@users.sourceforge.net: -- nosy: +fossilet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4749 ___ ___ Python-bugs

[issue15342] os.path.join behavior

2012-07-15 Thread Yongzhi Pan
Yongzhi Pan fossi...@users.sourceforge.net added the comment: I suggest append An empty last part will result in a path that ends with a separator or something similar to the docstring, though it is already in the HTML documentation. Suppose someone does this like me: In [10]: join('a', sep