STINNER Victor added the comment:
use_format.patch is a patch to avoid PyOS_snprintf() with a fixed buffer: use
directly PyUnicode_FromFormat(), PyErr_Format() or PySys_FormatStderr()
instead. This patch is just a draft, it should be tested :-) There are other
calls to PyOS_snprintf() that
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file20262/pyunicode_fromformatv.patch
___
Python tracker
<http://bugs.python.org/issue10829>
___
___
Pytho
STINNER Victor added the comment:
Patch implementing this feature. It only supports bytes.
--
keywords: +patch
Added file: http://bugs.python.org/file20268/pybytes_fromformat_y.patch
___
Python tracker
<http://bugs.python.org/issue10
STINNER Victor added the comment:
Woops, I didn't want to do it, but I already commited the simple part of this
issue (U format, eg. %.100U): r87753.
--
___
Python tracker
<http://bugs.python.org/is
STINNER Victor added the comment:
Commited as r87755+r87758. Wait for the buildbot before backporting to other
versions.
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10
STINNER Victor added the comment:
> r87710 introduces a ResourceWarning in test_threading. Fix attached.
Fixed by r87757 (I wrote a different patch).
--
___
Python tracker
<http://bugs.python.org/issu
STINNER Victor added the comment:
> r87736 introduces another DeprecationError; this time in test_time (line 150;
> s/assertEquals/assertEqual/).
Fixed by r87759.
--
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
Version 3 of the patch to fix also #9319.
--
Added file: http://bugs.python.org/file20271/parser_filename_obj-3.patch
___
Python tracker
<http://bugs.python.org/issue10
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file20180/parser_filename_obj.patch
___
Python tracker
<http://bugs.python.org/issue10785>
___
___
Pytho
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file20184/parser_filename_obj-2.patch
___
Python tracker
<http://bugs.python.org/issue10785>
___
___
Pytho
STINNER Victor added the comment:
> Fix attached for test_imaplib
Oh thanks! Commited as r8 and r87778. I just changed the name of the
subfunction.
--
___
Python tracker
<http://bugs.python.org/issu
STINNER Victor added the comment:
> set the trace function later. Eg. replace exec(cmd, ...)
> by code=compile(cmd, ...) + exec(code) and set the trace function
> after the call to compile.
Implemented in the attached patch, bdb.patch: trace the execution of the code,
not the compi
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10840>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
See also #8991.
--
___
Python tracker
<http://bugs.python.org/issue10840>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
See also #8215.
--
___
Python tracker
<http://bugs.python.org/issue10840>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
Ah ok, now I remember the story. I cleaned up getargs.c recently. r83197
(#8991) removes the support of discontinious buffers. I guess that most
developers don't know what a discontinious buffer is and so they don't support
this kind of buffer
STINNER Victor added the comment:
bdb.patch doesn't work if cmd is not a string (if cmd is a code object).
r87780 fixes this issue: bdb.Bdb.run() only traces the execution of the code,
not the compilation (if the input is a string).
With this fix, the whole test suite pass on Linux wit
Changes by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10492>
___
___
Python-bugs-list
STINNER Victor added the comment:
test_threadsignals hang on "x86 FreeBSD 3.x" buildbot since at least the 17th
december (build 1030, r87341).
What is "FreeBSD 6.4"? Another buildbot?
--
nosy: +haypo
___
Python tracker
<
STINNER Victor added the comment:
test_threadsignals hang also on "x86 gentoo 3.x" since at least the 17th
december (build 3681, r87348).
--
___
Python tracker
<http://bugs.python.o
STINNER Victor added the comment:
"x86 gentoo 3.x" is an old Linux setup, see #4970: glibc 2.3.4,
linuxthreads-0.10 and Linux kernel 2.6.9-gentoo-r1. linuxthreads is the old
implementation of threads on Linux. It was replaced by NPTL with Linux kernel
2.6 and the GNU libc 2.4.
STINNER Victor added the comment:
"x86 debian parallel 3.x" buildbot is green again! :-)
--
___
Python tracker
<http://bugs.python.org/issue10492>
___
___
STINNER Victor added the comment:
I am unable to reproduce test_threadsignals hang with my FreeBSD 8.0 VM. A bug
was maybe fixed between FreeBSD 7.2 and FreeBSD 8.0?
--
___
Python tracker
<http://bugs.python.org/issue10
STINNER Victor added the comment:
test___all__ just loads ALL modules... and it doesn't unload them. I patched
test___all__ to unload modules: the "ResourceWarning: unclosed file ...
'/dev/null' ..." disappears, but a new error occurs. The multiprocessing module
regi
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue10845>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
Attached stdio_binary.patch always set stdin, stdout and stderr in binary mode
on Windows (and not only with -u command line flag). I added the following
comment, is it correct?
/* don't translate newlines */
--
keywords: +patch
nosy: +
STINNER Victor added the comment:
Using my patch, the interpreter fails with a SyntaxError on \r: attached patch
translates newlines to avoid this problem.
--
Added file: http://bugs.python.org/file20291/parser_translate_newline.patch
___
Python
STINNER Victor added the comment:
I tried full_source_and_error.zip on Windows and it failed. With
stdio_binary.patch (attached to #10841), it works but I get an unicode file
instead of a binary file. With stdio_binary.patch+cgi_plus_tests.diff it works
as expected: I get a binary file
STINNER Victor added the comment:
> Using my patch, the interpreter fails with a SyntaxError on \r:
> attached patch translates newlines to avoid this problem.
See also issue #4628.
--
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
The initial problem (":" in the LANGUAGE variable) was fixed in an independent
(?) issue (#1166938) by r39572.
If I understood correctly, locale.getdefaultlocale() is supposed to give the
locale settings that we will be active after the fir
STINNER Victor added the comment:
About the backward compatibility: does anyone use CGI with Python3? It looks
like the module is broken (at least to upload files). If not, it's maybe better
to fix it today than having to maintain a "broken" API.
Python 3.2 has many incomp
STINNER Victor added the comment:
eric> I always thought that one of the reasons for specifying the length
eric> was in case a pointer pointed to garbage: at least you'd be limiting
eric> how much trash was printed.
No, it's because of the old (removed) 500 bytes limit.
STINNER Victor added the comment:
The Qt library has its own strftime() implementation. The QLocale object has
methods providing localized day and month names. For example, day names are
implemented using a big ushort array (~20.000 bytes) which contains something
like
'Sun;Mon;Tue;We
STINNER Victor added the comment:
Is nl_langinfo() function reliable? On any OS? Can we use it to get day name,
abbreviated day name, month name and abbreviated month name?
We should maybe start with an implementation in Python? It's easier to write
code in Python than in C, and becau
STINNER Victor added the comment:
New patch setting O_BINARY mode using _setmode() (on Windows) to stdin, stdout,
stderr, but also to all FileIO() objects.
The patch on Py_Main() is still needed because Python may use sys.stderr when
it is still a stdprinter object, before the final
STINNER Victor added the comment:
Le vendredi 07 janvier 2011 à 02:19 +, Nadeem Vawda a écrit :
> Most of these leaks seem to stem from the fact that socket.SocketIO.close()
> doesn't behave as documented. According to its docstring, it is meant to
> decrement the under
STINNER Victor added the comment:
We may also accept TextIOWrapper (eg. sys.stdin) *and*
BufferedReader/FileIO (eg. sys.stdin.buffer). It is possible to test the
type of the stream. With a TextIOWrapper, the raw buffer can be read
using stream.buffer.
But for StringIO/BytesIO: only BytesIO
STINNER Victor added the comment:
I commited io_binary_windows.patch + parser_translate_newline.patch as r87824.
I fixed the patch on the parser to avoid leak on newtok if translate_newlines()
fails.
--
Added file: http://bugs.python.org/file20304/parser_translate_newline-2.patch
STINNER Victor added the comment:
Tests pass on Windows 7 buildbot, the two other XP buildbots have unrelated
issues. I also tested on my XP VM: all tests pass. So I close this issue.
--
resolution: -> fixed
status: open -> closed
___
STINNER Victor added the comment:
I fixed #10841 (r87824): stdin (and all other files) is now set to binary
(instead of text) mode on Windows.
--
___
Python tracker
<http://bugs.python.org/issue4
STINNER Victor added the comment:
I tried time.asctime() on Windows 32 bits (compiled with Visual Studio) with
accept2dyear=False: it accepts years in [-2^31; 2^31-1], cool.
--
___
Python tracker
<http://bugs.python.org/issue10
STINNER Victor added the comment:
The test fails on FreeBSD 6.2 (x86 FreeBSD py3k buildbot) since r87292 =>
#10720. I reopen the issue.
--
nosy: +haypo
resolution: fixed ->
status: closed -> open
___
Python tracker
<http://bug
STINNER Victor added the comment:
> PyBytes_FromFormatV() has the same issue.
Oh no, it's ok, the function works as expected.
--
___
Python tracker
<http://bugs.python.org
STINNER Victor added the comment:
+ PyErr_Fetch(&error_type, &error_value, &error_traceback);
+
+ PyErr_Clear();
I think that the call to PyErr_Clear() is useless, PyErr_Fetch() already
cleared the exception.
+ /* clear the error */
+ PyErr_Restor
STINNER Victor added the comment:
/* Returns the exception string as a new
PyUnicode object or NULL if the conversion failed */
NULL is not very useful to analyze the error :-/ Why don't keep errors if the
conversion failed? The caller will be responsible to use the new error, or to
STINNER Victor added the comment:
Here is a patch removing the arbitrary datetime.strftime() limit on year: it
adds an option "accept2dyear" to time.strftime() and datetime just sets this
option to False.
--
Added file: http://bugs.python.org/file20309/datetime_strftime_no
STINNER Victor added the comment:
strftime_1_.patch: replace 1900 <= year limit by 1 <= year or 1 <= year <=
(if compiled with Visual Studio). With more tests on years.
--
Added file: http://bugs.python.org/file20310/strftime_
STINNER Victor added the comment:
r87845+r87846 sets time.strftime() minimum year to 1 instead of 1900. If Python
is compiled with Visual Studio, it sets also the maximum year to .
--
___
Python tracker
<http://bugs.python.org/issue1777
New submission from STINNER Victor :
The following example displays '2345' instead of '12345':
import time
t = (12345,) + (0,)*8
print(repr(time.strftime("%Y", t)))
time.strftime() should raise a ValueError if the year is bigger than , as
it is done with Vis
STINNER Victor added the comment:
> With 3.2b2 on our Win7, 64 bit machine, files with a Japanese name...
What is your ANSI code page? If it is not a japanese code page, it is the issue
#3080.
On Windows, #8611 (and #9425) permit to use non-ASCII characters in the module
path... but o
STINNER Victor added the comment:
Oh, it's more funny with negative numbers: -1 is formatted '000/'.
Let's try r87850. I'm now waiting for the buildbot.
--
___
Python tracker
<http:
STINNER Victor added the comment:
> r87845+r87846 sets time.strftime() minimum year to 1 instead of 1900.
> If Python is compiled with Visual Studio, it sets also the maximum
> year to .
r87848 removes all limits on the year field; r87850 (Issue #10864) limits year
to [1;
STINNER Victor added the comment:
> Victor: How do I determine what code page my old w2k is using?.
python.exe -c 'import locale; print("ANSI code page:
{}".format(locale.getpreferredencoding()))'
> On Windows, #8611 (and #9425) permit to use non-ASCII charac
STINNER Victor added the comment:
> I think bugs in core syntax should have high priority.
It took me 7 months to implement the first part (#8611 and #9425). I plan to do
the second part (#3080) in Python 3.3 (it's too late for Python 3.2, final is
planned for February 5, 2011). I
STINNER Victor added the comment:
> Let's try r87850. I'm now waiting for the buildbot.
The test pass on both OpenIndiana buildbots, so I close the issue.
> On my Mac it displays "12345". I don't see that as a big problem.
Why do you say &quo
Changes by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10864>
___
___
Python-bugs-list
STINNER Victor added the comment:
time.asctime(), time.ctime() and time.strftime() are no more not limited for
the year field if accept2dyear=0. Except with Visual Studio or on Solaris: the
year is limited to the range [1; ].
--
___
Python
STINNER Victor added the comment:
time.asctime(), time.ctime() and time.strftime() are no more not limited for
the year field if accept2dyear=0. Except with Visual Studio or on Solaris: the
year is limited to the range [1; ].
datetime.strftime() is limited to year >= 1000 (instead
STINNER Victor added the comment:
Le samedi 08 janvier 2011 à 17:02 +, Skip Montanaro a écrit :
> I agree. I interpreted your ticket as complaining that it should raise
> a ValueError if year > :
Only on OpenIndiana because on this specific OS, "%Y" only supopr
STINNER Victor added the comment:
> ANSI code page: cp1252 ...os.fsencode('ä') => b'\xe4'
Hum, I ran your example with a debugger, and ok, I now remember the whole thing.
I fixed Python to support non-ASCII characters (... only non-ASCII characters
encodable to the
STINNER Victor added the comment:
> It is certainly possible to write Unicode to the console
> successfully using WriteConsoleW
Did you tried with characters not encodable to the code page and with character
that cannot be rendeded by the font?
See msg120414 for my test
STINNER Victor added the comment:
> I am concerned about conditions that are impossible in a valid
> program. However, if you have a buffer overflow that trashes your
> tp_name pointer so that it suddenly resolves to a binary code section,
Yes, %.100s may avoid a crash after t
STINNER Victor added the comment:
amaury> The script unicode2.py uses the console STD_OUTPUT_HANDLE iff
amaury> sys.stdout.fileno()==1
Interesting article about the Windows console:
http://blogs.msdn.com/b/michkap/archive/2008/03/18/8306597.aspx
There is an example which has many te
STINNER Victor added the comment:
Some comments on cgi_diff_20110109.txt, especially on FieldStorage
constructor.
Le dimanche 09 janvier 2011 13:26:24, vous avez écrit :
> Here is the diff file for the revised version of cgi.py
+import msvcrt
+msvcrt.setmode
STINNER Victor added the comment:
> I set an attribute encoding to self.fp because, for each part
> of a multipart/form-data, a new instance of FieldStorage is created,
> and this instance needs to know how to decode bytes.
Set fp.encoding may raise an error (eg. for a read-only obje
STINNER Victor added the comment:
Extract of the Unicode standard: "Use of a BOM is neither required nor
recommended for UTF-8, but may be encountered in contexts where UTF-8 data is
converted from other encoding forms that use a BOM or where the BOM is used as
a UTF-8 signature".
STINNER Victor added the comment:
See also issue #7651: "Python3: guess text file charset using the BOM".
--
___
Python tracker
<http://bugs.python.org
New submission from STINNER Victor :
test_urllibnet.py and test_urllibnet2.py emit ResourceWarning:
==
$ ./python Lib/test/test_urllibnet.py
testURLread (__main__.URLTimeoutTest) ... ok
test_bad_address (__main__.urlopenNetworkTests) ... ok
test_basic (__main__.urlopenNetworkTests
STINNER Victor added the comment:
I opened a separated issue for test_urllib and test_urllib2net: #10883.
--
___
Python tracker
<http://bugs.python.org/issue10
STINNER Victor added the comment:
> [readinst) should return a negative value on error, whereas it
> returns the string length which is always positive
Fixed by r87911.
--
___
Python tracker
<http://bugs.python.org/
STINNER Victor added the comment:
r87917 removes (useless and dangerous) conversion to size_t.
--
___
Python tracker
<http://bugs.python.org/issue9611>
___
___
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file20263/pyexpat.patch
___
Python tracker
<http://bugs.python.org/issue9566>
___
___
Python-bugs-list m
STINNER Victor added the comment:
socketmodule_int.patch: Fix similar to the fix for #9611: clamp length to
INT_MAX on Windows for recv(), recvfrom(), send() and sendto().
--
Added file: http://bugs.python.org/file20345/socketmodule_int.patch
STINNER Victor added the comment:
ssl_sock_fd_int.patch: add SOCKET_T_AS_INT(fd) macro to cast a socket
descriptor (SOCKET_T) to int. I choosed a macro just to not have to repeat a
comment twice :-)
It looks like it is a safe to cast SOCKET_T to int. My comment:
/* On Windows, SOCKET_T is
STINNER Victor added the comment:
> On Windows, SOCKET_T is an offset in per-process handle table.
> The per-process limit on kernel handles is 2^24. Kernel Objects:
Reference: http://www.mail-archive.com/openssl-dev@openssl.org/msg2378
STINNER Victor added the comment:
ssl_write.patch: always clamp SSL_Write() size to INT_MAX. This patch fixes
also an overflow if Py_ssize_t is 32 bits (if the size is bigger than INT_MAX).
--
Added file: http://bugs.python.org/file20347/ssl_write.patch
STINNER Victor added the comment:
hash.patch: continue my fix on md5, sha1, sha256, sha512.
--
Added file: http://bugs.python.org/file20348/hash.patch
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
_sre.patch: store sre_match() result in Py_ssize_t instead of int.
--
Added file: http://bugs.python.org/file20349/_sre.patch
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
... and issue9566.patch: various fixes. Interesting parts:
---
-id = PyLong_FromLong((Py_uintptr_t) self);
+id = PyLong_FromVoidPtr(self);
---
---
LOCAL(PyObject*)
-expat_parse(XMLParserObject* self, char* data, int data_len, int final)
+expat_parse
STINNER Victor added the comment:
On Linux, cfmt.py fails on fr_FR locale (the only valid locale in the list of
tested locales):
---
fr_FR [mer. 12 janv. 2011 11:30:35 CET] %a %d %B %Y %H:%M:%S %Z != %a %d %b %Y
%T %Z
---
The problem is the month format: locale.nl_langinfo(locale.D_T_FMT
STINNER Victor added the comment:
With gcc-4.6 -O1, Python 3.2 works correctly. With gcc-4.6 -O1
-ftree-vectorize, the assertion "assert (new_line - last_line < 255);" fails in
PyCode_Optimize().
I think that the problem is in the following loop:
STINNER Victor added the comment:
More info about the loop:
Py_ssize_t i;
int nops;
My setup:
* Intel(R) Pentium(R) 4 CPU 3.00GHz
* Debian Sid
* gcc (Debian 20110106-1) 4.6.0 20110106 (experimental) [trunk revision 168538
STINNER Victor added the comment:
> Looks like code generation is borked.
I sent an email to the mailing list:
http://gcc.gnu.org/ml/gcc-help/2011-01/msg00136.html
--
___
Python tracker
<http://bugs.python.org/iss
STINNER Victor added the comment:
I reported the bug to GCC:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47271
--
title: Python 2.7 Won't Build: SystemError: unknown opcode -> GCC 4.6 bug with
-ftree-vectorize
___
Python tracke
STINNER Victor added the comment:
> Do we have to keep this open?
Nope, let's close it.
--
status: open -> closed
___
Python tracker
<http://bugs.python
STINNER Victor added the comment:
I tested cgi_32.patch on Windows with Apache:
- a test with a binary file works: I get a binary file instead of a text file
- a test with a non-ASCII character (a\xe9b) works: the text is correctly
decoded
I used the test script from
STINNER Victor added the comment:
Le jeudi 13 janvier 2011 à 23:05 +, Alexander Belopolsky a écrit :
> I take your comment as +1 for adding PyModule_GetNameObject().
I wrote a similar patch to add PyModule_GetNameObject() (I am working on
another huge patch, to fix #3080). You have
STINNER Victor added the comment:
r87996+r87997 adds encoding and errors argument to parse_qs() and parse_qsl()
of urllib.parse. It is needed to decoded correctly %XX syntax in cgi.
r87998 is the patch on the cgi module.
Changes with cgi_32.patch:
* Use TextIOWrapper instead of TextIOBase
STINNER Victor added the comment:
Oh, I forgot to credit the author(s): who wrote the patch?
--
___
Python tracker
<http://bugs.python.org/issue4953>
___
___
STINNER Victor added the comment:
TODO: Add more tests to test_cgi. What is the latest patch for test_cgi?
--
___
Python tracker
<http://bugs.python.org/issue4
STINNER Victor added the comment:
haypo>> What is the latest patch for test_cgi?
quentel> My latest patch for test_cgi is in cgi_32.patch
Ok, but cgi_32.patch doesn't add any test. I only adapt existing tests for your
other changes.
I remove cgi_32.patch because i
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file20403/cgi_32.patch
___
Python tracker
<http://bugs.python.org/issue4953>
___
___
Python-bugs-list m
STINNER Victor added the comment:
Remove cgi_plus_tests.diff: it looks to be an old version of cgi_32.patch.
@r.david.murray: Did you write cgi_plus_tests.diff, or is it based on the work
on Pierre Quentel?
--
___
Python tracker
<h
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file20269/cgi_plus_tests.diff
___
Python tracker
<http://bugs.python.org/issue4953>
___
___
Python-bug
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file12750/tmpav1vve.html
___
Python tracker
<http://bugs.python.org/issue4953>
___
___
Python-bugs-list m
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file12751/tmpy44zj7.html
___
Python tracker
<http://bugs.python.org/issue4953>
___
___
Python-bugs-list m
STINNER Victor added the comment:
Remove tmpy44zj7.html and tmpav1vve.html: a similar file is included in
full_source_and_error.zip.
--
___
Python tracker
<http://bugs.python.org/issue4
New submission from STINNER Victor :
cgi was recently fixed just before Python 3.2 final, but the module has few
tests. More tests should be written.
You can find some examples attached to #4953.
--
components: Library (Lib), Tests
messages: 126300
nosy: haypo
priority: normal
STINNER Victor added the comment:
Because I'm unable to read the whole history and analyze each file attached to
this issue, I opened #10911 to ask to write more tests for the cgi module.
--
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
belopolsky> Limiting field width when formatting error messages is
belopolsky> a good safety measure.
The problem is that PyUnicode_FromFormatV() doesn't support %.100s format (it
ignores .100). If we truncate at 100 bytes, it may truncate an UTF-
3401 - 3500 of 35284 matches
Mail list logo