[issue11076] Iterable argparse Namespace
Steven Bethard steven.beth...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue11076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Steven Bethard steven.beth...@gmail.com 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 workaround is to prefix with ./ $ cd ./-links-/ $ Anyway, it doesn't seem like anyone is offering to write up a patch to enable such an alternative parsing strategy, perhaps Eric's = workaround should be documented prominently somewhere? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10971 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11132] compileall.compile_dir loses 'optimize' parameter in recursion.
New submission from July Tikhonov july.t...@gmail.com: 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 more information. from compileall import compile_dir compile_dir('.', optimize=1) Listing . ... Compiling ./c.py ... Listing ./subdir ... Compiling ./subdir/a.py ... Compiling ./subdir/b.py ... 1 july@julynote:~/test ls -R .: c.py __pycache__ subdir ./__pycache__: c.cpython-32.pyo ./subdir: a.py b.py __pycache__ ./subdir/__pycache__: a.cpython-32.pyc b.cpython-32.pyc july@julynote:~/test It seems that the bug was introduced in svn revision 87019 (Add an optimize parameter to compile() to control the optimization level, and provide an interface to it in py_compile, compileall and PyZipFile.). In recursion, 'optimize' parameter is lost and replaced by default -1 (optimize level of the interpreter). Test patch added. -- components: Library (Lib) files: compileall.compile_dir.optimize.test.diff keywords: patch messages: 128048 nosy: july priority: normal severity: normal status: open title: compileall.compile_dir loses 'optimize' parameter in recursion. type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file20696/compileall.compile_dir.optimize.test.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11132] compileall.compile_dir loses 'optimize' parameter in recursion.
July Tikhonov july.t...@gmail.com added the comment: Patch added. -- Added file: http://bugs.python.org/file20697/compileall.compile_dir.optimize.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11071] What's New review comments
Daniel Urban urban.dani...@gmail.com 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue969718] BASECFLAGS are not passed to module build line
Stefan Krah stefan-use...@bytereef.org 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 your problem, too? -- Added file: http://bugs.python.org/file20698/sysconfig-flags-minimal.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue969718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11122] bdist_rpm fails
Éric Araujo mer...@netwok.org 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11122] bdist_rpm fails
Éric Araujo mer...@netwok.org 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 rep...@bugs.python.org http://bugs.python.org/issue11122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11071] What's New review comments
Daniel Urban urban.dani...@gmail.com 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 be a callable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Éric Araujo mer...@netwok.org 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 tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11132] compileall.compile_dir loses 'optimize' parameter in recursion.
Éric Araujo mer...@netwok.org 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 rep...@bugs.python.org http://bugs.python.org/issue11132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10042] total_ordering stack overflow
Éric Araujo mer...@netwok.org added the comment: FWIW, I just tested svnmerging the revision, the patch applied with minor merge conflicts and the test suite passes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9364] some problems with the documentation of pydoc
Éric Araujo mer...@netwok.org 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 version in the string, though: Welcome to Python 3.2's help utility! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8691] Doc: left alignment is not the default for numbers
Terry J. Reedy tjre...@udel.edu 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 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8691 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10971 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue969718] BASECFLAGS are not passed to module build line
Chris Lambacher ch...@kateandchris.net 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 not be able to provide a different one as override. The proposed minimal patch would leave the OPT value and make it unchangeable because CFLAGS would pull out a value for OPT from the Makefile which shows as in my current Ubuntu system: OPT=-DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes BASECFLAGS= -fno-strict-aliasing CFLAGS= $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS) The debian-sysconfig-flags looks the most correct because it allows override at any point by emulating the CFLAGS = $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS) logic. It still looks like it needs an override for EXTRA_CFLAGS and the logic for LD_SHARED looks wrong. In the Makefile LDSHARED is just: LDSHARED= $(CC) -shared -Wl,-O1 -Wl,-Bsymbolic-functions Why does LDSHARED need CFLAGS and CPPFLAGS? When provided as an override but not in the Makefile? Do we need to allow for this override in the case of overriding OPT, BASEFLAGS or EXTRA_CFLAGS? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue969718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9364] some problems with the documentation of pydoc
Changes by yeswanth swamiyeswa...@yahoo.com: Removed file: http://bugs.python.org/file20686/pydoc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9364] some problems with the documentation of pydoc
Changes by yeswanth swamiyeswa...@yahoo.com: Added file: http://bugs.python.org/file20699/pydoc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9364] some problems with the documentation of pydoc
yeswanth swamiyeswa...@yahoo.com 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 -- Added file: http://bugs.python.org/file20700/site.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Eric Smith e...@trueblade.com 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: usage: cd [-L|-P] [dir] $ cd -- -links- $ This would also work with argparse: import argparse parser = argparse.ArgumentParser(prog='cd') parser.add_argument('-L', help='follow symbolic links') parser.add_argument('-P', help='do not follow symbolic links') parser.add_argument('dir', help='directory name') print(parser.parse_args(['--', '-Links-'])) prints: Namespace(L=None, P=None, dir='-Links-') Continuing the example from my earlier post shows it won't work for values for optional arguments: parser.parse_args(['--asciidoc-opts -- -one']) usage: a2x [-h] [--asciidoc-opts ASCIIDOC_OPTS] a2x: error: unrecognized arguments: --asciidoc-opts -- -one I believe it's only the '=' that will solve this problem. In fact, because of this issue, I suggest we document '=' as the preferred way to call argparse when optional arguments have values, and change all of the examples to use it. I also think it would cause less confusion (because of this issue) if the help output showed the equal sign. But I realize that's probably more controversial. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails
Nick Coghlan ncogh...@gmail.com 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 affected modules. -- Added file: http://bugs.python.org/file20701/test_zipimport_support.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10971 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails
Nick Coghlan ncogh...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue10971 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails
Changes by Nick Coghlan ncogh...@gmail.com: Removed file: http://bugs.python.org/file20701/test_zipimport_support.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10971 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue969718] BASECFLAGS are not passed to module build line
Antoine Pitrou pit...@free.fr 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 not be able to provide a different one as override. I don't understand how you can cross-compile using the host Python Makefile. Could you explain? The proposed minimal patch would leave the OPT value and make it unchangeable because CFLAGS would pull out a value for OPT from the Makefile which shows as in my current Ubuntu system: OPT=-DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes BASECFLAGS= -fno-strict-aliasing CFLAGS= $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS) The debian-sysconfig-flags looks the most correct because it allows override at any point by emulating the CFLAGS = $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS) logic. It still looks like it needs an override for EXTRA_CFLAGS EXTRA_CFLAGS is not defined in the Makefile so it would probably be taken from the environment anyway (if my understand of Makefiles is right). That seems to explain the name EXTRA_CFLAGS, but I'm no specialist of the jungle that have building systems become under Unix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue969718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9364] some problems with the documentation of pydoc
Éric Araujo mer...@netwok.org 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 the built-in help function I suggested to remove “with a twist”, not the other part of the line. The other patch is fine, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9364] some problems with the documentation of pydoc
Changes by Éric Araujo mer...@netwok.org: -- assignee: docs@python - eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9364] some problems with the documentation of pydoc
Changes by yeswanth swamiyeswa...@yahoo.com: Removed file: http://bugs.python.org/file20700/site.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9364] some problems with the documentation of pydoc
Changes by yeswanth swamiyeswa...@yahoo.com: Added file: http://bugs.python.org/file20703/site.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11133] inspect.getattr_static code execution
New submission from Daniel Urban urban.dani...@gmail.com: 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 descriptor. If you find other cases please report them so they can be fixed or documented. I'd like to report another case: when an object's __dict__ is an instance of a dict subclass which overrides dict.get: _sentinel = object() class MyDict(dict): ... def get(self, key, default=_sentinel): ... print('Hello World!') # This code will execute ... if default is _sentinel: ... return super().get(key) ... else: ... return super().get(key, default) ... class X: ... def __init__(self): ... self.__dict__ = MyDict() ... x = X() inspect.getattr_static(x, 'foo', 0) Hello World! 0 (In line 1072. _check_instance calls MyDict.get: instance_dict.get(attr, _sentinel).) -- components: Library (Lib) messages: 128067 nosy: durban, michael.foord priority: normal severity: normal status: open title: inspect.getattr_static code execution versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11116] mailbox and email errors
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: Thanks for spending your free time, almost alone in such a widespread area like this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8691] Doc: left alignment is not the default for numbers
Éric Araujo mer...@netwok.org added the comment: Or to Doc/ACKS.txt, which I’ve recently discovered. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8691 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11131] decimal.py: plus/minus with ROUND_FLOOR
Mark Dickinson dicki...@gmail.com 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: http://bugs.python.org/file20704/issue11131.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue940286] pydoc.Helper.help() ignores input/output init parameters
Changes by Éric Araujo mer...@netwok.org: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue940286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Anders Kaseorg ande...@mit.edu 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']) (Values at 0x7fc97a93a7e8: {'a': ('-first', '-second')}, []) But inputting those arguments is _not possible_ with argparse. parser = argparse.ArgumentParser() parser.add_argument('-a', nargs=2) parser.parse_args(['-a', '-first', '-second']) usage: [-h] [-a A A] : error: argument -a: expected 2 argument(s) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Eric Smith e...@trueblade.com 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 the documentation to point out the issue now, but the feature request can only go in 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11133] inspect.getattr_static code execution
Michael Foord mich...@voidspace.org.uk 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 rep...@bugs.python.org http://bugs.python.org/issue11133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11133] inspect.getattr_static code execution
Changes by Michael Foord mich...@voidspace.org.uk: -- assignee: - michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11090] Doc errors for unittest in Python 3.1
Éric Araujo mer...@netwok.org 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). -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11134] Add missing type slots
New submission from Martin v. Löwis mar...@v.loewis.de: 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 slots versions: Python 3.2 Added file: http://bugs.python.org/file20705/typeslots.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Anders Kaseorg ande...@mit.edu 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 versions, would it be reasonable to un-deprecate optparse until argparse becomes a suitable replacement? There are still lots of programmers working in Python 2.7. [1] bethard’s msg128047 is confusing positional arguments with option arguments. All UNIX commands that accept option arguments have no trouble accepting option arguments that begin with -. For example, ‘grep -e -pattern file’ is commonly used to search for patterns beginning with -. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11135] Redundant doc field in TypeSpec
New submission from Martin v. Löwis mar...@v.loewis.de: 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 slots may only refer to function pointers; as it turns out, putting character pointers in there works fine as well, so I recommend to drop the doc field in TypeSlot. The patch also fixes some labelling in the xxlimited module. -- files: tp_doc.diff keywords: patch messages: 128077 nosy: georg.brandl, loewis priority: release blocker severity: normal status: open title: Redundant doc field in TypeSpec versions: Python 3.2 Added file: http://bugs.python.org/file20706/tp_doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Eric Smith e...@trueblade.com 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 stdlib is problematic, as everyone knows. I'll look into producing a patch to add this as optional behavior, then we can separately think about changing the default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11134] Add missing type slots
Antoine Pitrou pit...@free.fr 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11113] html.entities mapping dicts need updating?
Eric Smith e...@trueblade.com 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 rep...@bugs.python.org http://bugs.python.org/issue3 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11113] html.entities mapping dicts need updating?
Éric Araujo mer...@netwok.org added the comment: To make my intent explicit: an updated mapping could generate references invalid for 4.01. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11113] html.entities mapping dicts need updating?
Eric Smith e...@trueblade.com 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 rep...@bugs.python.org http://bugs.python.org/issue3 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11134] Add missing type slots
Martin v. Löwis mar...@v.loewis.de 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 such a marking, or how the marking could be carried out. I assume that uptake of the ABI is slow either way (marked or not), although you might manage to slow it down further by marking it experimental. I can't see why that would be desirable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11134] Add missing type slots
Antoine Pitrou pit...@free.fr 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 such a marking, or how the marking could be carried out. 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? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11134] Add missing type slots
Raymond Hettinger rhettin...@users.sourceforge.net 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 rep...@bugs.python.org http://bugs.python.org/issue11134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11090] Doc errors for unittest in Python 3.1
Éric Araujo mer...@netwok.org 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 rep...@bugs.python.org http://bugs.python.org/issue11090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11090] Doc errors for unittest in Python 3.1
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file20657/fix-11090.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11134] Add missing type slots
Martin v. Löwis mar...@v.loewis.de 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 built against the initial release would continue to work in the new release; extension modules built against the new release would work with the old release as long as they don't use the additions. So I'd be in favor of extending the ABI conservatively, as long as developers explicitly need to opt-in to use such additions (e.g. by defining a macro) Most of the recent ABI changes would have fallen under such a policy; the only incompatible change is the removal of a field (issue11135). If that isn't carried out before 3.2 is released, then the field would just remain unused. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11134] Add missing type slots
Martin v. Löwis mar...@v.loewis.de 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/ existing extension modules to this ABI - but that never was the plan, only the majority should be supported. It can be demonstrated that the ABI supports small extension modules (xxlimited). For anything else, I'd wait until people report limitations that they run into. Then, we can either a strategy to rewrite the module (as also would have been possible with all the recent additions); if rewriting is not sensible, we have to extend the ABI (which hopefully won't be necessary often). So I wouldn't communicate that the ABI is experimental (because that would suggest that it may go away or change - which I do hope will not be necessary). Instead, announcing that we are open to extend it if there is a demonstrated need would indeed be useful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10882] Add os.sendfile()
Giampaolo Rodola' g.rod...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue10882 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Steven Bethard steven.beth...@gmail.com 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?)feature doesn't make the rest of the module useless. And yes Eric, it would be awesome if you could develop a patch that allows the alternate parsing to be enabled when someone wants it. We should think about deprecation strategy though. Maybe something like: == Python 3.3 == # Python 3.2 behavior parser = ArgumentParser(error_on_unknown_options=True) # proposed behavior parser = ArgumentParser(error_on_unknown_options=False) # deprecation warning when not specified parser = ArgumentParser() == Python 2.4 == # error warning when not specified parser = ArgumentParser() == Python 2.5 == # defaults to error_on_unknown_options=False parser = ArgumentParser() I'm not sure that's the right way to do it, but if the plan is to change the default at some point, we should make sure that we have a deprecation plan before we add the feature. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Éric Araujo mer...@netwok.org added the comment: s/2.4/3.4/ s/2.5/3.5/ obviously :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11136] imaplib IMAP4_SSL shutdown gets socket error in py 3.2
New submission from John jh45...@gmail.com: 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 a socket No problem in Python 3.1.2 For now I don't use shutdown(), and hope the socket is closed automatically when the interpreter exits (as open files are). -- jh -- components: Library (Lib) messages: 128092 nosy: jh45 priority: normal severity: normal status: open title: imaplib IMAP4_SSL shutdown gets socket error in py 3.2 type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11136] imaplib IMAP4_SSL shutdown gets socket error in py 3.2
Antoine Pitrou pit...@free.fr 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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Changes by David Benjamin david...@mit.edu: -- nosy: +davidben ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Anders Kaseorg ande...@mit.edu 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(error_on_unknown_options=False) Perhaps you weren’t literally proposing “error_on_unknown_options=False” as the name of the new flag, but note that neither the current nor proposed behaviors have nothing to do with whether arguments look like known or unknown options. Under the proposed behavior, anything in argument position (--asciidoc-opts ___) is parsed as an argument, no matter what it looks like. So a more accurate name might be “refuse_dashed_args=False”, or more generally (in case prefix_chars != '-'), “refuse_prefixed_args=False”? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11071] What's New review comments
Ned Deily n...@acm.org 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 New document, please substitute a reference to the web page, http://www.python.org/download/mac/tcltk/ which will contain the most up-to-date information. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11137] clarify use of imaplib IMAP4(_SSL) shutdown
New submission from John jh45...@gmail.com: 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 only login() and logout(), you do not need shutdown(), as logout() does it for you. -- jh -- assignee: docs@python components: Documentation messages: 128096 nosy: docs@python, jh45 priority: normal severity: normal status: open title: clarify use of imaplib IMAP4(_SSL) shutdown versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11137] clarify use of imaplib IMAP4(_SSL) shutdown
Westley Martínez aniko...@gmail.com added the comment: Perhaps we should say something regarding that shutdown, and similar methods, must be called after open. -- nosy: +anikom15 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10882] Add os.sendfile()
Ross Lagerwall rosslagerw...@gmail.com added the comment: With no changes, I get: == FAIL: test_trailers (test.test_os.TestSendfile) -- Traceback (most recent call last): File /usr/home/ross/py3k_sftest/Lib/test/test_os.py, line 1531, in test_trailers self.assertEqual(data, abcde12345) AssertionError: b'abcde12345' != 'abcde12345' After changing, the tests work perfectly. Perhaps its the FreeBSD version? Here's the output from uname: FreeBSD fbds 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010 r...@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 Maybe its a bug on that platform, you could try building a sendfile program in C with trailer data. Or try a simple test in the interpreter like the one in msg127326 but with added trailer data. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10882 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11138] Docs: incollect example: fill and align
New submission from Urago Keisuke br...@resourcez.org: 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, align=align) I think meaning is as follows: ... '{0:{fill}{align}16}'.format(text, fill=align, align=align) -- assignee: docs@python components: Documentation messages: 128099 nosy: Urago.Keisuke, docs@python priority: normal severity: normal status: open title: Docs: incollect example: fill and align versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6294] Improve shutdown exception ignored message
Rob Lourens roblour...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue6294 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11071] What's New review comments
Raymond Hettinger rhettin...@users.sourceforge.net 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. * if other options become available in the future or it stops being needed, I will update the whatsnew recommendation in a point release. * the recommendation won't stop being correct. it may become unnecessary, but it will still work. The only bad outcome here would be if we fail to speak-up and tell users what they have to do to get their install to work. There are no points for hiding the message behind another link and letting people get erratic crashes when they do an install and try to run IDLE. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11071] What's New review comments
Raymond Hettinger rhettin...@users.sourceforge.net 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 tracker rep...@bugs.python.org http://bugs.python.org/issue11071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11071] What's New review comments
Ned Deily n...@acm.org 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 indirect but the situation is complicated and dynamic. There are references to the canonical webpage in the Installer welcome message (in bold), the Installer ReadMe, and in IDLE if the known-to-be-problematic Apple version is being used. As it stands, the What's New document is the only place that doesn't refer to the webpage. * if other options become available in the future or it stops being needed, I will update the whatsnew recommendation in a point release. That's fine but it doesn't necessarily help the users who will not be installing cutting edge versions of Python 3.2.x maintenance releases. * the recommendation won't stop being correct. it may become unnecessary, but it will still work. That's not necessarily true. We have no control over what ActiveState does. From their website: Looking for access to older versions of ActiveTcl? Community Edition offers access to the newest versions of ActiveTcl. Access to older versions is available only in Business Edition. We could find that the current working version has been replaced by one that doesn't work. Between the ActiveState 8.5.8.2 (released earlier in 2010) and 8.5.9, there was a huge change, going from supplying the Carbon-based Tk version (which was supported on Mac OS 10.4+ and on PPC and Intel 32-bit-only archs) to the Cocoa-based one (10.5+ and Intel-only and 32-/64-bit). The Carbon one is no longer available to the community. If you were using Tk 8.5 on a PPC machine or on 10.4, my understanding it that you are now out of luck unless you make arrangements with ActiveState to be covered under presumably a non-zero-cost license. Something like that could happen again. There is also the issue of the ActiveState community license; some users of the python.org distribution may not be able to use the ActiveState version because of its terms. There are more details that need to be filled in on the download page prior to release to expand on that. The whole point of creating the canonical webpage is to have one place to go for the current information in an inherently dynamic environment. I think there is a strong case to change the wording in the What's New as suggested but, if you think it better to not do so, I will be OK with your decision. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Steven Bethard steven.beth...@gmail.com 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 a flag is intended to be one, before it ever looks at how many arguments the flag before it takes or anything like that. This is the source of your problem - argparse assumes -safe is a flag, and as a result, there is no argument for --asciidoc-opts'. So perhaps a better name would be something like dont_assume_everything_that_looks_like_a_flag_is_intended_to_be_one. ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com