[issue7522] random.choice should accept a set as input

2009-12-15 Thread Leo
New submission from Leo : The following code should just work: import random random.choice(set(range(5))) instead the output is TypeError: TypeError: 'set' object does not support indexing The algorithm in random.choice requires a sequence, but the semantics of choice do not, and should not,

[issue6922] Interpreter hangs up while trying to decode invalid utf32 stream.

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: IMPORTANT Correction: Please disregard msg 96468 & 96470. I was forgetting to do ./configure and make, and evidently getting bogus failures. test_codecs works fine now, ..sorry for the false alarm. ~jim -- _

[issue7205] bz2file deadlock

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: IMPORTANT Correction: Please disregard msg96472. I was forgetting to do .configure and make, and evidently getting bogus failures. test_bz2 works fine now, ..sorry for the false alarm. ~jim -- ___ Python tr

[issue7396] regrtest single: iterator not subscriptable

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: Update: I was doing something wrong and getting false failures. I forgot to do ./configure and make after major revision-switches so the failures I was seeing in bz2 and codecs (and others, :-[ ) was bogus. Repeating the main message, though: The regrt

[issue7491] metaclass __cmp__ is ignored

2009-12-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r76852. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue7515] Lib/test/regrtest.py -ulib2to3 yield "Invalid -u option"

2009-12-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Done in r76851. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python

[issue7515] Lib/test/regrtest.py -ulib2to3 yield "Invalid -u option"

