[issue7319] Silence DeprecationWarning by default

2010-01-05 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the feedback, everyone. The tabs have been fixed in the source. As for the docs, I moved the explanation as to why the warnings are silenced to the end of the section and chopped the "compilation" reasoning as it is not the critical reason for the si

[issue7319] Silence DeprecationWarning by default

2010-01-05 Thread Brett Cannon
Changes by Brett Cannon : Removed file: http://bugs.python.org/file15731/silence_deprecations.diff ___ Python tracker ___ ___ Python-bugs-list

[issue7319] Silence DeprecationWarning by default

2010-01-05 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue7636] Add a set update action to optparse

2010-01-05 Thread Brian Curtin
Brian Curtin added the comment: custom_add.py gives an example of how you could complete this on your own without a change to optparse. Running "custom_add.py -a foo -a bar -a foo" should print out "set(['foo', 'bar'])" - ultimately the same thing. -- Added file: http://bugs.python.or

[issue7636] Add a set update action to optparse

2010-01-05 Thread Brian Curtin
Brian Curtin added the comment: After looking into it, I'm thinking this may be better off as a custom option inherited from optparse.Option. I already wrote the patch since it was small and a way to poke around optparse some more, so we'll see if anyone else likes the idea. -- keywo

[issue7437] OS X 2.6.4 installer fails on 10.3 with two corrupted file names, ignored on 10.4

2010-01-05 Thread Ned Deily
Ned Deily added the comment: I've built an installer image to test this consisting of 2.6.4 plus r76715. If you're still willing to test this on 10.3, I'll contact you via email with the download details. -- ___ Python tracker

[issue7642] [patch] Minor improvement in os.system doc

