[issue11076] Iterable argparse Namespace

2011-02-06 Thread Steven Bethard
Steven Bethard added the comment: Yes, definitely `vars` deserves some description and an example in the documentation. This isn't the first time this question has come up. =) -- ___ Python tracker __

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Steven Bethard
Steven Bethard added the comment: Yeah, I agree it's not ideal, though note that basic unix commands have trouble with arguments staring with dashes: $ cd -links-/ -bash: cd: -l: invalid option cd: usage: cd [-L|-P] [dir] If you're working with a file on a filesystem, the time honored workaro

[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails

2011-02-06 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue11132] compileall.compile_dir loses 'optimize' parameter in recursion.

2011-02-06 Thread July Tikhonov
New submission from July Tikhonov : july@julynote:~/test> ls -R .: c.py subdir ./subdir: a.py b.py july@julynote:~/test> python3 Python 3.2rc2+ (py3k, Feb 6 2011, 13:06:04) [GCC 4.5.0 20100604 [gcc-4_5-branch revision 160292]] on linux2 Type "help", "copyright", "credits" or "license" for mo

[issue11132] compileall.compile_dir loses 'optimize' parameter in recursion.

2011-02-06 Thread July Tikhonov
July Tikhonov added the comment: Patch added. -- Added file: http://bugs.python.org/file20697/compileall.compile_dir.optimize.diff ___ Python tracker ___ __

[issue11071] What's New review comments

