[issue5048] Extending itertools.combinations

2009-01-25 Thread Mark Dickinson
Mark Dickinson added the comment: I've seen requests for combinations with replacement come up on c.l.p. a few times in the past, though it's never been clear whether there was a real need or whether the interest was driven by homework or curiosity. -1 for sequences in the second argument of

[issue5048] Extending itertools.combinations

2009-01-25 Thread Konrad
Konrad added the comment: I'm afraid I don't have any real-world use cases. Originally, I assumed that dropping the length argument will make the function iterate over *all* combinations, which would enable me to write somehow twisted, one- liner for _inefficiently_ solving knapsack problem.

[issue5051] test_update2 in test_os.py invalid due to os.environ.clear() followed by reliance on environ COMSPEC

2009-01-25 Thread Luke Kenneth Casson Leighton
New submission from Luke Kenneth Casson Leighton : class EnvironTests(mapping_tests.BasicTestMappingProtocol): """check that os.environ object conform to mapping protocol""" type2test = None def _reference(self): return {"KEY1":"VALUE1", "KEY2":"VALUE2", "KEY3":"VALUE3"} d

[issue1717] Get rid of more references to __cmp__

2009-01-25 Thread Mark Dickinson
Mark Dickinson added the comment: I'm wondering how to move forward with this issue. Might it make sense to break the current monster patch into a series of more-easily reviewed patches? I was thinking of something like: - patch 1 (Python code): remove all uses of cmp from std. lib. and te

[issue1717] Get rid of more references to __cmp__

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Quick comments on your patch: - two files have unwanted modifications on non-ASCII characters (Lib/heapq.py and Lib/sqlite3/test/hooks.py) - you haven't renamed "__cmp__" to "_cmp" in Lib/xmlrpc/client.py: deliberate? - in Lib/heapq.py, there's a "_cmp__" which

[issue1717] Get rid of more references to __cmp__

2009-01-25 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Antoine. Here's a new patch. > - two files have unwanted modifications on non-ASCII characters > (Lib/heapq.py and Lib/sqlite3/test/hooks.py) Fixed, I think. Could you double check? > - you haven't renamed "__cmp__" to "_cmp" in Lib/xmlrpc/client.py

[issue5048] Extending itertools.combinations

2009-01-25 Thread Mark Dickinson
Mark Dickinson added the comment: > that dropping the length argument will make the function iterate over > *all* combinations, Now *this* sounds more useful to me: an itertool that generates *all* subsets of a list. It's quite easy to do with existing itertools, though, either by looping

[issue5052] "This module should be kept compatible with Python 2.1." in distutils code

2009-01-25 Thread Akira Kitada
New submission from Akira Kitada : In distutils package, there are many files that saying "This module should be kept compatible with Python 2.1." According to Tarek Ziadé, this is not valid statement anymore. -- components: Distutils messages: 80507 nosy: akitada severity: normal statu

[issue5052] "This module should be kept compatible with Python 2.1." in distutils code

2009-01-25 Thread Akira Kitada
Akira Kitada added the comment: If PEP 291 is still valid, distutils needs "only remain compatible with the version of Python it is distributed with." ___ Python tracker ___ _

[issue5052] "This module should be kept compatible with Python 2.1." in distutils code

2009-01-25 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- assignee: -> tarek nosy: +tarek versions: -Python 2.6, Python 3.0 ___ Python tracker ___ ___ Python-bugs-

[issue5053] http.client.HTTPMessage.getallmatchingheaders()

