Amaury Forgeot d'Arc added the comment:
Which module did you change, and which precise version of python are you using?
I wonder if this was fixed with issue2632.
--
___
Python tracker
<http://bugs.python.org/issu
Amaury Forgeot d'Arc added the comment:
The patch is good, except for two things:
when PyObject_Repr() fails, the word 'item' is put instead. This is a good
idea, but PyErr_Clear() should be called as soon as possible, before calling
another API function.
Also, the error m
Amaury Forgeot d'Arc added the comment:
This URL does not seem to return a 302 code. Is there another example?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
A small but useful addition, patch looks OK to me
--
nosy: +amaury.forgeotdarc
resolution: -> accepted
versions: +Python 3.2 -Python 2.6, Python 2.7
___
Python tracker
<http://bugs.python.or
Amaury Forgeot d'Arc added the comment:
I fail to see *why* the patch fixes the issue. You still have to allocate the
big string when joining the parts.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/issu
Amaury Forgeot d'Arc added the comment:
issue8524 fixed a similar issue (the timeout of the initial socket was not
passed to the ssl socket).
Can someone test again with a recent py3k build?
--
nosy: +amaury.forgeotdarc
resolution: -> out of date
superseder: -> SSL soc
Amaury Forgeot d'Arc added the comment:
The patch looks correct, it's now a matter of unit tests.
for example, I'd test the case where the length is around 1000..
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
The idea is fine (dict.get also has a 'default' parameter) but this patch is
very incomplete:
- the enhancement should be applied to the three Parsers
- it needs unit tests.
--
nosy: +ama
Amaury Forgeot d'Arc added the comment:
gzip.open() only implements the "rb" mode, and returns bytes.
fileinput could certainly wrap it with a io.TextIOWrapper.
Then the encoding issue arises.
fileinput.FileInput should grow an "encoding" parameter instead of alway
Amaury Forgeot d'Arc added the comment:
The patch actually does 2 things:
- it prevents the usage of '=' in putenv, which is is good because the putenv()
system call handles this badly.
- it will raise an error when unsetting a nonexistent variable. This is a
change in behavio
Amaury Forgeot d'Arc added the comment:
>> I'm not sure where you'd put this. The defining characteristic of threads is
>> that _all_ objects are shared among them.
> Where is this defining characteristic of threads is described?
in http://docs.python.org/libr
Amaury Forgeot d'Arc added the comment:
It's actually the same issue as issue1635741
--
nosy: +amaury.forgeotdarc
resolution: -> duplicate
status: open -> closed
superseder: -> Interpreter seems to leak references after finalization
___
Amaury Forgeot d'Arc added the comment:
Yes, some objects are not cleaned in finalization.
This is not a problem in usual cases though, when the interpreter is
started only once.
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
The function returns different kind of data depending on the value of the last
parameter. I don't like it at all.
Why is decompressobj not enough?
--
nosy: +amaury.forgeotdarc
___
Python trac
Amaury Forgeot d'Arc added the comment:
for any *iterable*!
--
___
Python tracker
<http://bugs.python.org/issue9314>
___
___
Python-bugs-list mailing list
Amaury Forgeot d'Arc added the comment:
This actually works for any iterator:
>>> l = []
>>> l += 'abc'
>>> l
['a', 'b', 'c']
--
nosy: +amaury.forgeotdarc
_
Amaury Forgeot d'Arc added the comment:
python2.7 includes a newer version of sqlite. Does the problem still reproduces
there?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
A unit test (or even a sample script) showing the desired feature is needed.
--
nosy: +amaury.forgeotdarc
stage: -> unit test needed
___
Python tracker
<http://bugs.python.or
Amaury Forgeot d'Arc added the comment:
multiple inheritance should not be a problem: there can be only one "dominant
base", which is 'int' in this case.
someone with a debugger should step into this call to PyType_Ready() and see
why it does not set the flag
Amaury Forgeot d'Arc added the comment:
Py_TPFLAGS_INT_SUBCLASS is an implementation detail, and extension modules
should not have to be aware of it.
Does Numpy correctly call PyType_Ready()?
--
nosy: +amaury.forgeotdarc
status: pending -&
Amaury Forgeot d'Arc added the comment:
It seems that this has been fixed in the py3k branch (r78942). Now both bytes
and unicode are accepted. Can someone check?
--
nosy: +amaury.forgeotdarc
stage: -> needs patch
___
Python tracke
Amaury Forgeot d'Arc added the comment:
Most usages of sprintf here cannot cause buffer overruns: the output is bounded
in size (%d, %8.8x, %.200s), and the buffer is large enough.
Moreover, some of them were already replaced by functions of the _FromFormat()
family, which can handle un
Amaury Forgeot d'Arc added the comment:
Then please tell us how to reproduce the "SyntaxError" case
--
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
The file name is only 106 characters long, it's not too long.
"[Errno 27] File too large" probably refers to a big file larger than 2Gb.
Does your OS support large files?
--
nosy:
Amaury Forgeot d'Arc added the comment:
It's just a data file missing from the .msi installer.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
Your file contains the byte \x1a == EOF.
You should not open it in text mode, but in binary mode, otherwise it's
truncated.
import xml.sax
xml.sax.parse(open("ff1a.xml", 'rb'), xml.sax.ContentHandler())
works on all vers
Amaury Forgeot d'Arc added the comment:
The OP compiled python with --with-wctype-functions, and the libc wctype
functions work differently depending on the locale.
I suggest closing this issue as "won't fix", and favor the removal of the
"--with-wctype-functions"
Amaury Forgeot d'Arc added the comment:
> Just fine!
> It's either another bug in python or 3.1.1 specifics.
What do you mean? what is 'it'? The error I in the session above shows the bug
we described first (strange letters in the path makes the program unusable),
Amaury Forgeot d'Arc added the comment:
But what are the benefits of this change?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
This is still the case: the documentation should mention that
PyEval_ReleaseLock() is not the correct function to release "the GIL", both the
interpreter lock *and* the current thread state have to be released.
--
assignee:
Amaury Forgeot d'Arc added the comment:
This is actually the same issue as issue1720250
--
resolution: -> duplicate
status: open -> closed
superseder: -> PyGILState_Ensure does not acquires GIL
___
Python tracker
<http:
Amaury Forgeot d'Arc added the comment:
In this 6th patch, the wctype part was changed as suggested.
there is one more condition, Py_UNICODE_WIDE:
-#if defined(HAVE_USABLE_WCHAR_T) && defined(WANT_WCTYPE_FUNCTIONS)
+#if defined(WANT_WCTYPE_FUNCTIONS) && defined(HAVE_USABLE
Amaury Forgeot d'Arc added the comment:
I fail to see the issue. runsource() takes a (unicode) string because a Python
script is a text; you cannot pass a bytes object, it must be decoded before.
--
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
A "proof of concept" patch, which shows the macros used to walk a unicode
string and uses them in unicode_repr() (should not change behaviour) and in
unicode_isprintable() (should fix the issue).
Other functions should be changed t
Amaury Forgeot d'Arc added the comment:
The issue is that when close() calls flush(), errors are silently discarded.
I'm sure a similar issue was already filed, but could not find it.
--
nosy: +pitrou
___
Python tracker
<http://bu
Amaury Forgeot d'Arc added the comment:
This issue looks invalid to me: PyEval_ReleaseLock manipulates the interpreter
lock, but not the thread state.
Both have to be released/reset before another thread can install its own thread
state and run.
In other words, PyEval_SaveThread() shou
Amaury Forgeot d'Arc added the comment:
Yes, py3k r82745 still shows the problem
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
Hm, the patch could be more "pythonic". Something like:
symlink_exception = (AttributeError,)
try:
symlink_exception += (NotImplementedError, WindowsError)
except NameError:
pass
try:
...
except sy
Amaury Forgeot d'Arc added the comment:
Also, GetFinalPathNameByHandle() is called 5 times with VOLUME_NAME_DOS, and
once with VOLUME_NAME_NT. This one looks suspect to me.
[I noticed this because these symbols are not defined with the SDK shipped with
VS8.0. I'll propose another
Amaury Forgeot d'Arc added the comment:
Patch attached.
--
keywords: +patch
Added file: http://bugs.python.org/file17919/kill-wctype.patch
___
Python tracker
<http://bugs.python.org/i
New submission from Amaury Forgeot d'Arc :
Quoting Marc-Andre Lemburg:
"""
The support for the wctype functions should have been remove long ago,
since they cause subtle incompatibilities between Python builds. I should
have probably never added it in the first place... peopl
Amaury Forgeot d'Arc added the comment:
str.isprintable() &co are not changed by this patch, because they enumerate
Py_UNICODE units and do not join surrogates. See issue9200
--
___
Python tracker
<http://bugs.python.o
Amaury Forgeot d'Arc added the comment:
> Could you explain what this bit is about ?
> -#if defined(HAVE_USABLE_WCHAR_T) && defined(WANT_WCTYPE_FUNCTIONS)
> +#if defined(Py_UNICODE_WIDE) && defined(WANT_WCTYPE_FUNCTIONS)
On Windows at least, HAVE_USABLE_WC
Amaury Forgeot d'Arc added the comment:
A new patch that doesn't remove an important check, avoids a crash when the C
macro is called with a huge number. thanks Ezio.
--
Added file: http://bugs.python.org/file17911/unicodectype_uc
Amaury Forgeot d'Arc added the comment:
A new patch, generated on top of r82662
--
Added file: http://bugs.python.org/file17909/unicodectype_ucs4_4.patch
___
Python tracker
<http://bugs.python.org/i
New submission from Amaury Forgeot d'Arc :
On narrow unicode builds:
unicodedata.category(chr(0x1)) == 'Lo' # correct
Py_UNICODE_ISPRINTABLE(0x1)== 1 # correct
str.isprintable(chr(0x1)) == False # inconsistent
On narrow unicode builds, large code po
Amaury Forgeot d'Arc added the comment:
We definitely need unit tests about embedded python interpreter, I think there
are none.
--
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
I reproduce the problem on Linux (./configure --enable-shared), after I
modified the source code a bit to directly use Python.h and to link with
libpython3.2.so (no call to dlopen). In gdb the stack trace has exactly the
same symbols as the att
Amaury Forgeot d'Arc added the comment:
The chapter "Rationale" in PEP3138 explains why sys.stdout uses "strict"
encoding, when sys.stderr uses "backslashreplace".
It would be possible to use "backslashreplace" for stdout as well for
interac
Amaury Forgeot d'Arc added the comment:
Yes, repr() should not depend on the user's terminal.
--
___
Python tracker
<http://bugs.python.org/issue9198>
___
__
Amaury Forgeot d'Arc added the comment:
> A more accurate approach would be to actually try to encode the string
> and escape only the chars that can't be encoded
This is already the case with sys.stderr, it uses the "backslashreplace" error
handler. Do you sugge
Amaury Forgeot d'Arc added the comment:
> consider replacing the tab characters before the comments with spaces
It's actually already the case in my working copy.
--
___
Python tracker
<http://bugs.pyth
Amaury Forgeot d'Arc added the comment:
I suggest to go ahead and apply this patch, at least it correctly selects
"printable" characters, whatever this means.
I filed issue9198 to decide whether chr(0x1) should be printable.
--
___
New submission from Amaury Forgeot d'Arc :
On wide unicode builds, '\U0001'.isprintable() returns True, and repr()
returns the character unmodified.
Is it a good behavior, given that very few fonts have can display this
character?
Marc-Andre Lemburg wrote:
> The "p
Amaury Forgeot d'Arc added the comment:
Now I wonder whether it's reasonable to consider this character
U+1 (LINEAR B SYLLABLE B008 A)
as printable with repr(). Yes, its category is "Lo", but is there a font w
Changes by Amaury Forgeot d'Arc :
--
assignee: -> amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/issue5127>
___
___
Python-bugs-lis
Amaury Forgeot d'Arc added the comment:
zipfile only supports the "Traditional PKWARE Encryption" method.
Support for other encryption methods would be useful.
--
nosy: +amaury.forgeotdarc
stage: -> needs patch
title: zipfile.extractall raises runtime error o
Amaury Forgeot d'Arc added the comment:
on Windows, exec() does not really replace the current process. It creates a
new process (with a new pid), and exits the current one.
Hence the calling program only sees that the script has terminated.
I don't see any easy solution on Windo
Amaury Forgeot d'Arc added the comment:
Here is what I did, on a machine running Windows XP, with python 3.1.1:
- I used 7-zip to extract the attached zip file, in the c:\temp directory.
- Then I opened a command prompt, here is an exact copy of the session:
C:>cd \temp\█
C:\temp\█
Amaury Forgeot d'Arc added the comment:
> assert daysecondswhole == int(daysecondswhole) # can't overflow
> Since int is long in 3.x, this assert does not check anything
Even with 2.5 int(x) cannot overflow, and returns a long when needed!
This assert probably checks that t
Amaury Forgeot d'Arc added the comment:
And what about this?
>>> x.update(self=5)
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.pyt
Amaury Forgeot d'Arc added the comment:
in PC/_subprocess.c, it should be enough to use
PyErr_SetFromWindowsErrWithFilename() instead of PyErr_SetFromWindowsErr()
--
keywords: +easy
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
The issue tracker is not here to get help.
Please ask your question on the comp.lang.python newgroup, or the python-list
mailing list.
There, I think you will have to show part of your code; there will certainly be
several people willing to hel
Amaury Forgeot d'Arc added the comment:
I don't think MSYS (or mingw32) is supported at all.
I'm even surprised that the build went so far.
--
assignee: -> loewis
nosy: +amaury.forgeotdarc, loewis
___
Python tracker
<h
Amaury Forgeot d'Arc added the comment:
> But the case has begun from cyrillic letters in the NTFS path,
> which I do not use, but the users of my soft do.
> So putting the program into such directory makes the former unuseable;
> until the sources are in utf anyway.
I ag
Amaury Forgeot d'Arc added the comment:
> File "F:\1home\С\u201e\a.py", line 1, in
> And what the hell is this u201e? That should have been a letter!
It's probably this symbol: http://www.eki.ee/letter/chardata.cgi?ucode=201e
but it has no representation in the con
Amaury Forgeot d'Arc added the comment:
Why is this issue still open?
--
___
Python tracker
<http://bugs.python.org/issue4804>
___
___
Python-bugs-list m
Amaury Forgeot d'Arc added the comment:
Two remarks:
- when int(arg) fails, an error message should be printed, like with the
function do_commmands().
- the "for" loop seems unnecessary, something like "self.curindex -= nu
Amaury Forgeot d'Arc added the comment:
This is a good idea, but tab characters are disallowed in core python code;
please replace them with spaces.
Then, please provide an "unified" diff patch (with "diff -u"), and name it with
the ".patch" extensio
Amaury Forgeot d'Arc added the comment:
as stated in
http://www.python.org/download/releases/3.1.2/
python 3 is designed to be backwards incompatible.
I suggest you to follow the link "Conversion tool for Python 2.x code".
--
nosy: +amaury.forgeotdarc
resolution: -&
Amaury Forgeot d'Arc added the comment:
To test windows callbacks, I suggest to use EnumResourceTypes() instead, which
is more likely to work in any condition:
def test():
from ctypes.wintypes import BOOL, HMODULE, LONG, LPARAM
import ctypes
EnumResource
Amaury Forgeot d'Arc added the comment:
> now tell me how the hell can file system encoding be related
> to file content encoding?!
Why do you say so? I can reproduce your issue, but changing the first line of
a.py:
# coding: cp1252
to:
# coding: utf-8
did not change anythi
Amaury Forgeot d'Arc added the comment:
If both implementations can exist in the same interpreter, how will they
cooperate?
For example, Time instances created with datetime.py won't pass PyTime_Check().
--
___
Python trac
Amaury Forgeot d'Arc added the comment:
>> One, we should not blindly pull in the PyPy code
>> without some core PyPy developer being in on this
You can count me among the PyPy developers.
> I concur. Much of PyPy code is written for a restricted subset of
>
Amaury Forgeot d'Arc added the comment:
In issue3343, we chose to mark this function as private.
--
___
Python tracker
<http://bugs.python.org/issue6543>
___
___
Amaury Forgeot d'Arc added the comment:
PyPy also calls the platform's strftime().
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
Even from pypy perspective, a pure python implementation is not ideal because
it makes it difficult to implement the C API.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
to reproduce: on Vista, start
\\%COMPUTERNAME%\c$\python26\python.exe -c "import Tkinter; print Tkinter"
In this case, the path returned by GetFinalPathNameByHandle starts with
\\?\UNC\.
--
___
Amaury Forgeot d'Arc added the comment:
Reproduced on WinXP.
execfile() does not work because it calls the system function stat();
this function does accept UNC paths (like \\machine\share\file), but not paths
which contain a wildcard character ('?' or '*')
I sugg
Amaury Forgeot d'Arc added the comment:
When running IDLE in a console, I get the error:
Exception in Tkinter callback
Traceback (most recent call last):
File "c:\prod\python\lib\lib-tk\Tkinter.py", line 1410, in __call__
return self.func(*args)
File "c:\pro
Amaury Forgeot d'Arc added the comment:
I don't like the "import errno" while printing an exception...
It would be much more robust to store errorcode_dict in a static variable when
python starts, and reuse it directly.
--
nosy:
Amaury Forgeot d'Arc added the comment:
This "--" trick is implemented by the getopt module.
OTOH on my system, 'grep' also recognizes this, and I could not find any
documentation about it, neither with "grep --help" nor "man grep
Amaury Forgeot d'Arc added the comment:
I will happily review any implementation, and I can help with inclusion into
python trunk.
> ...the LGPL liblzma...
Can you check which licences cover the different parts of the module? I think
that you will have to contribute your code u
Amaury Forgeot d'Arc added the comment:
The 3.1 version does it correctly since issue7785, but this was not backported
to 2.x.
Python 3.x uses the "y*" format code to accept bytes and not unicode; this code
does not exist in 2.x, and was replaced with "s*", which a
Amaury Forgeot d'Arc added the comment:
Yes, the warnings module tries to display the file name. Inside
PyRun_SimpleString(), globals()['__name__'] == '__main__', and the warnings
module supposes that argv[1] is the name of the script.
I wonder whether __file__ woul
Amaury Forgeot d'Arc added the comment:
Closing as Invalid. PYTHONHOME should not be set when building Python.
--
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python
Amaury Forgeot d'Arc added the comment:
Do you have set the PYTHONHOME environment variable? this does not work from a
build directory.
--
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
no, the input is not the same, there is "ImportError: No module named site". I
have tree more questions:
- Do you have a file named: /sw_install/python-2.6.5/Lib/site.py
- what it the output when you type "import sys; print sys.pat
Amaury Forgeot d'Arc added the comment:
What if os.system(), os.execvp() and friends used "wcstombs" (or
locale.preferredencoding) to convert arguments from unicode to bytes? this
would at least guarantee round-trip when spawning another python interpreter.
An interesting tes
Amaury Forgeot d'Arc added the comment:
There is a message::
'import site' failed; use -v for traceback
what do you get when you run "./python -v"?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http
Amaury Forgeot d'Arc added the comment:
> sys.argv is decoded with the file system encoding
IIRC this is not exact. Py_Main signature is
Py_Main(int argc, wchar_t **argv)
then PyUnicode_FromWideChar is used, and there is no conversion (except from
UCS4 to UCS2).
The wchar_t
Amaury Forgeot d'Arc added the comment:
The second patch looks good to me.
--
resolution: -> accepted
stage: patch review -> commit review
___
Python tracker
<http://bugs.python
Amaury Forgeot d'Arc added the comment:
I agree with the fix.
However the patch should test for "sys.platform == 'win32'" before importing
msvcrt.
And there is an extra space on another line.
--
nosy: +amaury.forgeotdar
Amaury Forgeot d'Arc added the comment:
This function is here to add entropy to the random numbers generator.
the kind of data is not important, and no matter which encoding is used, this
will not change the quality of the entropy.
--
nosy: +amaury.forgeo
Amaury Forgeot d'Arc added the comment:
since the prompt is written to stderr, why is sys.stdout.encoding used instead
of sys.stderr.encoding?
--
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
what is this "raise_on_bad" additional argument?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
The patch is wrong: _PyUnicode_AsString(Py_None) should not return "utf8"!
I suggest that since PyOS_Readline() write the prompt to stderr, the conversion
uses the encoding of stderr.
--
nosy: +ama
up, or the o
python-l...@python.org mailing list.
[maybe a hint for your issue: ensure that the current thread owns the
GIL before calling a function of the Python C API]
--
Amaury Forgeot d'Arc
___
Python-bugs-list mailing list
Unsubscribe:
http:
Amaury Forgeot d'Arc added the comment:
Very recently, issue8533 changed regrtest.py to use 'backslashreplace' when
printing errors. This issue seems very similar
--
nosy: +amaury.forgeotdarc, haypo
___
Python tracker
<http
Amaury Forgeot d'Arc added the comment:
"mbcs" is not a fixed encoding and may change between Windows sessions, see the
Rationale in PEP277 http://www.python.org/dev/peps/pep-0277/
The mixed case is interesting. We could use CreateProcessW when at least one
string
1001 - 1100 of 2691 matches
Mail list logo