Changes by STINNER Victor :
--
title: test_signal cannot test blocked signals if _tkinter is loaded ->
test_signal cannot test blocked signals if _tkinter is loaded; Tcl_Finalize()
___
Python tracker
<http://bugs.python.org/issu
STINNER Victor added the comment:
Reopen, test_zlib fails with Python 2.7 on Windows:
==
ERROR: test_big_buffer (test.test_zlib.ChecksumBigBufferTestCase
STINNER Victor added the comment:
"x86 debian parallel 2.7", "x86 Ubuntu Shared 2.7" and "x86 Tiger 2.7" fail
with mmap.error('[Errno 12] Cannot allocate memory').
http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%20Shared%202
STINNER Victor added the comment:
GCC 4.4.3 is not the last stable version of the 4.4 branch: try maybe GCC
4.4.6...
Changes of GCC 4.4.4, 4.4.5 and 4.4.6:
http://gcc.gnu.org/gcc-4.4/changes.html#4.4.6
Or try maybe another major version
STINNER Victor added the comment:
@sdaoden(, @pitrou): Antoine proposes to skip the zlib "big buffer" (1 GB) test
on 32 bits system. What do you think?
On 64 bits system, we check a buffer of 2 GB-1 byte (0x7FFF bytes). Is the
test useful or not? What do we test?
Can you ch
STINNER Victor added the comment:
> If the user base cannot be calculated, paths
> starting with ~ should not exist or be used at all in this context.
It's not "~" but "{userbase}" substitution variable.
Here is a new patch implementing this idea: don't
STINNER Victor added the comment:
Ah ah, this bug is funny :-) test_regexp doesn't fail because of a race
condition or a file system issue, but because of the regex!
The regex "ba.*" is applied on the fullname, not only on the basename. If the
temporary contains "
STINNER Victor added the comment:
Ah ah, this bug is funny :-) test_regexp doesn't fail because of a race
condition or a file system issue, but because of the regex!
The regex "ba.*" is applied on the fullname, not only on the basename. If the
temporary contains "
STINNER Victor added the comment:
Ah ah, this bug is funny :-) test_regexp doesn't fail because of a race
condition or a file system issue, but because of the regex!
The regex "ba.*" is applied on the fullname, not only on the basename. If the
temporary contains "
Changes by STINNER Victor :
--
Removed message: http://bugs.python.org/msg135199
___
Python tracker
<http://bugs.python.org/issue11873>
___
___
Python-bugs-list m
STINNER Victor added the comment:
Updated patch to use the system log2() if it is available. The test pass with
the system log2() on Linux (Debian Sid, eglibc 2.11.2).
--
Added file: http://bugs.python.org/file21897/issue11888-2.patch
___
Python
STINNER Victor added the comment:
+self.assertRunOK('-q', '-x', 'ba[^\/]*$', self.pkgdir)
This regex matchs 'ba(...)\'. I think that you wanted to write r'[^\\/]'.
--
___
STINNER Victor added the comment:
I asked if I should use RuntimeError or OSError for the new signal functions
(#8407) on python-dev. Georg Brandl answered:
"If it has an errno, it should be a subclass of EnvironmentError."
--
___
Pyth
Changes by STINNER Victor :
--
nosy: +georg.brandl
___
Python tracker
<http://bugs.python.org/issue12011>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12010>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> http://bugs.python.org/review/8407/show
Updated patch (version 2).
Note: sigpending() doesn't return an error code but -1 on error.
--
Added file: http://bugs.python.org/file21901/pending_signals
New submission from STINNER Victor :
It looks like OpenSSL can be compiled without SSLv2 (#ifdef OPENSSL_NO_SSL2).
See this bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612780
When compiling Python, I get the following error:
/home/haypo/prog/HG/cpython/Modules/_ssl.c: In
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10154>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
I don't understand anything, but thanks for fixing it :-) (Or at least trying
to fix it, buildbots will tell us.)
--
status: pending -> open
___
Python tracker
<http://bugs.python.org
STINNER Victor added the comment:
> @haypo, @pitrou: Are there any objections to removing test_big_buffer()
from Lib/test/test_zlib.py?
I now agree Antoine: the test is useless. It can be removed today.
About mmap: add a new test for this issue (mmap on Mac OS X and F_FULLSYNC) is
a g
STINNER Victor added the comment:
> Isn’t the root problem that pydoc uses import rather than imp or PEP 302
> things? We could change that.
It's possible to get the documentation of some module without loading them:
pydoc already supports get_source() method of a module load
STINNER Victor added the comment:
So the correct result for b'\xff\n'.decode('gb2312', 'replace') is u'?\n'?
--
versions: +Python 3.1, Python 3.2, Python 3.3
___
Python tra
STINNER Victor added the comment:
_codecs_cn implements different multibyte encodings: gb2312, gbkext, gbcommon,
gb18030ext, gbk, gb18030.
And there are other Asian multibyte encodings: big5 family, ISO 2202 family,
JIS family, korean encodings (KSX1001, EUC_KR, CP949, ...), Big5, CP950
STINNER Victor added the comment:
> Please avoid "negative" constants. Calling it HAS_SSLv2 would be fine.
I reused the term from ssl.h (#ifdef OPENSSL_NO_SSL2), but yes we can use a
different name.
> Also, there should be some doc update mentioning that PROTOCOL_SSLv2
STINNER Victor added the comment:
> Thanks, Victor. I suspect we're going to need to be a bit more
> careful, though: when the extra tests were added for math.log, it
> turned out that it had all sorts of strange special-case behaviour on
> various platforms.
>
> So
STINNER Victor added the comment:
(Oh, I hit the wrong keyboard shortcut and sent my email too fast)
You can commit issue11888.patch first if you would like to test it.
In this case, here is a patch to use system log2(), patch to apply *after*
issue11888.patch. It only uses log2() if x >
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file21897/issue11888-2.patch
___
Python tracker
<http://bugs.python.org/issue11888>
___
___
Python-bug
STINNER Victor added the comment:
By the way, issue11888.patch is just fine: you can commit it. I like your frexp
"trick" to improve the accuracy.
--
___
Python tracker
<http://bugs.python.o
STINNER Victor added the comment:
> You are right that I got the regex wrong (I'm bad at regexes), but
> in fact it is fine the way it is. Since there's no r, the regex
> is actually "ba[^/]$", which is exactly what I meant.
What about Windows? tempfile.mkdte
Changes by STINNER Victor :
--
nosy: +benjamin.peterson, georg.brandl
priority: normal -> release blocker
___
Python tracker
<http://bugs.python.org/issu
New submission from STINNER Victor :
Patch to optimize this: make it 10 times faster.
Try attached benchmark script. On a debug build I got the following results:
* original: 299.8 ms
* patched: 23.2 ms
I expected a factor of 10 because it uses a C implementation of rot13 instead
of an hand
Changes by STINNER Victor :
Added file: http://bugs.python.org/file21920/bench.py
___
Python tracker
<http://bugs.python.org/issue12027>
___
___
Python-bugs-list mailin
Changes by STINNER Victor :
--
nosy: +lemburg, pitrou
___
Python tracker
<http://bugs.python.org/issue12027>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> I mistakenly removed your pending_signals-2 patch
> I'm really sorry about this, could you re-post it?
No problem, anyway I worked on a new version in the train.
> So, if anything, you shouldn't check for a pending signal [in sigwait]
STINNER Victor added the comment:
Note: we might expose pth_raise() which is similar to pthread_kill(), but...
pth support was deprecated by the PEP 11 and pth support will be removed from
Python 3.3 source code.
--
___
Python tracker
<h
STINNER Victor added the comment:
About signalfd(): this patch doesn't provide any information or tool to decode
data written to the file descriptor. We should expose the signalfd_siginfo
structure or you cannot handle more than one signal (how do you know which
signal numbers were r
STINNER Victor added the comment:
wakeup_signum.patch: simple patch to write the signal number (as a single byte)
instead of just b'\x00' into the wake up file descriptor. It gives the ability
to watch more than one signal and be able to know which one was raised.
Included tests d
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file21883/pending_signals.patch
___
Python tracker
<http://bugs.python.org/issue8407>
___
___
Python-bug
STINNER Victor added the comment:
pending_signals-3.patch: doc nit, the link to Thread.ident doesn't work. The
doc should be replaced by something like:
*thread_id* can be read from the :attr:`~threading.Thread.ident` attribute
of a :class:`threading.Thread` o
New submission from STINNER Victor :
I don't know why threading._get_ident() (which is _thread.get_ident()) is
private: this function is safe.
This function becomes useful with pthread_kill() which will be added by #8407.
--
assignee: docs@python
components: Documentation, Li
STINNER Victor added the comment:
The threading has a function to get directly the identifier of the current
thread: threading._get_ident() instead of threading.current_thread().ident. I
think that threading._get_ident() is more reliable to
threading.current_thread().ident because
STINNER Victor added the comment:
I think that threading._get_ident() is more reliable than
threading.current_thread().ident because Thread.ident can be None in some cases.
--
___
Python tracker
<http://bugs.python.org/issue12
STINNER Victor added the comment:
GCC does have bugs: see a recent example with a development version of GCC 4.6
=> #9880 (the bug was fixed before the final release of GCC 4.6).
If you would like to go futher, you should open a bug report in GCC bug tracker
(not in the Python bug trac
STINNER Victor added the comment:
@Raymond: What do you think? Do you prefer simple or faster code?
I think that the speed of "import this" do matter!
--
___
Python tracker
<http://bugs.python.o
STINNER Victor added the comment:
Update the signalfd patch (version 4) against the default branch. Specify the
minimum Linux version in signalfd() doc. The patch still lacks a structure to
parse the bytes written into the file (see msg135438 for a ctypes example): a
struct sequence should
STINNER Victor added the comment:
> New changeset f8c49a930015 by Victor Stinner in branch 'default':
> Issue #8407: The signal handler writes the signal number as a single byte
Wakeup test using two pending signals fails on Free
STINNER Victor added the comment:
Updated patch.
Note: I tried to keep the same enum values for py_ssl_version, it's maybe
useless and so "=1" can be removed.
--
Added file: http://bugs.python.org/file21938/nosslv2-2.patch
___
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file21902/nosslv2.patch
___
Python tracker
<http://bugs.python.org/issue12012>
___
___
Python-bugs-list m
Changes by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12012>
___
___
Python-bugs-list
Changes by STINNER Victor :
--
resolution: fixed ->
status: closed ->
___
Python tracker
<http://bugs.python.org/issue12012>
___
___
Python-bugs-list
STINNER Victor added the comment:
Patch: signal.signal() and signal.siginterrupt() raise an OSError, instead of a
RuntimeError: OSError has an errno attribute.
--
keywords: +patch
Added file: http://bugs.python.org/file21939/signal_oserror.patch
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file21640/sysconfig_getuserbase.patch
___
Python tracker
<http://bugs.python.org/issue10496>
___
___
Pytho
STINNER Victor added the comment:
@eric.araujo, @tarek: do you prefer nonexistent_user.patch? I removed
sysconfig_getuserbase.patch, because I agree that an expanded path containing
"~" is a bug.
--
___
Python tracker
<http://bu
STINNER Victor added the comment:
It would be nice if you can also patch _pyio. I read sometimes _pyio to check
how _io is implemented.
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
> Thanks, Victor. You caught me by surprise a bit
Oh, I thought that the patch was ready to be commited.
> I had some more minor changes to that patch pending,
> so I've committed those separately.
You should add "Issue #11888: &quo
STINNER Victor added the comment:
> we have to wait 12 hours or maybe one day to wait for all buildbots
Oh, it's faster than expected: test_math passed on FreeBSD 6.4 3.x buildbot. I
was waiting for this one because it's an old OS and many tests fail on this
buildbot (because
STINNER Victor added the comment:
Issue #11888: Use system log2() when available
http://hg.python.org/cpython/rev/565f43f6bed4
"I expect the system libc to use more accurate functions than Python."
You know what? Mac OS X log2 is less accurate than Python log2! A log2 test
fail
STINNER Victor added the comment:
> we should check that it's not pow that's at fault here
Some tests on Mac OS X Tiger:
>>> (2.0 ** -255).hex()
'0x1.0p-255'
=> pow is correct
>>> import ctypes; import ctypes.util, math
>>> li
STINNER Victor added the comment:
Main changes of the patch, if the current user has no home directory (no entry
in /etc/passwd) and there is HOME environment variable:
- sysconfig.get_config_vars() doesn't have a 'userbase' variable.
sysconfig.get_config_var('userbase
STINNER Victor added the comment:
Read a int32 array as a raw byte string is useful, but the opposite is also
useful.
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue5
STINNER Victor added the comment:
If you would like more entry, use a longer filename:
>>> (26+10+1) ** 6 > (26+26+10+1) ** 6
False
>>> (26+10+1) ** 7 > (26+26+10+1) ** 6
True
--
nosy: +haypo
___
Python tracker
<http:/
STINNER Victor added the comment:
If you care about security, you should not use the Python random module because
it is not cryptographic. Oh oh, ssl doesn't expose RAND_bytes().
--
___
Python tracker
<http://bugs.python.org/is
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12040>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11349>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
It should be fixed. Reopen the issue if it doesn't work, I only tested on Linux.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python
STINNER Victor added the comment:
> Since it's a bugfix, it should probably go into all branches.
Fixed in 2.7, 3.1, 3.2, 3.3.
--
resolution: -> fixed
status: -> closed
___
Python tracker
<http://bugs.pyth
STINNER Victor added the comment:
> The patch still does not handle the case where the eof indicator
> is already set when calling raw_input. My original patch does.
Correct, your example fails, but only in Python 2.7. I don't like the idea of
always clearing errors. I prefer to
New submission from STINNER Victor :
The _ssl module has RAND_add() RAND_status() and RAND_egd() functions, but not
RAND_bytes(). I would be nice to be able to generate random bytes using
RAND_bytes().
And maybe also RAND_pseudo_bytes()?
I will work on a patch, it's just a rem
STINNER Victor added the comment:
+Py_SAFE_DOWNCAST(READAHEAD(self), Py_off_t, Py_ssize_t)
Why downcasting the size? Can't you store the size into a Py_off_t? I suppose
that sizeof(Py_off_t) >= sizeof(Py_ssize_t).
--
___
Python tracke
Changes by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12011>
___
___
Python-bugs-list
STINNER Victor added the comment:
> New changeset 34871c3072c9 by Victor Stinner in branch 'default':
> Issue #11888: skip some log2 tests on Mac OS X Tiger
Oh... I realized that the test doesn't fail on Mac OS X Tiger PPC, only on Mac
OS X Tiger x86. But I am too lazy
STINNER Victor added the comment:
New changeset 6ad356525381 by Victor Stinner in branch 'default':
Close #10419, issue #6011: build_scripts command of distutils handles correctly
http://hg.python.org/cpython/rev/6ad356525381
--
___
Pyth
STINNER Victor added the comment:
I fixed #10419 in Python 3.2 and 3.3 (I applied my copy_script-2.patch fix). It
is now possible to compile and install Python 3.2 and 3.3 with a non-ASCII
prefix, so this issue can be done.
If you have issues when compiling Python with a non-ASCII prefix
STINNER Victor added the comment:
Issue fixed in Python 3.1, 3.2, 3.3.
Thanks to Arfrever, I realized that this issue not only concerns the
compilation of Python itself with a non-ASCII prefix (issue #6011), but the
installation of any Python script containing a non-ASCII character. So I
STINNER Victor added the comment:
Le mardi 10 mai 2011 à 19:06 +, John O'Connor a écrit :
> Victor: AFAIK its not actually downcasting.
On Linux 32 bits, size_t is 32 bits, off_t is 64 bits. If the file size
is 4 GB, the downcast may truncate the size of 0 byte. It would be safe
STINNER Victor added the comment:
I asked if the change is correct on iconv mail list. Here is a copy of an
answer.
De: Bruno Haible
À: [iconv mailing list]
Cc: Victor Stinner
Sujet: Re: [bug-gnu-libiconv] Invalid byte sequences and multiybyte encodings
Date: Tue, 10 May 2011
STINNER Victor added the comment:
Oh, the HZ codec has no test! And what is this horrible BLOB,
Lib/test/cjkencodings_test.py?
--
___
Python tracker
<http://bugs.python.org/issue12
STINNER Victor added the comment:
utf_8_java.patch: Implement "utf-8-java" encoding.
* It has no alias
* 'a\0b'.encode('utf-8-java') returns b'a\xc0\x80b'
* b'a\xc0\x80b'.decode('utf-8-java') returns 'a\x00b'
* I added so
New submission from STINNER Victor :
All CJK codecs have tests except the chinese HZ codec, I don't know why.
But to add a test, I need to add data to Lib/test/cjkencodings_test.py and the
format of this file is not documented. It is not too difficult to understand
the format by readin
Changes by STINNER Victor :
Added file: http://bugs.python.org/file21966/convert_cjkencodings.py
___
Python tracker
<http://bugs.python.org/issue12057>
___
___
Python-bug
Changes by STINNER Victor :
--
keywords: +patch
Added file: http://bugs.python.org/file21967/cjkencodings.patch
___
Python tracker
<http://bugs.python.org/issue12
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file21967/cjkencodings.patch
___
Python tracker
<http://bugs.python.org/issue12057>
___
___
Python-bug
Changes by STINNER Victor :
Added file: http://bugs.python.org/file21968/cjkencodings.patch
___
Python tracker
<http://bugs.python.org/issue12057>
___
___
Python-bug
STINNER Victor added the comment:
convert_cjkencodings.py is script to replace Lib/test/cjkencodings_test.py by a
Lib/test/cjkencodings/ directory:
---
big5hkscs.txt
big5hkscs-utf8.txt
big5.txt
big5-utf8.txt
cp949.txt
cp949-utf8.txt
euc_jisx0213.txt
euc_jisx0213-utf8.txt
euc_jp.txt
euc_jp-utf8
Changes by STINNER Victor :
--
dependencies: +HZ codec has no test
___
Python tracker
<http://bugs.python.org/issue12057>
___
___
Python-bugs-list mailin
Changes by STINNER Victor :
--
dependencies: -HZ codec has no test
___
Python tracker
<http://bugs.python.org/issue12057>
___
___
Python-bugs-list mailin
Changes by STINNER Victor :
--
dependencies: +HZ codec has no test
___
Python tracker
<http://bugs.python.org/issue12016>
___
___
Python-bugs-list mailin
STINNER Victor added the comment:
New files should be marked as binary in Mercurial: add "Lib/test/cjkencodings/*
= BIN" in .hgeol.
--
___
Python tracker
<http://bugs.python.o
STINNER Victor added the comment:
> Looking at cjkencodings.py the format is pretty clear. The file
> consists of one statement that creates one dict that maps encoding
> names to a pair of (encoded) byte strings. The bytes literals are
> entirely hex escapes, with a maximum of
STINNER Victor added the comment:
Le mercredi 11 mai 2011 à 17:27 +, Marc-Andre Lemburg a écrit :
> Victor, could you please contact Hye-Shik Chang
> before making significant changes to the test suite.
Good idea, done.
> Wouldn't it be better to just use example strings fr
STINNER Victor added the comment:
Lib/test/cjkencodings_test.py was created when CJK were introduced in Python:
changeset 31386 by Hye-Shik Chang .
"Add CJK codecs support as discussed on python-dev. (SF #873597)
Several style fixes are suggested by Martin v. Loewis and
Marc-Andre Le
STINNER Victor added the comment:
I'm working on #2857 which adds the "Modified UTF-8" ("utf-8-java"?) codec to
Python. We can maybe use it instead of raising an error in 3.3?
--
nosy: +haypo
___
Python tracker
<http
STINNER Victor added the comment:
See also issue #1028.
--
___
Python tracker
<http://bugs.python.org/issue2857>
___
___
Python-bugs-list mailing list
Unsub
Changes by STINNER Victor :
--
nosy: +hyeshik.chang
___
Python tracker
<http://bugs.python.org/issue12057>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +hyeshik.chang
___
Python tracker
<http://bugs.python.org/issue12016>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
Benchmark:
a) ./python -m timeit "(b'\xc3\xa9' * 1).decode('utf-8')"
b)./python -m timeit "(''.join( map(chr, range(0, 128)) )*1000).encode('utf-8')"
c) ./python -m timeit "f=open('Misc/
STINNER Victor added the comment:
> I wait for the following build to close this issue.
> http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/builds/2507
Oh, it's the wrong build. The correct build is:
http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/
STINNER Victor added the comment:
ssl_rand.patch adds RAND_bytes() and RAND_pseudo_bytes() functions to the ssl
module.
I moved /dev/urandom to /dev/urandom.xxx and /dev/random to /dev/random.xxx to
test RAND_bytes() error path. In this case, RAND_pseudo_bytes() generates
non-cryptographic
New submission from STINNER Victor :
If a real time signal is raised 2 times whereas the signal is blocked, unblock
the signal will call the signal handler twice. The C signal handler of the
Python signal module only stores a boolean to say if the Python signal handler
should be called or not
STINNER Victor added the comment:
example.py: example to demonstrate the problem. The Python signal handler is
only called once, it should be called twice.
--
Added file: http://bugs.python.org/file21977/example.py
___
Python tracker
<h
3001 - 3100 of 35168 matches
Mail list logo