Raymond Hettinger added the comment:
One other thought: The OrderedEnum example should not use the total ordering
decorator.
To the extent that the docs are trying to teach how to use Enum, they should
focus on that task and not make a side-trip into the world of class decorators.
And
Raymond Hettinger added the comment:
I'll take a look at this in more detail in the next week or so.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19072
___
Raymond Hettinger added the comment:
Claudiu's patch looks correct.
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19078
___
Charles-François Natali added the comment:
(replying to Guido's post in another thread)
Charles-Francois, sorry to add you back to the bug, but (a) I thought you had
agreed to a compromise patch that restarts signals in most cases but not for
select(), poll() etc.; (b) I may have found a
Graham Dumpleton added the comment:
If you have the time, would be great if you can have a quick look at my wrapt
package. That will give you an idea of where I am coming from in suggesting
this change.
http://wrapt.readthedocs.org/en/latest/
http://wrapt.readthedocs.org/en/latest/issues.html
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
stage: needs patch - patch review
Added file: http://bugs.python.org/file31917/fix_counter.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18594
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Removed file: http://bugs.python.org/file31917/fix_counter.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18594
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
Added file: http://bugs.python.org/file31918/fix_counter.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18594
___
Raymond Hettinger added the comment:
Repaired version
$ py -m timeit -s 'from random import seed, randrange; seed(8675309);
data=[randrange(1000) for i in range(10)]; from collections import Counter'
'Counter(data)'
100 loops, best of 3: 14.3 msec per loop
$ py -m timeit
Martin v. Löwis added the comment:
I see two solutions, both involving to track the newest timestamp that needs to
pass.
a) touch the file to have a time stamp in the future. make might complain,
though.
b) sleep until a second has passed, then touch (actually, sleep of 100ms
multiple times
Stefan Behnel added the comment:
Patch LGTM and seems to work well, according to your numbers.
Only minor nitpick would be that the method references could be decref-ed
earlier, but that would complicate the code a bit.
--
___
Python tracker
New submission from koobs:
Test failure observed on koobs-freebsd9 on default branch with changeset:
220b34cbd711c28938ea5d980636202c51ab1fbb
Subsequent forced rebuild succeeded with no failure.
==
FAIL: test_with_statement
Oscar Benjamin added the comment:
I should be clearer about my intentions. I'm hoping to create an
efficient and accurate sum() function for the new stdlib statistics
module:
http://bugs.python.org/issue18606
http://www.python.org/dev/peps/pep-0450/
The sum() function currently proposed can be
gladman added the comment:
On IDLE this:
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit
(AMD64)] on win32
Type copyright, credits or license() for more information.
from datetime import datetime
datetime(1878, 12, 31).strftime('%d %b %y')
causes a crash on
Mateusz Loskot added the comment:
I have just tested Windows GUI application built against Python 3.2.1 with
is_valid_fd patch according to http://hg.python.org/cpython/rev/f15943505db0/
All built using VS2012.
Again, I can confirm that is_valid_fd does NOT solve the problem.
Here is extract
Oscar Benjamin added the comment:
Thanks for looking at this Antoine.
I've attached an updated patch for Python 2.7 called
check_mno_cywin_py27_2.patch. This explicitly closes the popen object
in the same way as the get_versions() function immediately above.
I've just signed an electronic
Oscar Benjamin added the comment:
On 30 September 2013 12:08, Oscar Benjamin rep...@bugs.python.org wrote:
I've attached an updated patch for Python 2.7 called
check_mno_cywin_py27_2.patch.
To be clear: I retested this patch (using the setup described above)
and the results are unchanged.
STINNER Victor added the comment:
I am surprised that this bug still exists as it is not far off two years old
now.
You should report the bug to Microsoft who distributes a buggy C runtime
library.
--
___
Python tracker rep...@bugs.python.org
Changes by STINNER Victor victor.stin...@gmail.com:
--
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19119
___
___
gladman added the comment:
On 30/09/2013 12:39, STINNER Victor wrote:
STINNER Victor added the comment:
I am surprised that this bug still exists as it is not far off two years old
now.
You should report the bug to Microsoft who distributes a buggy C runtime
library.
--
Tim Golden added the comment:
In reality (as I'm sure you can guess) it's just that no-one's got to
the point of fixing it. I did start off, but it's not a trivial fix and
clearly it got sidelined (with no-one shouting). Sometimes that's just
the way it is.
I'll see if I can dig out whatever
Martin v. Löwis added the comment:
Here is a patch that backdates outputs 1s after their youngest input (and
sleeps if necessary to avoid producing files in the future).
With that, I get
lap-le:3k loewis$ touch Parser/asdl_c.py ;date;make touch;date
Mo 30 Sep 2013 15:29:21 CEST
hg --config
Eli Bendersky added the comment:
LGTM
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
___
Python-bugs-list mailing list
Unsubscribe:
Roundup Robot added the comment:
New changeset 477246839224 by Martin v. Löwis in branch '3.3':
Issue #19106: Touch generated files to be 1s newer than their youngest source.
http://hg.python.org/cpython/rev/477246839224
--
nosy: +python-dev
___
New submission from Remi Pointel:
When I run the regress tests on OpenBSD 5.4-current, the test test_inspect.py
failed because the module _multiprocessing is not available, instead of
skipping the test:
FAILED (errors=1)
Traceback (most recent call last):
File ./Lib/test/test_inspect.py,
Roundup Robot added the comment:
New changeset 86eff5c4e698 by Martin v. Löwis in branch '3.3':
Issue #19106: Add buildbottouch target.
http://hg.python.org/cpython/rev/86eff5c4e698
--
___
Python tracker rep...@bugs.python.org
gladman added the comment:
On 30/09/2013 13:14, Tim Golden wrote:
Tim Golden added the comment:
In reality (as I'm sure you can guess) it's just that no-one's got to
the point of fixing it. I did start off, but it's not a trivial fix and
clearly it got sidelined (with no-one shouting).
R. David Murray added the comment:
No, Senthil is correct.
My original liking for this idea came from my mistaken impression that a value
without an '=' was different from a value with an '='. But clearly the
practice in the industry (the de facto standard) is that they are the same, and
R. David Murray added the comment:
I like it. If it isn't too difficult, I'd suggest that compact mode also
indent the string continuation lines:
['one string', 'other string',
'very very long string which is continued on '
'several lines',
'and again', 'and again', 'and again',
'and
Martin v. Löwis added the comment:
I have now updated the master.cfg to make buildbottouch a separate build step.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19106
___
Brett Cannon added the comment:
test.support.import_module is typically meant for global imports as
function-level imports are discouraged in general. I would instead use the
unittest.skipIf decorator::
@unittest.skipIf(not test.support.multiprocessing, multiprocessing
required)
def
Joshua Johnston added the comment:
I agree with True == 'True' and False == 'False' but None should be empty since
it represents the absence of a value akin to null, Nil, etc in other languages.
Ultimately it is not my decision make so I can only agree to disagree.
Thanks for having this
R. David Murray added the comment:
If we were making this decision de novo, we might decide it that way. However,
the current behavior has been in place for a long time, so backward
compatibility concerns raise the bar high enough that the costs of the change
outweigh any benefits, even if
Eli Bendersky added the comment:
With your fix, `make touch` now behaves as expected. Also, I can see the step
added to the bots (e.g.
http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/2597/steps/shell/logs/stdio)
Thanks, I think the issue is resolved then. We should
Vajrasky Kok added the comment:
Here's the preliminary patch. I am assuming that we should accept unicode
argument not reject it straight away.
Python3 does that.
import struct
struct.pack('b', 3)
b'\x03'
struct.pack(b'b', 3)
b'\x03'
struct.pack(b'\xff', 3)
Traceback (most recent call
Martin v. Löwis added the comment:
make touch (or hg touch) certainly should be mentioned. Details of the
buildbot configuration need not.
Publishing the buildbot configuration file might be useful, except that it also
contains all the builder passwords, which should not be published. If that
Changes by Xavier Combelle xavier.combe...@gmail.com:
--
nosy: +xcombelle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19024
___
___
Jyrki Pulliainen added the comment:
Added a test for SSL, if SSL is available
--
Added file: http://bugs.python.org/file31923/issue16041_py26_with_ssl.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16041
Serhiy Storchaka added the comment:
Here is a patch. Please review and correct the documentation.
--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file31924/pprint_compact.patch
___
Python tracker
Serhiy Storchaka added the comment:
Benchmarking results look great.
But isn't _PyObject_LookupSpecial() more appropriate function for special
methods lookup than PyObject_GetAttrString()?
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
I'd suggest that compact mode also indent the string continuation lines:
Please open new issue for this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19132
Serhiy Storchaka added the comment:
Struct constructor accepts only str and not unicode. But struct.pack() uses
caching and it found Struct('B') in the cache (because u'B' and 'B' are equal
and have same hash).
I doubt we should fix this. Adding support of Unicode argument is new feature.
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +giampaolo.rodola
stage: - needs patch
type: - behavior
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19133
Tim Peters added the comment:
The possible use cases are so varied fuzzy it seems better to use an object
for this, rather than funk-ify `fsum`. Say, class Summer. Then methods could
be invented as needed, with whatever state is required belonging to Summer
objects rather than passed
Antoine Pitrou added the comment:
Either way, the runtime inconsistency is a bug. Since we shouldn't break
existing code, I would vote for always allowing unicode format strings, rather
than always disallowing them.
Another argument is that str and unicode are generally substituible in 2.x
R. David Murray added the comment:
As noted in the review, I'm not as keen on having dictionaries displayed in
compact form.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19132
___
Serhiy Storchaka added the comment:
I'm not sure that it is what you expected: bytearray() is only initialized
once (setup of timeit). You probably want to reinitialize at each loop.
There is no setup of timeit here. And you forgot bytes(b) after accumulating
loop. bench_bytearray.py shows
Remi Pointel added the comment:
Yes, but it needs an import to use test.support.multiprocessing.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19134
___
Roundup Robot added the comment:
New changeset d7ba4ca59023 by Brett Cannon in branch 'default':
Issue #19134: Make a test in inspect conditional on multiprocessing
http://hg.python.org/cpython/rev/d7ba4ca59023
--
nosy: +python-dev
___
Python tracker
Brett Cannon added the comment:
The import doesn't matter for test.support.multiprocessing as it is conditional
thanks to the try/except. If that fails then the skipIf will be triggered and
nothing will be executed. If the import succeeds in test.support then the
importlib.import_module()
Antoine Pitrou added the comment:
The problem is the suboptimal code is also the natural way to
write such code. If you know a simple and idiomatic way to write an
optimal bytes FIFO, then please share it with us.
Please share this written in the natural way real code with us. I
can't
Remi Pointel added the comment:
Thanks :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19134
___
___
Python-bugs-list mailing list
Serhiy Storchaka added the comment:
I don't understand why you avoid to show any examples which benefit. Shouldn't
optimizing patches prove their efficient?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19087
Raymond Hettinger added the comment:
Let's close this one. As Uncle Timmy says, it would be a mistake to funkify
the signature for math.fsum.
If something like a Summer() class is born, it should start it life outside the
standard library, gain a following, and let both the API and
Serhiy Storchaka added the comment:
Updated patch addresses David's comments. Thank you David.
As noted in the review, I'm not as keen on having dictionaries displayed in
compact form.
This makes sense. If no one will argue for compactifying mappings I'll remove
this part of the patch.
Roundup Robot added the comment:
New changeset 7214e3324a45 by Barry Warsaw in branch '2.6':
- Issue #16041: CVE-2013-1752: poplib: Limit maximum line lengths to 2048 to
http://hg.python.org/cpython/rev/7214e3324a45
--
nosy: +python-dev
___
Python
Changes by Barry A. Warsaw ba...@python.org:
--
versions: -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16041
___
___
Antoine Pitrou added the comment:
I don't understand why you avoid to show any examples which benefit.
Shouldn't optimizing patches prove their efficient?
Many micro-optimizations get committed without proving themselves on a
high-level benchmark suite, as long as they produce a big enough
Changes by Antoine Pitrou pit...@free.fr:
--
assignee: eric.araujo - pitrou
stage: - commit review
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
Oscar Benjamin added the comment:
Fair enough.
Thanks again for taking the time to look at this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19086
___
Antoine Pitrou added the comment:
However, the patch had a bug in the resizing logic. Here is a new patch fixing
that (+ an additional test).
--
Added file: http://bugs.python.org/file31926/bytea_slice2.patch
___
Python tracker
Antoine Pitrou added the comment:
Other benchmarks for the new patch (exercising FIFO-like behaviour: some data
is appended at one end, and popped at the other):
timeit -s b=bytearray(10);s=b'x'*100 b[:100] = b''; b.extend(s)
- before: 4.07 usec per loop
- after: 0.812 usec per loop
For
Roundup Robot added the comment:
New changeset 7d9a1aa8d95e by Antoine Pitrou in branch '2.7':
Issue #12641: Avoid passing -mno-cygwin to the mingw32 compiler, except when
necessary.
http://hg.python.org/cpython/rev/7d9a1aa8d95e
--
nosy: +python-dev
Roundup Robot added the comment:
New changeset 6b89176f1be5 by Antoine Pitrou in branch '3.3':
Issue #12641: Avoid passing -mno-cygwin to the mingw32 compiler, except when
necessary.
http://hg.python.org/cpython/rev/6b89176f1be5
New changeset 8e180b2067e4 by Antoine Pitrou in branch 'default':
Antoine Pitrou added the comment:
Thank you Oscar! This issue can endly be fixed.
--
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
Changes by Dwayne Litzenberger dl...@dlitz.net:
--
nosy: +DLitz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16500
___
___
Python-bugs-list
Antoine Pitrou added the comment:
Ok, rejecting my own patch because of compatibility issues.
--
resolution: - wont fix
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Barry A. Warsaw added the comment:
On Sep 30, 2013, at 08:41 PM, Arfrever Frehtes Taifersar Arahesis wrote:
Arfrever Frehtes Taifersar Arahesis added the comment:
New changeset 7214e3324a45 by Barry Warsaw in branch '2.6':
- Issue #16041: CVE-2013-1752: poplib: Limit maximum line lengths to
Serhiy Storchaka added the comment:
A 4x improvement on a micro-benchmark is very likely to make a
difference in at least some real-world code (while a 10% improvement
wouldn't).
If there is a code that uses the deleting from the beginning of a bytearray. I
just pray to demonstrate this code.
Jyrki Pulliainen added the comment:
Regarding the implementation: all commands (even those returning multiple
lines), use the same readline method.
I've attached a patch for 2.6, working on the 2.7+ too.
--
keywords: +patch
nosy: +nailor
Added file:
Barry A. Warsaw added the comment:
Looks great, thanks! I'll apply this to 2.6.9 but let others forward port it
to 2.7.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16040
___
Arfrever Frehtes Taifersar Arahesis added the comment:
New changeset 7214e3324a45 by Barry Warsaw in branch '2.6':
- Issue #16041: CVE-2013-1752: poplib: Limit maximum line lengths to 2048 to
http://hg.python.org/cpython/rev/7214e3324a45
...
--- a/Misc/NEWS
+++ b/Misc/NEWS
...
+- Issue
Jyrki Pulliainen added the comment:
The patch for 2.6 applies cleanly on 2.7 too and the tests pass there
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16040
___
Jyrki Pulliainen added the comment:
Did a slight change to the patch, making the too long line to look like a valid
line so that it does not raise a NNTPProtocolError otherwise. Thanks to Barry
for catching this :)
I also wonder if there should be data error risen instead? Current docstrings
STINNER Victor added the comment:
I took me some time, but Antoine explained me the use case on IRC :-) The patch
is useful is the bytearray is used as a FIFO: remove front, append tail. It can
be seen as an implementation for BufferedReader. Consumer/producer is a common
pattern, especially
STINNER Victor added the comment:
I adapted my micro-benchmark to measure the speedup: bench_bytearray2.py.
Result on bytea_slice2.patch:
Common platform:
CFLAGS: -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g
-fwrapv -O3 -Wall -Wstrict-prototypes
CPU model: Intel(R)
Barry A. Warsaw added the comment:
On Sep 30, 2013, at 09:43 PM, Jyrki Pulliainen wrote:
I also wonder if there should be data error risen instead? Current docstrings
of the errors are not that well fit.
I guess a data error makes the least nonsense here, so I'll change it over to
that. I'm
Changes by Barry A. Warsaw ba...@python.org:
--
versions: -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16040
___
___
Roundup Robot added the comment:
New changeset 731abf7834c4 by Barry Warsaw in branch '2.6':
- Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to
http://hg.python.org/cpython/rev/731abf7834c4
New changeset 36680a7c0e22 by Barry Warsaw in branch '2.7':
- Issue #16040:
Changes by Barry A. Warsaw ba...@python.org:
--
versions: -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16040
___
___
Musashi Tamura added the comment:
Thanks for feedback.
I think it should be fixed with allowing unicode.
from __future__ import unicode_literals may break existing code.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19099
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +brett.cannon, eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19081
___
___
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19052
___
___
Python-bugs-list mailing list
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1491
___
___
Python-bugs-list mailing list
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19053
___
___
Python-bugs-list mailing list
Eric Snow added the comment:
I ran into this today. Can't we just change the Z to z# in the format
string (or z*)? Other than that, Tim's patch makes sense.
--
nosy: +eric.snow
versions: +Python 3.3, Python 3.4 -Python 3.1
___
Python tracker
Vajrasky Kok added the comment:
Refactor test to clear the cache before using unicode format.
--
Added file:
http://bugs.python.org/file31930/handle_ascii_range_unicode_in_struct_pack_v2.patch
___
Python tracker rep...@bugs.python.org
Senthil Kumaran added the comment:
I have provided my comments in the review tool. Please check them out.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19094
___
88 matches
Mail list logo