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

2013-12-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary patch. -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file33173/fix_tarfile_list_print_lone_surrogate.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19717] resolve() fails when the path doesn't exist

2013-12-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: I based my implementation on this statement: "Guido pointed out that it may more useful to resolve the path components until one doesn't exist" "until one doesn't exist" in this case means P(BASE, 'foo', 'in', &

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-12-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: Julian, You need to update the patch from Juarez Bochi and Berker Peksag to the tip. -- nosy: +vajrasky ___ Python tracker <http://bugs.python.org/issue1100

[issue20014] Makes array.array constructor accepts ascii-unicode typecode

2013-12-18 Thread Vajrasky Kok
New submission from Vajrasky Kok: >>> import array >>> array.array(u'i', [1,2,3]) Traceback (most recent call last): File "", line 1, in TypeError: must be char, not unicode In this ticket #13566, Alexandre Vassalotti said: "We should still fix ar

[issue13566] Array objects pickled in 3.x with protocol <=2 are unpickled incorrectly in 2.x

2013-12-18 Thread Vajrasky Kok
Vajrasky Kok added the comment: Alexandre Vassalotti said: "We should still fix array in 2.7 to accept unicode object for the typecode though." I created issue #20014 (with the patch) for this feature. -- nosy: +vajrasky ___ Python trac

[issue20014] Makes array.array constructor accepts ascii-unicode typecode

2013-12-18 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch with simpler unittest. -- Added file: http://bugs.python.org/file33185/makes_array_accepts_ascii_unicode_typecode_v2.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20014] Makes array.array constructor accepts ascii-unicode typecode

2013-12-18 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33186/makes_array_accepts_ascii_unicode_typecode_v2.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20014] Makes array.array constructor accepts ascii-unicode typecode

2013-12-18 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33185/makes_array_accepts_ascii_unicode_typecode_v2.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20014] Makes array.array constructor accepts ascii-unicode typecode

2013-12-18 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks, Serhiy, for the review! Here is the patch to avoid refleaking and avoid literal u'' string. If your ticket, #20015, is accepted, then we can throw away the fix and use only unit test in this ticket. -- Added file: http://bugs.

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

2013-12-18 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks, Serhiy, for your review. Here is the patch to address your concern. -- Added file: http://bugs.python.org/file33200/fix_tarfile_list_print_lone_surrogate_v2.patch ___ Python tracker <http://bugs.python.

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

2013-12-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Is there any possibility this ticket could be committed in Python 3.4? If yes, it would be good because we would have a good foundation for creating better error message in Python 3.5. Anyway, I check Python's competitors' behaviour. Ruby displays

[issue20023] _csv.Dialect() does not check type for delimiter, escapechar and quotechar fields

2013-12-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Bear in the mind, the bug is only reproducible with debug flag (--with-pydebug). Victor, we have a more complete solution for this problem in #18829. -- nosy: +vajrasky ___ Python tracker <http://bugs.python.

[issue20028] Confusing error message when giving invalid quotechar in initializing csv dialect

2013-12-19 Thread Vajrasky Kok
New submission from Vajrasky Kok: Python 3.4.0b1 (default:13a505260f17, Dec 20 2013, 12:02:44) [GCC 4.7.2] on linux >>> import _csv >>> import csv >>> _csv.Dialect(quotechar=b'+') Traceback (most recent call last): File "", line 1, in TypeEr

[issue20028] Confusing error message when giving invalid quotechar in initializing csv dialect

2013-12-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary patch for Python 3.3 and 3.4. -- keywords: +patch Added file: http://bugs.python.org/file33224/fix_handling_invalid_quotechar.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20028] Confusing error message when giving invalid quotechar in initializing csv dialect

2013-12-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary patch for Python 2.7. -- Added file: http://bugs.python.org/file33225/fix_handling_invalid_quotechar_python27.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20028] Confusing error message when giving invalid quotechar in initializing csv dialect

2013-12-19 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33225/fix_handling_invalid_quotechar_python27.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20028] Confusing error message when giving invalid quotechar in initializing csv dialect

2013-12-19 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33226/fix_handling_invalid_quotechar.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20028] Confusing error message when giving invalid quotechar in initializing csv dialect

2013-12-19 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33224/fix_handling_invalid_quotechar.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20028] Confusing error message when giving invalid quotechar in initializing csv dialect

2013-12-19 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33227/fix_handling_invalid_quotechar_python27.patch ___ Python tracker <http://bugs.python.org/issue20

[issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket

2013-12-22 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks, Antoine, for the review! Attached the patch to address Antoine's concern. -- Added file: http://bugs.python.org/file33256/raises_error_on_wrap_socket_with_sock_dgram_v2.patch ___ Python tracker

[issue20055] On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py

2013-12-23 Thread Vajrasky Kok
New submission from Vajrasky Kok: Use administrator account and run Lib\test\test_shutil.py! You will get two failing tests. == FAIL: test_move_dangling_symlink (__main__.TestMove

[issue20056] Got deprecation warning when running test_shutil.py on Windows NT 6

2013-12-23 Thread Vajrasky Kok
New submission from Vajrasky Kok: You don't have to be an administrator get this deprecation warning. I am not sure whether showing the deprecation warning is intended behaviour or not. C:\Users\vajrasky\Code\cpython>PCbuild\python.exe Lib\test\test_shutil.py ..s..s..sss...

[issue20069] Add unit test for os.chown

2013-12-26 Thread Vajrasky Kok
New submission from Vajrasky Kok: There is no tests for os.chown except for the invalid input. Attached the patch to add tests for os.chown. This test has not exercised the keyword `dir_fd` and `follow_symlinks` because `follow_symlinks` (I think) is kinda broken on Windows and I prefer to

[issue20069] Add unit test for os.chown

2013-12-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for Python 2.7. -- Added file: http://bugs.python.org/file33267/add_unit_test_os_chown_python27.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20075] help(open) eats first line

2013-12-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: The patch does not fix it. It becomes like this: open(...) Open file and return a stream. Raise IOError upon failure. It's not just help(open) has problem, help(sqlite3.connect) got it as well: connect(...) check_same_thread, factory, cached_state

[issue20080] Unused variable in Lib/sqlite3/test/factory.py

2013-12-27 Thread Vajrasky Kok
New submission from Vajrasky Kok: There is unused variable t in Lib/sqlite3/test/factory.py. def CheckSqliteRowAsTuple(self): """Checks if the row object can be converted to a tuple""" self.con.row_factory = sqlite.Row row = self.con.

[issue20080] Unused variable in Lib/sqlite3/test/factory.py

2014-01-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks, Eric! Attached the patch to address Eric's concern. -- Added file: http://bugs.python.org/file33296/unused_variable_in_factory_py_v2.patch ___ Python tracker <http://bugs.python.org/is

[issue19885] lzma segfault when __init__ with non-existent file after executing the constructor (Python 2.7)

2014-01-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, sorry guys. The python 2.7 lzma binding is Fedora specific one. I already submitted bug there: https://bugzilla.redhat.com/show_bug.cgi?id=1048581 -- resolution: -> invalid status: pending -> open ___

[issue19885] lzma segfault when __init__ with non-existent file after executing the constructor (Python 2.7)

2014-01-05 Thread Vajrasky Kok
Changes by Vajrasky Kok : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue19885> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue20121] quopri_codec newline handling

2014-01-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: The quopri_codec uses binascii.b2a_qp method. >>> binascii.b2a_qp('\r\n\n\n\n') '\r\n\r\n\r\n\r\n' The logic in b2a_qp when dealing with newlines is check whether the first line uses \r\n or \n. If it uses \r\n, then all rema

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

2014-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Jakub Wilk, yeah, I missed that one. Jason Gerard DeRose, thanks for the additional information. Anyway, I already "persuaded" Ruby developers to specialize the message, although it's only for creating symlink. https://bugs.ruby-lang.org/iss

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch to deprecate platform.dist and platform.linux_distribution. -- nosy: +vajrasky Added file: http://bugs.python.org/file33324/deprecate_platform_dist.patch ___ Python tracker <http://bugs.python.

[issue1322] platform.dist() has unpredictable result under Linux

2014-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks for the review. Attached the patch to address Marc-Andre Lemburg's concern. -- Added file: http://bugs.python.org/file4/deprecate_platform_dist_v2.patch ___ Python tracker <http://bugs.python.org/i

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

2014-01-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, here is my first attempt. I only worked on one file (Modules/sha1module.c). I need to see whether I hit the mark or not. If yes, I can do the other files as well. Anyway, handling the keyword argument was kinda tough. There was no example so I had to

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

2014-01-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: An example how to convert keyword argument would be very helpful. I searched the example from existing code but nothing shows up. -- ___ Python tracker <http://bugs.python.org/issue20

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

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, this is my second attempt. I want to get METH_VARGS but I always get METH_O for positional parameters. Is there any way to circumvent this? The documentation does not cover this. -- Added file: http://bugs.python.org/file33374/clinic_sha1module_v2

[issue20216] Misleading docs for sha1, sha256, sha512 modules

2014-01-09 Thread Vajrasky Kok
New submission from Vajrasky Kok: Misleading doc number 1: >>> import _sha1 >>> _sha1.sha1.__doc__ 'Return a new SHA1 hash object; optionally initialized with a string.' >>> _sha1.sha1('cutecat') Traceback (most recent call last): File &qu

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

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: But METH_O makes the update method does not work. >>> _sha1.sha1().update(b'a') Traceback (most recent call last): File "", line 1, in SystemError: new style getargs format but argument is not a tuple But if you change METH_O to

[issue20216] Misleading docs for sha1, sha256, sha512, md5 modules

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Added md5 module to this ticket. -- title: Misleading docs for sha1, sha256, sha512 modules -> Misleading docs for sha1, sha256, sha512, md5 modules Added file: http://bugs.python.org/file33399/fix_doc_sha_module_v2.pa

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

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: This is the current behaviour of sha1 constructor. It rejects None value. >>> import _sha1 >>> _sha1.sha1() <_sha1.sha1 object at 0x7f7fa7f0dea0> >>> _sha1.sha1(None) Traceback (most recent call last): File "", l

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

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: >Rule 1: Argument Clinic handles all argument parsing for you. Your "impl" >function should never call PyArg_ParseTuple or PyArg_ParseTupleAndKeywords. Ah, got it. Here is the third patch. Everything works fine except for the issue whether

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

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for sha256. It got the same issue as sha1. After being clinic-ed, the constructor accepts None value happily. -- Added file: http://bugs.python.org/file33401/clinic_sha256module.patch ___ Python

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

2014-01-10 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for sha512. It got the same issue as sha1. After being clinic-ed, the constructor accepts None value happily. -- Added file: http://bugs.python.org/file33402/clinic_sha512module.patch ___ Python

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

2014-01-10 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for md5. It got the same issue as sha1. After being clinic-ed, the constructor accepts None value happily. -- Added file: http://bugs.python.org/file33403/clinic_md5module.patch ___ Python tracker

[issue10388] spwd returning different value depending on privileges

2014-01-10 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated patch addressing Giampaolo's concern. -- Added file: http://bugs.python.org/file33404/fix_error_message_getspall_v2.patch ___ Python tracker <http://bugs.python.org/is

[issue18983] Specify time unit for timeit CLI

2014-01-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: This feature is for Python 3.5. I think, we will not commit anything to Python 3.5 until Python 3.4 branch is created (in other world, released). So, be patient. :) -- nosy: +vajrasky ___ Python tracker <h

