David M. Beazley beaz...@users.sourceforge.net added the comment:
An apology on the delay. Things have been rather hectic.
Regarding a patch, I don't really have a patch so much as a suggested
procedure. Basically, I'm suggesting that the maintainers of the
library documentation simply do
New submission from David M. Beazley beaz...@users.sourceforge.net:
Consider a socket that has had a file-like wrapper placed around it
using makefile()
# s is a socket created previously
f = s.makefile()
Now, suppose that this socket has had a timeout placed on it.
s.settimeout(15)
If you
David M. Beazley beaz...@users.sourceforge.net added the comment:
Placing a note in the standard library documentation would be a start.
Just say in Python 3.0 it always returns the result as an unsigned
integer whereas in Python 2.6 a 32-bit signed integer is returned.
Although
New submission from David M. Beazley beaz...@users.sourceforge.net:
The result of binascii.crc32() is different on the same input in Python
2.6/3.0. For example:
Python 2.6:
binascii.crc32('Hello')
-137262718
Python 3.0:
binascii.crc32(b'Hello')
4157704578
--
components: Library
David M. Beazley beaz...@users.sourceforge.net added the comment:
Can someone PLEASE make sure this gets documented someplace.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4903
David M. Beazley beaz...@users.sourceforge.net added the comment:
One further followup just to make sure I'm clear.
Is it always safe to pass the result of locals() into exec and extract
the result as shown in my example?
Since I'm writing about this in a book, I just want to make
New submission from David M. Beazley beaz...@users.sourceforge.net:
Please forgive me, but I'm really trying to wrap my brain around the
behavior of exec() in Python 3. Here's a quote from the documentation:
In all cases, if the optional parts are omitted, the code is
executed
New submission from David M. Beazley beaz...@users.sourceforge.net:
In the ctypes reference / Finding shared libraries section of the ctypes
documentation, the find_library() function is described as being located
in ctypes.util. However, it's formal description right below that lists
New submission from David M. Beazley beaz...@users.sourceforge.net:
Documentation for the json module in Python 2.6 and Python 3.0 doesn't
have any description for load() or loads() even though both functions are
used in the examples.
--
assignee: georg.brandl
components
New submission from David M. Beazley beaz...@users.sourceforge.net:
The json module is described as having an interface similar to pickle:
json.dump()
json.dumps()
json.load()
json.loads()
I think it would be a WISE idea to add a huge warning message to the
documentation
New submission from David M. Beazley beaz...@users.sourceforge.net:
The strict parameter to JSONDecoder() is undocumented and is confusing
because someone might assume it has something to do with the encoding
parameter or the general handling of parsing errors (which it doesn't).
As far as I
David M. Beazley beaz...@users.sourceforge.net added the comment:
Just consider me to be an impartial outside reviewer. Hypothetically,
let's say I'm a Python programmer who knows a thing or two about
standard library modules (like pickle), but I'm new to JSON so I come
looking at the json
David M. Beazley beaz...@users.sourceforge.net added the comment:
Thanks! Hopefully I'm not giving you too much work to do :-).
Cheers,
Dave
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4783
New submission from David M. Beazley beaz...@users.sourceforge.net:
Not a bug, but a question to developers:
Is xml.etree.ElementTree going to be the only standard library module in
Python 3.0 that doesn't follow the standard Python 3.0 module naming
conventions? (e.g., socketserver
New submission from David M. Beazley beaz...@users.sourceforge.net:
Documentation for the email package needs to be more clear about the
usage of strings and bytes. In particular:
1. All operations that parse email messages such as message_from_file()
or message_from_string() operate
New submission from David M. Beazley beaz...@users.sourceforge.net:
The documentation describes classes such as
email.mime.MIMEText()
email.mime.MIMEMultipart()
email.mime.MIMEApplication()
etc...
However, it's confusing because none of these classes are actually found
in email.mime.
Suggest
New submission from David M. Beazley beaz...@users.sourceforge.net:
The email.generator.Generator class does not work correctly message
objects created with binary data (MIMEImage, MIMEAudio, MIMEApplication,
etc.). For example:
from email.mime.image import MIMEImage
data = open(IMG.jpg,rb
New submission from David M. Beazley beaz...@users.sourceforge.net:
The whole point of base64 encoding is to safely encode binary data into
text characters. Thus, the base64.b64decode() function should equally
accept text strings or binary strings as input. For example, there is a
reasonable
David M. Beazley beaz...@users.sourceforge.net added the comment:
Note: This problem applies to all of the other decoders/encoders in the
base64 too (b16, b32, etc.)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4769
New submission from David M. Beazley beaz...@users.sourceforge.net:
See Issue 4869 for a related bug.
Most of the functions in binascii are meant to go from binary data to
textual representations (hex digits, base64, binhex, etc.). There are
numerous problems:
1. Misleading error messages
David M. Beazley beaz...@users.sourceforge.net added the comment:
Given the low-level nature of this module, I can understand the
motivation to make it all bytes.
However, I'm going to respectfully disagree with that and claim that
making binascii all bytes really goes against the whole
New submission from David M. Beazley beaz...@users.sourceforge.net:
The hashlib documentation has incorrect examples showing the use of the
hexdigest() method:
hashlib.sha224(bNobody inspects the spammish
repetition).hexdigest()
b'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2
David M. Beazley beaz...@users.sourceforge.net added the comment:
The digest() method of hashes does produce bytes (correct). The
hexdigest() method produces a string, but it is also shown as producing
bytes in the examples.
___
Python tracker rep
New submission from David M. Beazley beaz...@users.sourceforge.net:
A file-like object u returned by the urlopen() function in both Python
2.6/3.0 has a method info() that returns a 'HTTPMessage' object. For
example:
::: Python 2.6
from urllib2 import urlopen
u = urlopen(http
David M. Beazley beaz...@users.sourceforge.net added the comment:
Verified that 2to3 does not fix this.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4773
David M. Beazley beaz...@users.sourceforge.net added the comment:
Just a followup comment to note that adding support for
sendmsg()/recvmsg() is what you need to do file descriptor passing
between processes on Unix---another technique for writing network servers
New submission from David M. Beazley beaz...@users.sourceforge.net:
I have recently completed a pretty thorough survey of library
documentation for Python 3.0 in conjunction with an update I'm making to
my book. This issue is not so much a bug as a documentation request.
For all
David M. Beazley beaz...@users.sourceforge.net added the comment:
Bump. This functionality seems to be needed if anyone is going to be
messing around with advanced features of IPv6. As it stands, the socket
module in Python 2.6/3.0 is incomplete without this.
--
nosy: +beazley
New submission from David M. Beazley beaz...@users.sourceforge.net:
The documentation for asynchat needs to be more precise in its use of
strings vs. bytes. Unless the undocumented use_encoding attribute is
set, it seems that all data should be bytes throughout (e.g., the
terminator, inputs
New submission from David M. Beazley beaz...@users.sourceforge.net:
The documentation for Proxy Objects in the multiprocessing module
describes a method _call_method and gives various examples. The only
problem is that the method is actually called _callmethod (i.e., no
underscore between
David M. Beazley beaz...@users.sourceforge.net added the comment:
The _get_value() method is also in error. It's called _getvalue() in
the source code.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4694
New submission from David M. Beazley beaz...@users.sourceforge.net:
In the Address Formats part of the Listeners and Clients section of
the documentation for the multiprocessing module, AF_PIPE addresses are
described as having this format:
r'ServerName\\pipe\\PipeName'
However
New submission from David M. Beazley beaz...@users.sourceforge.net:
The ConfigParser module defines a variety of custom exceptions, many of
which take more than one argument (e.g., InterpolationError,
NoOptionError, etc.). However, none of these exceptions properly set
the .args attribute
David M. Beazley beaz...@users.sourceforge.net added the comment:
I wish I shared your optimism about this, but I don't. Here's a short
explanation why.
The problem of I/O and the associated interface between hardware, the
operating system kernel, and user applications is one of the most
David M. Beazley beaz...@users.sourceforge.net added the comment:
Good luck with that. Most people who get bright ideas such as gee,
maybe I'll write my own version of X where X is some part of the
standard C library pertaining to I/O, end up fighting a losing battle.
Of course, I'd love
David M. Beazley beaz...@users.sourceforge.net added the comment:
I agree with Raymond. For binary reads, I'll go farther and say that
even a 10% slowdown in performance would be surprising if not
unacceptable to some people. I know that as hard as it might be for
everyone to believe
New submission from David M. Beazley [EMAIL PROTECTED]:
The documentation for the apply() and apply_async() methods of a Pool
object might emphasize that these operations execute func(*args,**kwargs)
in only one of the pool workers and that func() is not being executed in
parallel on all
David M. Beazley [EMAIL PROTECTED] added the comment:
Actually, you shouldn't discount the potential usefulness of running
apply() in all of the worker nodes. A lot of people coming from
parallel programming know about things like global broadcasts,
reductions, and so forth. For example
David M. Beazley [EMAIL PROTECTED] added the comment:
I've done some profiling and the performance of reading line-by-line is
considerably worse in Python 3 than in Python 2. For example, this
code:
for line in open(somefile.txt):
pass
Ran 35 times slower in Python 3.0 than Python 2.6
David M. Beazley [EMAIL PROTECTED] added the comment:
Tried this using projects/python/branches/release30-maint and using the
patch that was just attached. With a 66MB input file, here are the
results of this code fragment:
for line in open(BIGFILE):
pass
Python 2.6: 0.67s
Python 3.0
David M. Beazley [EMAIL PROTECTED] added the comment:
Just as one other followup, if you change the code in the last example
to use binary mode like this:
for line in open(BIG,rb):
pass
You get the following results:
Python 2.6: 0.64s
Python 3.0: 42.26s (66 times slower
David M. Beazley [EMAIL PROTECTED] added the comment:
Just checked it with branches/py3k and the performance is the same.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4561
David M. Beazley [EMAIL PROTECTED] added the comment:
bash-3.2$ uname -a
Darwin david-beazleys-macbook.local 9.5.1 Darwin Kernel Version 9.5.1: Fri
Sep 19 16:19:24 PDT 2008; root:xnu-1228.8.30~1/RELEASE_I386 i386
bash-3.2$ ./python.exe -c import sys; print(sys.version)
3.1a0 (py3k:67609, Dec 6
David M. Beazley [EMAIL PROTECTED] added the comment:
I agree with previous comments that write() should definitely write all
data when in blocking mode.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4428
New submission from David M. Beazley [EMAIL PROTECTED]:
Is the following code valid Python 3 or not?
def foo():
x = 1
exec(x = 42)
print(x)# Prints 1 (exec has no effect)
I know there are a variety of issues surrounding exec(), function
bodies, and other matters. Just
David M. Beazley [EMAIL PROTECTED] added the comment:
For what it's worth, I hope this behavior gets well-documented. Thanks.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4447
New submission from David M. Beazley [EMAIL PROTECTED]:
The Buffered I/O interface in the io module has the user specify buffer
limits such as size and max_buffer_size. The first limit (size) is
easy to understand as a buffering threshold at which writes will occur.
However, no apparent
New submission from David M. Beazley [EMAIL PROTECTED]:
The FileIO object defined in the new io library has name and mode
properties. However, attempts to access either value result in an
AttributeError exception. The C source code in _fileio.c doesn't even
implement a name attribute
David M. Beazley [EMAIL PROTECTED] added the comment:
Just a quick comment from the Python training universe--this bug makes it
impossible to use Python 2.6 in any kind of Python teaching environment
where IDLE tends to be used a lot. I'm having to tell students to stick
with Python-2.5.2
49 matches
Mail list logo