[issue5048] Extending itertools.combinations

2009-01-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue5048] Extending itertools.combinations

2009-01-25 Thread Konrad
Konrad kon...@gmail.com 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

[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 l...@lkcl.net: 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} def

[issue1717] Get rid of more references to __cmp__

2009-01-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue1717] Get rid of more references to __cmp__

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue1717] Get rid of more references to __cmp__

2009-01-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue5048] Extending itertools.combinations

2009-01-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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,

[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 akit...@gmail.com: 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

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

2009-01-25 Thread Akira Kitada
Akira Kitada akit...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue5052

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

2009-01-25 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek nosy: +tarek versions: -Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5052 ___

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

2009-01-25 Thread Mike Watkins
New submission from Mike Watkins pyt...@mikewatkins.ca: 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

[issue1717] Get rid of more references to __cmp__

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Fixed, I think. Could you double check? It's ok! ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1717 ___

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Akira Kitada
New submission from Akira Kitada akit...@gmail.com: 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,

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Akira Kitada
Changes by Akira Kitada akit...@gmail.com: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5055 ___ ___ Python-bugs-list mailing

[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 l...@lkcl.net: 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

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

2009-01-25 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: 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

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

2009-01-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 2.6, Python 2.7, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5057 ___

[issue4753] Faster opcode dispatch on gcc

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Not my issue. -- assignee: georg.brandl - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5055 ___

[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 l...@lkcl.net: 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 =

[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 mar...@v.loewis.de 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 rep...@bugs.python.org

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

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: done in r68929 and r68931 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4863 ___

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

2009-01-25 Thread Jesse Noller
Jesse Noller jnol...@gmail.com 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

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Ross Light
Ross Light rlig...@gmail.com 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.

[issue4137] update SIG web pages

2009-01-25 Thread Akira Kitada
Changes by Akira Kitada akit...@gmail.com: -- assignee: - georg.brandl components: +Documentation nosy: +akitada, georg.brandl, tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4137 ___

[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 l...@lkcl.net 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

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de 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

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: - duplicate status: open - closed superseder: - update SIG web pages ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5055 ___

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

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

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: You also need to add unit tests for the new behavior you've implemented. -- nosy: +exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4285

[issue4285] Use a named tuple for sys.version_info

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

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

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: right, applying it now. sorry about that ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4863 ___ ___

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

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

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: +1 on this idea -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4285 ___

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

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: done in r68933 and r68935, thank you for noticing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4863 ___

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: Removed file: http://bugs.python.org/file12854/patch-4285a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4285 ___

[issue5048] Extending itertools.combinations

2009-01-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: There is already a powerset() recipe in the docs. It was contributed by Eric Raymond. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5048

[issue5048] Extending itertools.combinations

2009-01-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: So there is. Apologies---I'll try to read more carefully next time. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5048 ___

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de 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 -

[issue3068] IDLE - Add an extension configuration dialog

2009-01-25 Thread Weeble
Changes by Weeble clockworksa...@gmail.com: -- nosy: +weeble ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3068 ___ ___ Python-bugs-list mailing

[issue5059] Policy.DomainStrict in cookielib example code

2009-01-25 Thread Attila Babo
New submission from Attila Babo attila.b...@gmail.com: 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 =

[issue5048] Extending itertools.combinations

2009-01-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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.

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

2009-01-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5056 ___

[issue5060] gcc profile guided optimization

2009-01-25 Thread Roumen Petrov
Changes by Roumen Petrov bugtr...@roumenpetrov.info: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5060 ___ ___

[issue5060] gcc profile guided optimization

2009-01-25 Thread Roumen Petrov
Changes by Roumen Petrov bugtr...@roumenpetrov.info: -- components: +Build ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5060 ___ ___

[issue5060] gcc profile guided optimization

2009-01-25 Thread Roumen Petrov
Changes by Roumen Petrov bugtr...@roumenpetrov.info: -- type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5060 ___ ___

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Ross Light
Ross Light rlig...@gmail.com 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:

[issue4705] python3.0 -u: unbuffered stdout

2009-01-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue4705] python3.0 -u: unbuffered stdout

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue4705] python3.0 -u: unbuffered stdout

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue4111] Add DTrace probes

2009-01-25 Thread Skip Montanaro
Skip Montanaro s...@pobox.com 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

[issue4705] python3.0 -u: unbuffered stdout

2009-01-25 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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

[issue4705] python3.0 -u: unbuffered stdout

2009-01-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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,

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

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: done in r68943 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5052 ___

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

2009-01-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com 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

[issue5052] Mark distutils to stay compatible with 2.3

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com 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

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

2009-01-25 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com 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 rep...@bugs.python.org

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

2009-01-25 Thread Mitchell Model
New submission from Mitchell Model m...@acm.org: 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

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

2009-01-25 Thread Mitchell Model
Mitchell Model m...@acm.org 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 rep...@bugs.python.org http://bugs.python.org/issue5061

[issue5052] Mark distutils to stay compatible with 2.3

2009-01-25 Thread Akira Kitada
Akira Kitada akit...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue5052

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Akira Kitada
Akira Kitada akit...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue5055

[issue5055] Distutils-SIG page needs to be updated

2009-01-25 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de 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 zhir...@umich.edu 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

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

2009-01-25 Thread David W. Lambert
David W. Lambert lamber...@corning.com 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 c...@carlsensei.com: 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

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com 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

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

2009-01-25 Thread Patrick Toal
New submission from Patrick Toal pt...@takeflight.ca: 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

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

2009-01-25 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone exar...@divmod.com: 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

[issue5065] IDLE improve Subprocess Startup Error message

2009-01-25 Thread Steven D'Aprano
New submission from Steven D'Aprano st...@pearwood.info: 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

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

2009-01-25 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org 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 rep...@bugs.python.org

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

2009-01-25 Thread Mitchell Model
Mitchell Model m...@acm.org added the comment: David W. Lambert lamber...@corning.com 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

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

2009-01-25 Thread Steven D'Aprano
New submission from Steven D'Aprano st...@pearwood.info: 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