Re: [Python-Dev] Results of the python 2.x and 3.x use survey, 2014 edition

2015-01-30 Thread Tetsuya Morimoto
Thank you for your hard work. That's very helpful! thanks, Tetsuya On Fri, Jan 30, 2015 at 2:49 AM, Bruno Cauet wrote: > Hi! > Finally, here are the results: > http://blog.frite-camembert.net/python-survey-2014.html > Here is the auto-generated Google Forms recap: > > https://docs.google.com/fo

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Ryan Gonzalez
Do you have just the SDK (which doesn't require Cygwin) or a rooted phone? If so, I can upload instructions that don't use the NDK. On Fri, Jan 30, 2015 at 6:19 PM, Cyd Haselton wrote: > This is going to take some time...here's why: > > Downloading and installing the NDK/SDK won't be too hard...

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
This is going to take some time...here's why: Downloading and installing the NDK/SDK won't be too hard...I have to clear some space...but my primary machine is running Windows 7 and I'd rather swallow hot coals than install Cygwin. I've got next to no experience with it, other than knowing that t

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-30 Thread Gregory P. Smith
On Sun Jan 25 2015 at 7:08:53 AM Antoine Pitrou wrote: > On Sun, 25 Jan 2015 05:22:48 + > "Gregory P. Smith" wrote: > > Why doesn't our Makefile supply that flag with the make parallelism level > > in the sharedmods step? > > If I run "make -j4" here, it works (on the default branch). > Tha

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Ryan Gonzalez
Do you have the Android SDK and NDK installed? If so... Using Google, I've created this series of steps, which may (or may not) work: 1. Make sure you have a copy of Python on your computer and make sure that it's built with debug symbols. 2. Run the following commands from a shell with your pho

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Ryan Gonzalez
Are you sure the patch was applied correctly? I was SO sure it would work! FYI, you tried the patch I attached to the email message, right? On Fri, Jan 30, 2015 at 12:58 PM, Cyd Haselton wrote: > Update: I did try the patch after getting it installed correctly, but > I'm still getting a segfau

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
I've got a page of all of the modifications to source files I've used in my attempts to get 3.4.2 working...I can post it somewhere if the port ever succeeds. On Fri, Jan 30, 2015 at 2:07 PM, Victor Stinner wrote: > Oh, I found my old patch to force UTF-8 on Android. I didn't test it: > see attac

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
Update: I did try the patch after getting it installed correctly, but I'm still getting a segfault on the newly built binary. Will post info this afternoon. On Fri, Jan 30, 2015 at 12:10 PM, Ryan Gonzalez wrote: > No, it returns NULL if malloc gives it a raw pointer. It unconditionally > checks

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
Unfortunately it is still reporting the same function :-/. On Fri, Jan 30, 2015 at 1:44 PM, Ryan Gonzalez wrote: > Yes... > > Can you check if it's crashing in a different function now? > > On Fri, Jan 30, 2015 at 1:39 PM, Cyd Haselton wrote: >> >> Yes I did. I did have to enter all the informa

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
Ok...that makes sense.. apologies I do not do a lot of debugging. My goal was to get Python (then spidermonkey) on my device then start learning languages where i'd need to learn debugging. Tried patch, see my reply, agree about Android's locale...at least where native codeis concerned On Fri, Ja

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Victor Stinner
Oh, I found my old patch to force UTF-8 on Android. I didn't test it: see attached file. It would be nice to start a wiki page to collect all informations on the Python port to Android. Victor 2015-01-30 21:04 GMT+01:00 Victor Stinner : > Android provides a minimal support of locales. Most funct

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Victor Stinner
Android provides a minimal support of locales. Most functions return a fake result, do nothing. I'm not sure that it supports any codec. To support Android, we may force UTF-8 for the filesystem encoding, as done on Mac OS X. Victor 2015-01-30 19:04 GMT+01:00 Ryan Gonzalez : > No... > > ...but I

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Ryan Gonzalez
No, it returns NULL if malloc gives it a raw pointer. It unconditionally checks the length of the (possibly null) string argument first. Please try the patch I attached in the last email. It *might* fix the issue. Android has crappy locale handling. On Fri, Jan 30, 2015 at 12:09 PM, Cyd Haselton

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
Unless i'm reading something incorrectly, _PyMem_RawStrdup is currently returning NULL when given a null pointer. >From obmalloc.c _PyMem_RawStrdup(const char *str) { size_t size; char *copy; size = strlen(str) + 1; copy = PyMem_RawMalloc(size); if (copy == NULL) return

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Ryan Gonzalez
No... ...but I think I found the issue with grep. Try applying the attached patch to the Python/frozenmain.c. It comments out the locale handling. It seems that Python always calls its strdup function on the locale string. On Android, this can apparently be null (as seen in the bug report you lin

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
I don't have gdb on device; does the following tell you where Python's strdup is called? >> _PyMem_RawStrdup >> /bld/python/Python-3.4.2/Objects/obmalloc.c:323 On Fri, Jan 30, 2015 at 11:52 AM, Ryan Gonzalez wrote: > Is it possible at all to get a stack trace of the crash using gdb? Try the > st

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Ryan Gonzalez
I seriously doubt the issue is in that file; _PyMem_RawStrdup crashes when calling strlen. It's that whatever is calling it is likely asking it to duplicate a null pointer. Basically, it's probably the caller's fault. You could always try modifying _PyMem_RawStrdup to return NULL when given a null

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
Alternatively, is there a hassle-free way to find out what changed in obmalloc.c between 2.7.x and 3.4.x? On Fri, Jan 30, 2015 at 9:29 AM, Cyd Haselton wrote: > There's a related strdup patch for readline.c, mentioned > here:http://bugs.python.org/issue21390 and here > https://github.com/rave-en

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Ryan Gonzalez
Is it possible at all to get a stack trace of the crash using gdb? Try the steps here . That way we can see where Python's own strdup function is getting called. On Fri, Jan 30, 2015 at 9:05 AM, Cyd Haselton wrote: > Absolutely. Good thing I have ad

[Python-Dev] Summary of Python tracker Issues

2015-01-30 Thread Python tracker
ACTIVITY SUMMARY (2015-01-23 - 2015-01-30) 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: open4764 ( +4) closed 30351 (+44) total 35115 (+48) Open issues wit

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
There's a related strdup patch for readline.c, mentioned here:http://bugs.python.org/issue21390 and here https://github.com/rave-engine/python3-android/issues/2. There's a patch, but I'm not sure how to modify it for obmalloc.c, as (I think) the functions all belong to Python...they're all prefixed

Re: [Python-Dev] Newly Built Python3 Binary Throws Segfault

2015-01-30 Thread Cyd Haselton
Absolutely. Good thing I have addr2line on device /bld/python/Python-3.4.2 $ addr2line -C -f -e /lib/libpython3.4m.so.1.0 0008bbc8 _PyMem_RawStrdup /bld/python/Python-3.4.2/Objects/obmalloc.c:323 /bld/python/Python-3.4.2 $ On Thu, Jan 29, 2015 at 8:26 PM, Ryan wrote: > Could you try the steps

[Python-Dev] Code review for PEP 448

2015-01-30 Thread Neil Girdhar
Hello all, PEP 448 (https://www.python.org/dev/peps/pep-0448/) is mostly implemented now based on some early implementations by twouters (in 2008) and fhahn (2013) and recently by Joshua and I. The issue tracker http://bugs.python.org/issue2292 has: * a working patch, and * discussion and update