[issue7171] Add inet_ntop and inet_pton support for Windows

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto ishim...@gembook.org added the comment:

Implementation of inet_pton and inet_ntop by WSAAddressToStringA and
WSAStringToAddressA for Windows.

Conversion of IPv6 address might fail if IPv6 is 
not installed.

Tested on Windows XP SP3 and Windows7.

--
keywords: +patch
nosy: +ishimoto
Added file: http://bugs.python.org/file26392/issue7171.patch

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



[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

2012-07-16 Thread Tomi Pieviläinen

Tomi Pieviläinen tomi.pievilainen+launch...@iki.fi added the comment:

On Sat, Jul 14, 2012 at 12:44:46PM +, Éric Araujo wrote:
 
 Éric Araujo mer...@netwok.org added the comment:
 
 How did you configure and build?  If you ran make as root it may explain this.

Indeed I did do it as root for all steps. The umask for root was 022,
however.

--

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



[issue15337] The cmd module incorrectly lists help as an undocumented command

2012-07-16 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
versions:  -Python 3.2, Python 3.3

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



[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-07-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset de229dde486b by Gregory P. Smith in branch '3.2':
Fixes Issue #14635: telnetlib will use poll() rather than select() when possible
http://hg.python.org/cpython/rev/de229dde486b

New changeset 558e5ed678c3 by Gregory P. Smith in branch 'default':
Fixes Issue #14635: telnetlib will use poll() rather than select() when possible
http://hg.python.org/cpython/rev/558e5ed678c3

--

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



[issue14790] use packaging in setup.py

2012-07-16 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

At the moment, it seems that this just won't happen. If a new attempt is made 
to integrate packaging with Python, this may or may not become an issue (e.g. 
whoever is doing the integration the next time might adapt setup.py from the 
beginning).

So closing this as won't fix.

--
priority: deferred blocker - 
resolution:  - wont fix
status: open - closed

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



[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-07-16 Thread Gregory P. Smith

Changes by Gregory P. Smith g...@krypto.org:


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

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



[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-16 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

+1 for backport.  There's no benefit to leaving ambiguity floating about, nor 
was there ever any intention for the behavior to have been different.

--

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



[issue12428] functools test coverage

2012-07-16 Thread Brian Thorne

Changes by Brian Thorne hardb...@gmail.com:


--
nosy: +jackdied

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



[issue15337] The cmd module incorrectly lists help as an undocumented command

2012-07-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 076ae30e5dd0 by Raymond Hettinger in branch '2.7':
Issue 15337: help() shown as undocumented
http://hg.python.org/cpython/rev/076ae30e5dd0

--
nosy: +python-dev

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



[issue15337] The cmd module incorrectly lists help as an undocumented command

2012-07-16 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue12978] Figure out extended attributes on BSDs

2012-07-16 Thread koobs

koobs koobs.free...@gmail.com added the comment:

And to clarify the no-follow-symlinks case on FreeBSD:

extattr_{get,set,list,delete}_link system calls behave in the same way as 
their _file counterparts, except that they do not follow sym-links. as per the 
man page.

--

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



[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes

2012-07-16 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

I agree with Meador that this should be fixed upstream first.
There's a thread here on libffi-discuss, with a patch but no
conclusive answer:


http://sourceware.org/ml/libffi-discuss/2012/msg00168.html

--

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



[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes

2012-07-16 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Ah, forget that: Alex has apparently already tested that patch.

--

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



[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Richard Oudkerk

New submission from Richard Oudkerk shibt...@gmail.com:

With unix, and a source build, sysconfig.get_config_var('srcdir') and 
sysconfig.get_path('include') misbehave:

  user@mint-vm ~/Repos/cpython $ cd /
  user@mint-vm / $ ~/Repos/cpython/python 
  Python 3.3.0b1 (default:671894ae19a2, Jul 16 2012, 10:43:27) 
  [GCC 4.5.2] on linux
  Type help, copyright, credits or license for more information.
   import sysconfig
   sysconfig.get_config_var('srcdir')
  '/'
   sysconfig.get_path('include')
  '//Include'

The problem seems to be the else clause of

if 'srcdir' not in _CONFIG_VARS:
_CONFIG_VARS['srcdir'] = _PROJECT_BASE
else:
_CONFIG_VARS['srcdir'] = _safe_realpath(_CONFIG_VARS['srcdir'])

The else clause (in slightly modified form) was introduced in 356d0ea8ea34, and 
it turns a relative path into an absolute path, using the current working 
directory as a base.

For me, simply removing the line allows the absolute path to be calculated 
correctly a few lines later on.

I don't know what problem 356d0ea8ea34 was intended to fix.

--
messages: 165581
nosy: sbt
priority: normal
severity: normal
stage: needs patch
status: open
title: sysconfig confused by relative paths
type: behavior

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



[issue15170] Fix 64-bit building for buildbot scripts (2.7)

2012-07-16 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Closing, since all 2.7 buildbots compile.

--
resolution:  - fixed
stage:  - committed/rejected

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



[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Anyway, I am hitting another problem now -- _freeze_importlib is *not* 
 idempotent.

What do you mean with idempotent? Deterministic?

--

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



[issue15170] Fix 64-bit building for buildbot scripts (2.7)

2012-07-16 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
status: open - closed

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



[issue15171] Fix 64-bit building for buildbot scripts (3.2)

2012-07-16 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

David, do you have an idea why the XP-4 3.2 machine fails the compile?
I can't reproduce this and I don't know if it's related to
334ff92a8483 or 177f93f0f5b9.

--
nosy: +db3l

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



[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +ronaldoussoren

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



[issue15365] Traceback reporting can fail if IO cannot be imported

2012-07-16 Thread Kristján Valur Jónsson

New submission from Kristján Valur Jónsson krist...@ccpgames.com:

Reporting an error early in the python startup, before importing is properly 
initialized, can be tricky.
For example, here:

if (PyImport_ImportFrozenModule(_frozen_importlib) = 0) {
  Py_FatalError(Py_Initialize: can't import _frozen_importlib);

The problem is, that _Py_DisplaySourceLine will set an exception because it 
cannot import the io module.  And this will terminate the traceback output.

The attached patch aims to rectify it by ignoring errors from this api in 
traceback.c

--
components: Interpreter Core
files: traceback.patch
keywords: patch
messages: 165585
nosy: kristjan.jonsson
priority: normal
severity: normal
status: open
title: Traceback reporting can fail if IO cannot be imported
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file26393/traceback.patch

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto ishim...@gembook.org added the comment:

Cleaned up the patch.

Gennadiy added a test of shutil.move(), but SameFileError 
will be raised only if shutil.copy() was called. 

Am I missing something?

--
nosy: +ishimoto
Added file: http://bugs.python.org/file26394/issue1492704_new.patch

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



[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes

2012-07-16 Thread Alex Leach

Alex Leach beamesle...@gmail.com added the comment:

I hadn't tried the `long long` substitution before, but unfortunately I don't 
think that simple fix quite does the trick.

I just checked out libffi from git, and made the following patch:-
#$ diff -u ffi64.c ffi64.c.orig 

--- ffi64.c 2012-07-16 11:38:44.237255615 +0100
+++ ffi64.c.orig2012-07-16 11:38:34.681045084 +0100
@@ -38,7 +38,7 @@
 #define MAX_SSE_REGS 8

 #ifdef __INTEL_COMPILER
-#define UINT128 long long
+#define UINT128 __m128
 #else
 #define UINT128 __int128_t
 #endif

It compiles fine, but `make check` returns a lot of FAIL's, and a quite a few 
of the tests timeout. e.g.
FAIL: libffi.special/unwindtest.cc  -shared-libgcc -lstdc++ execution test
WARNING: program timed out.

It's probably also worth mentioning that I'm now using icc version 12.1.4

Cheers,
Alex

On Monday 16 Jul 2012 09:53:36 Stefan Krah wrote:
  Stefan Krah stefan-use...@bytereef.org added the comment:
 
 Ah, forget that: Alex has apparently already tested that patch.
 
 --
 
 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue4130
 ___

--

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



[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-16 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

The new test fails on the Fedora bot:

http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/2881/steps/test/logs/stdio

==
FAIL: test_copyxattr (test.test_shutil.TestShutil)
--
Traceback (most recent call last):
  File 
/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/test/test_shutil.py, line 
420, in test_copyxattr
self.assertEqual(os.listxattr(src), ['user.the_value'])
AssertionError: Lists differ: ['security.selinux', 'user.the... != 
['user.the_value']

First differing element 0:
security.selinux
user.the_value

First list contains 1 additional elements.
First extra element 1:
user.the_value

- ['security.selinux', 'user.the_value']
+ ['user.the_value']

--
nosy: +skrah

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



[issue15366] venv assumes header files in sys._home + '/Include'

2012-07-16 Thread Richard Oudkerk

New submission from Richard Oudkerk shibt...@gmail.com:

For Unix I follow the practice suggested in README of running configure from a 
subdir of the main python directory, eg

mkdir release
cd release
../configure
make

But if I create a venv then I cannot use it to compile C extensions because the 
include dirs are wrong, eg

running build
running build_ext
building 'demo' extension
gcc -pthread -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -fPIC -I/home/user/Repos/cpython/release/Include 
-I/home/user/Repos/cpython/release -c demo.c -o build/temp.linux-i686-3.3/demo.o
demo.c:1:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

The problem seems to be that distutils.sysconfig.get_python_inc() assumes that 
if sys._home is set (as it is in a virtual env) then the standard header files 
can be found in sys._home + '/Include'.

But for my venv this is wrong, since sys._home is 
/home/user/Repos/cpython/release and 
/home/user/Repos/cpython/release/Include is empty.  Instead get_python_inc() 
should return /home/user/Repos/cpython/Include.

BTW, a seperate issue seems to be that ${venv}/include is not added to the list 
of include dirs used when compiling.

--
components: Library (Lib)
messages: 165589
nosy: sbt, vinay.sajip
priority: normal
severity: normal
stage: needs patch
status: open
title: venv assumes header files in sys._home + '/Include'
type: behavior
versions: Python 3.3

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



[issue15367] build_ext in a venv on Windows assumes pyconfig.h in sys.exec_prefix + '\PC'

2012-07-16 Thread Richard Oudkerk

New submission from Richard Oudkerk shibt...@gmail.com:

On Windows I can't use a source build of Python to create a venv which will 
compile C extensions because pyconfig.h cannot be found.  For example

running build
running build_ext
building 'demo' extension
creating build
creating build\temp.win32-3.3
creating build\temp.win32-3.3\Release
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c 
/nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Repos\cpython\include 
-IC:\Users\oudkerk\myenv\PC /Tcdemo.c /Fobuild\temp.win32-3.3\Release\demo.obj
demo.c
C:\Repos\cpython\include\Python.h(8) : fatal error C1083: Cannot open 
include file: 'pyconfig.h': No such file or directory
error: command 'c:\Program Files (x86)\Microsoft Visual Studio 
10.0\VC\BIN\cl.exe' failed with exit status 2

The problem seems to be with the following line in 
distutils/command/build_ext.py:

self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC'))

Inside a venv, sys.exec_prefix is the venv directory.

--
messages: 165590
nosy: sbt, vinay.sajip
priority: normal
severity: normal
stage: needs patch
status: open
title: build_ext in a venv on Windows assumes pyconfig.h in sys.exec_prefix + 
'\PC'
type: behavior
versions: Python 3.3

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



[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-16 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

You can’t just compare the xattr because some (like security.*) can be
only copied as root. IIRC they come from SELinux.

--

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



[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Le lundi 16 juillet 2012 à 05:42 +, Meador Inge a écrit :
 The order of 'co_cellvars', 'co_varnames', and 'co_freevars' can be
 different from compile to compile, thus the bytecode can be different
 from compile to compile (I am not sure if this is worth fixing).

I don't know, but you could open an issue just for the record.
People may be surprised if bytecode generation isn't deterministic.

--

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +hynek

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



[issue15367] build_ext in a venv on Windows assumes pyconfig.h in sys.exec_prefix + '\PC'

2012-07-16 Thread Richard Oudkerk

Richard Oudkerk shibt...@gmail.com added the comment:

The attached patch works for me.

--
keywords: +patch
Added file: http://bugs.python.org/file26395/build_ext.patch

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



[issue15307] Patch for --symlink support in pyvenv with framework python

2012-07-16 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

The test failure in test_osx_env is in itself fairly harmless because 
PYTHONEXECUTABLE is only used to ensure IDLE.app works correct, and IDLE.app 
doesn't use the pythonw executable and hence won't hit the code that 
special-cases the venv location.

That said, the failure should be removed and points to a real issue in my 
patch: with my patch calculate_path replaces the value set by Py_SetProgramName 
and that is a real problem that could break 3th-party code without a good 
reason.

I've attached v5 of the patch, this fixes the test_osx_env failure by moving 
the the code that uses __PYVENV_LAUNCHER__ to main.c (where Py_SetProgramName 
is called)

--
Added file: http://bugs.python.org/file26396/venv-symlinks-v6.txt

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



[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-16 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

On Mon, Jul 16, 2012 at 5:20 AM, Antoine Pitrou rep...@bugs.python.org wrote:

 Anyway, I am hitting another problem now -- _freeze_importlib is *not* 
 idempotent.

 What do you mean with idempotent? Deterministic?

Whoops, yeah, deterministic.  I got mixed up with my terminology.

--

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



[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Meador Inge

New submission from Meador Inge mead...@gmail.com:

Consider this small example (you might have to run sample program multiple 
times to see a difference):

$ cat dis-closure.py
import dis

def adder(a, b):
def add():
return a + b
return add

print(dis.dis(adder(1, 2).__code__))

$  ./python.exe dis-closure.py
  5   0 LOAD_DEREF   0 (a) 
  3 LOAD_DEREF   1 (b) 
  6 BINARY_ADD   
  7 RETURN_VALUE 
None
$  ./python.exe dis-closure.py
  5   0 LOAD_DEREF   1 (a) 
  3 LOAD_DEREF   0 (b) 
  6 BINARY_ADD   
  7 RETURN_VALUE 
None

The order of 'co_cellvars' and 'co_freevars' can be different from compile to 
compile, thus the bytecode can be different from compile to compile.

This is due to the fact that these variable sets are managed with hashes and
the ordering may come out different when the names in the hashes are given
indexes (via 'dictbytype' in 'compile.c').

I am not sure if these are the only areas that causes bytecode generation
to be non-deterministic.  I found this behavior surprising.

--
components: Interpreter Core
messages: 165596
nosy: meador.inge
priority: normal
severity: normal
stage: needs patch
status: open
title: bytecode generation is not deterministic
type: behavior
versions: Python 3.3

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



[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-16 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

On Mon, Jul 16, 2012 at 7:13 AM, Antoine Pitrou rep...@bugs.python.org wrote:

 I don't know, but you could open an issue just for the record.
 People may be surprised if bytecode generation isn't deterministic.

Yeah, I was somewhat surprised and it took some digging to figure
out exactly what was changing.  Opened issue15368 to track this.

--

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



[issue15366] venv assumes header files in sys._home + '/Include'

2012-07-16 Thread Richard Oudkerk

Richard Oudkerk shibt...@gmail.com added the comment:

The attached patch seems to fix the problem.

--
keywords: +patch
Added file: http://bugs.python.org/file26397/distutils-sysconfig.patch

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks.  Can you clarify what behavior changed compared to the previous patch?  
From the doc it looks like shutil.move now always raises SameFileError, whereas 
the previous patch said that on Unix it depended on the semantics of os.rename.

The patch has some very minor issues like extraneous whitespace in the docs, 
but they can be fixed by the person committing.

--
assignee: eric.araujo - 
keywords: +needs review
stage: test needed - patch review
versions: +Python 3.4 -Python 3.3

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



[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

I might come to regret asking this, but so what? Is this actually causing you 
issues, or are you literally just finding this behavior surprising and that's 
it? I mean we could simply sort the tuples, but I don't know what kind of 
performance hit that would cause.

--
nosy: +brett.cannon

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



[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

On Mon, Jul 16, 2012 at 8:11 AM, Brett Cannon rep...@bugs.python.org wrote:

 I might come to regret asking this, but so what? Is this actually causing you 
 issues,
 or are you literally just finding this behavior surprising and that's it?

I noticed it in the context of working on issue15352.  There are still
a few issue in the
build system where 'importlib.h' isn't regenerated when it needs to be
(e.g. when
the marshaling code is changed).  When investigating that issue I noticed that
trivial changes (e.g. `touch _bootstrap.py`) can cause differences in
'importlib.h'.
Those differences are mainly due to the cell and free var indexes being
reordered.

Since the bytecode generation isn't deterministic, there can be some noisy diffs
in your working copy when mucking around with the files related to the frozen
importlib.  Thus if we ever wanted to just always generate importlib.h because
we can't be sure which changed source files should cause importlib.h to be
regenerated, then the non-determinism would be a real annoyance.

That is the only concrete issue I currently am aware of.  This issue may not
actually be worth addressing, but I felt it was worthy of discussion.

--

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



[issue14644] test_logging failure on OS X Tiger

2012-07-16 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I get failures for the same test on my machine running OSX 10.7, the machine is 
fairly overloaded right now because I'm running a large VM in the background.

Increasing the timeout from 5.0 to 15.0 seconds ensures that the test passes.

--
nosy: +ronaldoussoren

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



[issue9102] pybench: Cannot compare 2.x and 3.x benchmarks

2012-07-16 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
versions: +Python 3.4 -Python 3.2

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



[issue15369] pybench and test.pystone poorly documented

2012-07-16 Thread Florent Xicluna

New submission from Florent Xicluna florent.xicl...@gmail.com:

The benchmarking tools pystones and pybench which are shipped with the 
Python standard distribution are not documented.

The only information is in the what's-new for Python 2.5:
http://docs.python.org/dev/whatsnew/2.5.html?highlight=pybench#new-improved-and-removed-modules

IMHO, they should be mentioned somewhere in the HOWTOs, the FAQ or the standard 
library documentation (Development Tools or Debugging and Profiling)

--
assignee: docs@python
components: Benchmarks, Documentation
messages: 165603
nosy: docs@python, flox
priority: normal
severity: normal
status: open
title: pybench and test.pystone poorly documented
type: behavior
versions: Python 3.3

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto ishim...@gembook.org added the comment:

Behavior is not changed at all.

I fixed test_shutil.py to test if SameFileError is raised in
shutil.copy() instead of shutil.move().

--

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



[issue14787] pkgutil.walk_packages returns extra modules

2012-07-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Right, this is a separate bug in pkgutil. Specifically, when it goes to import 
a package in order to check it for submodules, it invokes the global import 
system via __import__() rather than constraining the import to the path 
argument supplied to walk_packages.

This means that it will only find it if the path being walked is already on 
sys.path. In the case of your example, it isn't (it's on a subdirectory).

The reason my new tests didn't pick this up is that they're built on the 
test_runpy infrastructure, and one of the steps in that infrastructure is to 
add the new package path to sys.path so it can be imported.

This isn't an easy one to fix - you basically need something along the lines of 
a PEP 406 style import engine API in order to do the import without having 
potentially adverse effects on the state in the sys module.

--

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

If nobody else, I’ll review it tomorrow at the latest.

On a first glance I realized our shutil Exceptions are all derived from 
EnvironmentError which is just a compatibility alias for OSError since 3.3.

Quick poll before I open a dedicated ticket, change that for 3.4?

--

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto ishim...@gembook.org added the comment:

So, the title of this issue is misleading.

The patch originally proposed by Zooko does not raise SameFileError in
shutil.move(). If source and destination is same file, shutil.move() may
raise exception, but the exception is NOT SameFileError but OSError or 
something.

shutil.copy() raises SameFileError if source and destination is same file.

--

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

Well, then fix is for shutil.move() too please, otherwise we can’t close
this ticket which is a pity after over 6 years. :)

--

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



[issue1492704] distinct error type from shutil.move()

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto ishim...@gembook.org added the comment:

Well, I happy to improve patch. 

But, on Linux and Windows, shutil.move() does not raise any exception if source 
and destination are identical. If we change the behavior, I'm afraid we would 
break a lot of existing applications.

--

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



[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +mark.dickinson

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-16 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

Sorry, I didn’t look at zooko’s patch which was also just about copyfile. I 
presume it’s all about the copy fallback that happens when os.rename didn’t 
work out.

Will look at your code more closely later.

--
title: distinct error type from shutil.move() - distinct error type if 
shutil.copyfile() fails because of src and dst are the same file

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto ishim...@gembook.org added the comment:

Ooops, shutil.move() will raise SameFileError if destination is directory. I'll 
investigate the patch further more.

--

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



[issue14787] pkgutil.walk_packages returns extra modules

2012-07-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

At the very least, the pkgutil docs need to state clearly that walk_packages 
only works properly with sys.path entries, and the constraint feature may not 
descend into packages correctly if an entry is shadowed by a sys.modules entry 
or an entry earlier on sys.meta_path or sys.path.

--
assignee:  - docs@python
components: +Documentation
nosy: +docs@python

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



[issue15370] test_runpy should include namespace package tests

2012-07-16 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

test_runpy doesn't currently check that code can be correctly executed from 
namespace packages

--
components: Tests
messages: 165613
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: test_runpy should include namespace package tests
type: enhancement
versions: Python 3.3

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



[issue15371] test_cmd_line_script should include namespace package tests

2012-07-16 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

test_cmd_line_script doesn't currently check that namespace packages and 
submodules of namespace packages can be executed via the -m switch

--
components: Library (Lib)
messages: 165614
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: test_cmd_line_script should include namespace package tests
versions: Python 3.3

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



[issue15307] Patch for --symlink support in pyvenv with framework python

2012-07-16 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

And a final update: don't use TAB characters

--
Added file: http://bugs.python.org/file26398/venv-symlinks-v7.txt

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



[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +flox

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



[issue15358] Test pkgutil.walk_packages in test_pkgutil instead of test_runpy

2012-07-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

The walk_packages tests should also be enhanced to ensure correctly handling of 
namespace packages

--

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



[issue15358] Test pkgutil.walk_packages in test_pkgutil instead of test_runpy

2012-07-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Note that the problem described in #14787 will limit the scope of what can be 
tested.

--

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



[issue14787] pkgutil.walk_packages returns extra modules

2012-07-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

I just realised this is going to behave strangely with namespace packages as 
well: the __import__ step will pick up *every* portion of the namespace 
package, not just those defined in the identified subset of sys.path.

--

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



[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

At least we know the hash randomisation is working :)

Spurious changes when freezing modules seems like a legitimate reason to fix it 
- the import benchmarks would probably give the compiler enough of a workout to 
highlight if the sorting is excessively time consuming.

--
nosy: +ncoghlan

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



[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I don't recall what the issue was the resulted in the check-in that you 
mention. Sadly enough it is not-trivial to find that check-in I mention due to 
the migration from Subversion to Mercurial.

How was python itself configured (configure command line)? What OS are you 
running on? Given the shell prompt I'd say Mint Linux. And finally, is 
'~/Repos/cpython/python' a checkout or installed location (that is, did you run 
'make install')?

Based on code inspection I'd say that your change is correct, and my change 
only works when running from the build directory.

--

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



[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Ditto. I think predictability of bytecode generation is useful, e.g. for 
make-like tools that examine content, or for unit testing.

--
nosy: +pitrou

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



[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-16 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

Hynek, it's clear you understand this far better than I do.  Could I get you to 
fix the Fedora buildbot problem, etc, etc?

--

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



[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-16 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue11698] Improve repr for structseq objects to show named, but unindexed fields

2012-07-16 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 265e36e277f3 by Hynek Schlawack in branch 'default':
#15238: Fix xattr related shutil.copystat tests
http://hg.python.org/cpython/rev/265e36e277f3

--

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



[issue15366] venv assumes header files in sys._home + '/Include'

2012-07-16 Thread Richard Oudkerk

Richard Oudkerk shibt...@gmail.com added the comment:

Updated patch.  Old one broke test_distutils...

--
Added file: http://bugs.python.org/file26399/distutils-sysconfig.patch

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



[issue15367] build_ext in a venv on Windows assumes pyconfig.h in sys.exec_prefix + '\PC'

2012-07-16 Thread Richard Oudkerk

Richard Oudkerk shibt...@gmail.com added the comment:

Updated patch which does not fail test_distutils.

--
Added file: http://bugs.python.org/file26400/build_ext.patch

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



[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-16 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

I removed the check for good as we check for the existence of the xattr in the 
next line. However we check the destination now whether the xattrs have been 
copied. ;) Fedora is green again.

--

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



[issue14787] pkgutil.walk_packages returns extra modules

2012-07-16 Thread Chris Jerdonek

Chris Jerdonek chris.jerdo...@gmail.com added the comment:

 This isn't an easy one to fix - you basically need something along the lines 
 of a PEP 406 style import engine API in order to do the import without having 
 potentially adverse effects on the state in the sys module.

By adverse, do you just mean side effects? If so, since the documentation 
doesn't explicitly say so, is there any reason for the user to think there 
shouldn't be side effects?  For example, I tried this in Python 2.7:

 import os, sys, pkgutil, unittest
 len(sys.modules)
86
 g = pkgutil.walk_packages([os.path.dirname(unittest.__file__)])
 len(sys.modules)
86
 for i in g:
...   pass
... 
 len(sys.modules)
95

Or maybe this isn't what you mean. If not, can you provide an example?

--

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



[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Richard Oudkerk

Richard Oudkerk shibt...@gmail.com added the comment:

 I don't recall what the issue was the resulted in the check-in that you
 mention.

I think it was http://bugs.python.org/issue8577.  The issue was about having 
srcdir != builddir.  The initial patch caused a test failure, and 356d0ea8ea34 
fixed (or at least silenced) the failure.

 How was python itself configured (configure command line)?

I tried it with both

   ./configure
   make

and

   mdkir release
   cd release
   ../configure
   make

It fails with both.

 What OS are you running on? Given the shell prompt I'd say Mint Linux. 

Yes (in a VM).

 And finally, is '~/Repos/cpython/python' a checkout or installed 
 location (that is, did you run 'make install')?

It is a checkout.

The argument passed to _safe_realpath() (either . or .. in my case) should 
be interpreted relative to the directory containing the Makefile.  But 
os.path.realpath() assumes that its argument is either absolute or relative to 
os.getcwd().  It therefore returns the wrong absolute path.

--

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



[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +eric.araujo

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto ishim...@gembook.org added the comment:

Patch updated.

- SameFileError is now derived from EnvironmentError.
- Fixed documentation.
- Fixed test method name.

I investigated this patch:

- shutil.copyfile() and shutil.copy() raises SameFileError if source and 
destination are same file.

- shutil.move() never raises SameFileError. shutil.move() may raise exception 
if source and dest are same file, but it depends on underlying implementation 
of platform. Linux and Windows don't raise exception in this case.

- I am opposed to change shutil.move() to raise SameFileError, because such 
incompatible change can break existing applilcations.

--
Added file: http://bugs.python.org/file26401/issue1492704_new_2.patch

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



[issue15372] Python is missing alternative for common quoting character

2012-07-16 Thread Luca Fabbri

New submission from Luca Fabbri luca...@gmail.com:

Using the unicodedata.decomposition function on characters like \u201c and 
\u201d I didn't get back the classic quote character ().

This is a very common error when text is taken from Microsoft Word (where in 
italian language a couple of quoting character in a sentence like foo is 
automatically changed to “foo”).

--
components: Unicode
messages: 165630
nosy: ezio.melotti, keul
priority: normal
severity: normal
status: open
title: Python is missing alternative for common quoting character
type: behavior
versions: Python 2.7

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



[issue15373] copy.copy() does not properly copy os.environment

2012-07-16 Thread Hartmut Goebel

New submission from Hartmut Goebel h.goe...@crazy-compilers.com:

Wehn copying os.environ usinf copy.copy(), any manipulation on the copied 
object will change os.environment, too.

$ python
Python 2.7.3 (default, Apr 22 2012, 07:46:58) 
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
 import copy, os
 os.environ['TITI']
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.7/UserDict.py, line 23, in __getitem__
raise KeyError(key)
KeyError: 'TITI'
 env = copy.copy(os.environ)
 env['TITI'] = 'in den Ferien'
 os.environ['TITI']
'in den Ferien'
 

Strictly speaking, this is correct, as the os.environment class is meant to 
manipulate the environment in the background. But user's expectation is 
different: he thinks, manipulating the copied object is save and does not 
effect the environment.

--
messages: 165631
nosy: htgoebel
priority: normal
severity: normal
status: open
title: copy.copy() does not properly copy os.environment
type: behavior
versions: Python 2.7

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



[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

It is actually simple to find the revision: http://hg.python.org/lookup/r81999 
:)

--

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



[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I have to add that I’m quite confused by srcdir vs. projectbase.  There are a 
handful of open bugs related to sysconfig and built but uninstalled Pythons, 
and many commits changing code to use srcdir or projectbase after empirical 
testing or buildbot failures. :/

--
nosy: +fdrake, tarek

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



[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

srcdir vs. project base is quite easy: srcdir is the directory containing the 
source files, the project base is where you ran configure. These are the same 
if you run configure in the root of a checkout, but don't have to be, for 
example when you do:

$ mkdir buildroot
$ cd buildroot
$ ../configure # ...

Now de base directory is the 'buildroot' directory, while srcdir is its parent 
directory.

--

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-16 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

 - SameFileError is now derived from EnvironmentError.

Why?

--

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



[issue15372] Python is missing alternative for common quoting character

2012-07-16 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I don't understand why you would expect to get a .  The unicode characters 
aren't s.  As far as I can see (from, for example, 
http://codepoints.net/U+201C), Python is behaving as expected here.

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - pending

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



[issue15373] copy.copy() does not properly copy os.environment

2012-07-16 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

os.environ is not a dictionary, so it isn't all that surprising that a shallow 
copy doesn't behave like a shallow copy of a dictionary.  deepcopy does what 
you'd expect, as does os.environ.copy().

Perhaps it is worth improving this by adding a __copy__ method to os.environ.  
Someone would need to propose a patch, and it would be an enhancement.

--
nosy: +r.david.murray
type: behavior - enhancement
versions: +Python 3.4 -Python 2.7

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-16 Thread Atsuo Ishimoto

Atsuo Ishimoto ishim...@gembook.org added the comment:

 - SameFileError is now derived from EnvironmentError.

Why?

oh, sorry, I misunderstood you suggested to do so.

--

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-07-16 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

No, sorry if my ramblings confused you. I'm pondering about deriving Error from 
OSError in 3.4. That has nothing to do with this ticket. I just saw it while 
glancing over your patch.

--

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



[issue504714] hasattr catches only AttributeError

2012-07-16 Thread Karl Chen

Karl Chen qu...@09e0.clgubaohtf.z.quarl.org added the comment:

For the record, this was eventually fixed for Python 3.2.  See 
http://bugs.python.org/issue9666.

Adding this here because issue504714 comes up earlier than issue9666 in many 
web searches.

--
nosy: +quarl

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



[issue15368] bytecode generation is not deterministic

2012-07-16 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

OK, so it sounds like we need to do the equivalent of sorting those tuples when 
generating the bytecode. That would suggest that probably need to tweak 
Python/compile.c to make it deterministic.

--

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



[issue15366] venv assumes header files in sys._home + '/Include'

2012-07-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 998c8a8f2aea by Vinay Sajip in branch 'default':
Closes #15366: Corrected computation of include location for source builds. 
Thanks to Richard Oudkerk for the bug report and patch.
http://hg.python.org/cpython/rev/998c8a8f2aea

--
nosy: +python-dev
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue15367] build_ext in a venv on Windows assumes pyconfig.h in sys.exec_prefix + '\PC'

2012-07-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset a970054a93fb by Vinay Sajip in branch 'default':
Closes #15367: Corrected computation of include locations for source builds on 
Windows. Thanks to Richard Oudkerk for the bug report and patch.
http://hg.python.org/cpython/rev/a970054a93fb

--
nosy: +python-dev
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue15372] Python is missing alternative for common quoting character

2012-07-16 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

A codepoint such as é (\N{LATIN SMALL LETTER E WITH ACUTE}) can be 
decomposed to \u0065\u0301 (\N{LATIN SMALL LETTER E}\N{COMBINING ACUTE 
ACCENT), but \u201c (\N{LEFT DOUBLE QUOTATION MARK}) and \u201d 
(\N{RIGHT DOUBLE QUOTATION MARK}) cannot be decomposed.

--
nosy: +mrabarnett
status: pending - open

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



[issue15372] Python is missing alternative for common quoting character

2012-07-16 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
status: open - closed

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



[issue15374] venv environment variable should follow the conventions

2012-07-16 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

pyvenv's environment variable is currently named VIRTUAL_ENV (it seems).
It would be better if it followed the trend of other Python environment 
variables such as PYTHONHOME, PYTHONSTARTUP, etc.
(so, PYTHONVENV ?)

Setting as deferred blocker, since it would be better for existing venvs not to 
be made useless.

--
components: Library (Lib)
messages: 165645
nosy: georg.brandl, pitrou, vinay.sajip
priority: deferred blocker
severity: normal
status: open
title: venv environment variable should follow the conventions
type: behavior
versions: Python 3.3

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



[issue14201] Documented caching for shared library's __getattr__ and __getitem__ is incorrect

2012-07-16 Thread Erik Johansson

Erik Johansson e...@ejohansson.se added the comment:

Document the difference between __getattr__ and __getitem__.

--
keywords: +patch
Added file: http://bugs.python.org/file26402/issue14201.patch

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



[issue15373] copy.copy() does not properly copy os.environment

2012-07-16 Thread Anton Barkovsky

Anton Barkovsky swarmer...@gmail.com added the comment:

Here's a patch.

--
keywords: +patch
nosy: +anton.barkovsky
Added file: http://bugs.python.org/file26403/environcopy.patch

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



[issue15307] Patch for --symlink support in pyvenv with framework python

2012-07-16 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

v7 looks good to me

--
stage:  - commit review

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



[issue15171] Fix 64-bit building for buildbot scripts (3.2)

2012-07-16 Thread David Bolen

David Bolen db3l@gmail.com added the comment:

It seems really unlikely to be related to this issue since I'm pretty sure 
build-amd64 doesn't get used on XP-4.

From the log it looks like it couldn't clean out and reuse the VS temporary 
build directory.  Manually cleaning it out and restarting the last build 
appears to have at least gotten past compiling.

I can't really explain why this was a problem, when I was able to manually 
remove the directory without error, and couldn't find any stray processes that 
may have been holding references to the files in that temporary directory.

--

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



[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-07-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

This broke the buildbots without poll() (Windows).

--

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



[issue15314] Use importlib instead of pkgutil in runpy

2012-07-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

A test fails on the XP buildbots:



==
FAIL: test_get_importer_avoids_emulation 
(test.test_pkgutil.ImportlibMigrationTests)
--
Traceback (most recent call last):
  File D:\Buildslave\3.x.moore-windows\build\lib\test\test_pkgutil.py, line 
289, in test_get_importer_avoids_emulation
self.assertIsNotNone(pkgutil.get_importer(sys.path[0]))
AssertionError: unexpectedly None

--
nosy: +pitrou
status: closed - open

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



[issue15373] copy.copy() does not properly copy os.environment

2012-07-16 Thread Anton Barkovsky

Anton Barkovsky swarmer...@gmail.com added the comment:

A new patch with tests.

--
Added file: http://bugs.python.org/file26404/environcopy_v2.patch

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



[issue15171] Fix 64-bit building for buildbot scripts (3.2)

2012-07-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

David, since you are here, perhaps you could take a look at why your Windows 7 
buildbot doesn't compile?
http://buildbot.python.org/all/builders/x86%20Windows7%203.x

I tried to e-mail you but apparently you didn't receive the message.

--

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



[issue15364] sysconfig confused by relative paths

2012-07-16 Thread Chris Jerdonek

Chris Jerdonek chris.jerdo...@gmail.com added the comment:

Issue 15322 is a recently filed bug regarding srcdir: 
sysconfig.get_config_var('srcdir') returns unexpected value

--
nosy: +cjerdonek

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



[issue15351] Add to unittest.TestCase support for using context managers

2012-07-16 Thread Chris Jerdonek

Chris Jerdonek chris.jerdo...@gmail.com added the comment:

Attached is a patch illustrating the API I suggested for discussion.

To add custom setup and teardown context managers, the user can override the 
following method:

def executeTest(self):
with self.setUpContext():
self.runTestMethod()

The custom context managers can be placed either before or after the existing 
setUp/tearDown, or both.

The patch preserves the existing behavior that tearDown() should run only if 
setUp() was successful, and that doCleanups() should always run.  All tests 
continue to pass with the patch.

--
keywords: +patch
Added file: http://bugs.python.org/file26405/issue-15351-concept.patch

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



[issue15230] runpy.run_path doesn't set __package__ correctly

2012-07-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

This broke some 3.2 buildbots, e.g.:
http://buildbot.python.org/all/builders/AMD64%20Lion%203.2/builds/25

--
nosy: +pitrou
status: closed - open

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



  1   2   >