[issue19775] Provide samefile() on Path objects

2013-12-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Updated grammar according to Arfrever's review. Thanks! Anyway, should samefile accepts only string? Or should it accept Path object as well? -- Added file: http://bugs.python.org/file32927/pathlib_samefile_v2.

[issue19852] Misplaced private API method in pathlib.py

2013-12-01 Thread Vajrasky Kok
New submission from Vajrasky Kok: In class Path, line 942, you have this comment: # Public API but down there, in line 1048, you have this private method: def _raw_open(self, flags, mode=0o777): """ Open the file pointed by this path and return a

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

2013-12-01 Thread Vajrasky Kok
Changes by Vajrasky Kok : -- title: bad error message in os.rename -> Bad error message in os.rename, os.link, and os.symlink ___ Python tracker <http://bugs.python.org/issu

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

2013-12-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch for Python 3.4. It removed file information for os.rename, os.link, and os.symlink. I agree with Ezio that giving extra information is better but since Python 3.4 is in beta maybe we can defer this to Python 3.5. There are couples of

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

2013-12-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Patch for Python 3.3. It omitted file information for error messages in rename, symlink, and link. I'll create a separate ticket for adding extra file information to these error messages. -- Added file: http://bugs.python.org/file

[issue19828] test_site fails with -S flag

2013-12-02 Thread Vajrasky Kok
Vajrasky Kok added the comment: Yeah, but... $ ./python -S Lib/test == CPython 3.4.0b1 (default:373797990f57, Dec 2 2013, 16:46:35) [GCC 4.7.2] == Linux-3.5.0-37-generic-x86_64-with-debian-wheezy-sid little-endian == hash algorithm: siphash24 64bit == /home/ethan/Documents/code/python

[issue19828] test_site fails with -S flag

2013-12-02 Thread Vajrasky Kok
Vajrasky Kok added the comment: Sorry to forget to add the relevant detail: $ ./python -S Lib/test [284/387] test_shutil [285/387] test_signal [286/387] test_site test test_site failed -- multiple errors occurred; run in verbose mode for details [287/387/1] test_slice [288/387/1

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

2013-12-02 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary patch. Only tested on Linux. Later I'll test it on Windows. -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32947/add_non_strict_resolve_pathlib.patch ___ P

[issue19872] Remove unused imports in pathlib

2013-12-03 Thread Vajrasky Kok
New submission from Vajrasky Kok: Attached the patch to remove unused imports in pathlib. -- components: Library (Lib) files: remove_unused_import_in_pathlib.patch keywords: patch messages: 205081 nosy: pitrou, vajrasky priority: normal severity: normal status: open title: Remove unused

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2013-12-03 Thread Vajrasky Kok
New submission from Vajrasky Kok: Here it is (Lib/test/test_pathlib.py, line 1240): def _check_resolve_relative(self, p, expected): q = p.resolve() self.assertEqual(q, expected) def _check_resolve_absolute(self, p, expected): q = p.resolve

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2013-12-03 Thread Vajrasky Kok
Vajrasky Kok added the comment: These functions are only being used in test_resolve_common. def test_resolve_common(self): P = self.cls p = P(BASE, 'foo') with self.assertRaises(OSError) as cm: p.resolve() self.assertEqual(cm.excep

[issue19877] test_resolve_dot of test_pathlib.py fails on Windows Vista

2013-12-03 Thread Vajrasky Kok
New submission from Vajrasky Kok: You must run this test as administrator. C:\Users\vajrasky\Code\cpython>PCbuild\python.exe Lib\test\test_pathlib.py ..s..s..s..s.s.E s

[issue19878] bz2.BZ2File.__init__() cannot be called twice with non-existent file

2013-12-03 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary patch. -- keywords: +patch nosy: +vajrasky title: bz2.BZ2File.__init__() cannot be called twice -> bz2.BZ2File.__init__() cannot be called twice with non-existent file Added file: http://bugs.python.org/file32

[issue10203] sqlite3.Row doesn't support sequence protocol

2013-12-03 Thread Vajrasky Kok
Vajrasky Kok added the comment: I got warning in compiling your patch: gcc -pthread -fPIC -Wno-unused-result -Werror=declaration-after-statement -g -O0 -Wall -Wstrict-prototypes -DMODULE_NAME="sqlite3" -DSQLITE_OMIT_LOAD_EXTENSION=1 -IModules/_sqlite -I/usr/include -I./Include -I.

[issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules

2013-12-03 Thread Vajrasky Kok
Vajrasky Kok added the comment: I left my comment on the review. I forgot to mail the review. -- nosy: +vajrasky ___ Python tracker <http://bugs.python.org/issue19

[issue19884] Importing readline produces erroneous output

2013-12-04 Thread Vajrasky Kok
Vajrasky Kok added the comment: Reproducible under Fedora 18. $ ./python -c "import readline" | hexdump -C 1b 5b 3f 31 30 33 34 68 |.[?1034h| 0008 $ TERM=dumb ./python -c "import readline" | hexdump -C --

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

2013-12-04 Thread Vajrasky Kok
New submission from Vajrasky Kok: [sky@localhost cutecat]$ cat /tmp/lzma_segfault.py import lzma file = lzma.LZMAFile("/tmp/file.lzma", "w") file.write(b"") file.close() with lzma.LZMAFile("/tmp/file.lzma", "w") as f: f.__init__(&q

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

2013-12-04 Thread Vajrasky Kok
Changes by Vajrasky Kok : -- title: lzma.LZMAFile.__init__() segfault when __init__ with non-existent file after executing the constructor -> lzma segfault when __init__ with non-existent file after executing the constructor (Python 2.7) ___ Pyt

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

2013-12-04 Thread Vajrasky Kok
Vajrasky Kok added the comment: Wait, you're right. I have not been able to reproduce this under Python downloaded from Python.org. [sky@localhost cpython2.7]$ ./python Python 2.7.6+ (2.7:ae9fb85ab4e0, Dec 5 2013, 08:24:11) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] on linux2 Type

[issue19775] Provide samefile() on Path objects

2013-12-04 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks for the review! Attached the patch addressing the request by Antoine. -- Added file: http://bugs.python.org/file32977/pathlib_samefile_v3.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19775] Provide samefile() on Path objects

2013-12-04 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file32977/pathlib_samefile_v3.patch ___ Python tracker <http://bugs.python.org/issue19775> ___ ___ Pytho

[issue19775] Provide samefile() on Path objects

2013-12-04 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file32978/pathlib_samefile_v3.patch ___ Python tracker <http://bugs.python.org/issue19775> ___ ___ Python-bug

[issue19775] Provide samefile() on Path objects

2013-12-04 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file32979/pathlib_samefile_v3.patch ___ Python tracker <http://bugs.python.org/issue19775> ___ ___ Python-bug

[issue19775] Provide samefile() on Path objects

2013-12-04 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file32978/pathlib_samefile_v3.patch ___ Python tracker <http://bugs.python.org/issue19775> ___ ___ Pytho

[issue19776] Provide expanduser() on Path objects

2013-12-04 Thread Vajrasky Kok
Vajrasky Kok added the comment: Documentation, please (Doc/library/pathlib.rst)! This is the docstring of Path.cwd. """Return a new path pointing to the current working directory (as returned by os.getcwd()). """ This is the docstring of Path.expanduser. "

[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2013-12-04 Thread Vajrasky Kok
New submission from Vajrasky Kok: $ sudo adduser --no-create-home cutecat Adding user `cutecat' ... Adding new group `cutecat' (1007) ... Adding new user `cutecat' (1005) with group `cutecat' ... Not creating home directory `/home/cutecat'. Enter new UNIX password:

[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2013-12-05 Thread Vajrasky Kok
Changes by Vajrasky Kok : -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue19891> ___ ___ Python-bugs-list

[issue19887] Path.resolve() ENAMETOOLONG on pathologic symlinks

2013-12-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: Whoa, Serhiy, your patch won't fly on Windows Vista. For starter, the patch does not use target_is_directory=True option in os.symlink. It needs that option when creating symlink to the directory on Windows Vista. The maximum depth that pathlib can

[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2013-12-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: I closed it because I could not reproduce it anymore. I think, it worked again after $ ./python -S I will open it again if I can consistently reproduce this bug. -- ___ Python tracker <http://bugs.python.

[issue19887] Path.resolve() ENAMETOOLONG on pathologic symlinks

2013-12-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: It works. Just a coding nitpick, instead of hardcoding os.symlink(src, dst, target_is_directory=True) in the test, you can use helper function in the test itself, self.dirlink. -- ___ Python tracker <h

[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2013-12-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, this bug is valid. I can reproduce it in Ubuntu and Fedora. bash-4.2$ ./python Python 3.4.0b1 (default:7a668179d691, Dec 6 2013, 21:44:31) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] on linux Type "help", "copyright", "credi

[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2013-12-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Additional information: When I created /home/cutecat with another user account. bash-4.2$ ./python Python 3.4.0b1 (default:7a668179d691, Dec 6 2013, 21:44:31) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] on linux Type "help", "copyright", "

[issue19887] Path.resolve() fails on complex symlinks

2013-12-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: And don't forget to use self.dirlink instead of os.symlink(src, dst, target_is_directory=True). -- ___ Python tracker <http://bugs.python.org/is

[issue19925] Add unit test for spwd module

2013-12-07 Thread Vajrasky Kok
New submission from Vajrasky Kok: So we may have buildbot with root account after all. https://mail.python.org/pipermail/python-dev/2013-December/130708.html So here is the unit test for spwd module that requires root account. -- components: Tests files: unittest_for_spwd.patch

[issue19925] Add unit test for spwd module

2013-12-07 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33034/unittest_for_spwd.patch ___ Python tracker <http://bugs.python.org/issue19925> ___ ___ Python-bug

[issue19925] Add unit test for spwd module

2013-12-07 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33035/unittest_for_spwd.patch ___ Python tracker <http://bugs.python.org/issue19925> ___ ___ Python-bug

[issue19926] Refactor unit test in abstract numbers test

2013-12-07 Thread Vajrasky Kok
New submission from Vajrasky Kok: There are superfluous lines and unused import in Lib/test/test_abstract_numbers.py. Attached the patch to remove superfluous lines and unused import. -- components: Tests files: refactor_test_abstract_number.patch keywords: patch messages: 205514 nosy

[issue19921] Path.mkdir(0, True) always fails

2013-12-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Fails on Windows Vista. ...s..s..s..s...F. .. == FAIL: test_mkdir_parents (__main__.PathTest

[issue19925] Add unit test for spwd module

2013-12-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Hi Claudiu, thanks for the review and the knowledge that on Windows, we don't have attribute getuid of os. Here is the updated patch. I do not check specifically for Windows but only whether the platform can import spwd module or not. That should be e

[issue19930] os.makedirs('dir1/dir2', 0) always fails

2013-12-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Fails on Windows Vista. == FAIL: test_mode (__main__.MakedirTests) -- Traceback (most recent call last): File "Lib

[issue19933] Round default argument for "ndigits"

2013-12-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary patch. After patch: round(1.23, 0) => 1 not 1.0 round(4.67, 0) => 5 not 5.0 -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file33051/fix_round_with_zero_ndigits

[issue19933] Round default argument for "ndigits"

2013-12-08 Thread Vajrasky Kok
Changes by Vajrasky Kok : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue19933> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19934] collections.Counter.most_common does not document `None` as acceptable input.

2013-12-08 Thread Vajrasky Kok
Changes by Vajrasky Kok : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue19934> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19933] Round default argument for "ndigits"

2013-12-09 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33053/fix_doc_round_ndigits.patch ___ Python tracker <http://bugs.python.org/issue19933> ___ ___ Pytho

[issue19933] Round default argument for "ndigits"

2013-12-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, here is the patch to fix the doc. -- Added file: http://bugs.python.org/file33052/fix_doc_round_ndigits.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19933] Round default argument for "ndigits"

2013-12-09 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33052/fix_doc_round_ndigits.patch ___ Python tracker <http://bugs.python.org/issue19933> ___ ___ Pytho

[issue19933] Round default argument for "ndigits"

2013-12-09 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33053/fix_doc_round_ndigits.patch ___ Python tracker <http://bugs.python.org/issue19933> ___ ___ Pytho

[issue19933] Round default argument for "ndigits"

2013-12-09 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33054/fix_doc_round_ndigits.patch ___ Python tracker <http://bugs.python.org/issue19933> ___ ___ Pytho

[issue19933] Round default argument for "ndigits"

2013-12-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the updated doc fix. Anyway, why not round(1.2) -> 1.0 in the first place? Just curious. -- Added file: http://bugs.python.org/file33060/fix_doc_round_ndigits_v2.patch ___ Python tracker &l

[issue20069] Add unit test for os.chown

2014-06-24 Thread Vajrasky Kok
Vajrasky Kok added the comment: Claudiu, I have revamped the test and put it in dedicated test class. Thanks! 1. About assertRaisesRegex, sorry, you're right. We can use it with "with" statement. Prior to this, I used it like this: with self.assertRaisesRegex(

[issue20069] Add unit test for os.chown

2014-06-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, I removed "as _". I thought it was not possible. -- Added file: http://bugs.python.org/file35786/add_unit_test_os_chown_v5.patch ___ Python tracker <http://bugs.python.o

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

2014-06-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Raymond, thanks for committing my patch but my name was already put into ACKS before this commit. $ grep -R Vajrasky Misc/ACKS Vajrasky Kok Vajrasky Kok -- ___ Python tracker <http://bugs.python.org/issue19

[issue21921] Example in asyncio event throws resource usage warning

2014-07-05 Thread Vajrasky Kok
New submission from Vajrasky Kok: These examples coming from: https://docs.python.org/3/library/asyncio-eventloop.html#example-hello-world-callback and https://docs.python.org/3/library/asyncio-eventloop.html#example-set-signal-handlers-for-sigint-and-sigterm throw resource usage warning

[issue22092] Executing some tests inside Lib/unittest/test individually throws Error

2014-07-27 Thread Vajrasky Kok
New submission from Vajrasky Kok: For examples: $ ./python Lib/unittest/test/test_runner.py Traceback (most recent call last): File "Lib/unittest/test/test_runner.py", line 10, in from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun SystemError: Parent mod

[issue22092] Executing some tests inside Lib/unittest/test individually throws Error

2014-07-27 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file36132/fix_test_inside_unittest.patch ___ Python tracker <http://bugs.python.org/issue22092> ___ ___

[issue22092] Executing some tests inside Lib/unittest/test individually throws Error

2014-07-27 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file36133/fix_test_inside_unittest.patch ___ Python tracker <http://bugs.python.org/issue22092> ___ ___ Pytho

[issue22093] Compiling python on OS X gives warning about compact unwind

2014-07-27 Thread Vajrasky Kok
New submission from Vajrasky Kok: OS X version 10.9.4. $ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.3.0 Thread

[issue22092] Executing some tests inside Lib/unittest/test individually throws Error

2014-08-03 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch based on Ezio's review. Thanks! -- Added file: http://bugs.python.org/file36237/fix_test_inside_unittest_v2.patch ___ Python tracker <http://bugs.python.org/is

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

2014-08-05 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, here is the problem. In Windows, you get DeprecationWarning if you pass bytes object to method such as os.lstat. foo.py == import os os.lstat(b"C:\\Users\\vajrasky\\Code\\cpython\\python.bat") C:\Users\vajrasky\Code\cpython>python.bat -Wd

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

2014-08-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, here is the patch based on Serhiy's suggestion. -- keywords: +patch Added file: http://bugs.python.org/file36289/silent_warning_shutil_rmtree.patch ___ Python tracker <http://bugs.python.org/is

[issue22156] Fix compiler warnings

2014-08-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: Victor, your patch fixes most of the pesky warnings. However you left one warning left (at least in Mac OS X 10.9.4). Objects/unicodeobject.c:4831:43: warning: comparison of integers of different signs: 'unsigned long' and 'long' [-W

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

2014-08-07 Thread Vajrasky Kok
Vajrasky Kok added the comment: In test_shutil.py, yes, this is the only place. But in other tests, we got different type of warnings, such as: test_mailbox.py:46: RuntimeWarning: tests may fail, delete still pending for @test_4456_tmp test_decimal:5608: UserWarning: C tests skipped: no

[issue22147] PosixPath() constructor should not accept strings with embedded NUL bytes

2014-08-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch. -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file36327/embedded_null_in_path.patch ___ Python tracker <http://bugs.python.org/issue22

[issue19933] Round default argument for "ndigits"

2013-12-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: In case we want to add consistency with None ndigits, here is the patch adding support for None value for ndigits parameter. This one looks like a low-risk addition but since Python 3.4 is in beta phase -- Added file: http://bugs.python.org

[issue17762] platform.linux_distribution() should honor /etc/os-release

2013-12-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: This patch needs to be updated to tip since this commit: http://hg.python.org/cpython/rev/4580976c07cb -- ___ Python tracker <http://bugs.python.org/issue17

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

2013-12-10 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks for the review, Antoine! Here is the updated patch. I haven't tested it on Windows yet because I want to clarify one thing. Let's say we have this valid directory: /tmp/@test123 <= directory And this directory only has one valid file:

[issue18996] unittest: more helpful truncating long strings

2013-12-10 Thread Vajrasky Kok
Vajrasky Kok added the comment: Hello, Serhiy. Do you want to remove this debug messaging? -- ___ Python tracker <http://bugs.python.org/issue18996> ___ ___ Pytho

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

2013-12-11 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch with Windows support. I notice there is difference regarding resolving symbolic link with parent dir (linkA/..) between Posix and Windows. On Windows, if linkY points to dirB, 'dirA\linkY\..' resolves to 'dirA' without r

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

2013-12-11 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33089/add_non_strict_resolve_pathlib_v3.patch ___ Python tracker <http://bugs.python.org/issue19

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

2013-12-11 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33090/add_non_strict_resolve_pathlib_v3.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19957] Minor refactor of Lib/email/encoders.py

2013-12-11 Thread Vajrasky Kok
New submission from Vajrasky Kok: In Lib/email/encoders.py: def encode_7or8bit(msg): """Set the Content-Transfer-Encoding header to 7bit or 8bit.""" orig = msg.get_payload(decode=True) if orig is None: # There's no payload. For

[issue19956] inspect.getsource(obj.foo) fails when foo is an injected method constructed from another method

2013-12-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: FYI, if you change: setattr(b, 'say', types.MethodType(f.say, b)) to: setattr(b, 'say', types.MethodType(Foo.say, b)) it will print the source correctly. -- nosy: +vajrasky ___ P

[issue19957] Minor refactor of Lib/email/encoders.py

2013-12-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, here is the patch on which we removed checking of special case for iso-2022-*. -- Added file: http://bugs.python.org/file33109/minor_refactor_encoders_in_email_lib_v2.patch ___ Python tracker <h

[issue19970] Typo of `immediatly` and `agin` words

2013-12-13 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33115/fix_typo_agin_and_immediatly_python33.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19970] Typo of `immediatly` and `agin` words

2013-12-13 Thread Vajrasky Kok
New submission from Vajrasky Kok: ethan@amiau:~/Documents/code/python/cpython3.4$ grep -R immediatly * Doc/library/asyncio-protocol.rst::meth:`Transport.close` can be called immediatly after Lib/test/test_signal.py:# unblock the pending signal calls immediatly the signal handler

[issue19971] Remove Tulip words from asyncio documentation/code

2013-12-13 Thread Vajrasky Kok
New submission from Vajrasky Kok: I was reading the documentation about asyncio. Here is the introduction paragraph: Doc/library/asyncio.rst === This module provides infrastructure for writing single-threaded concurrent code using coroutines, multiplexing I/O access over

[issue19099] struct.pack fails first time with unicode fmt

2013-12-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, I think the error message can be improved because in Python 2.7 we differentiate very clearly the string from the unicode. >>> import struct >>> struct.Struct(1) Traceback (most recent call last): File "", line 1, in TypeErr

[issue19970] Typo of `immediatly` and `agin` words

2013-12-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: R. David Murray, there is a reason I create separate patches for 3.3 and 3.4. You couldn't just merge them. Python 3.4 has additional file with typo, which is immediatly in Doc/library/asyncio-protoco

[issue16355] inspect.getcomments() does not work in the interactive shell

2013-12-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: So, I just found out that imp has been deprecated. Here is the patch that uses importlib.machinery instead of imp.load_source. -- Added file: http://bugs.python.org/file33127/issue16355_v5.diff ___ Python tracker

[issue19974] tarfile doesn't overwrite symlink by directory

2013-12-14 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary path. It works and tested on Linux. I'll check the behaviour on Windows later. -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file33128/fix_tarfile_overwrites_symlink.

[issue19974] tarfile doesn't overwrite symlink by directory

2013-12-14 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33128/fix_tarfile_overwrites_symlink.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19974] tarfile doesn't overwrite symlink by directory

2013-12-14 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33129/fix_tarfile_overwrites_symlink.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view.

2013-12-14 Thread Vajrasky Kok
Vajrasky Kok added the comment: This is a bug from Sqlite. Sqlite 3.7 is afflicted. Solution: upgrade to sqlite 3.8. http://sqlite.1065341.n5.nabble.com/sqlite3-column-name-contains-quotes-for-views-td65226.html http://www.sqlite.org/src/info/5526e0aa3c -- nosy: +vajrasky

[issue19984] Add new format of fix length string for PyErr_Format

2013-12-14 Thread Vajrasky Kok
New submission from Vajrasky Kok: This ticket sprung from this discussion: https://mail.python.org/pipermail/python-dev/2013-December/130756.html Basically I am always confused when writing error message in C-API. Is it: PyErr_Format(PyExc_TypeError,"can't intern %.400s", s-&g

[issue19984] Add new format of fix length string for PyErr_Format

2013-12-14 Thread Vajrasky Kok
Changes by Vajrasky Kok : Added file: http://bugs.python.org/file33142/add_T_format_for_PyErr_Format.patch ___ Python tracker <http://bugs.python.org/issue19984> ___ ___

[issue19984] Add new format of fix length string for PyErr_Format

2013-12-14 Thread Vajrasky Kok
Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33141/add_T_format_for_PyErr_Format.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19984] Add new format of fixed length string for PyErr_Format

2013-12-15 Thread Vajrasky Kok
Changes by Vajrasky Kok : -- title: Add new format of fix length string for PyErr_Format -> Add new format of fixed length string for PyErr_Format ___ Python tracker <http://bugs.python.org/issu

[issue19985] Not so correct error message when initializing Struct with ill argument

2013-12-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: And here is the patch to better error message in Python 2.7. -- Added file: http://bugs.python.org/file33144/better_error_message_struct_python_27.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19985] Not so correct error message when initializing Struct with ill argument

2013-12-15 Thread Vajrasky Kok
New submission from Vajrasky Kok: Python 3.4 (3.3 is also afflicted: >>> import struct >>> struct.Struct(3) Traceback (most recent call last): File "", line 1, in TypeError: Struct() argument 1 must be a bytes object, not int >>> struct.Struct(

[issue19099] struct.pack fails first time with unicode fmt

2013-12-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: Nevermind, I already created this issue. http://bugs.python.org/issue19985 -- ___ Python tracker <http://bugs.python.org/issue19

[issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view.

2013-12-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: Upgrading sqlite3 in Windows maybe easy but Python 2.7.6 and 3.3.3 on Windows were built with defected sqlite3. Maybe at least we can provide the correct sqlite3 version next time we release Windows version of Python 2.7 and 3.3? Python 3.3 comes with sqlite3

[issue19974] tarfile doesn't overwrite symlink by directory

2013-12-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch that works both on Windows and Linux. -- Added file: http://bugs.python.org/file33147/fix_tarfile_overwrites_symlink_v2.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19985] Not so correct error message when initializing Struct with ill argument

2013-12-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch to address Serhiy's request. Hmmm, if string means both string and unicode in Python 2.7, should we fix these behaviours? >>> import _csv >>> _csv.register_dialect(2) Traceback (most recent call last): File ""

[issue19990] Add unittests for imghdr module

2013-12-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: Beside my review, I think we need one more test that tests the invalid image file, for example file with header b'cutecat'. -- nosy: +vajrasky ___ Python tracker <http://bugs.python.o

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

2013-12-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: How about this doc fix? -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file33159/fix_doc_parse_non_valid_json_float.patch ___ Python tracker <http://bugs.python.org/issue19

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

2013-12-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, I added unit test for this edge case. -- Added file: http://bugs.python.org/file33160/parse_non_valid_json_float_with_unit_test.patch ___ Python tracker <http://bugs.python.org/issue19

[issue19887] Path.resolve() fails on complex symlinks

2013-12-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: The patch passed on Windows Vista. -- ___ Python tracker <http://bugs.python.org/issue19887> ___ ___ Python-bugs-list mailin

[issue19997] imghdr.what doesn't accept bytes paths

2013-12-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: Why limit to str and bytes. Open can accept integer as well. I am asking not suggesting. >>> with open('/tmp/cutecat.txt', 'wb') as f: ... f.write(b'cutecat') ... 7 >>> a = open('/tmp/cutecat.txt

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

2013-12-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: Updated patch to tip. Later, I refactor Windows code to make sure it does not loop forever. -- Added file: http://bugs.python.org/file33171/add_non_strict_resolve_pathlib_v4.patch ___ Python tracker <h

[issue19994] re.match does not return or takes long time

2013-12-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: Tim, if you made this ticket as invalid, why don't you close it? Any reason? -- nosy: +vajrasky ___ Python tracker <http://bugs.python.org/is

<    1   2   3   4   5   6   >