Eric Snow added the comment:
Without too many optimzations, the C implementation of OrderedDict is basically
between 1x and 4x the performance of raw dict. This contrasts with the pure
Python OrderedDict, which falls in roughly between 4x and 100x.
I've attached an addition to pybench, not
Changes by Eric Snow ericsnowcurren...@gmail.com:
Removed file: http://bugs.python.org/file30357/cOrderedDict.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
Eric Snow added the comment:
Here's an updated patch that has fixes for recursive pickles and for a couple
memory-related segfaults that I missed before. That leaves the following to be
done:
* handle the case where a node is deleted during iteration
* check for any reference cycles (should
Charles-François Natali added the comment:
I'm not convinced it's really useful.
Furthermore, the complexity is rather bad: if T is the average number
of waiting threads, an C the number of conditions being waited on, the
wait is O(C) (appending to C wait queues) and wakeup is O(CT) (C
removal
Nick Coghlan added the comment:
I like the idea of using the strategy pattern to at least decouple the
assertion API from the main testcase API. I also like it better than the mixin
suggested earlier.
We would obviously have to keep the existing methods for backwards
compatibility, but could
Madison May added the comment:
So I've done a quick comparison of the two, and for the most part each entry is
an identical copy of the 2009 version. Some dated entries have been removed,
which I would consider a plus -- who realistically needs to know how to refer
to a 56K modems these day,
João Bernardo added the comment:
I'm not convinced it's really useful.
It doesn't seem a lot useful until you *really* need it. I've got 2 highly
parallel programs that took advantage of this pattern.
the wait is O(C) (appending to C wait queues) and wakeup
is O(CT) (C removal from a
David Beazley added the comment:
To me, the fact that m = max(s) if s else default doesn't work with iterators
alone makes this worthy of consideration.
I would also note that min/max are the only reduction functions that don't have
the ability to work with a possibly empty sequence. For
Changes by Jan Kanis jan.pyt...@jankanis.nl:
--
components: +Demos and Tools
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18132
___
New submission from Jan Kanis:
If the window of the turtledemo is small enough, the start/stop/clear buttons
disappear. This is specifically a problem when running on a netbook with a
small screen, because the buttons are never shown. For a newcommer checking out
the demo app this could be
Richard Oudkerk added the comment:
Furthermore, the complexity is rather bad: if T is the average number
of waiting threads, an C the number of conditions being waited on, the
wait is O(C) (appending to C wait queues) and wakeup is O(CT) (C
removal from a T-length deque).
Which just means
Ronald Oussoren added the comment:
I've tested a patch for the 2.7 branch on a 10.5 machine (which also failed to
build without the patch), and will commit once I've finished running the
testsuite on the 3.3 branch as well.
--
___
Python tracker
João Bernardo added the comment:
BTW, I think it would be better to have wait_for_any()
return a list of ready conditions rather than a boolean.
That was the original idea until I realized `wait` and `wait_for` were just
specializations of `wait_for_any`.
This can probably be done with
Brett Cannon added the comment:
I'm going to toss Armin's request over to core-mentorship since the fix is
easy. Is all you are after, Armin, a ``not os.path.isfile(cfile) or
os.path.islink(cfile)`` check which if true raises an exception?
--
assignee: brett.cannon -
status: closed -
Julian Berman added the comment:
I don't either really off the top of my head, though I've toyed with some
things.
If there's support for some exploration I wouldn't mind attempting a POC
externally though.
--
___
Python tracker
Michael Foord added the comment:
There's always (almost) support for exploration...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18054
___
___
Changes by Mher Movsisyan mher.movsis...@gmail.com:
--
nosy: +mher.movsisyan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18119
___
___
Vajrasky Kok added the comment:
Based on the input from Benjamin Peterson, I grab encoding from the os module
in the getpass module.
I put some test as well.
Until the whole function is rewritten, I hope this patch will suffice and do
the job properly.
--
Added file:
Changes by Aaron Meurer asmeu...@gmail.com:
--
nosy: +Aaron.Meurer
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18005
___
___
Python-bugs-list
Charles-François Natali added the comment:
Which just means that waiting on C conditions is C times more expensive than
waiting on 1 currently is. That seems reasonable enough to me, and anyway,
I would expect C to be fairly small.
Waking up a single thread (through notify()) is currently
João Bernardo added the comment:
Here, removing a thread
from a wait queue other than the one from which it was signalled is
O(waiting threads).
To be fair, You will probably never have more than a few hundred/thousand
threads on a process. Usually you'll work under a few dozen threads.
To
New submission from Joshua:
The Modulus doesn't seem to pull the proper remainder from simple calculations.
Look at the difference below between the remainder of a regular division
calculation and the modulus:
Am I missing something???
print (str(10.2 / 2))
5.1
print (str(10.2 % 2))
Changes by Berker Peksag berker.pek...@gmail.com:
--
versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18132
___
Joshua added the comment:
never mind, long day sorry!
--
resolution: - works for me
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18133
___
Ned Deily added the comment:
Documenting Python references to the Apple Style Guide go back to at least
Python 2.3.5's documentation, at that time to the 2001 version of the Apple
Style Guide. I was more curious if the Apple Style Guide was still being
actively consulted by the documentation
Ezio Melotti added the comment:
I don't think I ever read/consulted that page, except maybe the first time I
came across that link. I consult
http://docs.python.org/devguide/documenting.html regularly, but that is mostly
for the rst markup. Usually I just try to be consistent with the
New submission from Benedict Kwok:
Steps to reproduce:
1) create a ssn.txt file with social security numbers of customers
2) create a zip file with a password: zip -P secret ssn ssn.txt
3) create a python script to extract the zipfile by:
import=zipfile
zFile=zipfile.ZipFile(ssn.zip)
try:
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18134
___
___
Python-bugs-list
Ned Deily added the comment:
Terry: FYI, I just noticed the languishing patches in Issue4343 which *might*
be of some use here.
--
nosy: +ned.deily
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18103
Armin Rigo added the comment:
That's not really what I'm after, but that's a workaround I proposed to avoid
the worst breakage. I don't have an opinion about what to do with symlinks.
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 757a121a27c2 by Victor Stinner in branch 'default':
Close #17932: Fix an integer overflow issue on Windows 64-bit in iterators:
http://hg.python.org/cpython/rev/757a121a27c2
--
nosy: +python-dev
resolution: - fixed
stage: -
Changes by STINNER Victor victor.stin...@gmail.com:
--
stage: committed/rejected -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17932
___
___
New submission from STINNER Victor:
Our Windows 64-bit buildbot has interesting warnings:
..\Modules\_ssl.c(493): warning C4244: 'function' : conversion from 'SOCKET_T'
to 'int', possible loss of data
[C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_ssl.vcxproj]
New submission from Brett Cannon:
I have not had test_distutils succeed in ages. It looks like various header
files are not being passed to the compiler properly as all three test failures
stem from PyModuleDef_HEAD_INIT supposedly not existing or some other macro.
Below is an example failure
Brett Cannon added the comment:
Armin: I'm going off of http://bugs.python.org/msg189428 where you say you want
an exception raised. If there is something else you want to suggest that's fine
as long as it's not to revert the semantics since I'm not willing to do that.
--
Barry A. Warsaw added the comment:
The changes to smtpd.py seem reasonable to me. I see no reason not to make
this change, so +1.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11959
___
Roundup Robot added the comment:
New changeset 46401ce03547 by Victor Stinner in branch 'default':
Issue #9566: Fix compiler warning on Windows 64-bit in _bz2module.c
http://hg.python.org/cpython/rev/46401ce03547
--
___
Python tracker
Roundup Robot added the comment:
New changeset 2298bcba6ec9 by Victor Stinner in branch 'default':
Close #17931: Fix PyLong_FromPid() on Windows 64-bit: processes are identified
http://hg.python.org/cpython/rev/2298bcba6ec9
--
nosy: +python-dev
resolution: - fixed
stage: -
Roundup Robot added the comment:
New changeset 52075f60719e by Victor Stinner in branch 'default':
Issuse #17932: Fix an integer overflow issue on Windows 64-bit in tuple
http://hg.python.org/cpython/rev/52075f60719e
--
___
Python tracker
Roundup Robot added the comment:
New changeset 93f4b32fc95c by Victor Stinner in branch 'default':
Issue #9566: Fix a compiler warning on Windows 64-bit in namespace_init()
http://hg.python.org/cpython/rev/93f4b32fc95c
--
___
Python tracker
Roundup Robot added the comment:
New changeset 5dcbd5d8d004 by Victor Stinner in branch 'default':
Issue #9566: Fix compiler warning on Windows 64-bit
http://hg.python.org/cpython/rev/5dcbd5d8d004
New changeset 41b8be55b160 by Victor Stinner in branch 'default':
Issue #9566: Fix compiler
STINNER Victor added the comment:
AMD64 Windows7 SP1 3.x buildbot is crashing in test_marshal. It looks like a
regression introduced by the changeset aff41a6421c2:
[ 88/375] test_marshal
Traceback (most recent call last):
File ../lib/test/regrtest.py, line 1611, in module
Giampaolo Rodola' added the comment:
Changes to Doc/library/asyncore.rst should be reverted.
Also I would do:
- asynchat.async_chat.__init__(self, conn, map)
+ asynchat.async_chat.__init__(self, conn, map=map)
--
___
Python tracker
Roundup Robot added the comment:
New changeset f431cd0edd85 by Victor Stinner in branch 'default':
Issue #13772: Fix compiler warnings on Windows
http://hg.python.org/cpython/rev/f431cd0edd85
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset c351591f1f63 by Victor Stinner in branch 'default':
Issue #13772: fix _check_dirA(): call *A() functions, not *W() functions
http://hg.python.org/cpython/rev/c351591f1f63
--
___
Python tracker
STINNER Victor added the comment:
@Jason R. Coombs: Can you please review my following commit? It looks like you
made a copy/paste failure in _check_dirA() :-)
New changeset c351591f1f63 by Victor Stinner in branch 'default':
Issue #13772: fix _check_dirA(): call *A() functions, not *W()
Amaury Forgeot d'Arc added the comment:
Hum, a stack overflow?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17206
___
___
Python-bugs-list
New submission from STINNER Victor:
format(1.2, .%sf % (2**32 + 2)) returns 1.20: the integer overflow is not
catced.
Attached patch fixes the issue.
--
components: Interpreter Core
files: float_format_precision.patch
keywords: patch
messages: 190629
nosy: haypo, mark.dickinson
Roundup Robot added the comment:
New changeset 36c35a1893fe by Victor Stinner in branch 'default':
Issue #9566: Fix compiler warning on Windows 64-bit
http://hg.python.org/cpython/rev/36c35a1893fe
New changeset 88a21c5a97ef by Victor Stinner in branch 'default':
Issue #9566: Fix compiler
Jason R. Coombs added the comment:
@Victor Stinner
Thanks for fixing this. You're absolutely right.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13772
___
Roundup Robot added the comment:
New changeset e024236ea253 by Victor Stinner in branch 'default':
Issue #13772: Fix a compiler warning on Windows
http://hg.python.org/cpython/rev/e024236ea253
New changeset d9f3ea27f826 by Victor Stinner in branch 'default':
Issue #13772: Mark helper functions
Roundup Robot added the comment:
New changeset c8212fca8747 by Victor Stinner in branch 'default':
Issue #13772: Use syntax for literal wchar_t character
http://hg.python.org/cpython/rev/c8212fca8747
--
___
Python tracker rep...@bugs.python.org
Terry J. Reedy added the comment:
I am still confused about the master/parent business and why required args are
documented as optional. (Besides #18131, I also discovered that messageboxes
usually, but not always, require parent=something passed, to be collected into
**options. I need to
Changes by STINNER Victor victor.stin...@gmail.com:
--
title: str==str: compare the first and last character before calling memcmp()
- str==str: compare the first character before calling memcmp()
___
Python tracker rep...@bugs.python.org
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18129
___
___
Python-bugs-list
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17991
___
___
Python-bugs-list
Terry J. Reedy added the comment:
After searching through tkinter.py for '_default_root', the patch looks better.
The point I missed before is that Tk().__init__(self,...) normally calls
_loadtk(self) which installs self as _default_tk if it was None before. So the
new function will return
Terry J. Reedy added the comment:
Thanks Ned. I commented on the issue. The code in the proposed function will
fix one of the two problems with tkinter.Variable that I noted in #18131. I can
imagine there might be situations in which it would also be useful for testing,
as GP claims.
New submission from Christian Heimes:
The patch implements an add_cert(pem_or_der_data) method for the
ssl.SSLContext() object. On success the method adds a trusted CA cert to the
context's internal cert store. The CA certificate can either be an ASCII
unicode string (PEM format) or buffer
R. David Murray added the comment:
This is a duplicate of issue 10876. According to that issue it is a bug in the
zipfile format.
--
nosy: +r.david.murray
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - Zipfile sometimes considers a false
Eric Snow added the comment:
Here's one solution to the deletion-during-iteration problem. It makes the
iterators track the key rather than the node, at the expense of a sliver of
speed on __iter__() and keys().
--
Added file:
Eric Snow added the comment:
The concern about reference cycles here lies in their existence in the
linked-list. To see what I mean, check out the use of weakrefs in the pure
Python implementation at Lib/collections/__init__.py. As the current
implementation does not use PyObjects for the
Changes by Nick Coghlan ncogh...@gmail.com:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11470
___
___
Python-bugs-list
New submission from Kiran Bandla:
This issue is in message.py in the email module. The add_header method should
insert the new header on the top of the existing headers. The current function
implementation appends the header at the end of the existing headers.
--
components: Library
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18135
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18137
___
___
Nick Coghlan added the comment:
I don't believe it is reasonable to change the behaviour of partial at this
late stage of the game. It's documented as behaving like staticmethod (albeit
by not implementing the descriptor protocol at all), so that's no longer
something we can change. If issue
67 matches
Mail list logo