2009-01-25 Thread Mike Watkins
New submission from Mike Watkins : HTTPMessage.getallmatchingheaders() stopped working sometime after Python 3.0 release. In a recent (1 day ago) svn update the implementation says the method was copied from rfc822.message; the Python 3.x implementation is broken (iterates through self.keys in

[issue5054] CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed

2009-01-25 Thread Mike Watkins
New submission from Mike Watkins : There appears to have been a bug in how HTTP_ACCEPT is parsed living in run_cgi() for eons, perhaps from the time it was written. Perhaps not many are using this code (I'm not either) but recent (post 3.0 Release) Python 3.x appear to have broken something in

[issue1717] Get rid of more references to __cmp__

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Fixed, I think. Could you double check? It's ok! ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Akira Kitada
New submission from Akira Kitada : Distutils-SIG page [1] and links there are considerably outdated. They need to be updated to reflect current situation. [1] http://www.python.org/community/sigs/current/distutils-sig/ -- assignee: georg.brandl components: Distutils, Documentation messa

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue5056] PyAPI assumes OS can access shared data in loadable modules (windows can't)

2009-01-25 Thread Luke Kenneth Casson Leighton
New submission from Luke Kenneth Casson Leighton : an assumption has been made in the python core api that all operating systems "dynamic module loading" can access data segments. windows _cannot_ do this. the "workaround" has been to statically link absolutely _everything_ into a single whoppi

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2009-01-25 Thread Antoine Pitrou
New submission from Antoine Pitrou : The peephole optimizer can optimize indexed access to an unicode constant which does not give the same result in UCS-2 and UCS-4 builds. As a result, the pyc file is not portable across those builds. This is something I witnessed when recompiling in UCS-2 rat

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2009-01-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 2.6, Python 2.7, Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue4753] Faster opcode dispatch on gcc

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in py3k in r68924. I won't backport it to trunk myself but it should be easy enough, provided people are interested. -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> pending versions: -Python 2.6, Python 3

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Georg Brandl
Georg Brandl added the comment: Not my issue. -- assignee: georg.brandl -> ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue5058] stop pgen.exe from generating CRLF-ended files and causing mayhem with win32-based patch submissions

2009-01-25 Thread Luke Kenneth Casson Leighton
New submission from Luke Kenneth Casson Leighton : diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c index fc27a2c..a4d4911 100644 --- a/Parser/pgenmain.c +++ b/Parser/pgenmain.c @@ -49,7 +49,7 @@ main(int argc, char **argv) graminit_h = argv[2]; graminit_c = argv[3]; g =

[issue5051] test_update2 in test_os.py invalid due to os.environ.clear() followed by reliance on environ COMSPEC

2009-01-25 Thread Martin v. Löwis
Martin v. Löwis added the comment: The test actually doesn't rely on COMSPEC. On systems that have /bin/sh, COMSPEC should have no relevance. -- nosy: +loewis ___ Python tracker

[issue4863] deprecate/delete distutils.mwerkscompiler...

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé added the comment: done in r68929 and r68931 -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue3350] multiprocessing adds built-in types to the global copyreg.dispatch_table

2009-01-25 Thread Jesse Noller
Jesse Noller added the comment: Alexandre, this behavior no longer occurs in trunk, and a custom ForkingPickler was added as part of issue 3125 I am going to close this as fixed, but please reopen if there is continued undesired behavior. -- resolution: -> fixed status: open -> clos

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Ross Light
Ross Light added the comment: Hello, my name is Ross Light. I've written a patch for this, but this is my first patch, so someone please review. This does pass all regression tests, but I did have to modify the test_sys case to not check for sys.version_info being a tuple. -- keywords

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Akira Kitada
Akira Kitada added the comment: I think this is a duplicate of issue4137. Please close this. ___ Python tracker ___ ___ Python-bugs-list mailin

[issue4137] update SIG web pages

2009-01-25 Thread Akira Kitada
Changes by Akira Kitada : -- assignee: -> georg.brandl components: +Documentation nosy: +akitada, georg.brandl, tarek ___ Python tracker ___ _

