[issue17033] RPM spec file has old config_binsuffix value

2013-01-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Do we even *use* the spec file in Misc/RPM for anything any more? Should we 
just delete the entire directory?

(Added Sean and Dave Malcolm to the nosy list)

--
nosy: +dmalcolm, jafo

___
Python tracker 

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



[issue17037] Add conforms_to_pep399() to test.support

2013-01-25 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state

2013-01-25 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue17037] Add conforms_to_pep399() to test.support

2013-01-25 Thread Eric Snow

Eric Snow added the comment:

One step I left out is handling the whole pickle/copyreg case outlined by 
#16817.

--

___
Python tracker 

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



[issue17037] Add conforms_to_pep399() to test.support

2013-01-25 Thread Eric Snow

Eric Snow added the comment:

One lingering doubt I have is about how I throw the two new test case classes 
into the globals.  They're already getting bound, as a pair, to the original 
test class's name...

--

___
Python tracker 

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



[issue16817] test___all__ affects other tests by doing too much importing

2013-01-25 Thread Eric Snow

Eric Snow added the comment:

So the current solution is to temporarily put the relevant module in place in 
sys.modules, right?  That seems to be the solution that Stefan recommended and 
used in the decimal module.  Sounds good to me.

I'm hitting this while doing the PEP 399 two-step for the collections module.  
It seems like this will be a problem for testing any module that has had such 
attention and has __all__.  I'd be a fan of a class decorator that would take 
care of this and the rest of the PEP 399 stuff for you.

I've created issue #17037 to cover that (so it doesn't get muddled in with this 
discussion of test___all__).  There's even a proposed patch.

--
nosy: +eric.snow

___
Python tracker 

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



[issue17037] Add conforms_to_pep399() to test.support

2013-01-25 Thread Eric Snow

New submission from Eric Snow:

Related to issue #16817 and to my efforts on a C OrderedDict, I think it would 
be nice to have a class decorator that handles most of the PEP 399 requirements 
for you.  The attached patch adds such a decorator to test.support.

--
assignee: eric.snow
components: Library (Lib)
files: conforms-to-pep399.diff
keywords: patch
messages: 180641
nosy: brett.cannon, eric.snow
priority: normal
severity: normal
stage: patch review
status: open
title: Add conforms_to_pep399() to test.support
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file28840/conforms-to-pep399.diff

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2013-01-25 Thread Eric Snow

Eric Snow added the comment:

Here's a cleanup of test.test_collections that helps keep the subsequent patch 
(still forthcoming) cleaner.

--
Added file: http://bugs.python.org/file28839/cleanup-test-collections.diff

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2013-01-25 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue16770] Selection in IDLE often skips first character

2013-01-25 Thread Irwin Jungreis

Irwin Jungreis added the comment:

I have reopened this issue because there are still cases where it does not 
work. I installed 8.5.13 and the IDLE patch as suggested. That fixed the 
particular case that I had used to demonstrate the problem (a file containing 
just two characters M1). However, the problem still occurs in other cases. To 
reproduce it, in IDLE pick File | New Window. In the new window type the 
characters '>>>from' (no spaces, and without the quotes). Now, before clicking 
anywhere else, move the cursor to the left half of the 'r'. Click once, and the 
insertion point incorrectly goes to the right of the 'r'. Click a second time 
without moving the cursor and the insertion point goes to the left side of the 
'r'. Unlike the previously reported case, repeated clicking does not cause it 
to alternate -- only the first click is wrong. I have attached a second video 
(IMG_1219.MOV) that demonstrates this.

--
status: closed -> open
Added file: http://bugs.python.org/file28838/IMG_1219.MOV

___
Python tracker 

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



[issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance

2013-01-25 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16651] Find out what stdlib modules lack a pure Python implementation

2013-01-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
dependencies: +Add OrderedDict written in C
nosy: +ezio.melotti
type:  -> enhancement

___
Python tracker 

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



[issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance

2013-01-25 Thread STINNER Victor

STINNER Victor added the comment:

The select module may need more work.

--

___
Python tracker 

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



[issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance

2013-01-25 Thread STINNER Victor

STINNER Victor added the comment:

I tested 9bdfa1a3ea8c.patch on Fedora 16 (Linux 3.6, glibc 2.14), Debian Etch 
(Linux 2.6.19), OpenBSD 5.2, OpenIndiana, FreeBSD 8.2, Windows 7.

I tested both cases (works/not supported) for O_CLOEXEC and SOCK_CLOEXEC. For 
the WSA_FLAG_NO_HANDLE_INHERIT flag, I only tested a Windows version not 
supporting it (Windows 7 SP1 is required).

--

___
Python tracker 

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



[issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance

2013-01-25 Thread STINNER Victor

STINNER Victor added the comment:

Here is a patch of the latest revision.

configure and Python/importlib.h must be regenerated (are not part of the diff).

--
Added file: http://bugs.python.org/file28837/9bdfa1a3ea8c.patch

___
Python tracker 

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



[issue9253] argparse: optional subparsers

2013-01-25 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance

2013-01-25 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file28832/297b3529876a.diff

___
Python tracker 

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



[issue17010] Windows launcher ignores active virtual environment

2013-01-25 Thread Éric Araujo

Changes by Éric Araujo :


--
components: +Interpreter Core -Installation
nosy: +brian.curtin, tim.golden, vinay.sajip
stage:  -> needs patch
versions: +Python 3.4

___
Python tracker 

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



[issue17015] mock could be smarter and inspect the spec's signature

2013-01-25 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue1674555] sys.path in tests contains system directories

2013-01-25 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue16769] Remove some old Visual Studio versions from PC/ directory

2013-01-25 Thread Brian Curtin

Changes by Brian Curtin :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16769] Remove some old Visual Studio versions from PC/ directory

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 01bbac9369e8 by Brian Curtin in branch 'default':
Fix #16769. Remove outdated Visual Studio project directories for VC6, VS7.1, 
and VS8.
http://hg.python.org/cpython/rev/01bbac9369e8

