Tony Kelman | 25 Oct 14:45 2014
Picon

Re: Status of C compilers for Python on Windows

I'm several weeks late to this discussion, but I'm glad to see that it
happened. I'm not a Python developer, and barely a user, but I have several
years of daily experience compiling complicated scientific software cross-
platform, particularly with MinGW-w64 for Windows. The Python community,
both core language and scientific package developers and users, needs to
act here. The problem is bad and getting worse. Luckily much of the work
to start solving it has already been done in bits and pieces, it needs
coordination and participation to come to a conclusion.

> Cross compilation is a valid issue, but I hope that build services like
> Appveyor also help out here. There is regular talk about the PSF/PyPI
> providing something similar

AppVeyor is better than nothing (I've been using it since beta), but it's
a far cry from build services and package management as the Linux world
knows them. Obtaining and setting up build dependencies quickly and
repeatably, and finishing the build of a complicated piece of software
such as CPython, or NumPy, SciPy, Julia (where most of my recent expertise
lies), etc. on a small single-core VM with limited memory and a restrictive
time limit is often not possible. These problems are solved within Linux
infrastructure like Koji, Open Build Service, buildd, etc.

MinGW-w64 is a mature, well-tested toolchain that is very capable of cross-
compiling a wide variety of libraries from Linux to Windows, in addition to
building conventionally on Windows for Windows. The MSYS2 collection of
MinGW-w64-compiled packages (https://github.com/Alexpux/MINGW-packages) has
been mentioned. Linux distributions including
- Fedora https://admin.fedoraproject.org/pkgdb/packages/mingw%2A/
- openSUSE https://build.opensuse.org/project/show/windows:mingw:win32
- Arch https://aur.archlinux.org/packages/?K=mingw
(Continue reading)

David Bolen | 25 Oct 05:47 2014
Picon

XP buildbot problem cloning from hg.python.org

Starting yesterday, my XP buildbot began failing to execute clone
operations against hg.python.org.  There's not a lot of data being
given aside from a transaction abort message (and my buildbot log
showing the hg command exiting), and I'm wondering if something may be
amiss on the server or its configuration?

Note that this is a full clone (which for some reason the Windows
buildbots seem to fall back on with some frequency) and can take quite
a while.  My Windows 7 buildbot is ok so far but it's still doing
incremental pulls over the same time period.

I've got two separate Internet connections here and have tried routing
over both so I don't think it's a network issue.  I've completely
flushed the local build trees and rebooted the buildbot.

Is there anything that might be available on the server to see if
there are errors being logged?  Or anything that could have changed
configuration wise recently (maybe timeout related or something)?  I'm
running a bit low of items to try to change or reset on the buildbot
side.

Thanks.

-- David

Python tracker | 24 Oct 18:08 2014

Summary of Python tracker Issues


ACTIVITY SUMMARY (2014-10-17 - 2014-10-24)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open    4604 (+17)
  closed 29877 (+44)
  total  34481 (+61)

Open issues with patches: 2144 

Issues opened (40)
==================

#17401: io.FileIO closefd parameter is not documented nor shown in rep
http://bugs.python.org/issue17401  reopened by serhiy.storchaka

#22659: SyntaxError in the configure_ctypes
http://bugs.python.org/issue22659  opened by bill9889

#22662: subprocess.Popen.communicate causing local tty terminal settin
http://bugs.python.org/issue22662  opened by kflavin

#22665: shutil.__all__ incomplete
http://bugs.python.org/issue22665  opened by vadmium

#22666: email.Header no encoding of unicode strings containing newline
(Continue reading)

Frank, Matthew I | 23 Oct 21:22 2014
Picon

Cross compiling Python (for Android)

This email is about my experience getting CPython (3.4.1) to

cross-compile and run on x86 Android (4.4.2 with sdk 19 and ndk-r9).

I know that Android is not a supported architecture (and I won't

regale you with stories about the complete locale and mbstowcs support

I had to borrow from FreeBSD to get it working).  The purpose of this

email is that several things I found are arguably "bugs" in the Python

build system or code when it comes to cross-compiling that are exposed

by Android's poor Posix support.  I'd like some advice about what kind

of patch (if any) would be most suitable for fixing the problems on

the Python side.

 

Just to be complete:  I'm configuring with

 

     CPPFLAGS=-I../my-locale ../Python-3.4.1/configure --enable-shared

     --prefix=/path/to/install/dir --build=x86_64-linux-gnu

     --host=i686-linux-android --disable-ipv6 ac_cv_file__dev_ptmx=no

     ac_cv_file__dev_ptc=no ac_cv_little_endian_double=yes

 

(The CPPFLAGS addition is to get the headers for my locale fixes

instead of the default Android ones.  ac_cv_file__dev_ptmx=no and

ac_cv_file__dev_ptc=no are because I don't have /dev/whatever on my

build machine.  ac_cv_little_endian_double is because configure for

cross builds can't figure out the endianness of doubles on the host

(because it is running on the build machine not the host.)  (For ARM

it would be ac_cv_mixed_endian_double=yes.)

 

I've gotten to the point where `make; make install` succeeds up to the

point of building something that runs on my Android system (from the

command line) and `python -m test` runs 388 tests, with 321 ok, 24

test failures and 43 tests skipped (the skips mostly due, I think, to

me not yet having installed the right cross-building support for

things like bz2 and dbm.)

 

1. `make` succeeds but `make install` always fails at the end with

   something having to do with being unable to run "ensurepip"

   (presumably because ensurepip requires modules that only run on the

   host, not the build module.)  So it seems this should be wrapped in

   a test for cross compilation, but I haven't looked at exactly what

   yet.  The error is:

 

   /linux-python/bin/python3.4: Error while finding spec for

   'ensurepip.__main__' (<class 'ImportError'>:

   /build-directory/build/lib.linux-i686-3.4/time.cpython-34m.so:

   wrong ELF class: ELFCLASS32); 'ensurepip' is a package and cannot

   be directly executed make: *** [install] Error 1

 

2. setup.py is missing -lm flag for several modules.  On Linux this

   problem is hidden because libm is already loaded by the executable

   calling dlopen(), but Android's loader deals with unknown symbols

   differently (searches only the libs explicitly linked against the

   module being loaded.)  http://bugs.python.org/issue21668 reports

   the problem for selectmodule (can't find ceil()) and timemodule

   (fmod() and floor()).  But there are at least two more: audioop

   fails to load because it needs floor() and ctypes_test fails to

   load because it needs sqrt().  I'll happily update the patch in

   21668.

 

   Is there any fundamental objection to adding the -lm flag to the

   link step where it is necessary?

 

3. What is ossaudiodev?  It tries to include "sys/soundcard.h", which

   I don't have on my system.   (The rule in setup.py is

   wrapped in a test for host of Linux/FreeBSD/Darwin, but Android x86

   gets configured with --host=i686-linux-android so to turn it off

   requires an extra test for "and not cross_compiling".)

 

   Can I just turn off ossaudiodev for cross compiling or might

   someone want it in a different type of cross build?  (In which case

   I think I'll have to write some kind autoconf rule for it, which I

   don't quite know how to do yet.)

 

4. Module _decimal is failing to compile.  The problem is that it has

   a header called memory.h.  Android's libc has the problem that

   /usr/include/stdlib.h includes <memory.h>.  But the build system

   puts -I. on the include path before the system dirs (as it should)

   so when compiling _decimal, Modules/_decimal/libmpdec/memory.h gets

   found instead of /usr/include/memory.h.  Shiz has a patch here:

   https://github.com/rave-engine/python3-android/blob/master/mk/python/3.3.5/p\

ython-3.3.5-android-libmpdec.patch

   (which renames memory.h -> mpmemory.h) but I don't know

 

   a.  Is there a tracker for this yet?  and

   b.  Is Shiz's fix the desired one or should I be looking for

       another approach?  (Maybe modifying the -I flags for the build

       of just the build of _decimal or something?)

 

5. I'm not sure what test configure is actually doing for gethostby*()

   in a cross-compile environment.  In any case Android has a bug

   where gethostbyaddr_r() is declared in the headers, but not

   actually implemented in libc.  So I have to modify my pyconfig.h by

   hand to define HAVE_GETHOSTBYNAME and undef HAVE_GETHOSTBYNAME_R

   and HAVE_GETHOSTBYNAME_R_6_ARG.

 

   Is there a variable (like ac_cv_little_endian_double) that I can

   give to `configure` to make it set HAVE_GETHOSTBYNAME* the way I

   need?  If so I've been unable to figure it out.

 

6. Android's <pwd.h> header mysteriously leaves the pw_gecos field out

   of struct passwd.  Is a fix like defining a new variable

   HAVE_BROKEN_GECOS_FIELD the appropriate way to go with this?  (If

   this is an okay solution then the patch to Modules/pwdmodule.c is

   shown below, but I still have to figure out how to patch

   configure.ac to test for the condition and set the variable

   appropriately, so a pointer to a similar block of code in

   configure.ac would be appreciated.)

 

Sorry for the TL;DR.  I appreciate your having taken the time to read

this far.

 

Thanks,

-Matt

 

Proposed patch for pwdmodule.c:

 

--- a/Modules/pwdmodule.c 2014-05-19 00:19:39.000000000 -0500

+++ b/Modules/pwdmodule.c       2014-10-21 18:00:35.676331205 -0500

<at> <at> -57,6 +57,10 <at> <at>

   }

}

 

+#if defined(HAVE_BROKEN_GECOS_FIELD)

+static char fakePwGecos[256] = "";

+#endif

+

static PyObject *

mkpwent(struct passwd *p)

{

<at> <at> -72,7 +76,11 <at> <at>

     SETS(setIndex++, p->pw_passwd);

     PyStructSequence_SET_ITEM(v, setIndex++, _PyLong_FromUid(p->pw_uid));

     PyStructSequence_SET_ITEM(v, setIndex++, _PyLong_FromGid(p->pw_gid));

+#if !defined(HAVE_BROKEN_GECOS_FIELD)

     SETS(setIndex++, p->pw_gecos);

+#else

+    SETS(setIndex++, fakePwGecos);

+#endif

     SETS(setIndex++, p->pw_dir);

     SETS(setIndex++, p->pw_shell);

 

<div>
<div class="WordSection1">
<p class="MsoNormal"><span>This email is about my experience getting CPython (3.4.1) to<p></p></span></p>
<p class="MsoNormal"><span>cross-compile and run on x86 Android (4.4.2 with sdk 19 and ndk-r9).<p></p></span></p>
<p class="MsoNormal"><span>I know that Android is not a supported architecture (and I won't<p></p></span></p>
<p class="MsoNormal"><span>regale you with stories about the complete locale and mbstowcs support<p></p></span></p>
<p class="MsoNormal"><span>I had to borrow from FreeBSD to get it working).&nbsp; The purpose of this<p></p></span></p>
<p class="MsoNormal"><span>email is that several things I found are arguably "bugs" in the Python<p></p></span></p>
<p class="MsoNormal"><span>build system or code when it comes to cross-compiling that are exposed<p></p></span></p>
<p class="MsoNormal"><span>by Android's poor Posix support.&nbsp; I'd like some advice about what kind<p></p></span></p>
<p class="MsoNormal"><span>of patch (if any) would be most suitable for fixing the problems on<p></p></span></p>
<p class="MsoNormal"><span>the Python side.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Just to be complete:&nbsp; I'm configuring with<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp; CPPFLAGS=-I../my-locale ../Python-3.4.1/configure --enable-shared<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp; --prefix=/path/to/install/dir --build=x86_64-linux-gnu<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp; --host=i686-linux-android --disable-ipv6 ac_cv_file__dev_ptmx=no<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp; ac_cv_file__dev_ptc=no ac_cv_little_endian_double=yes<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>(The CPPFLAGS addition is to get the headers for my locale fixes<p></p></span></p>
<p class="MsoNormal"><span>instead of the default Android ones.&nbsp; ac_cv_file__dev_ptmx=no and<p></p></span></p>
<p class="MsoNormal"><span>ac_cv_file__dev_ptc=no are because I don't have /dev/whatever on my<p></p></span></p>
<p class="MsoNormal"><span>build machine.&nbsp; ac_cv_little_endian_double is because configure for<p></p></span></p>
<p class="MsoNormal"><span>cross builds can't figure out the endianness of doubles on the host<p></p></span></p>
<p class="MsoNormal"><span>(because it is running on the build machine not the host.)&nbsp; (For ARM<p></p></span></p>
<p class="MsoNormal"><span>it would be ac_cv_mixed_endian_double=yes.)<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>I've gotten to the point where `make; make install` succeeds up to the<p></p></span></p>
<p class="MsoNormal"><span>point of building something that runs on my Android system (from the<p></p></span></p>
<p class="MsoNormal"><span>command line) and `python -m test` runs 388 tests, with 321 ok, 24<p></p></span></p>
<p class="MsoNormal"><span>test failures and 43 tests skipped (the skips mostly due, I think, to<p></p></span></p>
<p class="MsoNormal"><span>me not yet having installed the right cross-building support for<p></p></span></p>
<p class="MsoNormal"><span>things like bz2 and dbm.)<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>1. `make` succeeds but `make install` always fails at the end with<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; something having to do with being unable to run "ensurepip"<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; (presumably because ensurepip requires modules that only run on the<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; host, not the build module.)&nbsp; So it seems this should be wrapped in<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; a test for cross compilation, but I haven't looked at exactly what<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; yet.&nbsp; The error is:<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; /linux-python/bin/python3.4: Error while finding spec for<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; 'ensurepip.__main__' (&lt;class 'ImportError'&gt;:<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; /build-directory/build/lib.linux-i686-3.4/time.cpython-34m.so:<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; wrong ELF class: ELFCLASS32); 'ensurepip' is a package and cannot<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; be directly executed make: *** [install] Error 1<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>2. setup.py is missing -lm flag for several modules.&nbsp; On Linux this<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; problem is hidden because libm is already loaded by the executable<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; calling dlopen(), but Android's loader deals with unknown symbols<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; differently (searches only the libs explicitly linked against the<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; module being loaded.)&nbsp; http://bugs.python.org/issue21668 reports<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; the problem for selectmodule (can't find ceil()) and timemodule<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; (fmod() and floor()).&nbsp; But there are at least two more: audioop<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; fails to load because it needs floor() and ctypes_test fails to<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; load because it needs sqrt().&nbsp; I'll happily update the patch in<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; 21668.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; Is there any fundamental objection to adding the -lm flag to the<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; link step where it is necessary?<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>3. What is ossaudiodev?&nbsp; It tries to include "sys/soundcard.h", which<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; I don't have on my system.&nbsp;&nbsp; (The rule in setup.py is<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; wrapped in a test for host of Linux/FreeBSD/Darwin, but Android x86<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; gets configured with --host=i686-linux-android so to turn it off<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; requires an extra test for "and not cross_compiling".)<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; Can I just turn off ossaudiodev for cross compiling or might<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; someone want it in a different type of cross build?&nbsp; (In which case<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; I think I'll have to write some kind autoconf rule for it, which I<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; don't quite know how to do yet.)<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>4. Module _decimal is failing to compile.&nbsp; The problem is that it has<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; a header called memory.h.&nbsp; Android's libc has the problem that<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; /usr/include/stdlib.h includes &lt;memory.h&gt;.&nbsp; But the build system<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; puts -I. on the include path before the system dirs (as it should)<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; so when compiling _decimal, Modules/_decimal/libmpdec/memory.h gets<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; found instead of /usr/include/memory.h.&nbsp; Shiz has a patch here:<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; https://github.com/rave-engine/python3-android/blob/master/mk/python/3.3.5/p\<p></p></span></p>
<p class="MsoNormal"><span>ython-3.3.5-android-libmpdec.patch<p></p></span></p>
<p class="MsoNormal"><span>&nbsp; &nbsp;(which renames memory.h -&gt; mpmemory.h) but I don't know<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; a.&nbsp; Is there a tracker for this yet?&nbsp; and<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; b.&nbsp; Is Shiz's fix the desired one or should I be looking for<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; another approach?&nbsp; (Maybe modifying the -I flags for the build<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of just the build of _decimal or something?)<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>5. I'm not sure what test configure is actually doing for gethostby*()<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; in a cross-compile environment.&nbsp; In any case Android has a bug<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; where gethostbyaddr_r() is declared in the headers, but not<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; actually implemented in libc.&nbsp; So I have to modify my pyconfig.h by<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; hand to define HAVE_GETHOSTBYNAME and undef HAVE_GETHOSTBYNAME_R<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; and HAVE_GETHOSTBYNAME_R_6_ARG.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; Is there a variable (like ac_cv_little_endian_double) that I can<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; give to `configure` to make it set HAVE_GETHOSTBYNAME* the way I<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; need?&nbsp; If so I've been unable to figure it out.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>6. Android's &lt;pwd.h&gt; header mysteriously leaves the pw_gecos field out<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; of struct passwd.&nbsp; Is a fix like defining a new variable<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; HAVE_BROKEN_GECOS_FIELD the appropriate way to go with this?&nbsp; (If<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; this is an okay solution then the patch to Modules/pwdmodule.c is<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; shown below, but I still have to figure out how to patch<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; configure.ac to test for the condition and set the variable<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; appropriately, so a pointer to a similar block of code in<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; configure.ac would be appreciated.)<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Sorry for the TL;DR.&nbsp; I appreciate your having taken the time to read<p></p></span></p>
<p class="MsoNormal"><span>this far.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Thanks,<p></p></span></p>
<p class="MsoNormal"><span>-Matt<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Proposed patch for pwdmodule.c:<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>--- a/Modules/pwdmodule.c 2014-05-19 00:19:39.000000000 -0500<p></p></span></p>
<p class="MsoNormal"><span>+++ b/Modules/pwdmodule.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2014-10-21 18:00:35.676331205 -0500<p></p></span></p>
<p class="MsoNormal"><span> <at>  <at>  -57,6 +57,10  <at>  <at> <p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp; }<p></p></span></p>
<p class="MsoNormal"><span>}<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>+#if defined(HAVE_BROKEN_GECOS_FIELD)<p></p></span></p>
<p class="MsoNormal"><span>+static char fakePwGecos[256] = "";<p></p></span></p>
<p class="MsoNormal"><span>+#endif<p></p></span></p>
<p class="MsoNormal"><span>+<p></p></span></p>
<p class="MsoNormal"><span>static PyObject *<p></p></span></p>
<p class="MsoNormal"><span>mkpwent(struct passwd *p)<p></p></span></p>
<p class="MsoNormal"><span>{<p></p></span></p>
<p class="MsoNormal"><span> <at>  <at>  -72,7 +76,11  <at>  <at> <p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp; SETS(setIndex++, p-&gt;pw_passwd);<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp; PyStructSequence_SET_ITEM(v, setIndex++, _PyLong_FromUid(p-&gt;pw_uid));<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp; PyStructSequence_SET_ITEM(v, setIndex++, _PyLong_FromGid(p-&gt;pw_gid));<p></p></span></p>
<p class="MsoNormal"><span>+#if !defined(HAVE_BROKEN_GECOS_FIELD)<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp; SETS(setIndex++, p-&gt;pw_gecos);<p></p></span></p>
<p class="MsoNormal"><span>+#else<p></p></span></p>
<p class="MsoNormal"><span>+&nbsp;&nbsp;&nbsp; SETS(setIndex++, fakePwGecos);<p></p></span></p>
<p class="MsoNormal"><span>+#endif<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp; SETS(setIndex++, p-&gt;pw_dir);<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp; SETS(setIndex++, p-&gt;pw_shell);<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
</div>
</div>
Pekka Klärck | 22 Oct 12:15 2014
Picon
Picon

Re: Backporting ensurepip to 2.7, Which commands to install?

[Replying to a mail that was sent before I joined this list. Quoting,
headers, etc. aren't exactly right.]

Nick Coghlan wrote:
>On 4 October 2014 10:51, Donald Stufft <donald at stufft.io> wrote:
>> Whoops, I misred.
>>
>> So to be clear, you think:
>>
>> install -> pip, pip2, pip2.7
>> altinstall -> pip2.7
>
> To spell out the assumption I didn't make clear when helping with the
> backport PEP, the difference comes from PEP 394, which specifies the
> following behaviour when installing Python itself:
>
> Python 2.7: python, python2, python2.7
> Python 3.4: python3, python3.4
>
> That maps to ensurepip as:
>
> Python 2.7: pip, pip2, pip2.7
> Python 3.4: pip3, pip3.4

I just installed Python 3.4.2 on Windows and noticed that its Scripts
directory has these files out-of-the-box:

easy_install.exe
easy_install-3.4.exe.
pip.exe
pip3.exe
pip3.4.exe

Based on Nick's explanation above, having pip.exe there looks like bug
in the installer and could easily cause a conflict with other pip
installations. I don't understand why easy_install is included there
in the first place, but easy_install.exe can obviously cause a similar
conflict.

Cheers,
    .peke
--

-- 
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
Philip Jenvey | 21 Oct 19:03 2014

PyPy3 2.4.0 released

=================================================
PyPy3 2.4 - Snow White
=================================================

We're pleased to announce PyPy3 2.4, which contains significant performance
enhancements and bug fixes.

You can download the PyPy3 2.4.0 release here:

    http://pypy.org/download.html

PyPy3 Highlights
================

Issues reported with our previous release were fixed after reports from users on
our new issue tracker at https://bitbucket.org/pypy/pypy/issues or on IRC at
#pypy. Here is a summary of the user-facing PyPy3 specific changes:

* Better Windows compatibility, e.g. the nt module functions _getfinalpathname
  & _getfileinformation are now supported (the former is required for the
  popular pathlib library for example)

* Various fsencode PEP 383 related fixes to the posix module (readlink, uname,
  ttyname and ctermid) and improved locale handling

* Switched default binary name os POSIX distributions to 'pypy3' (which
  symlinks to to 'pypy3.2')

* Fixed a couple different crashes related to parsing Python 3 source code

Further Highlights (shared w/ PyPy2)
====================================

Benchmarks improved after internal enhancements in string and
bytearray handling, and a major rewrite of the GIL handling. This means
that external calls are now a lot faster, especially the CFFI ones. It also
means better performance in a lot of corner cases with handling strings or
bytearrays. The main bugfix is handling of many socket objects in your
program which in the long run used to "leak" memory.

We fixed a memory leak in IO in the sandbox_ code

We welcomed more than 12 new contributors, and conducted two Google
Summer of Code projects, as well as other student projects not
directly related to Summer of Code.

* Reduced internal copying of bytearray operations

* Tweak the internal structure of StringBuilder to speed up large string
  handling, which becomes advantageous on large programs at the cost of slightly
  slower small *benchmark* type programs.

* Boost performance of thread-local variables in both unjitted and jitted code,
  this mostly affects errno handling on linux, which makes external calls
  faster.

* Move to a mixed polling and mutex GIL model that make mutlithreaded jitted
  code run *much* faster

* Optimize errno handling in linux (x86 and x86-64 only)

* Remove ctypes pythonapi and ctypes.PyDLL, which never worked on PyPy

* Classes in the ast module are now distinct from structures used by
  the compiler, which simplifies and speeds up translation of our
  source code to the PyPy binary interpreter

* Win32 now links statically to zlib, expat, bzip, and openssl-1.0.1i.
  No more missing DLLs

* Many issues were resolved_ since the 2.3.1 release in June

.. _`whats-new`: http://doc.pypy.org/en/latest/whatsnew-2.4.0.html
.. _resolved: https://bitbucket.org/pypy/pypy/issues?status=resolved
.. _sandbox: http://doc.pypy.org/en/latest/sandbox.html

We have further improvements on the way: rpython file handling,
numpy linalg compatibility, as well
as improved GC and many smaller improvements.

Please try it out and let us know what you think. We especially welcome
success stories, we know you are using PyPy, please tell us about it!

Cheers

The PyPy Team
Andreas Maier | 21 Oct 18:43 2014
Picon

isinstance() on old-style classes in Py 2.7


Hi. Today, I ran across this, in Python 2.7.6:

>>> class C:
...   pass
...
>>> issubclass(C,object)
False
>>> isinstance(C(),object)
True   <-- ???

The description of isinstance() in Python 2.7 does not reveal this result
(to my reading).

From a duck-typing perspective, one would also not guess that an instance
of C would be considered an instance of object:

>>> dir(C())
['__doc__', '__module__']
>>> dir(object())
['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__',
'__hash__', '__init__', '__new__', '__reduce__
', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',
'__subclasshook__']

-> What is the motivation for isinstance(C,object) to return True in Python
2.7?

Andy

Andreas Maier
IBM Senior Technical Staff Member, Systems Management Architecture & Design
IBM Research & Development Laboratory Boeblingen, Germany
maiera <at> de.ibm.com, +49-7031-16-3654
________________________________________________________________________
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

Terry Reedy | 20 Oct 22:01 2014
Picon

https://docs.python.org/3/using/index.html not linking correctly

If I go to https://docs.python.org/3/using/index.html and click on any 
of the TOC entries, I get 'connecting' indefinitely.  This problem seems 
unique to this file. I tried several other index files and clicking am 
entry brings up the corresponding page almost immediately.

--

-- 
Terry Jan Reedy

Terry Reedy | 19 Oct 01:05 2014
Picon

Half the 'stable' buildbots are not running.

4 offline, 2 not compiling, 1 not compiling completely (no _ctypes == 
venv fail)

--

-- 
Terry Jan Reedy

Python tracker | 17 Oct 18:08 2014

Summary of Python tracker Issues


ACTIVITY SUMMARY (2014-10-10 - 2014-10-17)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open    4587 (-11)
  closed 29833 (+64)
  total  34420 (+53)

Open issues with patches: 2146 

Issues opened (38)
==================

#13664: UnicodeEncodeError in gzip when filename contains non-ascii
http://bugs.python.org/issue13664  reopened by ezio.melotti

#15859: PyUnicode_EncodeFSDefault win32 inconsistancy.
http://bugs.python.org/issue15859  reopened by ideasman42

#22606: Inconsistency between Python 2 and PyPy regarding future impor
http://bugs.python.org/issue22606  opened by Claudiu.Popa

#22607: find by dichotomy the failing test
http://bugs.python.org/issue22607  opened by xdegaye

#22608: test_socket fails with sem_init: Too many open files
http://bugs.python.org/issue22608  opened by Urs.Traber

#22609: Constructors of some mapping classes don't accept `self` keywo
http://bugs.python.org/issue22609  opened by abacabadabacaba

#22610: test_ftplib fails with sem_init: Too many open files
http://bugs.python.org/issue22610  opened by Urs.Traber

#22612: Add block info to unicodedata
http://bugs.python.org/issue22612  opened by flying sheep

#22613: Several minor doc issues
http://bugs.python.org/issue22613  opened by zach.ware

#22616: Allow connecting AST nodes with corresponding source ranges
http://bugs.python.org/issue22616  opened by Aivar.Annamaa

#22618: urllib.parse.parse_qsl different results after urllib.parse.un
http://bugs.python.org/issue22618  opened by Alex.Vaystikh

#22619: Possible implementation of negative limit for traceback functi
http://bugs.python.org/issue22619  opened by vlth

#22622: ElementTree only writes declaration when passed encoding
http://bugs.python.org/issue22622  opened by towb

#22623: Missing guards for some POSIX functions
http://bugs.python.org/issue22623  opened by Link Mauve

#22624: Bogus usage of floatclock in timemodule
http://bugs.python.org/issue22624  opened by Link Mauve

#22625: When cross-compiling, don’t try to execute binaries
http://bugs.python.org/issue22625  opened by Link Mauve

#22629: Idle: update htest.py and htests
http://bugs.python.org/issue22629  opened by terry.reedy

#22630: `concurrent.futures.Future.set_running_or_notify_cancel` does 
http://bugs.python.org/issue22630  opened by bwhmather

#22631: Feature Request CAN_RAW_FD_FRAMES
http://bugs.python.org/issue22631  opened by rumpelsepp

#22633: Memory disclosure/buffer overread via bug in Py_FrozenMain
http://bugs.python.org/issue22633  opened by Guido

#22634: importing _ctypes failed: undefined symbol: ffi_call_win32
http://bugs.python.org/issue22634  opened by siyuan

#22635: subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.
http://bugs.python.org/issue22635  opened by josh.r

#22636: avoid using a shell in ctypes.util: replace os.popen with subp
http://bugs.python.org/issue22636  opened by haypo

#22637: avoid using a shell in uuid: replce os.popen with subprocess.P
http://bugs.python.org/issue22637  opened by haypo

#22638: ssl module: the SSLv3 protocol is vulnerable ("POODLE" attack)
http://bugs.python.org/issue22638  opened by haypo

#22640: Add silent mode for py_compile
http://bugs.python.org/issue22640  opened by berker.peksag

#22642: trace module: unclear error message
http://bugs.python.org/issue22642  opened by giampaolo.rodola

#22644: Update Windows installers to OpenSSL 1.0.1j
http://bugs.python.org/issue22644  opened by alex

#22645: Unable to install Python 3.4.2 amd64 on Windows 8.1 Update 1
http://bugs.python.org/issue22645  opened by Zac.Greve

#22648: Unable to install Python 3.4.2 amd64 on Windows 8.1
http://bugs.python.org/issue22648  opened by brp-log

#22649: Use _PyUnicodeWriter in case_operation()
http://bugs.python.org/issue22649  opened by haypo

#22650: set up and use VM for net access in the test suite
http://bugs.python.org/issue22650  opened by georg.brandl

#22651: Open file in a+ mode reads from end of file in Python 3.4
http://bugs.python.org/issue22651  opened by nicksjacobson

#22652: Add suggestion about keyword arguments to this error message: 
http://bugs.python.org/issue22652  opened by cool-RR

#22653: Crash in insertdict
http://bugs.python.org/issue22653  opened by pitrou

#22654: issue with PYTHON_FOR_BUILD
http://bugs.python.org/issue22654  opened by bill9889

#22655: Build error on CentOS 5.4
http://bugs.python.org/issue22655  opened by maorui

#22656: `help` ignores `__doc__` of descriptors
http://bugs.python.org/issue22656  opened by cool-RR

Most recent 15 issues with no replies (15)
==========================================

#22656: `help` ignores `__doc__` of descriptors
http://bugs.python.org/issue22656

#22655: Build error on CentOS 5.4
http://bugs.python.org/issue22655

#22650: set up and use VM for net access in the test suite
http://bugs.python.org/issue22650

#22644: Update Windows installers to OpenSSL 1.0.1j
http://bugs.python.org/issue22644

#22642: trace module: unclear error message
http://bugs.python.org/issue22642

#22640: Add silent mode for py_compile
http://bugs.python.org/issue22640

#22633: Memory disclosure/buffer overread via bug in Py_FrozenMain
http://bugs.python.org/issue22633

#22630: `concurrent.futures.Future.set_running_or_notify_cancel` does 
http://bugs.python.org/issue22630

#22623: Missing guards for some POSIX functions
http://bugs.python.org/issue22623

#22622: ElementTree only writes declaration when passed encoding
http://bugs.python.org/issue22622

#22612: Add block info to unicodedata
http://bugs.python.org/issue22612

#22610: test_ftplib fails with sem_init: Too many open files
http://bugs.python.org/issue22610

#22606: Inconsistency between Python 2 and PyPy regarding future impor
http://bugs.python.org/issue22606

#22602: UTF-7 codec decodes ill-formed sequences starting with "+"
http://bugs.python.org/issue22602

#22600: In Multiprocessing Queue() doesn't work with list : __.put(lis
http://bugs.python.org/issue22600

Most recent 15 issues waiting for review (15)
=============================================

#22653: Crash in insertdict
http://bugs.python.org/issue22653

#22649: Use _PyUnicodeWriter in case_operation()
http://bugs.python.org/issue22649

#22638: ssl module: the SSLv3 protocol is vulnerable ("POODLE" attack)
http://bugs.python.org/issue22638

#22637: avoid using a shell in uuid: replce os.popen with subprocess.P
http://bugs.python.org/issue22637

#22636: avoid using a shell in ctypes.util: replace os.popen with subp
http://bugs.python.org/issue22636

#22630: `concurrent.futures.Future.set_running_or_notify_cancel` does 
http://bugs.python.org/issue22630

#22629: Idle: update htest.py and htests
http://bugs.python.org/issue22629

#22625: When cross-compiling, don’t try to execute binaries
http://bugs.python.org/issue22625

#22623: Missing guards for some POSIX functions
http://bugs.python.org/issue22623

#22619: Possible implementation of negative limit for traceback functi
http://bugs.python.org/issue22619

#22610: test_ftplib fails with sem_init: Too many open files
http://bugs.python.org/issue22610

#22609: Constructors of some mapping classes don't accept `self` keywo
http://bugs.python.org/issue22609

#22608: test_socket fails with sem_init: Too many open files
http://bugs.python.org/issue22608

#22607: find by dichotomy the failing test
http://bugs.python.org/issue22607

#22599: traceback: errors in the linecache module at exit
http://bugs.python.org/issue22599

Top 10 most discussed issues (10)
=================================

#22638: ssl module: the SSLv3 protocol is vulnerable ("POODLE" attack)
http://bugs.python.org/issue22638  28 msgs

#21991: The new email API should use MappingProxyType instead of retur
http://bugs.python.org/issue21991  13 msgs

#3068: IDLE - Add an extension configuration dialog
http://bugs.python.org/issue3068  11 msgs

#13664: UnicodeEncodeError in gzip when filename contains non-ascii
http://bugs.python.org/issue13664   9 msgs

#22607: find by dichotomy the failing test
http://bugs.python.org/issue22607   9 msgs

#22653: Crash in insertdict
http://bugs.python.org/issue22653   9 msgs

#22634: importing _ctypes failed: undefined symbol: ffi_call_win32
http://bugs.python.org/issue22634   8 msgs

#22651: Open file in a+ mode reads from end of file in Python 3.4
http://bugs.python.org/issue22651   8 msgs

#22654: issue with PYTHON_FOR_BUILD
http://bugs.python.org/issue22654   8 msgs

#12067: Doc: remove errors about mixed-type comparisons.
http://bugs.python.org/issue12067   7 msgs

Issues closed (64)
==================

#7442: _localemodule.c: str2uni() with different LC_NUMERIC and LC_CT
http://bugs.python.org/issue7442  closed by haypo

#9311: os.access can return bogus values when run as superuser
http://bugs.python.org/issue9311  closed by georg.brandl

#10769: ast: provide more useful range information
http://bugs.python.org/issue10769  closed by scummos

#11694: xdrlib raises ConversionError in inconsistent way
http://bugs.python.org/issue11694  closed by petri.lehtinen

#11973: kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
http://bugs.python.org/issue11973  closed by r.david.murray

#12834: memoryview.to_bytes() and PyBuffer_ToContiguous() incorrect fo
http://bugs.python.org/issue12834  closed by skrah

#12965: longobject: documentation improvements
http://bugs.python.org/issue12965  closed by skrah

#13090: test_multiprocessing: memory leaks
http://bugs.python.org/issue13090  closed by skrah

#13096: ctypes: segfault with large POINTER type names
http://bugs.python.org/issue13096  closed by r.david.murray

#14537: "Fatal Python error: Cannot recover from stack overflow."  wit
http://bugs.python.org/issue14537  closed by r.david.murray

#15414: os.path.join behavior on Windows (ntpath.join) is not well doc
http://bugs.python.org/issue15414  closed by python-dev

#15569: Doc doc: incorrect description of some roles as format-only
http://bugs.python.org/issue15569  closed by python-dev

#15672: PEP 3121, 384 Refactoring applied to testbuffer module
http://bugs.python.org/issue15672  closed by skrah

#15722: PEP 3121, 384 Refactoring applied to decimal module
http://bugs.python.org/issue15722  closed by skrah

#15857: memoryview: complete support for struct packing/unpacking
http://bugs.python.org/issue15857  closed by skrah

#16233: IDLE: conceptual problems with *Class browser*
http://bugs.python.org/issue16233  closed by terry.reedy

#16728: Missing cross-reference in sequence glossary entry
http://bugs.python.org/issue16728  closed by r.david.murray

#17325: improve organization of the PyPI distutils docs
http://bugs.python.org/issue17325  closed by r.david.murray

#17636: Modify IMPORT_FROM to fallback on sys.modules
http://bugs.python.org/issue17636  closed by pitrou

#18643: add a fallback socketpair() implementation to the socket modul
http://bugs.python.org/issue18643  closed by neologix

#18873: "Encoding" detected in non-comment lines
http://bugs.python.org/issue18873  closed by serhiy.storchaka

#18959: Create a "Superseded modules" section in standard library ToC
http://bugs.python.org/issue18959  closed by python-dev

#20167: Exception on IDLE closing
http://bugs.python.org/issue20167  closed by terry.reedy

#20386: socket.SocketType enum overwrites import of _socket.SocketType
http://bugs.python.org/issue20386  closed by ethan.furman

#20815: ipaddress unit tests PEP8
http://bugs.python.org/issue20815  closed by r.david.murray

#21061: Is contextlib.redirect_stdout reentrant or not?
http://bugs.python.org/issue21061  closed by ncoghlan

#21189: Broken link to patch
http://bugs.python.org/issue21189  closed by barry

#21227: Decimal class error messages for integer division aren't good
http://bugs.python.org/issue21227  closed by skrah

#21338: Silent mode for compileall
http://bugs.python.org/issue21338  closed by berker.peksag

#21675: Library - Introduction - paragraph 5 - wrong ordering
http://bugs.python.org/issue21675  closed by python-dev

#21687: Py_SetPath: Path components separated by colons
http://bugs.python.org/issue21687  closed by python-dev

#21855: Fix decimal in unicodeless build
http://bugs.python.org/issue21855  closed by serhiy.storchaka

#21907: Update Windows build batch scripts
http://bugs.python.org/issue21907  closed by zach.ware

#21917: Python 2.7.7 Tests fail, and math is faulty
http://bugs.python.org/issue21917  closed by skrah

#21986: Idle: disable pickleability of user code objects
http://bugs.python.org/issue21986  closed by terry.reedy

#22480: SystemExit out of run_until_complete causes AttributeError whe
http://bugs.python.org/issue22480  closed by haypo

#22489: .gitignore file
http://bugs.python.org/issue22489  closed by zach.ware

#22506: `dir` on Enum subclass doesn't expose parent class attributes
http://bugs.python.org/issue22506  closed by ethan.furman

#22515: Implement partial order on Counter
http://bugs.python.org/issue22515  closed by rhettinger

#22533: Counter with no keys does not compare equal to Counter with ke
http://bugs.python.org/issue22533  closed by rhettinger

#22568: Use of "utime" as variable name in Modules/posixmodule.c cause
http://bugs.python.org/issue22568  closed by python-dev

#22575: bytearray documentation confuses string for unicode objects
http://bugs.python.org/issue22575  closed by terry.reedy

#22586: urljoin allow_fragments doesn't work
http://bugs.python.org/issue22586  closed by python-dev

#22590: math.copysign buggy with nan under Windows
http://bugs.python.org/issue22590  closed by mark.dickinson

#22601: asyncio: loop.run_forever() should consume exception of the te
http://bugs.python.org/issue22601  closed by haypo

#22603: Fix a typo in the contextlib docs
http://bugs.python.org/issue22603  closed by terry.reedy

#22604: assertion error in complex division
http://bugs.python.org/issue22604  closed by pitrou

#22605: memcpy(NULL, NULL, 0) in array_new()
http://bugs.python.org/issue22605  closed by python-dev

#22611: pip needs ctypes
http://bugs.python.org/issue22611  closed by dstufft

#22614: Idle: problem in PyShellEditorWindow.color_breakpoint_text
http://bugs.python.org/issue22614  closed by terry.reedy

#22615: Argument Clinic doesn't support the "type" argument for the in
http://bugs.python.org/issue22615  closed by larry

#22617: spam
http://bugs.python.org/issue22617  closed by georg.brandl

#22620: pythonw does not open on windows 8.1 x64
http://bugs.python.org/issue22620  closed by r.david.murray

#22621: Please make it possible to make the output of hash() equal bet
http://bugs.python.org/issue22621  closed by georg.brandl

#22626: Documentation should point people to bugs. over HTTPS
http://bugs.python.org/issue22626  closed by alex

#22627: Calling timestamp() on a datetime object modifies the timestam
http://bugs.python.org/issue22627  closed by pitrou

#22628: Idle: Tree lines are spaced too close together.
http://bugs.python.org/issue22628  closed by terry.reedy

#22632: Official IDLE web page address is not valid
http://bugs.python.org/issue22632  closed by terry.reedy

#22639: test "test_bad_address" fails on Python 3.4.2 under Linux Mint
http://bugs.python.org/issue22639  closed by ned.deily

#22641: Use better default context in asyncio
http://bugs.python.org/issue22641  closed by pitrou

#22643: Integer overflow in case_operation
http://bugs.python.org/issue22643  closed by python-dev

#22646: Set SMTPHandler's "credentials" through "logging.config.dictCo
http://bugs.python.org/issue22646  closed by python-dev

#22647: test_readline failed on ScientificLinux 6.5
http://bugs.python.org/issue22647  closed by ned.deily

#22657: Bad link to packages specification in language reference 2.x s
http://bugs.python.org/issue22657  closed by python-dev

ACTIVITY SUMMARY (2014-10-10 - 2014-10-17)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open    4587 (-11)
  closed 29833 (+64)
  total  34420 (+53)

Open issues with patches: 2146 

Issues opened (38)
==================

#13664: UnicodeEncodeError in gzip when filename contains non-ascii
http://bugs.python.org/issue13664  reopened by ezio.melotti

#15859: PyUnicode_EncodeFSDefault win32 inconsistancy.
http://bugs.python.org/issue15859  reopened by ideasman42

#22606: Inconsistency between Python 2 and PyPy regarding future impor
http://bugs.python.org/issue22606  opened by Claudiu.Popa

#22607: find by dichotomy the failing test
http://bugs.python.org/issue22607  opened by xdegaye

#22608: test_socket fails with sem_init: Too many open files
http://bugs.python.org/issue22608  opened by Urs.Traber

#22609: Constructors of some mapping classes don't accept `self` keywo
http://bugs.python.org/issue22609  opened by abacabadabacaba

#22610: test_ftplib fails with sem_init: Too many open files
http://bugs.python.org/issue22610  opened by Urs.Traber

#22612: Add block info to unicodedata
http://bugs.python.org/issue22612  opened by flying sheep

#22613: Several minor doc issues
http://bugs.python.org/issue22613  opened by zach.ware

#22616: Allow connecting AST nodes with corresponding source ranges
http://bugs.python.org/issue22616  opened by Aivar.Annamaa

#22618: urllib.parse.parse_qsl different results after urllib.parse.un
http://bugs.python.org/issue22618  opened by Alex.Vaystikh

#22619: Possible implementation of negative limit for traceback functi
http://bugs.python.org/issue22619  opened by vlth

#22622: ElementTree only writes declaration when passed encoding
http://bugs.python.org/issue22622  opened by towb

#22623: Missing guards for some POSIX functions
http://bugs.python.org/issue22623  opened by Link Mauve

#22624: Bogus usage of floatclock in timemodule
http://bugs.python.org/issue22624  opened by Link Mauve

#22625: When cross-compiling, don’t try to execute binaries
http://bugs.python.org/issue22625  opened by Link Mauve

#22629: Idle: update htest.py and htests
http://bugs.python.org/issue22629  opened by terry.reedy

#22630: `concurrent.futures.Future.set_running_or_notify_cancel` does 
http://bugs.python.org/issue22630  opened by bwhmather

#22631: Feature Request CAN_RAW_FD_FRAMES
http://bugs.python.org/issue22631  opened by rumpelsepp

#22633: Memory disclosure/buffer overread via bug in Py_FrozenMain
http://bugs.python.org/issue22633  opened by Guido

#22634: importing _ctypes failed: undefined symbol: ffi_call_win32
http://bugs.python.org/issue22634  opened by siyuan

#22635: subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.
http://bugs.python.org/issue22635  opened by josh.r

#22636: avoid using a shell in ctypes.util: replace os.popen with subp
http://bugs.python.org/issue22636  opened by haypo

#22637: avoid using a shell in uuid: replce os.popen with subprocess.P
http://bugs.python.org/issue22637  opened by haypo

#22638: ssl module: the SSLv3 protocol is vulnerable ("POODLE" attack)
http://bugs.python.org/issue22638  opened by haypo

#22640: Add silent mode for py_compile
http://bugs.python.org/issue22640  opened by berker.peksag

#22642: trace module: unclear error message
http://bugs.python.org/issue22642  opened by giampaolo.rodola

#22644: Update Windows installers to OpenSSL 1.0.1j
http://bugs.python.org/issue22644  opened by alex

#22645: Unable to install Python 3.4.2 amd64 on Windows 8.1 Update 1
http://bugs.python.org/issue22645  opened by Zac.Greve

#22648: Unable to install Python 3.4.2 amd64 on Windows 8.1
http://bugs.python.org/issue22648  opened by brp-log

#22649: Use _PyUnicodeWriter in case_operation()
http://bugs.python.org/issue22649  opened by haypo

#22650: set up and use VM for net access in the test suite
http://bugs.python.org/issue22650  opened by georg.brandl

#22651: Open file in a+ mode reads from end of file in Python 3.4
http://bugs.python.org/issue22651  opened by nicksjacobson

#22652: Add suggestion about keyword arguments to this error message: 
http://bugs.python.org/issue22652  opened by cool-RR

#22653: Crash in insertdict
http://bugs.python.org/issue22653  opened by pitrou

#22654: issue with PYTHON_FOR_BUILD
http://bugs.python.org/issue22654  opened by bill9889

#22655: Build error on CentOS 5.4
http://bugs.python.org/issue22655  opened by maorui

#22656: `help` ignores `__doc__` of descriptors
http://bugs.python.org/issue22656  opened by cool-RR

Most recent 15 issues with no replies (15)
==========================================

#22656: `help` ignores `__doc__` of descriptors
http://bugs.python.org/issue22656

#22655: Build error on CentOS 5.4
http://bugs.python.org/issue22655

#22650: set up and use VM for net access in the test suite
http://bugs.python.org/issue22650

#22644: Update Windows installers to OpenSSL 1.0.1j
http://bugs.python.org/issue22644

#22642: trace module: unclear error message
http://bugs.python.org/issue22642

#22640: Add silent mode for py_compile
http://bugs.python.org/issue22640

#22633: Memory disclosure/buffer overread via bug in Py_FrozenMain
http://bugs.python.org/issue22633

#22630: `concurrent.futures.Future.set_running_or_notify_cancel` does 
http://bugs.python.org/issue22630

#22623: Missing guards for some POSIX functions
http://bugs.python.org/issue22623

#22622: ElementTree only writes declaration when passed encoding
http://bugs.python.org/issue22622

#22612: Add block info to unicodedata
http://bugs.python.org/issue22612

#22610: test_ftplib fails with sem_init: Too many open files
http://bugs.python.org/issue22610

#22606: Inconsistency between Python 2 and PyPy regarding future impor
http://bugs.python.org/issue22606

#22602: UTF-7 codec decodes ill-formed sequences starting with "+"
http://bugs.python.org/issue22602

#22600: In Multiprocessing Queue() doesn't work with list : __.put(lis
http://bugs.python.org/issue22600

Most recent 15 issues waiting for review (15)
=============================================

#22653: Crash in insertdict
http://bugs.python.org/issue22653

#22649: Use _PyUnicodeWriter in case_operation()
http://bugs.python.org/issue22649

#22638: ssl module: the SSLv3 protocol is vulnerable ("POODLE" attack)
http://bugs.python.org/issue22638

#22637: avoid using a shell in uuid: replce os.popen with subprocess.P
http://bugs.python.org/issue22637

#22636: avoid using a shell in ctypes.util: replace os.popen with subp
http://bugs.python.org/issue22636

#22630: `concurrent.futures.Future.set_running_or_notify_cancel` does 
http://bugs.python.org/issue22630

#22629: Idle: update htest.py and htests
http://bugs.python.org/issue22629

#22625: When cross-compiling, don’t try to execute binaries
http://bugs.python.org/issue22625

#22623: Missing guards for some POSIX functions
http://bugs.python.org/issue22623

#22619: Possible implementation of negative limit for traceback functi
http://bugs.python.org/issue22619

#22610: test_ftplib fails with sem_init: Too many open files
http://bugs.python.org/issue22610

#22609: Constructors of some mapping classes don't accept `self` keywo
http://bugs.python.org/issue22609

#22608: test_socket fails with sem_init: Too many open files
http://bugs.python.org/issue22608

#22607: find by dichotomy the failing test
http://bugs.python.org/issue22607

#22599: traceback: errors in the linecache module at exit
http://bugs.python.org/issue22599

Top 10 most discussed issues (10)
=================================

#22638: ssl module: the SSLv3 protocol is vulnerable ("POODLE" attack)
http://bugs.python.org/issue22638  28 msgs

#21991: The new email API should use MappingProxyType instead of retur
http://bugs.python.org/issue21991  13 msgs

#3068: IDLE - Add an extension configuration dialog
http://bugs.python.org/issue3068  11 msgs

#13664: UnicodeEncodeError in gzip when filename contains non-ascii
http://bugs.python.org/issue13664   9 msgs

#22607: find by dichotomy the failing test
http://bugs.python.org/issue22607   9 msgs

#22653: Crash in insertdict
http://bugs.python.org/issue22653   9 msgs

#22634: importing _ctypes failed: undefined symbol: ffi_call_win32
http://bugs.python.org/issue22634   8 msgs

#22651: Open file in a+ mode reads from end of file in Python 3.4
http://bugs.python.org/issue22651   8 msgs

#22654: issue with PYTHON_FOR_BUILD
http://bugs.python.org/issue22654   8 msgs

#12067: Doc: remove errors about mixed-type comparisons.
http://bugs.python.org/issue12067   7 msgs

Issues closed (64)
==================

#7442: _localemodule.c: str2uni() with different LC_NUMERIC and LC_CT
http://bugs.python.org/issue7442  closed by haypo

#9311: os.access can return bogus values when run as superuser
http://bugs.python.org/issue9311  closed by georg.brandl

#10769: ast: provide more useful range information
http://bugs.python.org/issue10769  closed by scummos

#11694: xdrlib raises ConversionError in inconsistent way
http://bugs.python.org/issue11694  closed by petri.lehtinen

#11973: kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
http://bugs.python.org/issue11973  closed by r.david.murray

#12834: memoryview.to_bytes() and PyBuffer_ToContiguous() incorrect fo
http://bugs.python.org/issue12834  closed by skrah

#12965: longobject: documentation improvements
http://bugs.python.org/issue12965  closed by skrah

#13090: test_multiprocessing: memory leaks
http://bugs.python.org/issue13090  closed by skrah

#13096: ctypes: segfault with large POINTER type names
http://bugs.python.org/issue13096  closed by r.david.murray

#14537: "Fatal Python error: Cannot recover from stack overflow."  wit
http://bugs.python.org/issue14537  closed by r.david.murray

#15414: os.path.join behavior on Windows (ntpath.join) is not well doc
http://bugs.python.org/issue15414  closed by python-dev

#15569: Doc doc: incorrect description of some roles as format-only
http://bugs.python.org/issue15569  closed by python-dev

#15672: PEP 3121, 384 Refactoring applied to testbuffer module
http://bugs.python.org/issue15672  closed by skrah

#15722: PEP 3121, 384 Refactoring applied to decimal module
http://bugs.python.org/issue15722  closed by skrah

#15857: memoryview: complete support for struct packing/unpacking
http://bugs.python.org/issue15857  closed by skrah

#16233: IDLE: conceptual problems with *Class browser*
http://bugs.python.org/issue16233  closed by terry.reedy

#16728: Missing cross-reference in sequence glossary entry
http://bugs.python.org/issue16728  closed by r.david.murray

#17325: improve organization of the PyPI distutils docs
http://bugs.python.org/issue17325  closed by r.david.murray

#17636: Modify IMPORT_FROM to fallback on sys.modules
http://bugs.python.org/issue17636  closed by pitrou

#18643: add a fallback socketpair() implementation to the socket modul
http://bugs.python.org/issue18643  closed by neologix

#18873: "Encoding" detected in non-comment lines
http://bugs.python.org/issue18873  closed by serhiy.storchaka

#18959: Create a "Superseded modules" section in standard library ToC
http://bugs.python.org/issue18959  closed by python-dev

#20167: Exception on IDLE closing
http://bugs.python.org/issue20167  closed by terry.reedy

#20386: socket.SocketType enum overwrites import of _socket.SocketType
http://bugs.python.org/issue20386  closed by ethan.furman

#20815: ipaddress unit tests PEP8
http://bugs.python.org/issue20815  closed by r.david.murray

#21061: Is contextlib.redirect_stdout reentrant or not?
http://bugs.python.org/issue21061  closed by ncoghlan

#21189: Broken link to patch
http://bugs.python.org/issue21189  closed by barry

#21227: Decimal class error messages for integer division aren't good
http://bugs.python.org/issue21227  closed by skrah

#21338: Silent mode for compileall
http://bugs.python.org/issue21338  closed by berker.peksag

#21675: Library - Introduction - paragraph 5 - wrong ordering
http://bugs.python.org/issue21675  closed by python-dev

#21687: Py_SetPath: Path components separated by colons
http://bugs.python.org/issue21687  closed by python-dev

#21855: Fix decimal in unicodeless build
http://bugs.python.org/issue21855  closed by serhiy.storchaka

#21907: Update Windows build batch scripts
http://bugs.python.org/issue21907  closed by zach.ware

#21917: Python 2.7.7 Tests fail, and math is faulty
http://bugs.python.org/issue21917  closed by skrah

#21986: Idle: disable pickleability of user code objects
http://bugs.python.org/issue21986  closed by terry.reedy

#22480: SystemExit out of run_until_complete causes AttributeError whe
http://bugs.python.org/issue22480  closed by haypo

#22489: .gitignore file
http://bugs.python.org/issue22489  closed by zach.ware

#22506: `dir` on Enum subclass doesn't expose parent class attributes
http://bugs.python.org/issue22506  closed by ethan.furman

#22515: Implement partial order on Counter
http://bugs.python.org/issue22515  closed by rhettinger

#22533: Counter with no keys does not compare equal to Counter with ke
http://bugs.python.org/issue22533  closed by rhettinger

#22568: Use of "utime" as variable name in Modules/posixmodule.c cause
http://bugs.python.org/issue22568  closed by python-dev

#22575: bytearray documentation confuses string for unicode objects
http://bugs.python.org/issue22575  closed by terry.reedy

#22586: urljoin allow_fragments doesn't work
http://bugs.python.org/issue22586  closed by python-dev

#22590: math.copysign buggy with nan under Windows
http://bugs.python.org/issue22590  closed by mark.dickinson

#22601: asyncio: loop.run_forever() should consume exception of the te
http://bugs.python.org/issue22601  closed by haypo

#22603: Fix a typo in the contextlib docs
http://bugs.python.org/issue22603  closed by terry.reedy

#22604: assertion error in complex division
http://bugs.python.org/issue22604  closed by pitrou

#22605: memcpy(NULL, NULL, 0) in array_new()
http://bugs.python.org/issue22605  closed by python-dev

#22611: pip needs ctypes
http://bugs.python.org/issue22611  closed by dstufft

#22614: Idle: problem in PyShellEditorWindow.color_breakpoint_text
http://bugs.python.org/issue22614  closed by terry.reedy

#22615: Argument Clinic doesn't support the "type" argument for the in
http://bugs.python.org/issue22615  closed by larry

#22617: spam
http://bugs.python.org/issue22617  closed by georg.brandl

#22620: pythonw does not open on windows 8.1 x64
http://bugs.python.org/issue22620  closed by r.david.murray

#22621: Please make it possible to make the output of hash() equal bet
http://bugs.python.org/issue22621  closed by georg.brandl

#22626: Documentation should point people to bugs. over HTTPS
http://bugs.python.org/issue22626  closed by alex

#22627: Calling timestamp() on a datetime object modifies the timestam
http://bugs.python.org/issue22627  closed by pitrou

#22628: Idle: Tree lines are spaced too close together.
http://bugs.python.org/issue22628  closed by terry.reedy

#22632: Official IDLE web page address is not valid
http://bugs.python.org/issue22632  closed by terry.reedy

#22639: test "test_bad_address" fails on Python 3.4.2 under Linux Mint
http://bugs.python.org/issue22639  closed by ned.deily

#22641: Use better default context in asyncio
http://bugs.python.org/issue22641  closed by pitrou

#22643: Integer overflow in case_operation
http://bugs.python.org/issue22643  closed by python-dev

#22646: Set SMTPHandler's "credentials" through "logging.config.dictCo
http://bugs.python.org/issue22646  closed by python-dev

#22647: test_readline failed on ScientificLinux 6.5
http://bugs.python.org/issue22647  closed by ned.deily

#22657: Bad link to packages specification in language reference 2.x s
http://bugs.python.org/issue22657  closed by python-dev
Paul Sokolovsky | 16 Oct 02:54 2014
Picon

How io.IOBase.readline() should behave when used on non-blocking obj and no data available?

Hello,

io.RawIOBase.read() is well specified for behavior in case it
immediately gets a would-block condition: "If the object is in
non-blocking mode and no bytes are available, None is returned."
(https://docs.python.org/3/library/io.html#io.RawIOBase.read).

However, nothing is said about such condition for io.IOBase.readline(),
which is mixin method in a base class, default implementation of which
thus would use io.RawIOBase.read(). Looking at 3.4.0 source, iobase.c:
iobase_readline() has:

        b = _PyObject_CallMethodId(self, &PyId_read, "n", nreadahead);
[...]
        if (!PyBytes_Check(b)) {
            PyErr_Format(PyExc_IOError,
                         "read() should have returned a bytes object, "
                         "not '%.200s'", Py_TYPE(b)->tp_name);

I.e. it's not even ready to receive legitimate return value of None
from read(). I didn't try to write a testcase though, so may be missing
something.

So, how readline() should behave in this case, and can that be
specified in the Library Reference?

Thanks,
 Paul                          mailto:pmiscml <at> gmail.com

Gmane