[issue6011] python doesn't build if prefix contains non-ascii characters
STINNER Victor victor.stin...@haypocalc.com added the comment: My build error seems actually unrelated to encoding issues. Working directory is ASCII-only, locale is UTF-8. $ ./configure --with-pydebug [snip] $ make [snip] ranlib libpython3.2dm.a gcc -pthread -Xlinker -export-dynamic -o python Modules/python.o libpython3.2dm.a -lpthread -ldl -lutil -lm Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] Segmentation fault make: *** [sharedmods] Erreur 139 Can you retry in gdb to dump the backtrace? Try maybe to cleanup your local copy with make distclean. As expected, I cannot reproduce your bug. Try to give all commands to reproduce the bug, and give as much information as possible. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6011 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10461] Use with statement throughout the docs
Terry J. Reedy tjre...@udel.edu added the comment: +1 I have not yet had occasion to use 'with' yet, but in reading the Unicode HOWTO diff, I noticed that I liked replacing 'open,read,close' with 'with open, read' just for reading purposes since it turns 3 steps into 1 compound transaction. Perhaps something should also be added to the doc style guide (along with using 'attributes' instead of 'members'). -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10461 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10461] Use with statement throughout the docs
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10461 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6011] python doesn't build if prefix contains non-ascii characters
Éric Araujo mer...@netwok.org added the comment: I will try tomorrow, thanks for reminding me. That was a fresh clone. I did. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6011 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: [issue2001] Pydoc interactive browsing enhancement
On 11/19/2010 08:21 AM, Alexander Belopolsky wrote: Alexander Belopolskybelopol...@users.sourceforge.net added the comment: On Thu, Nov 18, 2010 at 2:37 AM, Ron Adamrep...@bugs.python.org wrote: .. I'll try reading and writing directly to the socket and working up some tests from that. I don't suppose there's something like that already in the test suite I can copy? I believe you can find relevant code in test/test_httpservers.py. Thanks I'll check it out. What I had in mind was simpler:test_pydoc already checks html output for a module, but this test did not fail after I applied your patch. When I put the old server and gui() function back the existing tests passed with changes. Which is good. Also the old tests didn't actually test the server and the tk interface. There should be something in the tests that checks that the new navigation bar is generated correctly. I'm going to work on this today. ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10183] test_concurrent_futures failure on Windows
Antoine Pitrou pit...@free.fr added the comment: Then I get more failures: == FAIL: test_map_timeout (test.test_concurrent_futures.ProcessPoolExecutorTest) -- Traceback (most recent call last): File Y:\py3k\__svn__\lib\test\test_concurrent_futures.py, line 563, in test_ map_timeout timeout=10): File Y:\py3k\__svn__\lib\concurrent\futures\_base.py, line 546, in map yield future.result(end_time - time.time()) File Y:\py3k\__svn__\lib\concurrent\futures\_base.py, line 400, in result return self.__get_result() File Y:\py3k\__svn__\lib\concurrent\futures\_base.py, line 352, in __get_res ult raise self._exception AssertionError == FAIL: test_map_timeout (test.test_concurrent_futures.ThreadPoolExecutorTest) -- Traceback (most recent call last): File Y:\py3k\__svn__\lib\test\test_concurrent_futures.py, line 563, in test_ map_timeout timeout=10): File Y:\py3k\__svn__\lib\concurrent\futures\_base.py, line 546, in map yield future.result(end_time - time.time()) File Y:\py3k\__svn__\lib\concurrent\futures\_base.py, line 400, in result return self.__get_result() File Y:\py3k\__svn__\lib\concurrent\futures\_base.py, line 352, in __get_res ult raise self._exception File Y:\py3k\__svn__\lib\concurrent\futures\thread.py, line 65, in run result = self.fn(*self.args, **self.kwargs) File Y:\py3k\__svn__\lib\test\test_concurrent_futures.py, line 132, in __cal l__ super().__call__() File Y:\py3k\__svn__\lib\test\test_concurrent_futures.py, line 107, in __cal l__ self._wait_on_event(self._can_finish) File Y:\py3k\__svn__\lib\test\test_concurrent_futures.py, line 79, in _wait_ on_event assert r == 0 AssertionError == FAIL: test_timeout (test.test_concurrent_futures.ProcessPoolWaitTests) -- Traceback (most recent call last): File Y:\py3k\__svn__\lib\test\test_concurrent_futures.py, line 442, in test_ timeout future1]), finished) AssertionError: Items in the second set but not the first: Future at 0x2c73a80 state=finished raised AssertionError == FAIL: test_timeout (test.test_concurrent_futures.ThreadPoolWaitTests) -- Traceback (most recent call last): File Y:\py3k\__svn__\lib\test\test_concurrent_futures.py, line 442, in test_ timeout future1]), finished) AssertionError: Items in the second set but not the first: Future at 0x2c99740 state=finished raised AssertionError -- Ran 55 tests in 64.828s FAILED (failures=4) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10183 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10434] Document the rules for public names
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Fri, Nov 19, 2010 at 3:06 PM, STINNER Victor rep...@bugs.python.org wrote: .. Whereas PyUnicode_FromFormatV() converts the format string (bytes) to unicode (characters). If you would like a comparaison in C, it's like printf()+mbstowcs() in the same function. I see. So it is really the else *s++ = *f; that surreptitiously widens the characters. .. I choosed to use ASCII instead of UTF-8, because an UTF-8 decoder is long (210 lines) and complex (see PyUnicode_DecodeUTF8Stateful()), whereas ASCII decode is just: unicode_char = (Py_UNICODE)byte; + an if before to check that 0 = byte = 127). I don't think we need 210 lines to replace *s++ = *f with proper UTF-8 logic. Even if we do, the code can be shared with PyUnicode_DecodeUTF8 and a UTF-8 iterator may be a welcome addition to Python C API. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9769 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10434] Document the rules for public names
Changes by Fred L. Drake, Jr. fdr...@acm.org: -- nosy: +fdrake ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10434 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4113] Add custom __repr__ to functools.partial
Daniel Urban urban.dani...@gmail.com added the comment: Well, of course it can be done with PyUnicode_Concat (obviously, since PyUnicode_AppendAndDel uses that). I used PyUnicode_AppendAndDel because that function does exactly what I needed. I don't see why PyUnicode_AppendAndDel should be deprecated. Anyway, here is a new patch which uses PyUnicode_Concat. -- Added file: http://bugs.python.org/file19643/issue4113b.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Ron Adam ron_a...@users.sourceforge.net added the comment: I added an empty _pydoc.css file. The server does read it and you'll be able to play around with it, but don't expect it to be pretty if you do until the rest of the html is updated. Should I put that in the pydoc_data? It just needs tests now, which I'll be working on as time permits over the next few days. (And any other minor details we find.) -- Added file: http://bugs.python.org/file19644/issue2001_e.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10463] Wrong return value for xml.etree.ElementTree.parse()
New submission from Daniel Seither p...@tiwoc.de: Cite from http://docs.python.org/library/xml.etree.elementtree.html xml.etree.ElementTree.parse(source, parser=None) Parses an XML section into an element tree. source is a filename or file object containing XML data. parser is an optional parser instance. If not given, the standard XMLParser parser is used. Returns an ElementTree instance. The last sentence should be Returns an Element instance. I verified this error for the Python versions as listed in this issue. In 2.5, the information was imprecise but correct. -- assignee: d...@python components: Documentation messages: 121571 nosy: d...@python, tiwoc priority: normal severity: normal status: open title: Wrong return value for xml.etree.ElementTree.parse() versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10463 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10463] Wrong return type for xml.etree.ElementTree.parse()
Changes by Daniel Seither p...@tiwoc.de: -- title: Wrong return value for xml.etree.ElementTree.parse() - Wrong return type for xml.etree.ElementTree.parse() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10463 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10463] Wrong return type for xml.etree.ElementTree.parse()
Daniel Seither p...@tiwoc.de added the comment: I need to read more accurately what is printed on my console... Forget about it. -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10463 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9742] Python 2.7: math module fails to build on Solaris 9
Doug Shea doug.s...@gmail.com added the comment: Is there perhaps a work-around we could use to get this to compile and have a math module? Force it to export that 'round' symbol in the core, perhaps? -- nosy: +Doug.Shea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10183] test_concurrent_futures failure on Windows
Brian Quinlan br...@sweetapp.com added the comment: Could you try with the patch that I just attached? And thanks for you help, I really appreciated it! -- Added file: http://bugs.python.org/file19645/timing2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10183 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10424] better error message from argparse when positionals missing
Michele Orrù maker...@gmail.com added the comment: This issue seems already fixed. File: Lib/argparse.py 922 # if we didn't use all the Positional objects, there were too few 1923 # arg strings supplied. 1924 if positionals: 1925 self.error(_('too few arguments')) 1926 1927 # make sure all required actions were present 1928 for action in self._actions: 1929 if action.required: 1930 if action not in seen_actions: 1931 name = _get_action_name(action) 1932 self.error(_('argument %s is required') % name) -- nosy: +ezio.melotti, maker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10183] test_concurrent_futures failure on Windows
Antoine Pitrou pit...@free.fr added the comment: Could you try with the patch that I just attached? And thanks for you help, I really appreciated it! It works ok indeed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10183 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10424] better error message from argparse when positionals missing
Steven Bethard steven.beth...@gmail.com added the comment: No, it's exactly line 1925 that's the problem. The OP would like that to tell him which arguments were missing instead of saying just 'too few arguments'. The block below that is for checking required optionals/positionals. It won't execute if the self.error above it happens. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10459] missing character names in unicodedata (CJK...)
Martin v. Löwis mar...@v.loewis.de added the comment: Marc-Andre: Many of the characters you refer actually do have names assigned, even if the names don't appear in the Unicode character database. Instead, they are specified in section 4.8 of the Unicode standard, and unicodedata.c already implements that (it just wasn't updated when the ranges changed; I will look into this). -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10399] AST Optimization: inlining of function calls
Dave Malcolm dmalc...@redhat.com added the comment: Third, for that Graphviz output, was anything special required? If so, I would toss the code into Tools for others to benefit from. It's merely the to_dot function from Lib/__optimizer__.py (which turns an AST into .dot source code), followed by dot_to_png in the same file which invokes /usr/bin/dot on it, which is likely to be readily available on any Linux system. Would it be reasonable to add to_dot to Lib/ast.py? (it's ~25 lines, and very similar to that file's dump function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10399 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10424] better error message from argparse when positionals missing
Michele Orrù maker...@gmail.com added the comment: The attached patch solves this issue. I haven't added any unittest because test_argparse.py is quite huge - over 4300 lines-, and I was undecided between «ArgumentError tests» (4251) and «ArgumentTypeError tests» (4262). Any hint? However, file bug10424.py reproduces this bug. -- keywords: +patch Added file: http://bugs.python.org/file19646/issue10424.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10424] better error message from argparse when positionals missing
Changes by Michele Orrù maker...@gmail.com: Added file: http://bugs.python.org/file19647/bug10424.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10399] AST Optimization: inlining of function calls
Brett Cannon br...@python.org added the comment: No, it's rather Linux and tool specific to go into ast.py. But adding it to the Tools/ directory makes sense. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10399 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly
STINNER Victor victor.stin...@haypocalc.com added the comment: On Friday 19 November 2010 21:58:25 you wrote: I choosed to use ASCII instead of UTF-8, because an UTF-8 decoder is long (210 lines) and complex (see PyUnicode_DecodeUTF8Stateful()), whereas ASCII decode is just: unicode_char = (Py_UNICODE)byte; + an if before to check that 0 = byte = 127). I don't think we need 210 lines to replace *s++ = *f with proper UTF-8 logic. Even if we do, the code can be shared with PyUnicode_DecodeUTF8 and a UTF-8 iterator may be a welcome addition to Python C API. Why should we do that? ASCII format is just fine. Remember that PyUnicode_FromFormatV() is part of the C API. I don't think that anyone would use non-ASCII format in C. If someone does that, (s)he should open a new issue for that :-) But I don't think that we should make the code more complex if it's just useless. Victor -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9769 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10299] Add index with links section for built-in functions
Ezio Melotti ezio.melo...@gmail.com added the comment: Here's a new patch with a 5 column tables. I had to use some rst trickery to make a decent header that works both in the HTML and Latex outputs. I put the title in the middle cell (the 3rd) of the header and left the others empty. The column cells are a little wider but they are still OK at 800x600. Éric how do you like this version? I could also drop the header altogether, but I don't like the headless table too much. -- Added file: http://bugs.python.org/file19648/issue10299-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10459] missing character names in unicodedata (CJK...)
Marc-Andre Lemburg m...@egenix.com added the comment: Martin v. Löwis wrote: Martin v. Löwis mar...@v.loewis.de added the comment: Marc-Andre: Many of the characters you refer actually do have names assigned, even if the names don't appear in the Unicode character database. Instead, they are specified in section 4.8 of the Unicode standard, and unicodedata.c already implements that (it just wasn't updated when the ranges changed; I will look into this). Thanks for pointing this out. I wasn't aware of there being a standard for constructing names for CJK ideograph ranges. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9198] Should repr() print unicode characters outside the BMP?
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10399] AST Optimization: inlining of function calls
Dave Malcolm dmalc...@redhat.com added the comment: Sorry again for another epic-length comment... I'm attaching the latest work-in-progress on this. The code is still fairly messy (embarrasingly so in places), but it's better to have it out in public in this tracker than stuck on my hard drive. Symbol tables = - I've moved the optimization pass to after symbol table generation. Pass the symtable to mod2obj et al, adding an ste attribute to all objects that have their own PySTEntryObject (adding a PySymtable_TryLookup function to Python/symtable.c to help with this). The symtable pass is rerun after optimization. - the ste attribute isn't exposed anywhere in the grammar (do other VMs implement symbol table entries?) - in the graphviz debug output, add boxes around scopes (i.e. those nodes with an ste) - use the symbol table info: only inline functions that purely reference locals and globals, not free/cellvars. - only rename locals when inlining, not globals - don't inline functions that use the locals or dir builtin Specialization == I've implemented a first pass at the specialization ideas in the original comment. I've added a new AST node: Specialize. It's an expression, but contains statements. -- Generated by the optimizer: | Specialize(expr name, stmt* specialized_body, expr specialized_result, expr generalized) -- must be a Call The idea is that: - name should be dynamically evaluated, then compared in some (not yet well specified) way against the expected value during inlining - If we have a match: - then execute the statements in specialized_body, then evaluate specialized_result, the latter giving the overall value of this expression - If we don't have a match: - then evaluate generalized, which currently must be a Call, and this gives the overall value of the expression. I've added a JUMP_IF_SPECIALIZABLE opcode, mostly as described in the initial comment. This allows us to implement specialized bytecode that makes an assumption, but has a fallback (generalized) for the case when the assumption fails. To wire this up for function inlining, we need some way of recording the original version of a function versus what it's now bound to. For now, I'm simply adding an assignment after each function def, equivalent to: def foo(): print('hello world') __saved__foo = foo def callsite(): foo() and the Specialize in callsite is compiled to: LOAD_GLOBAL (foo) ; dynamic lookup LOAD_GLOBAL (__saved__foo__) ; get saved version JUMP_IF_SPECIALIZABLE - inline impl CALL_FUNCTION 0 POP_TOP JUMP_FORWARD ; inline implementation LOAD_GLOBAL ('print') LOAD_CONST ('hello world') CALL_FUNCTION 1 POP_TOP LOAD_CONST (None) RETURN_VALUE Additional optimizations I've added: - a very simple copy-propagation pass, which only runs on functions with a single basic block (to keep dataflow ananalysis simple: no edges in the CFG, since we don't have an explicit CFG yet) - a pass which removes locals that are only ever written to, never read from, provided that the function doesn't use globals, locals, or dir These combine nicely with the function inlining. For example, given this code (from test_copy_propagation):: def function_to_be_inlined(a, b, c, d): return(a + b + c + d) def callsite(): print(function_to_be_inlined('fee', 'fi', 'fo', 'fum')) then callsite compiles down to this bytecode:: 5 0 LOAD_GLOBAL 0 (print) 3 LOAD_GLOBAL 1 (function_to_be_inlined) 6 LOAD_GLOBAL 2 (__saved__function_to_be_inlined) 9 JUMP_IF_SPECIALIZABLE30 12 LOAD_CONST 1 ('fee') 15 LOAD_CONST 2 ('fi') 18 LOAD_CONST 3 ('fo') 21 LOAD_CONST 4 ('fum') 24 CALL_FUNCTION4 27 JUMP_FORWARD15 (to 45) 30 LOAD_CONST 0 (None) 33 STORE_FAST 0 (__inline_function_to_be_inlined_1976300returnval__) 36 LOAD_CONST 7 ('feefifofum') 39 STORE_FAST 0 (__inline_function_to_be_inlined_1976300returnval__) 42 LOAD_FAST0 (__inline_function_to_be_inlined_1976300returnval__) 45 CALL_FUNCTION1 48 POP_TOP 49 LOAD_CONST 0 (None) 52 RETURN_VALUE Note how the specialized inline implementation is able to do: LOAD_CONST 7 ('feefifofum') rather than have to compute the sum at runtime. (the return value handling is
[issue10399] AST Optimization: inlining of function calls
Antoine Pitrou pit...@free.fr added the comment: Sorry again for another epic-length comment... I'm attaching the latest work-in-progress on this. If this a work in progress, you could create an SVN branch in the sandbox (you can then use svnmerge to avoid diverging too much from mainline) or an hg repo. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10399 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue809163] Can't add files with spaces
John Keyes johnke...@gmail.com added the comment: This is my first contribution as part of the Bug Weekend (and possibly my first to Python). I tested this by writing a MANIFEST.in and a very small setup.py but after looking at distutils I narrowed the area down to the FileList. I wrote a unittest and have attached the diff. I tested this on py3k. -- keywords: +patch nosy: +johnkeyes Added file: http://bugs.python.org/file19650/issue809163.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue809163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10391] obj2ast's error handling can lead to python crashing with a C-level assertion failure
Benjamin Peterson benja...@python.org added the comment: r86538 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: issue2636-20101120.zip is a new version of the regex module. The match object now supports additional methods which return information on all the successful matches of a repeated capture group. The API was inspired by that of .Net: matchobject.captures([group1, ...]) Returns a tuple of the strings matched in a group or groups. Compare with matchobject.group([group1, ...]). matchobject.starts([group]) Returns a tuple of the start positions. Compare with matchobject.start([group]). matchobject.ends([group]) Returns a tuple of the end positions. Compare with matchobject.end([group]). matchobject.spans([group]) Returns a tuple of the spans. Compare with matchobject.span([group]). -- Added file: http://bugs.python.org/file19651/issue2636-20101120.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2
Brian Curtin cur...@acm.org added the comment: joblack - are you still seeing issues with this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10002 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue809163] Can't add files with spaces
R. David Murray rdmur...@bitdance.com added the comment: Thanks for diagnosis and the test patch, and welcome to the bug weekend. Some comments: test.support has a symbol, TESTFN, which is guaranteed to be unique for the test run and located in an appropriate writeable location. Many tests use it to create a directory via os.mkdir and then create working files in it. The test should also clean up the directory afterward, which can be done easily using test.support.rmtree. Using these two test support items should simplify your test. The other advantage of using TESTFN rather than the tempfile module is that TESTFN locates the file/directory in a place that the buildbot runner cleans up after each test run, so no cruft is left on the buildbot system even if the test runs ends abnormally in the middle of the test. -- nosy: +r.david.murray stage: unit test needed - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue809163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10437] ThreadPoolExecutor should accept max_workers=None
Brian Quinlan br...@sweetapp.com added the comment: Daniel, I wasn't trying to avoid importing multiprocessing. What's your use case though? I think that defaulting the number of threads to the numbers of CPUs would trick users into believing that threads are useful for CPU-intensive work in Python ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10437 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10424] better error message from argparse when positionals missing
R. David Murray rdmur...@bitdance.com added the comment: There are currently no tests in argparse that test the content of error messages, which is fairly standard for stdlib tests since the error messages aren't considered part of the API (only the nature of the exception is). So there's really no existing test class in test_argparse that would be an appropriate place to put a unit test for this. I would instead create a new class. Perhaps TestErrorContent? For this test it would probably be best to use assertRaisesRegexp and just check to make sure that the expected list of argument names appears in the message (that is, don't test the contents of the remainder of the message). You should test several combinations. (The argparse tests do some fancy footwork around errors, though, so you may not be able to use assertRaisesRegexp directly). Your approach to the patch, by the way, is an interesting one, and seems to me to make sense. But I'm not 100% sure I understand the logic of the code you are modifying, so I'll leave it to Steven to comment on that aspect of it :) Your reference to TestArgumentError reveals a minor bug in the tests: there are actually two test classes named TestArgumentError. Presumably the second one was indeed supposed to be TestArgumentTypeError. I've fixed that in r86542. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10183] test_concurrent_futures failure on Windows
Brian Quinlan br...@sweetapp.com added the comment: Fixed in r10183 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10183 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8705] shutil.rmtree with empty filepath
Brian Curtin cur...@acm.org added the comment: This can't actually work. You can't delete a directory which has open handles to it on Windows, namely the Python process you're running in that directory. The empty file path isn't really the issue here. shutil.rmtree(os.getcwd()) attempts the same thing but gives you a better error message since a full path gets sent down to os.rmdir rather than . -- nosy: +brian.curtin resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2986] difflib.SequenceMatcher not matching long sequences
Eli Bendersky eli...@gmail.com added the comment: Terry, when is the deadline for producing the patch for 3.2? Perhaps we should at least submit the 2.7 patch for now so that it goes in for sure? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10122] Documentation typo fix and a side question
Boštjan Mejak bostjan.me...@gmail.com added the comment: If you visit http://docs.python.org/library/functions.html?highlight=getattr#getattr there is still the word 'attributed' present in online docs. Please fix the docs completely. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10356] decimal.py: hash of -1
Mark Dickinson dicki...@gmail.com added the comment: Hmm. Does anyone remember the reason for making sNaNs unhashable in the first place. I recall there was a discussion about this, but can't remember which issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10356 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10356] decimal.py: hash of -1
Mark Dickinson dicki...@gmail.com added the comment: Ah, now I remember: making sNaNs hashable has the potential to introduce seemingly random exceptions with set and dict operations. The logic went something like: (1) if sNaNs are hashable, you can put them in dicts, (2) operations on dicts make equality comparisons at (from the user's POV) unpredictable times (i.e., when hashes of two unequal objects happen to be equal), and (3) equality comparisons involving sNaNs raise an exception. I'm wondering whether we should revisit the decision to have sNaN equalities raise an exception, and just have sNaN equality comparisons behave identically to those for (Decimal or float) NaNs in 3.2. At any rate, if the code is left as is, the above logic should be added to the __hash__ function as a comment. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10356 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10430] _sha.sha().digest() method is endian-sensitive. and hexdigest()
Scott Dial sc...@scottdial.com added the comment: Got a test case that demonstrates a failure? Looks like it works to me... $ uname -ip sparc SUNW,Sun-Fire-280R $ python -c 'import sys; print sys.byteorder' big $ python -c 'import sha; print sha.new(open(test, rb).read()).hexdigest()' 851faf3199d27200abf2750c14ae6451696216a9 $ sha1sum -b test 851faf3199d27200abf2750c14ae6451696216a9 *test # uname -ip AMD Sempron(tm) Processor 2800+ AuthenticAMD # python -c 'import sys; print sys.byteorder' little # python -c 'import sha; print sha.new(open(test, rb).read()).hexdigest()' 851faf3199d27200abf2750c14ae6451696216a9 # sha1sum -b /tmp/test 851faf3199d27200abf2750c14ae6451696216a9 *test I think your code analysis is wrong. Perhaps you missed the call to longReverse(), which does endianness byte-swapping, at the beginning of the sha_transform() that specifically is commented: When run on a little-endian CPU we need to perform byte reversal on an array of longwords. -- nosy: +scott.dial ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10430 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8690] multiprocessing.dummy.Queue does not expose same interface as multiprocessing.Queue
Ray.Allen ysj@gmail.com added the comment: +1 on make it identical to multiprossing.Queue. Since the documentation said: multiprocessing.dummy replicates the API of multiprocessing but is no more than a wrapper around the threading module. Does the word replicates implies that multiprossing.dummy.[AClass] should have the same interfaces as multiprossing.[AClass]? I think so. We should be able to use multiprossing.dummy.xxx wherever multiprossing.xxx can be used. We can just create a subclass of Queue.Queue and implemented these missing methods as dummy functions. I wonder is there other inconsistence between multiprocessing.dummy and multiprocessing? -- nosy: +ysj.ray versions: +Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8690 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10430] _sha.sha().digest() method is endian-sensitive. and hexdigest()
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Something is definietly weird on the PS3. I´ll give more concrete data soon. (and yes, I may have misread the code) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10430 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10356] decimal.py: hash of -1
Stefan Krah stefan-use...@bytereef.org added the comment: If I'm not mistaken, signaling NaNs are only created when the user explicitly initializes a variable. I see this as direct request to raise an exception whenever the variable is accessed in a way that changes the outcome of the program: This is the example I gave: http://mail.python.org/pipermail/python-dev/2009-November/093952.html Now, ideally one would still be allowed to store signaling NaNs in a dictionary and have them raise at the _exact_ location where they are used in a mathematical operation or influence control flow. But since that's not possible, I prefer things as they are. +1 for adding a comment to the hash function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10356 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10356] decimal.py: hash of -1
Mark Dickinson dicki...@gmail.com added the comment: [Stefan] ... a direct request to raise an exception... Understood; the issue is that this conflicts with the general expectation that equality (and inequality) comparisons always work (at least, for objects that are perceived as immutable). I think there needs to be a very good reason to have an equality comparison raise an exception, and I don't find this particular reason good enough. The expected IEEE 754 semantics are still available through the published API: e.g., using Decimal.compare instead of '=='. So I'd lean towards having '==' follow Python rules rather than IEEE 754 rules in this case, with Decimal.compare available for the times when the IEEE 754 rules are important. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10356 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10356] decimal.py: hash of -1
Mark Dickinson dicki...@gmail.com added the comment: Grr. Horrible formatting on that last comment. Sorry about that. Anyway, I'd be interested to hear other people's opinions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10356 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10430] _sha.sha().digest() method is endian-sensitive. and hexdigest()
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10430 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4476] compileall fails if current dir has a types package
Éric Araujo mer...@netwok.org added the comment: I can reproduce in 3.1 and 3.2. 2.7 is okay. -- stage: - needs patch title: compileall.py fails if current dir has a types subdir with 3.0 (ok with 2.5) - compileall fails if current dir has a types package ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4476] compileall fails if current dir has a types package
Éric Araujo mer...@netwok.org added the comment: python -v shows that runpy tries to import pkgutil which imports types which is the package in the current directory. Is this an import bug or a worksforme “don’t use standard module names in your projects”? -- nosy: +brett.cannon, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10457] Related help topics shown outside pager
New submission from Cherniavsky Beni c...@users.sf.net: help('NAMESPACES') or any other long help is shows in a pager. That's great. It's a bit surprising however that the text shown in the pager doesn't include the Related help topics: ... line, which is shown when you leave the pager. There is practical benefit to see the related topics after you exited the pager - that's when you have the chance to follow these other topics. But I think it should be duplicated inside the pager as well. -- assignee: d...@python components: Documentation, Library (Lib) messages: 121514 nosy: cben, d...@python priority: normal severity: normal status: open title: Related help topics shown outside pager type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10457 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue992389] attribute error after non-from import
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue992389 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10457] Related help topics shown outside pager
Changes by Éric Araujo mer...@netwok.org: -- assignee: d...@python - components: -Documentation nosy: +eric.araujo -d...@python stage: - needs patch versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10457 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10430] _sha.sha().digest() method is endian-sensitive. and hexdigest()
Nick Coghlan ncogh...@gmail.com added the comment: If I was looking for opportunities for a compiler to do something weird, I'd start with the TestEndianness macro (i.e. maybe it is incorrectly flagging the Cell as little endian when it is actually big endian) The endianness handling itself looks fine to me, though. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10430 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10436] tarfile.extractfile in r| stream mode fails with filenames or members from getmembers()
Changes by Éric Araujo mer...@netwok.org: -- components: +Documentation -Library (Lib) nosy: +d...@python stage: - needs patch versions: -Python 2.6, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10436 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Nov 18, 2010 at 2:37 AM, Ron Adam rep...@bugs.python.org wrote: .. I'll try reading and writing directly to the socket and working up some tests from that. I don't suppose there's something like that already in the test suite I can copy? I believe you can find relevant code in test/test_httpservers.py. What I had in mind was simpler: test_pydoc already checks html output for a module, but this test did not fail after I applied your patch. There should be something in the tests that checks that the new navigation bar is generated correctly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10070] 2to3 wishes for already-2to3'ed files
Hallvard B Furuseth h.b.furus...@usit.uio.no added the comment: Éric Araujo writes: That's fair enough. :) Do you want to close this feature request then? Me? No. I just figured that after all this arguing, I should mention that closing it as out of scope is not something I'll be difficult about. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10070 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: issue2001_b.diff patch includes changes to urllib. Is this intentional? Is it a bug fix, a feature? There is no mention in the NEWS file. If these changes are needed for pydoc enhancements, I would like to separate them in its own issue and commit separately. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: -giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10070] 2to3 wishes for already-2to3'ed files
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10070 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9182] document “--” as a way to disti nguish option w/ narg='+' from positional argument in arg parse
Éric Araujo mer...@netwok.org added the comment: Sergey: Do you want to make a patch for that, and/or for the documentation? Guidelines are on http://www.python.org/dev/patches/ -- nosy: +bethard resolution: accepted - versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9182 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10458] 2.7 += re.ASCII
New submission from Hallvard B Furuseth h.b.furus...@usit.uio.no: Could Python 2.7 get a dummy re.ASCII = re.A flag, for source code compatibility with 3.2? -- components: Regular Expressions messages: 121520 nosy: hfuru priority: normal severity: normal status: open title: 2.7 += re.ASCII type: feature request versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10458 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8158] documentation of 'optparse' module incomplete
Changes by Éric Araujo mer...@netwok.org: -- keywords: +easy nosy: +d...@python -georg.brandl versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8158 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10458] 2.7 += re.ASCII
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10458 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10459] missing character names in unicodedata (CJK...)
New submission from Vlastimil Brom vlastimil.b...@gmail.com: I just noticed an ommision of come character names in unicodedata module. These are some CJK - Ideographs: 龼 (0x9fbc) - 鿋 (0x9fcb) (CJK Unified Ideographs [19968-40959] [0x4e00-0x9fff]) ꜀ (0x2a700) - 뜴 (0x2b734) (CJK Unified Ideographs Extension C [173824-177983] [0x2a700-0x2b73f]) 띀 (0x2b740) - 렝 (0x2b81d) (CJK Unified Ideographs Extension D [177984-178207] [0x2b740-0x2b81f]) The names are probably to be generated - e.g. CJK UNIFIED IDEOGRAPH-2A700 ... etc. (Tested with the recompiled unicodedata - using unicode 6.0; with the py 27 - builtin module (unidata_version: '5.2.0') only the first two ranges are relevant (as CJK Unified Ideographs Extension D is an adition of Unicode 6) (Also there are the unprintable ASCII controls, surrogates and private use areas, where the missing names are probably ok.) I tested with the following rather clumsy code: # # # # # # # # # # # # # # # # wide_unichr = custom unichr emulating unicode ranges beyond on narrow python build codepoints_missing_char_names = [[-2,-2],] # dummy for i in xrange(0x10+1): if unicodedata.category(wide_unichr(i))[:1] != 'C' and unicodedata.name(wide_unichr(i), u??noname??) == u??noname??: if codepoints_missing_char_names[-1][1] == i-1: codepoints_missing_char_names[-1][1] = i else: codepoints_missing_char_names.append([i, i]) for first, last in codepoints_missing_char_names[1:]: print u%s (%s) - %s (%s) % (wide_unichr(first), hex(first), wide_unichr(last), hex(last),) # # # # # # # # # # # # # # # # # # # # # # # # # # Unfortunately, I can't provide a fix, as unicodedata involves C code, where my knowledge is near zero. vbr -- messages: 121521 nosy: vbr priority: normal severity: normal status: open title: missing character names in unicodedata (CJK...) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10458] 2.7 += re.ASCII
Martin v. Löwis mar...@v.loewis.de added the comment: -1. That's a new feature. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10458 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10459] missing character names in unicodedata (CJK...)
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10459] missing character names in unicodedata (CJK...)
Changes by Vlastimil Brom vlastimil.b...@gmail.com: -- components: +Library (Lib), Unicode type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10458] 2.7 += re.ASCII
Éric Araujo mer...@netwok.org added the comment: Agreed. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10458 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10430] _sha.sha().digest() method is endian-sensitive. and hexdigest()
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Yes, in my original myopic observation I was mistaken in thinking that we were reading the digest out of the 5 entry int32 digest field in the SHAobject. I´ve already verified that the Endianness field is correctly set. What I thought was an obvious error due to people not using big-endian much, is probably much more subtle. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10430 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4113] Add custom __repr__ to functools.partial
Daniel Urban urban.dani...@gmail.com added the comment: Here is a patch. It includes tests. -- keywords: +patch nosy: +durban Added file: http://bugs.python.org/file19637/issue4113.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10460] Misc/indent.pro does not reflect PEP 7
New submission from Mick Beaver myheartinamer...@gmail.com: Hello, I noticed that the indent.pro in Misc seems very different from PEP 7. Would it be possible to have one that produces C code that meets the PEP 7 style guidelines? As always, thanks for all of the hard work for Python! -Mick -- components: Demos and Tools messages: 121526 nosy: Mick.Beaver priority: normal severity: normal status: open title: Misc/indent.pro does not reflect PEP 7 type: behavior versions: Python 2.5, 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/issue10460 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8890] Use tempfile instead of /tmp in examples
Éric Araujo mer...@netwok.org added the comment: Who wants to make a patch to update the documentation? For command-line examples (like “python setup.py install --install-base /tmp”), someone has to research what standard variable to use (TMPDIR, TMP, something else?). -- keywords: +easy stage: - needs patch title: Modules have dangerous examples in documentation - Use tempfile instead of /tmp in examples versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8890] Use tempfile instead of /tmp in examples
Éric Araujo mer...@netwok.org added the comment: Patch submission guidelines are found at http://www.python.org/dev/patches/ Since patches are made for the py3k branch, some matches in Henri’s grep won’t get patched: bsddb, compiler, posixfile and rexec have been removed. The person that will commit the patch will have to edit those too when merging into 2.7, unless a kind soul provides one patch per branch (not a requirement). Last remark: tempfile is a false positive; editing old whatsnew is not worth it IMO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: issue2001_c.diff is the same as issue2001_b.diff, but without urlparse changes and with minor modifications to pydoc.rst resolving a conflict with a recent commit. I have also uploaded the same patch to rietveld: http://codereview.appspot.com/3187042 Does anyone know how to properly subscribe rep...@bugs.python.org to the Rietveld issue so that we see reviews here? -- Added file: http://bugs.python.org/file19638/issue2001_c.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8538] Add FlagAction to argparse
Éric Araujo mer...@netwok.org added the comment: I think FlagAction should implement strictly boolean options, that is --foo and --no-foo, without arguments at all. For ConfigureAction, there is a precedent (unless I’m mistaken) in configure, which permits such things: --without-unicode --with-unicode=ucs4 --with-unicode (uses default value for arg) I say we focus on the simple FlagAction for this bug and keep ConfigureAction for another patch. Yaniv: Can you give us a status update? -- keywords: +easy title: Add ConfigureAction to argparse - Add FlagAction to argparse ___ 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
[issue9938] Documentation for argparse interactive use
Éric Araujo mer...@netwok.org added the comment: Do you want to work on a patch? (Aside: you may want to learn about the cmd and shlex modules for read-eval-print-loop programs :) -- keywords: +easy nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9938 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9182] document “--” as a way to disti nguish option w/ narg='+' from positional argument in arg parse
Steven Bethard steven.beth...@gmail.com added the comment: The original point is basically a duplicate of issue 9338. It is undesirable behavior, I just don't know how to fix it. Patches to fix it are welcome (on issue 9338). ;-) As to documenting '--', I agree it's hidden too far down in the documentation currently. I'd be happy to approve any documentation patch that makes the '--' workaround more visible. -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9182 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4113] Add custom __repr__ to functools.partial
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: There is an ongoing discussion about deprecating undocumented PyUnicode_AppendAndDel(). See Marc-Andre's comment in msg121371: +.. c:function:: void PyUnicode_Append(PyObject **pleft, PyObject *right) + + Concat two strings and put the result in *pleft. Sets *pleft to + NULL on error. + +.. c:function:: void PyUnicode_AppendAndDel(PyObject **pleft, PyObject *right) + + Concat two strings and put the result in *pleft and drop the right + object. Sets *pleft to NULL on error. + + Please don't document these two obscure APIs. Instead we should make them private functions by prepending them with an underscore. If you look at the implementations of those two APIs, they are little more than a macros around PyUnicode_Concat(). 3rd party extensions should use PyUnicode_Concat() to achieve the same effect. While it is OK for Python library to use private APIs, please consider if PyUnicode_Concat() may be more appropriate. If not, please make a case at issue 10435 for keeping it public. -- assignee: - belopolsky nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9182] document “--” as a way to disti nguish option w/ narg='+' from positional argument in arg parse
Éric Araujo mer...@netwok.org added the comment: You’re right, sorry I was unclear: “a patch for that” referred to the addition of “--” in the generated usage text. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9182 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4476] compileall fails if current dir has a types package
Nick Coghlan ncogh...@gmail.com added the comment: Indeed, any time you shadow a standard library module you run the risk of breaking things. runpy (and its dependencies) are just like any other module in that respect. -- resolution: - invalid stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception
Jesse Noller jnol...@gmail.com added the comment: Can you please expand on deeply different? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8028 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10459] missing character names in unicodedata (CJK...)
Marc-Andre Lemburg m...@egenix.com added the comment: Vlastimil Brom wrote: New submission from Vlastimil Brom vlastimil.b...@gmail.com: I just noticed an ommision of come character names in unicodedata module. These are some CJK - Ideographs: 龼 (0x9fbc) - 鿋 (0x9fcb) (CJK Unified Ideographs [19968-40959] [0x4e00-0x9fff]) ꜀ (0x2a700) - 뜴 (0x2b734) (CJK Unified Ideographs Extension C [173824-177983] [0x2a700-0x2b73f]) 띀 (0x2b740) - 렝 (0x2b81d) (CJK Unified Ideographs Extension D [177984-178207] [0x2b740-0x2b81f]) The names are probably to be generated - e.g. CJK UNIFIED IDEOGRAPH-2A700 ... etc. I don't think we should fill those rather big ranges with generated names, unless there's a standard for this. There are quite a few ranges in the Unicode database that are assigned, but don't have a literal name associated with them. -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8158] Docstring of optparse.OptionParser incomplete
Changes by Éric Araujo mer...@netwok.org: -- title: documentation of 'optparse' module incomplete - Docstring of optparse.OptionParser incomplete ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8158 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4476] compileall fails if current dir has a types package
Éric Araujo mer...@netwok.org added the comment: Do you think it would be useful to update the doc of compileall? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4391] optparse: use proper gettext plurals forms
Éric Araujo mer...@netwok.org added the comment: optparse is widely used, so the answer to my question is: yes, it is worth fixing. Checking argparse for the same errors is also a good idea. Dwayne: can you update your patch to address my remarks? If not, someone else or I may do it. Adding the “easy” keyword for potential bug-day contributors. -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9921] os.path.join('x','') behavior
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg118372 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9921] os.path.join('x','') behavior
Éric Araujo mer...@netwok.org added the comment: I think the comment is fine as is. +1 to adding your wording to the docs. -- keywords: +patch nosy: +eric.araujo stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Nick Coghlan ncogh...@gmail.com added the comment: Gah, I accidentally generated a diff that included some unrelated changes to urrlib (and its tests) for a different issue I had been working on, and Ron's subsequent patch picked them up. I then misinterpreted left them alone to mean didn't include them in the regenerated patch. Sorry about that - taking those changes out was the right thing to do. The test_pyclbr change was necessary at the time (the new code isn't particularly class browser friendly, so the tests referencing pydoc started failing), but it shouldn't be needed now that the server and client implementation details are once again hidden inside function scopes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False
Éric Araujo mer...@netwok.org added the comment: +1 on clarifying the docs. Michael, where in the file do you think it should go? (You can also directly make a diff if you want.) -- assignee: - d...@python components: +Documentation -Library (Lib) keywords: +patch nosy: +d...@python, eric.araujo resolution: duplicate - stage: committed/rejected - patch review status: closed - open superseder: cmd.py always uses raw_input, even when another stdin is specified - versions: +Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10396 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10395] new os.path function to extract common prefix based on path components
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10395 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4476] compileall fails if current dir has a types package
Nick Coghlan ncogh...@gmail.com added the comment: No. Once you start shadowing standard library modules, all bets are off as to what will and won't work. It's one of the reasons we need to be somewhat careful with the naming of new standard library modules. I'm mildly curious as to why 2.7 didn't also throw ImportError*, but given the description, I don't consider it incorrect behaviour that this scenario broke in 3.x. *Off the top of my head, I would guess it is due to the change in initialisation order needed to bootstrap the new IO stack in 3.x, but it would take a bit of investigation to confirm that -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4476] compileall fails if current dir has a types package
Éric Araujo mer...@netwok.org added the comment: Thanks for the replies. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10461] Use with statement throughout the docs
New submission from Éric Araujo mer...@netwok.org: The docs contain numerous examples that would trigger resource warnings under 3.2 (for example “open(...).read()”). They should be changed to use (and thus promote) the with statement. Not adding the “easy” keyword, since grepping for those things is not easy. Not sure we’ll backport that to 3.1 and 2.7. -- assignee: d...@python components: Documentation messages: 121545 nosy: d...@python, eric.araujo priority: normal severity: normal stage: needs patch status: open title: Use with statement throughout the docs versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10461 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10252] Fix resource warnings in distutils
Éric Araujo mer...@netwok.org added the comment: These constructs don’t generate warnings at present but should IMO use the with statement too: ./distutils/command/upload.py:128: open(filename+.asc).read()) ./distutils/command/bdist_rpm.py:514: spec_file.extend(open(val, 'r').read().split('\n')) ./distutils/command/bdist_wininst.py:248:bitmapdata = open(bitmap, rb).read() ./distutils/command/bdist_wininst.py:288:file.write(open(arcname, rb).read()) ./distutils/command/bdist_msi.py:399: f.write(open(self.pre_install_script).read()) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10252 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4153] Unicode HOWTO up to date?
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed in revision 86530. Thanks Terry and Raymond for your comments. I would like to keep this issue open (at a low priority) because the question in the titles is still relevant. There are many new 3.x features that are not covered such as surrogateescape error handler. Such topics may or may not be appropriate for a HOWTO. there are also some stylistic changes that I would like to consider: 1. Replace verbatim URLs with properly formatted hyperlinked titles of the referenced resources. 2. I couldn't figure out who the original author was. With first person passages, such as I remember looking at Apple ][ BASIC programs, .. it may be appropriate to list the original author at the top even if the text has been changed by others over the years. At the very least the Acknowlegements section should start with This article was originally written by X [on an occasion Y.] 3. Examples should be properly marked up to allow sphinx to run them and check the output. -- priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4153 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4153] Unicode HOWTO up to date?
Éric Araujo mer...@netwok.org added the comment: Agreed on 1 and 3. Regarding 2, looking at the early history of the file makes me suspect that amk is the author. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4153 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9921] os.path.join('x','') behavior
R. David Murray rdmur...@bitdance.com added the comment: first part by itself sounds like there can only be two parts. How about 'inserts a separator between each pair of...' Also, what does 'absolute' mean on Windows? Does it include the drive? If so, the second sentence should probably say 'if a part starts with a separator...' (Assuming, of course, that that's how ntpath.join actually works). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com