[issue15188] test_ldshared_value failure on OS X using python.org Pythons
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f4470babf79b by Ned Deily in branch 'default': Issue #15188: Prevent test_ldshared_value failure due to slightly http://hg.python.org/cpython/rev/f4470babf79b -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15188 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10652] test___all_ + test_tcl fails (Windows installed binary)
Terry J. Reedy tjre...@udel.edu added the comment: I tested this on Windows in my installed 3.3.0b1. Copying the inserted lines to my repository copy (where I cannot test it) gives the attached patch. On 3.2.3, the insertion line would be 1056 instead of 1158. -- Added file: http://bugs.python.org/file26475/Issue10652.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10652 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10652] test___all_ + test_tcl fails (Windows installed binary)
Terry J. Reedy tjre...@udel.edu added the comment: Hirokazu's original patch was to restore sys.modules after *every* test, not just sys.modules. That *did* cause problems because (at minimum) of references in importlib. Restoring only after __all__ would only let test_tcl run but not test_tk. And that is assuming alphabetic, not randomized order. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10652 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14900] cProfile does not take its result headers as sort arguments
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15418] 2to3 docs should mention setup.py fixes required to install compatible packages in Python 3
New submission from anatoly techtonik techto...@gmail.com: http://docs.python.org/py3k/library/2to3.html should mention the practice of running 2to3 in setup.py for codebase compatible with both Python 2 and Python 3. -- assignee: docs@python components: Documentation messages: 166108 nosy: docs@python, techtonik priority: normal severity: normal status: open title: 2to3 docs should mention setup.py fixes required to install compatible packages in Python 3 versions: Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15418 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15419] distutils: build_py_2to3 should use a separate build directory
New submission from anatoly techtonik techto...@gmail.com: This scenario fails: python setup.py install python3 setup.py install Because it seems like code once built for Python 2 is not rebuild when installing for Python 3. -- assignee: eric.araujo components: Distutils, Distutils2 messages: 166109 nosy: alexis, eric.araujo, tarek, techtonik priority: normal severity: normal status: open title: distutils: build_py_2to3 should use a separate build directory versions: Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15419 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6964] import new fails
anatoly techtonik techto...@gmail.com added the comment: Damn it. I've run 2to3 during setup.py phase and went smoothly, but when I run examples the package fails. It should at least warn about this import new. It should not be that hard to catch. -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
New submission from anatoly techtonik techto...@gmail.com: issue6964 is closed, so this is a reminder that discussion over the actual issue is not finished yet. -- components: 2to3 (2.x to 3.x conversion tool) messages: 166111 nosy: techtonik priority: normal severity: normal status: open title: issue6964 reminder versions: Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
Martin v. Löwis mar...@v.loewis.de added the comment: What is the issue that you are reporting here? If you think there is an issue with Python, please state explicitly what the issue is. I think issue 6964 was invalid to begin with: it complained that the new module is no longer, but deletion of the new module was intentional. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
anatoly techtonik techto...@gmail.com added the comment: You're mistaken. issue6964 is not about deleting `new` module in Python 3, it is about the 2to3 tool skipping this fact without warning. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5819] Add PYTHONPREFIXES environment variable
Andrew Svetlov andrew.svet...@gmail.com added the comment: As PEP 405 has been implemented in Python 3.3 this issue can be closed I think. -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5819 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15184] Test failure in test_sysconfig_module
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c286d50ecd19 by Ned Deily in branch 'default': Issue #15184: Some config variables in test_sysconfig_module http://hg.python.org/cpython/rev/c286d50ecd19 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15184 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15188] test_ldshared_value failure on OS X using python.org Pythons
Ned Deily n...@acm.org added the comment: With the changes here along with the fixes in Issue15184, I'm declaring this resolved for 3.3. If and when _sysconfigdata.py gets moved, build-installer.py will need to be tweaked. -- dependencies: -_sysconfigdata is generated in srcdir, not builddir resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15188 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9548] locale can be imported at startup but relies on too many library modules
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9548 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11051] Improve Python 3.3 startup time
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15184] Test failure in test_sysconfig_module
Ned Deily n...@acm.org added the comment: The buildbot failures were reproducible on OS X 10.6 with Xcode 3. With the latest two fixes and with the fixes for Issue15188, I believe this issue is resolved for 3.3. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15184 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15094] Incorrectly placed #endif in _tkinter.c.
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 657673a37dd3 by Andrew Svetlov in branch 'default': #15094: fix incorrectly placed #endif in _tkinter.c. http://hg.python.org/cpython/rev/657673a37dd3 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15094] Incorrectly placed #endif in _tkinter.c.
Andrew Svetlov andrew.svet...@gmail.com added the comment: Fixed. Thanks, Serhiy! -- assignee: - asvetlov nosy: +asvetlov resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
Florent Xicluna florent.xicl...@gmail.com added the comment: It was answered in the previous message by Georg, on the related issue: http://bugs.python.org/issue6964#msg93032 Bottom line: move over to the types module *before* running 2to3. (the thread is very short, and clearly states that there's no bug) -- nosy: +flox resolution: - invalid superseder: - import new fails ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
anatoly techtonik techto...@gmail.com added the comment: From the user point of view that's the same as saying for optparse: Bottom line: move over to the argparse module *before* running 2to3. -- resolution: invalid - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
anatoly techtonik techto...@gmail.com added the comment: Bottom line: The fact that 2to3 isn't capable to fix import new automatically doesn't mean it should not warn that this code should be fixed manually. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10854] Output .pyd name in error message of ImportError when DLL load fails
Kristján Valur Jónsson krist...@ccpgames.com added the comment: An example patch that aims to put the name and path in str() and repr() representations of ImportError. Output when _socket.pyd is not found: import socket Traceback (most recent call last): File stdin, line 1, in module File D:\pydev\hg\cpython3\lib\socket.py, line 47, in module import _socket ImportError: No module named '_socket', _socket, sys.last_value ImportError No module named '_socket', '_socket', None -- Added file: http://bugs.python.org/file26476/ImportError.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10854 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15402] Correct __sizeof__ support for struct
Andrew Svetlov andrew.svet...@gmail.com added the comment: +1 for patch applying in 3.3 at least -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15402 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15390] PEP 3121, 384 refactoring applied to datetime module
Andrew Svetlov andrew.svet...@gmail.com added the comment: Too late for 3.3 -- nosy: +asvetlov versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15390 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15133] tkinter.BooleanVar.get() behavior and docstring disagree
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
Martin v. Löwis mar...@v.loewis.de added the comment: It does mean exactly that. 2to3 is not designed or intended to ever issue warnings. So if your request is that it should issue a warning, I'm closing it as won't fix. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
Florent Xicluna florent.xicl...@gmail.com added the comment: The documentation for porting is already clear about using -3 switch. http://docs.python.org/dev/howto/pyporting.html#eliminate-3-warnings The argparse module is different because it is not in the stdlib in 2.6, and you can stay with optparse if you write code compatible with all versions between 2.6 and 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
anatoly techtonik techto...@gmail.com added the comment: My request is that after running 2to3 my code still doesn't work in Python 3. -- resolution: wont fix - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
anatoly techtonik techto...@gmail.com added the comment: Florent: It is the same. new module just doesn't need replacement, because its functionality is in the language, therefore it is no different saying. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15041] tkinter documentation: update see also list
Andrew Svetlov andrew.svet...@gmail.com added the comment: Add all recommended resources into seealso section. If it's ok I will commit it next week. -- keywords: +patch Added file: http://bugs.python.org/file26477/issue15041.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15041 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
Martin v. Löwis mar...@v.loewis.de added the comment: Please don't reopen issues. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: - wont fix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
Martin v. Löwis mar...@v.loewis.de added the comment: IIUC, your request is not should issue a warning, but 2to3 should make sure that the resulting code runs on Python 3. It is beyond the scope of 2to3 to provide such guarantees. Users are required to test the conversion result, as it cannot be perfect. So with the scope of this issue changed (again), the issue still won't be fixed. If somebody contributed a fixer that converted the new module in 2to3, I might be in favor of integrating it (but others still may not). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15419] distutils: build_py_2to3 should use a separate build directory
R. David Murray rdmur...@bitdance.com added the comment: Could you please be more specific about what you are trying to do and what error you are seeing? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15419 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14578] importlib doesn't check Windows registry for paths
Brett Cannon br...@python.org added the comment: So it should end up in Lib/importlib/_bootstrap.py since it is directly part of how import works. The original code as found in Python 3.2 for PyWin_FindRegisteredModule() is referenced in Python/import.c and is implemented in PC/import_nt.c. You will want to create a new sys.meta_path importer (if I'm reading the code from Python/import.c correctly in terms of the call to PyWin_FindRegisteredModule() happening before sys.path is traversed). You can refactor FileFinder if you need to in order to reuse its code. In terms of working with importlib, you will probably need the winreg module, so inject that (see _setup() on how to do that). Also remember that while this is Python code, you will need to rebuild to trigger the regeneration of importlib.h. Otherwise (I hope) it isn't too complicated or hard to understand. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14578 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15397] Unbinding of methods
Andrew Svetlov andrew.svet...@gmail.com added the comment: Stefan, I've fixed refleak found by you in #15404. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15421] Calendar.itermonthdates OverflowError
New submission from Cédric Krier cedric.kr...@b2ck.com: itermonthdates fails when working on the last month of Here is a patch that catch the OverflowError. -- components: Library (Lib) files: calendar.patch keywords: patch messages: 166137 nosy: ced priority: normal severity: normal status: open title: Calendar.itermonthdates OverflowError type: enhancement Added file: http://bugs.python.org/file26478/calendar.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15422] Get rid of PyCFunction_New macro
New submission from Andrew Svetlov andrew.svet...@gmail.com: For now (3.3 beta) PyCFunction_New defined as macro calling PyCFunction_NewEx. To be compatible with PEP 384 (Defining a Stable ABI) Objects/methodobject.c has trampoline function named PyCFunction_New which calls PyCFunction_NewEx. This is only single usage of this idiom in CPython code. For sake of uniformity we need to: - remove PyCFunction_New macro from Include/methodobject.h - declare PyCFunction_New as function in Include/methodobject.h - replace all calls of PyCFunction_New to PyCFunction_NewEx in code (about 8 occurrences). -- assignee: asvetlov components: Interpreter Core messages: 166138 nosy: asvetlov, loewis priority: normal severity: normal stage: needs patch status: open title: Get rid of PyCFunction_New macro type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15423] Minidom tries to parse tags inside of script tag
R. David Murray rdmur...@bitdance.com added the comment: I'm sorry, my phrasing there was awkward. I didn't mean Why do you think this is a bug, I meant I don't think this is a bug, am I missing something? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15397] Unbinding of methods
Stefan Mihaila mstefa...@gmail.com added the comment: Richard, yes, I think that would work, I didn't think of using f.__self__'s type. You might want to replace if self is not None and not isinstance(self, types.ModuleType): with if self is not None and not isinstance(self, types.ModuleType) \ and not isinstance(self, type): to correctly raise an exception when called on a classmethod too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10854] Output .pyd name in error message of ImportError when DLL load fails
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: How it the new message better than ImportError: No module named '_socket'? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10854 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15397] Unbinding of methods
Stefan Mihaila mstefa...@gmail.com added the comment: Andrew, thanks for creating a separate issue (the refleak was very rare and I thought I'd put it in the same place, but now I realize it was a bad idea). Richard, actually, the isinstance(self, type) check I mentioned earlier would have to be before the hastattr(f, '__func__') check, because Python classmethods provide a __func__ too: def unbind(f): self = getattr(f, '__self__', None) if self is not None and not isinstance(self, types.ModuleType) \ and not isinstance(self, type): if hasattr(f, '__func__'): return f.__func__ return getattr(type(f.__self__), f.__name__) raise TypeError('not a bound method') Anyway, I'm not convinced this is worth adding anymore. As Antoine Pitrou suggested on the ml, it would probably be a better idea if I implemented __reduce__ for builtin methods as well as Python methods rather than having a separate opcode for pickling methods. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15424] __sizeof__ of array should include size of items
New submission from Ludwig Hähne w...@gmx.li: If sys.getsizeof is called on an array, the result doesn't include the size of the items: from array import array a = array(i, [0] * 10) a.__sizeof__() 40 While this makes sense for a list, an array doesn't have separate referents that could be sized: import gc gc.get_referents(a) [] The attached patch adds an implementation of the __sizeof__ method for arrays that includes the size of the buffer for the elements. It would be great if the patch would be considered for one of the upcoming versions of Python. Thanks, Ludwig -- components: Library (Lib) files: array_sizeof.patch keywords: patch messages: 166147 nosy: Pankrat priority: normal severity: normal status: open title: __sizeof__ of array should include size of items type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file26479/array_sizeof.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14489] repr() function link on the built-in function documentation is incorrect
Piotr Dobrogost p...@bugs.python.dobrogost.net added the comment: The wrong link is still at http://docs.python.org/library/functions.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14489 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11776] types.MethodType() params and usage is not documented
anatoly techtonik techto...@gmail.com added the comment: Still not documented.. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15424] __sizeof__ of array should include size of items
Martin v. Löwis mar...@v.loewis.de added the comment: Can you please submit a contributor form? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15423] Minidom tries to parse tags inside of script tag
Martin v. Löwis mar...@v.loewis.de added the comment: R. David is correct. The XML specification *clearly* defines that your XML document is ill-formed, since the closing tag for 'bb' is '/b', which doesn't match. XML is not HTML: the XML parser must not treat the script element specially. -- nosy: +loewis status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11776] types.MethodType() params and usage is not documented
anatoly techtonik techto...@gmail.com added the comment: Another 4 complains about missing references: http://stackoverflow.com/questions/1015307/python-bind-an-unbound-method -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15424] __sizeof__ of array should include size of items
Serhiy Storchaka storch...@gmail.com added the comment: I think it should be applied to 3.2 too. -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15423] Minidom tries to parse tags inside of script tag
AliDD registration...@web.de added the comment: Document Object Model (DOM) Level 1 Specification at http://www.w3.org/TR/REC-DOM-Level-1/ states that The Document Object Model provides a standard set of objects for representing HTML and XML documents That's why I try to use xml.dom.minidom to parse some HTML. And my HTML sample is valid HTML. Possibly I misunderstand purpose of xml.dom.minidom and / or expat and they should be used only with XML. Or I should use minidom.parseString() with some parser other as default expat. If so could you recommend some built in one? If xml.dom.minidom should process only XML and not HTML (which not always is valid XML), than I'm sorry for disturbance and please feel free to close this issue as invalid. -- resolution: invalid - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15424] __sizeof__ of array should include size of items
Ludwig Hähne w...@gmx.li added the comment: Uses self-allocated instead of Py_SIZE as Martin suggested. -- Added file: http://bugs.python.org/file26480/array_sizeof_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
anatoly techtonik techto...@gmail.com added the comment: Please don't reopen issues. Please don't ask for such silly stuff. You can understand the reason why this issue was opened, so why do you keep closing it if the issue is not resolved? The scope of this issue never changed, Martin. If you follow the user story, it is still the same original user issue or bad user experience with 2to3 tool. It is fine if you're not going to work on a fix, but that's NOT the reason to close the issue. The proper fix would be to explain why you think there is nobody except yourself who can fix that, or provide the guarantees that the fix won't be accepted. -- resolution: wont fix - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15424] __sizeof__ of array should include size of items
Ludwig Hähne w...@gmx.li added the comment: Yes, it would be great if the change could be applied to 3.2 (and 2.7) but I guess not many people will be affected by the problem. BTW, I just submitted the contributor form. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15423] Minidom tries to parse tags inside of script tag
R. David Murray rdmur...@bitdance.com added the comment: *xml*.dom.minidom parses only XML. The documentation mentions only xml, not html. I suppose that confusion could arise from the fact that that the w3c-dom API model can be provided by things that parse html as well. I'm not sure if it is worth adding a documentation note to that effect or not, but if so that would be a different issue. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15423] Minidom tries to parse tags inside of script tag
Ezio Melotti ezio.melo...@gmail.com added the comment: That's why I try to use xml.dom.minidom to parse some HTML. Have you tried HTMLParser? -- nosy: +ezio.melotti resolution: - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14910] argparse: disable abbreviation
Steven Bethard steven.beth...@gmail.com added the comment: I think it makes a lot of sense to allow people to disable abbreviations, so +1 on the feature request. The patch looked good. There was one typo - using accept_abbrev in the docstring instead of allow_abbrev as in the implementation, and I fixed that and uploaded a new patch. To be complete, the patch also needs to add some documentation, edit Misc/NEWS, etc. See: http://docs.python.org/devguide/patch.html#preparation -- versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file26481/14910.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14910 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14910] argparse: disable abbreviation
Steven Bethard steven.beth...@gmail.com added the comment: Sorry, my mistake, the doc changes were already in the patch. I just checked them and they look good too. So everything's ready to commit. Thanks for your contribution! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14910 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15392] Create a unittest framework for IDLE
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15360] Behavior of assigning to __dict__ is not documented
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15350] {urllib,urllib.parse}.urlencode.__doc__ is unclear
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14910] argparse: disable abbreviation
R. David Murray rdmur...@bitdance.com added the comment: Jonathan: we are in feature freeze right now preparing 3.3 for release, so you might want to ping the issue once 3.3 is out to remind us to do the checkin. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14910 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15425] Another strange Tracebacks with importlib
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: Two easy ways to get tracebacks which contain useless importlib._bootstrap rows: - When there is a syntax error in the imported module - On import package.module, when top-level package cannot be imported $ ./python -c import foo Traceback (most recent call last): File string, line 1, in module File frozen importlib._bootstrap, line 1421, in _find_and_load File frozen importlib._bootstrap, line 1388, in _find_and_load_unlocked File frozen importlib._bootstrap, line 527, in _check_name_wrapper File frozen importlib._bootstrap, line 899, in load_module File frozen importlib._bootstrap, line 880, in load_module File frozen importlib._bootstrap, line 503, in module_for_loader_wrapper File frozen importlib._bootstrap, line 744, in _load_module File frozen importlib._bootstrap, line 857, in get_code File ./foo.py, line 1 invalid syntax ^ SyntaxError: invalid syntax $ ./python Python 3.3.0b1 (default:afdb0e1a9dac+, Jul 19 2012, 23:55:02) [GCC 4.4.3] on linux Type help, copyright, credits or license for more information. import _sqlite3 del _sqlite3.register_converter import sqlite3.dump Traceback (most recent call last): File stdin, line 1, in module File frozen importlib._bootstrap, line 1421, in _find_and_load File frozen importlib._bootstrap, line 1372, in _find_and_load_unlocked File /home/amauryfa/python/cpython3.x/Lib/sqlite3/__init__.py, line 23, in module from sqlite3.dbapi2 import * File /home/amauryfa/python/cpython3.x/Lib/sqlite3/dbapi2.py, line 83, in module register_adapters_and_converters() File /home/amauryfa/python/cpython3.x/Lib/sqlite3/dbapi2.py, line 80, in register_adapters_and_converters register_converter(date, convert_date) NameError: global name 'register_converter' is not defined -- messages: 166163 nosy: amaury.forgeotdarc, brett.cannon, pitrou priority: normal severity: normal status: open title: Another strange Tracebacks with importlib type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15426] On a x86_64 Linux workstation, the build-from-source is borked.
New submission from Shocked Pancake shockedpanc...@gmail.com: On a x86_64 Linux workstation, when building from source with ./configure --prefix=/usr --libdir=/usr/lib64 --enable-ipv6 --with-threads --enable-shared --doc-dir=/usr/doc/python --mandir=/usr/man, almost all library get installed in /usr/lib and not /usr/lib64. And when the python interpreter get launched, it complain about not finding platform dependent libraries and that I should set $PYTHONHOME. When I apply the patch that I joined with this, it all works well. -- components: Build files: python3.x86_64.diff keywords: patch messages: 166164 nosy: Shocked.Pancake priority: normal severity: normal status: open title: On a x86_64 Linux workstation, the build-from-source is borked. versions: Python 3.2 Added file: http://bugs.python.org/file26482/python3.x86_64.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15426 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8538] Add FlagAction to argparse
Steven Bethard steven.beth...@gmail.com added the comment: On the off chance that someone was waiting for feedback from me, I'll say: (1) A simple boolean --foo/--no-foo action seems useful to me. I would probably call it BooleanOptionalAction rather than FlagAction. (Almost anything could be considered a flag.) (2) At the moment, argparse doesn't supply any actions, so I don't think we should make a separate namespace for them. If it starts to grow a list of such actions, we can add a separate namespace later. (And given that the name will end with Action, I think it should be pretty clear without the namespace.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8538 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15426] On a x86_64 Linux workstation, the build-from-source is borked.
Antoine Pitrou pit...@free.fr added the comment: This might (or might not) be a duplicate of issue1294959. -- nosy: +doko, eric.araujo, pitrou versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15426 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13252] new decumulate() function in itertools module
Ezio Melotti ezio.melo...@gmail.com added the comment: I don't think this should go in itertools. It could go in the recipes at the bottom of the itertools doc, if you can provide some valid use cases (and possibly a patch too). -- nosy: +ezio.melotti stage: - needs patch versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13252 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14578] importlib doesn't check Windows registry for paths
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I don't have Windows, but here is an example of a WindowsRegistryImporter, written outside importlib (the script also contains a fake implementation of winreg, so I could test it...) Of course it needs to be rewritten to fit in _bootstrap.py; at least the script shows that it's only necessary to implement a find_module() function. I'm not sure I had all details right - for example, should we search for the full module name, or only the last component? This loader has some interesting features; for example it's possible to have several modules in the same .pyd file, as long as it exports the various PyInit_* functions. -- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file26483/winreg_loader.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14578 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6804] IDLE: Detect Python files even if name doesn't end in .py
Daniel Swanson popcorn.tomato.d...@gmail.com added the comment: No. When I try to open the file a small window entitled Specify file encoding pops up that says The file's encoding is invalid in Python 3.x. Idle will convert it to UTF-8. What is the current encoding of the file? followed by an entry widget that has cp1252 and ok and cancel buttons. When I click ok the computer go dunnn and a error window titled Decoding Error that says File C:\Python32\misc\bee.jpg Failed to Decode with an ok button which, when clicked, closes idle (the edit window, not the shell). Does that answer your question? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6804 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'
Steven Bethard steven.beth...@gmail.com added the comment: The fix looks right, but we definitely need a test. I tried to write one, but I'm not sure how to do this properly given how test_argparse redirects standard input and output (so that fileno() doesn't work anymore). I've attached my current (failing) attempt to test this. -- Added file: http://bugs.python.org/file26484/14156.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11354] argparse: nargs could accept range of options count
Steven Bethard steven.beth...@gmail.com added the comment: The tests look like they're testing the right things, but the tests should instead be written like the rest of the argparse tests. For example, look at TestOptionalsNargs3 and TestPositionalsNargs2. You could write your tests to look something like those, e.g. class TestOptionalsNargs1_3(ParserTestCase): argument_signatures = [Sig('-x', nargs=(1, 3))] failures = ['a', '-x', '-x a b c d'] successes = [ ('', NS(x=None)), ('-x a', NS(x=['a'])), ('-x a b', NS(x=['a', 'b'])), ('-x a b c', NS(x=['a', 'b', 'c'])), ] Also, a complete patch will need to document the new feature in the Python documentation, among other things. See the details described here: http://docs.python.org/devguide/patch.html#preparation -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11354 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15147] Remove packaging from the stdlib
Éric Araujo mer...@netwok.org added the comment: packaging (and related changes in sysconfig) have been removed. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional
Steven Bethard steven.beth...@gmail.com added the comment: Your patch is a good start, but it needs to handle all the related situations, e.g. nargs='?' and the possibility of having more than one zero-length argument at the end. I believe the following patch achieves this. Please test it out. -- versions: +Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file26485/15112.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15427] Describe use of args parameter of argparse.ArgumentParser.parse_args
New submission from Steven Bethard steven.beth...@gmail.com: From http://bugs.python.org/issue14191#msg155202: ArgumentParser.parse_args(args=None, namespace=None) ... However, nowhere is the args= parameter explained. One example is given at the end of 15.4.4.6 showing the use of args= which apparently accepts a list of parameters, similar to the positional list of parameters that are used in all the other examples. It might be nice to clarify that. -- assignee: docs@python components: Documentation messages: 166174 nosy: bethard, docs@python priority: normal severity: normal status: open title: Describe use of args parameter of argparse.ArgumentParser.parse_args type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14191] argparse doesn't allow optionals within positionals
Steven Bethard steven.beth...@gmail.com added the comment: I created Issue 15427 for the parse_args documentation bug. So let's make this issue just about parsing intermixed arguments. Yes, if someone would like to provide a patch for this, please create a method parse_intermixed_args rather than adding a boolean flag parameter. It should be basically equivalent to this code: args, remaining_args = optionals.parse_known_args() args = positionals.parse_args(remaining_args, args) Except that it should give proper error messages. There should be some tests to make sure both that it parses things as expected and that it gives error messages as expected. -- assignee: docs@python - components: -Documentation title: argparse: nargs='*' doesn't get out-of-order positional parameters - argparse doesn't allow optionals within positionals versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14191 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15420] issue6964 reminder
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: -flox, loewis resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15360] Behavior of assigning to __dict__ is not documented
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15271] argparse: repeatedly specifying the same argument ignores the previous ones
Steven Bethard steven.beth...@gmail.com added the comment: I don't think this is a bug. You've specified two arguments with the same destination, foo. This means that argparse will parse the first one, assign it to the attribute foo and then parse the second one and assign it to the attribute foo again, overwriting the previous one. So you only see the second one, but the first one wasn't ignored. If you didn't want them to overwrite the same attribute, you either need to declare them as action=append so that they both add to the same attribute, or you need to declare them with different destinations (and use metavar=foo if you want them to display the same way). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15423] Minidom tries to parse tags inside of script tag
AliDD registration...@web.de added the comment: @Ezio Melotti: Do you mean as parser with minidom.parseString() or stand alone? If second, than, result will be the sequence of handler calls instead of DOM. This is not bad, but entirely different story. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15423] Minidom tries to parse tags inside of script tag
Ezio Melotti ezio.melo...@gmail.com added the comment: Do you mean as parser with minidom.parseString() or stand alone? Standalone. If second, than, result will be the sequence of handler calls instead of DOM. This is not bad, but entirely different story. Indeed. If you want a tree you could try BeautifulSoup or lxml; there's no tool in the stdlib that specifically parses an HTML document and builds a tree. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10854] Output .pyd name in error message of ImportError when DLL load fails
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Ok, the demo demo I added sucks, because I didn't demo the original problem (.pyd found but could not be loaded), but the point is, it displays the name and path attributes. They can be set, for example, if the module is found but cannot be loaded for some reason. That's the point of this issue. The fix added a name and path attributes, but they were never actually _output_ when such an error occurred. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10854 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15423] Minidom tries to parse tags inside of script tag
AliDD registration...@web.de added the comment: Will give a try to some of them later. Thanks for info. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15403] Refactor package creation support code into a common location
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15403 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15125] argparse: positional arguments containing - in name not handled well
Steven Bethard steven.beth...@gmail.com added the comment: I'm sympathetic to the idea that '-' should be translated similarly for optional and positional arguments, but as you've noted, it would be a risky patch because it's already possible for people to use getattr on hyphenated arguments. So I think this isn't possible without a long deprecation process first. But patching the module to allow explicitly setting dest via keyword argument shouldn't hurt anybody. I agree that it wouldn't hurt anybody. If you can find a way to do this, feel free to provide a patch. However, the correct way to have one name for the attribute (i.e. dest=) and one name for the help (i.e. metavar=) is to use the metavar argument like so: parser.add_argument('positional_args', metavar='positional-args') That said, this is not the first time I've seen someone run into this problem. I think the documentation could be improved in a few ways: (1) In the name or flags section, describe how the flags (for optional arguments) are translated into both a default dest (stripping initial '-' and converting '-' to '_') and into a default metavar (stripping initial '-' and uppercasing). Part of this is in the dest and metavar documentation, but probably belongs up in the name or flags documentation. Add cross-references to dest and metavar sections. (2) In the name or flags section, describe how the name (for positional arguments) are translated into the same default dest and metavar (no string munging at all). Again, move stuff from the dest and metavar sections as necessary. Add cross-references to dest and metavar sections. (3) In the dest section and somewhere in the parse_args section, describe how getattr can be used to get attributes whose names aren't valid Python identifiers. Maybe cross-reference this section from the edits in (2). -- assignee: - docs@python components: +Documentation nosy: +docs@python versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15125 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11176] give more meaningful argument names in argparse documentation
Steven Bethard steven.beth...@gmail.com added the comment: Thanks for working on this! I think keeping the first example as simple is possible is probably a good idea. And I didn't have time to read through the whole patch, but as far as I went, the pizza examples looked great. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15336] Argparse required arguments incorrectly displayed as optional arguments
Changes by Steven Bethard steven.beth...@gmail.com: -- resolution: - duplicate status: open - closed superseder: - argparse: Default Help Message Lists Required Args As Optional ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15336 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9694] argparse required arguments displayed under optional arguments
Steven Bethard steven.beth...@gmail.com added the comment: I'm changing the title because I keep seeing duplicates. Documentation patches still welcome! -- title: argparse: Default Help Message Lists Required Args As Optional - argparse required arguments displayed under optional arguments versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15327] Argparse: main arguments and subparser arguments indistinguishable
Steven Bethard steven.beth...@gmail.com added the comment: I don't think there's any easy way for argparse to automatically do what you want. However, there's a simple workaround - just use the dest= argument and specify two different destinations: parser = argparse.ArgumentParser() parser.add_argument('--verbose', action='store_true', dest='verbose_main') subparsers = parser.add_subparsers(help='command', dest='command') cmd1_parser = subparsers.add_parser('command') cmd1_parser.add_argument('--verbose', action='store_true', dest='verbose_sub') parser.parse_args(['command', '--verbose']) Namespace(command='command', verbose_main=False, verbose_sub=True) parser.parse_args(['--verbose', 'command']) Namespace(command='command', verbose_main=True, verbose_sub=False) Closing as a wontfix, but feel free to reopen if you want to provide a patch for something. -- resolution: - wont fix status: open - closed versions: -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15327 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15428] add Name Collision section to argparse docs
New submission from Steven Bethard steven.beth...@gmail.com: Several bugs (e.g. Issue 15327 and Issue 15271) have been filed suggesting that people aren't really clear on how argparse handles argument name collisions or how they can get it to do what they want. I think these problems could probably be solved by a Name Collision section (or something like that) in the argparse documentation. It would give a few example problems and show how to resolve them. Some things to include: * What happens when two arguments have the same dest (Issue 15271), with solutions including action='append' or different dest= values combined with identical metavar= values. * What happens when a parser and a sub-parser share some of the same argument names (Issue 15327), with solutions including specifying different dest= values for the parser and sub-parser * A brief mention and cross-reference to the conflict_handler section. -- assignee: docs@python components: Documentation messages: 166185 nosy: bethard, docs@python priority: normal severity: normal status: open title: add Name Collision section to argparse docs versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15428 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15327] Argparse: main arguments and subparser arguments indistinguishable
Steven Bethard steven.beth...@gmail.com added the comment: If you'd like to help improve the documentation so that the workaround for your problem is more obvious, please contribute to Issue 15428. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15327 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15271] argparse: repeatedly specifying the same argument ignores the previous ones
Steven Bethard steven.beth...@gmail.com added the comment: I'm going to close this issue, since argparse is doing what you've asked it to, even if that wasn't what you expected. But I think the documentation for this kind of thing could be improved. If you'd like to help document the workaround for your problem that I described, please contribute to Issue 15428. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13720] argparse print_help() fails if COLUMNS is set to a low value
Steven Bethard steven.beth...@gmail.com added the comment: Definitely a bug here. Attached is a patch and a test, based on Russell Sim's suggestion, that should fix it. -- keywords: +patch versions: +Python 3.4 Added file: http://bugs.python.org/file26486/13720.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13720 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15429] types.NoneType missing
Changes by Anders Kaseorg ande...@mit.edu: -- assignee: docs@python components: Documentation nosy: andersk, docs@python priority: normal severity: normal status: open title: types.NoneType missing type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15429 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15429] types.NoneType missing
New submission from Anders Kaseorg ande...@mit.edu: http://docs.python.org/py3k/library/constants.html#None says that None is the sole value type types.NoneType. However, NoneType was removed from the types module with Python 3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15429 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15429] types.NoneType missing
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 84b577567fab by R David Murray in branch '3.2': #15429: Fix invalid mention of types.NoneType from None docs. http://hg.python.org/cpython/rev/84b577567fab New changeset c43d73277756 by R David Murray in branch 'default': Merge #15429: Fix invalid mention of types.NoneType from None docs. http://hg.python.org/cpython/rev/c43d73277756 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15429 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15429] types.NoneType missing
R. David Murray rdmur...@bitdance.com added the comment: Thanks for the report. Fixed. -- nosy: +r.david.murray resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15429 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15250] document that filecmp.dircmp comparisons are shallow
Chris Jerdonek chris.jerdo...@gmail.com added the comment: Thanks, Senthil. I would prefer if you created a new issue in the tracker for your additional changes, and then committed your changes as part of that issue. By attribution, I was referencing the Patch by Chris Jerdonek which can go in the commit message and Misc/NEWS for this issue. I am already listed in Misc/ACKS. To keep things simple, can you perhaps review my original patch as is? If you would like, I would be happy to provide feedback separately on your own changes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15250 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14191] argparse doesn't allow optionals within positionals
Glenn Linderman v+pyt...@g.nevcal.com added the comment: So my t18a.py wraps Argparse, because the externals are documented and I could understand that. Given enough time, I might be able to understand the internals too... it is just Python... Seems like the internals separate positionals and optionals into two subparsers, the logic needed is to save the positionals, temporarily replace them with an empty group, and call parse_known_args, then restore the positionals, and call parse_known_args again. What I haven't figured out, is how that would affect the help message building, and how to make the empty group of positionals without affecting the help message. It's also not clear that it is possible, with current internals, to substitute an empty group... the only features for creating a group seem to always add it to a list of _action_groups. So that muddies the water, just like the help message... everything seems intertwined internally. A little guidance here, would let me code... I could probably whack and slash, and keep extra lists of arguments and sort of make it work like my wrapper does, but I doubt that would be an acceptable patch. So I would be happy, with guidance, to try to create the code, and I can do a diff, but beyond that, I'm sort of at a loss. So I'd be happy to work with someone to create the patch, but I've also never created a patch, nor test cases, for Python (or any other open source project). Theoretically, it is straightforward, and documented; as a practical matter, it isn't likely that I'll find time to figure out all that methodology and actually create a patch, in the near future (although it is on my list of things to learn, in the fullness of time, and after the first one, I'm sure subsequent ones would be easier). Or if someone else wants to code it, I'd be happy to look it over, test it with my environment and applications that I'm currently using with my wrapper. Given this guidance, I've tweaked my wrapper to have parse_intermixed_args rather than changing the behavior of parse_args as I have been, and will tweak the apps correspondingly, so I'll be in a position to test any code created for this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14191 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15250] document that filecmp.dircmp comparisons are shallow
Senthil Kumaran sent...@uthcode.com added the comment: Hi Chris, your patch looks good. I shall commit it now. The rest of the documentation changes can go in another patch. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15250 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15232] email.generator.Generator doesn't mangle From lines in MIME preamble
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b97f65f2298d by R David Murray in branch '3.2': #15232: correctly mangle From lines in MIME preamble and epilogue http://hg.python.org/cpython/rev/b97f65f2298d New changeset 80b81658455b by R David Murray in branch 'default': Merge #15232: correctly mangle From lines in MIME preamble and epilogue http://hg.python.org/cpython/rev/80b81658455b New changeset 9f500171c592 by R David Murray in branch '2.7': #15232: correctly mangle From lines in MIME preamble and epilogue http://hg.python.org/cpython/rev/9f500171c592 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15232] email.generator.Generator doesn't mangle From lines in MIME preamble
R. David Murray rdmur...@bitdance.com added the comment: Same problem with the epilogue. Fixed both. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com