--
nosy: +python-dev

___
Python tracker 

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



[issue16979] Broken error handling in codecs.unicode_escape_decode()

2013-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a set of patches for all versions (patch for 3.4 updated).

--
Added file: 
http://bugs.python.org/file28833/unicode_escape_decode_error_handling-2.7.patch
Added file: 
http://bugs.python.org/file28834/unicode_escape_decode_error_handling-3.2.patch
Added file: 
http://bugs.python.org/file28835/unicode_escape_decode_error_handling-3.3.patch
Added file: 
http://bugs.python.org/file28836/unicode_escape_decode_error_handling-3.4.patch

___
Python tracker 

___diff -r 5970c90dd8d1 Lib/test/test_codeccallbacks.py
--- a/Lib/test/test_codeccallbacks.py   Fri Jan 25 23:30:50 2013 +0200
+++ b/Lib/test/test_codeccallbacks.py   Sat Jan 26 00:51:30 2013 +0200
@@ -262,12 +262,12 @@
 
 self.assertEqual(
 "\\u3042\u3xxx".decode("unicode-escape", "test.handler1"),
-u"\u3042[<92><117><51><120>]xx"
+u"\u3042[<92><117><51>]xxx"
 )
 
 self.assertEqual(
 "\\u3042\u3xx".decode("unicode-escape", "test.handler1"),
-u"\u3042[<92><117><51><120><120>]"
+u"\u3042[<92><117><51>]xx"
 )
 
 self.assertEqual(
diff -r 5970c90dd8d1 Lib/test/test_codecs.py
--- a/Lib/test/test_codecs.py   Fri Jan 25 23:30:50 2013 +0200
+++ b/Lib/test/test_codecs.py   Sat Jan 26 00:51:30 2013 +0200
@@ -1786,6 +1786,84 @@
 self.assertEqual(srw.read(), u"\xfc")
 
 
+class UnicodeEscapeTest(unittest.TestCase):
+def test_empty(self):
+self.assertEqual(codecs.unicode_escape_encode(u""), ("", 0))
+self.assertEqual(codecs.unicode_escape_decode(""), (u"", 0))
+
+def test_raw_encode(self):
+encode = codecs.unicode_escape_encode
+for b in range(32, 127):
+if b != ord('\\'):
+self.assertEqual(encode(unichr(b)), (chr(b), 1))
+
+def test_raw_decode(self):
+decode = codecs.unicode_escape_decode
+for b in range(256):
+if b != ord('\\'):
+self.assertEqual(decode(chr(b) + '0'), (unichr(b) + u'0', 2))
+
+def test_escape_encode(self):
+encode = codecs.unicode_escape_encode
+self.assertEqual(encode(u'\t'), (r'\t', 1))
+self.assertEqual(encode(u'\n'), (r'\n', 1))
+self.assertEqual(encode(u'\r'), (r'\r', 1))
+self.assertEqual(encode(u'\\'), (r'\\', 1))
+for b in range(32):
+if chr(b) not in '\t\n\r':
+self.assertEqual(encode(unichr(b)), ('\\x%02x' % b, 1))
+for b in range(127, 256):
+self.assertEqual(encode(unichr(b)), ('\\x%02x' % b, 1))
+self.assertEqual(encode(u'\u20ac'), (r'\u20ac', 1))
+self.assertEqual(encode(u'\U0001d120'),
+ (r'\U0001d120', len(u'\U0001d120')))
+
+def test_escape_decode(self):
+decode = codecs.unicode_escape_decode
+self.assertEqual(decode("[\\\n]"), (u"[]", 4))
+self.assertEqual(decode(r'[\"]'), (u'["]', 4))
+self.assertEqual(decode(r"[\']"), (u"[']", 4))
+self.assertEqual(decode(r"[\\]"), (ur"[\]", 4))
+self.assertEqual(decode(r"[\a]"), (u"[\x07]", 4))
+self.assertEqual(decode(r"[\b]"), (u"[\x08]", 4))
+self.assertEqual(decode(r"[\t]"), (u"[\x09]", 4))
+self.assertEqual(decode(r"[\n]"), (u"[\x0a]", 4))
+self.assertEqual(decode(r"[\v]"), (u"[\x0b]", 4))
+self.assertEqual(decode(r"[\f]"), (u"[\x0c]", 4))
+self.assertEqual(decode(r"[\r]"), (u"[\x0d]", 4))
+self.assertEqual(decode(r"[\7]"), (u"[\x07]", 4))
+self.assertEqual(decode(r"[\8]"), (ur"[\8]", 4))
+self.assertEqual(decode(r"[\78]"), (u"[\x078]", 5))
+self.assertEqual(decode(r"[\41]"), (u"[!]", 5))
+self.assertEqual(decode(r"[\418]"), (u"[!8]", 6))
+self.assertEqual(decode(r"[\101]"), (u"[A]", 6))
+self.assertEqual(decode(r"[\1010]"), (u"[A0]", 7))
+self.assertEqual(decode(r"[\x41]"), (u"[A]", 6))
+self.assertEqual(decode(r"[\x410]"), (u"[A0]", 7))
+self.assertEqual(decode(r"\u20ac"), (u"\u20ac", 6))
+self.assertEqual(decode(r"\U0001d120"), (u"\U0001d120", 10))
+for b in range(256):
+if chr(b) not in '\n"\'\\abtnvfr01234567xuUN':
+self.assertEqual(decode('\\' + chr(b)),
+ (u'\\' + unichr(b), 2))
+
+def test_decode_errors(self):
+decode = codecs.unicode_escape_decode
+for c, d in ('x', 2), ('u', 4), ('U', 4):
+for i in range(d):
+self.assertRaises(UnicodeDecodeError, decode,
+  "\\" + c + "0"*i)
+self.assertRaises(UnicodeDecodeError, decode,
+  "[\\" + c + "0"*i + "]")
+data = "[\\" + c + "0"*i + "]\\" + c + "0"*i
+self.assertEqual(decode(data, "ignore"), (u"[]", le

[issue16979] Broken error handling in codecs.unicode_escape_decode()

2013-01-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: 
http://bugs.python.org/file28752/unicode_escape_decode_error_handling-3.4.patch

___
Python tracker 

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



[issue15484] CROSS: use _PYTHON_PROJECT_BASE in distutils sysconfig

2013-01-25 Thread Roumen Petrov

Roumen Petrov added the comment:

Matthias Klose wrote:
> 2-CROSS-set-_PYTHON_PROJECT_BASE-to-current-build-dir.patch
> I'll use abs_builddir instead.
Yes after some fixes related to issue 15819 (msg173144) this is preferred.

Roumen

--

___
Python tracker 

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



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread R. David Murray

R. David Murray added the comment:

Excellent.  Thanks for testing.  And thanks for pointing out the duplicate, 
Peter.

--
assignee: ronaldoussoren -> 
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Value returned by random.random() out of valid range on 64-bit
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



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 22:27, Stefan Krah wrote:

> Then always call python with the full path. If your app is a simple
> script, t

ok, managed to install the extra packages and run the app.
Seems to work correctly now, no more random() >= 1.0

(thanks!)
.F

--

___
Python tracker 

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



[issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance

2013-01-25 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +patch
Added file: http://bugs.python.org/file28832/297b3529876a.diff

___
Python tracker 

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



[issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance

2013-01-25 Thread STINNER Victor

New submission from STINNER Victor:

I create this issue to review and track the implementation of the PEP 433: 
"Easier suppression of file descriptor inheritance"
http://www.python.org/dev/peps/pep-0433/

--
components: Interpreter Core
hgrepos: 173
messages: 180630
nosy: haypo
priority: normal
severity: normal
status: open
title: Implementation of the PEP 433: Easier suppression of file descriptor 
inheritance
type: enhancement
versions: Python 3.4

___
Python tracker 

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



[issue16980] SystemError in codecs.unicode_escape_decode()

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dcbc16afd6bc by Serhiy Storchaka in branch '3.3':
Issue #16980: Fix processing of escaped non-ascii bytes in the
http://hg.python.org/cpython/rev/dcbc16afd6bc

New changeset d8c2ce63f5a4 by Serhiy Storchaka in branch 'default':
Issue #16980: Fix processing of escaped non-ascii bytes in the
http://hg.python.org/cpython/rev/d8c2ce63f5a4

--
nosy: +python-dev

___
Python tracker 

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



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 22:27, Stefan Krah wrote:

> Then always call python with the full path. If your app is a simple
> script, then:
> 
> /tmp/usr/bin/python app.py

ok.
and how do i add extra packages to that new python version ?
e.g. i need to install
pyyam and openpyxll

(sorry for the inconvenience)
.F

--

___
Python tracker 

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



[issue16975] Broken error handling in codecs.escape_decode()

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5970c90dd8d1 by Serhiy Storchaka in branch '2.7':
Issue #16975: Fix error handling bug in the escape-decode decoder.
http://hg.python.org/cpython/rev/5970c90dd8d1

New changeset 22594c5060eb by Serhiy Storchaka in branch '3.2':
Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
http://hg.python.org/cpython/rev/22594c5060eb

New changeset 580d536cc910 by Serhiy Storchaka in branch '3.3':
Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
http://hg.python.org/cpython/rev/580d536cc910

New changeset 513b728695fc by Serhiy Storchaka in branch 'default':
Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
http://hg.python.org/cpython/rev/513b728695fc

--
nosy: +python-dev

___
Python tracker 

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



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Stefan Krah

Stefan Krah added the comment:

Floris van Manen  wrote:
> Did compile that version and it launches.
> To test with my code i do not want to have it interfere with my current 
> version.
> I remember it is possible to setup n isolated environment with pip en 
> virtualenv.
> But i never did this so far.
> Any hints / links to (simple) script explanation that could do the job?
> Or is there an even simpler way?

I wouldn't bother with virtualenvs yet. First I'd simply install python
into /tmp:

mkdir /tmp/usr
./configure --prefix=/tmp/usr/
make
make install

Then always call python with the full path. If your app is a simple
script, then:

/tmp/usr/bin/python app.py

If you have to install it:

/tmp/usr/bin/python setup.py install

--

___
Python tracker 

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



[issue16651] Find out what stdlib modules lack a pure Python implementation

2013-01-25 Thread Eric Snow

Eric Snow added the comment:

Also missing a pure-Python implementation:

collections.defaultdict (relatively trivial)
collections.deque

In the spirit of what Brett said, I found that PyPy has an implementation 
already:

  https://bitbucket.org/pypy/pypy/src/default/lib_pypy/_collections.py

Jython and IronPython do not have pure Python implentations:
  http://hg.python.org/jython/file/default/src/org/python/modules/_collections
  http://ironpython.codeplex.com/SourceControl/changeset/view/99885#1091023

--
nosy: +eric.snow

___
Python tracker 

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



[issue17035] Use new style classes in {class, static}method examples

2013-01-25 Thread Berker Peksag

New submission from Berker Peksag:

The examples in the built-in functions documentation[1] should be consistent 
and use new style classes.

[1] http://docs.python.org/2.7/library/functions.html

--
assignee: docs@python
components: Documentation
files: new-style-classes.diff
keywords: patch
messages: 180624
nosy: berker.peksag, docs@python
priority: normal
severity: normal
status: open
title: Use new style classes in {class, static}method examples
versions: Python 2.7
Added file: http://bugs.python.org/file28831/new-style-classes.diff

___
Python tracker 

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



[issue10156] Initialization of globals in unicodeobject.c

2013-01-25 Thread Stefan Krah

Stefan Krah added the comment:

Nice. I think the latest patches are commit-ready.

--

___
Python tracker 

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



[issue16235] Add python-config.sh for use during cross compilation.

2013-01-25 Thread Ray Donnelly

Ray Donnelly added the comment:

Great. My only query is whether the changes to sed will work on non-GNU sed.

It used to be like:
sed < in >out

you've now got:
sed in >out

I'm not saying it won't work, I'm not in a position to check, but I think it's 
safer to keep it as it was.

--

___
Python tracker 

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



[issue12641] Remove -mno-cygwin from distutils

2013-01-25 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue17034] Initialization of globals in stringobject.c

2013-01-25 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The patch for stringobject.c is similar to patch for unicodeobject.c in 
issue10156, but more simpler.

--
components: Interpreter Core
files: string_globals.patch
keywords: patch
messages: 180621
nosy: serhiy.storchaka, skrah
priority: normal
severity: normal
stage: patch review
status: open
title: Initialization of globals in stringobject.c
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file28830/string_globals.patch

___
Python tracker 

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



[issue11049] add tests for test.support

2013-01-25 Thread R. David Murray

R. David Murray added the comment:

Sure.  It doesn't seem likely that I'll get back to it any time soon, and if I 
do I can open a new issue.

--
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2013-01-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Issue #12973 is the one that led to the eventual fix.  Closing this as a 
duplicate.

--
resolution:  -> duplicate
status: open -> closed
superseder:  -> int_pow() implementation is incorrect

___
Python tracker 

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



[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2013-01-25 Thread Mark Dickinson

Mark Dickinson added the comment:

I believe the int_pow issue has been resolved, so this bug shouldn't show up in 
any of the current branches, regardless of which version of Clang is used.

--

___
Python tracker 

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



[issue10156] Initialization of globals in unicodeobject.c

2013-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> The 2.7 comments also apply to the 3.2 patch. Otherwise the 3.2 patch
> (without the _sre changes :) looks good to me.

Patches updated addressing new Stefan's comments. Unicode globals no longer 
reinitialized in _PyUnicode_Init(). Note that I have added a consistency check 
into the macro in 3.3+.

I hope Rietveld will accept this set.

--
Added file: http://bugs.python.org/file28826/unicode_globals-2.7_3.patch
Added file: http://bugs.python.org/file28827/unicode_globals-3.2_3.patch
Added file: http://bugs.python.org/file28828/unicode_globals-3.3_3.patch
Added file: http://bugs.python.org/file28829/unicode_globals-3.4_3.patch

___
Python tracker 

___diff -r 864b9836dae6 Objects/unicodeobject.c
--- a/Objects/unicodeobject.c   Fri Jan 25 17:55:39 2013 +0100
+++ b/Objects/unicodeobject.c   Fri Jan 25 21:34:01 2013 +0200
@@ -82,8 +82,9 @@
 
 /* --- Globals 
 
-   The globals are initialized by the _PyUnicode_Init() API and should
-   not be used before calling that API.
+NOTE: In the interpreter's initialization phase, some globals are currently
+  initialized dynamically as needed. In the process Unicode objects may
+  be created before the Unicode type is ready.
 
 */
 
@@ -93,15 +94,27 @@
 #endif
 
 /* Free list for Unicode objects */
-static PyUnicodeObject *free_list;
-static int numfree;
+static PyUnicodeObject *free_list = NULL;
+static int numfree = 0;
 
 /* The empty Unicode object is shared to improve performance. */
-static PyUnicodeObject *unicode_empty;
+static PyUnicodeObject *unicode_empty = NULL;
+
+#define _Py_RETURN_UNICODE_EMPTY()  \
+do {\
+if (unicode_empty != NULL)  \
+Py_INCREF(unicode_empty);   \
+else {  \
+unicode_empty = _PyUnicode_New(0);  \
+if (unicode_empty != NULL)  \
+Py_INCREF(unicode_empty);   \
+}   \
+return (PyObject *)unicode_empty;   \
+} while (0)
 
 /* Single character Unicode strings in the Latin-1 range are being
shared as well. */
-static PyUnicodeObject *unicode_latin1[256];
+static PyUnicodeObject *unicode_latin1[256] = {NULL};
 
 /* Default encoding to use and assume when NULL is passed as encoding
parameter; it is initialized by _PyUnicode_Init().
@@ -110,7 +123,7 @@
PyUnicode_GetDefaultEncoding() APIs to access this global.
 
 */
-static char unicode_default_encoding[100];
+static char unicode_default_encoding[100 + 1] = "ascii";
 
 /* Fast detection of the most frequent whitespace characters */
 const unsigned char _Py_ascii_whitespace[] = {
@@ -204,7 +217,7 @@
 
 #define BLOOM_MASK unsigned long
 
-static BLOOM_MASK bloom_linebreak;
+static BLOOM_MASK bloom_linebreak = ~(BLOOM_MASK)0;
 
 #define BLOOM_ADD(mask, ch) ((mask |= (1UL << ((ch) & (BLOOM_WIDTH - 1)
 #define BLOOM(mask, ch) ((mask &  (1UL << ((ch) & (BLOOM_WIDTH - 1)
@@ -448,10 +461,8 @@
 if (u != NULL) {
 
 /* Optimization for empty strings */
-if (size == 0 && unicode_empty != NULL) {
-Py_INCREF(unicode_empty);
-return (PyObject *)unicode_empty;
-}
+if (size == 0)
+_Py_RETURN_UNICODE_EMPTY();
 
 /* Single character Unicode objects in the Latin-1 range are
shared when using this constructor */
@@ -497,10 +508,8 @@
 if (u != NULL) {
 
 /* Optimization for empty strings */
-if (size == 0 && unicode_empty != NULL) {
-Py_INCREF(unicode_empty);
-return (PyObject *)unicode_empty;
-}
+if (size == 0)
+_Py_RETURN_UNICODE_EMPTY();
 
 /* Single characters are shared when using this constructor.
Restrict to ASCII, since the input must be UTF-8. */
@@ -1162,13 +1171,10 @@
 }
 
 /* Convert to Unicode */
-if (len == 0) {
-Py_INCREF(unicode_empty);
-v = (PyObject *)unicode_empty;
-}
-else
-v = PyUnicode_Decode(s, len, encoding, errors);
-
+if (len == 0)
+_Py_RETURN_UNICODE_EMPTY();
+
+v = PyUnicode_Decode(s, len, encoding, errors);
 return v;
 
   onError:
@@ -1381,7 +1387,7 @@
 Py_DECREF(v);
 strncpy(unicode_default_encoding,
 encoding,
-sizeof(unicode_default_encoding));
+sizeof(unicode_default_encoding) - 1);
 return 0;
 
   onError:
@@ -8850,8 +8856,6 @@
 
 void _PyUnicode_Init(void)
 {
-int i;
-
 /* XXX - move this array to unicodectype.c ? */
 Py_UNICODE linebreak[] = {
 0x000A, /* LINE FEED */
@@ -8865,15 +8869,12 @@
 };
 

[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 19:35, Stefan Krah wrote:

> 
> Stefan Krah added the comment:
> 
> Floris van Manen  wrote:
>> From what i understand is that issue14591 was able to reproduce the same 
>> feature as it seems related to the jumpahead()  malfunctioning.
> 
> I'm also quite sure that it's the same issue. It would be nice to have
> confirmation though. If you have the opportunity to compile the tip of
> the 2.7 branch (where #14591 is fixed), get one of these:
> 
> http://hg.python.org/cpython/archive/864b9836dae6.tar.gz
> http://hg.python.org/cpython/archive/864b9836dae6.zip
> 

Did compile that version and it launches.
To test with my code i do not want to have it interfere with my current version.
I remember it is possible to setup n isolated environment with pip en 
virtualenv.
But i never did this so far.
Any hints / links to (simple) script explanation that could do the job?
Or is there an even simpler way?

.F

--

___
Python tracker 

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



[issue17032] Misleading error message: global name 'X' is not defined

2013-01-25 Thread Éric Araujo

Éric Araujo added the comment:

Dropping global sounds good.  (Let’s not replace name with variable though!)

--
nosy: +eric.araujo
versions:  -Python 3.5

___
Python tracker 

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



[issue17033] RPM spec file has old config_binsuffix value

2013-01-25 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +ncoghlan
stage:  -> patch review
versions: +Python 3.2, Python 3.4

___
Python tracker 

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



[issue13047] imp.find_module("") and imp.find_module(".")

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue13048] Handling of paths in first argument of imp.find_module()

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


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



[issue11676] Improve imp.load_module and submodules doc

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

imp.find_module() is now deprecated, so not worrying about adding more details 
to the docs for the function.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue10588] imp.find_module raises unexpected SyntaxError

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

imp.find_module() is now documented as deprecated, so changing the mode that 
files are opened in would change backwards-compatibility but wouldn't be worth 
it.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-25 Thread Ezio Melotti

Ezio Melotti added the comment:

It's not necessary to include the commit message and/or use "hg export" though, 
since we don't import patches directly and we write the message ourself when we 
commit.

> (... is there a better way to upload three files?)

You need to upload them individually and "submit changes" 3 times, but it's not 
necessary to write a comment every time.  Also, unless the 3 patches are 
independent, it's usually better to upload a single diff that includes all the 
necessary changes.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue3329] API for setting the memory allocator used by Python

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue12693] test.support.transient_internet prints to stderr when verbose is false

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-25 Thread Éric Araujo

Éric Araujo added the comment:

> I'm not sure how to make hg include a commit message in the patch...
See hg help export.

(In Mercurial, the only objects are changesets; hg log trawls through commit 
messages (with options to see short text, full text, diff), hg diff only shows 
diff, and hg export is the command to output full changesets.)

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon
status: pending -> open

___
Python tracker 

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



[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

Is this still a problem in clang 3.2?

--
status: open -> pending

___
Python tracker 

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



[issue11049] add tests for test.support

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon
status: pending -> open

___
Python tracker 

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



[issue11049] add tests for test.support

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

Can this be closed, David?

--
status: open -> pending

___
Python tracker 

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



[issue12648] Wrong import module search order on Windows

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue12652] Keep test.support docs out of the global docs index

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue12583] More detailed ImportError messages

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

Closing as circular imports are not as much of a problem in Python 3.3, 
ImportError now has informational attributes, and namespace packages took care 
of the usefulness of ImportWarning.

--
assignee:  -> brett.cannon
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue762963] timemodule.c: Python loses current timezone

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue4180] warnings.simplefilter("always") does not make warnings always show up

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue3099] On windows, "import nul" always succeed

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue16972] Useless function call in site.py

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the bug report, Kirill!

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



