STINNER Victor added the comment:
> try with _POSIX_C_SOURCE set to 200809L and _XOPEN_SOURCE to 700
_POSIX_C_SOURCE value is set automatically depending on _XOPEN_SOURCE value. I
chose to set _XOPEN_SOURCE to 700, instead of 600: it works on OpenBSD 5.0. I
don't know if _XOPEN_SOURC
Changes by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12852>
___
___
Python-bugs-list
STINNER Victor added the comment:
> I know, but I think it's better to be consistent an also bump
> _POSIX_C_SOURCE to POSIX 2008
Oh, I missed AC_DEFINE(_POSIX_C_SOURCE, ...) after AC_DEFINE(_XOPEN_SOURCE,
...). Fixed.
--
___
Python tra
STINNER Victor added the comment:
timespec is just a structure of two integers, so we should expose it as a
simple and efficient Python tuple: (int, int). We can simply expose this type
in os.stat, or we can do better by providing an optional callback to convert
this tuple to a high level
STINNER Victor added the comment:
See also issue #12760 (Add create mode to open).
--
___
Python tracker
<http://bugs.python.org/issue12105>
___
___
Python-bug
New submission from STINNER Victor :
On Windows, Python uses the POSIX API (file descriptors), instead of the native
API (file handles). Some features cannot be used using the POSIX API, like
setting security attributes. It would be nice to have a io.FileIO using Windows
file handlers to get
STINNER Victor added the comment:
See also issue #1602: a prototype of a console object has been proposed to use
the native Windows console API, instead of the POSIX API (read from fd 0, write
to fd 1 or 2). The prototype is implemented in Python using ctypes
STINNER Victor added the comment:
> > Why not to use CreateFile() on Windows platform?
> Good idea! Please open a separate issue for it.
Done, issue #12939.
--
___
Python tracker
<http://bugs.python.or
STINNER Victor added the comment:
It looks like Python cannot do much to workaround OpenBSD issues. IMO the best
fix is just to skip these tests on OpenBSD, until OpenBSD handles correctly
signals in programs linked to pthread. The same "fix" can be used
STINNER Victor added the comment:
+if have_long_long:
+class LongLongTest(SignedNumberTest):
+...
It is maybe better to use @unittest.skipIf(not have_long_long, 'need long long
support'). Except of this nit, the patch looks correct.
--
no
STINNER Victor added the comment:
"As I mentioned earlier in this thread, GCC has supported __float128 since 4.3,
Clang added support within the last year, and Intel has a _Quad type. All are
purported to be IEEE 754-2008 quad-precision floats. Glibc added "quadmath.h"
rec
STINNER Victor added the comment:
Can you give me examples of configuration keys with undecodable values?
PyUnicode_DecodeFSDefault(AndSize) encoding depends on the locale whereas
PyUnicode_FromString uses utf-8. I don't know the encoding of confstr() values.
You can decode an utf-8
STINNER Victor added the comment:
About confstr-long-result.diff: why do you use a loop to reallocate the buffer?
confstr() result may change?
--
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
> - PKG-INFO (METADATA in distutil2), that already uses a trick to support
> Unicode, but your change would replace it in a better way;
Which "trick"?
> - MANIFEST, which with your fix would gain the ability to handle non-ASCII
> paths,
STINNER Victor added the comment:
(About PyFile_FromFd)
pitrou> Actually, I'm not sure there's much point since the "name"
pitrou> attribute is currently read-only: (...)
Oh, it remembers me #4762. I closed this issue with the message "The last
problem occ
STINNER Victor added the comment:
> The patch looks good.
Can it/should it be applied to 2.7 too?
> Just one nit: could you please indent the doc-string
> to match the original indentation ?
Done. New patch attached. Is it ok like that?
--
Added file: http://bugs.p
STINNER Victor added the comment:
Hey! I don't know why, but I posted a truncated patch. It doesn't remove the
code removing the filename and so it breaks the code. New try: version 3 should
be ok :-)
--
Added file: http://bugs.python.org/file18494/_syscmd_fi
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18493/_syscmd_file-2.patch
___
Python tracker
<http://bugs.python.org/issue9560>
___
___
Python-bug
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18470/_syscmd_file.patch
___
Python tracker
<http://bugs.python.org/issue9560>
___
___
Python-bug
STINNER Victor added the comment:
Hyeshik Chang, who opened this issue, wrote (msg83672) "When I asked Taiwanese
developers how often they use these character sets, it appeared that they are
almost useless in the usual computing
environment in Taiwan. This will only serve for a histo
STINNER Victor added the comment:
> I thought you and...Ezio? were talking about some way to improve
> the encoding situation when reading from/writing to a pipe.
I don't want to change that. If you come with arguments in favor of changing
that (and maybe some ideas to choose t
STINNER Victor added the comment:
About issue9198.diff:
- exit directly if !PyErr_ExceptionMatches(PyExc_UnicodeEncodeError) to avoid
an useless level of indentation
- why do you clear the exception before calling PyObject_Repr()? if you cannot
execute code while an exception is active, you
STINNER Victor added the comment:
> I can't reproduce this on Windows ...
This issue is (was?) maybe specific to Linux.
--
___
Python tracker
<http://bugs.python.or
STINNER Victor added the comment:
> Are there any tests that could be easily added to the test suite?
I don't know an easy way to simulate malloc failure. There is the
http://www.nongnu.org/failmalloc/ library but I never used it, and I don't
think that it's widely used.
STINNER Victor added the comment:
> Thanks, fixed in r83558.
.. cfunction:: PyObject* PyUnicode_DecodeUTF8Stateful(...)
UTF-7 or UTF-8?
--
___
Python tracker
<http://bugs.python.org/iss
STINNER Victor added the comment:
Lib/os.py may also be patched to add a Python implementation. Eg.
def fsdecode(value):
if isinstance(value, str):
return value
elif isinstance(value, bytes):
encoding = sys.getfilesystemencoding()
if encoding == '
STINNER Victor added the comment:
> 1. Datetime.py time source (time.time()) represents time as
> a floating point number which leads to system dependent behavior
> and introduces floating point operations where they are not needed.
Why not introducing a new function in time modu
STINNER Victor added the comment:
r83971 enables test.support.TESTFN_UNDECODEABLE on non-Windows OSes.
--
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
I commited nullimporter_unicode.patch with an unit test as r83972.
--
___
Python tracker
<http://bugs.python.org/issue9
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18434/nullimporter_unicode.patch
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Pytho
STINNER Victor added the comment:
> Looking at the only use case of _syscmd_file(), it may not even
> be worth the trouble of adding the -b option. Fixing the doc-string
> may be enough: (...)
Well, my problem is that _syscmd_file() fails with a non encodable filename on
Linux be
STINNER Victor added the comment:
@lemburg: Your mail client likes to change the issues' title by adding some
spaces :-)
--
___
Python tracker
<http://bugs.python.org/i
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18469/_PyFile_FromFdUnicode.patch
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Pytho
STINNER Victor added the comment:
r83973 ignores the name argument of PyFile_FromFd() because it was already
ignored (it did always produce an error) and it avoids my complex
_PyFile_FromFdUnicode.patch. Thanks Antoine to having notice that name was
ignored
STINNER Victor added the comment:
r83973 ignores the name argument of PyFile_FromFd() because it was already
ignored (it did always produce an error).
--
___
Python tracker
<http://bugs.python.org/issue4
STINNER Victor added the comment:
@r.david.murray, @lemburg: So, can I commit my patch?
> However, it is still possible to have that path contain weird
> characters, so the example is still valid.
It's not only a question of "weird" characters. Use case of #8611:
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18444/pyerr_warnformat-2.patch
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Pytho
STINNER Victor added the comment:
Note about _Py_wchar2char(): it is possible to convert character by character
(instead of working on substrings) because the input string doesn't contain
surrogate pairs. _Py_char2wchar() ensures the the output string doens't contain
surrogate p
STINNER Victor added the comment:
Commited as r83981.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
STINNER Victor added the comment:
r83981 closes #9560: avoid the filename in _syscmd_file() to fix a bug with non
encodable filenames in platform.architecture().
--
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
New version of the patch _Py_wchar2char-2.patch:
- _Py_wchar2char() only escapes characters in range U+DC80..U+DCFF (instead of
U+DC00..U+DCFF)
- add a comment to _Py_char2wchar()
> I don't understand why you decrement `size` in the second pass.
B
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18431/_Py_wchar2char.patch
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Python-bug
STINNER Victor added the comment:
I just fear that the loop is "endless". Imagine the worst case: confstr()
returns a counter (n, n+1, n+2, ...). In 64 bits, it can be long.
I would prefer to see a condition to stop after 2 steps. It should maybe stop
when an error at th
STINNER Victor added the comment:
> I know this is not introduced by your patch, just moved, but couldn’t
> the typo in UNDECODEABLE be fixed? (extraneous e)
I wasn't sure that it was a typo, so I kept it unchanged. It's now
STINNER Victor added the comment:
Le vendredi 13 août 2010 20:36:22, vous avez écrit :
> The CS_PATH variable is a colon-separated list of directories ("the value
> for the PATH environment variable that finds all standard utilities"), so
> the file system encoding is cert
STINNER Victor added the comment:
r83989 creates _Py_wchar2char() function (_Py_wchar2char-2.patch).
--
___
Python tracker
<http://bugs.python.org/issue9
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18514/_Py_wchar2char-2.patch
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Python-bug
STINNER Victor added the comment:
Commited to 3.2 as r83990.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
STINNER Victor added the comment:
r83990 closes #9542 by creating the PyUnicode_FSDecoder() PyArg_ParseTuple
parser.
--
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
r83976 adds PyErr_WarnFormat() (pyerr_warnformat-2.patch).
--
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
New submission from STINNER Victor :
For my work #9425 (Rewrite import machinery to work with unicode paths), I need
a function to write unicode strings to sys.stderr (especially to write messages
on import in verbose mode). Attached patch creates PySys_FormatStdout() and
PySys_FormatStderr
STINNER Victor added the comment:
I created #9599: Add PySys_FormatStdout and PySys_FormatStderr functions.
--
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
Antoine fixed #9589 by rewriting site.py code in C and calling it more much
earlier: r83988.
This commit fixes the initial problem of this issue:
$ ./python -c 'import heapq; print(heapq.heapify)'
$ cat | ./python -c 'import heapq; prin
STINNER Victor added the comment:
r83988 does really fix this issue in python 3.2, 8 years later, yeah!
--
nosy: +haypo, pitrou
resolution: duplicate -> fixed
___
Python tracker
<http://bugs.python.org/issue
STINNER Victor added the comment:
r83988 is also the correct fix for #586680: I updated this issue.
--
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
Ooops, I didn't notice that Antoine did already updated this issue. Restore the
resolution as duplicate since the superseder field is set.
--
resolution: fixed -> duplicate
___
Python tracke
STINNER Victor added the comment:
Attached patch fixes this old and annoying issue. The issue only concerns
sys.std* files, because Python only set the encoding and errors attributes for
these files.
--
keywords: +patch
versions: +Python 2.7
Added file: http://bugs.python.org
STINNER Victor added the comment:
Oh, I forgot to write that my patch uses also the errors attribute. Update the
patch to add tests on errors: file_write-2.7-v2.patch.
--
Added file: http://bugs.python.org/file18522/file_write-2.7-v2.patch
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18521/file_write-2.7.patch
___
Python tracker
<http://bugs.python.org/issue4947>
___
___
Python-bug
New submission from STINNER Victor :
mmap, buffer, bytearray, string and unicode objects set the char buffer
callback (bf_getcharbuffer). The bytearray object sets also the release buffer
callback (bf_releasebuffer).
In Python 2.7, PyObject_AsCharBuffer() accepts bytearray objects, whereas
STINNER Victor added the comment:
> Your patch threatens to break compatibility
Yes it does. But I think that nobody relies on this bug. If your terminal uses
something that utf-8, you will see strange characters if you write something
else than ascii characters. I supopse that anyb
STINNER Victor added the comment:
3rd version of the patch: accept character buffer objects without reencoding
them. Add also tests on character buffer objects.
--
Added file: http://bugs.python.org/file18524/file_write-2.7-v3.patch
___
Python
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18522/file_write-2.7-v2.patch
___
Python tracker
<http://bugs.python.org/issue4947>
___
___
Python-bug
STINNER Victor added the comment:
r84012 creates _Py_stat(). It is a little bit different than the attached patch
(_Py_stat.patch): it doesn't clear Python exception on unicode conversion error.
--
___
Python tracker
<http://bugs.py
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18448/_Py_stat.patch
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Python-bugs-list m
STINNER Victor added the comment:
r84012 patchs zipimporter_init() to use the new PyUnicode_FSDecoder() and use
Py_UNICODE* (unicode) strings instead of char* (byte) strings.
--
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
r84030 creates _Py_fopen() for PyUnicodeObject path.
--
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Python-bug
STINNER Victor added the comment:
zipimport_read_directory.patch: patch for read_directory() function of the
zipimport module to support unencodable filenames. This patch requires #9599
(PySys_FormatStderr). The patch changes the encoding of the name: decode name
byte string using the file
STINNER Victor added the comment:
Commited to 3.1 as r84061 and to 3.2 as r84060. Thanks David.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
STINNER Victor added the comment:
Commited to 3.2 as r84062. Thanks David.
(Python 3.1 has no posix.initgroups() function)
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
STINNER Victor added the comment:
Commited to 3.1 as r84064 and to 3.2 as r84063. Thanks David.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
STINNER Victor added the comment:
I tried to fix Mac OS X (TESTFN_UNENCODABLE) with r84035, but I don't have
access to Mac OS X to test and my patch was not correct. It should now be ok
with r84080.
--
___
Python tracker
<http://bugs.py
STINNER Victor added the comment:
> Note that the buffer interface release API is meant to protect
> against such modifications, so I don't see why rejecting objects
> that do implement this API should be rejected.
As I explained, the release API is *not* used by PyObject_AsC
STINNER Victor added the comment:
Commited as r84094 to 3.2.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
STINNER Victor added the comment:
zipimport_read_directory.patch commited as r84095.
--
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Python-bug
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18527/zipimport_read_directory.patch
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
STINNER Victor added the comment:
Py_UNICODE_strncmp.patch: create Py_UNICODE_strncmp() function.
--
Added file: http://bugs.python.org/file18547/Py_UNICODE_strncmp.patch
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
> Using www.google.com for IPv6 lookups is a bad idea (...)
There is also ipv6.google.com
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/iss
STINNER Victor added the comment:
Py_UNICODE_strncmp.patch was wrong for n=0. New version based on
libiberty/strncmp.c source code.
--
Added file: http://bugs.python.org/file18548/Py_UNICODE_strncmp-2.patch
___
Python tracker
<h
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18547/Py_UNICODE_strncmp.patch
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Pytho
STINNER Victor added the comment:
Py_UNICODE_strncmp-2.patch commited as r84111.
--
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Python-bug
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18548/Py_UNICODE_strncmp-2.patch
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Pytho
STINNER Victor added the comment:
r84120: get_data() function of zipimport uses an unicode path.
--
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
STINNER Victor added the comment:
r84121: repr() method zipimporter object uses unicode.
--
___
Python tracker
<http://bugs.python.org/issue9425>
___
___
Pytho
STINNER Victor added the comment:
r84122 saves/restores the exception around "filename =
_PyUnicode_AsString(co->co_filename);" because it raises an unicode error on
unencodable filename.
--
___
Python tracker
<http://bugs.pyth
STINNER Victor added the comment:
While working on #9425, I usually hit two annoying issues:
- _PyObject_Dump() crashs (assertion error) if I call it (with gdb) in
Py_InitializeEx()
- because of python-gdb.py, gdb does segfault (I don't know yet where it does
come from)
So I'm b
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file16439/gil_state_init-trunk.patch
___
Python tracker
<http://bugs.python.org/issue8063>
___
___
Pytho
Changes by STINNER Victor :
--
resolution: fixed ->
status: closed -> open
___
Python tracker
<http://bugs.python.org/issue8063>
___
___
Python-bugs-list
STINNER Victor added the comment:
Commited as r84163 to 3.2. Don't backport because it is not really a bug and I
prefer to avoid touching stable branches with such minor details.
--
resolution: -> fixed
status: open -> closed
___
Pyt
New submission from STINNER Victor :
Python 3 has a very important variable: the filesystem encoding,
sys.getfilesystemencoding(). It is used to encode and decode filenames to
access to the filesystem, to encode program arguments in subprocess, etc.
The encoding is hardcoded to "mbc
STINNER Victor added the comment:
r84168 creates PyModule_GetFilenameObject().
I created a separated issue for the patch reencoding all filenames when setting
the filesystem encoding: #9630.
--
___
Python tracker
<http://bugs.python.org/issue9
STINNER Victor added the comment:
While working on #8622, I realized that it's not enough: sys.path and
sys.executable (and sys.meta_path) should also be reencoded. New patch does
that.
--
Added file: http://bugs.python.org/file18561/reencode_modules_path-2.
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18560/reencode_modules_path.patch
___
Python tracker
<http://bugs.python.org/issue9630>
___
___
Pytho
STINNER Victor added the comment:
Here you have a patch. It adds tests in test_sys.
The tests are skipped on a non-ascii Python executable path because of #8611
(see #9425).
--
keywords: +patch
nosy: +pitrou
Added file: http://bugs.python.org/file18562/pythonfsencoding.patch
Changes by STINNER Victor :
--
title: Reencode filenames of all module and code objects when setting the
filesystem encoding -> Reencode filenames when setting the filesystem encoding
___
Python tracker
<http://bugs.python.org/iss
STINNER Victor added the comment:
> The command line -h explanation is missing from the patch.
done
> The documentation should mention that the env var is only
> read once; subsequent changes to the env var are not seen
> by Python
I copied the PYTHONIOENCODING doc which doesn
New submission from STINNER Victor :
sys.setfilesystemencoding() function is dangerous because it introduces a lot
of inconsistencies: this function is unable to reencode all filenames in all
objects (eg. Python is unable to find filenames in user objects or 3rd party
libraries). Eg. if you
Changes by STINNER Victor :
--
keywords: +patch
nosy: +Arfrever, lemburg, pitrou
Added file:
http://bugs.python.org/file18565/remove_sys_setfilesystemencoding.patch
___
Python tracker
<http://bugs.python.org/issue9
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18562/pythonfsencoding.patch
___
Python tracker
<http://bugs.python.org/issue8622>
___
___
Python-bug
STINNER Victor added the comment:
> To remove sys.setfilesystemencoding(), ... I will open a new issue
done, issue #9632
--
___
Python tracker
<http://bugs.python.org/iss
2101 - 2200 of 35284 matches
Mail list logo