[issue8903] datetime functions

2010-06-04 Thread anatoly techtonik
New submission from anatoly techtonik : Current OOP API of datetime is ugly: from datetime import datetime print datetime.today().isoformat() The proposal is to add today() and now() as module functions: from datetime import today, now print today() # datetime.date(2010, 6, 5) print now() # da

[issue8902] add datetime.time.now() for consistency

2010-06-04 Thread anatoly techtonik
New submission from anatoly techtonik : There is: datetime.date.today() datetime.datetime.today() datetime.datetime.now([tz]) But no: datetime.time.now([tz]) -- components: Library (Lib) messages: 107122 nosy: techtonik priority: normal severity: normal status: open title: add datetime.

[issue8901] Windows registry path not ignored with -E option

2010-06-04 Thread flashk
Changes by flashk : Added file: http://bugs.python.org/file17559/IgnoreWindowsRegistry_32.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue8901] Windows registry path not ignored with -E option

2010-06-04 Thread flashk
New submission from flashk : Hi, I noticed that Python still uses the Windows registry to initialize sys.path, when the -E option is used. >From my understanding, this option is mostly used by programs that are running >an embedded version of python, and don't want it to be affected by global

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Good try, but for one run, the ids of foo, x, a, and b are >>> 15719440 15717880 15273104 12266976 -- ___ Python tracker ___ __

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
Jack Diederich added the comment: if the id() of the left operand is identical to the id() of the first element in the result it would strongly support compiler skulldugerry. class Crasher(tuple): pass foo = Crasher() x = [1] a = x + foo b=a[0] if id(b) == id(x): raise Exception("It's the C

[issue8882] socketmodule.c`getsockaddrarg() should not check the length of sun_path

2010-06-04 Thread Edward Pilatowicz
Edward Pilatowicz added the comment: some additional data. AIX 6.1: defined sun_path = 1023 max sun_path = 1023 i'll also point out the existence of the SUN_LEN() macro, which is defined on all the previously mentioned operating systems, and which calculates the size of a sockaddr_un s

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: 1) answered before you asked (yes, similar) 2) (same thought) I am using PSF windows installer, however that was prepared. Martin? -- nosy: +loewis ___ Python tracker

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: "can't reproduce" does not inform as to what *did* happen with which code. More experiments: foo = str() TypeError: can only concatenate list (not "str") to list class s(str): pass foo = s() TypeError: Can't convert 'list' object to str implicitly Why is it t

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
Jack Diederich added the comment: Two more probes: 1) does it also have the same strange/crashy behavior when you subclass list and concat that to a tuple? 2) does dropping the optimization level down to -O help? This has "compiler quirk" written all over it. The C-code for list and tuple

[issue8885] markerbase declaration errors aren't recoverable

2010-06-04 Thread Mark Nottingham
Mark Nottingham added the comment: http://svn.python.org/view/python/trunk/Lib/markupbase.py?view=log -- status: pending -> open ___ Python tracker ___ __

[issue8900] IDLE crashes if Preference set to At Startup -> Open Edit Window

2010-06-04 Thread Michael Huster
New submission from Michael Huster : This only seems to be a problem under Windows. >From a Portable Python discussion: I am using Portable Python 1.1, python 3.0.1. I am trying to set up a .bat file file to easily start IDLE. But IDLE is throwing an error and failing some of the time. It only ha

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Substituting foo = tuple() TypeError: can only concatenate list (not "tuple") to list class Crasher(tuple): pass foo = Crasher() a = [1] + foo b=a[0] print (type(a), len(a), type(b), len(type(b)), type(type(b))) 1 [] 1 as before, so namedtuple is not, in pa

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
Jack Diederich added the comment: I can't reproduce on 3k trunk with Ubuntu 10.04, gcc 4.4.3 namedtuples are just a subclass of tuple with only two dunder methods defined (a plain __new__ with empty __slots__). Can you provoke the same behavior with plain tuples, or a subclass of tuple that

[issue8890] Modules have dangerous examples in documentation

2010-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Henri, the owasp link you gave in your opening post now gives Bad Title error msg. -- nosy: +tjreedy ___ Python tracker ___ ___

[issue8885] markerbase declaration errors aren't recoverable

2010-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Neither markerbase nor markupbase are in the list of 2.6 stdlib modules at http://docs.python.org/modindex.html even with all packages [+] listings expanded to [-]. So I have to guess this is a third party module. If so, please close and report to *its* authors

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: More experiments from collections import namedtuple foo = namedtuple('foo', '') a = [] + foo() print (a, type(a), len(a)) # () 0 ie, a standard empty tuple, whereas a = [1,1] + foo() crashes immediately. So the behavior of list()+namedtuple depends on the len

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-04 Thread Brett Cannon
Brett Cannon added the comment: On Fri, Jun 4, 2010 at 15:17, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Fri, Jun 4, 2010 at 4:09 PM, Brett Cannon wrote: > .. >> For the allowable range, follow the datetime docs as someone might be >> relying on that speci

[issue8893] file.{read,readlines} behaviour on Solaris

2010-06-04 Thread Christophe Kalt
Christophe Kalt added the comment: FreeBSD is yet another beast: $ uname -rs FreeBSD 8.0-STABLE $ python -V Python 2.5.5 $ python readlines.py read : [] readlines: [] readline : -- ___ Python tracker ___

[issue8899] Add docstrings to time.struct_time

2010-06-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> accepted ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Jun 4, 2010 at 4:09 PM, Brett Cannon wrote: .. > For the allowable range, follow the datetime docs as someone might be relying > on that specification already. > Will do. I think it is as simple simple s/12/24/ in two places of the current patch

[issue1712522] urllib.quote throws exception on Unicode URL

2010-06-04 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: unit test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
Changes by Jack Diederich : -- nosy: +jackdied ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue1712522] urllib.quote throws exception on Unicode URL

2010-06-04 Thread AdamN
AdamN added the comment: Nudge. Somebody with the authority needs to increment the stage to "patch review". -- nosy: +adamnelson ___ Python tracker ___ _

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Running the exact same binary on winxp with an amd athlon processor, I *did* get a crash after about 5 seconds. "python.exe has encountered a problem and needs to close. We are sorry for the inconvenience." Trying again with IDLE instead of the command window,

[issue8898] The email package should defer to the codecs module for all aliases

2010-06-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Shashwat Anand wrote: > > Shashwat Anand added the comment: > >> We need to add aliases for those codecs. The current aliases >> list only supports the format "latinN" for N in 1-10. > > latinN means latin1 to latin10 ? Yes. We should add aliases for t

[issue8899] Add docstrings to time.struct_time

2010-06-04 Thread Georg Brandl
Georg Brandl added the comment: The first change in time.rst is not needed; there the sentence is not a direct description of struct_time. The rest is good to commit. -- ___ Python tracker ___

[issue8898] The email package should defer to the codecs module for all aliases

2010-06-04 Thread Shashwat Anand
Shashwat Anand added the comment: >We need to add aliases for those codecs. The current aliases >list only supports the format "latinN" for N in 1-10. latinN means latin1 to latin10 ? But latin_1 is a recognized alias. >>> codecs.lookup('latin_1') -- ___

[issue8899] Add docstrings to time.struct_time

2010-06-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Please see fixes in issue8899.diff. * Quite a few lines are pretty long. Please stay below 80 chars/line. Fixed. * There are trailing spaces in two member docs. Fixed. * The range notation is inconsistent. [first, last] or [first, last+1) is what w

[issue8898] The email package should defer to the codecs module for all aliases

2010-06-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Shashwat Anand wrote: > > Shashwat Anand added the comment: > > from email.charset.ALIASES most of them failed to be recognize by codecs > module. > > for i in email.charset.ALIASES.keys(): > ... try: > ... codecs.lookup(i) > ... e

[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-06-04 Thread Mark Dickinson
Mark Dickinson added the comment: > The timedelta(seconds=0.6112295) example is handled correctly No, it's not! It's being rounded *up* where it should be being rounded *down*. > because 0.6112295 sec is not half way between two nearest microseconds Exactly. The actual value stored by the C

[issue8899] Add docstrings to time.struct_time

2010-06-04 Thread Georg Brandl
Georg Brandl added the comment: Patch review: * Quite a few lines are pretty long. Please stay below 80 chars/line. * There are trailing spaces in two member docs. * The range notation is inconsistent. [first, last] or [first, last+1) is what we generally use. * "if cannot be determined" doe

[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-06-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The half-way check should be done with decimal arihmetics, but the result is the same: >>> x = Decimal(0.6112295) >>> abs(x - Decimal('0.6112290')) == abs(x - Decimal('0.6112300')) False -- ___ Python tracker

[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics

2010-06-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The timedelta(seconds=0.6112295) example is handled correctly because 0.6112295 sec is not half way between two nearest microseconds: >>> abs(0.6112295 - 0.6112290) == abs(0.6112295 - 0.6112300) False The fact that it displays as if it is does not make

[issue8898] The email package should defer to the codecs module for all aliases

2010-06-04 Thread Shashwat Anand
Shashwat Anand added the comment: from email.charset.ALIASES most of them failed to be recognize by codecs module. >>> for i in email.charset.ALIASES.keys(): ... try: ... codecs.lookup(i) ... except LookupError: ... print("Not recognized by codecs : alias {} mapped to {

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-04 Thread Brett Cannon
Brett Cannon added the comment: For the allowable range, follow the datetime docs as someone might be relying on that specification already. As for the ongoing DST debate, it seems we either need to say that since we cannot properly support all possible datetimes properly we should simply not

[issue4487] Add utf8 alias for email charsets

2010-06-04 Thread R. David Murray
R. David Murray added the comment: Patch committed to trunk in r81705. Leaving issue open pending porting to the other branches, but I've also opened issue 8898 to further change things so that codecs becomes the sole authority for aliases in 3.2. -- resolution: -> fixed stage: patc

[issue6470] Tkinter import fails when running Python.exe from a network share

2010-06-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: Thanks for the patch. Committed as r81701, r81702, r81703 and r81704. -- resolution: -> accepted status: open -> closed ___ Python tracker ___

[issue8899] Add docstrings to time.struct_time

2010-06-04 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : The time.struct_time class is missing class and field docstrings: >>> time.struct_time.__doc__ is None True >>> time.struct_time.tm_year.__doc__ is None True This is significant because it is not obvious that field values are different from those of

[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4

2010-06-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: Following the python-dev consensus, I have now added a warning to the 2.7 installer that this will be the last release supporting Windows 2000. I still think that we should not bump the SDK version above 500 for 2.7. Changing the SDK level does *not just* en

[issue8898] The email package should defer to the codecs module for all aliases

2010-06-04 Thread R. David Murray
New submission from R. David Murray : Currently the email module maintains a set of "charset" aliases that it maps to codec names before looking up the codec in the codecs module. Ideally it should instead be able to just look up any 'charset' name, and if it is a valid alias for a codec, the

[issue1647654] No obvious and correct way to get the time zone offset

2010-06-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17555/issue1647654a.diff ___ Python tracker ___ ___ Python-bugs-lis

[issue1647654] No obvious and correct way to get the time zone offset

2010-06-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Issue #1667546 is more ambitious than this. I propose a very simple patch which makes tm_zone and tm_gmtoff available on systems with HAVE_STRUCT_TM_TM_ZONE defined (Linux and BSD variants). The additional fields are only allowed as attributes so len(t

[issue8895] newline vs. newlines in io module

2010-06-04 Thread R. David Murray
R. David Murray added the comment: This is off topic for this issue, but what you just reported makes no sense to me. TextIOWrapper calls the encoder corresponding to the specified encoding in its write method. That said, it is true that the IO docs are currently a class reference and not a

[issue5464] msgfmt.py does not work with plural form

2010-06-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: This is now fixed in r81697 and r81698. -- resolution: -> fixed status: open -> closed versions: +Python 3.2 -Python 2.6 ___ Python tracker __

[issue8895] newline vs. newlines in io module

2010-06-04 Thread Jean-Michel Fauth
Jean-Michel Fauth added the comment: 2010/6/4 Éric Araujo > > Éric Araujo added the comment: > > Could you think of a way to improve the docs on that point? > > -- > > Quick and dirty answer. I have ~10 years experience with Python and it seems to me the io module is technically ex

[issue4487] Add utf8 alias for email charsets

2010-06-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: R. David Murray wrote: > > R. David Murray added the comment: > > Mark, any objection to my putting this patch in now, and then we'll fix the > aliases implementation in 3.2? No. Please open a new issue targeting Python 3.2 for this. Thanks, -- Marc-A

[issue8897] sunau bytes / str TypeError in Py3k

2010-06-04 Thread Thomas Jollans
New submission from Thomas Jollans : The sunau module, essentially, "doesn't work". This looks like a problem with the bytes/unicode transition of "str" in Python 3.x vs Python 2: Python 3.1.2 (r312:79147, Apr 15 2010, 15:35:48) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "lic

[issue6312] httplib fails with HEAD requests to pages with "transfer-encoding: chunked"

2010-06-04 Thread Senthil Kumaran
Senthil Kumaran added the comment: I saw the earlier tests was closing it explicitly. Removed that and added a test which verifies the closed resp obj. Thanks. -- ___ Python tracker ___

[issue5467] tools\msi\merge.py is sensitive to lack of config.py

2010-06-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: The patch is now out of date; merge.py got merged into msi.py. -- resolution: -> out of date status: open -> closed ___ Python tracker ___ ___

[issue8864] multiprocessing: undefined struct/union member: msg_control

2010-06-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: Fixed in r81692, r81694. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue6312] httplib fails with HEAD requests to pages with "transfer-encoding: chunked"

2010-06-04 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: Might be useful to have a test for this? -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue6312] httplib fails with HEAD requests to pages with "transfer-encoding: chunked"

2010-06-04 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed in r81687, r81688, r81689 and r81690. Yes, I see that before the original change was made any chuncked encoding went through _read_chunked which close the resp before returning. So, here for HEAD, the resp is closed thus fixing the problem mentioned by

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2010-06-04 Thread R. David Murray
R. David Murray added the comment: @garazi111: if you have an example where quopri fails, please open a new issue for it. I suspect you are right that there is a problem there. -- ___ Python tracker _

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2010-06-04 Thread Ezio Melotti
Ezio Melotti added the comment: I added a test for the 'ignore' error handler. I will commit the patch before the RC unless someone has something against it. To summarize, the patch updates PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629, so: 1) Invalid sequences are now handled as described i

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2010-06-04 Thread R. David Murray
R. David Murray added the comment: Yes, but yours was better formatted, so I used it :) Thanks for the patch. Applied in r81685 to py3k, and r81686. -- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +tim_one ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > I'm still leary of supporting any form of DST. A proper DST > implementation would need to have some conditional code to > account for the datetime object passed into dst, and yet the > version you have prototyped doesn't handle it. No, any tzinfo imple

[issue4487] Add utf8 alias for email charsets

2010-06-04 Thread R. David Murray
R. David Murray added the comment: Mark, any objection to my putting this patch in now, and then we'll fix the aliases implementation in 3.2? -- versions: +Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker ___

[issue8828] Atomic function to rename a file

2010-06-04 Thread R. David Murray
R. David Murray added the comment: Victor: you could always name it best_effort_at_atomic_rename :) -- nosy: +r.david.murray ___ Python tracker ___ __

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-06-04 Thread R. David Murray
R. David Murray added the comment: I see I didn't think it through far enough. Given this, it seems that the Atom standard is saying, "if you don't know your actual UTC offset, you can't generate a valid ATOM timestamp". Which sorta makes sense, though you'd think they'd want to accept a -00

[issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing

2010-06-04 Thread Tal Einat
Tal Einat added the comment: This goes down into _json.scanstring. Looking at the C code for scanstring_unicode, strict=False allows control characters inside strings: "if strict is zero then literal control characters are allowed". From the code itself (current py3k head, r81032), it seems t

[issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing

2010-06-04 Thread Tal Einat
Tal Einat added the comment: This goes down into _json.scanstring. Looking at the C code for scanstring_unicode, the strict parameter allow control characters inside strings: "if strict is zero then literal control characters are allowed". From the code itself (current py3k head, r81032), it

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-06-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > It seems to me that we should not try to produce an RFC 3339 compliant > date string from a naive datetime. It will be practical to accept > that restriction once issue 5094 is resolved. Does this mean that t.rfcformat() should fail if t is naive? Acc

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2010-06-04 Thread Forest Bond
Forest Bond added the comment: Note that my patch is roughly the same as the original posted by haypo. -- ___ Python tracker ___ ___ P

[issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str

2010-06-04 Thread Forest Bond
Forest Bond added the comment: Duplicate. See issue4768. -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2010-06-04 Thread Forest Bond
Forest Bond added the comment: Attaching patch from reported duplicate issue8896. -- nosy: +forest_atq Added file: http://bugs.python.org/file17551/python-email-encoders-base64-str.patch ___ Python tracker ___

[issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str

2010-06-04 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of issue 4768. Could you attach your patch to that issue, please? -- assignee: -> r.david.murray superseder: -> email.generator.Generator object bytes/str crash - b64encode() bug? ___ Python

[issue8890] Modules have dangerous examples in documentation

2010-06-04 Thread Henri Salo
Changes by Henri Salo : -- title: Module logging has dangerous examples -> Modules have dangerous examples in documentation ___ Python tracker ___ ___

[issue8890] Module logging has dangerous examples

2010-06-04 Thread Henri Salo
Henri Salo added the comment: Please review the changes for the quality of the documentation. There probably is still more places to change. References can be made to: -- ___ Python tr

[issue6312] httplib fails with HEAD requests to pages with "transfer-encoding: chunked"

2010-06-04 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Merging in issue7584 nosy list. -- nosy: +durban, l0nwlf, r.david.murray, techtonik ___ Python tracker ___ ___

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Jun 3, 2010 at 3:19 PM, Mark Dickinson wrote: .. > Aren't there valid timezones that are offset by more than 12 hours from UTC? Indeed, Christmas Island uses UTC+14. (http://en.wikipedia.org/wiki/Kiritimati). The most western timezone seems to b

[issue3244] multipart/form-data encoding

2010-06-04 Thread Forest Bond
Forest Bond added the comment: I don't think Python trunk has the encoders issue, as that is related to the base64 moving to the bytes type. -- ___ Python tracker ___ __

[issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str

2010-06-04 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +l0nwlf, r.david.murray versions: -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue7475] codecs missing: base64 bz2 hex zlib ...

2010-06-04 Thread Éric Araujo
Éric Araujo added the comment: Related: bytes vs. str for base64 encoding in email, #8896 -- ___ Python tracker ___ ___ Python-bugs-li

[issue3244] multipart/form-data encoding

2010-06-04 Thread Forest Bond
Forest Bond added the comment: See issue8896 for email.encoders fix. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str

2010-06-04 Thread Forest Bond
New submission from Forest Bond : Ran into this while tackling issue3244. Encoded payload members should not be bytes. In the case of base64, we should have an ascii string. -- components: Library (Lib) files: python-email-encoders-base64-str.patch keywords: patch messages: 107055 nos

[issue8895] newline vs. newlines in io module

2010-06-04 Thread Éric Araujo
Éric Araujo added the comment: Could you think of a way to improve the docs on that point? -- ___ Python tracker ___ ___ Python-bugs-l

[issue8895] newline vs. newlines in io module

2010-06-04 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file17549/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue8890] Module logging has dangerous examples

2010-06-04 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the listing Henri. Not all of these examples have to be changed; I’ll review them in some days if you want. -- ___ Python tracker ___ _

[issue8890] Module logging has dangerous examples

2010-06-04 Thread Vinay Sajip
Vinay Sajip added the comment: Other logging cases contained /tmp/ has now been removed, the missing parenthesis added and the result checked in to trunk (r81684). I'll keep the issue open for the cases which remain in the other documentation. but remove myself from the assigned-to and chang

[issue8895] newline vs. newlines in io module

2010-06-04 Thread Jean-Michel Fauth
Jean-Michel Fauth added the comment: 2010/6/4 R. David Murray > > R. David Murray added the comment: > > This is as documented: > > http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines > > The keyword argument is named 'newline', the attribute is named 'newlines'. > The at

[issue3244] multipart/form-data encoding

2010-06-04 Thread Forest Bond
Forest Bond added the comment: New patch: * Renames class to FormData. * Replaces method get_body with get_request_data to simplify semantics. * Drops changes to email.encoders. I'll create a new ticket to deal with that bug. Note that tests here fail without that fix. -- Added file

[issue8891] sort files before archiving for consistency

2010-06-04 Thread anatoly techtonik
anatoly techtonik added the comment: On Fri, Jun 4, 2010 at 3:10 PM, Éric Araujo wrote: > >> It would be nice if Python process could allow me to maintain my own >> patched version of Python stdlibs so that I can use it instead of main >> stdlib and quickly switch between them. > It’s free soft

[issue8891] sort files before archiving for consistency

2010-06-04 Thread Éric Araujo
Éric Araujo added the comment: I think Takek asked more for a description of the diff algo (e.g. “compare the CRC”, “compare all files”, etc.), not the UI of one tool. -- ___ Python tracker

[issue8891] sort files before archiving for consistency

2010-06-04 Thread anatoly techtonik
anatoly techtonik added the comment: > """ > I use well-defined development toolchain for working with binary files > that can detect insignificant change in some kind of binary data like > timestamps in .zip archive, but comparing moving blocks is a disaster. > """ > > Please explain us how you

[issue3244] multipart/form-data encoding

2010-06-04 Thread Forest Bond
Forest Bond added the comment: Hm, there is one issue. The example in the docstring wouldn't work. You have to get the headers *after* the body, because the boundary isn't generated until the body has been. So this would work: body = msg.get_body() headers = dict(msg) But this won't:

[issue3244] multipart/form-data encoding

2010-06-04 Thread Éric Araujo
Éric Araujo added the comment: Would you please open another issue for the email fix? Bonus points if you test it on trunk too, since release candidate happens in some days :) Do you people think we could unify client and server-side code in the new module (with an alias from cgi for b/w comp

[issue3244] multipart/form-data encoding

2010-06-04 Thread Forest Bond
Forest Bond added the comment: Here's a new patch. -- Added file: http://bugs.python.org/file17547/http_formdata.patch ___ Python tracker ___

[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp

2010-06-04 Thread Senthil Kumaran
Senthil Kumaran added the comment: Agree to single retry for Basic Auth. We are just dealing with BasicAuthentication here, so that's why we did not have in the HTTPPasswdManager. But, let me consider that viewpoint too. -- status: closed -> open _

[issue3244] multipart/form-data encoding

2010-06-04 Thread Forest Bond
Forest Bond added the comment: Éric, Sorry, I just read your message. I'll post a new patch with a module docstring. I believe cgi.FieldStorage is only useful for parsing (i.e. on the server side). MIMEMultipartFormData is for generating multipart/form-data messages (i.e. on the client sid

[issue3244] multipart/form-data encoding

2010-06-04 Thread Forest Bond
Forest Bond added the comment: Hi, Patch attached. Let me know what needs fixing. I had to fix a bug in email.encoders for my tests to pass. I have not run the full test suite at this point (need to build py3k to do that, maybe I'll have time later today, but if someone else has time, feel

[issue8891] sort files before archiving for consistency

2010-06-04 Thread Éric Araujo
Changes by Éric Araujo : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/optio

[issue8891] sort files before archiving for consistency

2010-06-04 Thread Éric Araujo
Éric Araujo added the comment: > It would be nice if Python process could allow me to maintain my own > patched version of Python stdlibs so that I can use it instead of main > stdlib and quickly switch between them. It’s free software, you have the right to copy, edit and release it. As for the

[issue8891] sort files before archiving for consistency

2010-06-04 Thread Éric Araujo
Éric Araujo added the comment: > It would be nice if Python process could allow me to maintain my own > patched version of Python stdlibs so that I can use it instead of main > stdlib and quickly switch between them. It’s free software, you have the right to copy, edit and release it. As for the

[issue3244] multipart/form-data encoding

2010-06-04 Thread Éric Araujo
Éric Araujo added the comment: Seems good to me, as long as the module docstring clearly stats whether it’s useful for the client side, the server side or both. BTW, isn’t there overlap with cgi.FieldStorage? -- ___ Python tracker

[issue8893] file.{read,readlines} behaviour on Solaris

2010-06-04 Thread Christophe Kalt
Christophe Kalt added the comment: Antoine: I'm not sure what the expected behaviour should be either, this is certainly for others more familiar with Python than I to decide. Although I am certainly annoyed that the current behaviour differs between Solaris and Linux. Haven't had time to

[issue8891] sort files before archiving for consistency

2010-06-04 Thread Tarek Ziadé
Tarek Ziadé added the comment: """ I use well-defined development toolchain for working with binary files that can detect insignificant change in some kind of binary data like timestamps in .zip archive, but comparing moving blocks is a disaster. """ Please explain us how you compare the conten

  1   2   >