[issue16972] Useless function call in site.py

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2c0197c95ec6 by Brett Cannon in branch 'default':
Issue #16972: Have site.addpackage() consider known paths even when
http://hg.python.org/cpython/rev/2c0197c95ec6

--
nosy: +python-dev

___
Python tracker 

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



[issue15031] Split .pyc parsing from module loading

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

Nick's suggestions done in changeset 792810303239 .

--
status: open -> closed

___
Python tracker 

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



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Stefan Krah

Stefan Krah added the comment:

Floris van Manen  wrote:
> From what i understand is that issue14591 was able to reproduce the same 
> feature as it seems related to the jumpahead()  malfunctioning.

I'm also quite sure that it's the same issue. It would be nice to have
confirmation though. If you have the opportunity to compile the tip of
the 2.7 branch (where #14591 is fixed), get one of these:

http://hg.python.org/cpython/archive/864b9836dae6.tar.gz
http://hg.python.org/cpython/archive/864b9836dae6.zip

--

___
Python tracker 

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



[issue9290] IDLE and Command line present different behavior for sys.stdin

2013-01-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 11:07, Stefan Krah wrote:

> 
> Stefan Krah added the comment:
> 
>> It is in the combination with jumpahead(), getstate(), setstate() that 
>> you'll experience random() to produce values >= 1.0
> 
> Let me reiterate what David said: Can you post a self-contained program
> that exhibits the issue?

My program is sort of complex in the meaning of multiple processes interleaving 
and interacting via a priorityqueue.
Each individual steps through multiple classes which all should stay 
independent.
No simple short snippet.
>From what i understand is that issue14591 was able to reproduce the same 
>feature as it seems related to the jumpahead()  malfunctioning.

.F

--

___
Python tracker 

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



[issue16235] Add python-config.sh for use during cross compilation.

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

so here is what I intend to commit.

 - --help now does exit with 0 (same as the python script)
 - removed the abi safety check (always compares the same
   two strings)
 - build the script for the build target, so that it can be
   checked before installing it.
 - install the old script in $(LIBPL). Maybe we can remove
   this later, or add this functionality into sysconfig.

--
Added file: http://bugs.python.org/file28825/0001-add-python-config-sh.patch

___
Python tracker 

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



[issue17031] fix running regen in cross builds

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ff5cf42136b3 by doko in branch '3.3':
- Issue #17031: Fix running regen in cross builds.
http://hg.python.org/cpython/rev/ff5cf42136b3

New changeset 1942987921e9 by doko in branch 'default':
- Issue #17031: Fix running regen in cross builds.
http://hg.python.org/cpython/rev/1942987921e9

--
nosy: +python-dev

___
Python tracker 

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



[issue17031] fix running regen in cross builds

2013-01-25 Thread Matthias Klose

Changes by Matthias Klose :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17027] support for drag and drop of files to tkinter application