2010-01-05 Thread Valentín
New submission from Valentín : Just added (maybe could be redundant but provides more info) that os.system is behaving in the samme manner in Vista and Windows 7. Also providing the info that os.system always gives the output in python command line (not to be used to retrieve output from a com

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread Senthil Kumaran
Changes by Senthil Kumaran : Removed file: http://bugs.python.org/file8115/urllib2-301-cache.patch ___ Python tracker ___ ___ Python-bugs-li

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread Senthil Kumaran
Changes by Senthil Kumaran : Removed file: http://bugs.python.org/file8116/test_urllib2-cache.patch ___ Python tracker ___ ___ Python-bugs-l

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread Senthil Kumaran
Changes by Senthil Kumaran : Removed file: http://bugs.python.org/file8117/liburllib2.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread Senthil Kumaran
Changes by Senthil Kumaran : Removed file: http://bugs.python.org/file15722/urllib2-301-redirection-CORRECTED.diff ___ Python tracker ___ _

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread Senthil Kumaran
Changes by Senthil Kumaran : Removed file: http://bugs.python.org/file15745/urllib2-301-redirection-proper.diff ___ Python tracker ___ ___

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread Senthil Kumaran
Senthil Kumaran added the comment: Attaching a non-malformed patch. I had incomplete tests in previous ones and I removed it by-hand before submitting for review. Something went wrong, I see. Okay, I get the points you are making. Specifically a request specific object and then maintaining a

[issue1495229] W3C <-> Python DOM type mapping docs need updating

2010-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Addendum. Table 1-2 Basic Data Type Mappings in the referenced OMG document, which maps 'OMG IDL' to 'Python' has 'Integer ()', later shortened to 'Integer'. (It also has 'Long integer()' and 'Floating Point Number ()' with similar abbreviations.) So 'Integer

[issue1495229] W3C <-> Python DOM type mapping docs need updating

2010-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Fred: yes, specifically the 3.x versions. I just noticed that the currently specification is 'IntegerType", which was never used in Python, rather than IntType, which was. The dead link you refer to is this at the top: "Python Language Mapping Specification

[issue6484] No unit test for mailcap module

2010-01-05 Thread Gregory Nofi
Gregory Nofi added the comment: This is a sample .mailcap I created for the test. It should also go in the Lib/test directory. It begins with a period due to a mailcap file naming convention (see RFC 1524). Is it OK that the file will be semi-hidden? -- Added file: http://bugs.python

[issue6484] No unit test for mailcap module

2010-01-05 Thread Gregory Nofi
Gregory Nofi added the comment: Attached is a new file for testing the mailcap module in Python 2.7. Writing the test was a little tricky because the existence and contents of the .mailcap file(s) will vary depending on the system or user. Therefore, the test mostly uses its own version of .m

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Juan José Conti
Juan José Conti added the comment: The attached patch solves this issue. Finally, only operand 'a' needs to be converted to Decimal if it's not. I discover this after writing my tests and start the implementation. A Context.method is modified if it has more than one operand (for example a and

[issue7640] buffered io seek() buggy

2010-01-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The problem seems to be fixed in trunk (the future 2.7). BufferedRandom.seek() contains a block labelled "# Undo read ahead." which does not exists in 2.6. I reproduce the problem with a file opened with mode "rb+" from io import open open("tmpfile", "w

[issue5965] Format Specs: doc 's' and implicit conversions

2010-01-05 Thread Łukasz Rekucki
Łukasz Rekucki added the comment: I see a problem with silently converting types without __format__() using str(). The user may write `"{:10s}".format(some_obj)`, which will work as long as some_obj doesn't have a formatter of it's own. If I later on, decide I want to add some custom formatin

[issue7641] Built-in Formatter accepts undocumented presentation type

2010-01-05 Thread Eric Smith
Eric Smith added the comment: This is a duplicate of issue 5965. -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ __

[issue7641] Built-in Formatter accepts undocumented presentation type

2010-01-05 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7641] Built-in Formatter accepts undocumented presentation type

2010-01-05 Thread Łukasz Rekucki
New submission from Łukasz Rekucki : The documentation states: "Most built-in types implement the following options for format specifications, although some of the formatting options are only supported by the numeric types." The list doesn't include "s" presentation type, which is actually acc

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread John J Lee
John J Lee added the comment: > Yes,it currently does not handle chained redirects via cache. I dont know > RFC's stance on it. RFC does not say anything about 301 chained redirects I don't see anything in the RFC that prevents us caching chained 301 redirections. Caching the chained redirec

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread John J Lee
John J Lee added the comment: To make sure I understood something Antoine said: By "per-request", I assume you mean the same kind of thing as the current use of .redirect_dict -- the multiple urllib2.Request instances that may result from a single request passed by the user to .open()/urlope

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-05 Thread Florent Xicluna
Florent Xicluna added the comment: And the Py3k patch. (note: previous update v4b -> v4c minimize the differences between Py2 and Py3 implementations) -- versions: +Python 3.2 Added file: http://bugs.python.org/file15750/stringlib_split_replace_py3k.diff ___

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-05 Thread Florent Xicluna
Florent Xicluna added the comment: Slight update: * Objects/unicodeobject.c - moved STRINGLIB_ISLINEBREAK to unicodedefs.h - removed FROM_UNICODE: use STRINGLIB_IS_UNICODE instead * Objects/stringlib/find.h - use STRINGLIB_WANT_CONTAINS_OBJ in find.h (similar to current py3k impl

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-05 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file15737/stringlib_split_replace_v4b.diff ___ Python tracker ___ ___ Python-

[issue7615] unicode_escape codec does not escape quotes

2010-01-05 Thread Richard Hansen
Richard Hansen added the comment: Attaching updated unicode_escape_reorg.patch. This fixes two additional issues: * don't call _PyString_Resize() on an empty string because there is only one empty string instance, and that instance is returned when creating an empty string * make sure the

[issue7615] unicode_escape codec does not escape quotes

2010-01-05 Thread Richard Hansen
Changes by Richard Hansen : Removed file: http://bugs.python.org/file15742/unicode_escape_reorg.patch ___ Python tracker ___ ___ Python-bugs-li

[issue7626] Entity references without semicolon in HTMLParser

2010-01-05 Thread R. David Murray
R. David Murray added the comment: w3m (a text mode browser) does not treat the é without the ; as an entity ref (it puts é literally into the display), while firefox does turn it into an eacute with or without the ;. I'm sure somebody somewhere has a table listing which browsers have what b

[issue6939] shadows around the io truncate() semantics

2010-01-05 Thread Pascal Chambon
Pascal Chambon added the comment: Allright, I'll try to work on it as soon as I manage to gather a decent compilation environment on windows... -- ___ Python tracker ___ ___

[issue7640] buffered io seek() buggy

2010-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Could you construct a test case? (it's even better if you fix the offending code as well of course) -- nosy: +pitrou ___ Python tracker ___

[issue7640] buffered io seek() buggy

2010-01-05 Thread Pascal Chambon
New submission from Pascal Chambon : I've noticed a severe bug in my python 2.6.2 io module, and looking at _buffered_raw_seek in http://svn.python.org/view/python/trunk/Modules/_io/bufferedio.c?view=markup, it seems the bug is still there in the C reimplementation of buffered io classes. Th

[issue6939] shadows around the io truncate() semantics

2010-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Are there new elements, advocating a status quo on this matter ? Nothing, it's just lacking a patch from someone interested in the matter. > On a separate note, I'm confused about the "at most" phrase in the > current documentation : > --- > truncate(size=No

[issue6939] shadows around the io truncate() semantics

2010-01-05 Thread Pascal Chambon
Pascal Chambon added the comment: Hello I'm currently finalizing the API of my raw io file implementation, but I still have trouble with the trunk implementation of IOBase.truncate(). If I remember well, in the mailing list topic on this subject, GvR noted that this change of behaviour compa

[issue7582] [patch] diff.py to use iso timestamp

2010-01-05 Thread Steven Rumbalski
Steven Rumbalski added the comment: I think this is incorrect during daylight savings time: tzoffset = -time.timezone // 60 This should do it: isdst = time.localtime().tm_isdst tzoffset = -(time.altzone if isdst else time.timezone)//60 -- nosy: +srumbalski ___

[issue7639] bdist_msi fails on files with long names

2010-01-05 Thread Mikhail Terekhov
New submission from Mikhail Terekhov : When I try to build msi installer for my module that contains files with long names it crashes with the following traceback C:\home\python\dist_msi_bug>python setup.py bdist_msi running bdist_msi running build running build_scripts installing to build\bdis

[issue7626] Entity references without semicolon in HTMLParser

2010-01-05 Thread Florent Xicluna
Florent Xicluna added the comment: For the record, this is valid HTML 4.01 Strict: Sample La clé La clé des champs La clé des champs Tested with http://validator.w3.org/check and Mozilla Firefox 3.5.6 Reference: http://www.is-thought.co.uk/book/sgml-6.htm#General But HTML5 should pro

[issue7615] unicode_escape codec does not escape quotes

2010-01-05 Thread Richard Hansen
Richard Hansen added the comment: Attached is a patch to the unicode unit tests. It adds tests for the following: * unicode_escape escapes single quotes * raw_unicode_escape escapes single quotes * raw_unicode_escape escapes backslashes -- Added file: http://bugs.python.org/file1

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Mark Dickinson
Mark Dickinson added the comment: > What about the idea of changing the implementation from: > >return a.__add__(b, context=self) > > to > > return Decimal(a+b,context=self) > ? I think it would be better to convert the arguments a and b to Decimal before doing the addition. I

[issue7622] [patch] improve unicode methods: split() rsplit() and replace()

2010-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: This looks generally good. Can you produce a separate patch for py3k? stringobject.c has been replaced with bytesobject.c there. -- ___ Python tracker

[issue7626] Entity references without semicolon in HTMLParser

2010-01-05 Thread Stefan Schweizer
Stefan Schweizer added the comment: I do not think that the semicolon can be omitted here, because it is not at a line break or immediately before a tag, it is in the middle of a paragraph. Anyway, I guess I have to live with the decision in issue500073. Also I could not find an 'unknown_enti

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the comments. Shall come with the tests. Yes,it currently does not handle chained redirects via cache. I dont know RFC's stance on it. RFC does not say anything about 301 chained redirects and there are tricker issues of caching anything other th

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, first it would be better with some tests. Second, what does it do for chained redirects? E.g. let's say that there's a chain of 301 redirects: A --> B --> C. Does it cache the whole A --> C mapping, or only A --> B? If the latter, will the chaining occu

[issue7626] Entity references without semicolon in HTMLParser

2010-01-05 Thread Florent Xicluna
Florent Xicluna added the comment: It is a documented behavior. http://bip.cnrs-mrs.fr/bip10/scowl.htm#semi Quoted from issue500073: "If you want to process such a document in a specific way, I recommend to subclass HTMLParser, overriding unknown_entityref." -- nosy: +flox resolution:

[issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir

2010-01-05 Thread Senthil Kumaran
Senthil Kumaran added the comment: Antoine: I got your point. Yes, I was missing the purpose of the redirection itself and the patch was wrong. If the 301 is to be cached, the cache map should be maintained at the higher level in order for the further requests to refer to. I have created a re

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Juan José Conti
Juan José Conti added the comment: I've been reading http://speleotrove.com/decimal and seems not to be an explicit definition about this. I'm thinking in a patch I could supply tomorrow. What about the idea of changing the implementation from: return a.__add__(b, context=self) to

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Mark Dickinson
Mark Dickinson added the comment: I agree that this would be desirable. And yes, c.add(9, 8) should be allowed, too. Anyone interested in producing a patch? -- components: +Library (Lib) keywords: +easy nosy: +facundobatista, rhettinger priority: -> normal stage: -> needs patch typ

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Juan José Conti
Juan José Conti added the comment: The same happens with other Context methods, like divide: Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from decimal import * >>> c = getcontext() >>> c.d

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Since the peek is called with a value of 2, the newline sequence \r\n > should be retrieved as is. No, it doesn't follow. The \r can still appear at the end of a readahead, in which case your algorithm will not eliminate the following \n. That is, if the se

[issue1495229] W3C <-> Python DOM type mapping docs need updating

2010-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree that "IntegerType" makes no sense as a "Python Type" (which is how it is referred to here). Also, the next sentence is a bit obsolete as well: “Additionally, the DOMString defined in the recommendation is mapped to a Python string or Unicode string.

[issue7634] next/previous links in documentation skip some sections

2010-01-05 Thread Georg Brandl
Georg Brandl added the comment: Ezio is right. The "next" links are meant to take you to the next logical file, and if one file contains multiple top-level sections, that is going to be several chapters away. -- resolution: -> works for me status: pending -> closed

[issue7636] Add a set update action to optparse

2010-01-05 Thread steven Michalske
steven Michalske added the comment: Agreed, add is the correct word, I used update because i created a set from the list that optarg created with append. -- ___ Python tracker

[issue7432] Py3k doc: "from __future__ import division" not necessary

2010-01-05 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r77314 (py3k) and r77315 (release31-maint), thanks! -- assignee: georg.brandl -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker