[issue9800] Fast path for small int-indexing of lists and tuples
Mark Dickinson dicki...@gmail.com added the comment: A disadvantage of the patch is that ceval.c needs to know about the internal implementation of a PyLong. At the moment, this information is encapsulated only in Objects/longobject.c and a couple of other places (I think marshal.c). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9800 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10016] shutil.copyfile -- allow sparse copying
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10016] shutil.copyfile -- allow sparse copying
Tom Potts karake...@gmail.com added the comment: @pitrou Hmm... the online docs and the contents of the doc directory on the trunk branch say differently: Resize the stream to the given *size* in bytes (or the current position if *size* is not specified). The current stream position isn't changed. This resizing can extend or reduce the current file size. In case of extension, the contents of the new file area depend on the platform (on most systems, additional bytes are zero-filled, on Windows they're undetermined). The new file size is returned. Unless you know something else about this, I'm going to assume it's still okay to use. @r.david.murray Thanks for your comments -- I'm trying to put together some unit tests and documentation, against the Subversion trunk. Tom -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally
Nick Coghlan ncogh...@gmail.com added the comment: Yeah, I'll have to time it to see how much difference latin-1 vs surrogateescape makes when the MSB is set in any bytes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10016] shutil.copyfile -- allow sparse copying
Antoine Pitrou pit...@free.fr added the comment: Ok, after experimenting, I now understand what the truncate() call is for. However, your heuristic for detecting sparse files is wrong. The unit for st_blocks is undefined as per the POSIX standard, although it gives recommendations: “The unit for the st_blocks member of the stat structure is not defined within IEEE Std 1003.1-2001. In some implementations it is 512 bytes. It may differ on a file system basis. There is no correlation between values of the st_blocks and st_blksize, and the f_bsize (from sys/statvfs.h) structure members. Traditionally, some implementations defined the multiplier for st_blocks in sys/param.h as the symbol DEV_BSIZE.” (http://www.opengroup.org/onlinepubs/95399/basedefs/sys/stat.h.html) Under Linux, 512 turns out to be the right multiplier (and not st_blksize): f = open(foo, wb) f.write(bx * 4096) 4096 f.truncate(16384) 16384 f.close() st = os.stat(foo) st.st_size 16384 st.st_blocks 8 st.st_blocks * st.st_blksize 32768 st.st_blocks * 512 4096 Also, GNU `cp` uses S_BLKSIZE rather than DEV_BSIZE when trying to detect the st_blocks unit size (both are 512 under Linux). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4775] Incorrect documentation - UTC time
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Based on the discussion so far, I am going to close this as invalid. -- assignee: georg.brandl - belopolsky resolution: - invalid status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4775 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7789] Issue using datetime with format()
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The original bug report is invalid and the documentation issue is a duplicate of #8913. -- nosy: +belopolsky resolution: - duplicate superseder: - Document that datetime.__format__ is datetime.strftime ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7789 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7789] Issue using datetime with format()
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7789 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10016] shutil.copyfile -- allow sparse copying
Antoine Pitrou pit...@free.fr added the comment: By the way: Thanks for your comments -- I'm trying to put together some unit tests and documentation, against the Subversion trunk. Please ignore trunk; all development (new features) should be done against branches/py3k. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate
Antoine Pitrou pit...@free.fr added the comment: Hello, I added some extra verification to Mercurial (http://www.selenic.com/hg/rev/f2937d6492c5). Feel free to use the following under the Python license in Python or elsewhere. It could be a separate method/function or it could integrated in wrap_socket and controlled by a keyword. I would appreciate if you find the implementation insufficient or incorrect. Thank you, I'll take a look! Are CRLs checked by the SSL module? Otherwise it deserves a big fat warning. They are not, but AFAIK most browsers don't check CRLs either... (or, rather they don't download updated CRLs) (I now assume that notBefore is handled by the SSL module and shouldn't be checked here.) I can't say for sure, but OpenSSL seems to handle both notBefore and notAfter as part of its cert verification routine (see interval_verify() and cert_check_time() in crypto/x509/x509_vfy.c). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9725] urllib.request.FancyURLopener won't connect to pages requiring username and password
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9725 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9800] Fast path for small int-indexing of lists and tuples
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: In the past, we've allow ceval.c to peer through encapsulation in order to have fast paths. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9800 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9884] The 4th parameter of method always None or 0 on x64 Windows.
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I don't have x64 machine, so I cannot test this. So this is just an idea. It seems Modules/_ctypes/libffi_msvc is a bit old. Modules/_ctypes/libffi/src/x86 is newer. Maybe this issue can be fixed by using newer one? Thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7768] raw_input should encode unicode prompt with std.stdout.encoding.
Florent Xicluna florent.xicl...@gmail.com added the comment: annoying stuff, indeed... $ python -c 'print uLa cl\xe9: ' La clé: $ python -c 'raw_input(uLa cl\xe9: )' Traceback (most recent call last): File string, line 1, in module UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 5: ordinal not in range(128) -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9960] test_structmembers fails on s390x (bigendian 64-bit): int/Py_ssize_t issue
Antoine Pitrou pit...@free.fr added the comment: Is this 2.7-specific? Otherwise, it would be better to provide a patch for 3.2 first, and then svnmerge to other branches. My reading of Python/getargs.c is that this macro does affect u# in a manner analogous to s#; does this documentation need clarifying? Probably. Same for es#, et# and t# perhaps? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9960 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9800] Fast path for small int-indexing of lists and tuples
Antoine Pitrou pit...@free.fr added the comment: As I mentioned, the speedup is invisible anyway, so it's not really a fast path ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9800 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8913] Document that datetime.__format__ is datetime.strftime
R. David Murray rdmur...@bitdance.com added the comment: Alexander closed issue 7789 in favor of this one, which is fine, but I want to respond to Eric's rejection there of including info about datetime in the 'format mini language' section of the docs. His point was that only the builtin types were documented there, but if the goal is to get people to actually use this facility, it would be helpful if some mention were made there of other stdlib types that support __format__. Some set of 'see also' links, perhaps in a footnote? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8913 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8913] Document that datetime.__format__ is datetime.strftime
Eric Smith e...@trueblade.com added the comment: I'm okay with that. Grepping Lib shows that date/datetime/time and Decimal are the only types that implement __format__. Decimal largely implements the same language as float. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8913 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly
Barry A. Warsaw ba...@python.org added the comment: RDM, I wonder if it wouldn't be better (in email6) to use an instance to represent the 3-tuple instead? It might make for clearer client code, and would allow you to default things you might generally not care about. E.g. class NonASCIIParameter: # XXX come up with better name def __init__(self, text, charset='utf-8', language=''): It's unfortunate that you have to reorder the arguments from the 3-tuple form of (charset, language, text) but I think you could play games with keyword arguments to make them consistent. In general the patch looks fine to me, though I suggest splitting test_add_header() into separate tests for each of the three conditions you're testing there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1078919 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6302] email.header.decode_header data types are inconsistent and incorrectly documented
Barry A. Warsaw ba...@python.org added the comment: In email6, can we at least make tuple returning methods return namedtuples instead? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6302] email.header.decode_header data types are inconsistent and incorrectly documented
Barry A. Warsaw ba...@python.org added the comment: I agree that it makes sense to have consistent types in the output. As for whether to add a new method or fix the existing one, I'm a bit torn, but I'd probably opt for fixing the existing function rather than adding a new one, just because I think there are few Python 3 applications out there that are counting on the old behavior. (I could be wrong though ;). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6302] email.header.decode_header data types are inconsistent and incorrectly documented
Antoine Pitrou pit...@free.fr added the comment: I agree that it makes sense to have consistent types in the output. As for whether to add a new method or fix the existing one, I'm a bit torn, but I'd probably opt for fixing the existing function rather than adding a new one, just because I think there are few Python 3 applications out there that are counting on the old behavior. (I could be wrong though ;). The point of a new method is to return the header as a human-readable string, rather than a list of tuples. It has added value besides leaving the old method alone ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6302] email.header.decode_header data types are inconsistent and incorrectly documented
Barry A. Warsaw ba...@python.org added the comment: The point of a new method is to return the header as a human-readable string, rather than a list of tuples. It has added value besides leaving the old method alone ;) +1 then! :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9065] tarfile: default root:root ownership is incorrect.
Lars Gustäbel l...@gustaebel.de added the comment: Fixed in r85211 (py3k), r85212 (release31-maint), r85213 (release27-maint). Thank you for the report. -- resolution: - accepted stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9065 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10021] Format parser is too permissive
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: According to the Format String Syntax section [1], attribute_name must be an identifier. However, the parser does not catch a violation of this rule and happily passes non-indentifier strings to getattribute: class X: ...def __getattribute__(self, a): return 'foo' ... '{...@}'.format(X()) 'foo' If this is a desirable feature, I think it should be clearly documented because in some cases, for example when formatted objects are proxies to database entries, passing arbitrary strings to __getattribute__ may be wasteful at best and a security hole at worst. [1] http://docs.python.org/dev/py3k/library/string.html#format-string-syntax -- components: Interpreter Core messages: 117961 nosy: belopolsky priority: normal severity: normal status: open title: Format parser is too permissive type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10021] Format parser is too permissive
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10022] Emit more information in decoded SSL certificates
New submission from Antoine Pitrou pit...@free.fr: There's some code in _ssl.c which exports more information in decoded SSL certificates (such as notBefore or issuer), but it is only enabled when the hidden function _ssl._test_decode_cert is used. It would be nice to export all this information by default; I can't think of any inconvenience caused by it. -- components: Library (Lib) messages: 117962 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: Emit more information in decoded SSL certificates type: feature request versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10022 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate
Antoine Pitrou pit...@free.fr added the comment: Here is a patch against py3k. It adds a single ssl.match_hostname method, with rules from RFC 2818 (that is, tailored for HTTPS). Review welcome. -- keywords: +patch stage: - patch review Added file: http://bugs.python.org/file19128/sslcheck.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10021] Format parser is too permissive
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: PEP 3101 has the following Implementation note: The implementation of this proposal is not required to enforce the rule about a simple or dotted name being a valid Python identifier. Instead, it will rely on the getattr function of the underlying object to throw an exception if the identifier is not legal. The str.format() function will have a minimalist parser which only attempts to figure out when it is done with an identifier (by finding a '.' or a ']', or '}', etc.). Apparently CPython takes advantage of this note in its implementation. Thus this is not a bug, but I think this implementation note should be added to CPython documentation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10021] Format parser is too permissive
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- assignee: - d...@python components: +Documentation -Interpreter Core nosy: +d...@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10021] Format parser is too permissive
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +eric.smith, mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10021] Format parser is too permissive
Eric Smith e...@trueblade.com added the comment: Right. It seemed like a hassle to have the str.format parser try to figure out what a valid identifier is, so it just passes it through. I don't see this as any different from: class X: ...def __getattribute__(self, a): return 'foo' ... getattr(X(), '$#@') 'foo' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10021] Format parser is too permissive
Benjamin Peterson benja...@python.org added the comment: 2010/10/4 Eric Smith rep...@bugs.python.org: Eric Smith e...@trueblade.com added the comment: Right. It seemed like a hassle to have the str.format parser try to figure out what a valid identifier is, so it just passes it through. You can always use str.isidentifier() (I don't remember if there's a capi). -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10021] Format parser is too permissive
Eric Smith e...@trueblade.com added the comment: Ah, but I don't need to in order to comply with the PEP! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate
Devin Cook devin.c.c...@gmail.com added the comment: I think it looks good except for the wildcard checking. According to the latest draft of that TLS id-checking RFC, you aren't supposed to allow the wildcard as part of a fragment. Of course this contradicts RFC 2818. http://tools.ietf.org/html/draft-saintandre-tls-server-id-check-09#section-4.4.3 If this gets accepted, I'll submit a patch to http.client and urllib that makes use of it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10021] Format parser is too permissive
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Mon, Oct 4, 2010 at 1:02 PM, Eric Smith rep...@bugs.python.org wrote: .. Ah, but I don't need to in order to comply with the PEP! This is true and this is the reason I changed this issue from bug to doc. I seem to remember this having been discussed before, but I cannot find the right thread. There are at least two reasons cpython docs should mention this: 1. From current documentation, users are likely to expect a value error from format(.$#@, ..) rather than an attribute error. 2. Naive proxy objects may implement __getattribute__ that blindly inserts attribute name into database queries leading to all kinds of undesired behaviors. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate
Antoine Pitrou pit...@free.fr added the comment: I think it looks good except for the wildcard checking. According to the latest draft of that TLS id-checking RFC, you aren't supposed to allow the wildcard as part of a fragment. Of course this contradicts RFC 2818. Well, since it is then an error (according to the id-checking draft) in the certificate itself rather than the hostname we are trying to match, it seems there would be no real issue in accepting the match anyway. It's up to CAs to make sure that certificates conform to whatever standard is currently in effect. I'm also assuming RFC 2818 is in wider use than the id-checking draft; am I wrong? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10021] Format parser is too permissive
Eric Smith e...@trueblade.com added the comment: I agree it should be documented as a CPython specific behavior. I should also add a CPython specific test for it, modeled on your code (if one doesn't already exist). I'll look into it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate
Devin Cook devin.c.c...@gmail.com added the comment: I'm also assuming RFC 2818 is in wider use than the id-checking draft; am I wrong? Yeah, since RFC 2818 has been accepted since 2000 and the id-checking draft was started in 2009, I'd say it's a safe bet. I'm in no way authoritative though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5088] optparse: inconsistent default value for append actions
Sandro Tosi sandro.t...@gmail.com added the comment: Hi Éric, thanks a lot for your review. Your comments are just fine, so I'm attaching a new patch that contains them. Yes, it's really nice to see one's work being accepted, and I do recognize I have a lot to learn about python procedures (either written or not :) so be sure I won't be demotivated by some initial problems. About the Debian-Python relationship, I have absolutely no control over interpreters packages in Debian, but I do care so much about Python that I thought giving my hand here would be quite right (and who knows, maybe one day, I'll be a core developer too :) . Cheers, Sandro -- Added file: http://bugs.python.org/file19129/issue5088-py3k-v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5501] Update multiprocessing docs re: freeze_support
Sandro Tosi sandro.t...@gmail.com added the comment: Sorry Éric, I don't get it: do you mean that the fact that freeze_support() can be called without issues on Unix or OS X is a new feature? or I misread it completely? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5501] Update multiprocessing docs re: freeze_support
Éric Araujo mer...@netwok.org added the comment: Rephrased: Is this relevant for 3.1? (Bug and doc fixes go into 3.2, 3.1 and 2.7, but here only 3.2 and 2.7 are selected, so I asked if the bugfix/new feature/behavior in question was something new in 3.2 and thus not in 3.1.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9093] Tools/README is out of date
Sandro Tosi sandro.t...@gmail.com added the comment: Hello Georg, is this bug been fixed with r83608-10 ? from the commit diffs it seems so, but maybe there's something else you want to do. Regards, Sandro -- nosy: +sandro.tosi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9093 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5088] optparse: inconsistent default value for append actions
Éric Araujo mer...@netwok.org added the comment: Forgot this one: `appended` I don’t remember the default reST role being used in the Python docs; I don’t even remember what it is. Your example makes me suspect emphasis, so using *appended* would do the same thing and be explicit. contrary to what one can think Still not a native speaker, but wouldn’t “may think” be more suited here? Apart from that, +1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5088] optparse: inconsistent default value for append actions
Sandro Tosi sandro.t...@gmail.com added the comment: On Mon, Oct 4, 2010 at 20:18, Éric Araujo rep...@bugs.python.org wrote: Éric Araujo mer...@netwok.org added the comment: Forgot this one: `appended` I don’t remember the default reST role being used in the Python docs; I don’t even remember what it is. Your example makes me suspect emphasis, so using *appended* would do the same thing and be explicit. I think I looked in other part of the optparse.rst file how it's done and used that, but I'm fine either ways. contrary to what one can think Still not a native speaker, but wouldn’t “may think” be more suited here? ah ok, it might me more correct, dunno (not native too) Apart from that, +1. Thanks! but what should I do: prepare a new patch with this 2 quite little changes or leave that to the committer? Regards, Sandro -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5088] optparse: inconsistent default value for append actions
Éric Araujo mer...@netwok.org added the comment: I think I looked in other part of the optparse.rst file how it's done and used that Alright, let’s leave it alone then. contrary to what one can think Still not a native speaker, but wouldn’t “may think” be more suited here? ah ok, it might me more correct, dunno (not native too) It has to do with the degree of probability you assign to the thought. Unless someone adds something, I’ll commit your patch in some days. I’ll change “can”, don’t bother doing another patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5088] optparse: inconsistent default value for append actions
Changes by Éric Araujo mer...@netwok.org: -- resolution: - accepted status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9800] Fast path for small int-indexing of lists and tuples
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: At any rate, I believe this used to be a fast-path. IIRC, Aahz put it in after demonstrating a considerable speed boost for common cases. Aahz, do you have any institutional memory around this one? -- nosy: +aahz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9800 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6706] asyncore's accept() is broken
Giampaolo Rodola' g.rod...@gmail.com added the comment: Python 3.2 changes committed in r85220. Still have to commit EWOULDBLOCK/ECONNABORTED changes for 3.1 and 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6706 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9935] Faster pickling of instances
Antoine Pitrou pit...@free.fr added the comment: Alexandre, do you have opinion on this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10023] test_lib2to3 leaks under 3.1
New submission from Antoine Pitrou pit...@free.fr: test_lib2to3 beginning 5 repetitions 12345 No handlers could be found for logger RefactoringTool . test_lib2to3 leaked [32, 32] references, sum=64 -- components: Library (Lib), Tests messages: 117983 nosy: benjamin.peterson, pitrou priority: normal severity: normal status: open title: test_lib2to3 leaks under 3.1 type: resource usage versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10023 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10024] Outdated advice in C-API tutorial?
New submission from Antoine Pitrou pit...@free.fr: In http://docs.python.org/dev/extending/newtypes.html, you can read: “To enable object creation, we have to provide a tp_new implementation. In this case, we can just use the default implementation provided by the API function PyType_GenericNew(). We’d like to just assign this to the tp_new slot, but we can’t, for portability sake, On some platforms or compilers, we can’t statically initialize a structure member with a function defined in another C module, so, instead, we’ll assign the tp_new slot in the module initialization function just before calling PyType_Ready()” But the thing is, we ourselves (CPython) do exactly what is discouraged here, both in built-in types and dynamically loaded extensions. So is this piece of advice still necessary? -- assignee: d...@python components: Documentation messages: 117984 nosy: d...@python, loewis, pitrou priority: normal severity: normal status: open title: Outdated advice in C-API tutorial? type: resource usage versions: Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10024 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1731717] race condition in subprocess module
Gregory P. Smith g...@krypto.org added the comment: A workaround for those still having problems with this: stub out subprocess._cleanup with a no-op method. It it only useful if your app is ever using subprocess and forgetting to call wait() on Popen objects before they are deleted. If you are, you can keep a reference to the old _cleanup() method and periodically call it on your own. http://bugs.python.org/issue1236 effectively demonstrates this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1731717 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9962] GzipFile doesn't have peek()
Antoine Pitrou pit...@free.fr added the comment: I've committed the improvements in r85221. Thank you! -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9962 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9935] Faster pickling of instances
Alexandre Vassalotti alexan...@peadrop.com added the comment: Sorry Antoine, I have been busy with school work lately. I like the general idea and I will try to look at your patch ASAP. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10025] random.seed not initialized as advertised
New submission from Tom Goddard godd...@cgl.ucsf.edu: In Python 2.7, random.seed() with a string argument is documented as being equivalent to random.seed() with argument equal to the hash of the string argument. This is not the actual behavior. Reading the _random C code reveals it in fact casts the signed hash value to unsigned long. This also appears to be the situation with Python 2.5.2. Rather than fix this in 2.7.1 it seems preferable to just correct the documentation in 2.7.1 to preserve backward compatibility. Bug #7889 has already addressed this problem in Python 3.2 by eliminating the use of hash() for non-integer random.seed() arguments. I encountered this problem while trying to produce identical sequences of random numbers on 64-bit architectures as on 32-bit architectures. Here is a demonstration of the bug in Python 2.7, 32-bit. random.seed('1pov') random.uniform(0,1) 0.713827305919223 random.seed(hash('1pov')) random.uniform(0,1) 0.40934677883730686 hash('1pov') -747753952 random.seed(hash('1pov') + 2**32) # unsigned long cast random.uniform(0,1) 0.713827305919223 -- components: Library (Lib) messages: 117988 nosy: goddard priority: normal severity: normal status: open title: random.seed not initialized as advertised type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9042] Gettext cache and classes
Éric Araujo mer...@netwok.org added the comment: Committed in r85223, r85224, r85225 (resp. 3.2, 3.1, 2.7). Thanks again! -- resolution: accepted - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10025] random.seed not initialized as advertised
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10025] random.seed not initialized as advertised
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1104021] wishlist: os.feed_urandom(input)
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: -BreamoreBoy resolution: out of date - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1104021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1104021] wishlist: os.feed_urandom(input)
Changes by Benjamin Peterson benja...@python.org: -- resolution: - rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1104021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4661] email.parser: impossible to read messages encoded in a different encoding
Changes by Tony Meyer anadelonb...@users.sourceforge.net: -- nosy: +anadelonbrin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4661 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9978] Better wait for slow machine in test_os (_kill_with_event)
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: -- title: test_os failures on XP-4 buildbot - Better wait for slow machine in test_os (_kill_with_event) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9978 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9899] tkinter test_font fails on OS X with Aqua Tk
Ned Deily n...@acm.org added the comment: After further investigation, on OS X at least, there is a difference in behavior between Tk 8.4 (the system default on OS X 10.4 and 10.5) and Tk 8.5 (the default on 10.6). Lib/tkinter/font.py calls the Tk font names commands to check whether a font is already defined. At the point where test_font.py is initially run, there has not been any real Tk activity yet. For some reason, with 8.5 the system font names are returned; with 8.4 they are not: $ /usr/bin/wish8.4 % font names $ /usr/bin/wish8.5 % font names systemPushButtonFont systemMenuItemFont systemApplicationFont systemSystemFont systemMenuItemMarkFont TkMenuFont TkDefaultFont systemSmallEmphasizedSystemFont systemDetailEmphasizedSystemFont systemMiniSystemFont TkHeadingFont TkTooltipFont systemUtilityWindowTitleFont systemViewsFont systemSmallSystemFont systemMenuTitleFont systemEmphasizedSystemFont TkTextFont systemDetailSystemFont TkCaptionFont systemLabelFont systemAlertHeaderFont systemMenuItemCmdKeyFont TkSmallCaptionFont TkFixedFont systemWindowTitleFont systemToolbarFont TkIconFont So, a solution for that is to add a try block in test_font.py to create a font definition for TkDefaultFont if it does not already exist. (Presumably, after the test failed and before it was re-run, other tests ran which caused the fonts to be defined so it passes.) This time I have tested it with both Tk 8.4 and 8.5 on OS X 10.5 and 10.6. Additional patch file attached (to be applied on top of the already applied first patch). -- assignee: ned.deily - resolution: fixed - accepted stage: committed/rejected - patch review Added file: http://bugs.python.org/file19130/issue9899-fix1-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9899 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com