[issue4104] Namespace inconsistency

2008-10-17 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: I consider the request invalid. Continue the example with B=A.B B The repr of an object cannot now and should not depend on the access path. =or= class C: pass class D: pass D C.D = D C.D Same comment. -- nosy: +t

[issue4113] functools.partial(), no __name__; wrong __doc__

2008-10-17 Thread Terry J. Reedy
Changes by Terry J. Reedy <[EMAIL PROTECTED]>: -- components: +Library (Lib) -Extension Modules versions: +Python 2.7, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4113] functools.partial(), no __name__; wrong __doc__

2008-10-17 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Same in 3.0 -- nosy: +tjreedy ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue4153] Unicode HOWTO up to date?

2008-10-20 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: The Unicode HOWTO begins with "Warning This HOWTO has not yet been updated for Python 3000’s string object changes." Without reading in detail, it appears it has been updated, at least somewhat, and certainly more than I

[issue4175] Should Unix-only tty be present in Windows /Lib?

2008-10-22 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: As long as tty is *nix only and does not have a msvcrt-based implementation (which I presume is not exactly possible), I think it should be absent, just like termios is. >>> import tty Traceback (most recent call last):

[issue2275] urllib2 header capitalization

2008-10-25 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: I have attached a patch that just: * Improves doctests a bit * Changes .get_headers() and .has_header() to be case-insensitive * Documents .get_header() and .header_items(), fixes some incorrectly-documented argument names, and notes th

[issue2275] urllib2 header capitalization

2008-10-25 Thread John J Lee
Changes by John J Lee <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11887/issue2775-problems.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-10-25 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: I agree there is a bug here: clearly the methods on the Request class are inconsistent with AbstractHTTPHandler.do_open() . I think Facundo's patch is good, though it needs a test. The general principle when fixing earlier bugs ha

[issue3924] cookielib chokes on non-integer cookie version, should ignore it instead

2008-10-25 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: Patch with tests attached. The patch is slightly different to my first suggestion: in the patch, invalid version values cause the cookie to be ignored (but double quotes around valid versions are fine). -- keywords: +patch Adde

[issue3924] cookielib chokes on non-integer cookie version, should ignore it instead

2008-10-25 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: The bug is present on trunk and on the py3k branch, so I've selected versions "Python 2.7" and "Python 3.0" This is a straightforward bug, so I selected 2.5.3 and 2.6 also, to indicate this is a candidate for b

[issue4243] has_key doc could be clearer

2008-10-30 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: 2.6 lib ref builtin types, mappings, has_key doc now says "dict.has_key(key) is equivalent to key in d, but deprecated." Posters on c.l.p found this confusing. Which is deprecated? I agree that this could be confusi

[issue4243] has_key doc could be clearer

2008-10-31 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: I believe "deprecated" at the end is the sort of dangling modifier deprecated by English style books I have read. I felt it to be sufficiently awkward and potentially confusing, at least for a moment, to be worth a few minut

[issue4220] Builtins treated as free variables?

2008-10-31 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: The request as stated is invalid. 'Int' and 'long' are built-in names, not keywords. The context of the cited sentence is "If a name is bound in a block, it is a local variable of that block, unless declared

[issue4220] Builtins treated as free variables?

2008-10-31 Thread Terry J. Reedy
Changes by Terry J. Reedy <[EMAIL PROTECTED]>: -- versions: +Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4220> ___ __

[issue4221] inconsistent exception from int is confusing

2008-11-01 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: You tested on 2.5.2 but marked this for 2.6. 3.0 gives >>> int('\0') Traceback (most recent call last): File "", line 1, in int('\0') UnicodeEncodeError: 'decimal' codec can&#

[issue4243] has_key doc could be clearer

2008-11-01 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Benjamin: I thank you too for verifying that I was not crazy. Martin: I noticed native/non-native split too, and chalked it up to a subtle difference between German and English. For future reference, the problem with the original, as

[issue4280] Version Checker

2008-11-07 Thread Colin J. Williams
New submission from Colin J. Williams <[EMAIL PROTECTED]>: Versions 2.5, 2.6 and 3.0 contain a Version Checker in the Tools directory. This appears to no longer serve a useful purpose. Perhaps it can be dropped from the distribution. Colin W -- components: Tests

[issue4246] execution model - clear and complete example in documentation

2008-11-07 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Your example seem too verbose and diffuse. Perhaps something more focused on what people do wrong would be more helpful. I presume you mean something like this -- with or without x=2 before the def. >>> def f(): prin

[issue4249] HTTPResponse instance has no attribute 'code'

2008-11-07 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: You should have edited the title and added a note here instead of opening a new issue to clarify that the problem is in urllib2.py. Anyway, closing this in favor of issue 4250 -- nosy: +tjreedy resolution: -> duplicate sta

[issue4250] urllib2.py: HTTPResponse instance has no attribute 'code'

2008-11-07 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: This appears to be a duplicate of #1507166, with essentially the same title. I found it by searching all issues for "response.code HTTPResponse". That was closed because "The problem came from an external module (urlgra

[issue4262] import and compile() do not treat trailing whitespace the same

2008-11-07 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Both differences are covered in the 2.x docs: "When compiling multi-line statements, two caveats apply: line endings must be represented by a single newline character ('\n'), and the input must be terminated by at least

[issue4118] Built-in compile() and ast module doc issues

2008-11-07 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: It appears that blanks on the last line also triggers a syntax error. See #4262. So the situation seems to be that the input must *sometimes* be terminated by . So adding 'sometimes' is the only change I would make, b

[issue4118] Built-in compile() and ast module doc issues

2008-11-07 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: The 2.6 sentence that got deleted in 3.0: I at least somewhat agree. "When compiling a string with multi-line statements, two caveats apply: line endings must be represented by a single newline character ('\n'),

[issue3679] pressing HOME key in IDLE editor ends IDLE

2008-11-14 Thread Terry J. Reedy
Changes by Terry J. Reedy <[EMAIL PROTECTED]>: -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue4330] wsgiref.validate doesn't accept arguments to readline

2008-11-15 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: No, it shouldn't. The purpose of wsgiref.validate is to validate spec compliance, and the use of a readline() argument means that the program doing the invocation is not valid, per the spec. wsgiref.validate is correctly re

[issue4330] wsgiref.validate doesn't accept arguments to readline

2008-11-15 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Uh, Ian, do you not remember being the person who *wrote* this code a few years ago? This is the old paste.lint with a little renaming. Of course it can be used with existing code -- code that complies with the WSGI spec. It

[issue4330] wsgiref.validate doesn't accept arguments to readline