2009-12-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Kill it. 2009/12/15 R. David Murray : > > R. David Murray added the comment: > > I see no sign that the resource is actually used by the lib2to3 test > suite, though it looks like there would be an opportunity for it to do > so (tests that are currently unc

[issue7396] regrtest single: iterator not subscriptable

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: Thanks, it seems to work now. My test method uses the command format ./python -Ebb Lib/test/regrtest.py -s test_calendar Sorry for the delayed response, I discovered problems with test_bz2 test_codecs which I wanted to confirm was real rather than

[issue7205] bz2file deadlock

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: On my Fedora 11 AMD x86_64 system, it appears the deadlock still occurs (up to the limit of my patience, ie: several minutes). If I reduce to say 3, I can get the test to succeed sometimes. Observed in: trunk -r 76850 (latest) -r 75818 (first occurr

[issue6377] distutils compiler switch ignored

2009-12-15 Thread Craig McQueen
Changes by Craig McQueen : -- nosy: +cmcqueen1975 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2009-12-15 Thread Craig McQueen
Changes by Craig McQueen : -- nosy: +cmcqueen1975 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue7521] PyEval_GetRestricted should be removed from C API reference

2009-12-15 Thread John Millikin
New submission from John Millikin : In , the PyEval_GetRestricted() procedure does not exist. HISTORY indicates it was removed during the 3.0 development cycle. It ought to be removed from the docs as well. -- assigne

[issue6922] Interpreter hangs up while trying to decode invalid utf32 stream.

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: Clarification of my last message (msg96468): The test_handler in the current revision (76850) also exhibits the same memory-gobbling behavior. I only refered to -r 74869 because that's where the test was introduced, ostensibly to verify the patch to uni

[issue3588] sysconfig variable LINKFORSHARED has wrong value for MacOS X framework build

2009-12-15 Thread Ricardo Sánchez-Sáez
Ricardo Sánchez-Sáez added the comment: Thank you! That's much more convenient. So maybe then this bug report should be closed without a fix, right? -- ___ Python tracker ___ __

[issue6922] Interpreter hangs up while trying to decode invalid utf32 stream.

2009-12-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: It seems that on my Fedora 11 AMD X86_64, the problem still exists. In test_codecs.UTF32Test, test_handlers() seems to run forever, gobbling memory to 99+% and then activating swap until it fills up swap. tested by svn up -r 74869 rm /tmp/pynexttest

[issue7520] Incorrect handling of nested calss

2009-12-15 Thread R. David Murray
Changes by R. David Murray : -- priority: -> normal resolution: -> duplicate stage: -> committed/rejected superseder: -> 2to3 - does not translate urllib2 to urllib.request correctly for function/method argument ___ Python tracker

[issue7520] Incorrect handling of nested calss

2009-12-15 Thread César Izurieta
César Izurieta added the comment: Thanks for testing this. I guess I'll separate those now. But it's good to know it is fixed in the latest version. -- status: open -> closed ___ Python tracker ___

[issue7520] Incorrect handling of nested calss

2009-12-15 Thread flox
flox added the comment: It seems to behave correctly on 2.7 and 3.1 (svn versions). $ ./python Tools/scripts/2to3 ../doublequote.py RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal Refactorin

[issue7520] Incorrect handling of nested calss

2009-12-15 Thread César Izurieta
New submission from César Izurieta : I was using a function that has a nested urllib.quote. I need to double quote a value. When running this through the 2to3 tool, the nested call never got substituted. Initial:urllib.quote(urllib.quote(s)) 2to3 ouput: urllib.parse.quote(urllib.quote(s))

[issue7518] Some functions in pymath.c should be moved elsewhere.

2009-12-15 Thread Mark Dickinson
Mark Dickinson added the comment: Incidentally, the build failure described earlier can be fixed by creating python.exe with: gcc -u _PyMac_Error -o python.exe Modules/python.o -ldl -Wl,-force_load,libpython2.7.a -framework CoreFoundation instead of with: gcc -u _PyMac_Error -o python.exe M

[issue7516] Flag "-3" is silently ignored when running "regrtest.py -j2"

2009-12-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Instead of just warning the user, wouldn't it be better to add proper support for inheriting the env vars and other Python command line flags ? Whether or not to use -E can be determined via the test module name. The -3 flag and others can be queried via s

[issue7517] freeze.py not ported to python3

2009-12-15 Thread Patrick Stinson
Patrick Stinson added the comment: Interesting. I found it incredibly useful. I would love to fix the port (if I find the time, of course :(). On Tue, Dec 15, 2009 at 12:52 PM, Brett Cannon wrote: > > Brett Cannon added the comment: > > Almost prioritized to low as there has been talk in the

[issue7517] freeze.py not ported to python3

2009-12-15 Thread Brett Cannon
Brett Cannon added the comment: Almost prioritized to low as there has been talk in the past of not even supporting frozen modules by default. The tool should either get fixed or removed depending on how people feel. -- nosy: +brett.cannon priority: -> normal stage: -> needs patch t

[issue7491] metaclass __cmp__ is ignored

2009-12-15 Thread flox
flox added the comment: Note: test_py3kwarn fails, probably since r76794. -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list m

[issue7516] Flag "-3" is silently ignored when running "regrtest.py -j2"

2009-12-15 Thread flox
flox added the comment: This issue (and the patch) is to warn the tester that the flags and environment variables are ignored. Sorry for the DeprecationWarning noise, it is some silly test on my sandbox. -- ___ Python tracker

[issue3588] sysconfig variable LINKFORSHARED has wrong value for MacOS X framework build

2009-12-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: python-config (or python3-config for python 3.x) is the best way to get this information in recent versions of python (IIRC 2.6 or newer) -- ___ Python tracker __

[issue7519] CompileParser can't read files with BOM markers

2009-12-15 Thread grego87
New submission from grego87 : If config.ini file is encoded with utf-8 with bom markers this code import ConfigParser config = ConfigParser.ConfigParser() config.read("config.ini") config.sections() throws: ConfigParser.MissingSectionHeaderError: File contains no section headers. file: config.

[issue7516] Flag "-3" is silently ignored when running "regrtest.py -j2"

2009-12-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: flox wrote: > > New submission from flox : > > ~ $ ./python -3 Lib/test/regrtest.py -j2 test_py3kwarn > ./Lib/encodings/__init__.py:100: DeprecationWarning: > the 'hex' codec has been removed in Python 3.0 > level=0) > test_py3kw

[issue7518] Some functions in pymath.c should be moved elsewhere.

2009-12-15 Thread Mark Dickinson
New submission from Mark Dickinson : The Python/pymath.c file currently defines substitutes for some C99 libm functions (e.g., log1p), for the benefit of platforms that don't implement those functions. It's compiled into the main Python executable. There are (at least) two problems with this a

[issue7517] freeze.py not ported to python3

2009-12-15 Thread Patrick Stinson
New submission from Patrick Stinson : Tools/Freeze/freeze.py is still producing C code that expects the old- style module initialization functions, causing link errors. The simple example in Tools/Freeze/hello.py easily demonstrates this behavior. -- components: Library (Lib) messages:

[issue7516] Flag "-3" is silently ignored when running "regrtest.py -j2"

2009-12-15 Thread flox
flox added the comment: Minimal patch proposed. -- keywords: +patch Added file: http://bugs.python.org/file15568/issue7516_regrtest_mp.diff ___ Python tracker ___ ___

[issue7516] Flag "-3" is silently ignored when running "regrtest.py -j2"

2009-12-15 Thread flox
New submission from flox : ~ $ ./python -3 Lib/test/regrtest.py -j2 test_py3kwarn ./Lib/encodings/__init__.py:100: DeprecationWarning: the 'hex' codec has been removed in Python 3.0 level=0) test_py3kwarn test_py3kwarn skipped -- test.test_py3kwarn must be run with the

