[issue18472] Update PEP 8 to encourage modern conventions

2013-07-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 27, 2013, at 03:13 PM, Guido van Rossum wrote: >- I think we should recommend against tabs outright. They are getting more >- and more misunderstood. +1 >- Regarding line length, I think it is reasonable to mention that many >- organ

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 28, 2013, at 09:48 PM, Nick Coghlan wrote: > >Nick Coghlan added the comment: > >"with statements are good", basically. `with ExitStack() as stack` is even better :) -- ___

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 28, 2013, at 04:59 AM, Raymond Hettinger wrote: >- Regarding line length, I think it is reasonable to mention that many >organizations are settling on 100 as a compromise. On newer laptops you >can still fit two terminal windows (with a reason

[issue16662] load_tests not invoked in package/__init__.py

2013-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Hah, I just ran into this too. I was perplexed why my load_tests() function wasn't being called and ended up pdb'ing unittest's discover, and found exactly this problem. I'm not surprised lifeless beat me to it. (My use case was to pig

[issue16662] load_tests not invoked in package/__init__.py

2013-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Seems like this patch does the trick for my very limited testing. -- keywords: +patch Added file: http://bugs.python.org/file31102/16662.diff ___ Python tracker <http://bugs.python.org/issue16

[issue18472] Update PEP 8 to encourage modern conventions

2013-08-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 01, 2013, at 12:19 PM, Nick Coghlan wrote: >I *didn't* make any changes in relation to Barry's comment about having the >commentary intermixed with the guidelines. I quite like the notion of >stripping PEP 8 down to just the essent

[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4073)

2013-08-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue18709> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-08-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue17997> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18677] Enhanced context managers with ContextManagerExit and None

2013-08-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue18677> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-08-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Applied the fix to 2.6 and null merged into 2.7. This didn't need a NEWS entry because the regression hadn't been released yet. I'll remove 2.6 from the Versions now. -- ___ Python

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2013-08-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- versions: -Python 2.6 ___ Python tracker <http://bugs.python.org/issue16248> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 21, 2013, at 11:49 AM, Christian Heimes wrote: >I have taken care of Antoine's and Victor's reviews. The fix has landed in >Python 2.7, 3.3 and 3.4. What about 2.6, 3.1 and 3.2? After all it's a >security fix (although I don&#x

[issue18891] Master patch for content manager addtion to email package.

2013-09-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 03, 2013, at 07:37 AM, Stephen J. Turnbull wrote: >I'm thinking this may be overengineering, but I may as well post it and find >out for sure. :-) Is it worth encapsulating MIME types? They're "really" >pairs as far as m

[issue16039] imaplib: unlimited readline() from connection

2013-09-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: blocker for 2.6.9 -- nosy: +barry priority: critical -> release blocker ___ Python tracker <http://bugs.python.org/issu

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-09-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: blocker for 2.6.9 -- nosy: +larry priority: normal -> release blocker ___ Python tracker <http://bugs.python.org/issu

[issue16040] nntplib: unlimited readline() from connection

2013-09-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: blocker for 2.6.9 -- nosy: +barry priority: critical -> release blocker ___ Python tracker <http://bugs.python.org/issu

[issue16038] ftplib: unlimited readline() from connection

2013-09-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: blocker for 2.6.9 -- nosy: +barry priority: critical -> release blocker ___ Python tracker <http://bugs.python.org/issu

[issue16043] xmlrpc: gzip_decode has unlimited read()

2013-09-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: blocker for 2.6.9 -- priority: critical -> release blocker ___ Python tracker <http://bugs.python.org/issue16043> ___ ___ Py

[issue16037] httplib: header parsing is not delimited

2013-09-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: blocker for 2.6.9 -- priority: critical -> release blocker ___ Python tracker <http://bugs.python.org/issue16037> ___ ___ Py

[issue16042] smtplib: unlimited readline() from connection

2013-09-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: blocker for 2.6.9 -- priority: critical -> release blocker ___ Python tracker <http://bugs.python.org/issue16042> ___ ___ Py

[issue18924] Enum members are easily replaced

2013-09-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 04, 2013, at 07:47 PM, Ethan Furman wrote: >I'm pretty sure we don't want that. Agreed, although a "we're all consenting adults" argument could be made. -- ___ Python trac

[issue18924] Enum members are easily replaced

2013-09-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 04, 2013, at 08:18 PM, Eli Bendersky wrote: >[Barry, how come your name in the tracker is linked to your website? me >wants...] Go to "Your Details" in the left sidebar and enter a "Homepage". --

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2013-09-11 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue15873> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14726] Lib/email/*.py use an EMPTYSTRING global instead of ''

2012-05-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 05, 2012, at 01:25 AM, R. David Murray wrote: >I've always wondered why the code did that. If Barry doesn't have a good >reason for it, I'll refactor it at some point. A long time ago, Tim (IIRC) expressed an opinion that using t

[issue14703] Update PEP metaprocesses to describe PEP czar role

2012-05-06 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue14703> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10530] distutils2 should allow the installing of python files with invalid syntax

2012-05-16 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue10530> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-23 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue14894> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 23, 2012, at 10:13 PM, Éric Araujo wrote: > >Thanks for the report. How did you find this? According to the doc of >LooseVersion, 'a' is not valid, so I would like a real example to accept this >as a bug. It works in Python

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-24 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 24, 2012, at 03:03 PM, Éric Araujo wrote: >> But if 'a' is invalid, then LooseVersion should refuse to accept it in its >> constructor, right? >It’s complicated. The doc does not say much, the docstring however clearly >

[issue14673] add sys.implementation

2012-05-30 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: One small test that I think is missing is a test that sys.implementation.version and sys.implementation.hexversion are equal (modulo format differences). -- ___ Python tracker <http://bugs.python.org/issue14

[issue14673] add sys.implementation

2012-05-30 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm not a fan of using a module, and less of a fan of structseq, so I think I'll discount those two. I'll play with namespace and type next. -- ___ Python tracker <http://bugs.pyt

[issue14673] add sys.implementation

2012-05-30 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm inclined to go with the as_simple_namespace patch. As you say, the pro are that this is a much better fit for this use case, while the con is that this does kind of sneak in a new type. Given that the type is not exposed in the API, that do

[issue14942] add PyType_New()

2012-05-30 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue14942> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14673] add sys.implementation

2012-06-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Looking great, you're almost there! I remviewed issue14673_as_simple_namespace_2.diff and issue14673_full.diff. Reitveld makes it *so* much easier :) -- ___ Python tracker <http://bugs.python.org/is

[issue14673] add sys.implementation

2012-06-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 01, 2012, at 06:53 PM, Eric Snow wrote: >sorry, I should have been more clear. issue14673_full.diff is not simply a >merging of the two previous patches, but rather their merger, plus >SimpleNamespace, plus removing the "public" r

[issue14673] add sys.implementation

2012-06-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 02, 2012, at 11:33 PM, Eric Snow wrote: >Added file: http://bugs.python.org/file25804/issue14673_full_4.diff Hi Eric. I'm ready to do a final review and merge this in, but I just want to be sure I'm looking at the right file. Is full_4.

[issue1079] decode_header does not follow RFC 2047

2012-06-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 02, 2012, at 09:59 PM, R. David Murray wrote: >I've applied this to 3.3. Because the preservation of spaces around the >ascii parts is a visible behavior change that could cause working programs to >break, I don't think I can back

[issue14673] add sys.implementation

2012-06-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 02, 2012, at 08:03 AM, Amaury Forgeot d'Arc wrote: >- _PyNamespace_New should be a public API function. From Python code, >- SimpleNamespace is public. This is a separate discussion. I'm not opposed, but I don't think this s

[issue14673] add sys.implementation

2012-06-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm resolving this as Fixed since I've just committed the code to 3.3, but I'm also leaving its status open and assigning it to mvl for verification of the Windows build. Martin, if you'd rather not do that, please unassign it from

[issue14908] datetime.datetime should have a timestamp() method

2012-06-04 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue14908> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14908] datetime.datetime should have a timestamp() method

2012-06-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I completely agree. As easy (but obscure) as it is, it seems quite silly to have to go through time.mktime(dt.timetuple()) -- ___ Python tracker <http://bugs.python.org/issue14

[issue14908] datetime.datetime should have a timestamp() method

2012-06-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 04, 2012, at 03:45 PM, Alexander Belopolsky wrote: >Did you review the long discussion under issue 2736? Specifically, please >note the part about mxDateTime, ticks() and gmticks(). I am -0 on adding >ticks() and gmticks() and as far as I ca

[issue14908] datetime.datetime should have a timestamp() method

2012-06-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 04, 2012, at 04:03 PM, Alexander Belopolsky wrote: >That's a valuable experience. How big of a deal was the lack of >.ticks() and .gmticks()? How did you work around it? It was *much* less of an issue than all the magic date format parsin

[issue14673] add sys.implementation

2012-06-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 04, 2012, at 09:39 PM, Eric Snow wrote: >presumably PEP 421 can be marked as final now? Done. -- ___ Python tracker <http://bugs.python.org/issu

[issue9527] Add aware local time support to datetime module

2012-06-05 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue9527> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15115] Duplicated Content-Transfer-Encoding header when applying email.encoders

2012-06-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 20, 2012, at 01:58 PM, R. David Murray wrote: >Barry: I think we should documentationally deprecate the encoders module. I >can't see any utility in a new program calling those functions explicitly, >especially if the program ever wa

[issue15115] Duplicated Content-Transfer-Encoding header when applying email.encoders

2012-06-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jun 20, 2012, at 01:51 PM, R. David Murray wrote: >Note that I don't *like* that the current API is that calling set_charset >does the body encode if and only if there are no existing headers, but that >is the way it has always worked,

[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2012-06-24 Thread Barry Alan Scott
Barry Alan Scott added the comment: I'm happy to review patches or create them for you. I see a related set of errors on Mac OS X that are down to issues in bytes_methods.py that mirror the pyport.h issues. In C++ isspace and friends are functions not macros. You cannot go around def

[issue15295] Document PEP 420 namespace packages

2012-07-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 21, 2012, at 02:23 PM, Georg Brandl wrote: >Ping. Barry? (It's not strictly necessary to have the docs for b2, but could >you give me a rough estimate when you'll do this?) Unfortunately, I lost a bunch of work with a disk crash,

[issue11602] python-config code should be in sysconfig

2012-07-26 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue11602> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15458] Add python-config --configdir option

2012-07-26 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : To assist with vendor builds, Matthias has requested added a --configdir option to the python3-config script. This would return sysconfig.get_config_var('LIBPL'). The value is embedded in the output for --ldflags, but not in a convenient

[issue15458] Add python-config --configdir option

2012-07-26 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +doko ___ Python tracker <http://bugs.python.org/issue15458> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15458] Add python-config --configdir option

2012-07-26 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue15458> ___ ___ Python-bugs-list

[issue15471] importlib's __import__() argument style nit

2012-07-27 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : Very minor style nit. In general, it's not considered good style to use mutable objects in default argument values. importlib's _bootstrap.__import__() does just this for its globals, locals, and fromlist arguments. The implementation current

[issue15473] importlib no longer uses imp.NullImporter

2012-07-27 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : I think this is mostly just out of date documentation, but I want to get Brett's feedback. The sys module has this to say about sys.path_importer_cache: "A dictionary acting as a cache for finder objects. The keys are paths that have been

[issue15295] Document PEP 420 namespace packages

2012-07-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: First draft is complete, along with updates to the importlib abcs for the new protocols. You'll see the language reference has a new importmachinery.rst file which describes finding and loading modules. You'll see that the import statement docs

[issue15295] Import machinery documentation

2012-07-27 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- priority: deferred blocker -> release blocker stage: needs patch -> patch review title: Document PEP 420 namespace packages -> Import machinery documentation ___ Python tracker <http://bugs.python.or

[issue15295] Import machinery documentation

2012-07-30 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for the review Eric. I'm slogging through these and many other comments, but I now have the docs integrated with trunk, and will probably land them for better or worse in the next day or so. I'll respond just to a few of your comments. Whate

[issue15295] Import machinery documentation

2012-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 29, 2012, at 05:10 AM, Nick Coghlan wrote: >I would title the new section "Import system" rather than "Import machinery" >as it is meant to be a specification documentation rather than an >implementation description.

[issue15295] Import machinery documentation

2012-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 29, 2012, at 06:09 AM, Nick Coghlan wrote: >runpy, pkgutil, et al should all get "See Also" links at the top pointing to >the new import system section. I've put an XXX in the import.rst file for this, but I probably won't g

[issue15502] Meta path finders and path entry finders are different, but share an ABC

2012-07-31 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue15502> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15295] Import machinery documentation

2012-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 30, 2012, at 09:41 PM, Brett Cannon wrote: >As for the diagram(s), I have attached the overall PDF that I still have from >my original Omnifgraffle file (which I don't have a license to anymore) that >I built my PyCon 2008 presentat

[issue15295] Import machinery documentation

2012-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 31, 2012, at 12:28 AM, Eric Snow wrote: >> You ask in [2] whether "path importer" refers specifically to the callables >> on sys.path_hooks. Can you site a reference for this? I found one >> reference in PEP 302 to &quo

[issue15295] Import machinery documentation

2012-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I think I was unclear in my previous follow up. Here are the objects involved, taken from the glossary. import path A list of locations (or :term:`path entries `) that are searched by the :term:`path importer` for modules to import. During

[issue15295] Import machinery documentation

2012-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 31, 2012, at 03:21 AM, Eric Snow wrote: >1. default path importer (a.k.a PathFinder), +1, although currently I am refraining from using "default" when describing this thing. >2. path hook (lives on sys.path_hooks), I have called t

[issue15295] Import machinery documentation

2012-07-31 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue15295> ___ ___ Python-bugs-list

[issue15295] Import machinery documentation

2012-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 31, 2012, at 08:30 PM, Brett Cannon wrote: >The import path definition is a little misleading as sys.path is only >inferred when 'path' has None passed in. Otherwise 'path' is what __path__ in >a package is set to, so te

[issue15295] Import machinery documentation

2012-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 31, 2012, at 02:56 PM, Eric Snow wrote: >Part of the problem with the import nomenclature is that PEP 302 doesn't >really nail it down and mixes the terms up a bit. This is understandable >considering it broken ground in some regard. Ho

[issue15471] importlib's __import__() argument style nit

2012-07-31 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 30, 2012, at 04:39 AM, Meador Inge wrote: >Meador Inge added the comment: > >How about the attached? What about something like: globals = ({} if globals is None else globals) and similarly f

[issue15502] Meta path finders and path entry finders are different, but share an ABC

2012-08-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I've mostly run out of time to work on the docs, but I do want to say that I thought long and hard about all the terminology decisions. Please don't change them lightly, and definitely don't change them until you've tried to go through t

[issue15502] Meta path finders and path entry finders are different, but share an ABC

2012-08-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 01, 2012, at 10:03 PM, Nick Coghlan wrote: >1. "path import subsystem" for that whole section of the import machinery; >and >2. "path import finder" specifically for the meta path finder that >importlib calls "PathFi

[issue15502] Meta path finders and path entry finders are different, but share an ABC

2012-08-01 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 01, 2012, at 10:44 PM, Nick Coghlan wrote: >The problem with "path importer" is it's just plain *wrong*. That object is >not an importer and thus calling it one makes it much harder to learn the >finder/loader/importer distincti

[issue15502] Meta path finders and path entry finders are different, but share an ABC

2012-08-02 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: What about "Path Scanner"? Came to me in a dream, so it has to be perfect, right? :) -- ___ Python tracker <http://bugs.python.o

[issue15502] Meta path finders and path entry finders are different, but share an ABC

2012-08-02 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 02, 2012, at 11:33 AM, Nick Coghlan wrote: >Specifically, what I did was to drop "find_module" from the Finder ABC, but >keep the ABC itself as a way to document the common "invalidate_caches" >API. The ABC definitio

[issue15471] importlib's __import__() argument style nit

2012-08-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 05, 2012, at 11:50 PM, Brett Cannon wrote: >I went with Barry's approach but made it compatible with PEP 8 (bad, FLUFL; >no unneeded parens!). I actually think I picked that up from the big guy himself, but I could be mis

[issue15591] when building the extensions, stdout is lost when stdout is redirected

2012-08-29 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue15591> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15906] argparse add_argument() confusing behavior when type=str, default=[], action='append'

2012-09-10 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: Run the following code snippet: -snip snip- import argparse parser = argparse.ArgumentParser() parser.add_argument("--test", dest="test", type=str, default=[], action='append') args = parser.parse_args() p

[issue15906] argparse add_argument() confusing behavior when type=str, default=[], action='append'

2012-09-10 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +benjamin.peterson, georg.brandl priority: normal -> release blocker ___ Python tracker <http://bugs.python.org/issu

[issue15906] argparse add_argument() confusing behavior when type=str, default=[], action='append'

2012-09-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Marking it as a release blocker and adding 3.3 since 3.3 hg trunk is affected. -- versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue15

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 10, 2012, at 05:21 PM, Georg Brandl wrote: >I don't see how this affects 3.3: you seem to be saying the behavior is fine >there. No, I thought it was because I tested the Ubuntu rc2 version, but the problem exists in upstream hg 3

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-10 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue15906> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 10, 2012, at 05:59 PM, Georg Brandl wrote: >But it's not a release blocker for 3.3 then. Fair enough! -- ___ Python tracker <http://bugs.python.org

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-11 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Okay, this bug is clearly caused by the patch applied for issue 12776. Here's the patch set url: http://hg.python.org/cpython/rev/74f6d87cd471 Now, if you look at this, I think this changes the semantics for non-string default with a type converter, bu

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-11 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 11, 2012, at 04:15 PM, Chris Jerdonek wrote: >I haven't thought about this very long, but what would happen if the "type" >conversion is only called on arguments and default arguments that are >strings, and otherwise left alon

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-11 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 11, 2012, at 07:00 PM, R. David Murray wrote: >To repeat: there is no change to be made for 3.3. 3.3.0 will go out the door >with the pre-12776 behavior. So any backward compatibility concerns that >apply to 2.7 and 3.2 also apply to 3.3

[issue15923] Building from a fresh clone breaks on Parser/asdl_c.py

2012-09-11 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: After a fresh clone, configure && make fails due to a fairly obvious bug in the code. Note that if you `hg revert --all`, configure && make will succeed, probably because the timestamps get updated enough to fool make. @resist[~/projects/

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 12, 2012, at 10:57 AM, Steven Bethard wrote: >(1) Yes, the error is that the isinstance(action.default, str) check was lost Except that it won't work any more in the original location. I tried it and it broke other tests. Maybe I did it w

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 12, 2012, at 10:39 AM, R. David Murray wrote: >diff --git a/Lib/argparse.py b/Lib/argparse.py >--- a/Lib/argparse.py >+++ b/Lib/argparse.py >@@ -1962,7 +1962,8 @@ > # only if it was defined already i

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 12, 2012, at 04:22 AM, Chris Jerdonek wrote: >The argparse documentation makes it pretty clear that 'type' is meant to be >applied only to strings. Then test_type_function_call_with_non_string_default() which was added to fix #12776

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 12, 2012, at 03:03 PM, R. David Murray wrote: >Actually, no, the test should not be removed, it should be reversed so as to >test the documented behavior. Good point. -- ___ Python tracker

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : Added file: http://bugs.python.org/file27180/15906-3.diff ___ Python tracker <http://bugs.python.org/issue15906> ___ ___ Python-bugs-list m

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 12, 2012, at 02:48 PM, Steven Bethard wrote: >We should not be converting non-string defaults, or the documentation's >description of the type= argument doesn't make sense. Agreed. If we also take RDM's suggestion of r

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 12, 2012, at 03:40 PM, Steven Bethard wrote: >Ok, sounds good. Let's make the test check the documented behavior, and then >add back the isinstance(action.default, str) check. See patch 15906-3.diff for Python 2.7. If acceptable, I wil

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Oops, one small correction for 15906-3.diff: In Python 2.7, s/str/basestring/ Obviously isinstance should just check for str-y-ness in Python 3.{2,3} -- ___ Python tracker <http://bugs.python.org/issue15

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 12, 2012, at 05:19 PM, R. David Murray wrote: >All three of those sound like good ideas (testing string conversion, >clarifying docs, adding the no-double conversion test). Do you want to >prepare the patch, Chris? Barry can apply his any

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Chris, it's all yours. I am however going to close the bug as fixed. -- ___ Python tracker <http://bugs.python.org/is

[issue15906] argparse add_argument() confusing behavior when type=str, default=

2012-09-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue15906> ___ ___ Python-bugs-list

[issue15935] clarify argparse docs re: add_argument() type and default arguments

2012-09-25 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Looks good to me too! Thanks; I'll apply the patch. -- assignee: docs@python -> barry ___ Python tracker <http://bugs.python.org

[issue15935] clarify argparse docs re: add_argument() type and default arguments

2012-09-25 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue15935> ___ ___ Python-bugs-list

[issue12014] str.format parses replacement field incorrectly

2012-09-29 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker <http://bugs.python.org/issue12014> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    15   16   17   18   19   20   21   22   23   24   >