2008-11-16 Thread Phillip J. Eby
Phillip J. Eby <[EMAIL PROTECTED]> added the comment: Then obviously it makes no sense to update wsgiref before the spec. ISTM the correct way to deal with this is update the cgi module to include a WSGI-compatible API. ___ Python tracker <[EMAIL

[issue4339] Fix set-like dictview doc

2008-11-17 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: I see two problems with the current (.rc2) doc on "Dictionary view objects" that are set-like. 1. The first paragraph of the section ends with the fragment "The keys and items views have a set-like character since th

[issue4341] Update __hash__ doc

2008-11-17 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: Language/data model/special method names/ __hash__ Sentence 1: "Called for the key object for dictionary operations, and by the built-in function hash()." Also called for the members of set and frozenset (and any ot

[issue2736] datetime needs and "epoch" method

2008-11-18 Thread Anders J. Munch
Anders J. Munch <[EMAIL PROTECTED]> added the comment: Any thoughts to time zone/DST handling for naive datetime objects? E.g. suppose the datetime object was created by .utcnow or .utcfromtimestamp. For aware datetime objects, I think the time.mktime(dt.timetuple()) approach doesn'

[issue4348] bytearray methods returning self

2008-11-18 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: I verified that the results for 3.0c2 are False (correct) and True (bug). Guido today on pydev: this is a bug IMO and we should fix it in 2.6.1 and 3.0rc3 -- nosy: +tjreedy ___ Python t

[issue4348] bytearray methods returning self

2008-11-18 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Since 3.0c2 bytearray.translate() *does* return self with no change, I don't understand your first comment, unless you meant 'is' instead of 'is not'. But I presume merging forward will fix it. ___

[issue4372] __cmp__ removal not in What's New

2008-11-20 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: What's New in Python 3.0/Common stumbling blocks has this "builtin.sorted() and list.sort() no longer accept the cmp argument providing a comparison function. Use the key argument instead." Please add "The __

[issue4328] "à" in u"foo" raises a misleading error

2008-11-21 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: | but then it works with: | >>> b'f' in 'foo' | True Not True in 3.0rc3. Same message as you quoted: 'in ' requires string as left operand, not bytes bytes

[issue4329] base64 does not properly handle unicode strings

2008-11-21 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: "This module provides data encoding and decoding as specified in RFC 3548. This standard defines the Base16, Base32, and Base64 algorithms for encoding and decoding arbitrary binary strings into text strings that can be safely se

[issue4329] base64 does not properly handle unicode strings

2008-11-21 Thread Terry J. Reedy
Changes by Terry J. Reedy <[EMAIL PROTECTED]>: -- resolution: fixed -> invalid ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4329> ___ _

[issue4387] binascii b2a functions accept strings (unicode) as data

2008-11-21 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: Binascii b2a_xxx functions accept 'binary data' and return ascii-encoded bytes. The corresponding a2b_xxx functions turn the ascii-encoded bytes back to 'binary data' (bytes). If the binary data is bytes, these

[issue4337] Iteration over a map object with list()

2008-11-21 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Dict views and range objects are *iterables* because they are based on reusable information. Map, filter, and similar objects are *iterators* because they are based on iterables that could be once-through iterators. The built-in fu

[issue4356] Add "key" argument to "bisect" module functions

2008-11-21 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Just a reminder that __cmp__ is gone in 3.0. I presume bisect, like sort, only requires __lt__ and perhaps __eq__, though I can find no doc of either. -- nosy: +tjreedy ___ Python tracker &

[issue4361] Docstring for "Lib/string.py" is outdated

2008-11-21 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: In rc3 also: The problem is partial update: DESCRIPTION Public module variables: whitespace -- a string containing all characters considered whitespace lowercase -- a string containing all characters considered low

[issue4395] Document auto __ne__ generation

2008-11-23 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: 3.0c3 doc (Basic customization) says "There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false. Accordingly, when defining __eq__(), one should also define __ne__()

[issue4401] os.extsep status? doc or os bug?

2008-11-23 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: 3.0c3 Manual (as with 2.x): os.extsep The character which separates the base filename from the extension; for example, the '.' in os.py. Also available via os.path. 3.0c3 >>> import os >>> os.extse

[issue4401] os.extsep status? doc or os bug?

2008-11-24 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: For more information: in 3.0, os.curdir, os.pardir, os.sep, os.altsep, os.pathsep, os.defpath, and os.devnull are also in os.path. Only os.extset was removed from os. Among the sysinfo constants, only os.linesep was not in os.path. I

[issue4329] base64 does not properly handle unicode strings

2008-11-26 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: 2.6 is, as far as I know, intended to be backwards compatible except for where it fixes bugs. Upgrading to 2.6 does (should) not change strings (type str) to unicode. Only importing the appropriate __future__ or upgrading to 3.0 w

[issue4441] Improve os open flag options doc

2008-11-26 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: os module doc, File Descriptor Operations, at end. Suggestions: 1. Replace "The following data items are available for use in constructing the flags parameter to the open() function." with "The following data item

[issue4454] Coding cookie crashes IDLE

2008-11-28 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: Running the following from an edit window with F5 in IDLE 3.0c3 causes a complete crash. Both edit window and shell window disappear. # -*- coding: utf-8 -*- The is copied from what IDLE said to add when I previously ran file wi

[issue1693050] \w not helpful for non-Roman scripts

2008-11-28 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Vowel 'marks' are condensed vowel characters and are very much part of words and do not separate words. Python3 properly includes Mn and Mc as identifier characters. http://docs.python.org/dev/3.0/reference/lexical_analysis.

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-11-28 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: This is still a problem on my WinXP 3.0rc3 with # -*- coding: utf-8 -*- in a file but not with the same pasted directly into the shell Window. -- nosy: +tjreedy type: -> crash ___ Pytho

[issue4454] Coding cookie crashes IDLE

2008-11-28 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: WinXP And sorry for dup. I searched IDLE items for 'crash' ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: This fix was applied in the wrong place. URI path components, and HTTP URI path components in particular, *can* be empty. See RFC 3986. So the comment in the code that was inserted with the fix for this bug that says "possibly ma

[issue3819] urllib2 sends Basic auth across redirects

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: I agree this is a bug. Senthil -- re "1)", the paragraph you refer to (quoted by the OP) is relevant. The fact that it doesn't specifically mention redirection is not relevant. Re "2)": I don't know how dige

[issue1205] urllib fail to read URL contents, urllib2 crash Python

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: This is fixed in trunk r61034 by issue #900744 . Please use that issue for any discussion re whether this should be fixed in 2.5. -- nosy: +jjlee ___ Python tracker <[EMAIL PROTECTE

[issue1537445] urllib2 httplib _read_chunked timeout

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: urlopen() raises URLError, .read() may raise other errors. I don't think that's a bug in itself, though no doubt: 1. The documentation of exceptions raised could and should be improved 2. The exceptions that can be raised

[issue1123695] attempting to use urllib2 on some URLs fails starting on 2.4

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: Can somebody close this? It's fixed on trunk in #900744 . ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pyt

[issue4492] httplib code thinks it closes connection, but does not

2008-12-02 Thread John J Lee
New submission from John J Lee <[EMAIL PROTECTED]>: The fix for #900744 tried to close the connection when a bad chunk length was received. The comment inserted with that fix "close the connection as protocol synchronisation is probably lost" is incorrect: self.close() in _read_

[issue900744] catch invalid chunk length in httplib read routine

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: The fix for this doesn't actually close the connection as the comment in the fix claims -- I've raised #4492 to track that. -- nosy: +jjlee ___ Python tracker <[EMAI

[issue1411097] httplib patch to make _read_chunked() more robust

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: For the record, I think my worry in msg49366 was a non-issue: the only time .readline() will return "" is when the connection has closed (so I think the fix that eventually applied is correct). __

[issue1772481] urllib2 hangs with some documents.

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: Please close: this is already fixed on trunk and release25-maint (r60747, issue #1966) (and on release26-maint, which was branched after the fix). -- nosy: +jjlee ___ Python tracker <[EMAIL

[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: This bug was known before the release -- unfortunately the original author of the patch didn't fix them in time. This and some other unresolved issues listed are listed on #2451. "Somebody" should raise bugs about the rest

[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2008-12-02 Thread John J Lee
Changes by John J Lee <[EMAIL PROTECTED]>: -- nosy: +facundobatista ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4079> ___ __

[issue4493] urllib2 doesn't always supply / where URI path component is empty

2008-12-02 Thread John J Lee
New submission from John J Lee <[EMAIL PROTECTED]>: As required by RFC 2616 section 3.2.2, for all HTTP requests sent by urllib2, the path component of the URI should be normalized to "/" before the Request-URI derived from it gets passed to httplib (or something functionally eq

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: I've raised #4493 about the issue I raised in my previous comment. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue4496] misleading comment in urllib2

2008-12-02 Thread John J Lee
New submission from John J Lee <[EMAIL PROTECTED]>: r54137 replaced a comment in urllib2.py with a misleading comment. The comment now implies the .insort() in question achieves the goal specified in the new comment. That's not true, which was the reason the original comment was t

[issue4496] misleading comment in urllib2

2008-12-02 Thread John J Lee
Changes by John J Lee <[EMAIL PROTECTED]>: -- components: +Library (Lib) nosy: +facundobatista versions: +Python 2.7, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1401] urllib2 302 POST

2008-12-02 Thread John J Lee
John J Lee <[EMAIL PROTECTED]> added the comment: I think this was actually not a bug, and the fix should not have been applied. I guess this comment is just "for the record", as the fix is probably cruft that can't be removed now, since people will have started relying

[issue4513] Finish updating zip docstring

2008-12-03 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: >>> help(zip) #3.0 class zip(object) | zip(iter1 [,iter2 [...]]) --> zip object | | Return a zip object whose .__next__() method ... StopIteration. | Works like the zip() | function but consumes less memo

[issue4527] Obsolete 'string or unicode' in fractions doc

2008-12-04 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: "The last version of the constructor expects a string or unicode instance in one of two possible forms. " Delete 'or unicode' (bytes do not work). Doc string is ok. -- assignee: georg.brandl componen

[issue4533] 3.0 file.read dreadfully slow

2008-12-04 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: C.l.p poster reported that 3.0 file.read is orders of magnitude slower than with 2.5 (but confused issue with buffer = 0). Jerry Hill reported "Here's a quick comparison between 2.5 and 3.0 on a relatively small 17

[issue4543] container constructors destroy argument

2008-12-04 Thread Kevin J. Woolley
New submission from Kevin J. Woolley <[EMAIL PROTECTED]>: Doing the following (more info than necessary in case I'm doing something weird): def odd(n): return n % 2 x = (1, 2, 3, 4, 5) y = filter(odd, x) list(y) list(y) Will correctly build a list from y and return [1, 3, 5] o

[issue826897] Proto 2 pickle vs dict subclass

2008-12-05 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: James Stroud ran into this same issue with 2.5. Here is his 'ugly fix' for working with protocol 2 only. class DictPlus(dict): def __init__(self, *args, **kwargs): self.extra_thing = ExtraThingClass() dict.__in

[issue4481] Windows installer crash

2008-12-05 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Yes, just as one uses the x86 installer for 32-bit amd chips, like mine ;-) -- nosy: +tjreedy resolution: -> invalid status: open -> closed ___ Python tracker <[EMAIL PR

[issue4488] Python Documentation not Newb Friendly

2008-12-05 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Yes, the new docs are much better. Methods are nicely identified in 2.6/3.0 docs that I checked. There is one category that is not: constants. For instance, the following is from the subprocess doc. "stdin, stdout and stderr

[issue4600] __class__ assignment: new-style? heap? == confusing

2008-12-08 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: ob.__class__ = ob2 gives some confusing TypeError messages. >>> c.__class__ = 1 Traceback (most recent call last): File "", line 1, in TypeError: __class__ must be set to new-style class, not 'int&#x

[issue4603] 3.0 document tab interpretation change

2008-12-08 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: In 2.6, Ref Manual / Lexical Analysis / Indentation says "First, tabs are replaced (from left to right) by one to eight spaces such that the total number of characters up to and including the replacement is a multiple of eig

[issue4600] __class__ assignment: new-style? heap? == confusing

2008-12-08 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Related issue that applies to recent 2.x. Language/data model/Objects, values, and types says 'An object’s type is also unchangeable.'. This should be changed or deleted. ___ Python

[issue4617] SyntaxError when free variable name is also an exception target

2008-12-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: -1 as I understand the proposal. Your code is bugged and should fail as soon as possible. If I understand correctly, you agree that the SyntaxError is correct as the language is currently defined, but you want the definition changed. It is not clear if you

[issue4617] SyntaxError when free variable name is also an exception target

2008-12-12 Thread Phillip J. Eby
Phillip J. Eby added the comment: I could argue either way on this one; it's true that deleting a nested-scope variable is sometimes desirable, but it also seems to me like closing over an except: variable is a Potentially Bad Idea. In neither case, however, do I think it's appropria

[issue4669] bytes,join and bytearray.join not in manual; help for bytes.join is wrong.

2008-12-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am puzzled as to what you think is missing in the manual. "Bytes and Byte Array Methods Bytes and bytearray objects, being “strings of bytes”, have all methods found on strings, with the exception of encode(), format() and isidentifier(), which do not

[issue4718] wsgiref package totally broken

2008-12-22 Thread Phillip J. Eby
Phillip J. Eby added the comment: If you want to change to using bytes, you're going to have to take it to the Web-SIG and hash out a revision to PEP 333, which at the moment requires the use of strings, period. This has nothing to do with the desirability of bytes vs. strings; I am sure

[issue4718] wsgiref package totally broken

2008-12-22 Thread Phillip J. Eby
Phillip J. Eby added the comment: At 03:37 PM 12/22/2008 +, Antoine Pitrou wrote: >So, not accepting bytes in py3k is clearly a violation of the PEP! On the contrary. Please read the two paragraphs *after* the one you quoted. ___ Python tracker &l

[issue4718] wsgiref package totally broken

2008-12-22 Thread Phillip J. Eby
Phillip J. Eby added the comment: To be quite clear: this change requires discussion on the Web-SIG and an appropriate revision of the PEP. Ideally, the patch should include the necessary PEP revision. The Web-SIG discussion regarding a switch to bytes should also take into consideration the

[issue4718] wsgiref package totally broken

2008-12-23 Thread Phillip J. Eby
Phillip J. Eby added the comment: Antoine, you have three choices here: 1. Follow the PEP, 2. Take it to the Web-SIG and get the appropriate discussion, consensus, and PEP revision, or 3. Drop wsgiref from the current release of Py3K until #2 can be done. Which would you prefer? Please note

[issue4718] wsgiref package totally broken

2008-12-24 Thread Phillip J. Eby
Phillip J. Eby added the comment: Graham: thanks for pointing that out; I completely forgot we already *had* the migration discussion on the Web-SIG! It just slipped my mind because I didn't have any 3.0 work on the horizon. Dmitry: A question about the new patch. Are bytearra

[issue4793] Glossary incorrectly describes a decorator as "merely syntactic sugar"

2009-01-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Based on my reading of the pydev discussion, the doc correctly describes the design intent. If there is any bug, it is in the optimization of skipping the apparently redundant first name binding. I presume the thinking was that since the decorator gets the

[issue1202] zlib.crc32() and adler32() return value

2009-01-08 Thread J. David Ibáñez
J. David Ibáñez added the comment: I believe I have hit this bug. With Python 2.6.1 in a Gentoo Linux 64 bits. This code: from zipfile import ZipFile inzip = ZipFile('Document.odt') outzip = ZipFile('out.zip', 'w') for f in inzip.infolist():

[issue4857] syntax: no unpacking in augassign

2009-01-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: The grammar in the doc is not the one used to generate the parser/compiler. The former is meant to be easier for humans to read, the latter easier for the parser generator. Neither completely embody Python's syntax rules. Additional restrictions m

[issue4927] Inconsistent unicode repr for fileobject

2009-01-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think path names should be printed with forward slashes on Windows as well as elsewhere to avoid this type of confusion, and this. >>> sb 'tmp\\foo' >>> print(sb) tmp\foo (Of course I know why.) Users have been advised on pyth

[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2009-01-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.0, WinXP import mimetypes print(mimetypes.guess_extension('image/jpeg')) mimetypes.init() print(mimetypes.guess_extension('image/jpeg')) gives .jpe .jpe I wonder at this answer since .jpg and occasionally .jpeg is standard in Windows u

[issue4965] Can doc index of html version be separately scrollable?

2009-01-16 Thread Terry J. Reedy
New submission from Terry J. Reedy : In the Windows help version of the docs that come with the Windows .msi installer, the index pane to the left scrolls separately from the content pane to the right. Very nice for jumping around even to other docs. In the html versions at docs.python.org

[issue4966] Improving Lib Doc Sequence Types Section

2009-01-16 Thread Terry J. Reedy
New submission from Terry J. Reedy : Issues and suggestions for Python Standard Library / Built-in Types / "Sequence Types — str, bytes, bytearray, list, tuple, range" 1. Put subsections in the same order as in the title and main section. In particular, move bytes/bytearray subsec

[issue4968] Clarify inspect.is method docs

2009-01-16 Thread Terry J. Reedy
New submission from Terry J. Reedy : inspect module in 3.0 .isclass: says "Return true if the object is a class." Since the issue of builtin versus Python coded is involved in all the other methods below, I would expand this to "Return true if the object is a class, whether bui

[issue4907] ast.literal_eval does not properly handled complex numbers

2009-01-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I assume from the discussion that the patch was accepted/committed and changed the resolution and stage field to match. FWIW, list displays, for instance, are not literals either but are successfully evaluated, so doing same for complex 'displays&#

[issue4914] trunc(x) erroneously documented as built-in

2009-01-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Confirmed for 3.0 that trunc does not exist in the builtins module and is not listed in the Built-in functions section but is listed in the Numeric Types section. So I agree "trunc(x) x truncated to Integral " should leave the Operation table. Yes,

[issue4955] inconsistent, perhaps incorrect, behavior with respect to entities parsed by xml.sax

2009-01-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Neither the title nor your two posts identify the module you think needs to be changed. Changing the title to include that might better get attention from someone who is familiar with that module and could deal with the request. -- nosy: +tjreedy

[issue4975] 3.0 base64 doc examples lack bytes 'b' indicator

2009-01-17 Thread Terry J. Reedy
New submission from Terry J. Reedy : This unconverted example in the 3.1a doc needs a 'b' for 'bytes' added before the three input and output string literals. >>> import base64 >>> encoded = base64.b64encode('data to be encoded') # here >&g

[issue5005] 3.0 sqlite doc: most refers to pysqlite2, use 2.x syntax.

2009-01-19 Thread Terry J. Reedy
New submission from Terry J. Reedy : 1. Several examples start with >>> from pysqlite2 import dbapi2 as sqlite3 Traceback (most recent call last): File "", line 1, in from pysqlite2 import dbapi2 as sqlite3 ImportError: No module named pysqlite2 I presume that sho

[issue5005] 3.0 sqlite doc: most examples refer to pysqlite2, use 2.x syntax.

2009-01-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: 3.0 sqlite doc: most refers to pysqlite2, use 2.x syntax. -> 3.0 sqlite doc: most examples refer to pysqlite2, use 2.x syntax. ___ Python tracker <http://bugs.python.org/iss

[issue4242] Classify language vs. impl-detail tests, step 1

2009-01-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Like Brett, I think the long term solution is to segregate implementation-specific tests into a separate file or subdirectory of files. Then the main directory of tests could (and I would like) constitute an executable definition-by-example for the language

[issue3871] cross and native build of python for mingw32 with distutils

2009-01-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Does this supercede #3754? If so, please add this as superseder and close it. -- nosy: +tjreedy ___ Python tracker <http://bugs.python.org/issue3

[issue5039] Adjust reference-counting note

2009-01-23 Thread Terry J. Reedy
New submission from Terry J. Reedy : Language / Data model / Objects, values and types (2.6-3.1) third paragraph, has the following note: "(Implementation note: the current implementation uses a reference-counting scheme with (optional) delayed detection of cyclically linked garbage,

<    13   14   15   16   17   18   19   20   21   22   >