David Villa Alises added the comment:
What about something like gobject.introspection?
https://live.gnome.org/GObjectIntrospection/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16490
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
title: Sporadic failure in test_socket - Sporadic failure in test_socket:
testRecvmsgEOF
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13876
New submission from STINNER Victor:
http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/5975/steps/test/logs/stdio
==
FAIL: test_parallel_meta_path (test.test_threaded_import.ThreadedImportTests)
New submission from STINNER Victor:
http://buildbot.python.org/all/builders/AMD64%20Mountain%20Lion%20%5BSB%5D%203.x/builds/523/steps/test/logs/stdio
==
ERROR: testFDPassCMSG_SPACE
STINNER Victor added the comment:
I didn't read the whole issue, but the following code makes sense.
+try:
+import posix
+except ImportError:
+# Windows has nanosecond utime resolution.
+UTIME_EPSILON = 2e-9
+else:
+import sysconfig
+if 'HAVE_UTIMENSAT' in
New submission from STINNER Victor:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%203.x/builds/761/steps/test/logs/stdio
==
FAIL: test_fs_holes (test.test_posix.PosixTester)
Serhiy Storchaka added the comment:
# Using zlib's interface
while not d.eof:
compressed = d.unconsumed_tail or f.read(8192)
if not compressed:
raise ValueError('End-of-stream marker not found')
output = d.decompress(compressed, 8192)
#
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16275
___
___
Python-bugs-list
koobs added the comment:
I think this needs a backport to 2.7, my FreeBSD buildbots are failing on that
branch since moving buildbots home directory onto a ZFS fs:
==
ERROR: test_chflags (test.test_posix.PosixTester)
Roundup Robot added the comment:
New changeset 4beb1630544f by Victor Stinner in branch '2.7':
Issue #15747: skip chflags UF_IMMUTABLE tests if EOPNOTSUPP is raised.
http://hg.python.org/cpython/rev/4beb1630544f
--
___
Python tracker
Changes by Antoine Pitrou pit...@free.fr:
--
resolution: - duplicate
status: open - closed
superseder: - test_circular_imports() of test_threaded_import fails on
FreeBSD 9.0
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Is there anything left to do here?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12268
___
___
STINNER Victor added the comment:
status: open - closed
superseder: test_circular_imports() of test_threaded_import fails on FreeBSD
9.0
resolution: duplicate
Oh strange, I failed to find this issue (even if I'm the author of its first
message!). I forgot maybe to search
Changes by koobs koobs.free...@gmail.com:
--
nosy: +koobs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15599
___
___
Python-bugs-list mailing
koobs added the comment:
Confirming successful 2.7 build post Victors commit on both buildbots (standard
clang)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15747
___
Changes by koobs koobs.free...@gmail.com:
--
nosy: +koobs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16605
___
___
Python-bugs-list mailing
Kristján Valur Jónsson added the comment:
offtopic:
Noticed something pretty annoying:
If a package uses relative imports, e.g.
from . import sibling_module,
then it is impossible to run that package as a script, even with the __main__
trick.
--
Changes by Serhiy Storchaka storch...@gmail.com:
--
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10040
___
___
Serhiy Storchaka added the comment:
LGTM.
--
nosy: +kbk
stage: - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16504
___
___
Serhiy Storchaka added the comment:
read32() should raise BadGzipFile when less than 4 bytes read. Also you should
introduce read8() function which raises BadGzipFile when less than 1 byte read.
See also issue4844 and issue14315 for zipfile.
--
stage: commit review - needs patch
Antoine Pitrou added the comment:
The easy fix would probably be to return Py_None when the weakref'ed object has
a zero refcount.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16602
___
Serhiy Storchaka added the comment:
Ping.
--
stage: - patch review
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16444
___
Serhiy Storchaka added the comment:
As I see, Christian's contributor agreement already confirmed. Let's go ahead.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8865
___
Serhiy Storchaka added the comment:
Christian, it would be nice if you write the tests.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8865
___
Serhiy Storchaka added the comment:
Actually it should be:
# Using zlib's interface
while not d.eof:
output = d.decompress(d.unconsumed_tail, 8192)
while not output and not d.eof:
compressed = f.read(8192)
if not compressed:
raise
Serhiy Storchaka added the comment:
Should it be closed?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12457
___
___
Python-bugs-list mailing
Andrew Svetlov added the comment:
Rename skip_yield to skipyield
--
Added file: http://bugs.python.org/file28205/issue16596_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16596
___
Eyal Lewisohn added the comment:
just wanted to note that I agree with BM's comment and that I had to change
LegalChars myself to include the slash '/' in order for my application to work
properly.
--
nosy: +Eyal.Lewisohn
___
Python tracker
Antoine Pitrou added the comment:
Another solution would be to add a new method named addSuccessCleanup.
--
nosy: +michael.foord, pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16599
anatoly techtonik added the comment:
Or call tearDown() with some parameter that it's able to retrieve.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16599
___
Antoine Pitrou added the comment:
The naming confusion was fixed in 3.3:
http://docs.python.org/dev/whatsnew/3.3.html#pep-3155-qualified-name-for-classes-and-functions
As for pickle, it indeed depends on protocol version 4 as proposed in PEP 3154.
--
nosy: +pitrou
stage: needs patch -
Daniel Urban added the comment:
I don't know what is the protocol for duplicates when the superseder is still
open. If they should be closed, then I think yes, this should be closed.
--
___
Python tracker rep...@bugs.python.org
Michael Foord added the comment:
Changing the signature of tearDown would be backwards incompatible.
addSuccessCleanup is an interesting idea - cleanup functions that are only
executed if the test passes. (What to do if a cleanup function raises an
exception though? And when do these get
Serhiy Storchaka added the comment:
Yes, doing list(kw.items()) is safe now. Here is a patch.
--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file28206/tkinter_tk_setPalette.patch
___
Python tracker
anatoly techtonik added the comment:
addSuccessCleanup is not the best name as it assumes that some cleanup is being
added, which is confusing.
Additional consideration that the need to leave the test results is a user run
time preference, which may only be actual when debugging or working on
New submission from Thorsten Simons:
hashlib seems to leak memory when used on a Linux box (whereas the same works
fine when run under Windows 7) (tested w/ Python 3.2.1 and 3.2.3)
snip file mem.py
import hashlib
#file = 'B:\\video\\TEST\\01_file_10G'
file = '/video/TEST/01_file_10G'
myhash
Michael Foord added the comment:
Well, addSuccessCleanup *would* be an api for adding a cleanup - one that is
only called on success. So the cleanup is skipped on failure or error, which
was the original use case.
Additional consideration that the need to leave the test results is a user run
Serhiy Storchaka added the comment:
Why do you need it? You can add a test result depended code at the end of the
test method. For example set a special flag
def setUp(self):
self.success = False
def tearDown(self):
if not self.success:
...
def
Serhiy Storchaka added the comment:
Victor, I will be glad to review any related patches, but please split the
patch on several patches, from most undoubted to more sophisticated patterns.
--
___
Python tracker rep...@bugs.python.org
Thorsten Simons added the comment:
forgot to say that this is about huge files (tested w/ a 10GB file)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16606
___
Antoine Pitrou added the comment:
What happens if you replace iteration with something like:
with open(file, rb) as f:
while True:
data = f.read(16384)
if not data:
break
myhash.update(data)
--
nosy: +pitrou
Thorsten Simons added the comment:
Antoine,
this was of great help - no memory leaking anymore...
So, I asume that somewhere in the iteration the read file is buffered?
Does that make sense or - was it the developers intention?
Thank you,
Regards, Thorsten
--
resolution: - works for
Eugene Toder added the comment:
Agreed. That's what I've put in my code as a work around.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16602
___
Nick Coghlan added the comment:
Why post that complaint here? If there's a case where__main__.__package__
isn't being set correctly by -m, file a separate bug.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14803
Antoine Pitrou added the comment:
Well, it's not immediately obvious what the exact problem could be. Are you
reading a regular text file? Or is it a binary file where maybe the '\n'
character appears very rarely?
If it can be reproduced with a smaller file, perhaps you can attach it
Richard Oudkerk added the comment:
Here is a version which loads WSAPoll at runtime. Still no tests or docs.
--
Added file: http://bugs.python.org/file28207/runtime_wsapoll.patch
___
Python tracker rep...@bugs.python.org
Lukas Lueg added the comment:
Thorsten, the problem is that you are using line-based syntax. The code 'for
buffer in f:' will read one line per iteration and put it to 'buffer'; for a
file opened in binary mode, the iterator will always seek to the next b'\n'.
Depending on the content of the
anatoly techtonik added the comment:
On Tue, Dec 4, 2012 at 3:43 PM, Michael Foord rep...@bugs.python.orgwrote:
Well, addSuccessCleanup *would* be an api for adding a cleanup - one that
is only called on success. So the cleanup is skipped on failure or error,
which was the original use
Thorsten Simons added the comment:
OK, learned something again - should have known this :-(
Thank you!
Thorsten
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16606
___
Brett Cannon added the comment:
So we have IronPython who has their own format, Jython who has their own format
*and* .pyc files (which would screw with __cached__ so I assume they won't try
to use both at the same time), PyPy which use .pyc files, and CPython which
uses .pyc files. My
Jesús Cea Avión added the comment:
This is likely a FreeBSD 9 kernel bug.
Using this code under python 3, on a ZFS filesystem:
import os
f = open(test, wb)
f.write(bhello)
f.flush()
print(os.lseek(f.fileno(), 3, os.SEEK_HOLE))
Under Solaris, the reply is 5, pointing to the end of the file.
koobs added the comment:
I'll take care of upstream and report back with PR numbers. Happy with the
skipIf until resolved. Thanks for your time and patience jcea, much appreciated.
--
___
Python tracker rep...@bugs.python.org
Jesús Cea Avión added the comment:
koobs, do you want the SkipIf now?. Maybe having a red buildbot can contribute
push FreeBSD kernel guys :)
--
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16605
Changes by Jesús Cea Avión j...@jcea.es:
--
assignee: - jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16605
___
___
Python-bugs-list mailing
koobs added the comment:
Give me till the end of the weekend, will ping you for the skipIf then if I
haven't made progress. Thank you again.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16605
Gregory P. Smith added the comment:
Yes. See my comment from June. The write paths need to be taken care of.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12268
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16606
___
___
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16602
___
___
New submission from myreallycoolname:
The doumentation examples imn the tutorial in python3.2 are at lest in part
invalid. I was having trouble understanding the documentation so I pulled out
my pthony interperator and pluged in one of tyhe examples.
Just as I thought self was not defined.
You
New submission from David W. Lambert:
http://forums.devshed.com/newreply.php?do=newreplynoquote=1p=2838814
class c(tuple):
... def __init__(s,a,b):
... tuple.__init__(s,a)
... self.b = b
...
c(tuple(),666)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError:
Daniel Urban added the comment:
Could you please point to a specific example which is incorrect? Thank you.
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16607
___
New submission from Cal Leeming:
Hello,
Today I came up against a strange problem where collisions were being
encountered after less than 1mil iterations when attempting to use
random.random().
After much digging, the problem was because I was casting my float to a string,
and this was
Roundup Robot added the comment:
New changeset 708586792eec by Andrew Svetlov in branch '3.2':
Issue #13120: Allow to call pdb.set_trace() from thread.
http://hg.python.org/cpython/rev/708586792eec
New changeset 678dba60c12d by Andrew Svetlov in branch '3.3':
Merge issue #13120: Allow to call
Andrew Svetlov added the comment:
Fixed. Thanks.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13120
Serhiy Storchaka added the comment:
http://docs.python.org/2/tutorial/floatingpoint.html
--
nosy: +serhiy.storchaka
resolution: - invalid
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16609
Cal Leeming added the comment:
As stated before, I have already read this document.
This ticket is specifically about making users aware of this behaviour in the
form of a documentation update on the random.random() docs.
The link you provided does not exactly make this very clear.
Antoine Pitrou added the comment:
Well, this issue is about readline, readlines readall. It would be easier
to follow if you opened a separate issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12268
R. David Murray added the comment:
Is your error report the fact that the name 'tuple' appears in the error
message instead of 'c'? That does seem sub-optimal. It may not be easy to
improve, though.
--
nosy: +r.david.murray
priority: normal - low
title: subclass str fails -
David W. Lambert added the comment:
The apparent problem was that the constructing str with __init__ failed. I now
recall that immutables take initial values in the __new__ method. Sorry!
Otherwise, it was quite thoughtful for you to search for a problem. Dave.
--
New submission from Stepan Wagner:
def emptygen():
# Or other more meaningful generator
raise StopIteration
yield
def wrap(gen):
next(gen)
print(This should be printed or StopIteration raised.)
while True:
try:
yield next(gen)
except
Georg Brandl added the comment:
I had a look and can't see an example in the Classes doc where self might not
be defined. Please reopen with a concrete pointer if you think otherwise.
--
nosy: +georg.brandl
resolution: - invalid
status: open - closed
Mark Dickinson added the comment:
The `random` module docs are not the right place to add notes about general
floating-point arithmetic behaviour.
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16609
Cal Leeming added the comment:
Normally I would concur, but casting random.random() to a string is commonly
used, and people aren't going to read the entire floating point arithmetic page
to figure this out. And even if they do, that page still doesn't make it
entirely obvious at first read.
R. David Murray added the comment:
In fact it has been changed. In Python3 you get:
x = 0.88022393777095409
x
0.8802239377709541
str(x)
'0.8802239377709541'
Even in 2.7 you would get the above repr, not the one you showed. This is
because 2.7 and 3.3 use the shortest repr described in
Cal Leeming added the comment:
Many thanks for your lengthy response David.
Sorry, my initial bug report stated it was Python 2.7. The tests I performed
were actually on Python 2.6.6.
I will take a look at how to contribute documentation updates, and once I've
familiarized myself with it
Mark Dickinson added the comment:
It is notable that this behaviour isn't described anywhere that I can find in
the library manual or the reference manual. As David says, it applies only to
2.7; in 3.2 and later, `str` and `repr` are identical.
a glossary entry be added for 'floating
R. David Murray added the comment:
I have no idea what you are referring to by 'constructing str' :(
I thought at first it was your incorrect tuple call in the init that was the
issue, but that didn't look right, and after reproducing it and playing with it
for a bit I figured out it was the
Changes by Mark Dickinson dicki...@gmail.com:
--
title: random.random() / float() loses precision when passed to str() - float
loses precision when passed to str()
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16609
R. David Murray added the comment:
I don't see the bug here.
Your for loop calls wrap. Wrap calls emptygen. Emptygen raises a
StopIteration exception. That exception is of course propagated upward (it
isn't caught by wrap), and the loop stops.
--
nosy: +r.david.murray
resolution:
R. David Murray added the comment:
That's why I suggested a glossary entry. The relevant function description
*does* contain the phrase floating point, so a glossary link there would be
reasonably natural.
--
___
Python tracker
David W. Lambert added the comment:
Sorry again. You probably didn't follow the link I posted to see the
problem origination. Which was Cannot subclass str. I generalized
this to tuple.
On Tue, 2012-12-04 at 20:08 +, R. David Murray wrote:
R. David Murray added the comment:
I have
R. David Murray added the comment:
I followed the link, but it took me to a login/signup form, so it wasn't very
informative.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16608
___
Stepan Wagner added the comment:
OK, thanks for explanation.
The behaviour is still strange, because when I delete try...except clause
from wrap, the StopIteration exc from emptygen terminates the program with
traceback.
On Tue, Dec 4, 2012 at 9:14 PM, R. David Murray
Antoine Pitrou added the comment:
I agree with Mark here. This isn't specific to random.random() and it's already
covered elsewhere in the documentation.
Furthermore, I don't know why you're using str() on random.random(). There are
better ways to get random strings, such as
Cal Leeming added the comment:
Actually, you do have a good point, this should have been using
random.getrandbits really.
--
status: pending - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16609
Campbell Barton added the comment:
Hi, I just found a use for this feature, with `use_subprocess` being optional
its possible to load idle into a running python session.
--
import idlelib
import idlelib.PyShell
idlelib.PyShell.main()
--
This allows you to load idle inside an
Changes by Cal Leeming cal.leem...@simplicitymedialtd.co.uk:
--
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16609
___
___
Roundup Robot added the comment:
New changeset ed0ff4b3d1c4 by Victor Stinner in branch 'default':
Issue #16444: test more bytes in support.TESTFN_UNDECODABLE to support more
Windows code pages
http://hg.python.org/cpython/rev/ed0ff4b3d1c4
--
___
R. David Murray added the comment:
The only way I was able to replicate that result was by removing the entire
try/except block, including the yield. In that case, wrap is no longer a
generator, so the exception is raised before you enter the for loop.
--
New submission from John Dennis:
There are multiple problems with Cookie.py. Some of the issues are covered in
http://bugs.python.org/issue3073 which is still open (after 4.5 years).
In all honesty the API and the implementation are not great perhaps the best
thing would be to remove it from
STINNER Victor added the comment:
Ooook, all remaining issues about undecodable bytes should now be fixed (until
someone opens a new one? :-))
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
Stepan Wagner added the comment:
Thank you, I wasn't paying attention enough. It works as you describe.
On Tue, Dec 4, 2012 at 9:46 PM, R. David Murray rep...@bugs.python.orgwrote:
R. David Murray added the comment:
The only way I was able to replicate that result was by removing the
myreallycoolname added the comment:
Sorry about that. You will unfortunatly have to wait as I'm not on a computer
that has python installed currently.
- Original Message -
From: Daniel Urban
Sent: 12/04/12 02:00 PM
To: do...@mail.com
Subject: [issue16607] Bad examples in
myreallycoolname added the comment:
I'm no expert so I'm not sure which it is but try these:
class Complex:
... def __init__(self, realpart, imagpart):
... self.r = realpart
... self.i = imagpart
...
class Bag:
def __init__(self):
self.data = []
def
Daniel Urban added the comment:
Both work fine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16607
___
___
Python-bugs-list mailing list
New submission from Larry Hastings:
This bug tracker entry is to track adding Argument Clinic to CPython trunk.
Please see
http://mail.python.org/pipermail/python-dev/2012-December/122920.html for more
information.
--
assignee: larry
components: Interpreter Core
messages: 176965
Changes by Glenn Linderman v+pyt...@g.nevcal.com:
--
nosy: +v+python
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16612
___
___
Python-bugs-list
Changes by Dave Malcolm dmalc...@redhat.com:
--
nosy: +dmalcolm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16612
___
___
Python-bugs-list
Changes by Alex Gaynor alex.gay...@gmail.com:
--
nosy: +alex
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16612
___
___
Python-bugs-list mailing
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16612
___
___
Python-bugs-list mailing
1 - 100 of 112 matches
Mail list logo