[issue20251] socket.recvfrom_into crash with empty buffer

2014-01-13 Thread Vajrasky Kok
New submission from Vajrasky Kok: import socket r, w = socket.socketpair() w.send(b'X' * 1024) 1024 buffer = bytearray() r.recvfrom_into(buffer) python: /home/sky/Code/python/cpython3.4/Modules/socketmodule.c:2867: sock_recvfrom_into: Assertion `buf != 0 buflen 0' failed. Aborted (core

[issue20254] Duplicate bytearray test on test_socket.py

2014-01-13 Thread Vajrasky Kok
New submission from Vajrasky Kok: testRecvIntoArray is same as testRecvIntoBytearray. testRecvFromIntoArray is same as testRecvFromIntoBytearray. Attached the patch to fix the tests. -- components: Tests files: fix_recv_from_into_array_test_socket.patch keywords: patch messages

[issue20257] test_socket fails if using tipc module and SELinux enabled

2014-01-14 Thread Vajrasky Kok
New submission from Vajrasky Kok: Enable SELinux (by default it is already enabled). Then load tipc module. # modprobe tipc Then using whatever account, execute Lib/test/test_socket.py. You'll get: FAILED (errors=1, skipped=4) Traceback (most recent call last): File Lib/test/test_socket.py

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-14 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for Modules/resource.c. However, I can not convert this method signature: if (!PyArg_ParseTuple(args, _Py_PARSE_PID i|(OO):prlimit, pid, resource, curobj, maxobj)) _Py_PARSE_PID can be 'i' or 'l' or 'L

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-14 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33474/clinic_codecsmodule.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-14 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Added file: http://bugs.python.org/file33475/clinic_resource.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-14 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for Modules/gcmodule.c. -- Added file: http://bugs.python.org/file33477/clinic_gc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for Python/marshal.c. A couple of issues: 1. I can not have bytes as argument. bytes: Py_buffer - not possible So I changed it to byte. 2. I can not give default value, marshal.version, to argument. version: int(c_default

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: s/Guide/Guido. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20173 ___ ___ Python-bugs-list mailing list

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: So, as Guide said in https://mail.python.org/pipermail/python-dev/2014-January/131675.html: In the sha1 example, however, accepting None and converting it to NULL (without a reference leak, please :-) seems fine though. I let the patches

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: With little modification: class PID_converter(int_converter): type = 'pid_t' format_unit = ' _Py_PARSE_PID ' It works. Thanks! But I got unnecessary empty string: if (!PyArg_ParseTuple(args, _Py_PARSE_PID i:prlimit, pid, resource)) It should

[issue20286] Segfault when using internal DictProxy

2014-01-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: It happens on Python 3.3 and 3.4 as well. Tested on Fedora 20. -- nosy: +vajrasky versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20286

[issue19974] tarfile doesn't overwrite symlink by directory

2014-01-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Ah, thanks for the review, Serhiy. My bad. There is no underlying bug of tar. I was confused by the behaviour of tar which is converting the absolute path to relative path. So, adding '/home/user/dir/file' to tar when you are in '/home/user/dir

[issue19974] tarfile doesn't overwrite symlink by directory

2014-01-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Serhiy commented, I think we should remove targetpath in all cases. Not only when softlink is extracted. I already did that in my latest patch but I am a little bit wary of this behaviour. -- ___ Python tracker rep

[issue19871] json module won't parse a float that starts with a decimal point

2014-01-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Attached the patch to address Ezio Melotti's concern. Thanks for the review! -- Added file: http://bugs.python.org/file33558/parse_non_valid_json_float_with_unit_test_v2.patch ___ Python tracker rep...@bugs.python.org

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-20 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for typeobject. I didn't convert the new method. It's so complicated. It counts whether how many arguments or keywords you pass. It asserts the args before parsing the args. I don't think clinic supports this. This is the code: assert(args

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-20 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33561/clinic_typeobject.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-20 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Added file: http://bugs.python.org/file33562/clinic_typeobject.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-21 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for longobject. There are two sites which I couldn't convert. The first is the constructor which is complicated. The other one is __round__ which clinic explicitly does not support. -- Added file: http://bugs.python.org/file33587

[issue20325] Argument Clinic: self converters are not preserved when cloning functions

2014-01-21 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: -- title: Argument Clinic: self converters are not preserved when clonig functions - Argument Clinic: self converters are not preserved when cloning functions ___ Python tracker rep

[issue19920] TarFile.list() fails on some files

2014-01-21 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch addressing some of Serhiys concerns. Thanks for the review. There are some things that I could not make it up: 1. The test for unencodable tarinfo.linkname is not done yet, because maybe it is better to be done in a separate ticket. To make

[issue19920] TarFile.list() fails on some files

2014-01-21 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33608/fix_tarfile_list_print_lone_surrogate_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19920

[issue19920] TarFile.list() fails on some files

2014-01-21 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Added file: http://bugs.python.org/file33610/fix_tarfile_list_print_lone_surrogate_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19920

[issue20341] Argument Clinic: add nullable ints

2014-01-21 Thread Vajrasky Kok
Vajrasky Kok added the comment: itertools.repeat.__doc__ 'repeat(object, times=None)\nReturns an iterator which returns the object the specified number of times.\n\nIf times is None, returns the object endlessly.' itertools.repeat('a', times=None) Traceback (most recent call last): File

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-22 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for listobject. A couple of thoughts: 1. I can not convert this signature: if (!PyArg_ParseTuple(args, O|OO:index, v, _PyEval_SliceIndex, start, _PyEval_SliceIndex, stop

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-22 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks, Serhiy, for the pointer. Now, I am able to convert the method using _PyEval_SliceIndex function. Sorry, Larry. I used optional groups in __init__ because I didn't know about unspecified. Here is the updated patch for listobject. One thought

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-22 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for floatobject. I did not convert 2 sites. The first is the round method which clinic explicitly does not support. The second one is the new method. This is the snippet of new method: float_new(PyTypeObject *type, PyObject *args, PyObject

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-23 Thread Vajrasky Kok
Vajrasky Kok added the comment: This is updated patch for marshal incorporating the fixes from clinic. Now, I can use 'bytes' named argument and default value of marshal.version instead of hardcoded number. -- Added file: http://bugs.python.org/file33644/clinic_marshal_v2.patch

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-23 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch of sha1module, based on Larry's review. Thanks! -- Added file: http://bugs.python.org/file33646/clinic_sha1module_v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-23 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch of sha256module, based on Larry's review. Thanks! -- Added file: http://bugs.python.org/file33649/clinic_sha256module_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-23 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch of sha512module, based on Larry's review. Thanks! -- Added file: http://bugs.python.org/file33650/clinic_sha512module_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-23 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch of md5module, based on Larry's review. Thanks! -- Added file: http://bugs.python.org/file33652/clinic_md5module_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-24 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch of codecsmodule, based on Larry's review. Thanks! I didn't realize clinic releases pybuffer implicitly. I also turned _codecs.Codecs to _codecs since all of these methods are module methods. -- Added file: http

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-24 Thread Vajrasky Kok
Vajrasky Kok added the comment: Updated marshal patch. I just learned we don't need to release pybuffer (y*) manually. -- Added file: http://bugs.python.org/file33678/clinic_marshal_v3.patch ___ Python tracker rep...@bugs.python.org http

[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-24 Thread Vajrasky Kok
Vajrasky Kok added the comment: Serhiy said, Why do you cast PyDict_Size(kwds) to int? Sorry, Serhiy! Today I just realized there is your review for this ticket. I couldn't really remember but I think I got conversion warning if I did not downcast it. Something about I shouldn't not have

[issue18670] Using read_mime_types function from mimetypes module gives resource warning

2014-01-24 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch based on Ezio's review. Sorry, for a long time, I didn't notice you had reviewed my code, Ezio. Thanks for the review! -- Added file: http://bugs.python.org/file33679/fix_resource_warning_read_mime_types_v3.patch

[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-24 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch. I try to be conservative here, preserving the current behaviour. Negative times is same as zero. Default value (which can be passed by omitting times) means unlimited. I did not change the signature repeat(object [,times]) because

[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-24 Thread Vajrasky Kok
Vajrasky Kok added the comment: def repeat(object, times=-1): = it could break the code in the wild. Current behaviour: repeat(object) - unlimited, repeat(object, -1) - 0 repetitions. -- ___ Python tracker rep...@bugs.python.org http

[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-24 Thread Vajrasky Kok
Vajrasky Kok added the comment: Larry said, It behaves differently depending on whether times is passed by position or by keyword. And that is the bug. It should be the same no matter whether we send times through positional or keyword. As Raymond has said earlier in this thread

[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-25 Thread Vajrasky Kok
Vajrasky Kok added the comment: Larry said, A proper fix for the bug will require changing the semantics of the function. It's inappropriate to do that in 2.7, 3.3, and (now that we're in beta) 3.4. I think we can not have it all and need to be pragmatic in this ticket. While we can not fix

[issue19920] TarFile.list() fails on some files

2014-01-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: I already have a patch addressing your concerns, Serhiy. But before I upload it here, some questions: 1. Yes, we can add unencodable tarinfo.linkname later. Just add tests for external tar files. You mean, we need to create a tar file containing unencodable

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for sha1module after changes from Larry to clinic. -- Added file: http://bugs.python.org/file33737/clinic_sha1module_v5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for sha256module after changes from Larry to clinic. -- Added file: http://bugs.python.org/file33739/clinic_sha256module_v3.patch ___ Python tracker rep...@bugs.python.org http

[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: How to handle this problem in Python maintenance releases (2.7, 3.3 and soon-to-be 3.4) is being discussed here: https://mail.python.org/pipermail/python-dev/2014-January/132101.html In case, we are taking backporting the full fix road, here is the patch. I

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for sha512module after changes from Larry to clinic. -- Added file: http://bugs.python.org/file33742/clinic_sha512module_v3.patch ___ Python tracker rep...@bugs.python.org http

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for md5module after changes from Larry to clinic. -- Added file: http://bugs.python.org/file33743/clinic_md5module_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for resource module based on Zachary's comment. -- Added file: http://bugs.python.org/file33744/clinic_resource_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Status: Modules/sha1module.c: done Modules/sha256module.c: done Modules/sha512module.c: done Modules/md5module.c: done All of them are ready for Python 3.4. /* AC 3.5: optional positional arguments */ Modules/_codecsmodule

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for type module based on Zachary's comment. However, I can not convert this method. {__subclasshook__, object_subclasshook, METH_CLASS | METH_VARARGS, object_subclasshook_doc}, static PyObject * object_subclasshook(PyObject *cls

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-28 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for list module based on Zachary and Serhiy's reviews. -- Added file: http://bugs.python.org/file33767/clinic_listobject_v4.patch ___ Python tracker rep...@bugs.python.org http

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-28 Thread Vajrasky Kok
Vajrasky Kok added the comment: Forgot to say that, in list module, anything is convertable except __getitem__. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-28 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for marshal module based on Zachary's review. -- Added file: http://bugs.python.org/file33769/clinic_marshal_v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20416] Marshal: special case int and float, don't use references

2014-01-28 Thread Vajrasky Kok
Vajrasky Kok added the comment: I am doing clinic conversion for marshal module so I am adding myself to nosy list to make sure both tickets are synchronized. http://bugs.python.org/issue20185 -- nosy: +vajrasky ___ Python tracker rep

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-01-28 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for float object based on Zachary and Serhiy's reviews. Some methods that can not be converted are: __getnewargs__, __round__, float_new. So these files are ready for Python 3.4: resource, typeobject, listobject, and floatobject

[issue19920] TarFile.list() fails on some files

2014-01-28 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch to accommodate Serhiy's request. I added new test soutside CommandLineTest. The fix always uses sys.stdout.encoding. The test_list_command and test_list_command_verbose uses testtarnames now. -- Added file: http://bugs.python.org

[issue20456] Argument Clinic rollup patch, 2014/01/31

2014-02-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: The converters argument in command line is still broken. [sky@localhost cpython3.4]$ hg pull -u pulling from http://hg.python.org/cpython searching for changes no changes found [sky@localhost cpython3.4]$ ./python Tools/clinic/clinic.py --converters Legacy

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-03 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch addressing Zachary's reviews (Thanks!). However, there are some reviews that I could not implement. 1. This is a good candidate for a custom return converter. I can not synchronize struct rlimit and NULL return values. 2. Should

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-02-04 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch after Larry's commit to clinic. Everything is included except codecsmodule. -- Added file: http://bugs.python.org/file33895/issue20173_conglomerate.patch ___ Python tracker rep

[issue20517] Support errors with two filenames for errno exceptions

2014-02-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: But there are some errors that really need two filenames, like copy(), symlink(), and rename(). I think *need* is too strong word in this case. I agree that two filenames is better than none. But I don't see anything wrong from omitting filenames in error

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch addressing Zachary's review (Thanks!). There are some Zachary's suggestions that I could not implement: 1. float_conjugate_impl,/* nb_float */ I think this should still be the real function (the parser), not the impl. The impl

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: Zachary, Looking again, that one is non-trivial, but still doable. You just need a this means an error happened value to initialize rl to, and return that value instead of NULL. How do you give this means an error happened value to struct rlimit? struct

[issue20525] Got compiler warning when compiling readline module

2014-02-05 Thread Vajrasky Kok
New submission from Vajrasky Kok: On Fedora 20, I got this compiler warning: /home/sky/Code/python/cpython3.4/Modules/readline.c: In function ‘flex_complete’: /home/sky/Code/python/cpython3.4/Modules/readline.c:962:5: warning: passing argument 1 of ‘completion_matches’ discards ‘const

[issue20525] Got compiler warning when compiling readline module

2014-02-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: It works. I chose Christian Heimes' strategy because of: char ** completion_matches (char *text, CPFunction *entry_func) in http://web.mit.edu/gnu/doc/html/rlman_2.html -- ___ Python tracker rep...@bugs.python.org

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-06 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33931/issue20185_conglomerate_v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for gc module. Some functions that can not be converted: - set_threshold(threshold0, [threshold1, threshold2]) Don't know what default value to give to threshold1, threshold2. static struct gc_generation generations[NUM_GENERATIONS

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-06 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33477/clinic_gc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: About rlimit, I think we can use negative number for any member of the struct. But the thing is I am not really sure whether it's okay or not. So it's better on the safe side. I'll finish longobject in one or two days

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-06 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33944/clinic_gc_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for long object. A couple of functions that can not be converted: - long_new It has custom processing before parsing arguments part. - long_round Not supported by clinic. _ __trunc__, __floor__, __ceil__ all are mapped to long_long

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-07 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33587/clinic_longobject.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20520] Readline test in test_codecs is broken

2014-02-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: The culprit: diff -r b4e99bec0c8a Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Fri Feb 07 10:10:55 2014 +0200 +++ b/Lib/test/test_codecs.py Fri Feb 07 17:14:12 2014 +0800 @@ -164,6 +164,8 @@ s = 10*(size*a + lineend + xxx\n

[issue20541] os.path.exists() gives wrong answer for Windows special files

2014-02-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: See also: http://bugs.python.org/issue1311 -- nosy: +vajrasky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20541

[issue19772] str serialization of Message object may mutate the payload and CTE.

2014-02-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: Your test method didn't start with 'test_', so it didn't get run. Ah sorry about that. This is the updated patch. It fixed the problem and passed all test. -- Added file: http://bugs.python.org/file33987/fix_serialization_message_object_mutation_v4

[issue20525] Got compiler warning when compiling readline module

2014-02-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: It's weird. When I make clean and configure again and make again, the error warning message disappear. Prior to that, I could confirm, I was in this block: #ifdef HAVE_RL_COMPLETION_MATCHES #define completion_matches(x, y) \ rl_completion_matches((x

[issue19772] str serialization of Message object may mutate the payload and CTE.

2014-02-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Actually, I am thinking of this approach (cloning the message just after entering the flatten method): diff -r b541ecd32115 Lib/email/generator.py --- a/Lib/email/generator.pyFri Feb 07 16:11:17 2014 -0800 +++ b/Lib/email/generator.pySat Feb 08 15:55:01

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for gc module based on Zachary's review. -- Added file: http://bugs.python.org/file33988/clinic_gc_v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-08 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33954/clinic_longobject_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch for long object based on Zachary's review. -- Added file: http://bugs.python.org/file33989/clinic_longobject_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-08 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33951/clinic_gc_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185

[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-02-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the ultimate patch for this bug. The doc fix is based on Larry's writing: https://mail.python.org/pipermail/python-dev/2014-January/132156.html I made sure the patch could be compiled by Sphinx and displayed nicely. I added test and comment in the code

[issue19772] str serialization of Message object may mutate the payload and CTE.

2014-02-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: So why check specifically for 8bit and base64? I was in hurry when creating this patch. I think that was part of the debug code. This patch was created with the purpose to illuminate the culprit of this bug. And it served its purpose. After uploading

[issue16074] Bad error message in os.rename, os.link, and os.symlink

2014-02-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Now, that we have fixed this bug in Python 3.4 with this commit http://hg.python.org/cpython/rev/081a9d8ba3c7, what should we do with the bug in Python 3.3? Use my patch (omitting filenames)? Keep the status quo (one filename)? If yes, close this ticket

[issue19974] tarfile doesn't overwrite symlink by directory

2014-02-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Yeah, you are right, Serhiy. I check the behaviour of GNU tar command line. It always replaces the target no matter what kind of file source and target are. -- ___ Python tracker rep...@bugs.python.org http

[issue20589] pathlib.owner() and pathlib.group() raise ImportError on Windows

2014-02-10 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20589 ___ ___ Python-bugs-list

[issue20652] Example in asyncio task gives resource warning

2014-02-16 Thread Vajrasky Kok
New submission from Vajrasky Kok: From http://docs.python.org/3.4/library/asyncio-task.html#example-future-with-run-until-complete there is an example code: import asyncio @asyncio.coroutine def slow_operation(future): yield from asyncio.sleep(1) future.set_result('Future in done

[issue20652] Example in asyncio task gives resource warning

2014-02-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: The patch also fixed some typos. s/Future in done/Future is done/ -- Added file: http://bugs.python.org/file34112/shut_off_resource_warning_run_forever_asyncio_example.patch ___ Python tracker rep...@bugs.python.org

[issue20652] Example in asyncio task gives resource warning

2014-02-16 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file34111/shut_off_resource_warning_run_forever_asyncio_example.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20652

[issue20655] test_subprocess is not executed in python -m test.test_asyncio

2014-02-17 Thread Vajrasky Kok
New submission from Vajrasky Kok: ethan@amiau:~/Documents/code/python/cpython3.4$ cat Lib/test/test_asyncio/tests.txt test_asyncio.test_base_events test_asyncio.test_events test_asyncio.test_futures test_asyncio.test_locks test_asyncio.test_proactor_events test_asyncio.test_queues

[issue20655] test_subprocess is not executed in python -m test.test_asyncio

2014-02-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: The second is the permanent fix so we don't need to add new test to tests.txt every time we want to add new test to asyncio test bundle. -- Added file: http://bugs.python.org/file34115/permanent_fix_for_executing_test_asyncio_in_bundle.patch

[issue20654] Pydoc (and help) fails with socket.AddressFamily

2014-02-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: This is the preliminary patch for this bug. The bug happens because AddressFamily.AF_UNSPEC is 0. Then you have this if condition: getattr(object, name, None) or homecls.__dict__[name] I'll contemplate whether we should add unit test

[issue20654] Pydoc (and help) fails with socket.AddressFamily

2014-02-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: I just realized that Enum member could be None. I'll think how to improve this patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20654

[issue20654] Pydoc (and help) fails with socket.AddressFamily

2014-02-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the second preliminary patch. I'll think about the way to avoid dependency to socket module. -- Added file: http://bugs.python.org/file34119/pydoc_display_enum_member_value_0.patch ___ Python tracker rep

[issue20654] Pydoc (and help) fails with socket.AddressFamily

2014-02-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the second patch, avoiding dependency to socket.AddressFamily (though it adds dependency to enum library) in test. -- Added file: http://bugs.python.org/file34120/pydoc_display_enum_member_value_0_v2.patch

[issue20654] Pydoc (and help) fails with socket.AddressFamily

2014-02-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks for the review, Serhiy! Here is the patch addressing Serhiy's concern. -- Added file: http://bugs.python.org/file34126/pydoc_display_enum_member_value_0_v3.patch ___ Python tracker rep...@bugs.python.org http

[issue20668] Remove dependency on tests.txt when running test_asyncio suite

2014-02-17 Thread Vajrasky Kok
New submission from Vajrasky Kok: We can run the whole asyncio tests by using this command: ./python -m test.test_asyncio But this way depends on the Lib/test/test_asyncio/tests.txt which contains all the tests that need to be executed. The problem is the core developer may forget to modify

[issue20648] 3.4 cherry-pick: multiple changesets for asyncio

2014-02-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: It is slowing down. I think we now only have some documentation updates left. What about this one? http://bugs.python.org/issue20668 (Remove dependency on tests.txt when running test_asyncio suite) It has been lgtm-ed by Guido and asked by him to be added

[issue19974] tarfile doesn't overwrite symlink by directory

2014-02-20 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary patch to address Serhiy's concern. I added some regression tests as well. Give me a time to think how to refactor the code (especially the test). -- Added file: http://bugs.python.org/file34152/fix_tarfile_overwrites_symlink_v4

[issue20069] Add unit test for os.chown

2014-02-23 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch that is considerate towards Windows for Python 3.4. I'll fix the patch for Python 2.7 later. -- Added file: http://bugs.python.org/file34198/add_unit_test_os_chown_v2.patch ___ Python tracker rep

[issue20069] Add unit test for os.chown

2014-02-23 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33266/add_unit_test_os_chown.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20069

[issue20753] disable test_robotparser test that uses an invalid URL

2014-02-24 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, here is my attempt to rewrite the test using local web server. I copied and modified the code from Lib/test/test_socketserver.py. The website mueblesmoraleda can not be accessed so I could only guess what the intention of this test was. I am not sure

<    1   2   3   4   5   6   >