New submission from Fan Decheng fandech...@gmail.com:
Platform: Windows Vista x64
Python version: 3.0.1 x64
When I use sys.stdin.readlines(), it correctly ends when I enter ^Z
(ctrl-Z) on the console (this is the EOF on the console). However when
I call sys.stdin.read(), it doesn't end when
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Is there anyone following this thread that thinks the weeble's patch is
not ready to commit?
--
assignee: kbk - rhettinger
nosy: +rhettinger
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
But it looks that py3k is stronger because it doesn't crash. Is it the
power of the GIL?
Yes, it is.
In theory, we needn't take the lock in all of BufferedReader.readline(),
only when calling external code which might itself release the GIL.
New submission from Antoine Pitrou pit...@free.fr:
It may be logical for BytesIO to support the buffer protocol (readable
/and/ writable).
--
components: Library (Lib)
messages: 83740
nosy: pitrou
priority: normal
severity: normal
stage: test needed
status: open
title: io.BytesIO
Antoine Pitrou pit...@free.fr added the comment:
(cannot reproduce under Linux)
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5505
___
Changes by Antoine Pitrou pit...@free.fr:
--
assignee: - jnoller
nosy: +jnoller
priority: - normal
type: - behavior
versions: +Python 2.7, Python 3.0, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5503
Andreas Schawo andreas.sch...@gmail.com added the comment:
As I understand actually the zipfile module possibly creates damaged zip
files after version 2.4 because of '\x00\x00\x00\x00' instead of
'\xff\xff\xff\xff' as header offset. But without any error.
I think the _struct.c should be
Andy Buckley a...@insectnation.org added the comment:
I'm easy either way --- I appreciate that it is a non-issue with new
formatting, but until developers can rely on the presence of Py = 2.6,
%-formatting wil continue to be widely used.
Since optparse's special use of %-delimited tokens
Tal Einat talei...@users.sourceforge.net added the comment:
This should be dropped in favor of issue #1529142, which proposes a
simpler and better solution.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1201569
New submission from Matthias Klose d...@debian.org:
| File build/temp.linux-mips-2.6/libffi/fficonfig.py, line 32, in
module
| ffi_sources += ffi_platforms['MIPS']
| KeyError: 'MIPS'
however the fficonfig.py file has only MIPS_LINUX and MIPS_IRIX keys.
--
assignee: theller
Mark Dickinson dicki...@gmail.com added the comment:
I don't know the zipfile module very well (i.e., at all),
but as far as I can tell from looking at the source,
there's no use of struct.pack('L', -1) in 2.6 onwards:
it's only potentially a problem in 2.5 (and that isn't
going to change, now
Mark Dickinson dicki...@gmail.com added the comment:
I think you're right about issue 4228: we should go ahead and
clean up the struct module anyway. As far as I can tell, only
the Python 2.5 zipfile module is using the deprecated behaviour.
The _struct.c portion of your patch looks fine. I
Benny Bach benny.b...@gmail.com added the comment:
If you have to name the script with a .bat extension it is not portable
to other platforms or did I misunderstand something?
The point of generating the bat file is to be able to use the same
script on all platforms.
--
C. E. Ball ceb...@users.sf.net added the comment:
I also found this bug while using SciPy's weave on Windows XP to compile
some inline c/c++ code.
Thorney's distutils_compiler_quoting.patch fixed the problem for me.
Here is the relevant part of the traceback (I hope):
Found executable
Andreas Schawo andreas.sch...@gmail.com added the comment:
I agree with you. A separate patch will do better.
In the next days I'm able to provide a new patch with the test_struct
cleanup.
Currently all tests succeeded on Windows and Linux. So I think no other
module relies on this feature
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
On posix platform, build_scripts already updates the #! line to refer to
the target interpreter, and changes the file mode.
On Windows, it could change the extension as well. Or does it causes
problems?
--
Mark Dickinson dicki...@gmail.com added the comment:
Committed to py3k, r70452.
Since this is partway between a bugfix and a new feature, I suggest that
it's not worth merging it to 3.0 (or 2.6). It should be backported to
2.7, however; I'll do this after verifying that the py3k buildbots
New submission from ganges master gangesmas...@users.sourceforge.net:
this is similar to bug #5370, but this for is a different reason. also,
i have seen several sites on google that mention it, so it has happened
to quite a few people.
the bug is that when calling dir() on a object, it looks
Changes by Brad Miller bonel...@gmail.com:
--
nosy: +bmiller
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4773
___
___
Python-bugs-list mailing
Mark Dickinson dicki...@gmail.com added the comment:
r70357 seems to have caused the sparc solaris py3k buildbot to start failing on
test_locale:
==
FAIL: test_integer_grouping_and_padding
Mark Dickinson dicki...@gmail.com added the comment:
Backported to the trunk in r70454. Thanks, all!
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4474
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:
I can reproduce this on coLinux(debian). But coLinux is running on
windows, so its console behavior may not be same as native linux.
(You need to use Ctrl+D on coLinux instead of Ctrl+Z)
--
nosy: +ocean-city
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:
With following patch for investigation, (release30-maint)
Index: Lib/io.py
===
--- Lib/io.py (revision 70450)
+++ Lib/io.py (working copy)
@@ -57,6 +57,7 @@
Antoine Pitrou pit...@free.fr added the comment:
Hi Mark,
AssertionError: ' 4200' != ' 4200'
Any idea what's going on here?
The problem seems to be that the thousands separator on the Solaris
variant of en_US is an empty string (rather than a comma) (*), and
apparently it hits a
Antoine Pitrou pit...@free.fr added the comment:
By the way, Martin, do you have any idea why the Solaris buildbot
doesn't seem to be enabled on trunk?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1222
New submission from Nathaniel Troutman locutusofbe...@yahoo.com:
If I define a class Foo in module A and in module A pickle out a list of
Foo objects to 'foo.pkl', then in module B attempt to unpickle 'foo.pkl'
I recieve the error AttributeError: 'module' object has no attribute 'Foo'
Attached
Nathaniel Troutman locutusofbe...@yahoo.com added the comment:
Why can I only attach one file at a time?
--
Added file: http://bugs.python.org/file13365/LoadFoo.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5509
Antoine Pitrou pit...@free.fr added the comment:
Trying a fix in r70458.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1222
___
___
Matthias Klose d...@debian.org added the comment:
MAL, please can we add zooko's patch in some form? The current
implementation assumes an implementation, which doesn't exist on all
platforms, and just dividing linux distributions in unsupported and
supported seems to be odd.
You cite some
Changes by Matthias Klose d...@debian.org:
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1322
___
___
Python-bugs-list mailing list
Unsubscribe:
Benny Bach benny.b...@gmail.com added the comment:
Ok - I see what you mean. I can't see any problems with it. However
generating a separate bat file has the advantage that you can still
invoke the original script by calling python explicitly.
--
Antoine Pitrou pit...@free.fr added the comment:
Here is the reason. Starting from Python 2.6, classes can redefine
subclass checking using a special method named __subclasscheck__. Since
this method can contain arbitrary code, we have to guard against
recursion when calling it. Therefore, the
Zooko O'Whielacronx zo...@zooko.com added the comment:
doko: thanks for your interest encouraging more formal and generic
solutions to this.
For what it is worth, the current version of my patch (used in Tahoe) is
here:
Nathaniel Troutman locutusofbe...@yahoo.com added the comment:
I believe I've tracked down the problem. When you run a python module
directly (ie python Foo.py) any classes defined in the module have
their '__module__' attribute set to '__main__'. Which means the pickle
says the class is in
New submission from Ramsey Dow yes...@speakeasy.net:
I couldn't install setuptools (required by gitosis) because Python 2.6.1
didn't install socket when I built it. A little digging and I
uncommented the _socket socketmodule.c line in Modules/Setup.
Unfortunately, the Bluetooth socket stuff in
New submission from J.R. Allen pyt...@petruchio.org:
Currently the zipfile.ZipFile class has no __exit__ atribute, so it
does not work with a with statement as other file objects do. Can this
be implemented?
--
components: Library (Lib)
messages: 83768
nosy: petruchio
severity:
Changes by Benjamin Peterson benja...@python.org:
--
stage: - needs patch
versions: +Python 2.7, Python 3.1 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5511
___
Mark Dickinson dicki...@gmail.com added the comment:
It looks like that did the trick. Thank you!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1222
___
Benjamin Peterson benja...@python.org added the comment:
Implementing this may be difficult (the module may not be on the search
path when its run and there's no way to determine that). Also, it would
break compatibility. Anyway, it's usually better to define classes that
will be pickled in
Rudd-O rud...@rudd-o.com added the comment:
ahaha! I have the patch that implements this functionality.
1) it renames the RPM package name to python-%packagename-py2.4 and and
its requirements as well.
2) it autooptimizes (-O1) any RPM built if no optimization has been
configured in setup.cfg,
Mark Dickinson dicki...@gmail.com added the comment:
Committed 30bit_longdigit20.patch to py3k in r70460, with some minor
variations (incorporate Nick Coghlan's improved error messages
for marshal, fix some comment typos, add whatsnew and Misc/NEWS entries).
Thanks all for your feedback.
I
Mark Dickinson dicki...@gmail.com added the comment:
That should be r70459, of course.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4258
___
Antoine Pitrou pit...@free.fr added the comment:
Great!
Committed 30bit_longdigit20.patch to py3k in r70460, with some minor
variations (incorporate Nick Coghlan's improved error messages
for marshal, fix some comment typos, add whatsnew and Misc/NEWS entries).
--
Lars Gustäbel l...@gustaebel.de added the comment:
At the moment, I am unable to reproduce the problem you describe. I
tried several combinations of what I think you could have meant, but
everything seems to work okay here.
Could you please provide some stand-alone testcase or code to illustrate
Benjamin Peterson benja...@python.org added the comment:
Fixed in r70463.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4034
___
Benjamin Peterson benja...@python.org added the comment:
I'm rejecting this patch again not because I think it's any worse than
the status quo (I think they're about equally incorrect/correct), but
because this is now released behavior and changing it may result in
backwards incompatibility.
Jean-Paul Calderone exar...@divmod.com added the comment:
I think the policy is to mirror all possible O_* constants, even if they
are of no use in Python. For example, we also have os.O_DIRECTORY.
Not disagreeing with the conclusion of this ticket, but I would like to
point out that
STINNER Victor victor.stin...@haypocalc.com added the comment:
@benjamin.peterson: Cool! Thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4034
___
New submission from Mark Dickinson dicki...@gmail.com:
Here's a patch that streamlines the x_divrem function in
Objects/longobject.c. More benchmarks are needed, but the initial
results are promising: for py3k, on a 32-bit machine with 15-bit
digits, Victor's pidigits benchmark runs almost
STINNER Victor victor.stin...@haypocalc.com added the comment:
Would it be possible to include integer benchmark tools to upstream? I
mean the pidigit tool (I didn't wrote this test! I just ported it to
Python3) and maybe my bench_int tool. It could useful to reproduce
the benchmark on
New submission from Mitchell Model m...@acm.org:
MAIN POINT
The Python 3 What's New should SCREAM that the type file is gone, not
just that people should use the function open() to open files, since
that has been a recommendation for quite a while.
EXPLANATION
In multiple readings of the
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I'm working on the whatsnew updates and will make sure this is clear.
--
assignee: georg.brandl - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
Mark Dickinson dicki...@gmail.com added the comment:
Sounds good to me! An integer benchmark script in the Tools/ directory
would be handy.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5512
Antoine Pitrou pit...@free.fr added the comment:
Well, the original code in pidigits is by me :-) (although it's not
stated in the source file).
I haven't tried the patch but the performance work you're doing is
really impressive, Mark!
--
nosy: +pitrou
STINNER Victor victor.stin...@haypocalc.com added the comment:
Updated version of my macros patch for PyLong type:
- patch for Python trunk
- define 3 macros: PyLong_SIGN(x), PyLong_EQUALS_ZERO(x),
PyLong_NDIGITS(x)
- just replace code by the equivalent macros
The goal is the make the code
Antoine Pitrou pit...@free.fr added the comment:
Results here (Athlon X2 3600+ with gcc in 64-bit mode with 30-bit
digits), pidigits_bestof.py 2000:
- unpatched: 1644.9 ms
- patched: 694.8 ms
!
--
___
Python tracker rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com added the comment:
Useful informations for an integer benchmark:
- CPU type: 32 or 64 bits, endian
- Memory size
- Python version
- Informations about how Python was compiled
- Integer implementation: use int_info when it's available, otherwise
Mark Dickinson dicki...@gmail.com added the comment:
[Antoine]
Well, the original code in pidigits is by me :-)
Apologies for the misattribution!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5512
Mark Dickinson dicki...@gmail.com added the comment:
Here's the version of pidigits that I was using.
--
Added file: http://bugs.python.org/file13370/pidigits_bestof.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5512
New submission from Jack Howarth howa...@bromo.med.uc.edu:
The libpython3.0.a created for Python 3.0.1 isn't a normal static
library.
file
/System/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/c
onfig/libpython3.0.a
STINNER Victor victor.stin...@haypocalc.com added the comment:
New version of pidigit:
- works on python 2.6, trunk and py3k
- display Python version, CPU info (bits, endian), PyLong info (base,
digit size)
- display usage if no argument is given
--
Added file:
STINNER Victor victor.stin...@haypocalc.com added the comment:
Oh, there is no version number of the benchmark tool itself!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5512
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
My numbers:
# No patch
$ ./python /home/haypo/pidigits-2.py 3000
Python 3.1a1+ (py3k:70466, Mar 18 2009, 23:56:06)
[GCC 4.3.2]
CPU: 64 bits, little endian
PyLong: base=2^30, sizeof(digit)=32 bits
(...)
Best Time; 2300.2 ms
# With
Rudd-O rud...@rudd-o.com added the comment:
Improved version of the autonaming patch, now makes rpmbuild accept
files that were installed with spaces on their names.
--
Added file:
http://bugs.python.org/file13372/python-2.4-distutils-bdist_rpm-autonames+optimize-v2.patch
New submission from Eric Smith e...@trueblade.com:
I think the way leading zero padding is handled for int and float by
format's 'n' code is a bug.
import locale
locale.setlocale(locale.LC_ALL, 'en_US.UTF8')
'en_US.UTF8'
format(12345, '010n')
'12,345'
format(12345, '09n')
'00012,345'
New submission from Jess Austin jess.aus...@gmail.com:
While the datetime.date and datetime.datetime classes consistently
handle mixed-type comparison, their subclasses do not:
from datetime import date, datetime, time
d = date.today()
dt = datetime.combine(d, time())
d == dt
False
dt == d
Changes by Jess Austin jess.aus...@gmail.com:
--
title: equality not reflixive for subclasses of datetime.date and
datetime.datetime - equality not reflexive for subclasses of datetime.date and
datetime.datetime
___
Python tracker
Changes by Jess Austin jess.aus...@gmail.com:
--
title: equality not reflexive for subclasses of datetime.date and
datetime.datetime - equality not symmetric for subclasses of datetime.date and
datetime.datetime
___
Python tracker
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I concur with your plan.
BTW, have you checked to see what Java and C# do?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5515
Tennessee Leeuwenburg tleeuwenb...@gmail.com added the comment:
I might start trawling through these issues, slowly ticking them off. Thanks
for the links.
-T
On Wed, Mar 18, 2009 at 1:17 PM, David W. Lambert rep...@bugs.python.orgwrote:
David W. Lambert lamber...@corning.com added the
70 matches
Mail list logo