STINNER Victor added the comment:
@neologix: I don't understand why do you want to hurry, this issue will not be
fixed in the next release (3.2.1, it's too late), and I don't think that the
next release (3.3? or is it something before?) will come before few months.
--
I d
STINNER Victor added the comment:
@neologix: New try. Why did you remove your patch?
--
___
Python tracker
<http://bugs.python.org/issue12181>
___
___
Python-bug
STINNER Victor added the comment:
> Sorry, the documentation in the patch is wrong
Can you update your patch please?
--
___
Python tracker
<http://bugs.python.org/issue1
STINNER Victor added the comment:
The compiler has a PyCF_SOURCE_IS_UTF8 flag: see compile() builtin. The parser
has a flag to ignore the coding cookie: PyPARSE_IGNORE_COOKIE.
Patch tokenize to support Unicode is simple: use PyCF_SOURCE_IS_UTF8 and/or
PyPARSE_IGNORE_COOKIE flags and encode
New submission from STINNER Victor :
Sometimes, some tests are stopped because of SIGALRM. A recent example:
---
[157/357] test_socketserver
Alarm clock
*** Error code 142
---
http://www.python.org/dev/buildbot/all/builders/x86%20FreeBSD%206.4%203.x/builds
STINNER Victor added the comment:
Oooh, an interesting and complex bug with an one-liner fix!
--
___
Python tracker
<http://bugs.python.org/issue12149>
___
___
STINNER Victor added the comment:
"... A negative file offset may be valid for some devices in some
implementations.
The POSIX.1-1990 standard did not specifically prohibit lseek() from returning
a negative offset. Therefore, an application was required to clear errno prior
to the cal
STINNER Victor added the comment:
> How would it work? The C lseek() takes a signed (64-bit) offset
> as argument, so we would have to call it multiple times anyway.
Python does already call multiple times the same function if the input is
larger than the type used by the function
STINNER Victor added the comment:
I don't like your test because it depends on system endian:
+if sys.byteorder == "little":
+struct.menu.spam = 0x00FF
+else:
+struct.menu.spam = 0xFF00
I would prefer a test creat
STINNER Victor added the comment:
> But if you set raw memory to let's say b'\0\0\0\1',
> when you look at the c_int value afterwards, won't it
> be different on little endian and big endian machines?
A big endian structure is supposed to read and write memory in
STINNER Victor added the comment:
I commited your fix, thanks Vlad!
--
___
Python tracker
<http://bugs.python.org/issue4376>
___
___
Python-bugs-list mailin
STINNER Victor added the comment:
A recent test_rapid_restart hang:
[ 14/357] test_multiprocessing
Timeout (1:00:00)!
Thread 0xb18c4b70:
File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py",
line 237 in wait
File "/var/lib/buildslave/3.x.murray-gentoo
STINNER Victor added the comment:
My patch doesn't work: the traceback is not printed:
--
$ ./python -m test -v -u network -F test_threadsignals
(...)
[106] test_socketserver
(...)
test_UnixStreamServer (test.test_socketserver.SocketServerTest) ... creating
server
STINNER Victor added the comment:
> I get this on Linux with ^D
With which Python version? Did you try Python 3.3 (development version)?
--
___
Python tracker
<http://bugs.python.org/iss
STINNER Victor added the comment:
Oops, I specified the wrong issue number if the commits:
New changeset d3cebbd500aa by Victor Stinner in branch '2.7':
Issue #12250: test_socketserver uses a timeout of 60 seconds instead of 20
http://hg.python.org/cpython/rev/d3cebbd500aa
New
Changes by STINNER Victor :
--
Removed message: http://bugs.python.org/msg140332
___
Python tracker
<http://bugs.python.org/issue12250>
___
___
Python-bugs-list m
STINNER Victor added the comment:
(I commited fixes for issue #12550 but specified issue #12250 in the changlog,
I removed the related comment from python-dev from this issue)
--
___
Python tracker
<http://bugs.python.org/issue12
STINNER Victor added the comment:
> Can this be closed?
I think (hope) that the initial issue (test_socketserver) failure is fixed,
thanks to my second commit.
I'm not complelty satisfied because the traceback was not printed on a SIGALRM
when i tried -m test -F test_socketserver.
New submission from STINNER Victor :
curses functions accepting strings encode implicitly character strings to
UTF-8. This is wrong. We should add a function to set the encoding (see issue
#6745) or use the wide character C functions. I don't think that UTF-8 is the
right default encodi
New submission from STINNER Victor :
Some characters take more than one column in a terminal, especially CJK
(chinese, japanese, korean) characters. If you use such character in a terminal
without taking care of the width in columns of each character, the text
alignment can be broken. Issue
STINNER Victor added the comment:
I just created the issue #12568 for unicode_width.patch.
--
___
Python tracker
<http://bugs.python.org/issue2382>
___
___
Pytho
STINNER Victor added the comment:
> I don't really know what is still required
_cursesmodule.311.get_wch.patch doesn't apply correctly on Python 3.3 and use
PyInt_FromLong() function, function removed from Python 3.0. Indeed, Iñigo
wrote that the patch was not tested.
> wha
STINNER Victor added the comment:
getkey.patch fixes window.getkey(): use get_wch() instead of getch() to handle
correctly non-ASCII characters. I tested with the key é (U+00E9) with
ISO-8859-1 and UTF-8 locale encoding: getkey() gives the expected result (but
addstr is unable to display it
STINNER Victor added the comment:
I created issue #12567 to fix the Unicode support of the curses module in
Python 3.
--
___
Python tracker
<http://bugs.python.org/issue6
Changes by STINNER Victor :
--
Removed message: http://bugs.python.org/msg140388
___
Python tracker
<http://bugs.python.org/issue12502>
___
___
Python-bugs-list m
STINNER Victor added the comment:
Woops, I don't know how, but I removed a neologix's message:
"Patch committed, closing.
Alexey, thanks for reporting this.
(I'll open a separate issue to increase the tests coverage)."
--
nosy: +haypo
_
STINNER Victor added the comment:
I already fixed this issue in Python 3.1, 3.2 and 3.3: issue #6697 (e.g. commit
7ba851d1b46e).
$ ./python
Python 3.3.0a0 (default:ab162f925761, Jul 15 2011, 09:36:17)
>>> import sqlite3
>>> c = sqlite3.connect(":memory:")
>&
STINNER Victor added the comment:
> I already fixed this issue in Python 3.1, 3.2 and 3.3:
> issue #6697 (e.g. commit 7ba851d1b46e).
Oh, wrong: the bug was only fixed in Python 3.2 and 3.3. There was already a
check after _PyUnicode_AsStringAndSize(), but the test was on the wrong
va
STINNER Victor added the comment:
This issue is related to issue #12326.
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12571>
___
___
Python-bug
STINNER Victor added the comment:
> Here we go, first Linux3-related bug report:
> https://bugs.gentoo.org/show_bug.cgi?id=374579 (see issue #12571).
Oh, some people use the DLFCN module :-)
--
I'm still in favor of keeping sys.platform == 'linux3', and you?
For p
STINNER Victor added the comment:
> It seems that a fix was merged in the 3.1 branch,
> somewhere between 3.1.2 and 3.1.3.
Which fix? The code is still wrong in Mercurial (branch 3.1):
493 operation_cstr = _PyUnicode_AsStringAndSize(operation,
&operation_len);
494 if
STINNER Victor added the comment:
The decimal module has been fixed in Python 2.7, 3.2 and 3.3 for Turkish local:
issue #11830.
--
___
Python tracker
<http://bugs.python.org/issue1
STINNER Victor added the comment:
> I see it has been moved to "committed/rejected"
> status - does that mean that it might still go in, or that
> it is rejected?
I commited the new method, did you see my commit dec10ad41b2a?
I propose to continue the discussion on issue
STINNER Victor added the comment:
Oh, by the way: do all platforms have wide character functions? I don't see any
failure on our Python 3.x buildbots, but test_curses is skipped on many
buildbots.
--
___
Python tracker
<http://bugs.py
STINNER Victor added the comment:
> implicit declaration of function ‘wget_wch’
Oh oh, I expected such error: it means that your ncurses library don't have the
wide character API. The compiler command confirm that: "gcc ... -lncurses ...".
You use libncurses and not lib
STINNER Victor added the comment:
> by the way: do all platforms have wide character functions?
See msg140408 and msg140409: Antoine Pitrou (OS=Mageia 1) and some buildbots
don't have get_wch().
--
___
Python tracker
<http://bugs
STINNER Victor added the comment:
> ... I suppose that it's because readline is linked to libncurses
> (and not libncursesw) => see issue #7384.
See also the issue #9408.
--
___
Python tracker
<http://bugs.pyt
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue444582>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> dependencies: + Finding programs in PATH, adding shutil.which
Why did you add this dependency? For example, subprocess is able to locate a
program if the program has no full path. We don't need a which function.
--
nosy
STINNER Victor added the comment:
Use >L"" CONSTANT< to decode a byte string to a character string doesn't work
with non-ASCII strings. _Py_char2wchar() should be used instead: see for
example this fix, commit 5b6e13b6b473.
--
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12572>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue5999>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
You may the number of this issue in a comment of your patch.
--
___
Python tracker
<http://bugs.python.org/issue12572>
___
___
STINNER Victor added the comment:
Oops. You may *add* the number of this issue in a comment of your patch.
--
___
Python tracker
<http://bugs.python.org/issue12
STINNER Victor added the comment:
I think that getpath.patch is wrong (it's just a workaround hiding a real bug):
see msg140422 of the issue #12561.
--
___
Python tracker
<http://bugs.python.org/is
STINNER Victor added the comment:
> Stinner - is the patch you mentioned in a released version
> of Python 3.2?
Yes, Python 3.2.1. (It's not part of Python 3.1.)
> Also, how is it affected by the fact that the (wide char) strings
> in question are constants?
I don'
STINNER Victor added the comment:
@pitrou: Antoine, do you think that the following commit should be backported
from 3.3 to 3.2?
New changeset 3c7792ec4547 by Victor Stinner in branch 'default':
Issue #12175: BufferedReader.read(-1) now calls raw.readall() if available.
http://hg.
STINNER Victor added the comment:
I reopen the issue.
--
resolution: fixed -> accepted
status: closed -> open
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
(Oh, I missed Antoine's comment, yes, reopen a new issue)
--
resolution: accepted -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.
STINNER Victor added the comment:
h.close() (HTTPConnection.close) in the finally block of
AbstractHTTPHandler.do_open() calls indirectly r.close() (HTTPResponse.close).
The problem is that the content of the response cannot be read if its close()
method was called.
The changelog of the fix
STINNER Victor added the comment:
ValueError('I/O operation on closed file') error comes from
HTTPResponse.__enter__() which is implemented in IOBase:
def __enter__(self): # That's a forward reference
self._checkClosed()
STINNER Victor added the comment:
imdb.com and python.org use HTTP/1.1. imdb.com server sends a
"Transfer-encoding: chunked" header whereas python.org doesn't. python.org has
a "Connection: close" header, whereas imdb.com doesn't.
The more revelant di
STINNER Victor added the comment:
> No, I don't think so.
The issue is already fixed in 3.3, so you agree to not fix it in Python 3.2?
--
___
Python tracker
<http://bugs.python.or
STINNER Victor added the comment:
Patch the _curses module to improve Unicode support:
- add an encoding attribute to a window (only visible in C): read the locale
encoding
- encode a character and a character string to the window encoding if the
ncursesw library is NOT used
- addch
STINNER Victor added the comment:
Using curses_unicode.patch:
- without ncursesw: addch('é') raises an OverflowError because
'é'.encode('UTF-8') is 2 bytes and not 1 byte
- with ncursesw: the charset is displayable character depends on the locale
encoding (e.g
STINNER Victor added the comment:
See also #6755 (curses.get_wch).
--
___
Python tracker
<http://bugs.python.org/issue12567>
___
___
Python-bugs-list mailin
STINNER Victor added the comment:
> implicit declaration of function ‘wget_wch’
curses_unicode.patch of issue #12567 adds a HAVE_NCURSESW define to only use
wide character functions if _curses is linked to libncursesw.
This define can be used to fix this bug (use wget_ch whereas it is
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12546>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
What is the result of int(float('inf')) ?
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12589>
___
___
STINNER Victor added the comment:
> Your patch looks fine to me, except for this:
> -if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
> -'freebsd7', 'freebsd8')
> -
STINNER Victor added the comment:
> So I'd suggest forgetting about this part.
If someone really wants this feature (relative seek of more than 2^63), he/she
should open a new issue.
This issue remembers me a mktime() issue: mktime() may return -1 even if it is
not an error. tim
STINNER Victor added the comment:
> It seems currently that in python 3.2 sys.platform is linux2
> even though it is running linux 3
It's maybe because you ran ./configure with Linux 2.x.y (see msg138254). Try
make distclean && ./configure -
Changes by STINNER Victor :
--
nosy: +mark.dickinson
___
Python tracker
<http://bugs.python.org/issue12589>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
Is HAVE_DECL_ISINF defined in pyconfig.h? PyLong_FromDouble() uses
Py_IS_INFINITY(x):
--
/* Py_IS_INFINITY(X)
* Return 1 if float or double arg is an infinity, else 0.
* Caution:
*X is evaluated more than once
Changes by STINNER Victor :
--
nosy: +ezio.melotti
___
Python tracker
<http://bugs.python.org/issue12576>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12556>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> That's what I thought, it's really uncommon: in that case, I'm
> reluctant to making such a change, for the reason explained above.
> Ross, Victor?
Why do you want a mmap? Why not using a file?
--
__
STINNER Victor added the comment:
You may try:
$ ./python
>>> import ctypes
>>> import ctypes.util
>>> libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
>>> isinf = libc.isinf
>>> isinf.argtypes = (ctypes.c_do
STINNER Victor added the comment:
The problem is in PyLong_FromDouble(): if (Py_IS_INFINITY(dval)) is evaluated
as false, whereas dval *is* infinity. Possible causes:
- Py_IS_INFINITY is not defined as "# define Py_IS_INFINITY(X) isinf(X)"
(issue with the pyconfig.h file?)
- th
STINNER Victor added the comment:
> stdout = open("/dev/null", "w"), stderr = sys.stdout
You ask to write all outputs to /dev/null. Why do you expect anything on stdout?
--
___
Python tracker
<http://
STINNER Victor added the comment:
> stdout = open("/dev/null", "w"), stderr = sys.stdout
Oh, I read subprocess.STDOUT instead of sys.stdout.
--
___
Python tracker
<http://
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12609>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> $grep -r '#define Py_IS_INF' .
> PC/pyconfig.h:#define Py_IS_INFINITY(X) (!_finite(X) && !_isnan(X))
The PC/ directory is specific to Windows. Py_IS_INFINITY should be defined in
Include/pymath.h (at least, in the 3.2 branch)
&g
STINNER Victor added the comment:
> If gdb has an endian issue,
> you may also try "print /x d" in the gdb shell.
Oh, forget me: /x converts the argument to an integer...
--
___
Python tracker
<http://bugs.py
STINNER Victor added the comment:
I'm not sure that your version of gdb understands macros. You may have to set a
breakpoint on __isinf. Compile Python with "-g -ggdb" helps gdb.
Py_IS_INFINITY is may not defined as "# define Py_IS_INFINITY(X) isinf(X)". To
check
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12612>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +benjamin.peterson
___
Python tracker
<http://bugs.python.org/issue12613>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
It's too late to "fix" sys.platform.
--
___
Python tracker
<http://bugs.python.org/issue12326>
___
___
Python-b
STINNER Victor added the comment:
save_fds should be moved outside the try block:
+try:
+# save a copy of the standard file descriptors
+saved_fds = [os.dup(fd) for fd in range(3)]
+...
+finally:
+for std
STINNER Victor added the comment:
You can use PYTHONIOENCODING="utf-8". Code page 65001 is not exactly like
Python UTF-8 codec: see issue #6058.
Using issue #12281, it may be possible to implement a cp65001 codec.
See also issue #1602 for the Windows console.
Why do you u
STINNER Victor added the comment:
> getpid() is called after each kill(getpid(), ),
> to "force" the signal delivery
Please write a function (in test.support?) with a comment explaining why you
are doing that.
You may also only do this workaround on specific platforms. For e
STINNER Victor added the comment:
Thanks for your patch. ResourceWarning are really useful!
--
___
Python tracker
<http://bugs.python.org/issue10883>
___
___
STINNER Victor added the comment:
> Python shouldn't GPF for ANY reason if it can be easily fixed
"Code page 65001" issue cannot be "easily" fixed. Did you read the history of
the issue #6058? It took one year and a half to decide that cp65001 cannot be
set as an
STINNER Victor added the comment:
> Finally, the "fix" you suggest would be applicable if python
> used WriteConsole or WriteFile... but it does not! It uses
> the write() function, which probably calls WriteConsole
> or WriteFile at some point, but does not take unic
STINNER Victor added the comment:
> All I'm trying to do is run different versions of Python on the same machine
> from the command line.
> Some code inside Python now "break" if Python 3.1 is started with Code Page
> 65001.
Yes, this issue can be seen as a regres
STINNER Victor added the comment:
i12607_v2.patch: the test fails if Python is compiled with pydebug. Add "err =
support.strip_python_stderr(err)" before self.assertEqual(err, b"err") in
test_subprocess.py to fix the failure.
--
versions: -Python 2.6, Py
STINNER Victor added the comment:
select.kevent(bignum, 1, 2, 3, sys.maxsize, bignum) raises a
OverflowError('signed integer is greater than maximum') on a 64 bits system.
select.kevent() constructor parses the 4th argument using "i" (an int):
sys.maxsize doesn't fi
STINNER Victor added the comment:
OpenBSD has a patch for this issue:
http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/python/2.7/patches/patch-Modules_selectmodule_c
--
___
Python tracker
<http://bugs.python.org/issue12
STINNER Victor added the comment:
patch-Modules_selectmodule_c is not enough to fix kqueue_event_init(): it
doesn't catch overflow error on the ident attribute.
--
___
Python tracker
<http://bugs.python.org/is
STINNER Victor added the comment:
What do you suggest?
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12643>
___
___
Python-bugs-list mailin
STINNER Victor added the comment:
> If it's not possible for InteractiveConsole to allow exceptions
> to propagate through sys.excepthook.
Ok, I was not sure that I understood correctly. This change should be an option
to not break ex
STINNER Victor added the comment:
YES YOU CAN
--
___
Python tracker
<http://bugs.python.org/issue11871>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12170>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12636>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> I'm not sure why the special case shouldn't be retained.
We can keep the fast path in PyObject_IsTrue but add a __bool__ method to
NoneType.
--
nosy: +haypo
___
Python tracker
<http://bugs.pytho
STINNER Victor added the comment:
Yes, tokenize.open() should fix this issue, but you should close the file after
using it. Use for example "with tokenize.open(): ...".
Can you write a patch? You can download the source code using Mercurial or
download it manually from http://hg.
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12650>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: -haypo
___
Python tracker
<http://bugs.python.org/issue12540>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
test_enable_file, test_enable_single_thread, test_gil_released and
test_read_null read an int (4 bytes) from the address 0 (NULL).
test_sigsegv pass: this test raises explicitly a SIGSEGV and the signal handler
writes the right message ("Segmentation
Changes by STINNER Victor :
--
nosy: -haypo
___
Python tracker
<http://bugs.python.org/issue10087>
___
___
Python-bugs-list mailing list
Unsubscribe:
1801 - 1900 of 35168 matches
Mail list logo