Ben Hoyt added the comment:
Raymond, there are very compelling timings/benchmarks for this -- not so much
the original issue here (generator vs list, that's not really an issue) but
having a scandir() function that returns the stat-like info from the OS so you
don't need extra
Ben Hoyt added the comment:
Thanks! Will post the PEP to python-dev in the next day or two.
--
___
Python tracker
<http://bugs.python.org/issue11406>
___
___
Pytho
Ben Hoyt added the comment:
Nick -- sorry, already posted to python-dev before seeing your latest. However,
I think it's the right place, as there's already been a fair bit of hashing
this idea and API out on python-ideas first and then also python-dev. See links
in the PEP
New submission from Ben Lucato:
I am wondering if it is at all on the roadmap to bundle a C compiler with
Python on Windows, given that installing libraries with C extensions is very
confusing on Windows.
For example, to install NumPy on Windows you end up either having to download
the right
Ben Hoyt added the comment:
Mark, are you referring to part 3 of this issue, the image/pjpeg type of
problem? This was fixed in Python 2.7.6 -- see changeset
http://hg.python.org/cpython/rev/e8cead08c556 and
http://bugs.python.org/issue15207
Ben Darnell added the comment:
Looks good to me. I've added exarkun and glyph to the nosy list since
Twisted's experience with PyOpenSSL may provide useful feedback even though
Twisted will presumably stick with what they've got instead of switching to
this new interface.
New submission from Ben Roberts:
In python 3.4 these result in a TypeError:
hash({}.keys())
hash({}.items())
But this succeeds:
hash({}.values())
The 2.7 backports of these - viewkeys, viewitems, and viewvalues respectively -
behave equivalently.
See more discussion on StackOverflow
Ben Roberts added the comment:
I have a patch with tests for this (running the test suite now) but I am
increasingly unsure if python isn't doing the right thing already.
Intuitively, it "feels" wrong (to me) to allow a dict_values view to be
hashable since the mapping onto wh
Changes by Ben Roberts :
--
nosy: +roippi
___
Python tracker
<http://bugs.python.org/issue2527>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Roberts added the comment:
Attached is a patch that adds a 'global' kwarg to the Timeit constructor, which
does pretty much what it says on the tin: specifies a global namespace that
exec() will use.
I originally had a 'locals' arg as well (to mirror the signature
Ben Roberts added the comment:
Correction, the name of the argument is 'globals', not 'global'.
--
___
Python tracker
<http://bugs.python.org/issue2527>
___
Ben Roberts added the comment:
I did sign one right after I submitted the patch. Takes a few days for the
asterisks to propagate I guess :)
--
___
Python tracker
<http://bugs.python.org/issue2
Ben Roberts added the comment:
Ah yes.
New patch improves the docs.
--
Added file: http://bugs.python.org/file36432/timeit_global_arg_v2.patch
___
Python tracker
<http://bugs.python.org/issue2
Ben Roberts added the comment:
Thanks Antoine. Cheers :-)
--
___
Python tracker
<http://bugs.python.org/issue2527>
___
___
Python-bugs-list mailing list
Unsub
New submission from Ben Rodrigue:
Small typo:
In the documentation for the random module. The documentation refers to the
semi-open range and then gives an example using a left bracket and then a
curved parenthesis on the right.
Link to page:https://docs.python.org/3.4/library/random.html
Ben Hoyt added the comment:
I really like this idea (and am needing this functionality), but I don't think
this API (or implementation) is very nice:
1) It means you have to change your function signature to use the timeout
feature.
2) Specifying the interval in minutes seems odd
Ben Roberts added the comment:
Going to close this down - implementing rich comparisons for values() does feel
like the correct solution... but I don't think it's possible to implement
__eq__ in better than nlogn time (and possibly space).
So nothing can realistically be
Ben Roberts added the comment:
' '.join(shlex.quote(x) for x in split_command)
--
nosy: +roippi
___
Python tracker
<http://bugs.python.org/issue22454>
___
__
Ben Roberts added the comment:
For the record I am on board with a shlex.join. Even though the implementation
is simple:
- It is not obvious to many users if there are any "gotchas" by doing a '
'.join yourself, /even if/ you know that strings with spaces in them n
Ben Roberts added the comment:
> The major issue (there are other issues as well but not so difficult) is
> whether nlargest and nsmallest should support iterator that could be endless
> iterator or reject it (by checking __len__ attribute) straight away.
Well, failing with an except
Ben Roberts added the comment:
Attached patch fixes the tests.
--
Added file: http://bugs.python.org/file36683/fix_heapq_tests.patch
___
Python tracker
<http://bugs.python.org/issue19
Ben Hoyt added the comment:
Yes, PEP 471 has been accepted, and I've got a mostly-finished C implementation
of os.scandir() for CPython 3.5, as well as tests and docs. If you want a sneak
preview, see posixmodule_scandir*.c, test/test_scandir.py, and os.rst here:
https://github.com/be
New submission from Ben Hoyt:
Opening this to track the implementation of PEP 471: os.scandir() [1]. This
supercedes Issue #11406 (and possibly others)?
The implementation is most of the way there, but not yet done as a CPythono 3.5
patch. Before I have a proper patch, it's availab
Ben Hoyt added the comment:
Okay, I've opened http://bugs.python.org/issue22524, but I don't have the
permissions to close this one, so could someone with bugs.python.org
superpowers please do that?
--
___
Python tracker
<http://bu
Ben Roberts added the comment:
Any thoughts/reviews on the patch?
--
___
Python tracker
<http://bugs.python.org/issue19119>
___
___
Python-bugs-list mailin
Ben Roberts added the comment:
That is one approach, of course, but imo pretty incomplete. A test that is
named "test_get_only" presumably would be expected to test __getitem__, not
__cmp__. Confusingly there is still a GetOnly item declared in the module, but
it is not used.
Ben Hoyt added the comment:
Attaching my first patch here. It includes docs, the implementation of scandir
and DirEntry in posixmodule.c, and tests in test_scandir.py. It does not yet
include the changes for os.walk() to use scandir; I'm hoping to do that in a
separate patch for easier
Ben Hoyt added the comment:
Thanks for the initial response and code review, Victor. I'll take a look and
respond further in the next few days.
In the meantime, however, I'm definitely open to splitting scandir out into its
own C file. This will mean a little refactoring (m
Ben Hoyt added the comment:
Here are the actual numbers (instead of just from memory) running on my Windows
laptop, which happens to have an SSD drive, so os.walk() with scandir is
particularly good here.
python 3.4: benchmark.py -c python (all implemented in Python using ctypes):
os.walk
Changes by Ben Alpert :
--
nosy: +spicyj
___
Python tracker
<http://bugs.python.org/issue20353>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ben Hoyt :
--
nosy: +benhoyt
type: behavior -> feature request
___
Python tracker
<http://bugs.python.org/issue6689>
___
___
Python-bugs-list mai
Ben Hoyt added the comment:
Oops, didn't intend to change the type, changing back.
--
type: feature request -> behavior
___
Python tracker
<http://bugs.python.or
Changes by Ben Bangert :
--
nosy: +bbangert
___
Python tracker
<http://bugs.python.org/issue6990>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ben Bass :
Many applications would benefit from 'connectionless' queues, i.e. they
don't want to care whether anything is reading from the other end.
Using current queue module classes this is not practical, because there
is a choice between unbounded mem
Ben Bass added the comment:
'connectionless' is from how I see it as an analogy with UDP (vs TCP);
why not just use a deque is primarily about having the same API - a
client (getter) of the queue shouldn't know or care whether it is a
'lossy' queue or a normal queue
Ben Standefer added the comment:
Here is one work-around. The default smtplib.SMTP.login() doesn't work
for StrongMail out of the box.
http://www.harelmalka.com/?p=94&cpage=1
--
nosy: +aguynamedben
___
Python tracker
<http://bug
New submission from Ben Gertzfield :
The undocumented (but unit tested!) pipes.quote does not correctly
escape '!', which cannot be passed to the shell outside of single-
quotes:
sh-3.2$ python
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on d
New submission from Ben Kaplan :
Comes from this thread on comp.lang.python:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/e15915df2e9cdd9/
The Makefile for distutils in the Mac binary for Python 3.1 specifies
the use of the OS X 10.4u SDK. However, XCode only includes
Ben Kaplan added the comment:
The issue here isn't with Macports (which doesn't do a universal build
by default). It's with the installer on python.org which is also a
universal binary.
Macports has the advantage of knowing which OS version it's being
compiled on so it s
Ben Decker added the comment:
Our next target will probably be somewhere with Python 3
--
components: +Interpreter Core -None
versions: +Python 3.1 -Python 2.4
___
Python tracker
<http://bugs.python.org/issue1351
New submission from Ben North :
The current documentation for tarfile.TarFile.extractfile() does not
mention that the returned 'file-like object' supports close() and also
iteration. The attached patch (against svn trunk) fixes this.
(Background: I was wondering whether I could wr
Changes by Ben Gamari :
--
nosy: +bgamari
___
Python tracker
<http://bugs.python.org/issue1555842>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Ben Gamari :
--
nosy: +bgamari
___
Python tracker
<http://bugs.python.org/issue1685453>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Gamari added the comment:
What is the status of this?
--
nosy: +bgamari
___
Python tracker
<http://bugs.python.org/issue1368247>
___
___
Python-bugs-list m
Ben Gamari added the comment:
Has this patch been merged yet?
--
nosy: +bgamari
___
Python tracker
<http://bugs.python.org/issue4487>
___
___
Python-bugs-list m
Ben Anhalt added the comment:
Actually, I was just bit by this. In fact, RFC 2965 prohibits clients
from sending $Port if the port attribute was not included in the
Set-Cookie header. But, it turns out that the mono System.Net library
(at least) will add the attribute any time the URI includes
Ben Anhalt added the comment:
Grrr, the link in my last comment should have been
http://www.nabble.com/System.Net.CookieContainer-adding-inappropriate-%24Port-attribute-to-cookies--td23752882ef1367.html
Yuck.
--
___
Python tracker
<h
Ben Longbons added the comment:
This is a duplicate of bug 25596, which is now fixed.
--
nosy: +o11c
___
Python tracker
<http://bugs.python.org/issue19
New submission from Ben Longbons:
Background:
I have a data hierarchy with a lot of "sibling" symlinked directories/files. I
want to glob only the non-symlink files, because it's a *huge* performance
increase.
Before `os.scandir`, I was using a local copy of `glob.
Ben Hoyt added the comment:
Good call. Additionally, it's weird to me that the docstring for str.find()
says "Return -1 on failure." because the string not being found is not a
"failure". Like the docs
(https://docs.python.org/3.5/library/stdtypes.html#str.find) say,
Ben Hoyt added the comment:
I agree with the confusion (PR proposes separators=COMPACT, issue compact=True).
I like the concept but not either of the APIs proposed. I *much* more often
want to get pretty output -- if I had a dime for every time I've written
"json.dumps(obj, sort
Changes by Ben Hoyt :
--
nosy: +benhoyt
___
Python tracker
<http://bugs.python.org/issue28609>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Hoyt added the comment:
I definitely agree with Reuben here -- I just ran into this issue while
creating a "production quality" tool, and the help message produced by argparse
with nargs='*' confused me too. It's pretty clear that this is a simple bug in
argp
Ben Finney added the comment:
On 27-May-2016, Nathan Harold wrote:
>
> Split version (cleandoc2.patch):
>
>Clean up indentation from docstrings that are indented to line up
>with blocks of code.
>
>All leading whitespace is removed from the first l
New submission from Ben Kane:
On page https://docs.python.org/3/library/subprocess.html#replacing-os-system
it looks like the code in the realistic example has a spurious '-' sign.
The line:
print("Child was terminated by signal", -retcode, file=sys.stderr)
shou
Ben Kane added the comment:
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.returncode
does mention the negativeness about returncode in conjunction with POSIX
signals. It would be helpful to mention this Python-specific (I think) behavior
in a comment.
However, returncode
New submission from Ben Hoyt:
In the official tutorial in the "User-defined Exceptions" section
(https://docs.python.org/3.5/tutorial/errors.html#user-defined-exceptions)
there's a note about a user-defined Exception subclass as follows:
"In this example, the default __i
Ben Hoyt added the comment:
Note that I added the committers from issue 1692335 to the Nosy List --
probably overzealous and probably not the folks who maintain the docs, but oh
well. :-)
--
___
Python tracker
<http://bugs.python.org/issue27
Ben Hoyt added the comment:
Okay, patch attached -- I think it's best to simply remove that sentence.
Side note: this is why GitHub is so good -- click edit, remove the sentence,
click create pull request (approx time 30 seconds). I've got a new machine
since I last did Python devel
Ben Hoyt added the comment:
Removing that whole example sounds good to me, thanks.
--
___
Python tracker
<http://bugs.python.org/issue27719>
___
___
Python-bug
New submission from Ben Finney:
When using a format specifier with leading zero, the format spec mini-language
(as documented at
https://docs.python.org/3/library/string.html#format-specification-mini-language>)
says:
> '=' […] becomes the default when ‘0’ immediately pr
Ben Finney added the comment:
Terry Reedy wrote:
> If the spec string is still available, it could be searched and the message
> adjusted if '=' is not present. That proposal should be a new issue if
> someone wants to push it.
Done now, see Issue 27772.
--
Ben Finney added the comment:
Am I right that this:
> pydoc doesn't have public API other than its CLI and the help() function.
> […] On the other hand, there are already functions related to splitdoc()
> in the inspect module […].
> There is no rush to make splitdoc() publi
Ben Wolfson added the comment:
"My own preference is to let this quote from PEP 3101 dominate the behaviour:
"The rules for parsing an item key are very simple. If it starts with a digit,
then it is treated as a number, otherwise it is used as a string."
That means Petri'
New submission from Ben Mezger:
I am trying to parse Google's robots.txt (http://google.com/robots.txt) and it
fails when checking whether I can crawl the url /catalogs/p? (which it's
allowed) but it's returning false, according to my question on stackoverflow ->
http:/
Ben Hoyt added the comment:
Okay, I'm looking at the diff between mt-tip-noregistry.txt and
mt-tip-newregistry.txt, and I've attached a file showing the lines that are
*different* between the two, as well as the Apache mime.types value for that
file extension.
In most cases, noregi
Ben Hoyt added the comment:
I just hit this issue in a big way -- would have been nice for this fix to go
into Python 2.7.4. :-)
It was quite hard to track down (as in, a day or two of debugging :-) because
the symptoms didn't point directly to namedtuple. In our setup we
pickle/unp
Ben Darnell added the comment:
We found a related issue with Tornado:
https://github.com/facebook/tornado/pull/750
We call wrap_socket with do_handshake_on_connect=False and then call
do_handshake when the socket is ready. If the getpeername call in wrap_socket
fails with ENOTCONN because
New submission from Ben Read:
I am installing Python 3.31 on a Mac running OS 10.8.2 and have already
installed ActiveTCL 8.5.13. When I try and launch IDLE, the icon appears on the
dock for a second and then disappears and the application doesn't run. I have
already installed both Pytho
Ben Read added the comment:
Hi there,
I'm launching IDLE from Applications in Finder (double clicking the application
file).
I've tried doing this while Console is open and the response is:
28/04/2013 21:17:19.271 Dock[167]: no information back from LS about running
process
Th
Ben Read added the comment:
In response to the first command:
3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 11:07:11)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
…and the second command:
Warning: unable to create user config directory
/Users/ben/.idlerc
Check path and permissions.
Exiting
Ben Read added the comment:
I've tried this and it looks like write access is already enabled, but I
entered the commands you listed all the same - here's the output:
Bens-iMac:~ ben$ cd
Bens-iMac:~ ben$ ls -lde
drwxr-xr-x 28 temp staff 952 28 Apr 18:46 .
Bens-iMac:~ ben$ mkdi
Ben Harper added the comment:
This issue, like 14572, is also effecting Python 2.7.4 on CentOS 5. I can
confirm the patch fixes this issue on CentOS5.
--
nosy: +bharper
___
Python tracker
<http://bugs.python.org/issue17
Ben Darnell added the comment:
That proposal sounds good to me. I agree that any change here should target
3.4, not backports to older versions.
--
___
Python tracker
<http://bugs.python.org/issue13
Ben Read added the comment:
Good news - ran the sudo command, entered the password but I could still not
make the directory, but I could within Finder - this time without a password.
Tried the IDLE application again and it now works.
Thank you once again for your help in resolving this
Ben Hoyt added the comment:
Ah, this is great. I definitely like the idea of a generator version of
os.listdir(). And I like the name iterdir() -- it fits with iteritems() etc.
They've gone in 3.x, of course, but listdir didn't change to an iterator, so...
See also Betterwalk,
Ben Hoyt added the comment:
Some folks have asked about benchmarks. I don't know about iterdir() vs
listdir() -- I kind of suspect the speed gains there wouldn't be big.
However, the reason I'm keen on iterdir_stat() is that I'm seeing it speed up
os.walk() by a facto
Ben Hoyt added the comment:
2.7 fix works for me, thanks! Just curious -- why the different fix for 3.3
(addition of __getstate__ instead of removal of __dict__)?
--
___
Python tracker
<http://bugs.python.org/issue15
Ben Hoyt added the comment:
Thanks. I thought about that -- but I think I *want* to benchmark it when
they're cached, so that we're comparing apples with apples, cached system
calls with cached systems calls. The benchmark would almost certainly be a
lot "better" (BetterWalk
Ben Hoyt added the comment:
That's right: if we have a separate scandir() that returns (name, stat) tuples,
then a plain iterdir() is pretty much unnecessary -- callers just ignore the
second stat value if they don't care about it.
I'd slightly prefer the name iterdir_stat(),
Ben Hoyt added the comment:
> I find iterdir_stat() ugly :-) I like the scandir name, which has some
> precedent with POSIX.
Fair enough. I'm cool with scandir().
> scandir() cannot return (name, stat), because on POSIX, readdir() only
> returns d_name and d_type (the type
Ben Hoyt added the comment:
Yeah, I very much agree with what Nick says -- we really want a way to expose
what the platform provides. It's less important (though still the ideal), to
expose that in a platform-independent way. Today the only way to get access to
opendir/readdir on Linu
Ben Hoyt added the comment:
> A normal "caller" would never expect a stat object to be partially populated:
> if a function has a prototype returning a stat object, then I definitely
> expect it to be a regular stat object, with all the fields guaranteed by
> POSI
Ben Hoyt added the comment:
> Please bring this up on python-dev.
Good idea. Thread started:
http://mail.python.org/pipermail/python-dev/2013-May/126119.html
--
___
Python tracker
<http://bugs.python.org/issu
Ben Darnell added the comment:
I vote for enabling SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER by default. It can
catch mistakes (i.e. failure to check the return value of send) in Python just
as easily as in C, but I don't think those mistakes are common enough to be
worth the headache of
Ben Hoyt added the comment:
Thanks, Victor and Antone. I'm somewhat surprised at the 2-3x numbers you're
seeing, as I was consistently getting 4-5x in the Linux tests I did. But it
does depend quite a bit on what file system you're running, what hardware,
whether you're
Ben Hoyt added the comment:
I dunno, I'd be happy if you implement this, but it does mean *more* C code,
not less. :-) I feel this would be a nice-to-have, but we should get the thing
working first, and then do the multiple-OS-calls-in-one optimization.
In any case, if you implement th
New submission from Ben Mather:
The documentation for the `set_running_or_notify_cancel` method on
`concurrent.futures.Future` states that it will notify waiting threads and
trigger callbacks after the `Future` has been cancelled, however currently this
is done immediately by the call to
Changes by Ben Mather :
Added file: http://bugs.python.org/file36909/change-docs.patch
___
Python tracker
<http://bugs.python.org/issue22630>
___
___
Python-bugs-list m
Changes by Ben Mather :
Added file: http://bugs.python.org/file36910/change-docs-and-waiters.patch
___
Python tracker
<http://bugs.python.org/issue22630>
___
___
Pytho
Ben Hoyt added the comment:
Attaching updated patch (scandir-2.patch) per Victor's code review here:
http://bugs.python.org/review/22524/diff/13005/Modules/posixmodule.c
Note that I haven't included test_scandir.py this time, as I haven't made any
changes there, and it's
Changes by Ben Roberts :
--
nosy: +roippi
___
Python tracker
<http://bugs.python.org/issue22687>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ben Mather:
Adds `remove_done_callback` to `Future` object, removes `_waiters` attribute,
and re-implements `wait` and `as_completed` using callbacks.
This makes it possible to extend or replace `Future` without having to mimic
its private `_waiters` interface.
Currently
Ben Mather added the comment:
Have uploaded patch to re-implement `wait` and `as_completed` using callbacks.
See issue 22729. Sorry for sitting on it for so long.
--
Added file: http://bugs.python.org/file37017/non-magic-waiters.patch
___
Python
Ben Finney added the comment:
The current wording of the passage “Match objects always have a boolean value
of True” implies that the value compares equal to the ‘True’ constant. That
implication is incorrect.
I disagree with R. David Murray; if we want to say that a value is considered
true
Ben Yelsey added the comment:
Hi, could you please list more exact steps to reproduce, e.g. directory/file
layout and import statements?
--
nosy: +inlinestyle
___
Python tracker
<http://bugs.python.org/issue21
Ben Hoyt added the comment:
Akira, note the "Using slower ctypes version of scandir" -- this is the older,
ctypes implementation of scandir. On Linux, depending on file system etc, that
can often be slower. You need to at least be using the "fast C version" in
_scandir.c,
Ben Finney added the comment:
Is there room for a better resolution: fix the API so that Unicode objects are
accepted in the ‘fromlist’ items?
--
nosy: +bignose
___
Python tracker
<http://bugs.python.org/issue21
Changes by Ben Finney :
___
Python tracker
<http://bugs.python.org/issue21720>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/
New submission from Ben Finney:
In `tokenize.detect_encoding` is the following code::
first = read_or_stop()
if first.startswith(BOM_UTF8):
# …
The `read_or_stop` function is defined as::
def read_or_stop():
try:
return readline()
except
401 - 500 of 595 matches
Mail list logo