Guido van Rossum added the comment:
I don't believe it either. I find join consistently faster than format:
python2.7 -m timeit -s 'x = [bx*1000']*10 'b.join(x)'
100 loops, best of 3: 0.686 usec per loop
python2.7 -m timeit -s 'x = bx*1000'
'(b{}{}{}{}{}{}{}{}{}{}).format(x, x, x, x, x, x,
Roundup Robot added the comment:
New changeset f18d11ab53a0 by Serhiy Storchaka in branch '3.3':
Issue #16957: shutil.which() no longer searches a bare file name in the
http://hg.python.org/cpython/rev/f18d11ab53a0
New changeset 7b51568cfbae by Serhiy Storchaka in branch 'default':
Issue
Serhiy Storchaka added the comment:
Committed. Thank you for for the patch.
--
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16957
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14771
___
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
resolution: - out of date
stage: - committed/rejected
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11201
___
Eric V. Smith added the comment:
I think ''.join() will always be faster than ''.format(), for a number of
reasons (some already stated):
- it doesn't have to pass the format string
- it doesn't have to do the __format__ lookup and call the resulting function
(although I believe there's an
Antoine Pitrou added the comment:
Whether b''.format() would have to lookup and call __format__ remains
to be seen. From what I've read, maybe baking in knowledge of bytes,
float, and int would be good enough. I suspect there might be some
need for datetimes, but I could be wrong.
The
Eric V. Smith added the comment:
I retract the datetime comment. Given what we're trying to accomplish, I think
we only need to support types that are supported by 2.7's %-formatting.
--
___
Python tracker rep...@bugs.python.org
Tim Golden added the comment:
My use case is the reloader or restarter. I've initially fallen foul of this
when using the cherrypy reloader (which does an execv by building from
sys.executable + sys.argv) but I also have web services running which I'd like
to restart remotely by forcing them
Roundup Robot added the comment:
New changeset a46a0dafcb7a by Senthil Kumaran in branch '3.2':
Issue #12411: Fix to cgi.parse_multipart to correctly use bytes boundaries and
http://hg.python.org/cpython/rev/a46a0dafcb7a
New changeset 59ea872d8b6b by Senthil Kumaran in branch '3.3':
merge from
Senthil Kumaran added the comment:
I updated the patch addressing Ezio's comments in the review system and also
condensed the tests. This fixes the parse_multipart's byte handling at some
level.
The docstring of parse_multipart say that, this should be deprecated in favor
of FieldStorage
R. David Murray added the comment:
It's sort-of a bug, and sort-of not. getaddresses is expecting to parse an
already unfolded header, but the pre-3.3 email package does not unfold headers
automatically. See issue 11050 for more information.
--
resolution: - duplicate
stage: -
Xavier de Gaye added the comment:
The patch applied to the default branch should be reverted.
The 2.7 _hotshot extension module follows the specifications of PyEval_SetTrace:
Set the tracing function to func. This is similar to PyEval_SetProfile(),
except the tracing function does receive
Jesús Cea Avión added the comment:
So, Xavier, are you saying that you are reverting the patch?.
Could be possible to provide a good patch, with a correct test of the
situation you describe?
Or are you suggesting just revert this and close this bugentry for good?.
--
resolution:
Roundup Robot added the comment:
New changeset cd87afe18ff8 by Benjamin Peterson in branch 'default':
revert #16672 for incorrect semantics
http://hg.python.org/cpython/rev/cd87afe18ff8
--
___
Python tracker rep...@bugs.python.org
Xavier de Gaye added the comment:
It is not possible to improve the performances of the trace function set with
sys.settrace without breaking backward compatibility for PyEval_SetTrace or
without introducing a new PyEval_xxx of some sort.
Yes, I suggest to revert this patch.
--
Xavier de Gaye added the comment:
status should be close, I guess.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16672
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
Thank you, Ned, for information.
Here is a patch which remove the first difference (processing an empty path).
The second difference is not semantically significant and I'm not sure whether
we need to get rid of it.
--
keywords: +patch
Added file:
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17012
___
___
Changes by R. David Murray rdmur...@bitdance.com:
--
components: +email
nosy: +barry, r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5430
___
Changes by R. David Murray rdmur...@bitdance.com:
--
components: +email
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3461
___
___
Changes by Benjamin Peterson benja...@python.org:
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16672
___
New submission from Marcin Szewczyk:
I've done some experiments with:
1) multiprocessing.Process.join()
2) os.waitpid()
3) subprocess.Popen.wait()
These three methods behave completely different when interrupted with a signal
which I find disturbing.
Reactions are:
1) exit with no exception
Changes by Jakub Wilk jw...@jwilk.net:
--
nosy: +jwilk
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17018
___
___
Python-bugs-list mailing list
Guido van Rossum added the comment:
Remember, the only reason to add this would be to enable writing code
that works in both 2.7 and 3.4. So it has to be called .format() and
it has to format numbers as decimal strings by default.
--
___
Python
Changes by Richard Oudkerk shibt...@gmail.com:
--
nosy: +sbt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17018
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Third argument of ioctl should be not , but a bytes object with platform
dependent length sizeof(pid_t).
Beside this, the code at the top of the module checks the same condition and
skip the tests if it is wrong. Race condition happened -- the process
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3982
___
___
Python-bugs-list
Antoine Pitrou added the comment:
Beside this, the code at the top of the module checks the same
condition and skip the tests if it is wrong. Race condition happened
-- the process has been put into the background between executing
these two codes. What command line you run the test?
It
New submission from mtb:
LinkedIn
I'd like to add you to my professional network on LinkedIn.
- Matthew
Matthew Burns
unemployed at n/a
Greater Los Angeles Area
Confirm that you know Matthew Burns:
Serhiy Storchaka added the comment:
Do you use -r option?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14771
___
___
Python-bugs-list mailing
Christian Heimes added the comment:
Please don't spam the bug tracker!
--
nosy: +christian.heimes
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17019
Antoine Pitrou added the comment:
Serhiy Storchaka added the comment:
Do you use -r option?
No. Usually just -jsomething
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14771
___
Nickolai Zeldovich added the comment:
Lines 2777 and 3111 do indeed look suspect, because gcc can compile (ptr +
offset ptr) into (offset 0):
nickolai@sahara:/tmp$ cat x.c
void bar();
void
foo(char* ptr, int offset)
{
if (ptr + offset ptr)
bar();
}
nickolai@sahara:/tmp$ gcc x.c -S
Antoine Pitrou added the comment:
tp_cache and tp_weaklist are also for internal use only, but are
documented.
Ok, so I guess tp_version_tag and tp_del should also be documented as for
internal use only.
--
___
Python tracker
Serhiy Storchaka added the comment:
What is something? Can you please expose several lines of regrtest output
before and after this error? When /1 appeared?
I suspect test_gdb:
$ ./python -m test.regrtest -j 2 test_gdb test_gdb
[1]+ Stopped ./python -m test.regrtest -j 2
Serhiy Storchaka added the comment:
$ ./python -m test.regrtest -j 2 test_gdb test_ioctl test_ioctl test_ioctl
test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl
[ 1/10] test_ioctl
[ 2/10] test_ioctl
[ 3/10] test_ioctl
[ 4/10] test_ioctl
[ 5/10] test_ioctl
[ 6/10] test_ioctl
[
Serhiy Storchaka added the comment:
$ ./python -m test.regrtest -j 4 test_gdb test_ioctl test_ioctl test_ioctl
test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl
test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl
test_ioctl test_ioctl
[
Serhiy Storchaka added the comment:
Bingo!
$ ./python -m test.regrtest -j 4 test_gdb test_ioctl test_ioctl test_ioctl
test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl
test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl test_ioctl
test_ioctl
Antoine Pitrou added the comment:
Nice catch, Serhiy. I wouldn't have suspected test_gdb.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14771
___
Changes by Antoine Pitrou pit...@free.fr:
--
stage: - needs patch
title: Occasional failure in test_ioctl - Occasional failure in test_ioctl
when run parallel with test_gdb
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
New submission from Floris van Manen:
I recently noticed that the standard random() function generates values = 1.0
As processes are called from an event scheduler, each process has its own
Random() instance.
self.random = random.Random(seed)
self.randomState = self.random.getstate()
Serhiy Storchaka added the comment:
Perhaps we need a possibility to mark a test that it can't run in parallel.
I suspect some multiprocess tests fail for same reason.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14771
R. David Murray added the comment:
Can you post a small program that demonstrates the problem? I'm certainly not
seeing a problem just calling random.random() (and would be very surprised if I
did).
--
nosy: +r.david.murray
___
Python tracker
Peter Otten added the comment:
This could be a duplicate of issue14591.
--
nosy: +peter.otten
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17020
___
Matthew Barnett added the comment:
You're checking int offset, but what happens with unsigned int offset?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17016
___
Nickolai Zeldovich added the comment:
For an unsigned int offset, see my original bug report: gcc eliminates the
check altogether, since offset = 0 by definition.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17016
R. David Murray added the comment:
That indeed looks likely. Fortunately there will be a new release of 2.7
including that fix soon.
Floris, do you have any way to test against 2.7 tip?
--
___
Python tracker rep...@bugs.python.org
Floris van Manen added the comment:
On 23 Jan 2013, at 19:18, R. David Murray wrote:
R. David Murray added the comment:
That indeed looks likely. Fortunately there will be a new release of 2.7
including that fix soon.
Floris, do you have any way to test against 2.7 tip?
using 2.7.3
Floris van Manen added the comment:
indeed, looks like the same.
.F
On 23 Jan 2013, at 19:09, Peter Otten wrote:
Peter Otten added the comment:
This could be a duplicate of issue14591.
--
nosy: +peter.otten
___
Python tracker
Glyph Lefkowitz added the comment:
On Jan 22, 2013, at 11:27 PM, Antoine Pitrou rep...@bugs.python.org wrote:
Antoine Pitrou added the comment:
The ASCII superset commands part is clearly separated from the binary
data part. Your own LineReceiver is able to switch between raw mode
and
Glyph Lefkowitz added the comment:
On Jan 22, 2013, at 11:31 PM, Martin v. Löwis rep...@bugs.python.org wrote:
I admit that it is puzzling that string interpolation is apparently the
fastest way to assemble byte strings. It involves parsing the format string,
so it ought to be slower than
Glyph Lefkowitz added the comment:
On Jan 23, 2013, at 1:58 AM, Antoine Pitrou rep...@bugs.python.org wrote:
Numbers currently don't have a __bytes__ method:
(5).__bytes__()
Traceback (most recent call last):
File stdin, line 1, in module
AttributeError: 'int' object has no attribute
Antoine Pitrou added the comment:
They do have some rather odd behavior when passed to the builtin
though:
bytes(10)
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
It would be much more convenient for me if bytes(int) returned the
ASCIIfication of that int; but honestly, even an error
Glyph Lefkowitz added the comment:
On Jan 23, 2013, at 11:02 AM, Antoine Pitrou rep...@bugs.python.org wrote:
I would agree with you, but it's probably too late to change...
Understandable, and, in any case, out of scope for this ticket.
--
___
Antoine Pitrou added the comment:
Perhaps we need a possibility to mark a test that it can't run in parallel.
I suspect some multiprocess tests fail for same reason.
Well, first I would like to know what the underlying problem is.
-j doesn't use multiprocessing, it spawns standalone
R. David Murray added the comment:
hg pull http://hg.python.org/cpython
hg up 2.7
There are also git and bzr mirrors, but I don't know their urls or how up to
date they are.
We could also just close this as a dup if you are pretty sure its the same
problem (which it certainly sounds like it
Antoine Pitrou added the comment:
Ah, I see, that's because of the Skip if another process is in foreground
thing?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14771
___
Antoine Pitrou added the comment:
Given what _check_ioctl_mutate_len() seems to be designed to check, perhaps we
should relax:
self.assertIn(rpgrp, ids)
into:
self.assertNotEqual(rpgrp, fill)
or perhaps simply:
self.assertGreater(rpgrp, 0)
--
Antoine Pitrou added the comment:
Ah, and the test_ioctl() method needs to be fixed too.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14771
___
Serhiy Storchaka added the comment:
Now RuntimeError is raised in this case.
Here is a patch, which:
1) Increases the limit of repeat numbers to 4G (now SRE_CODE at least 32-bit).
2) Raises re.error exception if this limit is exceeded.
3) Fixes some minor related things.
--
Eric V. Smith added the comment:
So it sounds like the use case is (as Glyph said in msg180432):
- Provide a transition for users of 2.7's of str %-formatting into a style
that's compatible with both str in 2.7 and bytes in 3.4.
In that case the only options I see are to implement __mod__ or
Changes by Thomas Kluyver tak...@gmail.com:
--
nosy: +takluyver
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8478
___
___
Python-bugs-list
benrg added the comment:
This is bizarre:
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit
(Intel)] on win32
Type help, copyright, credits or license for more information.
x = y = [1, 2]
x += [3]
y
[1, 2, 3]
x = y = {1, 2}
x -= {2}
y
{1}
Since when has this
New submission from Hank Christian:
LinkedIn
Python,
I'd like to add you to my professional network on LinkedIn.
- Henry
Henry Christian
ADJUNCT PROFESSOR at Central Texas College
Greater Los Angeles Area
Confirm that you know Henry Christian:
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17021
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
Removed message: http://bugs.python.org/msg180502
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17021
___
Ezio Melotti added the comment:
This should now be fixed
(http://mail.python.org/pipermail/python-dev/2013-January/123680.html).
This seems to happen whenever the revision description begins with
text that results in a link to something else (e.g. an issue number).
To elaborate a bit on
Ezio Melotti added the comment:
What is when possible supposed to mean here?
Generally it means when the object is mutable:
l = [1,2,3]
id(l)
3074713484
l += [4]
id(l)
3074713484
t = (1,2,3)
id(t)
3074704004
t += (4,)
id(t)
3075304860
Tuples are not mutable, so it's not possible to
Matthew Barnett added the comment:
IMHO, I don't think that MAXREPEAT should be defined in sre_constants.py _and_
SRE_MAXREPEAT defined in sre_constants.h. (In the latter case, why is it in
decimal?)
I think that it should be defined in one place, namely sre_constants.h, perhaps
as:
#define
Chris Jerdonek added the comment:
It might be better if the revision link was separate from the
description text.
I did the opposite -- I left the revision link there and created a separated
link to the issue at the end of the description.
Some downsides of the selected approach are that
R. David Murray added the comment:
If you really want to freak out, try this:
x = ([],)
x[0] += [1]
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: 'tuple' object does not support item assignment
x
([1],)
but to answer your question, it has *always* worked that
Ezio Melotti added the comment:
To clarify, with depends on the implementation I meant the way a particular
class is implemented (i.e. a class might decide to return a new object even if
it's mutable).
The behavior of built-in types is well defined and should be the same across
all the Python
Ezio Melotti added the comment:
True.
The fix is far from being ideal, but it's a good compromise given the
limitations of interhg IMHO.
An RFE for interhg should be created, to allow to specify the pages affected by
each regex and/or use different regexs on different pages.
--
benrg added the comment:
As far as I know Ezio is correct, when possible means when the target is
mutable. The documentation should probably be clarified on that point.
Yes, it needs to be made very, very clear in the documentation. As I said, I'm
not aware of any other language in which
Ezio Melotti added the comment:
Python is designed to be unsurprising; constructs generally mean
what it looks like they mean.
AFAIK in C x += 1 is equivalent to x++, and both are semantically more
about incrementing (mutating) the value of x than about creating a new value
that gets
Atsuo Ishimoto added the comment:
In Python 3.3, we have contextlib.ExitStack() for multiple contexts.
So, perhaps we can close this issue?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12782
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16803
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
Actually previous patch doesn't fix original problem, it only ensure that
GzipFile consistent with BZ2File and LZMAFile.
To fix original problem we need other patch, and this patch looks as new
feature for 3.4. Here is a sample patch for LZMAFile. BZ2File
Ezio Melotti added the comment:
If this can't be fixed I think it should be at least documented in the FAQs.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12782
___
80 matches
Mail list logo