Amaury Forgeot d'Arc added the comment:
What about requiring maxsize to be convertible to an int?
This would allow dynamic objects, if they define an __int__ method.
I join a patch.
--
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file9473/queue_maxsize_2.diff
Amaury Forgeot d'Arc added the comment:
IMO, connect() should accept unicode strings, and encode them to utf-8
when calling the C function.
Patch attached.
--
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file9474/sqlite_connect.diff
__
New submission from Neil Roques:
http://docs.python.org/ref/node33.html (also packaged in the Python
documentation which comes with Python) links to:
http://www.python.org/doc/newstyle.html for information on new style classes
However, this link has moved, as should now read:
New submission from paul rubin:
I don't see any way in the docs to get the status of an http request, in
particular I want to know whether it's a 404. It does show up in the
guts of the library so maybe I can extract it somehow, but there should
be a simple documented way.
Also, the urllib doc
Martin v. Löwis added the comment:
That's difficult to fix. Notice that this page does reference
gethostbyaddr (in the uname documentation), and that the online HTML
version links to both the socket and the os modules. Apparently, the CHM
generation picks up the first link.
--
nosy:
New submission from Thomas Heller:
The attached patch implements hash and cmp for sqlite3.Row objects.
--
files: sqliterow.patch
keywords: patch
messages: 62615
nosy: theller
severity: normal
status: open
title: make sqlite.Row hashable correctly
type: behavior
versions: Python 2.6,
Rafael Zanella added the comment:
FWIW, using xrange() it seems to give the proper error message:
Traceback (most recent call last):
File bad_range.py, line 12, in module
print xrange(MyInt(2**64), MyInt(2**64+10))
OverflowError: long int too large to convert to int
--
nosy:
Ismail Donmez added the comment:
Any news on this? Also gcc 4.3 gcc 4.2.3 fixed the -Wall clobbering -
Wstrict-overflow problem, which is good news.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1621
__
Jeroen Ruigrok van der Werven added the comment:
Patch for against 2.6 trunk @ r60910.
--
nosy: +asmodai
Added file: http://bugs.python.org/file9476/userdict.rst.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2079
Jeroen Ruigrok van der Werven added the comment:
Patch against 2.5 trunk @ r60911.
Added file: http://bugs.python.org/file9477/libuserdict.tex.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2079
__
Rafael Zanella added the comment:
@gutworth: Since one of the main uses of Queue is with threads, I think
it *really* should acquire the mutex before changing the maxsize;
@amaury.forgeotdarc: Your patch makes the point of allowing the size to
be changed at some other place (e.g.: an attribute
New submission from Virgil Dupras:
What prompted me to do these changes is that Backward compatibility
section for 2.1 and earlier. How long are we going to keep this? According
to svn, no commit has been made on the 2.1 branch since 2003. Is it safe
to assume no unittest change is ever going
Benjamin Peterson added the comment:
I like it.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2149
__
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Amaury Forgeot d'Arc:
The new doc framework highlights python code, and looks very nice.
However, some snippets are not parseable by the compiler, and are thus
left unhighlighted. For example:
http://docs.python.org/dev/whatsnew/2.6.html#the-contextlib-module
The vast
Rafael Zanella added the comment:
Mine patch doesn't address the hold the mutex before changing the
maxsize guess it would then force a get()?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2149
__
New submission from Michael Hoffman:
Adding these four lines to optparse.OptionGroup makes using option
groups vastly easier:
def __enter__(self):
return self
def __exit__(self, *exc_info):
self.parser.add_option_group(self)
You can then do things like:
with
New submission from Virgil Dupras:
I've been using unittest for quite a while. One thing I got tired with is
the code duplication for file management and mocking. A few months ago I
created this nifty little TestCase subclass and I've been using it ever
since. It works quite well.
Am I the
Michael Hoffman added the comment:
As gpolo points out, this facility already exists. This RFE should be
closed.
--
nosy: +hoffman
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2130
__
Antoine Pitrou added the comment:
À propos modernizing unittest, may I suggest taking a look at #1034053. :)
--
nosy: +pitrou
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2153
__
Raymond Hettinger added the comment:
It's probably best to close this as won't fix. Each of the patches
limits the module or complicates it a bit. I'm not sure there's even a
real problem here. My preference is to leave this code untouched.
__
Tracker [EMAIL
Benjamin Peterson added the comment:
Maybe, we should change change the constructor to use self.maxsize =
int(maxsize). Then we can provide a set_maxsize method that will acquire
the mutex and preform the change. This is will restrict the type of
maxsize and allow for easy dynamic changing.
Robert Bradshaw added the comment:
Yes, the error for xrange is more illustrative of the problem, but just
shows that xrange has this a too. Why should xrange be invalid for
non-word sized values (especially as range works)? Incidentally, just a
week ago I had to write my own iterator for a
Benjamin Peterson added the comment:
Raymond, are you referring to the int checking, my new method, or both?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2149
__
___
Raymond Hettinger added the comment:
Both. There is no issue here worth adding a new method.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2149
__
___
Python-bugs-list mailing
Benjamin Peterson added the comment:
Ok. I agree that we shouldn't muddy the waters of Queue by checking for
int. (set_maxsize would be unneeded) Go ahead and close.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2149
__
Changes by Raymond Hettinger:
--
resolution: - wont fix
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2149
__
___
Python-bugs-list mailing list
Raymond Hettinger added the comment:
Recommend closing this. No need to muck-up a clean module to solve a
non-problem.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2149
__
Changes by Benjamin Peterson:
--
nosy: +purcell
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2153
__
___
Python-bugs-list mailing list
Unsubscribe:
Russell Owen added the comment:
The bug still exists. Please assign this bug and patch to Martin Loewis if
possible (I don't have privileges for that).
--
nosy: +reowen
type: - behavior
versions: +Python 2.5 -Python 2.3
Added file: http://bugs.python.org/file9483/Tkinter_patch.txt
Teajay added the comment:
Thanks for the feedback. I looked at the issues you mentionned and tried
to sort that out. You might want to have a look it this new patch. I ran
the tests, added a new test case and hopefully managed to get the code
style right this time :-)
Let me know if there is
Thomas Heller added the comment:
I'm reopening this. libffi 3 has been released; I have created the
libffi3-branch for this work in Python svn.
--
status: closed - open
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1292
Virgil Dupras added the comment:
Shouldn't we apply this patch directly on pysqlite? Any change made to
the sqlite3 module will be overwritten in the next refresh, right?
Anyway, I'm not 100% sure, but it might already be fixed:
http://www.initd.org/tracker/pysqlite/changeset/452
So, maybe
New submission from wrobell:
Numeric type conversion does not always work when using SQLite module.
Let's assume schema:
create table test_num(no numeric);
Fetching a `test_num.no` table gives float by default.
Now, let's register some converter
sqlite3.register_converter('numeric',
Steve Purcell added the comment:
Hi Virgil; thanks for stepping up to this. Backward compatibility was
largely for the sake of compatibility with Jython, which was always
lagging far behind CPython. I doubt it's a concern these days, and the
unittest.py in the Python source repository
Virgil Dupras added the comment:
Isn't it why KeyboardInterrupt is a subclass of BaseException instead of
Exception (along with SystemExit)? so that except Exception: doesn't
catch it?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2153
Benjamin Peterson added the comment:
I can confirm on the trunk with Mac OSX 10.4.
--
nosy: +benjamin.peterson
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2158
__
Changes by Benjamin Peterson:
--
versions: +Python 2.6
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2158
__
___
Python-bugs-list mailing list
Unsubscribe:
Christian Heimes added the comment:
All changes are looking fine to me but I haven't looked at the patch so far.
__metaclass__ = type is easier to write than subclassing from object.
Both are equivalent.
__metaclass__ = type
class Foo: pass
...
Foo
class '__main__.Foo'
Foo.__bases__
(type
Geoffrey Irving added the comment:
It works fine for me on Linux as well, and on FreeBSD. I expect it's
a mac specific bug.
Geoffrey
On Thu, Feb 21, 2008 at 12:00 PM, Christian Heimes
[EMAIL PROTECTED] wrote:
Christian Heimes added the comment:
I've tried the example with Python 2.6 + 3.0
Georg Brandl added the comment:
I think you get two links in the CHM generated by Sphinx. Can somebody
with a working HTML Help Compiler check that?
--
assignee: - georg.brandl
nosy: +georg.brandl
__
Tracker [EMAIL PROTECTED]
Benjamin Peterson added the comment:
The problem appears to be that Mac's strerror doesn't return a good
error message. We could try to detect this sort of thing, but I'm not
sure how.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2158
Georg Brandl added the comment:
This link has already been fixed in SVN.
--
nosy: +georg.brandl
resolution: - out of date
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2150
__
Georg Brandl added the comment:
I've committed a patch for this in the trunk, the addinfourl object has
a code attribute there.
--
nosy: +georg.brandl
resolution: - out of date
status: open - closed
__
Tracker [EMAIL PROTECTED]
Benjamin Peterson added the comment:
The Path class of hs.path is, I assume, a nice wrapper around a file or
directory. However, Python does not have something like this, so it's
probably more useful to just return the raw path.
__
Tracker [EMAIL PROTECTED]
Benjamin Peterson added the comment:
First, is hs a company package? You'll most likely want to remove it.
Otherwise, this looks useful. I wonder if this is something we could use
in test.test_support. I'd like it for some of Python's regression tests.
Brett, what do you think about that?
Steve Purcell added the comment:
Yes indeed - you're exactly right; just checked now. Then disregard my
previous comment!
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2153
__
Changes by Martin v. Löwis:
--
keywords: +patch
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue799428
___
Python-bugs-list mailing list
Unsubscribe:
Christian Heimes added the comment:
I've tried the example with Python 2.6 + 3.0 on Linux and Windows. No
errors here.
--
nosy: +tiran
priority: - normal
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2158
__
Virgil Dupras added the comment:
Oh, you meant hs.path? ah yeah, it's just for tmppath(), which is of no
use except in my own stuff.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2156
__
New submission from Geoffrey Irving:
On Mac OS X with python 2.5.1, I get
open(chr(212),'w')
Traceback (most recent call last):
File stdin, line 1, in module
IOError: invalid mode: w
The error should be more like filename contains nonprintable characters.
Thanks,
Geoffrey
--
Virgil Dupras added the comment:
Well, yeah, but I'm the owner, it's not like if the copyright was a
problem. I'd gladly release it (and the test unit that goes with it) under
BSD.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2156
Changes by Christian Heimes:
--
keywords: +patch
priority: - normal
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2153
__
___
Python-bugs-list mailing list
Martin v. Löwis added the comment:
I dislike the double decoding, and would prefer if sys.argv would be
created directly from the wide command line.
In addition, I think the patch is incorrect: it ignores the arguments to
Py_Main, which is a documented API function.
One solution might be to
Georg Brandl added the comment:
Committed as r60938 (python) and r60939 (sphinx). Thanks for the nice patch!
--
resolution: - accepted
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2154
__
Georg Brandl added the comment:
Committed in r60936, r60937. Thanks!
--
nosy: +georg.brandl
resolution: - fixed
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2079
__
Antoine Pitrou added the comment:
I agree this behaviour would definitely be useful.
--
nosy: +pitrou
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1038909
_
Changes by Antoine Pitrou:
--
type: - feature request
versions: +Python 2.6 -Python 2.4
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1038909
_
___
Raymond Hettinger added the comment:
-1 on adding these to unittest. The module is already too complex.
Mock objects have been rejected previously and the rationale still
holds. There is no standardized approach that meets everyone's needs.
It doesn't make sense to lock in one of the many ways
Amaury Forgeot d'Arc added the comment:
So, maybe create a ticket to use the latest version of pysqlite?
I don't think so. While the change you are pointing to does deal with
the same problem, the base versions seems to have substantial differences.
I still prefer my patch.
Giovanni Bajo added the comment:
mbstowcs uses LC_CTYPE. Is that correct and consistent with the way
default encoding under UNIX is handled by Py3k?
Would a Py_MainW or similar wrapper be easier on the UNIX guys? I'm just
asking, I don't have a definite idea.
__
Martin v. Löwis added the comment:
mbstowcs uses LC_CTYPE. Is that correct and consistent with the way
default encoding under UNIX is handled by Py3k?
It's correct, but it's not consistent with the default encoding - there
isn't really any default encoding in Py3k. More specifically,
Ned Deily added the comment:
I cannot reproduce the problem on Intel OSX 10.5.2 (Leopard) with either
the built-in 2.5.1 or with the MacPython 2.5.1:
$ /usr/bin/python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type help, copyright, credits
Steve Purcell added the comment:
I agree with Raymond: -1 from me. There isn't a consensus on what mock
object means*, and trying to provide a standardised mock object
facility is a quagmire*, hence the prior rejections to which Raymond
refers.
It's easy to roll your own simple mock objects
Changes by Steve Purcell:
--
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2156
__
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Stutzbach added the comment:
The resolution on this bug reads, In future versions of Python, Guido
would like to change the design to hide the induction variable. So,
someday, you'll get your wish.
Can this bug be re-opened and the wart removed in 3.0?
--
nosy: +stutzbach
Raymond Hettinger added the comment:
It's already been implemented for Py3.0.
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1110705
_
___
Python-bugs-list mailing list
New submission from johansen:
We've been using Python 2.4 to build the new package management software
for OpenSolaris. We use a ndbm database to hold keywords about
packages, and found that each time we added a new OpenSolaris build to
our package repository, the time to import would increase
Mark Dickinson added the comment:
Okay. I'll stop now :)
So I lied. In a spirit of enquiry, I implemented math.gcd, and wrote a
script (lehmer_gcd.py, attached) to produce some relative timings. Here
are the results, on my MacBook Pro (OS X 10.5):
An explanation of the table: I'm
Mark Dickinson added the comment:
And here's the diff for math.gcd. It's not production quality---it's just
there to show what's possible.
Added file: http://bugs.python.org/file9486/lehmer_gcd.patch
__
Tracker [EMAIL PROTECTED]
Daniel Stutzbach added the comment:
Wonderful!
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1110705
_
___
Python-bugs-list mailing list
Unsubscribe:
Ilya Sandler added the comment:
I understand your argument. Yet, I am not sure classes with the same
name are reasonable here. Tix is too intertwined with Tkinter:
E.g a Tix user user can just access Tkinter widgets via Tix:
import Tix
print Tix.Canvas # This is TkInter's widget
paul rubin added the comment:
I like the idea of having some integer math functions like this in the
stdlib; whether in the math module or elsewhere doesn't matter much. In
particular I remember having to implement xgcd on several separate
occasions for unrelated applications, each time
paul rubin added the comment:
I would prefer that %d signal an error 100% of the time if you give it a
float. It should not accept 42.0. It is for printing integers.
--
nosy: +phr
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1742669
Alexander Belopolsky added the comment:
Actually, a very simple change restores python2.5 behavior:
===
--- Modules/main.c (revision 60941)
+++ Modules/main.c (working copy)
@@ -187,6 +187,7 @@
if ((argv0 =
Alexander Belopolsky added the comment:
I have found relevant documentation in a comment preceding get_path_importer
definition:
... traverse path_hooks until a hook is found
that can handle the path item. Return None if no hook could;
this tells our caller it should fall back to
New submission from Alexander Belopolsky:
See attached patch.
--
components: Documentation
files: doc-import.diff
messages: 62678
nosy: belopolsky
severity: normal
status: open
title: Document PyImport_GetImporter
versions: Python 2.6
Added file:
Changes by Alexander Belopolsky:
Added file: http://bugs.python.org/file9488/issue2051.diff
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2051
__
___
Python-bugs-list mailing
Changes by Alexander Belopolsky:
--
nosy: +belopolsky
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2051
__
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
FYI: IEEE Standard 754 requires an invalid operation exception when
inf/nan conversion to integer is attempted.
--
nosy: +belopolsky
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1481296
79 matches
Mail list logo