[issue8297] AttributeError message text should include module name

2010-04-08 Thread Ray.Allen
Ray.Allen added the comment: The unittest of this patch. -- Added file: http://bugs.python.org/file16815/issue_8297_test.py ___ Python tracker <http://bugs.python.org/issue8

[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-08 Thread Ray.Allen
Ray.Allen added the comment: Yes. I think if the argument object's reference count is increased because of the exception traceback or other cases, it has nothing to do with the PyObject_CallObject itself. Both of the Py_INCREF(arg) and Py_DECREF(arg) will always run once throug

[issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build

2010-04-09 Thread Ray.Allen
Ray.Allen added the comment: Yes, I agree with you, this may be a bug? Seemingly, the sysconfig.get_python_lib() should act just like the get_python_inc() function, return "[prefix]/lib/python[version]" in case of "python_build" flag is False, and "[prefix]/Lib&

[issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build

2010-04-09 Thread Ray.Allen
Changes by Ray.Allen : -- versions: +Python 2.7 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue6087> ___ ___ Python-bugs-list mailing list Unsub

[issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build

2010-04-09 Thread Ray.Allen
Changes by Ray.Allen : -- versions: +Python 2.6, Python 3.2 ___ Python tracker <http://bugs.python.org/issue6087> ___ ___ Python-bugs-list mailing list Unsub

[issue8376] Tutorial offers dangerous advice about iterator s: “__iter__() can just return self”

2010-04-12 Thread Ray.Allen
Changes by Ray.Allen : -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue8376> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue8376] Tutorial offers dangerous advice about iterator s: “__iter__() can just return self”

2010-04-12 Thread Ray.Allen
Ray.Allen added the comment: I think there is not much ploblem. Please notice this sentence in the previous paragraph in the toturial : "Behind the scenes, the for statement calls iter() on the container object. The function returns an iterator object that defines the method next()

[issue8395] shutil.copytree() add a copy_func parameter.

2010-04-13 Thread Ray.Allen
New submission from Ray.Allen : The shutil.copytree() function copies the whole tree recursively, and copy one single regular file with copy2(). I hope it can be more powerful(), that is, allow specifying a customerized copy function, rather than copy2(). To be specific, add an optional

[issue8395] shutil.copytree() add a copy_func parameter.

2010-04-14 Thread Ray.Allen
Ray.Allen added the comment: Thanks for your help! I see the 'ignore' parameter, but I need not just ignore some file, but also treat some file totally differently, for example, changing file name, or replace some text in the destin

[issue8389] Incomprehensible import error

2010-04-14 Thread Ray.Allen
Ray.Allen added the comment: The 'as' trigger some more instructions after import, not just renaming the loaded file name, to be specific in your example is, load attribute 'b' from 'a', and then load attribute 'c' from 'b'. 'import

[issue8438] Codecs: "surrogateescape" error handler in Python 2.7

2010-04-18 Thread Ray.Allen
New submission from Ray.Allen : According to PEP 383, the new "surrogateescape" error handler of codecs should begin to appear since Python3.1, but in the trunk I found some code have already used it: Modules/_io/fileio.c: static int fileio_init(PyObject *oself, PyObject *args

[issue8410] Fix emulated lock to be 'fair'

2010-04-19 Thread Ray.Allen
Ray.Allen added the comment: Hi, krisvale: > Since the exact mechanics seem to be unclair to many, let me just step you > through the series of events. > 1) A has the lock, B is waiting for it. the bit is "set". > 2) A releases the lock: Clears the bit, signals the c

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-04-25 Thread Ray.Allen
Changes by Ray.Allen : -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue7946> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue8705] shutil.rmtree with empty filepath

2010-05-13 Thread Ray.Allen
Ray.Allen added the comment: Tested on Debian 5, also not occurs. -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue8705> ___ ___ Python-bug

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2010-05-14 Thread Ray.Allen
Ray.Allen added the comment: Yes, I saw the " --> --> .. So the hole page is not displayed correctly! Is there any problem with me? -- nosy: +ysj.ray ___ Python tracker <http://bugs.python

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-14 Thread Ray.Allen
Ray.Allen added the comment: This is really a bug, but why it's not fixed during such a long time? Since trentm's python_difflib_no_eol.patch patch failed against the current trunk, I modified it to work again, also a patch against py3k. -- nosy: +ysj.ray Added

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-14 Thread Ray.Allen
Changes by Ray.Allen : Added file: http://bugs.python.org/file17333/issue_2142_py3k.diff ___ Python tracker <http://bugs.python.org/issue2142> ___ ___ Python-bugs-list m

[issue8736] *= is undocumented for lists

2010-05-17 Thread Ray.Allen
New submission from Ray.Allen : Does *= need document? I think the documentation of * for all sequence type can already cover the *= usage. -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue8

[issue8745] zipimport is a bit slow

2010-05-18 Thread Ray.Allen
Ray.Allen added the comment: When I perform some test on debian-5.0, I see the timing results almost the same before and after apply your patch(I modified the patch to against the trunk). Could you give some test result on windows? I can't see the speedups on debian-5.0. --

[issue8762] default value in constructor not unique across objects

2010-05-18 Thread Ray.Allen
Ray.Allen added the comment: Here is the explanation from Python Language Reference 7.6: Function Definitions """ When one or more top-level parameters have the form parameter = expression, the function is said to have ``default parameter values.'' For a parameter w

[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2010-05-19 Thread Ray.Allen
Changes by Ray.Allen : -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue8070> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue8770] Make 'python -m sysconfig' print something useful

2010-05-19 Thread Ray.Allen
Ray.Allen added the comment: Add get_paths()'s output seems reasonable and simple enough, also we could make the output format prettier. -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/i

[issue8774] 0xe7 in ``heapq.__about__`` causes badness

2010-05-20 Thread Ray.Allen
Ray.Allen added the comment: This is the problem with module tabnanny, it always tries to read the py source file as a platform-dependent encoded text module, that is, open the file with builtin function "open()", and with no encoding parameters. It doesn't parse the encodin

[issue8774] 0xe7 in ``heapq.__about__`` causes badness

2010-05-20 Thread Ray.Allen
Ray.Allen added the comment: I add "tim_one" to nosy list since I found this name in Misc/maintainers:tabnanny. Sorry if I did something improper. If this is really a problem, I'm glad to apply a patch for it. Thanks! -- nosy: +tim_one ___

[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-21 Thread Ray.Allen
Ray.Allen added the comment: pakal wrote: """ In test_fileio, one of the tests wants to ensure writing to closed raw streams fails, but it actually tries to write an unicode string """ I don't understand. Isn't b'xxx' and 'xxx' the s

[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-22 Thread Ray.Allen
Ray.Allen added the comment: Yes, I saw that, thanks for explanation! So I work a patch against the trunk, including modification of fileio_write(), bufferedwriter_write() and test_fileio.py. -- Added file: http://bugs.python.org/file17436/issue_8765.diff

[issue1368368] prompt_user_passwd() in FancyURLopener masks 401 Unauthorized error page

2010-05-23 Thread Ray.Allen
Ray.Allen added the comment: Since urllib.urlopen() is removed in py3k, and is intended to be replaced by urllib2.urlopen(), I think we'd better just leave as it is. -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issu

[issue6715] xz compressor support

2010-05-25 Thread Ray.Allen
Changes by Ray.Allen : -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue6715> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2010-05-25 Thread Ray.Allen
Ray.Allen added the comment: Date and Datetime comparison is not defined and not documented, and until we find a nice way to implement the comparison, we should just let this comparison raise NotImpelemented. -- nosy: +ysj.ray ___ Python tracker

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-19 Thread Ray.Allen
New submission from Ray.Allen : As discussed in python-dev mailing list, something should be add to os.mkdir() and os.makedirs() to simulate the shell's "mkdir -p" function, that is, suppress the OSError exception if the target directory exists. Here is a patch against py3k,

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-19 Thread Ray.Allen
Changes by Ray.Allen : Removed file: http://bugs.python.org/file18059/mkdir_py3k.diff ___ Python tracker <http://bugs.python.org/issue9299> ___ ___ Python-bugs-list mailin

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-19 Thread Ray.Allen
Ray.Allen added the comment: I update the patch since an problem is found in doc/library/os.rst. -- Added file: http://bugs.python.org/file18060/mkdir_py3k.diff ___ Python tracker <http://bugs.python.org/issue9

[issue9302] Distutils document problem?

2010-07-19 Thread Ray.Allen
New submission from Ray.Allen : The distutils api document for class Extension: http://docs.python.org/dev/py3k/distutils/apiref.html#distutils.core.Extension Among the argument, in fact, the type of the arguments "sources", "include_dirs", "library_dirs", &quo

[issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before)

2010-07-19 Thread Ray.Allen
Changes by Ray.Allen : -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue9301> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue9300] c/profile Profile class is not documented

2010-07-19 Thread Ray.Allen
Ray.Allen added the comment: I guess this is intended not documented: http://docs.python.org/dev/py3k/library/profile.html#extensions-deriving-better-profilers Here it said: "The Profile class of both modules, profile and cProfile, were written so that derived classes could be develop

[issue1764286] inspect.getsource does not work with decorated functions

2010-07-19 Thread Ray.Allen
Ray.Allen added the comment: I don't think this patch is correct, because we don't know if the closure[0] is the wrapped function, consider the following case: def fun(): abc = 1 def fun2(): print(abc) print(inspect.getsource(fun2)) In this case, the __closure

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-19 Thread Ray.Allen
Ray.Allen added the comment: If I understander correctly, Issue 1608579, Issue 1239890, Issue 1223238, and Issue 1314067 all deal with the case that the intermediate directories already exists during creating them caused by race condition, but if the target directory(the leaf directory

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-19 Thread Ray.Allen
Ray.Allen added the comment: Thanks for reviewing! > The name 'ensure_exist' for the new parameter strikes me as wrong, as well as > too long for something that will nearly always be set to True. The function > always ensures that the directory exists. The question

[issue9296] json module skipkeys handling changed exception types in 2.7

2010-07-19 Thread Ray.Allen
Ray.Allen added the comment: I worked out two patches, one for trunk and one for py3k, both with tests, hope someone could do a reviewing. -- keywords: +patch nosy: +ysj.ray Added file: http://bugs.python.org/file18078/json_trunk.diff ___ Python

[issue9296] json module skipkeys handling changed exception types in 2.7

2010-07-19 Thread Ray.Allen
Changes by Ray.Allen : Added file: http://bugs.python.org/file18079/json_py3k.diff ___ Python tracker <http://bugs.python.org/issue9296> ___ ___ Python-bugs-list mailin

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-07-19 Thread Ray.Allen
Ray.Allen added the comment: Firstly, since this is marked as feature request, I updated the patch against py3k, to fix the problems found by BreamoreBoy. -- Added file: http://bugs.python.org/file18081/issue_2142_py3k_updated.diff ___ Python

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-07-19 Thread Ray.Allen
Ray.Allen added the comment: I feel adding a keyword argument to deal with such a case is not quiet worthy. I'd prefer not fix it for 2.x, and make its behavior consist with svn diff and other similar tools, as trentm said, "tools like "patch"

[issue2244] urllib and urllib2 decode userinfo multiple times

2010-07-20 Thread Ray.Allen
Ray.Allen added the comment: By confirming the "%2525" case, I guess this is really a bug. But the patch cause test_urllib2.py failed. I modified the patch to fix it. -- nosy: +ysj.ray Added file: http://bugs.python.org/file18082/urllib_issue_upd

[issue2244] urllib and urllib2 decode userinfo multiple times

2010-07-20 Thread Ray.Allen
Changes by Ray.Allen : Added file: http://bugs.python.org/file18083/urllib_issue_updated.patch ___ Python tracker <http://bugs.python.org/issue2244> ___ ___ Python-bug

[issue2244] urllib and urllib2 decode userinfo multiple times

2010-07-20 Thread Ray.Allen
Changes by Ray.Allen : Removed file: http://bugs.python.org/file18082/urllib_issue_updated.patch ___ Python tracker <http://bugs.python.org/issue2244> ___ ___ Python-bug

[issue2244] urllib and urllib2 decode userinfo multiple times

2010-07-20 Thread Ray.Allen
Ray.Allen added the comment: This bug exists on py3k also, so I worked out a patch for py3k, too. -- Added file: http://bugs.python.org/file18084/urllib_issue_updated.diff ___ Python tracker <http://bugs.python.org/issue2

[issue9309] Add environment variable complementing command line option -no-user-cfg

2010-07-20 Thread Ray.Allen
Ray.Allen added the comment: I don't think this can go into python2.x. Besides, is it really worthy to add such a new environment variable? -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/i

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-20 Thread Ray.Allen
Ray.Allen added the comment: Thanks for conclusion! I'll try to check and improve my patch. -- ___ Python tracker <http://bugs.python.org/issue9299> ___ ___

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-20 Thread Ray.Allen
Ray.Allen added the comment: I update my patch with improved doc string of posix_mkdir. By the way, after I search in the source, I could not find the "nt", "os2", "ce" modules, I guess these modules only exist in python source at one time, maybe very

[issue9314] inconsistent result when concatenating list with iterators

2010-07-20 Thread Ray.Allen
Ray.Allen added the comment: Alexander: > When a is mutable, a += b updates it in-place, so there is no ambiguity: the > type of a cannot change. When you do a + b, there is no reason to treat a as > more deserving than b when selecting the type of the result Does this means &q

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-21 Thread Ray.Allen
Ray.Allen added the comment: I found in Modules/posixmodule.c that: #if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__)) && !defined(__QNX__) #define INITFUNC PyInit_nt #define MODNAME "nt" #elif defined(PYOS_OS2) #define INITFUNC PyInit_os2 #define MO

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-21 Thread Ray.Allen
Ray.Allen added the comment: Agree! Sure, the functions in os are mainly to simulate the system call but not the system command. This seems like a good suggestion. So here is the new patch which leave posixmodule.c alone and just wrappers os.mkdir() with try...except... in os.makedirs

[issue8297] AttributeError message text should include module name

2010-07-22 Thread Ray.Allen
Ray.Allen added the comment: Amaury: Thanks for reviewing! I quite appreciate your ideas. I was not quite familiar with python source code convention at that time. Here I worked out a new patch based on your ideas. Since py2.7 has released, this feature can only go to py3k. So my new patch

[issue1152248] Enhance file.readlines by making line separator selectable

2010-07-22 Thread Ray.Allen
Ray.Allen added the comment: I think it's a good idea adding a keyword argument to specify the separator of readlines(). I believe most people can accept the universal meaning of "line", which has similar meaning of "record", that is a chunk data, maybe from using li

[issue1723038] Curses Menu

2010-07-22 Thread Ray.Allen
Changes by Ray.Allen : -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue1723038> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8297] AttributeError message text should include module name

2010-07-22 Thread Ray.Allen
Ray.Allen added the comment: Thanks! durban. Here is the updated patch fixing such problem. -- ___ Python tracker <http://bugs.python.org/issue8297> ___ ___

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2010-07-26 Thread Ray.Allen
Ray.Allen added the comment: Oh, I'm sorry, I forgot about that case. I agree with Arfrever, we should suppress the OSError only if the target file exists as a directory, but not other types. That is, the "exist_ok" argument in makedirs() should mean "dir existing is o

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2010-07-26 Thread Ray.Allen
Ray.Allen added the comment: I feel we do too much things in such a function if we change the mod the target directory to the mod we specified. Does anybody feel such behavior maybe dangerous? Because if the function success, we know nothing about weather we create a new directory or we

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2010-07-26 Thread Ray.Allen
Ray.Allen added the comment: I want to explain "mkdir -p" as this: We want to create a specified directory, if such a directory doesn't exist, then create it. If such a directory already exists, then we have already reached our goal, do nothing. While we port this functio

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2010-07-27 Thread Ray.Allen
Ray.Allen added the comment: I updated the patch. Now the patch: suppress the OSError if and only if the target directory with the same mode as we specified already exists. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9386] Bad indentation in urllib import fixer with multiple imports

2010-07-28 Thread Ray.Allen
Ray.Allen added the comment: I guess it's the problem with lib2to3/fixes/fix_urllib.py. Indentation is not taken into consideration when fix "import". Fix it with indentation taken into consideration maybe a little complex, but here is a simple and ugly fix: when one impor

[issue9386] Bad indentation in urllib import fixer with multiple imports

2010-07-28 Thread Ray.Allen
Ray.Allen added the comment: When one import statement is split to two or more, we encounter this problem: the indentation of the import statements except the first one is unknown, and is difficult to fix this problem, since a import maybe in a multi-statement line, like: 'a=1;import sy

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2010-07-28 Thread Ray.Allen
Ray.Allen added the comment: Oh, sorry, here is the patch. -- Added file: http://bugs.python.org/file18229/mkdir.diff ___ Python tracker <http://bugs.python.org/issue9

[issue5412] extend configparser to support [] syntax

2010-07-28 Thread Ray.Allen
Ray.Allen added the comment: lukasz, > - manipulation on the internal structures is much simpler when we have a > single key like that. Having config['name'] return the section would make us > create another proxy object just to support mutating keys in the section. I&

[issue7330] PyUnicode_FromFormat segfault

2010-07-28 Thread Ray.Allen
Ray.Allen added the comment: I feel it's not proper to allow the width restrict on types %S, %R, %A. These types correspond to PyObject_Str(), PyObject_Repr, PyObject_ASCII() respectively, the results of them are usually a complete string representation of a object. If you put a

[issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files

2010-07-28 Thread Ray.Allen
Ray.Allen added the comment: I didn't see this problem in py2.7 and py3k on debian linux. Is this windows specific or this bug has been fixed since py2.7? -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/i

[issue231540] threads and profiler don't work together

2010-07-28 Thread Ray.Allen
Ray.Allen added the comment: I don't think this problem still exists now. In the current implementation, there is no "sys_tracefunc" and "sys_profilefunc" in PyThreadState, but "c_profilefunc", "c_profileobj", "c_tracefunc",

[issue5412] extend configparser to support mapping access(__*item__)

2010-07-28 Thread Ray.Allen
Ray.Allen added the comment: > Note that the two versions are not exclusive: We can look for an item if a > tuple is given and look for a section if it’s a string. Maybe confusing. +1. I think this is a good idea. Getting a section and Getting a key-value are both very common operation

[issue7330] PyUnicode_FromFormat segfault

2010-07-28 Thread Ray.Allen
Ray.Allen added the comment: You can write "%20s" as a argument for PyUnicode_FromFormat(), but it has no effect. The width and precision modifiers are not intended to apply to string formating(%s, %S, %R, %A), only apply to integer(%d, %u, %i, %x). Though you can write "

[issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files

2010-07-29 Thread Ray.Allen
Ray.Allen added the comment: I found that this issue is duplicate with issue6050. And the bug has been fixed since 2.6.3. So this issue should be closed. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9407] ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions

2010-07-29 Thread Ray.Allen
Ray.Allen added the comment: "It may be useful to mention it to show the exception heirarchy as well as in the case a user may want to catch all ConfigParser errors generally." +1. I provide a patch for this. -- keywords: +patch nosy: +ysj.ray Added file: http://bugs.

[issue9407] ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions

2010-07-29 Thread Ray.Allen
Changes by Ray.Allen : -- versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/issue9407> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9417] Declaring a class creates circular references

2010-07-29 Thread Ray.Allen
Ray.Allen added the comment: This should not be a problem, I think. We cannot avoid such a circular reference. I believe the main reason of the circular reference is in MyClass.__mro__, this is a list and contains a reference to MyClass. You can add "__slots__ = []" to MyClass&#x

[issue7330] PyUnicode_FromFormat segfault

2010-07-29 Thread Ray.Allen
Ray.Allen added the comment: Is this really worthy to fix? -- ___ Python tracker <http://bugs.python.org/issue7330> ___ ___ Python-bugs-list mailing list Unsub

[issue9417] Declaring a class creates circular references

2010-07-30 Thread Ray.Allen
Ray.Allen added the comment: > However here's a proposed solution: * for the __mro__: instead of using a tuple, use a new object that inherits from it. This new object should use weak reference for the first item and should return the real object (if available) only in __g

[issue9417] Declaring a class creates circular references

2010-07-30 Thread Ray.Allen
Ray.Allen added the comment: Is this due to your adopting of Django? Are there other guys who using Django suffer the same problem? -- ___ Python tracker <http://bugs.python.org/issue9

[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2010-07-31 Thread Ray.Allen
Ray.Allen added the comment: I got "OSError: [Errno 2] No such file or directory" instead of TypeError when running the "bug.py", did I miss something? -- nosy: +ysj.ray ___ Python tracker <http://bu

[issue7330] PyUnicode_FromFormat segfault

2010-08-01 Thread Ray.Allen
Ray.Allen added the comment: Here is the patch, it add support to use width and precision formatters in PyUnicode_FromFormat() for type %s, %S, %R, %V, %U, %A, besides fixed two bugs, which at least I believe: 1. According to PyUnicode_FromFormat() doc: http://docs.python.org/dev/py3k/c

[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2010-08-01 Thread Ray.Allen
Ray.Allen added the comment: This is because when an subprocess.CalledProcessError is raised, the CalledProcessError instance is picked through a socket and then read by "parent" process, but in fact CalledProcessError instances cannot be picked correctly. Because CalledProcessErr

[issue1553375] Add traceback.print_full_exception()

2010-08-02 Thread Ray.Allen
Ray.Allen added the comment: David Murray, where is the patch? -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue1553375> ___ ___ Python-bug

[issue8743] set() operators don't work with collections.Set instances

2010-08-02 Thread Ray.Allen
Ray.Allen added the comment: In my opinion, the set's operator should be a bit more liberal and accept any collections.Set instances. Given collections.Set is an ABC and isinstance(set, collections.Set) is True, the set methods should(strong recommended) follow all the generalized abs

[issue8634] get method for dbm interface

2010-08-02 Thread Ray.Allen
Ray.Allen added the comment: +1 on generalize the dbm.gnu and gbm.ndbm, and also dbm.dumb. All of them should follow the Collections.MutableMapping ABC. I will work out a patch to fix this. -- nosy: +ysj.ray ___ Python tracker <h

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2010-08-03 Thread Ray.Allen
Ray.Allen added the comment: > Doc review: Small typo, Flase vs False. Also, exceptions are "raised" rather > than "thrown" in Python land (same for the docstring). Both exception > references should be :exc:`OSError`. Here fixed these doc problems. Thank

[issue9523] Improve dbm module

2010-08-05 Thread Ray.Allen
New submission from Ray.Allen : During the patching work of issue8634, I found several problems about the module dbm.gnu and dbm.ndbm, I feel it's better to address them on a separate issue. 1. As issue8634 said, the dbm.gnu, dbm.ndbm and dbm.dumb should have the similar interface,

[issue8634] get method for dbm interface

2010-08-05 Thread Ray.Allen
Ray.Allen added the comment: See issue9523. -- ___ Python tracker <http://bugs.python.org/issue8634> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7574] PyUnicode_FromFormat broken and not documented for 2.x

2010-08-05 Thread Ray.Allen
Ray.Allen added the comment: It seems there is pretty much problems in PyUnicode_FromFormatV(). see issue7330. -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue7

[issue9523] Improve dbm module

2010-08-05 Thread Ray.Allen
Changes by Ray.Allen : -- components: +Extension Modules type: -> feature request versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/iss

[issue8306] ctypes.create_string_buffer should only accept bytes

2010-08-06 Thread Ray.Allen
Ray.Allen added the comment: Why not close this issue? It seems that this has been fixed in current py3k branch. -- nosy: +ysj.ray ___ Python tracker <http://bugs.python.org/issue8

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2010-08-07 Thread Ray.Allen
Ray.Allen added the comment: Since the patch cannot be applied to py3k cleanly, I update it. -- Added file: http://bugs.python.org/file18422/mkdir.diff ___ Python tracker <http://bugs.python.org/issue9

[issue9417] Declaring a class creates circular references

2010-08-07 Thread Ray.Allen
Ray.Allen added the comment: krisvale: > What about my suggestion of simply providing a convention on how to disable > links manually, similar to how minidom.document does it with an "unlink" > method? If these cases are documented, then there shouldn't be any extr

[issue5871] email.header.Header too lax with embeded newlines

2010-08-07 Thread Ray.Allen
Ray.Allen added the comment: Besides, not only the header value, but also the header name can only be printable ascii characters according to RFC2822: "A field name MUST be composed of printable US-ASCII characters (i.e., characters that have values between 33 and 126, inclusive), e

<    1   2