2013-01-25 Thread Ned Deily

Ned Deily added the comment:

A feature like drag-and-drop seems like something that needs to be provided at 
either the application level or within Tk or both.  While there is apparently 
no built-in Tk support for drag-and-drop, it appears to be possible to use a Tk 
extension that provides that capability and that will work with Tkinter.  See, 
for example, 
http://stackoverflow.com/questions/14267900/python-drag-and-drop-explorer-files-to-tkinter-entry-widget

--
nosy: +ned.deily
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17028] launcher does not read shebang line when arguments are given

2013-01-25 Thread Thomas Heller

Changes by Thomas Heller :


--
title: launcher -> launcher does not read shebang line when arguments are given

___
Python tracker 

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



[issue17031] fix running regen in cross builds

2013-01-25 Thread Éric Araujo

Éric Araujo added the comment:

Not an autotools expert, but patch looks good.  Apparently 3.3 is still open to 
such changes.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue1602133] non-framework python fails to define os.environ properly

2013-01-25 Thread Ronald Oussoren

Changes by Ronald Oussoren :


--
stage: commit review -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue1602133] non-framework python fails to define os.environ properly

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 864b9836dae6 by Ronald Oussoren in branch '2.7':
Issue #1602133: 'environ' is not really available with shared libraries on OSX
http://hg.python.org/cpython/rev/864b9836dae6

