Ross Lagerwall rosslagerw...@gmail.com added the comment:
Attached is a patch which tests all combinations and includes a testcase.
--
nosy: +pitrou
Added file: http://bugs.python.org/file22747/i12607_v2.patch
___
Python tracker
New submission from Ashutosh Swain ats.e...@gmail.com:
URL: http://docs.python.org/tutorial/classes.html
section: 9.4 Random Remarks
The first sentense is bit confusing:
Data attributes override method attributes with the same name
Is it possible to change the sentense something like this:
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
The proposed rewrite doesn't make any sense to me. Also set through is an
reads awkwardly.
--
assignee: docs@python - rhettinger
nosy: +rhettinger
___
Python tracker
Nick Coghlan ncogh...@gmail.com added the comment:
+1 for making this limitation explicit. See the caveat on locals() [1] for an
example of how to note this kind of restriction.
[1] http://docs.python.org/dev/library/functions.html#locals
--
___
New submission from HaiYun Yan lyricco...@gmail.com:
use as for block scope support
just like mozilla javascript let extension
https://developer.mozilla.org/en/new_in_javascript_1.7#Block_scope_with_let_%28Merge_into_let_Statement%29
usage:
as_clause(as_declare): as NAME
as_stmt: NAME as test
Ezio Melotti ezio.melo...@gmail.com added the comment:
You should propose this to the python-ideas mailing list first.
It might be worth checking the archives of the ML as well -- I think I saw
already something similar a while ago.
--
nosy: +ezio.melotti
resolution: - rejected
stage:
Ezio Melotti ezio.melo...@gmail.com added the comment:
Indeed that paragraph is not really clear. I had to read it till the end
(verbs for methods and nouns for data attributes) to figure out what it was
talking about. Even then it's still not clear what it's trying to say.
I *think* it
Changes by Yaroslav Bulatov yarosla...@gmail.com:
--
nosy: +yaroslavvb
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9998
___
___
Python-bugs-list
Yaroslav Bulatov yarosla...@gmail.com added the comment:
This causes problem for Freetype Python bindings on Linux
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9998
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
save_fds should be moved outside the try block:
+try:
+# save a copy of the standard file descriptors
+saved_fds = [os.dup(fd) for fd in range(3)]
+...
+
New submission from ledave123 ledave...@yahoo.fr:
I'm on Windows with cp1252 as the default encoding.
When I use -*- coding: c1252 -*- I get no problems.
When I use -*- coding: utf-8 -*- IDLE -r still opens the file with cp1252
encoding.
Python.exe opens the file with utf-8 correctly.
I think
STINNER Victor victor.stin...@haypocalc.com added the comment:
You can use PYTHONIOENCODING=utf-8. Code page 65001 is not exactly like
Python UTF-8 codec: see issue #6058.
Using issue #12281, it may be possible to implement a cp65001 codec.
See also issue #1602 for the Windows console.
Why
STINNER Victor victor.stin...@haypocalc.com added the comment:
getpid() is called after each kill(getpid(), signum),
to force the signal delivery
Please write a function (in test.support?) with a comment explaining why you
are doing that.
You may also only do this workaround on specific
STINNER Victor victor.stin...@haypocalc.com added the comment:
Thanks for your patch. ResourceWarning are really useful!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10883
___
New submission from Xavier de Gaye xdeg...@gmail.com:
The 'Advanced Logging Tutorial' states about the lastResort handler:
The handler’s level is set to WARNING, so all events at this and
greater severities will be output.
Python 3.2 does not follow this behavior:
Python 3.2 (r32:88445, Jun 18
Petri Lehtinen pe...@digip.org added the comment:
Attached a patch with a test and the proposed fix.
--
keywords: +needs review, patch
stage: - patch review
versions: -Python 2.6, Python 3.1, Python 3.4
Added file: http://bugs.python.org/file22749/issue12463.patch
Bruce Ferris bferri...@bferris.co.uk added the comment:
I use code page 65001 because 1) it displays the UTF-8 characters in my text
files with echo filename on the command line, and 2) that's Microsoft's
official (whatever that means) code page for UTF-8, and 3) it works in
cmd.exe.
Setting
Éric Araujo mer...@netwok.org added the comment:
FTR, for Debian and derivatives, doko chose to use 'linux2' when building on
linux3.
--
title: Linux 3: tests should avoid using sys.platform == 'linux2' - Linux 3:
code should avoid using sys.platform == 'linux2'
versions: -Python 3.4
Éric Araujo mer...@netwok.org added the comment:
I have the same reading as Ezio, and the same opinion that it’s unclear and
unhelpful. +1 to saying that there is only one namespace for data attributes
and methods.
--
___
Python tracker
R. David Murray rdmur...@bitdance.com added the comment:
In this case it is not a potential security hole, since in fact the GPF comes
from Python explicitly calling Abort because of a situation it can't handle, as
indicated by the error message from Python. (If it were a true segfault-like
STINNER Victor victor.stin...@haypocalc.com added the comment:
Python shouldn't GPF for ANY reason if it can be easily fixed
Code page 65001 issue cannot be easily fixed. Did you read the history of
the issue #6058? It took one year and a half to decide that cp65001 cannot be
set as an alias
Jason R. Coombs jar...@jaraco.com added the comment:
I looked into the possibility of retaining newline characters even for files
with mixed newlines, but I've decided that's too intrusive an approach. The
current implementation specifically takes measures to strip whitespaces from
the ends
Jonathan Niehof jnie...@lanl.gov added the comment:
Yaroslav: does the patch cause problems, or the original issue? If the former,
could you be specific so I can try and fix it?
--
___
Python tracker rep...@bugs.python.org
New submission from Carl c...@carlbook.com:
urllib.URLopener (or urllib.request.URLopener for Python 3) and user defined
classes that inherit from these prematurely delete files upon cleanup. Any
temporary files downloaded using the .retrieve() method are deleted when an
instance of a
urlretrieve is a helper function from urllib module. The way to use
it is:
import urllib.request
urllib.request('http://bugs.python.org')
('/tmp/tmpe873xe', http.client.HTTPMessage object at 0xb72c2f6c)
import os
os.stat('/tmp/tmpe873xe')
posix.stat_result(st_mode=33152, st_ino=4462517,
Senthil Kumaran sent...@uthcode.com added the comment:
urlretrieve is a helper function from urllib module. The way to use
it is:
('/tmp/tmpe873xe', http.client.HTTPMessage object at 0xb72c2f6c)
import os
os.stat('/tmp/tmpe873xe')
Works!
--
___
Senthil Kumaran sent...@uthcode.com added the comment:
Tracker stripped off the code. Here is it.
import urllib.request
urllib.request.urlretrieve('http://bugs.python.org')
('/tmp/tmpe873xe', http.client.HTTPMessage object at 0xb72c2f6c)
import os
os.stat('/tmp/tmpe873xe')
New submission from John Keeping john.keep...@lineone.net:
If msilib.Directory.start_component() is called with the keyfile argument not
None then it attempts to call self.cab.gen_id(self.absolute, keyfile) but the
msilib.CAB.gen_id() method takes only two arguments (not three).
--
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 8d67fd820627 by Charles-François Natali in branch 'default':
Issue #11784: Improve multiprocessing.Process.join() documentation. Patch by
http://hg.python.org/cpython/rev/8d67fd820627
--
nosy: +python-dev
Charles-François Natali neolo...@free.fr added the comment:
Committed to default.
Patrick, thanks for the patch!
--
nosy: +neologix
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
versions: -Python 2.7
___
Python
Charles-François Natali neolo...@free.fr added the comment:
Please write a function (in test.support?) with a comment explaining why you
are doing that.
You may also only do this workaround on specific platforms. For example,
only on FreeBSD and OpenIndiana (the test would be in the
Carl c...@carlbook.com added the comment:
@orsenthil, that is the correct behavior if you do not want to override any of
URLopener's handlers for error codes. In my case, I wanted to override
FancyURLopener (a child class of URLopener) to override HTTP 401 behavior.
Using urlretrieve is not
Terry J. Reedy tjre...@udel.edu added the comment:
That sentence is wrong to imply that there is anything special about data
versus method attributes with respect to overriding -- or that attributes are
special when it comes to names in a single namespace. What I think the
paragraph should
Марк Коренберг socketp...@gmail.com added the comment:
Yes, this is what I want. Thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12463
___
Charles-François Natali neolo...@free.fr added the comment:
Seems reasonable to me.
What bothers me is this comment in shutdown's docstring:
Stops the serve_forever loop.
Blocks until the loop has finished. This must be called while
serve_forever() is running in another
Jason R. Coombs jar...@jaraco.com added the comment:
I've encountered a use-case where the need to pickle NoneType is more relevant
(and difficult to work around).
We have a strongly-type Limited Python language, LimPy, which is based on
Python (https://bitbucket.org/yougov/limpy). This
Charles-François Natali neolo...@free.fr added the comment:
Stephan, did you apply the patch?
I think the failures you were experiencing on amd64 could be due to issue
#12181: OpenBSD's struct kevent definition differs from FreeBSD/NetBSD, which
can trigger a segfault on sparc64 (which
Bruce Ferris bferri...@bferris.co.uk added the comment:
I disagree with the it's not really a GPF since it calls Abort.
Consider the following cmd.exe session...
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
D:\chcp 65001
Active
Petri Lehtinen pe...@digip.org added the comment:
OK, so this is intentional. But why? Why does it *have to* block on every call?
It would be more reasonable to make in not block if serve_forever() is not
running and for example add a function to check whether serve_forever() is
running or
Changes by Miki Tebeka miki.teb...@gmail.com:
--
hgrepos: +46
Added file: http://bugs.python.org/file22753/request-method.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12614
___
Giampaolo Rodola' g.rod...@gmail.com added the comment:
IMHO, both methods should raise an exception (RuntimeError maybe) in case the
server is already started or stopped, at least in Python 3.3, while previous
python versions should silently pass.
It also makes sense to add a running
R. David Murray rdmur...@bitdance.com added the comment:
If you read what I wrote, I did not say that it wasn't a GPF. I said that an
Abort is different from writing into or reading from memory incorrectly (which
is what leads to security holes).
We don't have many Windows developers active
Petri Lehtinen pe...@digip.org added the comment:
Attached a patch that fixes the issue and adds a test case for it.
--
keywords: +needs review, patch
stage: - patch review
Added file: http://bugs.python.org/file22754/issue12464.patch
___
Python
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset d11a1a373f58 by Vinay Sajip in branch '3.2':
Fixes #12637: Last resort messages now correctly handled. Thanks to Xavier de
Gaye for the patch.
http://hg.python.org/cpython/rev/d11a1a373f58
New changeset
Petri Lehtinen pe...@digip.org added the comment:
Adding potential reviewers to nosy list.
--
nosy: +georg.brandl, ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12464
___
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
assignee: - vinay.sajip
nosy: +vinay.sajip
resolution: - fixed
status: open - closed
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12637
Yaroslav Bulatov yarosla...@gmail.com added the comment:
Sorry for confusion, I meant the original problem causes problems. I haven't
tested the patch because my target machines don't have gcc
--
___
Python tracker rep...@bugs.python.org
Changes by Petri Lehtinen pe...@digip.org:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12439
___
___
Python-bugs-list
Changes by Aaron Meurer asmeu...@gmail.com:
--
nosy: +Aaron.Meurer
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12611
___
___
Python-bugs-list
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Patch in attachment (tests still missing).
--
Added file: http://bugs.python.org/file22755/socketserver.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12463
Stefan Krah stefan-use...@bytereef.org added the comment:
No, I didn't commit it. Currently I don't have an amd64 OpenBSD install to do
further testing.
The problem could be #12181, it could also be qemu, which sometimes has
issues with OpenBSD.
--
Petri Lehtinen pe...@digip.org added the comment:
The solution could be global, to allow bytearray fit the 'c' format of
PyArg_ParseTuple. Then one would also be able to pass a bytearray into
other stringlib methods requiring the 'c' format.
Another possibility would be the change the 'c'
Changes by Petri Lehtinen pe...@digip.org:
Added file: http://bugs.python.org/file22757/c_format_buffer.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12380
___
Changes by Petri Lehtinen pe...@digip.org:
--
keywords: +needs review
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12380
___
July Tikhonov july.t...@gmail.com added the comment:
The very same example (with the same error) can be found in
Doc/library/nntplib.rst
--
resolution: fixed -
status: closed - open
Added file: http://bugs.python.org/file22758/library.nntplib.rst.diff
Stefan Krah stefan-use...@bytereef.org added the comment:
For the record: The other failures I mentioned were almost certainly
OpenBSD 4.5 / autoconf specific, so I didn't bother. Cairo has a
workaround, but I think that goes too far.
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:
Are you willing to update your patch accordingly?
I'm a vain rooster! I've used fullfsync() in 11877-standalone.1.diff!
Sorry for that, haypo. :-/
11877.fullsync-1.diff uses fullsync() and will instead always be
provided when
Charles-François Natali neolo...@free.fr added the comment:
I'm not sure I see what the problem is:
- if the idea behind this is the risk of symlink attack (like issue #4489),
it's not the case here, because the directory is created with 0600 permission
- furthermore, the attached patch has a
Eric Snow ericsnowcurren...@gmail.com added the comment:
Would an implementation detail note be inappropriate here? I only ask because
it looks like the imp module's use of interp-modules is implementation
specific.
Here's a patch for Doc/library/sys.rst that adds the note.
--
Charles-François Natali neolo...@free.fr added the comment:
The attached patch bumps the barrier's default timeout to 300ms: it should be
more than enough (unless you got a really crappy scheduler, or a really heavily
loaded machine), especially since this problem doesn't seem to occur often
Giampaolo Rodola' g.rod...@gmail.com added the comment:
This patch is now available as a recipe for python 2.x:
http://code.activestate.com/recipes/577808-asyncore-scheduler/
--
versions: +Python 3.3 -Python 3.2
___
Python tracker
Giampaolo Rodola' g.rod...@gmail.com added the comment:
New patch including tests.
--
Added file: http://bugs.python.org/file22762/socketserver.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12463
Changes by Aaron Meurer asmeu...@gmail.com:
--
nosy: +Aaron.Meurer
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12613
___
___
Python-bugs-list
Changes by Aaron Meurer asmeu...@gmail.com:
--
nosy: +Aaron.Meurer
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12616
___
___
Python-bugs-list
Antoine Pitrou pit...@free.fr added the comment:
Can you explain the issue a bit more?
If thread A calls shutdown(), and thread B calls serve_forever() a bit later,
thread A should IMO wait for serve_forever() to finish.
--
nosy: +pitrou
___
Python
Antoine Pitrou pit...@free.fr added the comment:
c_format_bytearray.patch looks ok to me. The other proposal is too broad, and
may lead to confusing behaviour.
In any case, some tests are needed.
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
Without even mentioning the possibility attacks, I think it's wrong for the
cleanup routine to follow symbolic links. It should instead simply remove the
links, and not mess with anything outside of the temporary directory.
Note that
Changes by Antoine Pitrou pit...@free.fr:
--
components: +Library (Lib)
nosy: +haypo
stage: - patch review
type: - behavior
versions: +Python 3.3 -Python 2.6, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6419
Antoine Pitrou pit...@free.fr added the comment:
This patch doesn't work if run_unittest() is called with an already constructed
test suite or test case (the patch in #12626 does).
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
New submission from python272 letters.rando...@gmail.com:
[meego]$/opt/org.python.python-2.7.2/bin/python -m test.regrtest ...
...
test_callback_register_double
(ctypes.test.test_callbacks.SampleCallbacksTestCase) ... Segmentation fault
this is after a native (not cross-compile) configure;
Brett Cannon br...@python.org added the comment:
On Fri, Jul 22, 2011 at 22:47, Eli Bendersky rep...@bugs.python.org wrote:
Eli Bendersky eli...@gmail.com added the comment:
Brett, what do you mean by listed as an essential test in regrtest. The
regrtest.STDTESTS list?
Yes
--
Nick Coghlan ncogh...@gmail.com added the comment:
Compare however the behaviour of bytes() and bytearray() which support direct
zero initialisation of a region of memory by passing an integer to their
constructor.
--
nosy: +ncoghlan
___
Python
Changes by Santoso Wijaya santoso.wij...@gmail.com:
--
nosy: +santa4nt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12615
___
___
Nick Coghlan ncogh...@gmail.com added the comment:
I agree with Antoine - it's a simple bug introduced by the attempt to allow
temporary directories to be correctly cleaned up during interpreter shutdown.
The race condition due to the usage of LBYL is shared with the full
shutil.rmtree
Ross Lagerwall rosslagerw...@gmail.com added the comment:
communicate() requires setting stdin, stdout and stderr to subprocess.PIPE
which defeats the purpose of the test: setting them to 0, 1 and 2 (in various
orders) so that they need to be swapped...
--
75 matches
Mail list logo