Mark Dickinson added the comment:
Sorry; this is just the way that (binary) floating-point works. See
http://docs.python.org/2/tutorial/floatingpoint.html for more (or Google
'binary floating point' for a host of references).
If you're doing financial calculations, you may want to look into
chili added the comment:
Thx for help.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19807
___
___
Python-bugs-list mailing list
Unsubscribe:
Vajrasky Kok added the comment:
I come out with two patches.
The first patch using bytes generator to copy the message before mutating it in
string generator, then restore it after printing the mutated message.
--
keywords: +patch
Added file:
Vajrasky Kok added the comment:
The second patch copies the private variables of the message before mutating it
in string generator, then restore the private variables after printing the
mutated message.
--
Added file:
New submission from Peter Otten:
For example when you type
input(What shall I do? )
Run for your life!
in its shell window IDLE shows the 'for' as if it were a keyword. The same
happens if you run a script that requires user interaction.
--
components: IDLE
messages: 204566
nosy:
Changes by Peter Otten __pete...@web.de:
--
title: IDLE applys syntax highlighting to user input in its shell - IDLE
applies syntax highlighting to user input in its shell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19808
Vajrasky Kok added the comment:
I got another inspiration.
The third patch uses copy.copy to copy the Message before mutating it in string
generator, then restore it after printing the mutated message.
--
Added file:
Changes by Martin Dengler mar...@martindengler.com:
--
nosy: +mdengler
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2226
___
___
Python-bugs-list
Changes by Martin Dengler mar...@martindengler.com:
--
nosy: +mdengler
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8743
___
___
Python-bugs-list
New submission from Owen Lin:
If we call two subprocess.Popen simultaneously, the second one is blocked until
the first one is finished.
The attached file is a code snippet to reproduce this bug. I can reproduce the
bug in version 2.7.3 and 2.7.6 very easily (in few seconds with the code).
New submission from madan ram:
I found that it will be useful to show the list of function arguments using
inspect module. When the function executed by the user in interpreter as
TypeError.
ex: -
def foo(a,b=4,c=hello):
... print a,b,c
foo()
Traceback (most recent call last):
File
Changes by madan ram madan_...@rocketmail.com:
--
title: adding an feature to python interpreter - Adding a feature to python
interpreter
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19810
STINNER Victor added the comment:
The creation of slave_popen is not protected by a lock, and so dummy_thread()
may spawn a new process (master) at the same time than the main process
(slave). If it occurs at the same time, the master may inherit a pipe of the
slave process used internally by
Changes by Georg Brandl ge...@python.org:
--
nosy: -georg.brandl
versions: -Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19810
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
assignee: - docs@python
components: +Documentation
nosy: +docs@python
title: Python get stuck in second Popen call - Doc: subprocess should warn
uses on race conditions when multiple threads spawn child processes
New submission from STINNER Victor:
test_pathlib should use test.support.rmtree() instead of shutil.rmtree(). The
function in support tries harder on Windows.
test_pathlib may also create an unique temporary directory at each test run
instead of using a global variable BASE: see below, tests
Stefan Krah added the comment:
Memoryview currently only knows the types from the struct module.
--
nosy: +skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19803
___
New submission from anatoly techtonik:
It would be nice if reload() supported reloading of symbols imported with from
module import ... syntax. It is quite useful for development sessions, when
you patch and test your function on some set of unexpected input.
from astdump import dumpattrs as
STINNER Victor added the comment:
You can retrieve the module using sys.modules[symbol.__module__].
Example:
from os import environ as ENV
import imp, sys
imp.reload(sys.modules[ENV.__module__])
module 'os' from '/usr/lib64/python2.7/os.pyc'
_.environ is ENV
False
But if you import
New submission from STINNER Victor:
Since Linux 2.6.28, socket() syscall accepts a new SOCK_NONBLOCK flag in the
socket type. It avoids 1 or 2 extra syscalls to set the socket in non-blocking
mode. This flag comes also slowly in other operating systems: NetBSD, FreeBSD,
etc.
FreeBSD:
STINNER Victor added the comment:
Note: Python supports socket.SOCK_NONBLOCK since Python 3.2 (issue #7523).
--
nosy: +neologix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19813
___
Illirgway added the comment:
base64, quoted-printable and 7bit messages only use ASCII range of
characters so raw_message.decode('ascii') == raw_message.decode('latin1') ==
etc. == raw_message.decode('utf-8') due to internal representation of utf-8
characters
P.S. Python 3.4.0 beta 1
R. David Murray added the comment:
It occurs to me to wonder why smtpd is receiving 8bit data at all. It isn't
advertising the 8BITMIME capability, so the client should be sending only 7bit
data. See also issue 19662. I'm not sure that making utf-8 decoding work
better is a good idea, but
Antoine Pitrou added the comment:
This really sounds pointless to me. How many sockets do you create per second?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19813
___
Petri Lehtinen added the comment:
Is there a reason why this patch changes the decoding error handler to 'ignore'
(from the default 'strict')?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19806
Changes by Antoine Pitrou pit...@free.fr:
--
resolution: - duplicate
status: open - closed
superseder: - support.rmtree fails on symlinks under Windows
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19811
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19802
___
___
Python-bugs-list mailing
Eli Bendersky added the comment:
Attaching a new patch. Hopefully the image will be viewable in the code review
tool
--
Added file: http://bugs.python.org/file32869/issue19799.2.patch
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Hopefully the image will be viewable in the code review tool
Apparently not :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19799
___
Eli Bendersky added the comment:
Just in case it isn't:
https://dl.dropboxusercontent.com/u/15602400/images/pathlib-inheritance.png
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19799
New submission from Eli Bendersky:
Prefix matching behavior can lead to bugs when combined with parse_known_args.
See this thread for more details:
https://mail.python.org/pipermail/python-dev/2013-November/130601.html
Issue #14910 deals with making it optional, but until 3.5 we'll have to do
Illirgway added the comment:
because strict throws an exception (for example, on raw win1251) which brings
down production smtp daemon and replace embeds ugly characters into
received (and passed) email messages
--
___
Python tracker
STINNER Victor added the comment:
You should also modify Doc/library/socket.rst to mention the new constant in
the documentation (don't forget the .. versionadded:: flag).
Adding a new constant cannot break anything in Python, so I propose to it in
Python 3.4.
@Larry (our release manager):
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19629
___
___
Python-bugs-list
STINNER Victor added the comment:
Could you please attach the picture separatly?
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19799
___
Changes by R. David Murray rdmur...@bitdance.com:
--
title: Adding a feature to python interpreter - Display function signature in
TypeErrors resulting from argument mismatches
type: - enhancement
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
That's much less readable than the output from pfydoc, which the user can
access easily (via either help at the interpreter prompt or pydoc at the shell
prompt). So I'm -1 on this proposed change.
--
nosy: +r.david.murray
Eli Bendersky added the comment:
Here's a patch for 3.3; if it looks ok i'll merge it to default and also to 2.7
--
keywords: +patch
Added file: http://bugs.python.org/file32870/issue19814.doc33.patch
___
Python tracker rep...@bugs.python.org
Eli Bendersky added the comment:
On Wed, Nov 27, 2013 at 6:21 AM, STINNER Victor rep...@bugs.python.orgwrote:
STINNER Victor added the comment:
Could you please attach the picture separatly?
Done
--
___
Python tracker rep...@bugs.python.org
Changes by Eli Bendersky eli...@gmail.com:
Added file: http://bugs.python.org/file32871/pathlib-inheritance.png
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19799
___
STINNER Victor added the comment:
Which tool did you use to draw this schema? You may attach also the source if
someone would like to modify it in the future.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19799
Eli Bendersky added the comment:
STINNER Victor added the comment:
Which tool did you use to draw this schema? You may attach also the source
if someone would like to modify it in the future.
Sorry, but there's no source. I drew it graphically. But since I did it
with Google Drive's
Larry Hastings added the comment:
It's *possible* but I'm willing to risk it. You have my permission to apply
that patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19802
___
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14910
___
___
Python-bugs-list
Benjamin Peterson added the comment:
While we don't print the whole signature, this is much improved in 3.3:
def foo(a,b=4,c=hello): pass
foo()
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: foo() missing 1 required positional argument: 'a'
--
nosy:
STINNER Victor added the comment:
You can export the schema as SVG.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19799
___
___
Brian Curtin added the comment:
If a platform does not actually support symlinks, and XP does not actually
support symlinks for any usual definition of an operating system supporting a
feature, then I'm not sure why pathlib is doing something wrong to make it work
more reasonably in that
Roundup Robot added the comment:
New changeset 9bbada125b3f by Benjamin Peterson in branch 'default':
add SO_PRIORITY (closes #19802)
http://hg.python.org/cpython/rev/9bbada125b3f
--
nosy: +python-dev
resolution: - fixed
stage: - committed/rejected
status: open - closed
Antoine Pitrou added the comment:
If you want a slow file object, you could benchmark with a GzipFile or similar.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19780
___
Antoine Pitrou added the comment:
The 2.7-compatible version of pathlib explains why the code is structured this
way:
if sys.getwindowsversion()[:2] = (6, 0) and sys.version_info = (3, 2):
from nt import _getfinalpathname
else:
supports_symlinks = False
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19781
___
___
Python-bugs-list
Brett Cannon added the comment:
As Victor pointed out, this is not really feasible at the object level. You can
work your way back up to reload a whole module, but it won't update the object
you passed in, which is just going to confuse users.
--
nosy: +brett.cannon
resolution: -
Changes by Zachary Ware zachary.w...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3158
___
___
Changes by Yann Diorcet diorcet.y...@gmail.com:
--
type: - crash
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19815
___
___
Python-bugs-list
New submission from Yann Diorcet:
I fell on a bug in ElementTree of Python 2.7.5 (default, Nov 12 2013, 16:18:04)
The bug seems to be here:
http://hg.python.org/cpython/file/ab05e7dd2788/Modules/_elementtree.c#l2341
uri is NULL and not checked before be passed to strlen
Maybe linked to my
STINNER Victor added the comment:
Can you please provide use the script wadl.py? Or if it's not possible, can you
please try to write a short Python script reproducing the crash?
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
Christian Heimes added the comment:
Indeed, uri might be null:
http://hg.python.org/cpython/file/ab05e7dd2788/Modules/expat/xmlparse.c#l3157
--
nosy: +christian.heimes
stage: - needs patch
versions: +Python 3.3, Python 3.4
___
Python tracker
New submission from STINNER Victor:
Someone proposed to use the new tracemalloc module in test.regrtest, I don't
remember who. Maybe Nick Coghlan?
I tried an hack dash_R(), but the result was not reliable. I should try harder
:-)
--
components: Tests
messages: 204604
nosy: haypo,
Julian Gindi added the comment:
Updated patch to include unit tests.
--
Added file: http://bugs.python.org/file32874/issue18983.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18983
___
New submission from STINNER Victor:
It would be nice to add a memory_limit feature to the tracemalloc to make
memory allocation fails if it would make the traced memory greater than the
limit.
See also the pyfailmalloc project which is similar but different:
Jeremy Kloth added the comment:
The attached patch changes support.rmtree to use os.lstat() instead of the
builtin _isdir() to test for directory-ness of a path.
--
keywords: +patch
Added file: http://bugs.python.org/file32875/symlink.patch
___
dellair jie added the comment:
I have rebuilt Python 3.3.2 with GCC 4.4.0 on AIX6.1.
There was no warning. But, still seeing the same import offset runtime error:
gcc -pthread -DNDEBUG -g -fwrapv -O0 -Wall -Wstrict-prototypes -IInclude -I.
-Iopenssl/include -Iopenssl/include
STINNER Victor added the comment:
Why not starting to use pathlib? pathlib.Path(path).resolve().is_dir().
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19629
___
Roundup Robot added the comment:
New changeset 553144bd7bf1 by Victor Stinner in branch 'default':
Close #19798: replace maximum term with peak in get_traced_memory()
http://hg.python.org/cpython/rev/553144bd7bf1
--
nosy: +python-dev
resolution: - fixed
stage: - committed/rejected
STINNER Victor added the comment:
no?
yes, I also prefer current over size.
--
stage: committed/rejected -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19798
___
Changes by Yann Diorcet diorcet.y...@gmail.com:
Added file: http://bugs.python.org/file32876/aa.tar.gz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19815
___
Antoine Pitrou added the comment:
Why not starting to use pathlib? pathlib.Path(path).resolve().is_dir().
I would rather keep using low-level APIs in test support functions.
--
___
Python tracker rep...@bugs.python.org
HCT added the comment:
this seems to disagree with the statement of Memoryview currently only knows
the types from the struct module.
why is memoryview aware of _pack_, a implementation detail of ctypes
structures. is memoryview a collection of implementation for different types or
a unique
HCT added the comment:
more examples (using 64-bit integer vs 8-bit integer in the above example) to
show that ctypes aren't being translated for memoryview properly. _pack_ is the
only way to make memoryview handle ctypes properly
import ctypes
class B1(ctypes.Structure):
... _fields_
Roundup Robot added the comment:
New changeset eead17ba32d8 by Victor Stinner in branch 'default':
Closes #19786: tracemalloc, remove the arbitrary limit of 100 frames
http://hg.python.org/cpython/rev/eead17ba32d8
--
nosy: +python-dev
resolution: - fixed
stage: - committed/rejected
STINNER Victor added the comment:
I ran 17 random tests of the Python test suite: the longest traceback contains
85 frames, the mean is 31.6 frames.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19786
STINNER Victor added the comment:
Thanks, I'm able to reproduce the crash using aa.tar.gz.
Python traceback on the crash:
(gdb) py-bt
Traceback (most recent call first):
File /home/haypo/prog/python/default/Lib/xml/etree/ElementTree.py, line
1235, in feed
self._parser.feed(data)
File
Jim Jewett added the comment:
These comments refer to
http://hg.python.org/cpython/file/5c9af8194d3b/Doc/library/tracemalloc.rst
which is newer than the current patches.
I believe I have consolidated the still-open issues that I see (including those
that aren't mine) for this file:
Jim Jewett added the comment:
Drat: forgot one at line 277
.. function:: get_traced_memory()
Get the current size and maximum size of memory blocks traced by the
:mod:`tracemalloc` module as a tuple: ``(size: int, max_size: int)``.
I have a tendency to read maximum size as the most it
New submission from STINNER Victor:
Jim Jewett posted the message msg204618 to the issue #18874 which is now
closed, so I'm opening a new issue. Copy of his message.
These comments refer to
http://hg.python.org/cpython/file/5c9af8194d3b/Doc/library/tracemalloc.rst
which is newer than the
STINNER Victor added the comment:
And copy of his second message msg204619:
Drat: forgot one at line 277
.. function:: get_traced_memory()
Get the current size and maximum size of memory blocks traced by the
:mod:`tracemalloc` module as a tuple: ``(size: int, max_size: int)``.
I have
STINNER Victor added the comment:
@Jim: This issue has been closed, please don't comment closed issues. I created
a new issue for your new comments: #19818.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18874
Christian Heimes added the comment:
The patch removes the cause of the segfault but I'm no sure if that's the right
way. I'm adding Eli und Stefan to the ticket.
--
keywords: +patch
nosy: +eli.bendersky, scoder
Added file: http://bugs.python.org/file32877/empty_uri.patch
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +fdrake
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19815
___
___
Python-bugs-list
STINNER Victor added the comment:
I have a tendency to read maximum size as the most it is willing/able to
trace, rather than the most it has traced at a single time so far. I
therefore prefer peak_size.
I already replied to this comment on Rietveld, I created the issue #19798 which
is
Roundup Robot added the comment:
New changeset 8df54b9b99ef by Victor Stinner in branch 'default':
Issue #19818: tracemalloc, the number of frame limit cannot be zero anymore
http://hg.python.org/cpython/rev/8df54b9b99ef
--
nosy: +python-dev
___
STINNER Victor added the comment:
Could you please write a patch on Doc/library/tracemalloc.rst? It's really hard
to review your raw comments in comments.
You should probably sign the contributor agreement.
http://www.python.org/psf/contrib/contrib-form/
Is [clear_traces()] just a shortcut
Guido van Rossum added the comment:
I decided to abandon this project and close the issue as wontfix.
--
resolution: - wont fix
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
New submission from Larry Hastings:
Read this today:
http://mortoray.com/2013/11/27/the-string-type-is-broken/
In it the author talks about how the 'ffl' ligature breaks some string
processing. He claimed that Python 3 doesn't uppercase it correctly--well, it
does. However I discovered
Christian Heimes added the comment:
There is no ligature for lff, just ffl. Ligatures are treated as one char.
I guess Python would have to grow a str.reverse() method to handle ligatures
and combining chars correctly.
At work I ran into the issue with ligatures and combining chars multiple
Christian Heimes added the comment:
A proper str.reverse function must deal with more extra cases. For example
there are special rules for the Old German long s (ſ) and the round s (s). A
round s may only occur at the end of a syllable. Hebrew has a special variant
of several characters if
STINNER Victor added the comment:
Python implements the Unicode standards. Except if Python failed to implement
the standard correctly, the author should complain to the Unicode Consortium
directly!
http://www.unicode.org/contacts.html
Example of data for the ffl character, U+FB04:
FB04;LATIN
STINNER Victor added the comment:
I don't understand the purpose of using reversed(). Don't use it to display a
text backward. Handling bidirectional text requires more complex tools to
display such text. See for example the pango library:
STINNER Victor added the comment:
Hum, Clang is not kind enough to understand that gil_state is not used when
uninitialized.
Well, I always hesitated to refactor the code. So here is a cleanup which moves
PyGILState_Ensure/PyGILState_Release to the caller. It duplicates a few lines
of code,
Changes by STINNER Victor victor.stin...@gmail.com:
--
title: test_venv: test_with_pip() failed on AMD64 Fedora without threads 3.x
buildbot - test_venv: test_with_pip() failed on AMD64 Fedora without threads
3.x buildbot: urllib3 dependency requires the threading module
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17232
___
___
Python-bugs-list
STINNER Victor added the comment:
Oh, here is in interesting commit:
---
changeset: 33705:891042c94aed
branch: legacy-trunk
user:Tim Peters tim.pet...@gmail.com
date:Sat Oct 09 22:33:09 2004 +
files: Python/thread.c
description:
Document the results of painful
STINNER Victor added the comment:
I didn't see the failure recently, so I hope that it was fixed. I close the
issue. I will reopen it if I see the failure again.
Thanks Guido for your fix.
--
resolution: - fixed
status: open - closed
___
Python
STINNER Victor added the comment:
I ran test_tracemalloc on Linux and Windows and the test passed successfully.
It should probably be better to split the patch in two parts if the idea of
changing Python/thread* files is accepted. (But initially, the issue comes from
the tracemalloc module.)
STINNER Victor added the comment:
The purpose of this issue is to avoiding having to call CreateProcess() with
bInheritHandles parameter set to TRUE on Windows, and avoid calls to
self._make_inheritable() in subprocess.Popen._get_handles().
Currently, bInheritHandles is set to TRUE if stdin,
STINNER Victor added the comment:
UpdateProcThreadAttribute() documentation says that ... handles must be
created as inheritable handles ... and a comment says that If using
PROC_THREAD_ATTRIBUTE_HANDLE_LIST, pass TRUE to bInherit in CreateProcess.
Otherwise, you will get an
STINNER Victor added the comment:
I like the idea :-)
--
nosy: +gvanrossum, haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19775
___
___
STINNER Victor added the comment:
I wanted to suggest to modify the resolve() method, but '~' is a valid
filename... (I tested, and it's annoying because depending on command,
sometimes ~ is expanded to /home/haypo sometimes not...)
--
nosy: +haypo
Roundup Robot added the comment:
New changeset 6f1c5d0b44ed by Zachary Ware in branch 'default':
Issue #19595: Re-enable a long-disabled test in test_winsound
http://hg.python.org/cpython/rev/6f1c5d0b44ed
--
nosy: +python-dev
___
Python tracker
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
keywords: +easy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19820
___
___
Python-bugs-list
1 - 100 of 105 matches
Mail list logo