[issue3588] sysconfig variable LINKFORSHARED has wrong value for MacOS X framework build

2009-12-15 Thread Ricardo Sánchez-Sáez
Ricardo Sánchez-Sáez added the comment: I am using it to tell CMake where are the Python Libraries for linking. Here's a snippet from my FindPythonLibs.cmake (I am attaching the whole file as well): ... EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig\nprint distutil

[issue7515] Lib/test/regrtest.py -ulib2to3 yield "Invalid -u option"

2009-12-15 Thread R. David Murray
R. David Murray added the comment: I see no sign that the resource is actually used by the lib2to3 test suite, though it looks like there would be an opportunity for it to do so (tests that are currently unconditionally skipped by Lib/test/test_lib2to3). Either the resource should be deleted fr

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-12-15 Thread flox
Changes by flox : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/

[issue3588] sysconfig variable LINKFORSHARED has wrong value for MacOS X framework build

2009-12-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: What do you use LINKFORSHARED for? As a minor rant: the wholesale export of all settings in the main Makefile through distutils sucks big time. I have no idea whether or not LINKFORSHARED is meant to be a public API, and if it is what it should be used for.

[issue7515] Lib/test/regrtest.py -ulib2to3 yield "Invalid -u option"

2009-12-15 Thread flox
New submission from flox : ~ $ ./python Lib/test/regrtest.py --help (...) lib2to3 - Run the tests for 2to3 (They take a while.) (...) ~ $ ./python Lib/test/regrtest.py -ulib2to3 Invalid -u/--use option: lib2to3 Use --help for usage -- components: Tests messages: 96448 nosy: flox s

