Changes by STINNER Victor :
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue5715>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> Victor, you broke the Solaris gcc buildbot on 2.7.
It should be fixed by d5771ed4ec4e.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
On Friday 19 November 2010 20:42:53 you wrote:
> Alexander Belopolsky added the comment:
>
> I don't understand Victor's argument in msg115889. According to UTF-8 RFC,
> <http://www.ietf.org/rfc/rfc2279.txt>:
>
>
STINNER Victor added the comment:
> My build error seems actually unrelated to encoding issues. Working
> directory is ASCII-only, locale is UTF-8.
>
> $ ./configure --with-pydebug
> [snip]
> $ make
> [snip]
> ranlib libpython3.2dm.a
> gcc -pthread -Xlinker -expor
STINNER Victor added the comment:
On Friday 19 November 2010 21:58:25 you wrote:
> > I choosed to use ASCII instead of UTF-8, because an UTF-8 decoder is long
> > (210 lines) and complex (see PyUnicode_DecodeUTF8Stateful()), whereas
> > ASCII decode is just: "unicode_
STINNER Victor added the comment:
> no cookie found, returns ('utf-8', [line1, line2])
I never understood the usage of the second item. IMO it should be None if no
cookie found.
--
___
Python tracker
<http://bugs.pyth
New submission from STINNER Victor :
Python3 doc tells that UTF-16-LE and UTF-16-BE only support BMP characters.
What? I think that it is wrong.
It was maybe wrong with Python2 and narrow build (unichr() only supports BMP
characters), but it is no more true in Python3.
--
assignee: d
Changes by STINNER Victor :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue10541>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
I don't like macro having a result and using multiple instructions using the
evil magic trick (the ","). It's harder to maintain the code and harder to
debug than a classical function.
Don't you think that modern compilers are abl
STINNER Victor added the comment:
About the topic:
> subprocess seems to use local 8-bit encoding and gives no choice
I don't understand that: by default, Python 2 and Python 3 use byte strings, so
there is no encoding (nor error handler).
I don't see how you can get unicode f
STINNER Victor added the comment:
> ... it always seems to use the local 8-bit encoding
The locale encoding is not necessary a 8-bit encoding, it can by a multibyte
like... UTF-8 :-)
--
subprocess.patch: You should maybe use io.open(process.stdout.fileno(),
encoding=..., err
New submission from STINNER Victor :
On Windows, the Python interpreter fails to display a result if stdout encoding
is unable to encode it. This problem exists since Python 3.0. Eg. see issue
#1602.
This problem is not specific to Windows. Even if stdout encoding is UTF-8
(which is the
STINNER Victor added the comment:
This issue is opposed to the PEP 3128:
<< Default error-handler of sys.stdout should be 'backslashreplace'.
Stuff written to stdout might be consumed by another program that might
misinterpret the escapes. For interactive session, it is
STINNER Victor added the comment:
I created a new issue for Ezio's proposition to patch sys.displayhook: issue
#10601.
To answer the initial question, "Should repr() print unicode characters outside
the BMP?", Marc-Andre, Ezio and me agree that we should keep the current
b
Changes by STINNER Victor :
--
nosy: +amaury.forgeotdarc, lemburg
___
Python tracker
<http://bugs.python.org/issue10601>
___
___
Python-bugs-list mailin
Changes by STINNER Victor :
--
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue9198>
___
___
Python-bugs-list
STINNER Victor added the comment:
> This issue is opposed to the PEP 3128:
>
> << Default error-handler of sys.stdout should be 'backslashreplace'
Oops sorry, no it is not opposed to the PEP (this issue doesn't propose to
change the defau
STINNER Victor added the comment:
Use surrogateescape error handler to decode a Windows path is not a good idea.
On Windows, the problem is not to decode a path (ANSI => wide char), but to
encode a path (wide char => ANSI) to use a function expecting bytes path
encoded to the ANSI cod
STINNER Victor added the comment:
See also #10601: "sys.displayhook: use backslashreplace error handler if
repr(value) is not encodable to sys.stdout".
--
___
Python tracker
<http://bugs.python.o
STINNER Victor added the comment:
> If it's an env variable, though, it should be clear that it's
> CPython-specific, so I'm not sure how to call it.
Why do you think that only this variable is CPython-specific? CPython has an
option called PYTHONDONTWRITEBYTECODE, bu
STINNER Victor added the comment:
I agree that clamping is a nice solution, and attached patch implements it.
About the question of the loop: FileIO.readall() uses while(1) without checking
for signals. It looks like new_buffersize() maximum size is not BIGCHUNK but
(BIGCHUNK-1)*2
STINNER Victor added the comment:
(oops, the patch contained unrelated changes: remove trailing spaces)
--
Added file: http://bugs.python.org/file19899/read_write_32bits.patch
___
Python tracker
<http://bugs.python.org/issue9
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file19898/read_write_32bits.patch
___
Python tracker
<http://bugs.python.org/issue9611>
___
___
Python-bug
STINNER Victor added the comment:
Great!
--
___
Python tracker
<http://bugs.python.org/issue10603>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: -haypo
___
Python tracker
<http://bugs.python.org/issue10557>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
@Hirokazu: Can you attach a small test archive?
Yes, we can add a "default_encoding" attribute to ZipFile and add an optional
default_encoding argument to its constructor.
--
nosy: +haypo
___
Python trac
STINNER Victor added the comment:
-def getstatusoutput(cmd):
+def getstatusoutput(cmd, shell=True):
shell=True is dangerous, it can lead to shell command injection. I would prefer
to set its default value to False. The function already exists in Python 3.1,
but it is not used in Python
STINNER Victor added the comment:
Dummy question: why don't you use KeyboardInterrupt instead of a custom SIGINT
handler?
try:
for i in range(100):
print(i)
except KeyboardInterrupt:
print("got sigint")
Python SIGINT handler raises a KeyboardInterrupt
STINNER Victor added the comment:
This issue remembers me #3618 (opened 2 years ago): I proposed to use RLock
instead of Lock, but RLock was implemented in Python and were too slow. Today,
we have RLock implemented in C and it may be possible to use them. Would it
solve this issue
STINNER Victor added the comment:
This issue remembers me #3618 (opened 2 years ago): I proposed to use RLock
instead of Lock, but RLock was implemented in Python and were too slow. Today,
we have RLock implemented in C and it may be possible to use them. Would it
solve this issue
Changes by STINNER Victor :
--
Removed message: http://bugs.python.org/msg123242
___
Python tracker
<http://bugs.python.org/issue10478>
___
___
Python-bugs-list m
STINNER Victor added the comment:
Ok, so +1 to apply immediatly your patch which "fixes" the deadlock. If someone
is motived to make Buffered* classes reentrant, (s)he can remove this exception.
io and signal documentation should also be improved to indicate that using
buffere
New submission from STINNER Victor :
b'abc'.partition(':') raises a confusing TypeError('expected an object with the
buffer interface'): what is a buffer? what is the buffer interface?
The error comes from PyObject_AsCharBuffer() which is used by:
- bytes method
STINNER Victor added the comment:
See also #10616.
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue6780>
___
___
Python-bugs-list mailin
STINNER Victor added the comment:
See also #6780.
--
___
Python tracker
<http://bugs.python.org/issue10616>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> complex(): raise a better but incomplete error message on error
> ("complex() arg is not a string"), incomplete because number is not
> mentionned
Fixed by r86977.
--
___
Python tracker
<
STINNER Victor added the comment:
Commited to Python 3.2 (r87054).
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
Fixed by r87135.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10546>
___
__
STINNER Victor added the comment:
Can you add a test to your patch?
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue7213>
___
___
Python-bug
STINNER Victor added the comment:
issue6697-lsprof.diff:
- Oh, I did recently a similar change on PyModule: I created
PyModule_GetFilenameObject()
- "PyObject * mod" => "PyObject *mod"
- modname is not initialized if fn->m_module (mod) is NULL => initialize
STINNER Victor added the comment:
Yes, I patched the C code to not clear exceptions anymore at startup: r78826
(issue #3137). But this issue is different: here the bug is in the 3rd party
module (loaded by site.py), not in Python, and Donald proposes to *ignore*
errors (where I did the
STINNER Victor added the comment:
> I wonder if tkinter should use this encoding.
Tkinter is used to build graphical interfaces. I don't think that users write
nul bytes with their keyboard. But there is maybe a use case?
--
___
Python
STINNER Victor added the comment:
You can reproduce the bug with:
$ lang=fr_fr.iso885...@euro ./python -c 'import pdb;
pdb.Pdb(nosigint=True).run("exec(%r)" % "x=12")'
> /home/haypo/prog/SVN/py3k/Lib/encodings/iso8859_15.py(15)decode()
-> retur
STINNER Victor added the comment:
See a more complex solution: #3080 (don't decode the filename in the parser,
keep unicode strings).
--
___
Python tracker
<http://bugs.python.org/is
Changes by STINNER Victor :
--
title: site.py crashes on python startup due to defective .pth file -> Improve
the error message of addpackage() (site.py) for defective .pth file
___
Python tracker
<http://bugs.python.org/issu
STINNER Victor added the comment:
subprocess-cloexec-atomic-py3k-tests2-close_fds.patch adds a test called to
Win32ProcessTestCase which is specific to Windows. And this class has already a
test with the same name. You should move your test to ProcessTestCase (and so
it will test the C
STINNER Victor added the comment:
> subprocess-cloexec-atomic-py3k-tests2-close_fds.patch adds a test
> called [test_close_fds] to Win32ProcessTestCase ...
Oops, forget my last comment, I didn't applied the patches in the right order.
There are too much patches :-p Can you try to
STINNER Victor added the comment:
subprocess-cloexec-atomic-py3k.patch:
+case $ac_sys_system in
+ GNU*|Linux*)
+ AC_CHECK_FUNC(pipe2, AC_DEFINE(HAVE_PIPE2, 1, [Define if the OS supports
pipe2()]), )
+esac
I think that you can remove the test on the OS name. AC_CHECK_FUNC() doesn
STINNER Victor added the comment:
test_pipe_cloexec_unix_tools() is specific to UNIX/BSD because it requires cat
and grep programs. You should try to reuse the Python interpreter to have a
portable test (eg. working on Windows), as you did with fd_status.py.
+data
STINNER Victor added the comment:
fd_status.py:
+try:
+_MAXFD = os.sysconf("SC_OPEN_MAX")
+except:
+_MAXFD = 256
It looks like this code (256 constant) comes from subprocess.py. Is that a good
value? On Linux, SC_OPEN_MAX is usually 1024, and it can be 4096. Should we
STINNER Victor added the comment:
> Haypo describes his complicated patch as "useful on Windows",
> but not critical
Usecase on Windows: your japanese friend gives you an USB key (eg. created on
Windows with code page 932) with his Python project, you cannot run it on your
STINNER Victor added the comment:
> Haypo describes his complicated patch as "useful on Windows",
> but not critical
Usecase on Windows: your japanese friend gives you an USB key (eg. created on
Windows with code page 932) with his Python project, you cannot run it on your
STINNER Victor added the comment:
"Ooops", sorry. I just applied the patch suggested by Marc-Andre Lemburg in
msg22885 (#1054943). As the patch worked for the examples given in Unicode PRI
29 and the test suite passed, it was enough for me. I don't understand the
normaliza
STINNER Victor added the comment:
It looks like it's not possible to choose between float and (int, int) output
type for datetime.totimestamp(). One is more practical (and enough for people
who doesn't need an exact result), and one is needed to keep the same
resolution than th
STINNER Victor added the comment:
Version 9 of my patch:
- Create PYTHONNOHANDLER environment variable: don't install the signal
handler if the variable is set
- Rename "Segfault" by "FaultHandler"
- reverse_string() does nothing if len==0, even if it cannot o
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file19214/segfault_handler-5.patch
___
Python tracker
<http://bugs.python.org/issue8863>
___
___
Pytho
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file19227/segfault_handler-6.patch
___
Python tracker
<http://bugs.python.org/issue8863>
___
___
Pytho
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file19288/segfault_handler-7.patch
___
Python tracker
<http://bugs.python.org/issue8863>
___
___
Pytho
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file19289/segfault_handler-8.patch
___
Python tracker
<http://bugs.python.org/issue8863>
___
___
Pytho
STINNER Victor added the comment:
Oh, I'm tired...
> Summary of the patch:
> - ...abort the process (call the debugger on Windows)
(the debugger is only called if Python is compiled in debug mode)
> - Add PYTHONNOHANDLER environment variable ...
Oops, the c
STINNER Victor added the comment:
> Why was sys.setsegfaultenabled() omitted?
Just because I forgot your message, sorry.
--
___
Python tracker
<http://bugs.python.org/iss
STINNER Victor added the comment:
Version 10 of my patch:
- the fault handler restores the previous signal handler instead of calling
(DebugBreak() and) abort(): the previous signal handler will be called later to
keep the orignal behaviour
- _testcapi.sigill() and _testcapi.sigbus() send
STINNER Victor added the comment:
Le lundi 20 décembre 2010 07:55:08, vous avez écrit :
> +#define NFAULT_SIGNALS (sizeof(fault_signals) / sizeof(fault_signals[0]))
> +static fault_handler_t fault_handlers[4];
>
> , should use "NFAULT_SIGNALS" instead of "4&quo
STINNER Victor added the comment:
The fault handler is unable to retrieve the thread state if the GIL is
released. I will try to fix that.
--
___
Python tracker
<http://bugs.python.org/issue8
STINNER Victor added the comment:
Version 11 of my patch:
- Disable the fault handler (and displaying the backtrace on a fatal error) by
default
- The fault handle can be enabled by setting the PYTHONFAULTHANDLER
environment variable or using "-X faulthandler" command line optio
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file20102/segfault_handler-9.patch
___
Python tracker
<http://bugs.python.org/issue8863>
___
___
Pytho
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file20113/segfault_handler-10.patch
___
Python tracker
<http://bugs.python.org/issue8863>
___
___
Pytho
Changes by STINNER Victor :
--
versions: +Python 3.2
___
Python tracker
<http://bugs.python.org/issue8863>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> Does the latest patch address the GIL/multithreading issues?
Yes.
--
___
Python tracker
<http://bugs.python.org/iss
STINNER Victor added the comment:
Le jeudi 23 décembre 2010 à 02:27 +, Scott Dial a écrit :
> Scott Dial added the comment:
>
> On 12/22/2010 8:52 PM, STINNER Victor wrote:
> > Amaury asked for a sys.setsegfaultenabled() option: I think that the
> > comman
STINNER Victor added the comment:
Le jeudi 23 décembre 2010 à 02:27 +, Scott Dial a écrit :
> Scott Dial added the comment:
>
> On 12/22/2010 8:52 PM, STINNER Victor wrote:
> > Amaury asked for a sys.setsegfaultenabled() option: I think that the
> > comman
STINNER Victor added the comment:
Le jeudi 23 décembre 2010 à 02:45 +, Alexander Belopolsky a écrit :
> As I suggested on python-dev, I also think this belongs to a separate
> module rather than core or sys.
Why do you want to move it outside Python core? It is very dependent of
STINNER Victor added the comment:
Note: To avoid the signal-safe requirement, another solution is to use
sigsetjmp()+siglongjmp().
--
___
Python tracker
<http://bugs.python.org/issue8
New submission from STINNER Victor :
If more than one file (stdin, stdout and stderr) are pipes, Popen.communicate()
uses threads calling _readerthread() on each pipe. But this method doesn't
close the pipes, whereas all other communicate implementations (select, poll
and the optimizati
Changes by STINNER Victor :
--
nosy: +amaury.forgeotdarc, pitrou
___
Python tracker
<http://bugs.python.org/issue10763>
___
___
Python-bugs-list mailing list
Unsub
STINNER Victor added the comment:
I tested the patch version 11 on Windows: all tests pass. But #include
should be skipped on Windows (Python/fault.c): I will add #ifdef
MS_WINDOWS.
--
___
Python tracker
<http://bugs.python.org/issue8
STINNER Victor added the comment:
> I tested the patch version 11 on Windows: all tests pass.
Oh, and I forgot to say that the Windows fault handler does catch the fault too
(Windows opens a popup with a question like "Should the error be reported to
M
STINNER Victor added the comment:
Tested on FreeBSD 8: all tests pass (all of the 4 signals are supported) and
FreeBSD dumps a core file.
--
___
Python tracker
<http://bugs.python.org/issue8
STINNER Victor added the comment:
Tested on Ubuntu 10.04: all tests pass and apport intercepts the fault. Apport
ignores the faults because I am testing a Python executable compiled from SVN
(py3k). Apport logs (/var/log/apport.log):
---
apport (pid 18148) Thu Dec 23 13:29:25 2010: called for
STINNER Victor added the comment:
p3k_i9313.diff is just a workaround, not the correct fix. The problem is that
PyTokenizer_FindEncoding() doesn't get the filename.
I wrote tokenizer_encoding_filename.patch which add
PyTokenizer_FindEncodingFilename() and patch import.c and traceback
STINNER Victor added the comment:
See also #9738 (Document the encoding of functions bytes arguments of the C
API) to check which encoding is expected :-p
--
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
Georg rejected this patch in Python 3.2:
"I did say I like the feature, but that was a) before beta 2
was released, now the next release is a release candidate, and b) this
thread showed that it is not at all obvious how the feature should look
like. The
STINNER Victor added the comment:
Le vendredi 24 décembre 2010 à 14:46 +, Baptiste Carvello a écrit :
> the patch solves the bug for me as well (using locale "C", the
> filesystem encoding is utf-8). However, I do not understand why the
> patch checks that the sheban
STINNER Victor added the comment:
Update copy_script patch: add comments to explain why the shebang have to be
decodable from UTF-8 and from the script encoding.
--
Added file: http://bugs.python.org/file20165/copy_script-2.patch
___
Python tracker
STINNER Victor added the comment:
Fixed by r87485 (Python 3.2).
I don't want to fix it in 2.7 or 3.1, because maybe someone relies on this bug
and it's a minor bug :-) Reopen the issue if you would like a backport.
--
resolution: -> fixed
status: o
STINNER Victor added the comment:
Le samedi 25 décembre 2010 à 22:35 +, Éric Araujo a écrit :
> Victor: Your patch uses os.fsencode, so porting to distutils2 won’t be
> easy.
In Python 3.1, you can replace name=os.fsencode(name) by
name=name.encode(sys.getfilesystemen
STINNER Victor added the comment:
r87504 documents encodings of error functions.
r87505 documents encodings of unicode functions.
r87506 documents encodings of AST, compiler, parser and PyRun functions.
--
___
Python tracker
<http://bugs.python.
New submission from STINNER Victor :
decoding_fgets() decodes the input filename from UTF-8 whereas the filename is
encoded to the filesystem encoding. PyUnicode_DecodeFSDefault() should be used.
decoding_fgets() raises a SyntaxError("Non-UTF-8 code starting with '\xHH' in
f
New submission from STINNER Victor :
PyErr_WarnExplicit() expects a filename encoded to UTF-8. This function is only
called twice in the Python interpreter: compiler_assert() (with "assertion is
always true, perhaps remove parentheses?") and symtable_warn() (eg. with "name
STINNER Victor added the comment:
See also issue #10779 (Change filename encoding to FS encoding in
PyErr_WarnExplicit()).
--
___
Python tracker
<http://bugs.python.org/issue10
STINNER Victor added the comment:
While documenting encodings, I found two issues: #10778 and #10779.
--
___
Python tracker
<http://bugs.python.org/issue9
New submission from STINNER Victor :
PyErr_SetFromWindowsErrWithFilename() expects a filename encoded to UTF-8. It
is called by win32_error() function of the nt (posix) module, and win32_error()
is called on an error in the bytes implementation of a function (if the
argument is a byte string
STINNER Victor added the comment:
issue10780.patch fixes this issue.
--
keywords: +patch
Added file: http://bugs.python.org/file20171/issue10780.patch
___
Python tracker
<http://bugs.python.org/issue10
STINNER Victor added the comment:
issue10780_mbcs_ignore.patch is a safer but more complex fix: use mbcs decoder
with the ignore error handler. Even if issue10780.patch might raise a
UnicodeDecodeError, I prefer it because it's shorter, simpler and so easier to
maintain the
STINNER Victor added the comment:
Oh, ignore "indenterror() (inconsistent use of tabs and spaces in indentation)
and", I forgot to remove it. indenterror() is correct.
--
___
Python tracker
<http://bugs.python.o
STINNER Victor added the comment:
https://github.com/haypo/faulthandler/wiki can be tried on this buildbot to get
more information about this issue. But the module have to be installed on this
host.
--
___
Python tracker
<http://bugs.python.
STINNER Victor added the comment:
Fixed by r87517.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10779>
___
__
STINNER Victor added the comment:
Fixed by r87518.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10778>
___
__
STINNER Victor added the comment:
Fixed by r87519.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10780>
___
__
STINNER Victor added the comment:
This "feature" was introduced in a big commit from Guido van Rossum (made
before Python 3.0): r55500. The changelog is strange because it starts with
"Make test_zipfile pass. The zipfile module now does all I/O in binary mode
using bytes."
3201 - 3300 of 35168 matches
Mail list logo