[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Correction: 1. broken symlink overwrites valid symlink, 2. ordinary file overwrites broken symlink. -- ___ Python tracker <https://bugs.python.org/issue19

[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Martin, thank you for your advice. I have added additional two test cases for broken symlink case. 1. broken symlink overwrites ordinary file, 2. ordinary file overwrites broken symlink. I hope that is enough. Let me know if you have another concern

[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: I have added test case for broken symlinks. I am not sure whether this is necessary or not. But anyway I have added it. -- ___ Python tracker <https://bugs.python.org/issue19

[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: After experimenting with lexists, I don't think I can simplify it with lexists. -- ___ Python tracker <https://bugs.python.org/issue19

[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Sorry, Martin. I just understood what you suggested. I thought you were saying lexists to replace islink, but it is to replace the complex if condition. Let me work on it. -- ___ Python tracker <ht

[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: "I could not find a case where these methods return different result." -> This is wrong. My mistake. os.lexists returns True for non symbolic link file while os.islink returns False. -- ___ Python tr

[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Martin Panter, I have modernized the patch. About your suggestion: 1. "import errno" -> Yes, this is unnecessary. I have removed it. 2. Use os.path.lexists instead of os.path.islink for broken symlink -> The thing is os.path.islink r

[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Change by Vajrasky Kok : -- pull_requests: +10895, 10896, 10897, 10898 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Change by Vajrasky Kok : -- pull_requests: +10895, 10896, 10898 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Change by Vajrasky Kok : -- pull_requests: +10895, 10896 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue19974> ___ ___ Py

[issue19974] tarfile doesn't overwrite symlink by directory

2019-01-06 Thread Vajrasky Kok
Change by Vajrasky Kok : -- pull_requests: +10895 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue19974> ___ ___ Python-

[issue19974] tarfile doesn't overwrite symlink by directory

2018-12-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: Martin Panter, thank you for reviewing my patch. Let me rework it. It has been a while (4 years!!!). -- ___ Python tracker <https://bugs.python.org/issue19

[issue18799] Resurrect and fix test_404 in Lib/test/test_xmlrpc.py

2018-12-17 Thread Vajrasky Kok
Change by Vajrasky Kok : -- pull_requests: +10435 ___ Python tracker <https://bugs.python.org/issue18799> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35519] [2.7] Can not run test without test module for tests which import random module

2018-12-17 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, thanks, Victor. Your suggestion to rename Lib/test/bisect.py to Lib/test/bisect_cmd.py works. My question is why you fixed in 2.7 branch only? This problem persists in master (3.8). Ah, I think because I use cpython2 directory name, you thought I used

[issue35519] Can not run test without test module for tests which import random module

2018-12-17 Thread Vajrasky Kok
New submission from Vajrasky Kok : $ git clone g...@github.com:python/cpython.git cpython2 $ cd cpython2 $ ./configure --with-pydebug $ make -j $ ./python Lib/test/test_xmlrpc.py Traceback (most recent call last): File "Lib/test/test_xmlrpc.py", line 8, in import xml

[issue18799] Resurrect and fix test_404 in Lib/test/test_xmlrpc.py

2018-12-15 Thread Vajrasky Kok
Vajrasky Kok added the comment: Serhiy, okay, I'll create a pull request soon (in 2-3 days). -- ___ Python tracker <https://bugs.python.org/issue18799> ___ ___

[issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support

2017-03-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, this is the pull request: https://github.com/python/cpython/pull/822 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support

2017-03-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, Serhiy. I'll create a pull request. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27838] test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot

2016-09-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: The only way I can reproduce this in Linux (still downloading FreeBSD Current), is to remove user from the group before (I did it in different terminal) executing os.chown method to that specific group id. I am thinking to add more information in the exception

[issue27838] test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot

2016-09-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: "The group here is not the group of buildbot user. The group here refers to all groups in the system." -> I retract back this statement. -- ___ Python tracker <rep...@bugs.python.org> <

[issue27838] test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot

2016-09-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: "According to my (non-expert) reading of the code, the test skips (or is supposed to skip) unless group count of uid is > 1. The group membership of the buildbot user this worker runs as is only 'buildbot' and on that basis wouldn't a skip expected?&quo

[issue24412] setUpClass equivalent for addCleanup

2015-07-02 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch. -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file39844/addCleanupClass.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24412

[issue24464] Got warning when compiling sqlite3 module on Mac OSX

2015-06-18 Thread Vajrasky Kok
New submission from Vajrasky Kok: I got this warning when compiling sqlite3 module. gcc -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -DMODULE_NAME=sqlite3 -DSQLITE_OMIT_LOAD_EXTENSION=1 -IModules/_sqlite -I/usr/include -I./Include -I

[issue24382] Fail to build time module on Mac

2015-06-04 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the error message: building 'time' extension gcc -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I./Include -I. -IInclude -I/usr/local/include -I/Users/sky/Code/python/cpython/Include -I/Users/sky

[issue24382] Fail to build time module on Mac

2015-06-04 Thread Vajrasky Kok
New submission from Vajrasky Kok: On my OSX Yosemite 10 with GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53), I fail to build time module. Failed to build these modules: time Here is the patch to fix the compile error. -- components: Macintosh files

[issue20069] Add unit test for os.chown

2014-12-25 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the latest patch which executes unittest.main inside __main__ based on R. David Murray's review. Thanks! -- Added file: http://bugs.python.org/file37540/add_unit_test_os_chown_v7.patch ___ Python tracker rep

[issue20069] Add unit test for os.chown

2014-11-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch based on R. David Murray's review. Thanks! Thanks also for the work of Cormac O'Brien. -- Added file: http://bugs.python.org/file37096/add_unit_test_os_chown_v6.patch ___ Python tracker rep

[issue22642] trace module: unclear error message

2014-10-29 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks, Berker Peksag, for the review. Here is the updated patch with the test. -- Added file: http://bugs.python.org/file37068/better_err_listfuncs_trace_v2.patch ___ Python tracker rep...@bugs.python.org http

[issue22674] strsignal() missing from signal module

2014-10-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary patch. It's a thin wrapper of strsignal. Some issues and things: 1. About Benjamin Peterson's request, what is the name of the dictionary supposed to be? Is everyone okay with Benjamin's suggestion? 2. About George Brandl's question

[issue22642] trace module: unclear error message

2014-10-19 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch. -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file36967/better_err_listfuncs_trace.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22642

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

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

[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

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

[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(bC:\\Users\\vajrasky\\Code\\cpython\\python.bat) C:\Users\vajrasky\Code\cpythonpython.bat -Wdefault foo.py

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

[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 module from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun SystemError: Parent module

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

2014-07-27 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file36132/fix_test_inside_unittest.patch ___ Python tracker rep...@bugs.python.org 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 sky@speaklikeaking.com: Added file: http://bugs.python.org/file36133/fix_test_inside_unittest.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22092

[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

[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

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

[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 rep...@bugs.python.org http

[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(PermissionError

[issue20069] Add unit test for os.chown

2014-06-18 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch based on Claudiu's comment and Serhiy's commit (http://hg.python.org/cpython/rev/4b187f5aa960). Claudiu (Thanks!!!), I can not apply two of your suggestions: You could use support.import_module here in order to skip the test if pwd can't

[issue21758] Not so correct documentation about asyncio.subprocess_shell method

2014-06-14 Thread Vajrasky Kok
New submission from Vajrasky Kok: subprocess_shell in asyncio accepts cmd as a string or a bytes but the test unit, the documentation and the exception indicates that it only accepts a string. -- assignee: docs@python components: Documentation, asyncio files

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: It looks strange to use a float as maxsize. = It is. But the float could be coming programmatically. Float value interpreted as infinity could give a shock for some people. maybe to cast maxsize parameter to an int. = ceiling or flooring

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-11 Thread Vajrasky Kok
New submission from Vajrasky Kok: import asyncio loop = asyncio.get_event_loop() q = asyncio.Queue(maxsize=1.2, loop=loop) q.put_nowait(1) q.put_nowait(1) q.put_nowait(1) q.put_nowait(1) q.put_nowait(1) and so on It seems counter intuitive for my innocent eyes. As comparison

[issue21476] Inconsitent behaviour between BytesParser.parse and Parser.parse

2014-06-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the patch based on R. David Murray's nitpick. -- Added file: http://bugs.python.org/file35537/bytes_parser_dont_close_file_v5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21476

[issue21476] Inconsitent behaviour between BytesParser.parse and Parser.parse

2014-06-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Ok, here is the updated patch based on R. David Murray's help. Thanks! -- Added file: http://bugs.python.org/file35424/bytes_parser_dont_close_file_v4.patch ___ Python tracker rep...@bugs.python.org http

[issue21476] Inconsitent behaviour between BytesParser.parse and Parser.parse

2014-05-31 Thread Vajrasky Kok
Vajrasky Kok added the comment: Serhiy, here is the latest patch incorporating your request. -- Added file: http://bugs.python.org/file35420/bytes_parser_dont_close_file_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue21476] Inconsitent behaviour between BytesParser.parse and Parser.parse

2014-05-31 Thread Vajrasky Kok
Vajrasky Kok added the comment: The Parse class does not throw exception if given invalid message: Assume /tmp/a.txt contains garbage, such as: With this code: with open(/tmp/a.txt, r) as fp: msg = email.parser.Parser().parse(fp) # does not throw exception print(msg

[issue21476] Inconsitent behaviour between BytesParser.parse and Parser.parse

2014-05-30 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the simple patch based on David Murray's thought. -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file35413/bytes_parser_dont_close_file.patch ___ Python tracker rep...@bugs.python.org

[issue21476] Inconsitent behaviour between BytesParser.parse and Parser.parse

2014-05-30 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thank you, Serhiy, for the review! Here is the updated patch. -- Added file: http://bugs.python.org/file35418/bytes_parser_dont_close_file_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

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

2014-05-30 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19145

[issue21599] Argument transport in attach and detach method in Server class in base_events file is not used

2014-05-28 Thread Vajrasky Kok
New submission from Vajrasky Kok: In Lib/asyncio/base_events.py, we have these lines of code: --- def attach(self, transport): assert self.sockets is not None self.active_count += 1 def detach(self, transport

[issue21592] Make statistics.median run in linear time

2014-05-28 Thread Vajrasky Kok
Vajrasky Kok added the comment: Yeah, I remember I tried to improve the performance of the median in the past using median-of-k algorithm. But too bad I could not beat sorted C function efficiency. Maybe you have a better luck! -- nosy: +vajrasky

[issue21601] Cancel method for Asyncio Task is not documented

2014-05-28 Thread Vajrasky Kok
New submission from Vajrasky Kok: https://docs.python.org/3.5/library/asyncio-task.html#task The cancel method is not documented although it is a part of public API. Here is the patch to fix the doc. -- assignee: docs@python components: Documentation files: fix_doc_asyncio_task.patch

[issue20689] socket.AddressFamily is absent in html pydoc

2014-05-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: I found the culprit. The AddressFamily is not registered in _socket module. I created a preliminary patch to show the culprit. -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file35379/pydoc_display_AddressFamily.patch

[issue19925] Add unit test for spwd module

2014-05-25 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks, Serhiy, for the review! Here is the updated patch. -- Added file: http://bugs.python.org/file35347/unittest_for_spwd_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19925

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

2014-03-31 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks for committing my patch, Yury. But you forgot to remove Lib/test/test_asyncio/tests.txt. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20668

[issue21058] tempfile.NamedTemporaryFile leaks file descriptor when fdopen fails

2014-03-25 Thread Vajrasky Kok
Vajrasky Kok added the comment: There is a typo. s/io.pen/io.open/ -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file34617/fix_typo_21058.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21058

[issue20856] bz2.peek always peeks all the remaining bytes ignoring n argument

2014-03-06 Thread Vajrasky Kok
New submission from Vajrasky Kok: # Bug demo TEXT_LINES = [ b'cutecat\n', b'promiscuousbonobo\n', ] TEXT = b''.join(TEXT_LINES) import bz2 filename = '/tmp/demo.bz2' with open(filename, 'wb') as f: f.write(bz2.compress(TEXT)) with bz2.BZ2File(filename) as bz2f: pdata = bz2f.peek

[issue20856] bz2.peek always peeks all the remaining bytes ignoring n argument

2014-03-06 Thread Vajrasky Kok
Vajrasky Kok added the comment: Just curious, why the exact number of bytes returned is unspecified in bz2 (in other words, n argument is ignored)? gzip uses n argument. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20856

[issue20779] Add pathlib.chown method

2014-02-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: Pragmatic reasons: I use chown moderately often. Usually as root, I want to change the uid of the files after generating a bunch of files. But I almost never changed gid. I am in two mind whether I should add lchown as well or not (just like lchmod) and make

[issue20779] Add pathlib.chown method

2014-02-26 Thread Vajrasky Kok
New submission from Vajrasky Kok: For pragmatic and philosophical reasons, I would argue that we should add chown to pathlib library. -- components: Library (Lib) files: add_chown_to_pathlib.patch keywords: patch messages: 212245 nosy: pitrou, vajrasky priority: normal severity: normal

[issue20780] Shadowed (duplicate name but different body) test in test_statistics

2014-02-26 Thread Vajrasky Kok
New submission from Vajrasky Kok: Line 994 of Lib/test/test_statistics.py: def test_decimal_mismatched_infs_to_nan(self): # Test adding Decimal INFs with opposite sign returns NAN. inf = Decimal('inf') data = [1, 2, inf, 3, -inf, 4] with decimal.localcontext

[issue20780] Shadowed (duplicate name but different body) test in test_statistics

2014-02-26 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Added file: http://bugs.python.org/file34229/fix_shadowed_test_in_test_statistics.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20780

[issue20780] Shadowed (duplicate name but different body) test in test_statistics

2014-02-26 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file34228/fix_shadowed_test_in_test_statistics.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20780

[issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded

2014-02-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: From http://hg.python.org/cpython/rev/1a1a9d6fb278 +t1 = TESTFN +#t1 = writeTmp(1, ['A\nB\r\nC\rD+IKw-'], mode='wb') +self.addCleanup(safe_unlink, TESTFN) You left out the debugging statement. And this English statement: # Unlikely UTF

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

  1   2   3   4   5   6   >