Daniel Stutzbach added the comment:
In my case, each thread launches a CPU-intensive process via subprocess, then
waits for it to report output and exit.
Also, keep in mind that PyPy and IronPython don't have a GIL (although I'm not
a PyPy or IronPython u
New submission from Daniel Stutzbach :
ProcessPoolExecutor allows the max_workers parameter to the constructor to be
omitted or None, in which case it will set the max_workers based on the number
of CPUs.
It would be nice if ThreadPoolExecutor's constructor worked the same way;
havin
Daniel Stutzbach added the comment:
That fixes the example code, but what about the numerous text that reads
"strings" that should read "byte sequences", "bytes", or similar?
--
___
Python tracker
<
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue10099>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Daniel Stutzbach :
fromfd is marked as Availability: Unix, but in Python 3 it is also available on
Windows:
C:\>c:\python31\python.exe
Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", &qu
Daniel Stutzbach added the comment:
Hirokazu, could you run Python in a debugger and figure out exactly which line
crashes and what the error is? I'm curious.
If we make this change, the same change should be applied to RegEnumKey, etc.,
since the RegEnumKey docs contain similar lan
Daniel Stutzbach added the comment:
> Daniel, we need to sync-up on the meaning of marking a report as
> "accepted". Traditionally it denotes an approved patch, not a agreement >
> that the bug is valid.
Woops! Thanks for the correction. For what it's worth, a q
Daniel Stutzbach added the comment:
Hello Simon,
Accessing an arbitrary element of a deque takes O(n) time, making your .index
implementation O(n**2).
If you describe the kinds of operations that you need to perform efficiently,
we may be able to suggest a better data structure for you to
Daniel Stutzbach added the comment:
> I don't think arbitrary comparisons of pointers give well-defined
> results, unless those pointers both happen to point into the same
> array. (Might be wrong; I don't have a copy of the C standard to
> hand.)
Technically arbitrary
Daniel Stutzbach added the comment:
> I suggest removing the "equivalent to" code from the zip section and
> replacing it with an example showing how to use zip with a for loop
> similar to the example illustrating enumerate.
+1
--
___
Daniel Stutzbach added the comment:
How does performance change if you adjust NSMALLPOSINTS and NSMALLNEGINTS, but
make no other changes?
--
___
Python tracker
<http://bugs.python.org/issue10
Daniel Stutzbach added the comment:
The code was taken from the itertools.izip documentation for Python 2, where it
did work.
In Python 2, next() raises StopIteration which is propagated up and causes the
izip() to stop. In Python 3, map is itself a generator and the StopIteration
Daniel Stutzbach added the comment:
I did some spelunking. Guido committed the similar optimization in r8306.
The diff is at:
http://svn.python.org/view/python/trunk/Python/ceval.c?r1=8087&r2=8306
His commit message was:
Huge speedup by inlining some common integer operat
Daniel Stutzbach added the comment:
For what it's worth, a similar fast path existed in Python 2 for lists (but not
tuples). It was removed for Python 3. I'm not sure why it was removed, but it
may have been part of removing the PyInt type.
--
nosy:
Daniel Stutzbach added the comment:
Since I noticed the bug through source code inspection and no one has reported
it occurring in practice, that sounds reasonable to me.
--
versions: -Python 2.7
___
Python tracker
<http://bugs.python.
Daniel Stutzbach added the comment:
Thanks for working on this!
Since this was a bugfix, it should be merged back into 2.7, yes?
--
stage: unit test needed -> committed/rejected
___
Python tracker
<http://bugs.python.org/iss
Daniel Stutzbach added the comment:
> You can tweak the Windows pyconfig.h to use UCS4, AFAIK, if you want to
> test drive this case.
I seem to recall seeing some other code that assumed Windows implied UCS2.
Proceed with caution. ;-)
> But it's probably easier to confi
Daniel Stutzbach added the comment:
I, too, can't think of any platforms where Py_UNICODE_SIZE == 4 &&
SIZEOF_WCHAR_T == 2 and I'm not sure what the previous policy has been. Have
you noticed any other code that would set a precedent?
If no one else chimes in, perhaps as
Daniel Stutzbach added the comment:
Could be. FWIW, I had tested and observed the problem on a 32-bit Intel
Windows box and 64-bit Intel Linux box.
--
___
Python tracker
<http://bugs.python.org/issue9
New submission from Daniel Stutzbach :
The following program should print "0xdead" but instead prints "0x0". This
came from the following stackoverflow question:
http://stackoverflow.com/questions/3824617/python-structure-always-stuck-at-0-no-matter-what-value-you-assign-
Changes by Daniel Stutzbach :
--
nosy: +ezio.melotti, lemburg
___
Python tracker
<http://bugs.python.org/issue9979>
___
___
Python-bugs-list mailing list
Unsub
Daniel Stutzbach added the comment:
I know enough about Unicode to have reported this bug, but I don't feel
knowledgeable enough about Python's Unicode implementation to comment on your
suggested solution.
I'm adding the other people listed in Misc/maintainers.rst as interes
New submission from Daniel Stutzbach :
The readinto() method is intended to offer better performance than read() by
allowing the caller to read into a preallocated buffer rather than constantly
allocate and deallocate buffers.
However, bufferediobase_readinto() calls read(), so the extra
New submission from Daniel Stutzbach :
In Lib/ntpath.py:
# realpath is a no-op on systems without islink support
realpath = abspath
However, Windows Vista and newer support symbolic links and other Python
methods support them.
(noticed this through source code inspection; haven't act
Daniel Stutzbach added the comment:
> what about adding a simple "random.seed(12345)"
That's an excellent suggestion! In fact, I'm embarrassed that it never
occurred to me (especially since I have used it in other projects).
I will have a revised speed_test al
Daniel Stutzbach added the comment:
> Does this help any?
No :-)
The problem is that the random data you run in interpreter 1 won't be the same
data you run in interpreter 2, so the results are not directly comparable. One
of the sets of random data may be more easily sortable
Daniel Stutzbach added the comment:
> Since the patch is intended to speed up 3.2 and your posted
> experiments were run on that, I am puzzled that you would post a
> test script to run under late 2.x instead of 3.1+.
I had originally written the test script was originally wr
Daniel Stutzbach added the comment:
> I thought it might be useful for third-party libraries, or even
> non-testing situations
That might be true, but I prefer that we give code a more vigorous exercise
before putting it in the standard library proper. When we try to use it for
som
Daniel Stutzbach added the comment:
Another option would be to have the read-end act like a non-blocking socket
(i.e., raise EAGAIN).
Since it would mostly be for testing, would it make more sense to add it to
test.support or someplace similar instead of io
Daniel Stutzbach added the comment:
> Simply buffer everything.
That works for when a write operation would block. What would it do when a
read operation would block?
--
___
Python tracker
<http://bugs.python.org/iss
Daniel Stutzbach added the comment:
> It would be a non-seekable in-memory bytes buffer with distinct
> read and write pointers, so as to act like a system FIFO or a
> socket.makefile() object.
What would it do when the equivalent system FIFO object would block?
> (you may poin
Daniel Stutzbach added the comment:
Attached is my script for running a more comprehensive battery of speed tests.
The script itself requires Python 2.6 with argparse installed or Python 2.7
(which includes argparse).
For obvious reasons, please make sure that your unpatched and patched
Daniel Stutzbach added the comment:
Antoine said:
> I don't think there's any point in micro-optimizations such as
> stack_keys.
Good point. I'll try taking that out and see how it impacts the timing.
Raymond said:
> The memmove, memcpy functions are tricky to
Daniel Stutzbach added the comment:
Committed in r84961
--
stage: patch review -> committed/rejected
status: open -> closed
type: -> behavior
versions: -Python 3.3
___
Python tracker
<http://bugs.python.o
New submission from Daniel Stutzbach :
(I've made an educated guess about who to add to the Nosy list)
The attached patch substantially speeds up sorting using the "key" parameter.
It is purely a performance patch; the language and libraries are not changed in
any other way
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue9886>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Stutzbach added the comment:
> Hmm, none the less other code expects it.
Does that imply that there's some code that will break on FileIO objects that
are created using a file descriptor instead of a filename? If so, where?
--
__
Daniel Stutzbach added the comment:
Roundup does not play well with Gmail when Gmail is in Rich Format mode ;-)
That example should have read:
>>> f = io.FileIO(1)
>>> f.name
1
--
___
Python tracker
<http://bugs
Changes by Daniel Stutzbach :
Removed file: http://bugs.python.org/file18890/unnamed
___
Python tracker
<http://bugs.python.org/issue9858>
___
___
Python-bugs-list mailin
Daniel Stutzbach added the comment:
On Wed, Sep 15, 2010 at 10:51 AM, Benjamin Peterson
wrote:
> I'm not sure if this pickling stuff matters as long as they both pickle.
>
I'm not sure either. Do other Python implementations try to maintain a
compatible pickle format with CP
Daniel Stutzbach added the comment:
> These attributes exist; they're just not properties.
Yes, I see. They're added to the instance in the constructor, so they don't
exist as attributes of the class. Also in that category:
BlockingIOError python is missing: ['cha
Daniel Stutzbach added the comment:
Yes, exactly. :-)
(see also Issue9731, which has a similar flavor)
--
___
Python tracker
<http://bugs.python.org/issue9
Daniel Stutzbach added the comment:
FWIW, I just opened Issue9859: Add tests to verify API match of modules with 2
implementations.
--
___
Python tracker
<http://bugs.python.org/issue9
New submission from Daniel Stutzbach :
Recently it came to light that the classes in C and Python implementations of
the io module have slightly different attributes (issue9858). I propose the
addition of a helper function in Lib/test/support.py to verify that the classes
in two different
Daniel Stutzbach added the comment:
Attached is a script to find all of the mismatches between the C and Python
implementations. There are several. Below is the output:
RawIOBase C is missing: ['readinto', 'write']
StringIO C is missing: ['name']
StringIO pyt
Changes by Daniel Stutzbach :
--
stage: patch review -> committed/rejected
status: open -> closed
versions: -Python 2.7, Python 3.1
___
Python tracker
<http://bugs.python.org/
Daniel Stutzbach added the comment:
Sounds reasonable to me. I'll close this and the related 9212 (both fixes are
already committed to the py3k branch).
--
stage: patch review -> committed/rejected
status: open -> closed
___
Python tra
Daniel Stutzbach added the comment:
Fixed in r84810, r84811, and 84812.
For anyone curious, the old FAQ entry is here:
http://web.archive.org/web/20010203161100/http://www.python.org/doc/FAQ.html#3.24
--
resolution: -> accepted
stage: needs patch -> committed/rejected
status
Daniel Stutzbach added the comment:
Nevermind... archive.org has it. :-)
--
___
Python tracker
<http://bugs.python.org/issue9728>
___
___
Python-bugs-list mailin
Daniel Stutzbach added the comment:
It looks like the FAQ used be generated using Tools/faqwiz/faqwiz.py (which no
longer exists). According to that file:
---
This is a CGI program that maintains a user-editable FAQ. It
Daniel Stutzbach added the comment:
Where does/did the FAQ live in the version control tree?
--
___
Python tracker
<http://bugs.python.org/issue9728>
___
___
Daniel Stutzbach added the comment:
Committed as r84791.
Question: should this bugfix be backported to Python 3.1 and to xrange objects
in Python 2.7? Since it's a bugfix that adds new methods, it's a gray-area.
(same question applies to the closely related I
Daniel Stutzbach added the comment:
Thanks, Georg, for prodding. As a new committer, I have possibly been erring a
little too far on the side of having my patches thoroughly reviewed before
committing.
I'll commit the patch on Monday if no one raises objections (after re-testing,
of c
Daniel Stutzbach added the comment:
Committed as r84659. Thanks for the patch!
--
stage: patch review -> committed/rejected
status: open -> closed
type: -> compile error
___
Python tracker
<http://bugs.python.o
Changes by Daniel Stutzbach :
--
nosy: +georg.brandl
stage: -> patch review
___
Python tracker
<http://bugs.python.org/issue9609>
___
___
Python-bugs-list mai
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue9609>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Stutzbach added the comment:
As far as I can tell, _mkdir(name) is equivalent to CreateDirectoryA(name,
NULL), except one uses errno and the other uses GetLastErrno. It is definitely
possible that there's something I don't know, though, and the documentation
doesn't e
Daniel Stutzbach added the comment:
Ned, thanks for bringing that to my attention. I might have missed it
otherwise.
I had run "autoconf" but had not known to run "autoreconf", so I had missed the
failure there. *embarrassed*
Benjamin, thanks for fixing my err
Daniel Stutzbach added the comment:
Attached is a slightly improved patch. It cleans up some whitespace issues
with James's patch and filters out *_d.pdb files if they exist. I tested it on
my system and it correctly produces a .zip file containing the .pdb files, next
to the .msi
New submission from Daniel Stutzbach :
Tools/buildbot/external-common.bat creates tcl-8.5.2.1, but Tools/msi/msi.py
looks for tcl8*. Consequently, Tools/buildbot/buildmsi.py does not work on a
fresh machine.
tk has the same problem.
I encountered this on the py3k branch but have not checked
New submission from Daniel Stutzbach :
external.bat and external-common.bat take care of downloading most external
packages such as tcl, tk, and openssl. However, the tix package is missing,
but needed to build the msi.
--
components: Build, Windows
messages: 115503
nosy: loewis
Daniel Stutzbach added the comment:
I agree that my original name proposal is terrible. :-) method_check and
verify_full_api both look fine to me.
> If all collection registrations were bundled together in
> collections.py, I think I would expect the tests to be in
> test_collect
Daniel Stutzbach added the comment:
Thanks, Antoine. Those are all good suggestions. Attached is an updated patch.
Marc-Andre, Martin: would you like to look this over as well?
--
Added file: http://bugs.python.org/file18730/unicode-3.patch
Daniel Stutzbach added the comment:
Thanks! Updated as you suggested and committed as r84450 and r84451.
--
keywords: -needs review
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.p
Changes by Daniel Stutzbach :
Added file: http://bugs.python.org/file18724/issue9753.patch
___
Python tracker
<http://bugs.python.org/issue9753>
___
___
Python-bugs-list m
Daniel Stutzbach added the comment:
Following the advice of DuplicateHandle's documentation, I reimplemented dup on
Windows using WSADuplicateHandle. Attached is a patch. With the patch, the
tests pass on my Windows machine.
Would someone like to review the patch?
--
ass
Daniel Stutzbach added the comment:
On Windows, socket.dup is implemented using DuplicateHandle. The documentation
for DuplicateHandle reads:
You should not use DuplicateHandle to duplicate handles to the following
objects:
* I/O completion ports. No error is returned, but the
Daniel Stutzbach added the comment:
I run it the same way.
I wonder what's different? :-( I will try to find some time to investigate
further.
--
___
Python tracker
<http://bugs.python.org/i
Daniel Stutzbach added the comment:
I just noticed that the previous "new" patch I uploaded was actually my
original patch. Oops. Anyway...
In a discussion on the capi list, a few people objected to compiling in
Unicode-agnostic mode by default (e.g., it would be annoying
New submission from Daniel Stutzbach :
The errors below show up on my XP machine in Python 3.1 as well as a recent
build from the py3k branch. I'm not sure why they *don't* show up on the XP
buildbot.
fromfd() ultimately calls dup(), so the underlying problem is likely the same
f
New submission from Daniel Stutzbach :
7>..\Python\import.c(1158) : warning C4013: 'mkdir' undefined; assuming extern
returning int
--
assignee: stutzbach
components: Interpreter Core, Windows
keywords: easy
messages: 115428
nosy: stutzbach
priority: low
severity: normal
New submission from Daniel Stutzbach :
In the list of operations supported by all sequence types, the .index and
.count methods should be included. They are defined by the
collections.Sequence ABC that all sequences support.
(except for range objects, but that will be fixed in Issue9213
Daniel Stutzbach added the comment:
Thank you for the patch.
The patch doesn't handle the case where the object being searched for is
!PyLong_CheckExact. For example, the user might pass in a sub-type of int.
The existing range_contains supports that case, so it seems like we s
Daniel Stutzbach added the comment:
Also, credited Daniel Urban for the patch in r84436 (forgot that the first time
around -- sorry!).
--
___
Python tracker
<http://bugs.python.org/issue9
Daniel Stutzbach added the comment:
Meant to add:
I made some relatively minor changes to Daniel Urban's patch. Mostly, I
rearranged the order of a few things to avoid unnecessary work (e.g., only
compute "len_other" if we've already checked that "other" is a s
Daniel Stutzbach added the comment:
Committed to py3k in r84435. Raymond, do you want to look the commit over
before I merge it into 3.1 and 2.7?
--
___
Python tracker
<http://bugs.python.org/issue9
Daniel Stutzbach added the comment:
> The operator methods in setobject.c should be liberalized to accept
> instances of collections.Set as arguments.
Under this plan, set() and collections.Set will still have slightly different
behavior. collections.Set will be more liberal and acce
Daniel Stutzbach added the comment:
Well, I grant you that it's a bit of scope-creep, and if you want to reject it
on those grounds I can't blame you.
To me it seems like a relatively small change that would greatly help people
like myself who want to update older code so that i
Daniel Stutzbach added the comment:
Excluding the future fixer would only get me half of the way there. I would
still need to add "from __future__ import print_statement" to all of my scripts
if I want them to continue to work under 2.6.
(Well, for me personally, I have already do
Daniel Stutzbach added the comment:
Since this issue doesn't apply in Python 3 and (as I understand it) the 2.7
branch is only open to bug fixes, can we close this performance issue?
--
nosy: +stutzbach
___
Python tracker
<http://bugs.py
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue2690>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue1569291>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue9155>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue2459>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue8425>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Daniel Stutzbach :
--
nosy: +stutzbach
___
Python tracker
<http://bugs.python.org/issue8685>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Stutzbach added the comment:
I will aim to spend some time with this (and the similar Issue #9213) today
and/or tomorrow, so that it can be committed in time for 3.2a2.
--
resolution: -> accepted
stage: unit test needed -> patch
Daniel Stutzbach added the comment:
Re-opening and re-titling the issue to that effect.
Proposed syntax and usage:
# in Lib/abc.py
class ABCMeta(type):
# ...
def has_methods(cls, subclass):
"Returns True iff subclass implements the appropriate methods"
#
Daniel Stutzbach added the comment:
Would it be useful to provide a separate function to perform the check, which
could be used by lint-style tools as well as automated tests?
It would be great if every call to .register in the standard library had a
corresponding test that verified that the
New submission from Daniel Stutzbach :
In Issue 9212, I mused:
> I sort of wonder if .register() should verify that the concrete class
> provides all of the methods of the ABC.
Éric Araujo suggested I open that as an issue for consideration.
I have found a few bugs in the standard l
Daniel Stutzbach added the comment:
Raymond, do you agree with Ray's analysis?
--
___
Python tracker
<http://bugs.python.org/issue8743>
___
___
Python-bugs-l
Daniel Stutzbach added the comment:
As most of the code in this patch was copied from EnumValue and EnumKey, it
includes bugs from those functions that have since been fixed. I'm thinking of
Issue #2810, although there might have been other changes.
Instead of duplicating code, it wou
Daniel Stutzbach added the comment:
The example can be fixed by placing a "b" before the two string literals.
However, pretty much the whole document refers to "strings" and should refer to
"byte sequences" or the "bytes" type.
I thought there
New submission from Daniel Stutzbach :
In Doc/extending/windows.rst, there's the following text:
If your module creates a new type, you may have trouble with this line::
PyVarObject_HEAD_INIT(&PyType_Type, 0
Daniel Stutzbach added the comment:
I don't think I'm familiar enough with 2to3's pattern-matching syntax to write
a good patch.
Here's a rough outline for how a patch would work. There are two cases:
1) When there is already a "from __future__ import". Cur
Daniel Stutzbach added the comment:
Fixed in r84380 and r84382.
--
keywords: -needs review
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.org
Daniel Stutzbach added the comment:
Committed in r84379
--
keywords: -needs review
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Daniel Stutzbach added the comment:
I opened a separate issue for the SIZEOF_WCHAR_T issue so I could refer to that
issue number in Misc/NEWS. Fixed in r84317.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/iss
Daniel Stutzbach added the comment:
After making a Windows build and running the tests, committed in r84317.
--
resolution: -> accepted
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Changes by Daniel Stutzbach :
--
dependencies: +PC/pyconfig.h should define SIZEOF_WCHAR_T
___
Python tracker
<http://bugs.python.org/issue8781>
___
___
Python-bug
101 - 200 of 469 matches
Mail list logo