[issue20232] Argument Clinic NULL default falsely implies None acceptability

2014-01-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: Yes, this issue bothers me. Currently _sha1.sha1 constructor will use NULL (not None) value if used without parameters: _sha1.sha1() _sha1.sha1(None) will throw error while _sha1.sha1() won't. So for NULL (not None) default value, the generated signature

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

2014-01-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for _codecs module. -- Added file: http://bugs.python.org/file33443/clinic_codecsmodule.patch ___ Python tracker <http://bugs.python.org/issue20

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

2014-01-13 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33443/clinic_codecsmodule.patch ___ Python tracker <http://bugs.python.org/issue20173> ___ ___ Pytho

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

2014-01-13 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33445/clinic_codecsmodule.patch ___ Python tracker <http://bugs.python.org/issue20173> ___ ___ Python-bug

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

[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

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

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

2014-01-14 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33474/clinic_codecsmodule.patch ___ Python tracker <http://bugs.python.org/issue20185> ___ ___ Pytho

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

2014-01-14 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33475/clinic_resource.patch ___ Python tracker <http://bugs.python.org/issue20185> ___ ___ Python-bug

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

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

[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 <http://bugs.python.org/issue20173> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

[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 &quo

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

[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

[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. -- ___ Pyth

[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

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

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

2014-01-20 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33561/clinic_typeobject.patch ___ Python tracker <http://bugs.python.org/issue20185> ___ ___ Python-bug

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

2014-01-20 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33562/clinic_typeobject.patch ___ Python tracker <http://bugs.python.org/issue20185> ___ ___ Python-bug

[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/file

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

2014-01-21 Thread Vajrasky Kok
Changes by Vajrasky Kok : -- title: Argument Clinic: self converters are not preserved when clonig functions -> Argument Clinic: self converters are not preserved when cloning functions ___ Python tracker <http://bugs.python.org/issu

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

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

2014-01-21 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33608/fix_tarfile_list_print_lone_surrogate_v3.patch ___ Python tracker <http://bugs.python.org/issue19

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

2014-01-21 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33610/fix_tarfile_list_print_lone_surrogate_v3.patch ___ Python tracker <http://bugs.python.org/issue19

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

[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|O&O&:index", &v, _PyEval_SliceIndex, &start,

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

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

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

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

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

[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

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

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

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

[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])&quo

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

[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

[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

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

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

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

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

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

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

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

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

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

<    1   2   3   4   5   6   >