New changeset ea9fd9c9c677 by Ronald Oussoren in branch '3.2':
Issue #1602133: 'environ' is not really available with shared libraries on OSX
http://hg.python.org/cpython/rev/ea9fd9c9c677

New changeset 106d1d79c853 by Ronald Oussoren in branch '3.3':
Issue #1602133: 'environ' is not really available with shared libraries on OSX 
(merge from 3.2)
http://hg.python.org/cpython/rev/106d1d79c853

New changeset b41e3e2bd4cc by Ronald Oussoren in branch 'default':
Issue #1602133: 'environ' is not really available with shared libraries on OSX 
(merge from 3.3)
http://hg.python.org/cpython/rev/b41e3e2bd4cc

--
nosy: +python-dev

___
Python tracker 

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



[issue17033] RPM spec file has old config_binsuffix value

2013-01-25 Thread Taavi Burns

Taavi Burns added the comment:

The diff against 3.3.

--
Added file: http://bugs.python.org/file28824/python-3.3.spec.diff

___
Python tracker 

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



[issue17033] RPM spec file has old config_binsuffix value

2013-01-25 Thread Taavi Burns

New submission from Taavi Burns:

Looking at the Misc/RPM/python-X.X.spec files, they seem to be slightly out of 
date. Near the top of the file is a config_binsuffix configuration setting that 
is "2.6" for both the 2.7 and 3.3 branches!

