New submission from Dmitrii Dimandt:
Observed behaviour:
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
a = (1, [2,3])
a[1] += [4,5]
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: 'tuple' object
STINNER Victor added the comment:
Oh, this behaviour is really weird. It can probably be explained by the fact
that the INPLACE_ADD operator is used. See the bytecode for an explanation.
I don't know if it's possible to workaround this issue.
$ python3
Python 3.3.2 (default, Nov 8 2013,
Ezio Melotti added the comment:
http://docs.python.org/3/faq/programming.html#why-does-a-tuple-i-item-raise-an-exception-when-the-addition-works
--
nosy: +ezio.melotti
resolution: - invalid
stage: - committed/rejected
status: open - closed
type: - behavior
Vajrasky Kok added the comment:
FYI, if you change:
setattr(b, 'say', types.MethodType(f.say, b))
to:
setattr(b, 'say', types.MethodType(Foo.say, b))
it will print the source correctly.
--
nosy: +vajrasky
___
Python tracker rep...@bugs.python.org
New submission from Garth Bushell:
argparse.FileType does not expand tilde ~.
This would be useful to take file parameters beginning with ~ and use
os.path.expanduser to expand this.
--
components: Library (Lib)
messages: 205949
nosy: garthy
priority: normal
severity: normal
status:
Garth Bushell added the comment:
Add patch to add an option to argparse.FileType to enable expanduser.
--
keywords: +patch
Added file:
http://bugs.python.org/file33100/19959-argparse_filetype_expanduser.patch
___
Python tracker
Changes by Garth Bushell ga...@garthy.com:
--
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19959
___
___
Python-bugs-list
Changes by Daniël van Eeden launch...@myname.nl:
--
nosy: +dveeden
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5305
___
___
Python-bugs-list
Wim added the comment:
FWIW: I noticed that my patch has a bug due to sharing the cache dict between
element names and attribute names, although I think this is unlikely to crop up
very often in practice. I'll submit a better patch if/when I get the time to
put one together.
--
New submission from Ronald Oussoren:
When you build python 2.7 on an OSX 10.9 machine with Xcode but without the
command-line tools installed that build mostly succeeds, but doesn't detect a
number of dependencies (in particular zlib).
The attached patch teaches add_dir_to_list about the SDK
New submission from Ronald Oussoren:
When you build python on an OSX 10.9 machine with Xcode but without the
command-line tools installed that build mostly succeeds, but Tkinter fails to
build.
The following error message is from a 2.7 build, but the same problem occurs
when building 3.3 and
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19959
___
___
Garth Bushell added the comment:
Update patch to include docs.
--
Added file:
http://bugs.python.org/file33102/19959-argparse_filetype_expanduser_plus_doc.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19959
Mark Dickinson added the comment:
Possibly, the result's b_objects needs to be a copy of the src's b_objects
That sounds right to me. I can't really believe that the current behaviour is
intentional.
--
nosy: +mark.dickinson
___
Python tracker
R. David Murray added the comment:
Good point, thanks for the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19957
___
___
New submission from Zachary Ware:
The attached patch adds a CustomBuildStep to python.vcxproj which creates a
'python.bat' script in the root of the source tree for quicker and easier
invocation for testing purposes, and to make the Windows Python developer
experience a little closer to the
New submission from Brett Cannon:
The docs for importlib.import_module() say that you need to import parent
packages first, but this is actually no longer the case (thankfully):
Python 3.4.0b1 (default:a3bdbe220f8a, Dec 10 2013, 11:07:04)
[GCC 4.6.3] on linux
Type help, copyright, credits or
Serhiy Storchaka added the comment:
Then special case for iso-2022-* is not needed too.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19957
___
Roundup Robot added the comment:
New changeset 1ad2ff119356 by Zachary Ware in branch '3.3':
Avoid UnicodeEncodeError by only printing ASCII.
http://hg.python.org/cpython/rev/1ad2ff119356
--
___
Python tracker rep...@bugs.python.org
Vinay Sajip added the comment:
Adding Thomas Heller to nosy to see if he can shed any light on this.
--
nosy: +theller
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12836
___
New submission from Sworddragon:
From the documentation: The '*', '+', and '?' qualifiers are all greedy;
But this is not the case for '?'. In the attachments is an example which shows
this: re.search(r'1?', '01') should find '1' but it doesn't find anything.
--
components: Library
Serhiy Storchaka added the comment:
Does separated test crash?
./python -m test -v -uall -m test_indicatoron test_tk
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19954
___
New submission from Arfrever Frehtes Taifersar Arahesis:
A user reported this error with `make -j${high_value}`:
x86_64-pc-linux-gnu-gcc -pthread -c -Wno-unused-result -DNDEBUG -O2
-march=atom -pipe -fwrapv-I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE
-o
Serhiy Storchaka added the comment:
I don't think the documentation is wrong. re.search() returns first match, and
this is empty string at position 0.
import re
re.search('1?', '01')
_sre.SRE_Match object; span=(0, 0), match=''
All matches:
list(re.findall('1?', '01'))
['', '1', '']
Changes by Tim Peters t...@python.org:
--
stage: - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19964
___
___
Tim Peters added the comment:
It's working fine. `.search()` always finds the leftmost position at which the
pattern matches. In your example, the pattern '1?' does match at index 0: it
first tries to match `1' at index 0. That's the greedy part. The attempt
fails, so it next tries to
Changes by Tim Peters t...@python.org:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19964
___
___
Python-bugs-list
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19965
___
New submission from Arfrever Frehtes Taifersar Arahesis:
This bug is present in 3.3.3 tarballs (Python-3.3.3.tar.bz2,
Python-3.3.3.tar.xz, Python-3.3.3.tgz). This bug is absent in 3.3.2 tarballs.
In unpacked 3.3.2:
$ ./configure
...
$ make Include/Python-ast.h
make: 'Include/Python-ast.h' is
Serhiy Storchaka added the comment:
I think os.replace() should be used instead os.rename(). Or pair
os.unlink()/os.rename().
And perhaps for decreasing chance of race between creating .c and .h files,
both renames should be done after writing both files.
--
Arfrever Frehtes Taifersar Arahesis added the comment:
'p' variable in one part of code has different value than in other part.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19965
___
Serhiy Storchaka added the comment:
We can save them in a list of created files.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19965
___
___
R. David Murray added the comment:
Yes, in theory that should be true at this point.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19957
___
Muhammad Tauqir Ahmad added the comment:
Yes I understand your change and other possible changes will fix the
reproducer. I am already using a different workaround in my code.
The issue is about `inspect.getsource()` having incorrect behavior (or at least
inaccurate error message) and
R. David Murray added the comment:
rdmurray@hey:~/python/p34./python -m test -v -uall -m test_indicatoron test_tk
== CPython 3.4.0b1 (default:59fb79d0411e, Dec 11 2013, 16:39:28) [GCC 4.7.2]
==
Linux-3.10.6-gentoo-i686-Intel-R-_Core-TM-_i5_CPU_M_450_@_2.40GHz-with-gentoo-2.2
little-endian
==
Serhiy Storchaka added the comment:
What if run following code?
import tkinter
root = tkinter.Tk()
widget = tkinter.Menubutton(root)
for value in (True, 1, 'true', 'yes', 'on'):
print(value, flush=True)
widget['indicatoron'] = value
--
___
Charles-François Natali added the comment:
Since the patch doesn't use O_EXCL for the temporary file, it suffers
from the exact same race condition as the current code. It should be
using the x open mode.
--
nosy: +neologix
___
Python tracker
Serhiy Storchaka added the comment:
Since the patch doesn't use O_EXCL for the temporary file, it suffers
from the exact same race condition as the current code.
This does not make race condition. Only one thread writes .tmp files.
The problem is that other threads can read *-ast.[ch] files
Charles-François Natali added the comment:
Since the patch doesn't use O_EXCL for the temporary file, it suffers
from the exact same race condition as the current code.
This does not make race condition. Only one thread writes .tmp files.
The problem is that other threads can read
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19623
___
___
Raymond Hettinger added the comment:
A few quick thoughts:
* Everyone can agree docstrings are good.
* I disagree with Ned that the current docstrings
are ugly or not useful. The class docstring is
shown by tooltips and is immediately useful to
someone making a instance. The attribute
Mark Dickinson added the comment:
+1 for this (for Python 3.5, now, I guess). I've just found another place where
I'd use it.
Looking at the implementation, one thing surprises me a bit: I'd expect the
KeyError from a 'del' or 'pop' operation to have the untransformed key rather
than the
Serhiy Storchaka added the comment:
Please run following commands in wish:
$ wish
% menubutton .mb
.mb
% .mb configure -indicatoron 1
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19954
R. David Murray added the comment:
Ah. That produces the floating point exception as well.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19954
___
STINNER Victor added the comment:
See also the issue #19846.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19847
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
What with such example?
$ wish
% menubutton .mb -text Test
.mb
% pack .mb
% update
% .mb configure -indicatoron 1
Try also without pack and update.
--
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
floating point exception with or without the pack/update.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19954
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19787
___
___
Antoine Pitrou added the comment:
On jeu., 2013-12-12 at 21:59 +, STINNER Victor wrote:
So are you ok to apply the bugfix in Python 3.4?
I'm ok.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19787
STINNER Victor added the comment:
If I understand correctly, there is probably only one application (mod_python)
which might be broken by fix_set_key_value.patch.
If an application is broken by fix_set_key_value.patch, it can get the old
behaviour using:
int
PyThread_set_key_value33(int key,
Roundup Robot added the comment:
New changeset 7c116d7c6c65 by Victor Stinner in branch 'default':
Issue #19751: Fix typo in configuration option
http://hg.python.org/cpython/rev/7c116d7c6c65
New changeset c1a7ba57b4ff by Victor Stinner in branch 'default':
Issue #19751: Fix hash_info test of
New submission from STINNER Victor:
Thanks to the PEP 442 (Safe object finalization), _TracebackLogger helper of
asyncio.Futures becomes useless.
Attached patch removes it.
--
If you agree to diverge code with Tulip project, the Python 3.3 code of
WriteTransport.writelines can also be
STINNER Victor added the comment:
The initial test failure have been fixed, so I'm closing the issue.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19750
Guido van Rossum added the comment:
I'm sorry, I really don't want the asyncio code for 3.3 and 3.4 to diverge just
yet. It would make keeping the two versions in sync just so much harder.
I'm happy with something that checks for the version and either adds the
__del__ method (for 3.4) or
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19636
___
STINNER Victor added the comment:
@Guido: If you write issue #xxx in your commit message, the changeset will be
mentionned in the related issue.
---
changeset: 87237:0031ac40806a
user:Guido van Rossum gu...@dropbox.com
date:Sun Nov 17 17:00:21 2013 -0800
files:
New submission from Quanah Gibson-Mount:
I found that when trying to use Python with the stow utility, that it
incorrectly hard codes the full DESTDIR path into python, instead of the
relative portion of the DESTDIR path. As a result, DESTDIR usage is
fundamentally broken in relation to all
STINNER Victor added the comment:
I'm happy with something that checks for the version and either adds the
__del__ method (for 3.4) or uses the _TracebackLogger (for 3.3).
Ok. Here is a patch. The class is still defined on Python 3.4. You may move the
definition of the class in a if not
Quanah Gibson-Mount added the comment:
Or to summarize a bit differently --
the point of DESTDIR is to allow you to install your software in some location
other than what was specified with --prefix, without losing the --prefix
settings.
--
___
Raymond Hettinger added the comment:
Mark, what was the use case you found?
--
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18986
___
New submission from STINNER Victor:
PyBytes_FromFormatV(%c) and PyString_FromFormatV(%c) overflow if the
parameter is not in range [0; 255].
If nobody complained before, it's maybe not worth to fix the bug in Python 2.7
or 3.3.
--
components: Interpreter Core
messages: 205996
nosy:
STINNER Victor added the comment:
Here is a patch for Python 3.4.
--
keywords: +patch
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file33108/bytes_fromformat_c.patch
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
I didn't see the failure recently, thanks.
--
components: +Tests
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19579
STINNER Victor added the comment:
So Antoine, what do you think of the fix?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19576
___
___
Antoine Pitrou added the comment:
Looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19576
___
___
Python-bugs-list mailing list
STINNER Victor added the comment:
I think the issue has been fixed, thanks.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19566
___
Roundup Robot added the comment:
New changeset dc4e805ec68a by Victor Stinner in branch 'default':
Close #19576: PyGILState_Ensure() now initializes threads. At startup, Python
http://hg.python.org/cpython/rev/dc4e805ec68a
--
nosy: +python-dev
resolution: - fixed
stage: -
Roundup Robot added the comment:
New changeset d2560fd8a008 by Victor Stinner in branch 'default':
Issue #14432: Remove the thread state field from the frame structure. Fix a
http://hg.python.org/cpython/rev/d2560fd8a008
--
nosy: +python-dev
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +lemburg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19968
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 0875e5bbe5f0 by Victor Stinner in branch '3.3':
Issue #14432: Generator now clears the borrowed reference to the thread state
http://hg.python.org/cpython/rev/0875e5bbe5f0
New changeset 55dd094a2b01 by Victor Stinner in branch 'default':
Issue
Roundup Robot added the comment:
New changeset 2f975036cf39 by Victor Stinner in branch '3.3':
Issue #14432: Fix compilation when thread support is disabled
http://hg.python.org/cpython/rev/2f975036cf39
New changeset 9852637f05c3 by Victor Stinner in branch 'default':
(Merge 3.3) Issue #14432:
Roundup Robot added the comment:
New changeset aa324af42c0e by Victor Stinner in branch '2.7':
Issue #14432: Generator now clears the borrowed reference to the thread state
http://hg.python.org/cpython/rev/aa324af42c0e
--
___
Python tracker
STINNER Victor added the comment:
Thanks Mark Shannon for your patch. Sorry, I forgot to mention your name if the
changesets :-/ I didn't remember the whole story of this issue.
It should now be fixed.
--
resolution: - fixed
status: open - closed
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19952
___
Roundup Robot added the comment:
New changeset a35b2d652449 by Victor Stinner in branch 'default':
Issue #19952: test_asyncio: relax timings of Windows events, buildbots are
http://hg.python.org/cpython/rev/a35b2d652449
--
nosy: +python-dev
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: -haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19619
___
___
Python-bugs-list
STINNER Victor added the comment:
I'm unable to reproduce the test_4_daemon_threads failure, can anyone try on
Windows?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19466
___
STINNER Victor added the comment:
There is no more NetBSD buildbot, so I'm closing the issue.
--
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17786
STINNER Victor added the comment:
I don't see this issue anymore on FreeBSD buildbots. It was probably fixed. The
issue #19466 changed also the Python shutdown procedure.
--
resolution: - out of date
status: open - closed
___
Python tracker
R. David Murray added the comment:
sys.path is computed dynamically at run time. Try moving the install directory
around on your filesystem, and you'll see.
I'm not familiar with stow, and I don't know if anyone else on the team is
either, so you may have to explain your issue in more
Vajrasky Kok added the comment:
Okay, here is the patch on which we removed checking of special case for
iso-2022-*.
--
Added file:
http://bugs.python.org/file33109/minor_refactor_encoders_in_email_lib_v2.patch
___
Python tracker
Roundup Robot added the comment:
New changeset 46393019b650 by Victor Stinner in branch 'default':
Close #19787: PyThread_set_key_value() now always set the value. In Python 3.3,
http://hg.python.org/cpython/rev/46393019b650
--
nosy: +python-dev
resolution: - fixed
stage: -
Changes by STINNER Victor victor.stin...@gmail.com:
--
title: tracemalloc: set_reentrant() should not have to call
PyThread_delete_key() - Fix PyThread_set_key_value() strange behaviour
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
FYI I fixed a weird behaviour of the PyThread_set_key_value() function. The
change has indirectly on impact on test.support.run_in_subinterp():
http://bugs.python.org/issue19787#msg206015
So my change might have an effect on this issue.
--
Roundup Robot added the comment:
New changeset 29e5dd1f608a by R David Murray in branch 'default':
#19957: Simplify encode_7or8bit now that _payload is always str.
http://hg.python.org/cpython/rev/29e5dd1f608a
--
nosy: +python-dev
___
Python tracker
STINNER Victor added the comment:
They are now two issues (#10915 and this one) with many messages. Both issues
are open. Can someone please make a summary? How can we fix the
GIL/subinterpreter issue?
--
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
Thanks, Vajrasky and Serhiy.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19957
STINNER Victor added the comment:
There is no more pending patches nor known issues, so I'm closing this issue. I
will open a new issue if I find new bugs.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
So what? Do you want faster Python startup?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19230
___
___
STINNER Victor added the comment:
The real question for me is: why are you interested in speeding up the
import of the operator module? 200 µs won't make a visible difference.
Alone, the gain is useless, but it's like the work done in Python 3.4 to avoid
loading some modules at startup. The
STINNER Victor added the comment:
Oh, my change on PyThread_set_key_value() has an unexpected effect on
_testcapi.run_in_subinterp(): it now fixes the Python thread state.
Py_NewInterpreter() creates a second Python thread state for the current
thread, but PyThread_set_key_value() ignored the
STINNER Victor added the comment:
My commit broke test_capi, so I revert it. Here is the commit as a patch.
The impact on subinterpreters is more complex than what I expected. A decision
should be take on what to do: mimic behaviour of Python 3.3 for subinterpreters
(don't replace the Python
Eric Snow added the comment:
Nick: that sounds good to me. I like the idea of find_spec() being the same as
import_module(), minus actually loading the module.
In that spirit, here's a rough patch that accomplishes that. It refactors
things a bit to get there. Considering where we are in
Charles-François Natali added the comment:
Actually no, I don't understand this patch: if the makefile was correct, C
files depending on Include/Python-ast.h and Python/Python-ast.c shouldn't
be built before those files have been generated by asdl_c.py.
The problem doesn't lie in the
Eric Snow added the comment:
Here's a version that I'd feel more comfortable with for 3.4 (with the intent
of refactoring in 3.5).
--
Added file:
http://bugs.python.org/file33112/issue19944-find-spec-mirror-import-module-simple.diff
___
Python
95 matches
Mail list logo