Ross Lagerwall rosslagerw...@gmail.com added the comment:
Thanks!
--
assignee: - rosslagerwall
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - behavior
___
Python tracker rep...@bugs.python.org
Martin v. Löwis mar...@v.loewis.de added the comment:
Please consider this: the code that is there was specifically added by somebody
porting Python to OS/2. So if it doesn't work for you, either OS/2 has changed
(which I don't think is the case), or you are doing something wrong (such as
Nick Coghlan ncogh...@gmail.com added the comment:
Since walkdir is currently entirely based on returning filesystem paths as
strings (just like os.walk()) and hence shares the pervasive symlink attack
vulnerability, I'm particularly interested in the question of whether or not
the various
Changes by Georg Brandl ge...@python.org:
--
assignee: - loewis
nosy: +loewis
priority: normal - high
title: bugs.python.org's Django settings file DEBUG=True -
bugs.python.org/review's Django settings file DEBUG=True
___
Python tracker
Paul McMillan p...@mcmillan.ws added the comment:
Christian Heimes added the comment:
Ouch, the startup impact is large! Have we reached a point where one size
fits all doesn't work any longer? It's getting harder to have just one
executable for 500ms scripts and server processes that last
Marc-Andre Lemburg m...@egenix.com added the comment:
Tim Peters wrote:
Tim Peters tim.pet...@gmail.com added the comment:
[Marc-Andre]
BTW: I wonder how long it's going to take before
someone figures out that our merge sort based
list.sort() is vulnerable as well... its worst-
case
Nick Coghlan ncogh...@gmail.com added the comment:
Another, possibly better, alternative would be to produce a tuple-subclass that
adds a separate dirfd attribute to the (dirpath, subdirs, files) triple.
I'll stop talking about the walkdir implications here. Instead, I've created a
Marc-Andre Lemburg m...@egenix.com added the comment:
Christian Heimes wrote:
Marc-Andre:
Have you profiled your suggestion? I'm interested in the speed implications.
My gut feeling is that your idea could be slower, since you have added more
instructions to a tight loop, that is execute
Charles-François Natali neolo...@free.fr added the comment:
I intend to commit this patch within a couple days (unless anyone objects of
course).
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12760
Matthias Klose d...@debian.org added the comment:
on linux the underlying functionality is implemented in librt; the extension
doesn't check for this or links with -lrt.
--
nosy: +doko
___
Python tracker rep...@bugs.python.org
Sandro Tosi sandro.t...@gmail.com added the comment:
Hi all, how can we fix it? or better, should we fix it? From a user POV, it is
a weird to see 3.1 doc referring to 3.2 doc as in development then clicking
on that link, being redirect to 3.3a0 doc and see there that 3.2 is stable
(with no
Changes by Terry J. Reedy tjre...@udel.edu:
--
Removed message: http://bugs.python.org/msg150848
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13703
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
Removed message: http://bugs.python.org/msg150837
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13703
___
Antoine Pitrou pit...@free.fr added the comment:
Well, the answer has probably been already given on python-dev:
I've been building Python 2.x for a while, and currently have binaries
of 2.6.5 available from http://os2ports.smedley.info
Unlike Andrew Mcintyre, I'm using libc for
Antoine Pitrou pit...@free.fr added the comment:
Since walkdir is currently entirely based on returning filesystem
paths as strings (just like os.walk()) and hence shares the pervasive
symlink attack vulnerability, I'm particularly interested in the
question of whether or not the various *at
Antoine Pitrou pit...@free.fr added the comment:
Randomness is hard to do correctly
and is expensive. If we can avoid it, we should try very hard to do
so...
os.urandom() is actually cheaper on Windows 7 here:
100 loops, best of 3: 1.78 usec per loop
than on Linux:
$ ./python -m
Antoine Pitrou pit...@free.fr added the comment:
Again, Roundup ate up some of the text:
PCbuild\amd64\python.exe -m timeit -s import os os.urandom(16)
100 loops, best of 3: 1.81 usec per loop
(for the record, the Roundup issue is at
http://psf.upfronthosting.co.za/roundup/meta/issue264
Antoine Pitrou pit...@free.fr added the comment:
I don't think the created() method has to be exposed. People can inspect the
mode attribute if they want to have that information.
(besides, the semantics are misleading since a new file opened with w has
also be created, but created() would
New submission from Antoine Pitrou pit...@free.fr:
The current implementation has useless testing and copying.
--
components: Interpreter Core
files: bytesupper.patch
keywords: patch
messages: 150868
nosy: benjamin.peterson, flox, haypo, pitrou
priority: low
severity: normal
stage:
Benjamin Peterson benja...@python.org added the comment:
LGTM.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13738
___
___
Python-bugs-list
Charles-François Natali neolo...@free.fr added the comment:
Here's a possible walkfd() implementation.
Example:
$ cat /home/cf/testwalkfd.py
import os
import sys
topfd = os.open(sys.argv[1], os.O_RDONLY)
for rootfd, dirs, files in os.walkfd(topfd):
print(rootfd, dirs, files)
$ ./python
Antoine Pitrou pit...@free.fr added the comment:
- Can you use pickletools.dis to examine what differs in the pickles' bytecode?
- Does it also apply to 3.3?
It appears at least some kind of efficiency might be missed out for
marshall as well.
marshal doesn't use the pickle protocols, so
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 9683d59170ee by Antoine Pitrou in branch 'default':
Issue #13738: Simplify implementation of bytes.lower() and bytes.upper().
http://hg.python.org/cpython/rev/9683d59170ee
--
nosy: +python-dev
Antoine Pitrou pit...@free.fr added the comment:
Also be aware that symlinks mean sometimes you won't have a dirfd: if
you have a symlink that points to another directory, you can't open that
directory using openat from the symlink's directory. So if you follow
symlinks (or have an
Antoine Pitrou pit...@free.fr added the comment:
Thanks.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13738
sbt shibt...@gmail.com added the comment:
Trivial 3 lines patch.
I guess there is still a race: if Ctrl-C is pressed after PyErr_CheckSignals()
is called but before PyObject_Str() then the printing of any exception can
still be suppressed.
--
Added file:
Sandro Tosi sandro.t...@gmail.com added the comment:
Hi Arnaud,
would you like to provide a patch to update the MAKE_FUNCTION opcode
description? That would speed up a bit the fix-up.
Also, I don't have that clear what For each keyword only default, ... mean:
are those the default values for
New submission from Charles-François Natali neolo...@free.fr:
After a call to fdlistdir(), another call to fdlistdir() on the same file
handle (but using a different FD, since the FD passed to fdlistdir() is closed)
will return an empty list:
$ cat ~/test_fdlistdir.py
import os
import sys
Filip Gruszczyński grusz...@gmail.com added the comment:
Bump! There was no activity here for two weeks. Is my patch for 2.7 ok or
should I do something more about it?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13521
Antoine Pitrou pit...@free.fr added the comment:
I see two options:
1. rewind the directory stream in fdlistdir()
2. document this
Here's a patch for option 1.
Agreed with that, and ok with the patch :)
--
___
Python tracker
Mads Kiilerich m...@kiilerich.com added the comment:
I won't claim to know more about socket error codes than what the Linux man
pages says. According to them only send() can fail with ECONNRESET, even though
POSIX Programmer's Manual man pages mentions many others. getpeername() is
however
Charles-François Natali neolo...@free.fr added the comment:
Here's a new version of the patch that should address all the comments.
--
Added file: http://bugs.python.org/file24179/open_create_x-3.patch
___
Python tracker rep...@bugs.python.org
Ross Lagerwall rosslagerw...@gmail.com added the comment:
I see two options:
1. rewind the directory stream in fdlistdir()
2. document this
Here's a patch for option 1.
Yeah, looks good.
--
___
Python tracker rep...@bugs.python.org
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 7b2a178c028b by Charles-François Natali in branch 'default':
Issue #13739: In os.listdir(), rewind the directory stream (so that listdir()
http://hg.python.org/cpython/rev/7b2a178c028b
--
nosy: +python-dev
Antoine Pitrou pit...@free.fr added the comment:
Here's a new version of the patch that should address all the comments.
Just a small note: FileExistsError is raised, not exactly OSError, when
the file exists.
--
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
The only way to reliably implement the documented wrap_socket API
might thus be to maintain a flag in PySocketSockObject.
Agreed. With the annoyance that the flag must be exposed to Python code,
since ssl's wrap_socket is written in Python. It
Antoine Pitrou pit...@free.fr added the comment:
Looking at the patch again, I think this isn't enough.
setdefault() will still call the lookup routine twice which, in the general
case (i.e. lookdict() not lookdict_unicode()), can call arbitrary Python code
through e.g. __eq__ methods.
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 36f2e236c601 by Charles-François Natali in branch 'default':
Issue #13739: It's simpler and more direct to call rewinddir() at the
http://hg.python.org/cpython/rev/36f2e236c601
--
STINNER Victor victor.stin...@haypocalc.com added the comment:
on linux the underlying functionality is implemented in librt; the extension
doesn't check for this or links with -lrt.
The changeset 35e4b7c4bafa changed configure.in to check clock_gettime(). It
checks without and with librt:
Mads Kiilerich m...@kiilerich.com added the comment:
I'm a bit wary of API bloat here.
Yes, but explicit is better than magic ...
Thanks. So fixing how getpeercert behaves and either raise a dedicated
error or return None would improve things here, right?
Well ... that would at least make
Antoine Pitrou pit...@free.fr added the comment:
A return value of None would still not indicate if we had a working
connection without certificate or a failed connection. That would be
annoying.
Ah, right. Then raising e.g. a ValueError would be better.
--
Kay Hayen kayha...@gmx.de added the comment:
It seems that there is an extra BINPUT 2, whatever it does. I am attaching a
variant that does pickletools.dis on the 3 dumps.
Protocol 2 :
Dumping read const const stream '\x80\x02}q\x01U\x07modulesq\x02Ns.'
0: \x80 PROTO 2
2: }
Antoine Pitrou pit...@free.fr added the comment:
Ah, right. BINPUT is used to memoize objects in case a restructive structure
happens. You can use pickletools.optimize() to remove the useless BINPUTs out
of a pickle stream.
Note that 3.x is more consistent and always emits the BINPUTs. It
Kay Hayen kayha...@gmx.de added the comment:
Sending my attached file stream.py through 2to3.py it shows that CPython
3.2 doesn't exihibit the issue for either protocol, which may be because it's
now unicode key, but as it's the only value I tried, I can't tell.
Hope this helps.
Regarding
Antoine Pitrou pit...@free.fr added the comment:
I think the premature optimization comes down to that code:
static int
put(Picklerobject *self, PyObject *ob)
{
if (Py_REFCNT(ob) 2 || self-fast)
return 0;
return put2(self, ob);
}
(put2() being the function which emits
Antoine Pitrou pit...@free.fr added the comment:
Regarding the marshal, I presume, that somehow the dictionary when
created via marshal (or compile, if no .pyc is involved?) first
time is somehow less efficient to determine/stream that the one
cPickle created.
I don't think so. marshal
Kay Hayen kayha...@gmx.de added the comment:
I see, if it's refcount dependent, that explains why it changes from
interpreter provided dictionary and self-created one.
So, I take, I should always call pickletools.optimize( cPickle.dumps( value
)) then.
Thanks,
Kay
--
Antoine Pitrou pit...@free.fr added the comment:
Closing the issue as it's really a quirk rather than a bug. Thanks for
reporting, though.
--
resolution: - wont fix
stage: - committed/rejected
status: open - closed
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
For some reason, the second changeset broke the OpenIndiana buildbots:
http://www.python.org/dev/buildbot/all/builders/AMD64%20OpenIndiana%203.x/builds/2485
Also, wouldn't it be better to call rewinddir with the GIL released?
(although I agree
Charles-François Natali neolo...@free.fr added the comment:
For some reason, the second changeset broke the OpenIndiana buildbots:
I have absolutely no idea of why this doesn't work. I suspect
rewinddir() is a noop on OpenIndiana if readdir() hasn't been called.
I'll revert this commit.
Charles-François Natali neolo...@free.fr added the comment:
Here's a patch addressing the multiple bind() problem on Windows.
Note that this problem also affects other parts of the stdlib, which use
SO_REUSEADDR when available.
Also, there's an rather confusing comment in
Charles-François Natali neolo...@free.fr added the comment:
Just a small note: FileExistsError is raised, not exactly OSError,
when the file exists.
I've updated the doc accordingly.
--
stage: patch review - commit review
___
Python tracker
Terry J. Reedy tjre...@udel.edu added the comment:
For each keyword only default is not in my text, but if you are referring to
keyword only name, default parameter object pairs , yes. Here is a revised
suggested wording:
MAKE_FUNCTION(argc)
Pushes a new function object on the stack. From
Martin v. Löwis mar...@v.loewis.de added the comment:
I disagree that this is a security issue, or an issue at all. All source code
of the site is in a public subversion repository, available for review to any
attacker (as well as any security review) - and that is deliberately so because
we
Terry J. Reedy tjre...@udel.edu added the comment:
http://docs.python.org/release/2.6.7/
has the same problem that the 3.x 'in development' version is called 3.2, while
there is no link to current stable 3.2.2 except indirectly by going to 'old
versions' (which perhaps should be 'other
Antoine Pitrou pit...@free.fr added the comment:
Nobody said 3.2 was not stable...
Well, the sidebar says it's in development while 2.7 is stable :)
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13122
Terry J. Reedy tjre...@udel.edu added the comment:
Well, actually I do have an idea. When 3.3 comes out, I think docs.python.org
should point to that, and another url should point to the most recent 2.7.x
release. The url for all versions is already stable. Then the sidebar could
have entries
Terry J. Reedy tjre...@udel.edu added the comment:
My specific suggestion is that the sidebar be time-independent (for at least a
decade, until Python 4 ;-) and say
Docs for other versions
Current Python 3
Current Python 2
In development
Everything else
with stable links for each.
Filip Gruszczyński grusz...@gmail.com added the comment:
I understand you are talking about this call:
mp-ma_lookup(mp, key, hash);
I haven't noticed that earlier. I'll try to provide a better fix (for 2.7
first, after we agree it's good enough, I will provide one for 3.3).
Do you have any
Georg Brandl ge...@python.org added the comment:
Sounds good.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13122
___
___
Python-bugs-list
Atle Pedersen atle.peder...@gmail.com added the comment:
Just wanted to say thanks for very fast response, and informative information.
I respect your decision to close the bug as invalid. But my five cent is that
it still feels like a bug, something that shouldn't happen. Especially since
Terry J. Reedy tjre...@udel.edu added the comment:
To make my idea work both now and after we switch docs.python.org, that url
should not be used as either of the first two links. Rather there should be a
docs.python.org/py2k (or whatever) that is the permanent 'latest Python 2
release' docs
Michele Orrù maker...@gmail.com added the comment:
There's no need to port your patch over python3k, since urllib behaves
differently with http passwords - as you can see in the doc
http://docs.python.org/dev/py3k/library/urllib.request.html#examples
I would be glad to finish your password
Antoine Pitrou pit...@free.fr added the comment:
Do you have any idea, how I might this part? I mean how to check, that
this is called only once?
Checking that __eq__ is called only once should be a good proxy.
--
___
Python tracker
Filip Gruszczyński grusz...@gmail.com added the comment:
Thanks, I'll try that. Like before I will probably find time next weekend.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13521
___
New submission from Jelle Geerts jellegee...@gmail.com:
As the attached example Python script explains, the winsound.SND_NOWAIT flag
doesn't do anything, at least not on modern Windows platforms.
The updated MSDN documentation for PlaySound() states that SND_NOWAIT is not
supported (it is
Nick Coghlan ncogh...@gmail.com added the comment:
Thanks for that Charles-François - do you mind if I adapt that for walkdir?
The changes I would make are basically those that Antoine pointed out:
- rather than replacing the dirpath entry, instead yield a 4-tuple that appends
the dirfd
Mads Kiilerich m...@kiilerich.com added the comment:
I would find ValueError surprising here. socket.error or SSLError would be less
surprising ... even though it technically isn't completely true. But isn't it
more like a kind of RuntimeError to call getpeercert after the socket has been
Bithin A bithin2...@gmail.com added the comment:
The bugs.python.org/review is a running application and it is very bad to see
debug error messages.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13737
Ross Lagerwall rosslagerw...@gmail.com added the comment:
I'm currently leaning towards the simple 4-tuple approach
I would also take that approach. It seems simplest to me.
--
___
Python tracker rep...@bugs.python.org
New submission from Andrew awnyst...@gmail.com:
Hello,
This program crashes after 12-24 hours of running. My OS is Ubuntu 11.10, I'm
using Python 2.7.2, and gcc 4.6.1.
Here's the error:
*** glibc detected *** python: double free or corruption (!prev):
0x01d53ad0 ***
===
Peter Csapo astro...@gmail.com added the comment:
I have having the same issues as Jimbofbx. This seems to stem from changes due
to issue 10841. All stdio is now opened in binary mode, in consideration that
it is the TextIOWrapper's job to do endline translation.
The problem here is that the
Terry J. Reedy tjre...@udel.edu added the comment:
I just got 'fatal error' running python_d 3.3.a0 checked out yesterday. When I
closed message, test continued (but really crashed later).
--
nosy: +terry.reedy
___
Python tracker
Terry J. Reedy tjre...@udel.edu added the comment:
http://docs.python.org/devguide/runtests.html
If you don’t have easy access to a command line, you can run the test suite
from a Python or IDLE shell:
from test import autotest
However, argparse is the least of the test suite problems on
74 matches
Mail list logo