I suspect that it should be updated with the version and libvers variables a 
bit later in the file.

--
components: Build
files: python-2.7.spec.diff
keywords: patch
messages: 180596
nosy: taavi-burns
priority: normal
severity: normal
status: open
title: RPM spec file has old config_binsuffix value
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file28823/python-2.7.spec.diff

___
Python tracker 

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



[issue3871] cross and native build of python for mingw* hosts

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

some random comments about py3k-20121004-MINGW.patch:

- Modules/_ctypes/libffi_msvc/win32.S
  Please can you get rid of libffi_msvc and use libffi?
  afaics, libffi has support for mingw32.

- there seem to be chunks which are unrelated to mingw, like:

@@ -830,15 +926,18 @@ class PyBuildExt(build_ext):
 if have_usable_openssl:
 # The _hashlib module wraps optimized implementations
 # of hash functions from the OpenSSL library.
+# NOTE: _hashlib require only OpenSSL crypto library !
 exts.append( Extension('_hashlib', ['_hashopenssl.c'],
depends = ['hashlib.h'],
include_dirs = ssl_incs,
library_dirs = ssl_libs,
-   libraries = ['ssl', 'crypto']) )
+   libraries = ['crypto']) )

please file separate issues.


- why setup_info.in. looks like something which could be done with 
get_config_var.