[issue5056] PyAPI assumes OS can access shared data in loadable modules (windows can't)

2009-01-25 Thread Luke Kenneth Casson Leighton
Luke Kenneth Casson Leighton added the comment: apologies - case of mistaken identity! patch attached - beginnings of moving data over to accessor-functions. attached here because it is relevant for "vector-table" future work. please close this bug. -- keywords: +patch Added file: htt

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Martin v. Löwis
Martin v. Löwis added the comment: akitada, can you propose wording (or, more specifically, a patch)? Notice that this is really the Python bug tracker, so issues with python.org are not normally tracked here. In any case, if you want to work on this: the sources live in https://svn.python.or

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- resolution: -> duplicate status: open -> closed superseder: -> update SIG web pages ___ Python tracker ___ __

[issue4863] deprecate/delete distutils.mwerkscompiler...

2009-01-25 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Probably this patch is needed. :-) -- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file12856/remaining.patch ___ Python tracker

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: You also need to add unit tests for the new behavior you've implemented. -- nosy: +exarkun ___ Python tracker ___ _

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Ross Light
Ross Light added the comment: Oh yes, you're right. Sorry! Added file: http://bugs.python.org/file12857/patch-4285b.diff ___ Python tracker ___ _

[issue4863] deprecate/delete distutils.mwerkscompiler...

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé added the comment: right, applying it now. sorry about that ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5053] http.client.HTTPMessage.getallmatchingheaders()

2009-01-25 Thread Mike Watkins
Mike Watkins added the comment: Trivial patch for http.client attached. -- keywords: +patch Added file: http://bugs.python.org/file12858/http.client.py.patch ___ Python tracker _

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 on this idea -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue4863] deprecate/delete distutils.mwerkscompiler...

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé added the comment: done in r68933 and r68935, thank you for noticing ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Martin v. Löwis
Changes by Martin v. Löwis : Removed file: http://bugs.python.org/file12854/patch-4285a.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue5048] Extending itertools.combinations

2009-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: There is already a powerset() recipe in the docs. It was contributed by Eric Raymond. ___ Python tracker ___

[issue5048] Extending itertools.combinations

2009-01-25 Thread Mark Dickinson
Mark Dickinson added the comment: So there is. Apologies---I'll try to read more carefully next time. ___ Python tracker ___ ___ Python-bugs-l

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Martin v. Löwis
Martin v. Löwis added the comment: A couple of further comments: - please use tabs for indentation consistently. - please change Doc/library/sys.rst, including adding a versionchanged indication - I find the naming of the macros *Flag confusing; to me, a "flag" says "boolean" - but I'm not a nat

[issue3068] IDLE - Add an extension configuration dialog

2009-01-25 Thread Weeble
Changes by Weeble : -- nosy: +weeble ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mail

[issue5059] Policy.DomainStrict in cookielib example code

2009-01-25 Thread Attila Babo
New submission from Attila Babo : Example code at the bottom of cookielib documentation has an error: policy = DefaultCookiePolicy( rfc2965=True, strict_ns_domain=Policy.DomainStrict, blocked_domains=["ads.net", ".ads.net"]) The corrected version is policy = DefaultCookiePolicy( rfc2

[issue5048] Extending itertools.combinations

2009-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Am rejecting the OP's request for the reasons cited. Also rejecting the request for a __len__ method on permutations. Ezio or Mark, please open another feature request for combinations_with_replacement() and assign to me. Will likely accept this one and pu

[issue5056] PyAPI assumes OS can access shared data in loadable modules (windows can't)

2009-01-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue5060] gcc profile guided optimization

2009-01-25 Thread Roumen Petrov
New submission from Roumen Petrov : The make target "run_profile_task" fail as executable cannot load shared library. Patch attached. -- files: py-issue-profile.patch keywords: patch messages: 80537 nosy: rpetrov severity: normal status: open title: gcc profile guided optimization Added

[issue5060] gcc profile guided optimization

2009-01-25 Thread Roumen Petrov
Changes by Roumen Petrov : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue5060] gcc profile guided optimization

2009-01-25 Thread Roumen Petrov
Changes by Roumen Petrov : -- components: +Build ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue5060] gcc profile guided optimization

