[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 handling in threads. It 
allows any thread to initially catch the signal mark it as 
triggered, allowing the main thread to later process it. (This 
is actually just restoring access to the functionality that was 
in Python 2.1)”

Apparently Python has been hesitating between both behaviours.

> The Python documentation clearly states that 
> there is no user accessible Python functions that can modify
> per-thread signal mask, so it is currently impossible to solve the
> problem with just Python code.

Well as I already said we could introduce this missing feature. Ideas
and patches welcome.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 is major work to
get right, since the "s#" parser marker also accepts buffer interfaces.

--
nosy: +lemburg
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.py:

Lib/email/encoders.py:

Lib/email/errors.py:

Lib/email/feedparser.py:

Lib/email/generator.py:

Lib/email/header.py:

Lib/email/__init__.py:

Lib/email/iterators.py:

Lib/email/message.py:

Lib/email/mime/audio.py:

Lib/email/mime/base.py:

Lib/email/mime/image.py:

Lib/email/mime/message.py:

Lib/email/mime/multipart.py:

Lib/email/mime/nonmultipart.py:

Lib/email/mime/text.py:

Lib/email/parser.py:

Lib/email/quoprimime.py:

Lib/email/test/test_email_codecs.py:

Lib/email/test/test_email_codecs_renamed.py:

Lib/email/test/test_email.py:

Lib/email/test/test_email_renamed.py:

Lib/email/test/test_email_torture.py:

Lib/email/utils.py:

Lib/smtpd.py:

Lib/test/test_base64.py:

Lib/test/test_isinstance.py:

Misc/python-mode.el:

Modules/_ctypes/cfield.c:

Modules/_ctypes/_ctypes.c:

Modules/_io/bufferedio.c:

Modules/_io/_iomodule.c:

Modules/puremodule.c:

Modules/_tkinter.c:

Tools/audiopy/audiopy:

Tools/audiopy/README:

Tools/i18n/msgfmt.py:

Tools/i18n/pygettext.py:

Tools/pynche/ChipViewer.py:

Tools/pynche/ColorDB.py:

Tools/pynche/DetailsViewer.py:

Tools/pynche/Main.py:

Tools/pynche/pyColorChooser.py:

Tools/pynche/PyncheWidget.py:

Tools/pynche/README:

Tools/pynche/StripViewer.py:

Tools/pynche/Switchboard.py:

Tools/pynche/TextViewer.py:

Tools/pynche/TypeinViewer.py:

Tools/world/README:

Tools/world/world:

--
components: None
messages: 96434
nosy: ivank
severity: normal
status: open
title: many source files contaminated with form feed (\f) characters
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.sysconfig
>> print(distutils.sysconfig.get_config_var('LINKFORSHARED'))

returns:
  Python.framework/Versions/3.0/Python

and

/Library/Frameworks/Python.framework/Versions/2.6/bin/python
Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) 
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
>> import distutils.sysconfig
>> print(distutils.sysconfig.get_config_var('LINKFORSHARED'))

Returns:
  -u _PyMac_Error Python.framework/Versions/2.6/Python

However,

/usr/bin/python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
>> import distutils.sysconfig
>> print(distutils.sysconfig.get_config_var('LINKFORSHARED'))

returns the correct path:
   -u _PyMac_Error
/System/Library/Frameworks/Python.framework/Versions/2.6/Python

--
nosy: +xdcdx
versions: +Python 2.6, Python 3.0

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, Python 3.2
Added file: http://bugs.python.org/file15565/py3k_doc_sys_flags.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 bug.

I just installed the latest MacPython stable packages (2.6.4 and 3.1.1),
and the relative path bug is still present. Here's the result for 3.1.1:

--$ /Library/Frameworks/Python.framework/Versions/3.1/bin/python3
Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import distutils.sysconfig
>>> print(distutils.sysconfig.get_config_var('LINKFORSHARED'))
-framework CoreFoundation Python.framework/Versions/3.1/Python

--
versions: +Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 needed.
But I don't know how this would be better than a more flexible API,
except of course that the patch for that API doesn't exist (but wouldn't
be difficult to produce by someone motivated).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
severity: normal
status: open
title: Lib/test/regrtest.py -ulib2to3 yield "Invalid -u option"
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

The value of LINKFORSHARED is correct for building the framework, making 
sure that the value is useful outside of the build of Python itself 
would almost certainly require hacks, either in the makefile or by 
patching the Makefile during installation.

BTW. I have no idea what's the point of msg75511, it doesn't seem to be 
related to the original report.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/options/python-bugs-list/archive%40mail-archive.com



[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 from the help section of regrtest,
or it should be added to the list of resources and used by test_lib2to3.
 I'll let the determination of which up to Benjamin.

--
assignee:  -> benjamin.peterson
nosy: +benjamin.peterson, r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
distutils.sysconfig.get_config_var('LINKFORSHARED')"
OUTPUT_VARIABLE PYTHON_LDFLAGS_OUTPUT_VARIABLE
ERROR_VARIABLE PYTHON_LDFLAGS_ERROR_VARIABLE
RESULT_VARIABLE PYTHON_LDFLAGS_RETURN_VALUE
)
...

Does anybody happen to know a better/more correct way for linking the
python libs?

--
Added file: http://bugs.python.org/file15567/FindPythonLibs.cmake

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 -3 flag
1 test skipped:
test_py3kwarn
1 skip unexpected on linux2:
test_py3kwarn

