Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue6625>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10310>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10308>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10309>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10133>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10086>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue2921>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10070>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10231>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue960325>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue9611>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
I wrote a small function to call WriteConsoleOutputA() and
WriteConsoleOutputW() in Python to do some tests. It works correclty, except if
I change the code page using chcp command. It looks like the problem is that
the chcp command changes the console code
STINNER Victor added the comment:
sys_write_stdtout.patch: Create sys.write_stdout() test function to call
WriteConsoleOutputA() or WriteConsoleOutputW() depending on the input types
(bytes or str).
--
keywords: +patch
Added file: http://bugs.python.org/file19493
New submission from STINNER Victor :
In Python3, the following pattern becomes common:
with open(fullname, 'rb') as fp:
coding, line = tokenize.detect_encoding(fp.readline)
with open(fullname, 'r', encoding=coding) as fp:
...
It open
STINNER Victor added the comment:
> 1. It opens the source file one more time. This is probably acceptable
> because existing code already opens it at least four times when -m (show
> missing) option is selected. (Twice in find_executable_linenos() and
> twice in linecache.getline
New submission from STINNER Victor :
On "NetBSD 5 i386 3.x" buildbot, testTanh() of test_math fails because the sign
of wrong.
configure scripts has a test to check if tanh(-0.0) keeps the sign or no, and
on this buildbot the result is "no". pyconfig.h contains a
TANH
Changes by STINNER Victor :
--
nosy: +mark.dickinson
___
Python tracker
<http://bugs.python.org/issue10337>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
test_cmath does also fail:
http://www.python.org/dev/buildbot/builders/NetBSD%205%20i386%203.x/builds/237/steps/test/logs/stdio
==
FAIL: test_specific_values (test.test_cmath.CMathTests
Changes by STINNER Victor :
--
nosy: +gregory.p.smith
___
Python tracker
<http://bugs.python.org/issue10337>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from STINNER Victor :
http://www.python.org/dev/buildbot/builders/x86%20debian%20parallel%203.x/builds/806/steps/test/logs/stdio
test test_lib2to3 failed -- multiple errors occurred
==
ERROR: test_bom (lib2to3
Changes by STINNER Victor :
--
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue10338>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> In the test, do you have to remove the TESTFN file manually? Isn’t that
> handled by unittest or regrtest?
The test uses TESTFN+'.py', not TESTFN ;-)
> I think the name of the function could be better but I don’t have a
> proposal.
STINNER Victor added the comment:
> what about open(.., encoding="fromcookie")?
Please don't do that. It remembers me the magical str.encode() method of
Python2. I prefer simple API with limited features: if you want to open a
Python script, use tokenize.open(), if you w
STINNER Victor added the comment:
On Saturday 06 November 2010 17:00:15 you wrote:
> Note that it is useful for opening any text file with an encoding cookie,
> not only python source code, so "tokenize.open()" sounds attractive.
Ok, the new patch (tokenize_open-2.patch) us
STINNER Victor added the comment:
Here is a patch skipping math and cmath tests if TANH_PRESERVES_ZERO_SIGN is 0.
--
keywords: +patch
Added file: http://bugs.python.org/file19532/skip_tanh_sign.patch
___
Python tracker
<http://bugs.python.
Changes by STINNER Victor :
Added file: http://bugs.python.org/file19533/skip_tanh_sign-2.patch
___
Python tracker
<http://bugs.python.org/issue10337>
___
___
Python-bug
STINNER Victor added the comment:
Commited to Python 3.2 (r86299) after a review of Mark Dickson on IRC. Thanks
Mark ;-)
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
> P.S. Greg, as the owner of the buildbot, do you feel like reporting this
> upstream? I get the impression that it's easier to do the reporting
> directly from the NetBSD machine in question...
I already reported the bug upstream: "Thank y
STINNER Victor added the comment:
NetBSD bug report:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44057
--
___
Python tracker
<http://bugs.python.org/issue10
STINNER Victor added the comment:
This issue might be splitted in multiple issue: one issue per file type (eg.
Makefile, RPM spec file, etc.).
--
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
$ LANG=C ./python -m test.regrtest test_imp test_trace
[1/2] test_imp
[2/2] test_trace
...
UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 5:
ordinal not in range(128)
issue10329.diff fixes this failure.
STINNER Victor added the comment:
I commited Alexander's fix for #10329: r86303. The trace module now uses the
input Python script encoding, instead of the locale encoding.
--
___
Python tracker
<http://bugs.python.org/is
STINNER Victor added the comment:
I don't understand exactly the goal of this issue. Different people described
various bugs of the Windows console, but I don't see any problem with Python
here. It looks like it's just not possible to display correctly unicode with
the Windo
STINNER Victor added the comment:
+try:
+with open(filename, 'rb') as fp:
+encoding, _ = tokenize.detect_encoding(fp.readline)
+except IOError:
+encoding = None
You should use 'utf-8' instead of N
New submission from STINNER Victor :
Support POSIX semaphore on FreeBSD is recent, optional (eg. disabled by default
in FreeBSD 7) and limited (30 semaphores). SYSV should be used instead because
they are less limited or more adjustable (at runtime: POSIX semaphore requires
to recompile the
STINNER Victor added the comment:
It looks like SysV semaphores are also preferred on Darwin. So I suppose that
Mac OS X would also benefit of this issue. Maybe also other OSes (Solaris?).
See also issue #7272.
--
nosy: +jnoller
title: multiprocessing: use SYSV semaphores on FreeBSD
STINNER Victor added the comment:
3.2a3 chunk#2 cannot fail because PyUnicode_AsWideChar() only returns -1 if the
first argument is NULL, whereas we just checked that decoded is not NULL. But
it would be better to fix the variable type to avoid future bugs
STINNER Victor added the comment:
Different tests proved that cp65001 can *not* be set as an alias to utf-8, and
that's why I'm closing this issue.
Anyway, I don't think that cp65001 is configured by default on any Windows
setup. It is only set by the user, using the chcp com
STINNER Victor added the comment:
> ... it complicates handling of the output of trace.py.
> For each file you have to do the encoding detection dance again ...
What? You just have to call one function! tokenize.open() :-) Well, ok, it's
not commited yet, but it looks like most p
STINNER Victor added the comment:
> Fatal Python error: Py_Initialize: Unable to get the locale encoding
> SystemError: NULL result without error in PyObject_Call
Gotcha! r86341 fixes PyUnicode_EncodeFS(): raise an error if _Py_char2wchar_()
fails.
The real problem is that PREFIX
STINNER Victor added the comment:
> The real problem is that PREFIX is not decoded using _Py_charw2char() ...
Fixed by r86345.
--
___
Python tracker
<http://bugs.python.org/iss
STINNER Victor added the comment:
Now I get an error in copy_scripts() function of
Lib/distutils/command/build_scripts.py: this function adjusts Python shebang of
installed Python scripts. The problem is that the shebang contains a non-ASCII
character whereas the script is written into the
STINNER Victor added the comment:
Commited to Python 3.2 (r86346 + r86347). Thanks for your reviews.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
The error occurs in .readline(): .readline() fills a buffer by reading the file
chunk by chunk. Each time a chunk is read, it is decoded by the stateful
decoder. The problem is that the decoder doesn't know the file offset. Even if
it knew, start an
STINNER Victor added the comment:
I commited a part of your patches:
r86353 Remove ";" after function definition, invalid in ISO C
r86354: [array] int => Py_UNICODE (my commit is a little bit different, but it
is based on your patch)
r86355: [_pickle] Remove useless comma, inv
STINNER Victor added the comment:
Oh, I also wrote a patch for the warnings error silently ignored:
import_warnings_error.patch.
--
Added file: http://bugs.python.org/file19561/import_warnings_error.patch
___
Python tracker
<http://bugs.python.
STINNER Victor added the comment:
r86399 fixes the code checking PyUnicode_AsWideChar() failure.
The following change is useless, it cannot overflow:
-if (n + k > MAXPATHLEN)
+if (k > MAXPATHLEN - n)
k = MAXPATHLEN - n;
n and k maximum values are MAXPATHLEN (and the m
STINNER Victor added the comment:
> Here is a patch. It moves warnings initialization after
> io initialization (the latter being arguably more critical
> than the former). Also adds two tests.
initstdio() and initmain() may emit warnings. Eg. issue #8766 (which now have a
STINNER Victor added the comment:
See also #2382: I wrote patches two years ago for this issue.
--
___
Python tracker
<http://bugs.python.org/issue10382>
___
___
Changes by STINNER Victor :
--
nosy: -haypo
___
Python tracker
<http://bugs.python.org/issue10070>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: -haypo
___
Python tracker
<http://bugs.python.org/issue10134>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
In Python 3, sys.stderr uses the 'backslashreplace' error handler. With C
locale, sys.stderr uses the ASCII encoding and so the é unicode character is
printed as \xe9.
In Python 2, sys.stderr.errors is strict by default.
It works if you specify
STINNER Victor added the comment:
I started to commit some parts of the huge patch:
r88515: Mark PyWin_FindRegisteredModule() as private
r88516: Remove unused argument of _PyImport_GetDynLoadFunc()
r88517 (3.3), r88518 (3.2): document encoding used by import functions
STINNER Victor added the comment:
r88519: Mark _PyImport_FindBuiltin() argument as constant
r88520: Add PyModule_GetNameObject()
--
___
Python tracker
<http://bugs.python.org/issue3
STINNER Victor added the comment:
Here is a patch to fix input() on Windows: strip also \r.
--
keywords: +patch
Added file: http://bugs.python.org/file20852/input_rn.patch
___
Python tracker
<http://bugs.python.org/issue11
STINNER Victor added the comment:
C:\Python32>python
Python 3.2 ... on win32
>>> import sys
>>> for line in sys.stdin:
... print(repr(line))
...
hello
'hello\r\n'
^Z
Oh yes, I confirm that there is a second bug: sys.stdi
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file20852/input_rn.patch
___
Python tracker
<http://bugs.python.org/issue11272>
___
___
Python-bugs-list m
STINNER Victor added the comment:
Fixed in 3.3 (r88530) and 3.2 (r88531). Others versions are not affected.
Thanks Duncan Booth, I added tests based on your stdintests.py script. I used
directly stdin argument of Popen() instead of using cmd.exe to create the pipe
(which is not portable
STINNER Victor added the comment:
Fixed in 3.2 too (r88532).
--
resolution: -> fixed
status: pending -> closed
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
> This new failure is perhaps related: (...) test_reprlib
Ah yes, yesterday, I tried to remember which test was impacted by the module
change, but all tests passed on Linux. Anyway, it's now fixed b
STINNER Victor added the comment:
What is the problem with Python 3.2? It works correctly here:
$ cat bla.txt
bli
blo
bla
$ gzip bla.txt
$ ./python
Python 3.3a0 (unknown, Feb 23 2011, 13:03:50)
>>> import gzip, io
>>> f = io.TextIOWrapper(gzip.open("bla.txt.gz"),
STINNER Victor added the comment:
> Yes, a clear definition of the minimum requirements for being wrapped
> by TextIOWrapper sounds like a necessary thing to have
About that: is read1() argument mandatory or not?
In _pyio, BufferedIOBase.read1() argument is optional (default
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11303>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
I think that the normalization function in unicodeobject.c (only used for
internal functions) can skip any character different than a-z, A-Z and 0-9.
Something like:
>>> import re
>>> def normalize(name): return re.sub("[^a
STINNER Victor added the comment:
Patch implementing my suggestion.
--
Added file: http://bugs.python.org/file20875/aggressive_normalization.patch
___
Python tracker
<http://bugs.python.org/issue11
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file20875/aggressive_normalization.patch
___
Python tracker
<http://bugs.python.org/issue11303>
___
___
STINNER Victor added the comment:
Ooops, I attached the wrong patch. Here is the new fixed patch.
Without the patch:
>>> import timeit
>>> timeit.Timer("'a'.encode('latin1')").timeit()
3.8540711402893066
>>> timeit.Timer("'
STINNER Victor added the comment:
Python 3.2 has a _posixsubprocess: some parts of subprocess are implemented in
C. Can you try it?
Python 3.2 uses also pipe2(), if available, to avoid the extra fcntl(4,
F_GETFD)+fcntl(4, F_SETFD, FD_CLOEXEC).
I suppose that the pipe and mmap(NULL, 1052672
STINNER Victor added the comment:
>> That won't work, Victor, since it makes invalid encoding
>> names valid, e.g. 'utf(=)-8'.
> .. but this *is* valid: ...
Ah yes, it's because of encodings.normalize_encoding(). It's funny: we have 3
functions
STINNER Victor added the comment:
> more_aggressive_normalization.patch
Woops, normalizestring() comment points to itself.
normalize_encoding() might also points to the C implementations, at least in a
"# comment".
--
___
Python t
STINNER Victor added the comment:
> r88586: Normalized the encoding names for Latin-1 and UTF-8 to
> 'latin-1' and 'utf-8' in the stdlib.
Why did you do that? We are trying to find a solution together, and you change
directly the code without any review. Your commi
STINNER Victor added the comment:
We should first implement the same algorithm of the 3 normalization functions
and add tests for them (at least for the function in normalization):
- normalize_encoding() in encodings: it doesn't convert to lowercase and keep
non-ASCII le
STINNER Victor added the comment:
> For other spellings like "utf8" or "latin1", I wonder
> if it would be useful to emit a warning/suggestion to use
> the standard spelling.
Why do you want to emit a warning?
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11329>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
Can you write a patch for the documentation?
--
___
Python tracker
<http://bugs.python.org/issue11329>
___
___
Python-bug
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11358>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
Why do you want to replace pickle by json?
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11359>
___
___
Pytho
New submission from STINNER Victor :
"Buildroot: Making Embedded Linux easy" has patches for Python 2.7 to simplify
the cross-compilation of Python:
http://git.buildroot.net/buildroot/tree/package/python
The maintainer, Thomas Petazzoni, told me that the 12 first patches are
STINNER Victor added the comment:
buildroot-python-patches.tar.gz: today checkout of the git repository
(package/python).
--
Added file: http://bugs.python.org/file20965/buildroot-python-patches.tar.gz
___
Python tracker
<http://bugs.python.
STINNER Victor added the comment:
buildboot.patch: the 12 patches combined into a single patch for Python 2.7.
Note: python-2.7-001-support-for-build.patch doesn't apply cleanly on
release27-maint.
--
keywords: +patch
Added file: http://bugs.python.org/file20966/buildroot.
STINNER Victor added the comment:
I uploaded the patch to Rietveld for a review:
http://codereview.appspot.com/4253047
> Well, the patches should be first ported to 3.3
Ok, I will ask the author if he can do this job. I uploaded the patches for
Python 2.7 for a review and to open
STINNER Victor added the comment:
Fixed in Python 3.3 (r88697) and 3.2 (r88698). Thank you Ray.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
I commited your patch with minor changes (e.g. I kept f.close()) to Python 3.3
(r88700) and 3.2 (r88701). Thank you Pierre.
--
___
Python tracker
<http://bugs.python.org/issue10
STINNER Victor added the comment:
Fixed in Python 3.3 (r88702+r88703).
I don't really want to backport it to 3.2, 3.1 or 2.7, because the patch is
complex, changes a very important function, and the fixed bug (don't crash on
invalid format strings) is minor. If you would like the f
STINNER Victor added the comment:
Done in Python 3.3 (r88704+r88705). It was easier after fixing #10829.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
I still consider that ASCII format strings should be enough for everyone.
> > If someone does that, (s)he should open a new issue for that :-)
>
> Why new issue?
Ok, so I just remove myself from t
STINNER Victor added the comment:
Fixed in Python 3.3: r88708 removes errors argument of
_PyUnicode_AsDefaultEncodedString(), r88709 caches the result of str.encode().
> replace all uses of _PyUnicode_AsDefaultEncodedString()
> with PyUnicode_AsUTF8String()
It makes the code more c
Changes by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue8923>
___
___
Python-bugs-list
STINNER Victor added the comment:
This issue doesn't solve any real issue. I prefer to close it because I don't
need it anymore.
--
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.p
STINNER Victor added the comment:
There is no more such bug on this buildbot.
--
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Changes by STINNER Victor :
--
nosy: -haypo
___
Python tracker
<http://bugs.python.org/issue9769>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10911>
___
___
Python-bugs-list
STINNER Victor added the comment:
subprocess_errpipe_buffer.patch: Patch for 2.7 which improve by 30% the dummy
benchmark (run /bin/false 10,000 times). It avoids the creation of the 1 MB
buffer: start with a buffer of a single byte (just to check if there is data or
if the pipe was closed
STINNER Victor added the comment:
Quick benchmark:
- fork(), execv(), waitpid(): 19081.1 ms
- os.popen(): 25769.8 ms
- subprocess.Popen(): 40025.8 ms
- subprocess.Popen() patched: 26155.2 ms
I tested Python 2.7 (debug build) on Linux (Debian Sid) with a Pentium 4
(Hyperthreading, 2 fake
STINNER Victor added the comment:
pitrou> Victor, your patch doesn't even apply on 3.x.
pitrou> That code doesn't exist anymore...
subprocess.Popen() does still read errpipe_read, but using a buffer of 50,000
bytes instead of 1 MB (the traceback is not more send to th
STINNER Victor added the comment:
> os.popen is 41% is slower than subprocess: I suppose that it
> is the usage of stdout=PIPE (creation of the pipe) which make
> it slower
Oh no, it's because os.popen() calls subprocess.Popen() with shell=True: the
overhead is the shell. Noth
STINNER Victor added the comment:
As written by Charles-Francois Natali (msg129890), we can use closefrom().
Pseudo-code: find the biggest fd than that be kept open, call
closefrom(highest+1), and then use close() (os.closerange) for fd in 0..highest
that have to be closed.
closefrom() is
STINNER Victor added the comment:
Benchmark on subprocess with a less trivial example. Run 100x python -c pass:
8.63 sec without my patch, 8.53 sec with my patch => only 1% faster, so the
patch is just useless on a real world example.
Finally, I think that there is just nothing to do
STINNER Victor added the comment:
Benchmark extracted from #11314, Python 3.2 on Linux: subprocess("/bin/false",
close_fds=True) is 22% slower than subprocess("/bin/false", close_fds=False).
--
stage: -> patch review
__
New submission from STINNER Victor :
Extract of the documentation:
15.14.3.1. Win95/98 specific
platform.popen(cmd, mode='r', bufsize=None)
Portable popen() interface. Find a working popen implementation preferring
win32pipe.popen(). On Windows NT, win32pipe.popen() shoul
2501 - 2600 of 35284 matches
Mail list logo