2009-01-25 Thread Roumen Petrov
Changes by Roumen Petrov : -- type: -> performance ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Ross Light
Ross Light added the comment: Okay, here's a patch with the requested changes. You're right in saying that flag is usually boolean, I was just going along with several other files where there's float and int flags (i.e. floatobject.c). Added file: http://bugs.python.org/file12860/patch-4285c.d

[issue4705] python3.0 -u: unbuffered stdout

2009-01-25 Thread Mark Dickinson
Mark Dickinson added the comment: > since I don't see how the behaviour can differ for a read-only > non-seekable stream. Unless I'm misunderstanding you (quite likely), I think one *can* get different results with buffered and unbuffered stdin. For example, on my machine, if I create the foll

[issue4705] python3.0 -u: unbuffered stdout

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: [...] I hadn't thought of such situations :-/ So the question is whether it is really useful to enforce unbuffered stdin with the '-u' option (or your example is simply too borderline). If so, the patch will have to be replaced with another one implementing re

[issue4705] python3.0 -u: unbuffered stdout

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thinking about it, TextIOWrapper has its own input buffering (the `decoded_chars` attribute), so your use case would probably not be satisfied. (and disabling TextIOWrapper's internal buffering would be a bad idea since it would make it horribly slow)

[issue4111] Add DTrace probes

2009-01-25 Thread Skip Montanaro
Skip Montanaro added the comment: Here's a patch against the current trunk (2.7) which compiles on my Mac. It adds a --with-dtrace configure option. The code checks to see if the -G option is understood by the dtrace command. If so, dtrace support is added Sun-style. If not we do things Appl

[issue4705] python3.0 -u: unbuffered stdout

2009-01-25 Thread Mark Dickinson
Mark Dickinson added the comment: > So the question is whether it is really useful to enforce unbuffered > stdin with the '-u' option (or your example is simply too borderline). Hard to say. It seems at least possible that there are Python users for whom stdin being unbuffered (with -u) matte

[issue4705] python3.0 -u: unbuffered stdout

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Hard to say. It seems at least possible that there are Python users for > whom stdin being unbuffered (with -u) matters, so if there's any > reasonable way of avoiding changing this it should probably be considered. It's not about changing it, stdin has al

[issue5052] "This module should be kept compatible with Python 2.1." in distutils code

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé added the comment: done in r68943 -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue5052] "This module should be kept compatible with Python 2.1." in distutils code

2009-01-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Note that distutils was removed from PEP 291 in r1982 "After some discussion at the distutils sprint at PyCon 2005". This was not discussed on the distutils mailing list at the time which I regard as not in line with the way Python or distutils is develope

[issue5052] Mark distutils to stay compatible with 2.3

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé added the comment: Ok, I will rewrite the top README file to explain this (and PEP 291 as well) and keep the Python 2.3 compatibility in the whole package. -- status: closed -> open title: "This module should be kept compatible with Python 2.1." in distutils code -> Mark di

[issue1885] [distutils] - error when processing the "--formats=tar" option

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé added the comment: fixed in r68951 in trunk. I will propagate the change into 2.6/3.0/3.1 tomorrow. -- versions: +Python 3.0, Python 3.1 -Python 2.5 ___ Python tracker

[issue5061] Inadequate documentation of the built-in function open

2009-01-25 Thread Mitchell Model
New submission from Mitchell Model : Documentation of the mode parameter of the built-in function open is insufficient with respect to what values are acceptable. (1) Right after the mode table, it states "For binary random access, the mode 'w+b' opens and truncates the file to 0 bytes, while

[issue5061] Inadequate documentation of the built-in function open

2009-01-25 Thread Mitchell Model
Mitchell Model added the comment: In point (2) I should have written "a plain 'b' or 't'" and "value" not "valuable". Neither 't' nor 'b' can appear without a r/w/a. ___ Python tracker _

[issue5052] Mark distutils to stay compatible with 2.3