--
components: Tests
messages: 96452
nosy: flox
severity: normal
status: open
title: Flag "-3" is silently ignored when running "regrtest.py -j2"
type: behavior
versions: Python 2.6, Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 96454
nosy: patrickkidd
severity: normal
status: open
title: freeze.py not ported to python3
type: compile error
versions: Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 approach:

(1) on a platform that doesn't have (for example) log1p, we end up 
exporting the symbol _log1p from the main Python executable.  At the very 
least, this should have a _Py prefix.  Moreover, since log1p is only 
needed by the math and cmath modules, and not by the Python interpreter 
itself, python.exe shouldn't really be exporting it in the first place.

(2) It may not work!  As an experiment, I tried adding a new function 
expm1_alt to pymath.c, declaring it in Include/pymath.h with PyAPI_FUNC, 
and using it in Modules/mathmodule.c; but the function ended up not being 
visible to the math module:  the math module failed to build, with an 
error message:

dlopen(build/lib.macosx-10.4-i386-2.7/math.so, 2): Symbol not found: 
_expm1_alt

When I moved the function to a different source file (I picked 
Objects/longobject.c, for no particularly good reason) the new function 
became visible and the build succeeded.

The reason for the above behaviour appears to be (I'm guessing a little 
bit) that on my platform (OS X 10.6), none of the functions from pymath.c 
is needed in the main python executable, so when creating python.exe the 
linker ignores *all* the symbols from pymath.c.  So while libpython2.7.a 
exports _expm1_alt, python.exe does not.

I'm not sure what the best way to reorganize this setup is.

--
components: Build
messages: 96455
nosy: mark.dickinson
severity: normal
status: open
title: Some functions in pymath.c should be moved elsewhere.
versions: Python 2.7, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_py3kwarn
> test_py3kwarn skipped -- test.test_py3kwarn must be run with the -3 flag
> 1 test skipped:
> test_py3kwarn
> 1 skip unexpected on linux2:
> test_py3kwarn

I'm not sure where you are getting that warning from: it doesn't
exist in Python 2.7 (trunk) and will likely never exist, since we're
going to add that codec back to 3.1. See issue 7475.

Still, even without it, you get the error:

Python/Dev-Python> ./python -3 Lib/test/regrtest.py -j2 test_py3kwarn
test_py3kwarn
test_py3kwarn skipped -- test.test_py3kwarn must be run with the -3 flag
1 test skipped:
test_py3kwarn
1 skip unexpected on linux2:
test_py3kwarn

The reason is simple: when starting secondary processes to run the
tests, regrtest.py doesn't pass along the Python interpreter flags
to the secondary Python executeables.

It also ignores the environment variables by forcing the -E
option.

--
nosy: +lemburg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.ini, line: 1
'\xef\xbb\xbf[section]\n'

ConfigParser should be able to read such files.

--
components: Library (Lib), Unicode
files: config.ini
messages: 96457
nosy: grego87
severity: normal
status: open
title: CompileParser can't read files with BOM markers
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file15569/config.ini

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
type: compile error -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 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
> type: compile error -> behavior
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: http://bugs.python.org/file15570/unnamed

___
Python tracker 

___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 rep...@bugs.python.org> 
wrote:

Brett Cannon br...@python.org> 
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
type: compile error -> behavior

___
Python tracker rep...@bugs.python.org>
http://bugs.python.org/issue7517>
___

___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 sys.flags.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 Modules/python.o libpython2.7.a -ldl 
-framework CoreFoundation

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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))
Expected:   urllib.parse.quote(urllib.parse.quote(s))

--
components: 2to3 (2.x to 3.0 conversion tool)
files: doublequote.py
messages: 96465
nosy: cesarizu
severity: normal
status: open
title: Incorrect handling of nested calss
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file15571/doublequote.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored ../doublequote.py
--- ../doublequote.py (original)
+++ ../doublequote.py (refactored)
@@ -1,5 +1,5 @@
-import urllib
+import urllib.request, urllib.parse, urllib.error
 
 def doublequote(s):
-   return urllib.quote(urllib.quote(s))
+   return urllib.parse.quote(urllib.parse.quote(s))
 
RefactoringTool: Files that need to be modified:
RefactoringTool: ../doublequote.py

--
nosy: +flox

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
  .python -Ebb -Lib/tests/regrtest.py -vvs test_codecs

disabling test_handlers() in UTF32Test allows the test to pass and it 
completes very fast. It is puzzling that UTF16Test test_handlers works 
with what looks like similar code in unidoceobject.c

~jim

--
nosy: +jgsack

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
unicodeobject.c. 

~jim

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
assignee: georg.brandl
components: Documentation
messages: 96471
nosy: georg.brandl, jmillikin
severity: normal
status: open
title: PyEval_GetRestricted should be removed from C API reference
versions: Python 3.0, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 occurrence of testThreading in test-bz2.py)

but not -r 75817

~jim

--
nosy: +jgsack

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 my test procedure.

~jim

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 unconditionally skipped by
> Lib/test/test_lib2to3).
>
> Either the resource should be deleted from the help section of regrtest,
> or it should be added to the list of resources and used by test_lib2to3.
>  I'll let the determination of which up to Benjamin.
>
> --
> assignee:  -> benjamin.peterson
> nosy: +benjamin.peterson, r.david.murray
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 regrtest patch seems ok

~jim

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, require a sequence. 

The code should be changed to convert the input to a sequence instead.

Cheers,
Leo.

--
components: Library (Lib)
messages: 96480
nosy: lleeoo
severity: normal
status: open
title: random.choice should accept a set as input
type: behavior
versions: Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com