2011-02-06 Thread Daniel Urban
Daniel Urban added the comment: In the abc.abstractclassmethod example(http://docs.python.org/dev/py3k/whatsnew/3.2.html#abc), the methods probably should use cls as the name of the first parameter, not self, because they are classmethods. -- nosy: +durban __

[issue969718] BASECFLAGS are not passed to module build line

2011-02-06 Thread Stefan Krah
Stefan Krah added the comment: EXTRA_CFLAGS were removed in r38848. Is it necessary to configure OPT, BASECFLAGS and EXTRA_CFLAGS via the environment? I think it might be sufficient to take CFLAGS from the Makefile and append the environment CFLAGS. Chris, would the new minimal patch solve you

[issue11122] bdist_rpm fails

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: Thanks for volunteering. I will review and apply when the py3k branch is unfrozen. > I'll write a docs and script patch for this next week... Note that I proposed to patch the docs only. -- assignee: tarek -> eric.araujo ___

[issue11122] bdist_rpm fails

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: BTW, it may be useful to point people to http://pypi.python.org/pypi/pypi2rpm, which contains an updated command, bdist_rpm2. -- ___ Python tracker _

[issue11071] What's New review comments

2011-02-06 Thread Daniel Urban
Daniel Urban added the comment: In the shutil example (http://docs.python.org/dev/py3k/whatsnew/3.2.html#shutil) the function argument of shutil.register_archive_format is a string, but according to http://docs.python.org/dev/py3k/library/shutil.html#shutil.register_archive_format it should

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: Documenting “--extra-args=--foo” or “--extra-args -- --foo” (untested, but should work) seems good. -- nosy: +eric.araujo stage: unit test needed -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python

[issue11132] compileall.compile_dir loses 'optimize' parameter in recursion.

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: Patch looks good. -- keywords: +needs review nosy: +eric.araujo, georg.brandl, r.david.murray stage: -> patch review versions: +Python 3.3 ___ Python tracker ___

[issue10042] total_ordering stack overflow

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: FWIW, I just tested svnmerging the revision, the patch applied with minor merge conflicts and the test suite passes. -- ___ Python tracker ___ __

[issue9364] some problems with the documentation of pydoc

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: > Welcome to Python 3.2! This is the online help utility. > which could be changed to > Welcome to Python help utility Agreed. I assume this dates back to a time where “online help” meant available on this computer, not on some global network. I’d keep the ve

[issue8691] Doc: left alignment is not the default for numbers

2011-02-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Georg & Eric, I believe this simple patch is correct, and should go in 3.2. Westley, thanks for the patch. Numbers are right-aligned because that is the traditional default. The committer should add Westley Martinez to misc/ACKS -- versions: -Python

[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails

2011-02-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue969718] BASECFLAGS are not passed to module build line

2011-02-06 Thread Chris Lambacher
Chris Lambacher added the comment: I am not convinced that the minimal patch would work for my original issue. I wanted to be able to override the -march option which shows up in OPT on Fedora. I was cross-compiling to a target architecture that does not support the -march option so I would n

[issue9364] some problems with the documentation of pydoc

2011-02-06 Thread yeswanth
Changes by yeswanth : Removed file: http://bugs.python.org/file20686/pydoc.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue9364] some problems with the documentation of pydoc

2011-02-06 Thread yeswanth
Changes by yeswanth : Added file: http://bugs.python.org/file20699/pydoc.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue9364] some problems with the documentation of pydoc

2011-02-06 Thread yeswanth
yeswanth added the comment: Completely agreed with you on having "Welcome to python 3.2 help!".. made the changes. Uploaded site.py as suggested by you . I will try to create the patch for the links , but i am not sure how to .Could use some help if you can provide me any website link.Thanks

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Eric Smith
Eric Smith added the comment: "--" won't work. Traditionally, this has been used to separate optional arguments from positional arguments. Continuing the "cd" example, that's what would let you cd into a directory whose name starts with a hyphen: $ cd -links-/ -bash: cd: -l: invalid option cd

[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails

2011-02-06 Thread Nick Coghlan
Nick Coghlan added the comment: My fix for the issues with reloading of the _ssl module meant that a couple of temporary modules weren't getting cleared out of sys.modules properly, thus confusing the second and later runs of affected tests. Attached patch adds explicit removal calls for the

[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails

2011-02-06 Thread Nick Coghlan
Nick Coghlan added the comment: Helps to add the patch rather than the whole file... -- Added file: http://bugs.python.org/file20702/issue10971_temp_module_cleanup ___ Python tracker __

[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails

2011-02-06 Thread Nick Coghlan
Changes by Nick Coghlan : Removed file: http://bugs.python.org/file20701/test_zipimport_support.py ___ Python tracker ___ ___ Python-bugs-list

[issue969718] BASECFLAGS are not passed to module build line

2011-02-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I am not convinced that the minimal patch would work for my original > issue. I wanted to be able to override the -march option which shows > up in OPT on Fedora. I was cross-compiling to a target architecture > that does not support the -march option so I wou

[issue9364] some problems with the documentation of pydoc

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: See http://docs.python.org/dev/documenting/ (see also http://docs.python.org/devguide/patch for process guidelines). Note about site.diff: -"""Define the builtin 'help'. -This is a wrapper around pydoc.help (with a twist). +"""Class used to implement

[issue9364] some problems with the documentation of pydoc

2011-02-06 Thread Éric Araujo
Changes by Éric Araujo : -- assignee: docs@python -> eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9364] some problems with the documentation of pydoc

2011-02-06 Thread yeswanth
Changes by yeswanth : Removed file: http://bugs.python.org/file20700/site.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue9364] some problems with the documentation of pydoc

2011-02-06 Thread yeswanth
Changes by yeswanth : Added file: http://bugs.python.org/file20703/site.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue11133] inspect.getattr_static code execution

2011-02-06 Thread Daniel Urban
New submission from Daniel Urban : The documentation of getattr_static says: "The only known case that can cause getattr_static to trigger code execution, and cause it to return incorrect results (or even break), is where a class uses __slots__ and provides a __dict__ member using a property or

[issue11116] mailbox and email errors

2011-02-06 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Thanks for spending your free time, almost alone in such a widespread area like this. -- ___ Python tracker ___ __

[issue8691] Doc: left alignment is not the default for numbers

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: Or to Doc/ACKS.txt, which I’ve recently discovered. -- nosy: +eric.araujo ___ Python tracker ___ ___ Py

[issue11131] decimal.py: plus/minus with ROUND_FLOOR

2011-02-06 Thread Mark Dickinson
Mark Dickinson added the comment: Nice catch! Please could you test the attached patch (against py3k)? I'll apply it after 3.2 is out. The fix should also go into the 2.7 maintenance branch, I think. -- assignee: -> mark.dickinson keywords: +patch versions: +Python 2.7 Added file:

[issue940286] pydoc.Helper.help() ignores input/output init parameters

2011-02-06 Thread Éric Araujo
Changes by Éric Araujo : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Anders Kaseorg
Anders Kaseorg added the comment: There are some problems that ‘=’ can’t solve, such as options with nargs ≥ 2. optparse has no trouble with this: >>> parser = optparse.OptionParser() >>> parser.add_option('-a', nargs=2) >>> parser.parse_args(['-a', '-first', '-second']) (, []) But inputting

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Eric Smith
Eric Smith added the comment: Good point, I hadn't thought of that. Maybe ArgumentParser needs a "don't try to be so helpful, parse like optparse" option. Which is what Steven suggested earlier, I believe. I'd take a crack at this if there's general consensus on that solution. We can change

[issue11133] inspect.getattr_static code execution

2011-02-06 Thread Michael Foord
Michael Foord added the comment: The fix is to use dict methods rather than accessing members through the instance. It will have to wait until 3.2 is out now though. -- ___ Python tracker

[issue11133] inspect.getattr_static code execution

2011-02-06 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue11090] Doc errors for unittest in Python 3.1

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: Hm, my patch removes too much. The part that was mistakenly added by me is the command-line interface doc, but I also removed other parts for things noted with versionadded: 3.2. Those indications are wrong: They were noted added in 2.7 before r79167 (Ezio).

[issue11134] Add missing type slots

2011-02-06 Thread Martin v . Löwis
New submission from Martin v. Löwis : Three slots in type objects are missing in PEP 384. This patch adds them to the ABI. -- files: typeslots.diff keywords: patch messages: 128075 nosy: georg.brandl, loewis priority: release blocker severity: normal status: open title: Add missing type

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Anders Kaseorg
Anders Kaseorg added the comment: That would be a good first step. I continue to advocate making that mode the default, because it’s consistent with how every other command line program works[1], and backwards compatible with the current argparse behavior. As far as documentation for older v

[issue11135] Redundant doc field in TypeSpec

2011-02-06 Thread Martin v . Löwis
New submission from Martin v. Löwis : There are currently two ways to specify a type doc string in PyType_FromSpec; either through the doc field (which is not actually processed), or through Py_tp_doc (which works correctly). The original concern for adding doc into the TypeSpec was that the s

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Eric Smith
Eric Smith added the comment: I'd also like to see this as the default. After all, presumably we'd like Python scripts to work like all other command line programs, and I too am unaware of any other option parsing library that works the way argparse does. But changing released behavior in the

[issue11134] Add missing type slots

2011-02-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Given the recent multiple additions of "forgotten things" in the ABI, wouldn't it be better to mark the ABI experimental so that things can get ironed out in 3.2.1? (especially with user feedback after the release) -- nosy: +pitrou __

[issue11113] html.entities mapping dicts need updating?

2011-02-06 Thread Eric Smith
Eric Smith added the comment: I don't see the need for a parameter to support different sets of entities. Just supporting the ones from HTML 5 seems like the right thing. -- nosy: +eric.smith ___ Python tracker _

[issue11113] html.entities mapping dicts need updating?

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: To make my intent explicit: an updated mapping could generate references invalid for 4.01. -- ___ Python tracker ___

[issue11113] html.entities mapping dicts need updating?

2011-02-06 Thread Eric Smith
Eric Smith added the comment: Ah. I hadn't thought of generating them, only parsing them. In that case, then yes, it's an issue for generation. -- ___ Python tracker ___ __

[issue11134] Add missing type slots

2011-02-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Given the recent multiple additions of "forgotten things" in the ABI, > wouldn't it be better to mark the ABI experimental so that things can > get ironed out in 3.2.1? (especially with user feedback after the > release) I don't know what would be gained in

[issue11134] Add missing type slots

2011-02-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Given the recent multiple additions of "forgotten things" in the ABI, > > wouldn't it be better to mark the ABI experimental so that things can > > get ironed out in 3.2.1? (especially with user feedback after the > > release) > > I don't know what would be

[issue11134] Add missing type slots

2011-02-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: My understanding is that Martin can add, but not subtract. Martin, is that correct? At this point, I'm not sure we know that the limited API is sufficient. -- nosy: +rhettinger ___ Python tracker

[issue11090] Doc errors for unittest in Python 3.1

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: It looks like the doc snippets are actually new in 3.1, so we should not remove them but just fix the versionadded. The change I wrongly added is the part about command-line use. That can go. -- ___ Python tracker <

[issue11090] Doc errors for unittest in Python 3.1

2011-02-06 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file20657/fix-11090.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue11134] Add missing type slots

2011-02-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: > No, the point of the proposal is to allow you to make further changes in > response to user feedback. I assume you can't add things anymore once > the ABI is declared "stable". Can you? Adding things would be possible, although undesirable. Extension modules

[issue11134] Add missing type slots

2011-02-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: > My understanding is that Martin can add, but not subtract. Martin, > is that correct? Correct (see the elaboration I just sent). > At this point, I'm not sure we know that the > limited API is sufficient. It's certainly not possible to easily port /all/ e

[issue10882] Add os.sendfile()

2011-02-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: You're right, that line is certainly wrong as it should compare for bytes but the trailer data still doesn't get appended. Do you have a BSD box in order to figure out what's wrong? -- ___ Python tracker

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Steven Bethard
Steven Bethard added the comment: I don't think there's any sense in "un-deprecating" optparse because: (1) It's only deprecated in the documentation - there is absolutely nothing in the code to keep you from continuing to use it, and there are no plans to remove it from Python. (2) One (mis

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: s/2.4/3.4/ s/2.5/3.5/ obviously :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue11136] imaplib IMAP4_SSL shutdown gets socket error in py 3.2

2011-02-06 Thread John
New submission from John : windows vista Python 3.2 rc2 situation: connected to gmail with IMAP4_SSL, did stuff, and finally IMAP4_SSL.close() IMAP4_SSL.logout() IMAP4_SSL.shutdown() shutdown() gets this error: socket.error: [Errno 10038] An operation was attempted on something that is not

[issue11136] imaplib IMAP4_SSL shutdown gets socket error in py 3.2

2011-02-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > IMAP4_SSL.close() > IMAP4_SSL.logout() > IMAP4_SSL.shutdown() logout() already calls shutdown() for you and closes the socket, so you don't have to do it yourself. -- nosy: +pitrou resolution: -> invalid status: open -> pending _

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread David Benjamin
Changes by David Benjamin : -- nosy: +davidben ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Anders Kaseorg
Anders Kaseorg added the comment: > (1) It's only deprecated in the documentation Which is why I suggested un-deprecating it in the documentation. (I want to avoid encouraging programmers to switch away from optparse until this bug is fixed.) > # proposed behavior > parser = ArgumentParser(

[issue11071] What's New review comments

2011-02-06 Thread Ned Deily
Ned Deily added the comment: In the paragraph on OS X builds, suggest changing "OS X" to "Mac OS X". Also, instead of the direct recommendation to install ActiveState Tcl, a recommendation that could very well change over the lifetime of the 3.2 release and the released copies of the What's

[issue11137] clarify use of imaplib IMAP4(_SSL) shutdown

2011-02-06 Thread John
New submission from John : Attempting IMAP4_SSL.shutdown() after IMAP4_SSL.logout() throws an error because the socket is already closed. (I cannot test with plain IMAP4.) Please add appropriate notice, perhaps under IMAP4.shutdown(). Perhaps something like "If you do not use open(), and do on

[issue11137] clarify use of imaplib IMAP4(_SSL) shutdown

2011-02-06 Thread Westley Martínez
Westley Martínez added the comment: Perhaps we should say something regarding that shutdown, and similar methods, must be called after open. -- nosy: +anikom15 ___ Python tracker _

[issue10882] Add os.sendfile()

2011-02-06 Thread Ross Lagerwall
Ross Lagerwall added the comment: With no changes, I get: == FAIL: test_trailers (test.test_os.TestSendfile) -- Traceback (most recent call last): File "/usr/

[issue11138] Docs: incollect example: "fill" and "align"

2011-02-06 Thread Urago Keisuke
New submission from Urago Keisuke : "Nesting arguments and more complex examples" at http://docs.python.org/library/string.html#format-examples Below example code is no errors: >>> for align, text in zip('<^>', ['left', 'center', 'right']): ... '{0:{align}{fill}16}'.format(text, fill=align,

[issue6294] Improve shutdown exception ignored message

2011-02-06 Thread Rob Lourens
Rob Lourens added the comment: I agree with R. David Murray's suggestions, and have implemented it in the attached patch. -- keywords: +patch nosy: +rob.lourens Added file: http://bugs.python.org/file20707/errors.patch ___ Python tracker

[issue11071] What's New review comments

2011-02-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Ned, thanks for the "Mac" correction. I prefer to leave the Tcl/Tk recommendation in place for several reasons: * for right now, it is needed to get tkinter to work and if we're too indirect about the fix, no one will find it and their install won't work.

[issue11071] What's New review comments

2011-02-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Victor, I added more imports and fixed the ones that were mismatched with the sample code. I've left a few out in a couple places where I thought the imports got in the way of the narrative. -- ___ Python track

[issue11071] What's New review comments

2011-02-06 Thread Ned Deily
Ned Deily added the comment: I understand your point and it is not a huge issue but let me make an attempt to expand on the rationale. > * for right now, it is needed to get tkinter to work and if we're too > indirect about the fix, no one will find it and their install won't work. It may be

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-06 Thread Steven Bethard
Steven Bethard added the comment: @Éric: yes, thanks! @Anders: The reason the current implementation gives you the behavior you don't want is that the first thing it does is scan the args list for things that look like flags (based on prefix_chars). It assumes that everything that looks like