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.
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
--
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
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
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
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
Changes by Vajrasky Kok :
Removed file: http://bugs.python.org/file32977/pathlib_samefile_v3.patch
___
Python tracker
<http://bugs.python.org/issue19775>
___
___
Pytho
Changes by Vajrasky Kok :
Added file: http://bugs.python.org/file32978/pathlib_samefile_v3.patch
___
Python tracker
<http://bugs.python.org/issue19775>
___
___
Python-bug
Changes by Vajrasky Kok :
Added file: http://bugs.python.org/file32979/pathlib_samefile_v3.patch
___
Python tracker
<http://bugs.python.org/issue19775>
___
___
Python-bug
Changes by Vajrasky Kok :
Removed file: http://bugs.python.org/file32978/pathlib_samefile_v3.patch
___
Python tracker
<http://bugs.python.org/issue19775>
___
___
Pytho
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.
"
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:
Changes by Vajrasky Kok :
--
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue19891>
___
___
Python-bugs-list
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
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.
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
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
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", "
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
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
Changes by Vajrasky Kok :
Removed file: http://bugs.python.org/file33034/unittest_for_spwd.patch
___
Python tracker
<http://bugs.python.org/issue19925>
___
___
Python-bug
Changes by Vajrasky Kok :
Added file: http://bugs.python.org/file33035/unittest_for_spwd.patch
___
Python tracker
<http://bugs.python.org/issue19925>
___
___
Python-bug
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
Vajrasky Kok added the comment:
Fails on Windows Vista.
...s..s..s..s...F.
..
==
FAIL: test_mkdir_parents (__main__.PathTest
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
Vajrasky Kok added the comment:
Fails on Windows Vista.
==
FAIL: test_mode (__main__.MakedirTests)
--
Traceback (most recent call last):
File "Lib
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
Changes by Vajrasky Kok :
--
nosy: +mark.dickinson
___
Python tracker
<http://bugs.python.org/issue19933>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Vajrasky Kok :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue19934>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Vajrasky Kok :
Added file: http://bugs.python.org/file33053/fix_doc_round_ndigits.patch
___
Python tracker
<http://bugs.python.org/issue19933>
___
___
Pytho
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
Changes by Vajrasky Kok :
Removed file: http://bugs.python.org/file33052/fix_doc_round_ndigits.patch
___
Python tracker
<http://bugs.python.org/issue19933>
___
___
Pytho
Changes by Vajrasky Kok :
Removed file: http://bugs.python.org/file33053/fix_doc_round_ndigits.patch
___
Python tracker
<http://bugs.python.org/issue19933>
___
___
Pytho
Changes by Vajrasky Kok :
Added file: http://bugs.python.org/file33054/fix_doc_round_ndigits.patch
___
Python tracker
<http://bugs.python.org/issue19933>
___
___
Pytho
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
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(
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
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
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
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
Changes by Vajrasky Kok :
Removed file: http://bugs.python.org/file36132/fix_test_inside_unittest.patch
___
Python tracker
<http://bugs.python.org/issue22092>
___
___
Changes by Vajrasky Kok :
Added file: http://bugs.python.org/file36133/fix_test_inside_unittest.patch
___
Python tracker
<http://bugs.python.org/issue22092>
___
___
Pytho
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
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
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
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
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
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
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
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
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
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:
Vajrasky Kok added the comment:
Hello, Serhiy. Do you want to remove this debug messaging?
--
___
Python tracker
<http://bugs.python.org/issue18996>
___
___
Pytho
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
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
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
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
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
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
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
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
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
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
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
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
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.
Changes by Vajrasky Kok :
Removed file:
http://bugs.python.org/file33128/fix_tarfile_overwrites_symlink.patch
___
Python tracker
<http://bugs.python.org/issue19
Changes by Vajrasky Kok :
Added file:
http://bugs.python.org/file33129/fix_tarfile_overwrites_symlink.patch
___
Python tracker
<http://bugs.python.org/issue19
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
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
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>
___
___
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
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
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
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(
Vajrasky Kok added the comment:
Nevermind, I already created this issue. http://bugs.python.org/issue19985
--
___
Python tracker
<http://bugs.python.org/issue19
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
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
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 ""
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
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
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
Vajrasky Kok added the comment:
The patch passed on Windows Vista.
--
___
Python tracker
<http://bugs.python.org/issue19887>
___
___
Python-bugs-list mailin
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
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
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
301 - 400 of 574 matches
Mail list logo