- why re-reading files in setup.py, and grepping these for config options?


I think the patch would benefit from splitting it up into several 
self-contained chunks.

did you try to do builds for windows and linux after this patch was applied?

--

___
Python tracker 

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



[issue3754] cross-compilation support for python build

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

about py3k-20121004-CROSS.tgz:

- committed 0001-CROSS-fix-typo-in-thread-AC_CACHE_VAL.patch

- 0002-CROSS-restore-graminit.-to-source-directory.patch
  is this necessary?  Assuming that you have correct time
  stamps, this is something which usually is not built during
  a cross build.

  Can we just have a shell script which touches some files
  so that you can cross-build even from the repository without
  building pgen?

  Do the release managers have such a script which is run
  when building a release?

- 0003-CROSS-restore-importlib-header-to-source-directory-a.patch

  Same as for 0002, using correct timestamps. The EXEEXT is a
  different issue. However I'm not sure what to use, EXEEXT,
  or BUILDEXEEXT.

- 0004-CROSS-restore-AST-to-source-directory.patch

  Same as for 0002. Btw, does this fail with a native out-of-tree
  build too?

- 0005-CROSS-revert-issue13150-i.e.-python-solution-with-_s.patch
  A comment like "The fix for issue #13150 is bogus and break
  everything" might not the best way to convince maintainers ...

  This works for me, and IMO should be dropped, or please explain
  why this doesn't work for you.

- 0006-CROSS-initialise-include-and-library-paths.patch
  Afaics, a similar patch is now applied. Can be dropped.

- 0007-CROSS-set-_PYTHON_PROJECT_BASE-to-current-build-dir.patch
  Applied.

- 0008-CROSS-use-_PYTHON_PROJECT_BASE-in-distutils-sysconfi.patch
  Applied.

- 0009-CROSS-pass-all-top-configure-arguments-to-libffi-con.patch

  Why is it needed to pass all configure args?

- 0010-CROSS-warn-only-if-readelf-is-not-in-host-triplet-fo.patch

  Why is this needed just for readelf? If you do have a cross
  toolchain installed, then this should be available with
  the triplet name, same as for gcc, as, ...

- 0011-CROSS-append-gcc-library-search-paths-instead-to-pre.patch

  Looks ok. Could you mention where this does make a difference,
  or do you just want to keep the search order as defined by
  the compiler?

- 0012-CROSS-avoid-ncursesw-include-path-hack.patch

  This would break cross-building in a multiarch environment.
  Maybe we need a --with-curses-incdir=<> option.

- 0013-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch
  This should be a separate issue. Not cross specific.

- 0014-CROSS-use-build-directory-as-root-for-regression-tes.patch
  why is this necessary?

- 0015-CROSS-test-tools-has-to-depend-only-from-location-of.patch
  Looks ok, but not cross specific. Could you file a separate issue?

- 0016-CROSS-reload-may-fail-with-operation-on-closed-file-.patch
  Looks like a separate issue.

--

___
Python tracker 

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



[issue15484] CROSS: use _PYTHON_PROJECT_BASE in distutils sysconfig

2013-01-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> fixed
stage:  -> committed/rejected
versions: +Python 3.4

___
Python tracker 

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



[issue16292] Cross compilation fixes (general)

2013-01-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> fixed
stage:  -> committed/rejected
versions: +Python 3.3

___
Python tracker 

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



[issue17032] Misleading error message: global name 'X' is not defined

2013-01-25 Thread Ramchandra Apte

Ramchandra Apte added the comment:

+1 on Ezio's idea.

--
nosy: +ramchandra.apte

___
Python tracker 

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



[issue17032] Misleading error message: global name 'X' is not defined

