[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:

[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 = multip

[issue15342] os.path.join behavior

2012-07-15 Thread Yongzhi Pan
Yongzhi Pan 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) Out[

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2012-10-11 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker <http://bugs.python.org/issue4749> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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,

[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

[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@p

[issue6829] Frendly error message when inheriting from function

2012-10-31 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker <http://bugs.python.org/issue6829> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16048] Tutorial-classes-remarks: replace paragraph

2012-11-03 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker <http://bugs.python.org/issue16048> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12634] Random Remarks in class documentation

2012-11-04 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker <http://bugs.python.org/issue12634> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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. -- assi

[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 '

[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

[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. -- a

[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:

[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@p

[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 fo

[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 <http://bugs.python.org/issue16

[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 <http://bugs.python.org/issue16

[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 "", line 1, in TypeError I fix this with a patch. After this: >&

[issue22379] Empty exception message of str.join

2014-09-11 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- versions: +Python 3.5 Added file: http://bugs.python.org/file36604/str_join_exception_message_1.diff ___ Python tracker <http://bugs.python.org/issue22

[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 <h

[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-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'

[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 <http://bugs.python.org/issue22379> ___ ___ Python-bugs-list mailin

[issue18885] handle EINTR in the stdlib

2013-12-10 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker <http://bugs.python.org/issue18885> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2013-12-17 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker <http://bugs.python.org/issue14228> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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

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

2014-11-03 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker <http://bugs.python.org/issue8350> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2015-07-29 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 "", line 1, in SystemError: Parent module '' not loaded, cannot perform relative import

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

2016-01-14 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker <http://bugs.python.org/issue18018> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 : -- nosy: +fossilet ___ Python tracker <http://bugs.python.org/issue14544> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 <http://bugs.python.org/is

[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 <http://bugs.python.org/issue23

[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 <http://bugs.python.org/issue23