[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked

2009-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm just saying that I don't know, and I don't think an observation from one user is enough since these issues are notoriously platform-specific. If you want to revert the change made in issue960406, you should IMO demonstrate that somehow this change wasn't ne

[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked

2009-12-15 Thread John Levon
John Levon added the comment: To quote Andriy in the first comment: "It doesn't bring any visible changes to readline behavior either." Are you saying this is not the case? -- ___ Python tracker _

[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked

2009-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The objection is that the "old behaviour" was changed to solve another problem. We don't gain anything by switching back and forth between two different behaviours. -- ___ Python tracker

[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked

2009-12-15 Thread John Levon
John Levon added the comment: I still do not understand the objection you have to the simple patch which restores old behaviour, works the same across all OSes, and doesn't require new APIs. What is the objection? -- ___ Python tracker

[issue7306] Patch - skip winsound tests if no default sound is configured

2009-12-15 Thread Brian Curtin
Brian Curtin added the comment: True, that slipped by me - thanks. Updated the patch against r76850. -- Added file: http://bugs.python.org/file15566/winsound_test_skipping_v2.diff ___ Python tracker __

[issue3588] sysconfig variable LINKFORSHARED has wrong value for MacOS X framework build

2009-12-15 Thread xdcdx
xdcdx added the comment: Correction to my last message: the first two Python installations, located at /Library/Frameworks/Python.framework/Versions/ did not come with Snow Leopard, I installed them from MacPython packages. The Snow Leopard version (/usr/bin/python) does not seem affected by the

[issue3588] sysconfig variable LINKFORSHARED has wrong value for MacOS X framework build

2009-12-15 Thread R. David Murray
Changes by R. David Murray : -- keywords: +easy nosy: +ronaldoussoren, tarek priority: -> normal versions: -Python 2.5, Python 3.0 ___ Python tracker ___ ___

[issue7514] doc: documentation for "sys.flags" is obsolete.

2009-12-15 Thread flox
New submission from flox : Patch attached. -- assignee: georg.brandl components: Documentation files: py3k_doc_sys_flags.diff keywords: patch messages: 96441 nosy: flox, georg.brandl severity: normal status: open title: doc: documentation for "sys.flags" is obsolete. versions: Python 3.1

[issue3588] sysconfig variable LINKFORSHARED has wrong value for MacOS X framework build

2009-12-15 Thread xdcdx
xdcdx added the comment: This bug is still present in Python 2.6 and Python 3.0 included with Snow Leopard. Code: /Library/Frameworks/Python.framework/Versions/3.0/bin/python Python 3.0.1 (r301:69597, Feb 14 2009, 19:03:52) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin >> import distutils.sys

[issue3745] _sha256 et al. encode to UTF-8 by default

2009-12-15 Thread Karen Tracey
Changes by Karen Tracey : -- nosy: +kmtracey ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2009-12-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @Lennart: yes, I do think you should add a test for that case. I haven't yet decided whether this should go into 2.6. -- nosy: +barry ___ Python tracker _

[issue7445] urllib2 (and urllib) should raise error for incomplete response

2009-12-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is working as designed. -- resolution: -> wont fix status: open -> closed ___ Python tracker ___

[issue7513] many source files contaminated with form feed (\f) characters

2009-12-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This is also allowed by PEP8. -- nosy: +amaury.forgeotdarc ___ Python tracker ___ ___ Python-b

[issue7513] many source files contaminated with form feed (\f) characters

2009-12-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Emacs navigation command forward-page and backward-page. Python treats them as whitespace, so what's the problem? :) -- priority: -> low resolution: -> wont fix status: open -> closed ___ Python tracker

[issue7513] many source files contaminated with form feed (\f) characters

2009-12-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: AFAIR, Barry likes these. Not sure exactly why ;-) -- nosy: +barry, lemburg ___ Python tracker ___ _

[issue7513] many source files contaminated with form feed (\f) characters

2009-12-15 Thread ivank
New submission from ivank : In a checkout of Python 2.7 r76831, a large amount of files contain the form feed character (\f, \x0C, octal \014) $ grep --binary-files=without-match -P '\f' **/* | sort | uniq build/scripts-2.7/smtpd.py: Lib/base64.py: Lib/email/base64mime.py: Lib/email/charset.

[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked

2009-12-15 Thread Andriy Pylypenko
Andriy Pylypenko added the comment: > Well as I already said we could introduce this missing feature. Ideas > and patches welcome. Well, this would be definitely a working solution. -- ___ Python tracker _

[issue7511] msvc9compiler.py: ValueError: [u'path']

2009-12-15 Thread Tarek Ziadé
Tarek Ziadé added the comment: That's what distutils does : it runs vcvarsall.bat and pass as the argument the architecture. Can you run: $ vcvarsall.bat arch (replace arch by x86 or x64) and paste me the result ? (it looks like the 'path' variable misses from this file. -- __

[issue5673] Add timeout option to subprocess.Popen

2009-12-15 Thread Lev Shamardin
Changes by Lev Shamardin : -- nosy: +abbot ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue3745] _sha256 et al. encode to UTF-8 by default

2009-12-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Gregory, this patch should not have been backported to Python 2.7. See issue Could you please revert the change on trunk ? Thanks. A much better solution would be to issue a -3 warning in case a Unicode object is passed to the hash functions. However, this

[issue7511] msvc9compiler.py: ValueError: [u'path']

2009-12-15 Thread Stefan Krah
Stefan Krah added the comment: I have the same issue with the Express edition. You can work around it by finding and executing vcvars32.bat or vcvars64.bat before running setup.py. It would be nice if distutils took care of it though. -- nosy: +skrah ___

[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked

2009-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, the history on this looks a bit complicated and I don't really know the details, but witness the first sentences of the initial message in issue960406: “This is a patch which will correct the issues some people have with python's handling of signal handl