2013-01-25 Thread Ezio Melotti

Ezio Melotti added the comment:

Maybe we could just drop the 'global'.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue17032] Misleading error message: global name 'X' is not defined

2013-01-25 Thread Ram Rachum

New submission from Ram Rachum:

Every single time I see the error message `global name 'X' is not defined` I 
say to myself, "ah yeah, I mistyped a variable name."

But then it occurred to me, why should I have to do this mental translation 
from "global name not defined" to "I mistyped a variable name"?

Now, I'm not asking for the error message to say "You mistyped a variable 
name", because that goes too much into second-guessing the user. But can we at 
least drop the reference to a global name? I understand that Python first 
searches the local namespace, and only then in the global namespace, and if the 
name isn't found there then an error is raised. But that doesn't mean that the 
error message should just assume that the variable is supposed to be global. 
It's misleading to say that a variable is global when it's in fact local.

I think that the error message should just say `Variable 'X' not defined`. 
Maybe add a suggestion `(Typo?)` at the end.


Example:

>>> def f():
... meow = 0
... return meoow
...
>>> f()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 3, in f
NameError: global name 'meoow' is not defined

I'd make the error message:

NameError: Variable 'meoow' is not defined

--
components: Interpreter Core
messages: 180591
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Misleading error message: global name 'X' is not defined
type: behavior
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue3754] cross-compilation support for python build

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 11a18263ceb7 by doko in branch '2.7':
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
http://hg.python.org/cpython/rev/11a18263ceb7

New changeset e28b30e6eee6 by doko in branch '3.2':
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
http://hg.python.org/cpython/rev/e28b30e6eee6

New changeset 5464a534e7bd by doko in branch '3.3':
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
http://hg.python.org/cpython/rev/5464a534e7bd

New changeset ee48728e3695 by doko in branch 'default':
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
http://hg.python.org/cpython/rev/ee48728e3695

--

___
Python tracker 

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



[issue8478] tokenize.untokenize first token missing failure case

2013-01-25 Thread Thomas Kluyver

Thomas Kluyver added the comment:

#16224 appears to be a duplicate.

There seem to be several quite major issues with untokenize - see also #12691 - 
with patches made to fix them. Is there anything I can do to help push these 
forwards?

--

___
Python tracker 

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



[issue16224] tokenize.untokenize() misbehaves when moved to "compatiblity mode"

2013-01-25 Thread Thomas Kluyver

Thomas Kluyver added the comment:

I think this is a duplicate of #8478.

--
nosy: +takluyver

___
Python tracker 

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



[issue9290] IDLE and Command line present different behavior for sys.stdin

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset def4cd7e0a9f by Serhiy Storchaka in branch '2.7':
Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
http://hg.python.org/cpython/rev/def4cd7e0a9f

New changeset 0d26f3aa7a8f by Serhiy Storchaka in branch '3.2':
Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
http://hg.python.org/cpython/rev/0d26f3aa7a8f

New changeset 9dfbd65d5041 by Serhiy Storchaka in branch '3.3':
Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
http://hg.python.org/cpython/rev/9dfbd65d5041

New changeset 458b36fb12bc by Serhiy Storchaka in branch 'default':
Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
http://hg.python.org/cpython/rev/458b36fb12bc

--
nosy: +python-dev

___
Python tracker 

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



[issue17031] fix running regen in cross builds

2013-01-25 Thread Matthias Klose

New submission from Matthias Klose:

currently regen calls the python interpreter for the host, not the build 
machine. You can't directly use BUILD_FOR_PYTHON, because this one uses 
./python explicitly, so use BUILDPYTHON instead.

I'd like to see this for 3.3 and the trunk.

--
assignee: doko
components: Cross-Build
files: regen.diff
keywords: needs review, patch
messages: 180588
nosy: doko
priority: normal
severity: normal
status: open
title: fix running regen in cross builds
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28822/regen.diff

___
Python tracker 

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



[issue15483] CROSS: initialise include and library paths in setup.py

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

I don't think this one is still necessary. can it be closed?

--
nosy: +doko

___
Python tracker 

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



[issue10782] Not possible to cross-compile due to poor detection of %lld support in printf

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

in 3.3 and later, the test defaults to no when cross-building. If gcc is used 
for the cross build, then a compile test is used. 

it is usually needed to provide some values in a CONFIG_SITE file. See autoconf 
for the details.

closing the issue.

--
nosy: +doko
status: languishing -> closed

___
Python tracker 

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



[issue3718] environment variable MACHDEP and python build system

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

the change to the configure script looks ok. however you could change the 
README too.

It looks like the changes to the Makefile.pre.in are already applied.

--
nosy: +doko

___
Python tracker 

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



[issue17030] strange import visibility

2013-01-25 Thread Stephan

Stephan added the comment:

Thanks! I was not aware of this yet.

--

___
Python tracker 

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



[issue17029] h2py.py: search the multiarch include dir if it does exist

2013-01-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo

___
Python tracker 

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



[issue16292] Cross compilation fixes (general)

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

updated the comment, the fixes for the duplicate issues are checked in.

--
status: open -> closed

___
Python tracker 

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



[issue16292] Cross compilation fixes (general)

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4c97d2d464ad by doko in branch '3.3':
- Issue #16292: Improve a comment for cross building in configure.ac
http://hg.python.org/cpython/rev/4c97d2d464ad

New changeset 4feff8c8250b by doko in branch 'default':
- Issue #16292: Improve a comment for cross building in configure.ac
http://hg.python.org/cpython/rev/4feff8c8250b

--
nosy: +python-dev

___
Python tracker 

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



  1   2   >