Amaury Forgeot d'Arc added the comment:
harobed, the -SKIP solution does not work. Doctest directives only apply to a
single line.
After a quick search, I found two workarounds there:
http://stackoverflow.com/questions/1809037/python-doctest-skip-entire-block
- Replace >>> with
Amaury Forgeot d'Arc added the comment:
Arithmetic with void* pointers is not allowed by the Microsoft compilers. char*
should be used instead.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Changes by Amaury Forgeot d'Arc :
--
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue5870>
___
___
Python-bugs-list mailing li
Amaury Forgeot d'Arc added the comment:
A simpler change would to replace:
rv = self.obj.__lt__(other.obj)
with
rv = type(self.obj).__lt__(self.obj, other.obj)
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
This also reproduces in 2.7.
2.6 and 2.7 have a different behaviour.
--
nosy: +amaury.forgeotdarc
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
It looks very similar to issue6501.
Can you check if setting the environment variable
PYTHONIOENCODING=cp1252
solves the problem?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
You already changed the test in r84449!
The doc still needs updating.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
Why wouldn't they? A standard way to extend the command line options seems
useful in all environments.
Now the interpretation of these options are subject to variations of course...
--
nosy: +amaury.f
Amaury Forgeot d'Arc added the comment:
_kill_with_event() does not wait for the subprocess to be ready.
It seems to me that the following test is wrong:
if m[0] == 0:
It should be "if m[0] == 1", since we want to check that the subprocess updated
the shared memory.
Amaury Forgeot d'Arc added the comment:
Well, the syntax allows to pass either a string value (because it's a substring
of the command line), or nothing.
When no value is passed, True seems better than None, because this allows the
usage of the get() method::
x = sys.xoptions.g
Amaury Forgeot d'Arc added the comment:
Please add a similar warning in PC/_subprocess.c::sp_handle_dealloc()
I just got caught by this in PyPy because some pipe handle relies on reference
counting to be closed.
This ad-hoc fix would suppress the warning:
http://codespeak.net/pipe
Amaury Forgeot d'Arc added the comment:
Please, add a tiny unit test for the presence of this feature.
This is the only way for vm implementers to follow CPython development.
--
nosy: +amaury.forgeotdarc
stage: -> unit test needed
status: closed
Changes by Amaury Forgeot d'Arc :
--
assignee: -> jnoller
nosy: +jnoller
title: conn_recv_string() broken error handling -> multiprocessing:
conn_recv_string() broken error handling
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
But this patch is a diff between a 2.7 and a 3.2 version of IDLE, isn't it?
The tkinter->Tkinter renaming is not supposed to happen in the 2.7 branch.
Could you instead show a diff between the present version of IDLE in 2.7 and
the result
Amaury Forgeot d'Arc added the comment:
The stack corresponds to the allocation of type(sys.float_info).__doc__.
Why would only this object appear as a memory leak? It is certainly not
deallocated, but all other types are in the same situation.
For example, sys.int_info is very similar
Amaury Forgeot d'Arc added the comment:
Does it happen when compiled in debug mode? There may be asserts that will give
a better (or earlier) error message.
Some thoughts: the '_PyTrash_delete_later' chain can only contain a limited set
of objects: lists, frames... (which c
Amaury Forgeot d'Arc added the comment:
About the patch: why should _PyUnicode_Init() try to call
_PyUnicode_InitGlobals() again?
--
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
The patch modifies _io.TextIOWrapper, but not _pyio.TextIOWrapper. Is there a
reason?
--
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
As promised, here is a quick review of the module.
https://code.launchpad.net/~proyvind/pyliblzma/py3k looks ready for a new entry
in the PyPI, but for inclusion in core python it needs some cleanup:
- I suppose that src/pyliblzma.c is the
New submission from Amaury Forgeot d'Arc :
The following snippet should raise ValueError (twice :-)
f = open('foo', 'rb')
print(f.read1(1)) # OK
f.close()
print(f.read1(5)) # expected ValueError("I/O operation on closed file")
print(f.peek()) # expected
Amaury Forgeot d'Arc added the comment:
The code in socketmodule.c currently compile with suspect warnings:
socketmodule.c(3108) : warning C4047: 'function' : 'LPSTR' differs in levels of
indirection from 'int'
socketmodule.c(3108) : warning C4024: '
Amaury Forgeot d'Arc added the comment:
It's still an issue with 2.7, and even with 3.2a2, see issue9611.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
Fortunately, the lower-level write() has no such bug, at least when used in
binary mode as FileIO does: it's almost a direct call to WriteFile().
This issue is more considered because it's not a bug in the Microsoft CRT, but
in the Python
Amaury Forgeot d'Arc added the comment:
This issue is not really relevant on Windows:
- signals are actually run in a new thread specially created.
- errno is a thread-local variable; its value is thus local to the signal
handler, same for WSAGetLastError().
--
Amaury Forgeot d'Arc added the comment:
> Nice. Then I suggest a config macro for whether this is needed.
> Either a test for windows, or an autoconf thing in case some Unixes
> are equally sensible. (Linux isn't, I checked.)
I'm quite sure that all Unixes invoke
Amaury Forgeot d'Arc added the comment:
On a second thought... is there another example where a *blocking* stream does
not write all the data without raising an exception?
--
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
> Why do you think this would be somehow an example for a blocking stream
> that does not write all data without raising an exception?
Well, that's what "clamping" means, isn't it?
--
__
Amaury Forgeot d'Arc added the comment:
Antoine, should codecs.open() be removed or simply aliased to open()?
--
nosy: +amaury.forgeotdarc, pitrou
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
It's not about the hash value, but about consistency: help(Decimal.__hash__)
says "x.__hash__() <==> hash(x)", but this is not true for x=Decimal(-1).
--
nosy: +amaury.forgeotdarc
___
Amaury Forgeot d'Arc added the comment:
With a socket file you cannot rely on autodetection of the format. I suggest to
try
tarfile.open(fileobj=file_, mode='r:')
or
tarfile.open(fileobj=file_, mode='r:gz')
--
Amaury Forgeot d'Arc added the comment:
I'm sure the traceback changed then?
mode='r:' uses a different code path.
--
___
Python tracker
<http://bug
Amaury Forgeot d'Arc added the comment:
Reproduced in a console window:
C:\>c:\python31\python.exe -m idlelib.idle
Exception in Tkinter callback
Traceback (most recent call last):
File "c:\python31\lib\tkinter\__init__.py", line 1399, in __call__
return self.fun
Amaury Forgeot d'Arc added the comment:
This was changed by issue2522 on purpose; no suffix is allowed in
locale.format().
--
nosy: +amaury.forgeotdarc, r.david.murray
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
This leaks one reference every time:
os.write(123456, b"b")
--
___
Python tracker
<http://bugs.pyt
Amaury Forgeot d'Arc added the comment:
This looks suspect (in function posix_write)::
if (!PyArg_ParseTuple(args, "iy*:write", &fd, &pbuf))
return NULL;
if (!_PyVerify_fd(fd))
return posix_error();
I'd prefer a "PyBuffer_Release(&p
Amaury Forgeot d'Arc added the comment:
- The patch modifies the _io module but not _pyio, why?
(try f=_pyio.open("XX","w+b") at the beginning of the script above)
- One test was *removed*, but nothing was added to test this new feature.
This is the most likely
Amaury Forgeot d'Arc added the comment:
IMO a better patch would be to use the %R format specification:
PyErr_Format(
PyExc_TypeError, "expected some sort of mod, but got %R", obj);
And no need to use PyObject_Repr and the temporary variable!
--
nosy: +ama
Amaury Forgeot d'Arc added the comment:
Agreed. There was a similar issue in python2.6 with list comprehensions.
The issue is that both threads run the code with the same globals dictionary,
and top-level code use the same dict for locals and globals.
This is already fixed in 2.7 an
Amaury Forgeot d'Arc added the comment:
I'm trying to read the patch. It contains many interesting things (and others I
have no opinon about), but it is very large, and makes it difficult to comment
or find why some change were made etc.
I do believe that better supporting t
Amaury Forgeot d'Arc added the comment:
> but the very very first thing that has to happen - before any of this
> work is begun - is for the distutils freeze to be lifted, or for
> someone to come up with a _sensible_ alternative solution.
Tarek's approach looks right to
Amaury Forgeot d'Arc added the comment:
The patch looks good at first glance, but is there a way to test the feature?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
> this is, after all, a new platform! it starts off with
> "sys.platform == 'mingw32'"
I disagree; programs compiled with mingw32 run on Windows, and use the MSVC
runtime. It's the same platform as the current wi
Amaury Forgeot d'Arc added the comment:
It is still time to add to 3.2 a DeprecationWarning when w9xpopen is used, and
remove the feature in 3.3.
See attached patch
--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file19608/deprecate-w9xpopen.
Amaury Forgeot d'Arc added the comment:
> But different build system make new plaform!
Maybe, but not a new "sys.platform".
VC6 and VS9.0 don't share any project file for the compilation; but they both
build a sys.platform=='win32'.
Distutils has to use anoth
Amaury Forgeot d'Arc added the comment:
Luke,
Please please! Don't make me say what I did not say. I just said "I disagree",
without any bad word. This may have been a bit terse, but I don't consider the
issue tracker as a place to express one's feelings; hey
Amaury Forgeot d'Arc added the comment:
How do you use it?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/issue10444>
___
___
Pytho
Amaury Forgeot d'Arc added the comment:
--with-wctype-functions was removed in 3.2 (see issue9210, r84752)
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
Can you provide a patch, or show how to do it concretely?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
This test is wrong::
if (!PyBool_Check(test_var) && test_var == Py_False)
the second part is never executed.
if (test_var != Py_False)
is enough to test the return value.
--
___
Python t
Amaury Forgeot d'Arc added the comment:
Does the patch for issue11321 fix this issue?
--
___
Python tracker
<http://bugs.python.org/issue9197>
___
___
Pytho
Amaury Forgeot d'Arc added the comment:
The patch looks good. It may also fix issue9197, which fails in a similar
fashion
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
> Being able to pickle unbound methods is important. In my project I have
> objects that refer to unbound methods. Now these objects are
> unpickleable. I can't save them to disk and I can't use the
> multiprocessing module on
Amaury Forgeot d'Arc added the comment:
did you see my example above? it passes methods defined in user code.
--
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
OK, let's go back to the "__namespace__" idea, then.
A long time ago I had the idea that the ast compiler could remember the list of
"named blocks" (classes, functions) with their line numbers;
for example, the statement &
Amaury Forgeot d'Arc added the comment:
Anatoly, do you find the suggestions in
http://effbot.org/zone/element.htm#accessing-parents useful to you? If so,
this paragraph could be copied into the documentation.
--
nosy: +amaury.forgeo
Amaury Forgeot d'Arc added the comment:
And the current behaviour is useful; for example, the absolute path of a file
name can be computed with os.path.join(os.getcwd(), filename).
This works with both absolute and relative paths.
os.path.join() won't change; you probably shoul
Amaury Forgeot d'Arc added the comment:
On Windows at least, these functions call malloc() and DuplicateHandle().
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
What are you trying to achieve? Do you have loops which contain no other
syscall than os.dup2()?
--
___
Python tracker
<http://bugs.python.org/is
Changes by Amaury Forgeot d'Arc :
--
nosy: +pitrou
priority: normal -> high
___
Python tracker
<http://bugs.python.org/issue11395>
___
___
Python-bugs-lis
Amaury Forgeot d'Arc added the comment:
Likewise, this fails with 3.2::
import os
os.write(1, b"a" * 66000)
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.pyt
Amaury Forgeot d'Arc added the comment:
no, it works with 3.2b2 (r32b2:87398), and fails with 3.2 final (r32:88445)
--
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
This changed with r87824
--
___
Python tracker
<http://bugs.python.org/issue11395>
___
___
Python-bugs-list m
Amaury Forgeot d'Arc added the comment:
Indeed, Python3.1 fails with the -u option.
Before r87824, the C call to write() performed CRLF conversion. In the
implementation of MSVCRT, a local buffer is used (1025 chars in vs8.0, 5*1024
in vs10.0), so WriteFile is called with small sizes.
Amaury Forgeot d'Arc added the comment:
I'm writing bytes here: os.write(1, b"b" * 66000)
And WriteConsole has the same issue.
--
___
Python tracker
<http://bug
Amaury Forgeot d'Arc added the comment:
It may be a windows bug, but it's also an a python regression!
A fix is to limit the number of chars:
===
--- D:/py3k/Modules/_io/fileio.c (revision 87824)
+++ D:/py3k/Modules/_i
Amaury Forgeot d'Arc added the comment:
This is a question for comp.lang.python ;-)
--
___
Python tracker
<http://bugs.python.org/issue11368>
___
___
Pytho
Amaury Forgeot d'Arc added the comment:
hmm, the code of urllib.request.getproxies_environment contains::
for name, value in os.environ.items():
name = name.lower()
if value and name[-6:] == '_proxy':
proxies[name[:-6]] = value
So the comparison
Amaury Forgeot d'Arc added the comment:
On Windows, isatty() is a cheap call: a simple lookup in the _ioinfo structure.
And dup2() can still change the destination of a file descriptor, so the new
attribute can be out of sync...
I suggest to call isatty() on every
Amaury Forgeot d'Arc added the comment:
This last patch looks good, except that the comments "if stdout mode is binary
(python -u)" are incorrect: since r87824, all files are opened in binary mode.
--
___
Python tracker
<http
Amaury Forgeot d'Arc added the comment:
> Luckily, extracting one of them just get only the more recent one
It's not only luck: a Zip file has a "central directory" used to retrieve data.
ZipFile just appends the new file data to the end of the Zip file, then write
Amaury Forgeot d'Arc added the comment:
Can you open a command prompt, and type:
c:\python32\python.exe -m idlelib.idle
If there are messages, please paste them here!
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
- Click the "Start" button
- On this menu, click the "Run..." item (almost at the bottom)
- In the small windows that opens, type "cmd" and click OK. This opens the
command prompt.
- In this window, type:
c:\pyth
Amaury Forgeot d'Arc added the comment:
You certainly have a TCL_LIBRARY environment variable set on your system,
it should be removed. For detailed instructions:
http://mail.python.org/pipermail/python-list/2010-April/1241061.html
--
___
P
Amaury Forgeot d'Arc added the comment:
Right. In most cases, "PyErr_SetObject(PyExc_SyntaxError, tuple);" will store
the untouched tuple in tstate->curexc_value, *except* when "Implicit exception
chaining" occurs, in which case the exception is normalized.
a
Amaury Forgeot d'Arc added the comment:
Why is the exception normalized at the end? I suppose it's because when value
is an exception instance, it's replaced by a tuple, but the original value has
to be recreated at the end. So in some cases, the SyntaxError object is create
Amaury Forgeot d'Arc added the comment:
> That's why I thought that calling PyErr_NormalizeException with the new
> tuple is the simplest thing to do, becuase I guess that'll take care of
> all fields automatically.
You could also call PyErr_NormalizeException at the b
Amaury Forgeot d'Arc added the comment:
hmm, you are right, of course. I forgot that e.args is part of the SyntaxError
members.
--
___
Python tracker
<http://bugs.python.org/is
Amaury Forgeot d'Arc added the comment:
Nice work! Is there a specific place for comments? Here are some of them
already:
- Modules/zipimport.c::make_filename: remove the limit buffer, the code could
look like:
pathsize = PyUnicode_GET_SIZE(prefix) + PyUnicode_GET_SIZE(name);
r
Amaury Forgeot d'Arc added the comment:
The utf16 incremental codec does not like incomplete surrogate pairs.
Patch attached.
I also plan to refactor all the test_partial() functions of test_codecs, to
give them a common implementation.
--
keywords: +patch
nosy: +amaury.forgeo
Amaury Forgeot d'Arc added the comment:
The bug was fixed in 2.7, and not backported to 2.6.
2.6 is now in security-fix-only mode, if possible you should upgrade to 2.7.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
I'd choose solution 3, but instead of calling SyntaxError.__init__, call
PyErr_NormalizeException().
--
___
Python tracker
<http://bugs.python.o
Changes by Amaury Forgeot d'Arc :
--
assignee: -> haypo
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11580>
___
___
Python-bugs-lis
Amaury Forgeot d'Arc added the comment:
Hmm, this kind of macros make it difficult to step line by line in a debugger.
From this point of view, an inlined function would be better, I'm not sure if
this can have a performance impact though.
--
nosy: +amaury.f
Changes by Amaury Forgeot d'Arc :
--
assignee: -> loewis
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue11626>
___
___
Python-bugs-lis
Amaury Forgeot d'Arc added the comment:
We are talking about different things here:
- When python is run from a console, sys.stdout is line buffered.
sys.stdout.write() flushes if there is a carriage return. No need to change
anything here.
- print() could call file.flush() if file.i
Amaury Forgeot d'Arc added the comment:
The attached patch calls "if file.isatty(): file.flush()" at the end of the
print function:
- only when an "end" argument was specified
- errors in file.isatty() are ignored (and then no flush occurs)
--
keywords
Amaury Forgeot d'Arc added the comment:
> Python 3.2, WinXP, IDLE edit window, F5 Run:
> 'Processing ...' appears immediately, 'Done' 3 sec later.
Terry, IDLE is completely different, its sys.stdout completely bypasses the new
io s
Amaury Forgeot d'Arc added the comment:
Do you have a test or a small script which shows the incorrect output?
--
nosy: +amaury.forgeotdarc
stage: -> test needed
___
Python tracker
<http://bugs.python.org
Amaury Forgeot d'Arc added the comment:
But for a debug build to be really useful, the source code must be available to
the debugger.
Compiling these source files is really a matter of minutes... provided that
external dependencies are all present and also compiled in debug
Amaury Forgeot d'Arc added the comment:
You should override the OPT variable as well. I tried:
$ CFLAGS="" OPT="-fwrapv -O3 -Wall" ./configure
Then "make" shows lines like:
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -fwrapv -O3 -Wall -I. -IInclud
Changes by Amaury Forgeot d'Arc :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue11667>
___
___
Python-bugs-list mailing li
Amaury Forgeot d'Arc added the comment:
_PyObject_LengthHint() does not define any exception; it simply calls
PyObject_Size(), which is expected to raise TypeError for objects with no size
(an opened file for example).
Where is the problem exacty? Does the failing __len__ put the obje
Amaury Forgeot d'Arc added the comment:
I replaced guppy by a debug build of Python and a simple "print
sys.gettotalrefcount()".
Indeed, I see a reference leak with Python2.6 (10 more references on every
loop). There seems to be no leak with Python2.7.
Which version of Py
Amaury Forgeot d'Arc added the comment:
Did you see a compiler warning? Indeed, this function (mmap.move) decodes its
arguments with:
PyArg_ParseTuple(args, "kkk:move", &dest, &src, &cnt)
This looks wrong to me: these three numbers should be Py_ssize_t, and decod
Changes by Amaury Forgeot d'Arc :
--
keywords: +easy
___
Python tracker
<http://bugs.python.org/issue11697>
___
___
Python-bugs-list mailing list
Unsubsc
Amaury Forgeot d'Arc added the comment:
mbf.close() should not fail when called twice. The close() method in the io
module states that "This method has no effect if the file is already closed."
But then, is "close=False" necessary?
--
nosy: +amaury.forgeotdar
Amaury Forgeot d'Arc added the comment:
A call to PyType_Ready() fixes the issue, see attached patch.
I added a test that opens a random file in c:\windows\installer, I don't know
if this is correct for all Windows version.
--
keywords: +patch
nosy: +amaury.forgeot
Amaury Forgeot d'Arc added the comment:
The code fails precisely when checking that sys.stdin is a valid terminal. See
the attached patch for a fix.
Out of curiosity, why did you set sys.stdin to None?
--
keywords: +patch
nosy: +amaury.forgeotdarc
stage: -> patch review
Ad
Amaury Forgeot d'Arc added the comment:
Should Python.h systematically avoid defining symbols without a Py prefix?
See attached patch, which defines Py_ssize_t in pyconfig.h.
The same can be said for other symbols defined there: pid_t, copysign, hypot.
--
keywords: +patch
Amaury Forgeot d'Arc added the comment:
What are the values of SIZEOF_SIZE_T and SIZEOF_INT with this compiler?
I'd expect them to be respectively 8 and 4.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.o
401 - 500 of 2691 matches
Mail list logo