2009-01-25 Thread Akira Kitada
Akira Kitada added the comment: Is there any PEP describing we have to keep compatibility with 2.3 release? I'm not against the idea but just curious. ___ Python tracker ___

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Akira Kitada
Akira Kitada added the comment: Could you tell me where the right place to ask this kind of problems? I could not find any other trackers... ___ Python tracker ___ ___

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Martin v. Löwis
Martin v. Löwis added the comment: Unfortunately, there is no tracker for the web pages. Questions about the SIG pages can also be asked on the SIG mailing lists. However, there might be nobody responsible for editing the web pages (as is the case with these pages).

[issue2889] curses for windows (alternative patch)

2009-01-25 Thread Zach Hirsch
Zach Hirsch added the comment: Here's a patch against the head of trunk that adds vcproj files for _curses and _curses_panel, modifies (slightly) the test suite and _cursesmodule.c (again, slightly) to get Python to work with pdcurses on windows. I also added a blurb to PCbuild\readme.txt. With

[issue5061] Inadequate documentation of the built-in function open

2009-01-25 Thread David W. Lambert
David W. Lambert added the comment: I disagree. You propose to examine the trees but ignore the forest. The perspective programmer needs to understand what is a file. -- nosy: +LambertDW ___ Python tracker _

[issue5062] Rlcompleter.Completer does not use __dir__ magic method

2009-01-25 Thread Carl Johnson
New submission from Carl Johnson : The documentation at http://docs.python.org/library/rlcompleter.html claims that Completer.complete(text, state)¶ Return the state*th completion for *text. If called for text that doesn’t include a period character ('.'), it will complete from names cur

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Nick Coghlan
Nick Coghlan added the comment: Rather than deleting the isinstance() check from the tests completely, I suggest changing it to be: self.assert_(isinstance(vi[:], tuple)) Also, comparing directly with a tuple is also a fairly common use of version_info so it would be worth adding a test to exp

[issue5063] python-2.6.spec doesn't build properly

2009-01-25 Thread Patrick Toal
New submission from Patrick Toal : Attempting to build an RPM with the python-2.6.spec contained in the python-2.6.1 distribution tar fails. The following diff's enabled me to cleanly build the rpm's on a standard CentOS 5.1 installation. -- components: Build files: python-2.6.1.spec.

[issue5064] compiler.parse raises SyntaxErrors without line number information

2009-01-25 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : Sometimes a syntax error in source passed to `compiler.parse´ causes a `SyntaxError´ with lots of nice information to be raised: >>> from compiler import parse >>> try: ... parse("def f(") ... except SyntaxError, e: ... pass ... >>> e SyntaxError

[issue5065] IDLE improve Subprocess Startup Error message

2009-01-25 Thread Steven D'Aprano
New submission from Steven D'Aprano : When launching IDLE, it reports: "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." This should report what needs to be opened on the firewall to allow the connection,

[issue5064] compiler.parse raises SyntaxErrors without line number information

2009-01-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: Patches are welcome! The compiler package is deprecated in favor of builtin AST. -- nosy: +benjamin.peterson priority: -> low stage: -> needs patch ___ Python tracker

[issue5066] IDLE documentation for Unix obsolete/incorrect

2009-01-25 Thread Steven D'Aprano
New submission from Steven D'Aprano : Documentation for IDLE states: Starting IDLE on UNIX On Unix, just type "idle" at a command prompt. This should bring up a Window similar to the one above. (If it doesn't, look for the "idle" script in the Tools/idle directory in the Python

[issue5061] Inadequate documentation of the built-in function open

2009-01-25 Thread Mitchell Model
Mitchell Model added the comment: >David W. Lambert added the comment: > >I disagree. You propose to examine the trees but ignore the forest. >The perspective programmer needs to understand what is a file. > Could you be more specific about what parts of my comments you disagree with? The cu

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-01-25 Thread Steven D'Aprano
New submission from Steven D'Aprano : Using the wrong sort of quotes in json gives unhelpful error messages: >>> json.loads("{'test':'test'}") Traceback (most recent call last): ... ValueError: Expecting property name: line 1 column 1 (char 1) Unless you know that strings in JSON must be deli