Xavier de Gaye added the comment:
Larry asked in msg 270937:
> Is there a plan to make Android a supported platform in 3.6?
This is the list of Android related issues that will modify the standard
library and core Python when fixed:
issue 16255: subrocess.Popen needs /bin/sh but Andr
Xavier de Gaye added the comment:
New patch with cosmetic changes.
--
assignee: -> xdegaye
stage: -> patch review
Added file: http://bugs.python.org/file43817/test_getgroups_2.patch
___
Python tracker
<http://bugs.python.org/i
Changes by Xavier de Gaye :
--
stage: test needed -> patch review
___
Python tracker
<http://bugs.python.org/issue26859>
___
___
Python-bugs-list mai
Xavier de Gaye added the comment:
> The python '-E' option was needed on 3.4 when this patch was first
> implemented and is not needed anymore
See msg 269359 in issue 22724.
--
___
Python tracker
<http://bugs.py
Xavier de Gaye added the comment:
New patch that does not call sysconfig.get_config_var() on platforms that have
'/bin/sh'.
--
Added file: http://bugs.python.org/file43809/unix_shell_16255_2.patch
___
Python tracker
<http://bu
Xavier de Gaye added the comment:
Issue 24034 is a duplicate.
--
___
Python tracker
<http://bugs.python.org/issue26662>
___
___
Python-bugs-list mailing list
Unsub
Xavier de Gaye added the comment:
So the error message could be ('$@' being the target):
Cannot generate $@, python not found !
To skip re-generation of $@ run 'make touch' or 'make -t $@'.
Otherwise, set python in PATH and run configure or run make with
PYTHON_FO
Changes by Xavier de Gaye :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue16255>
___
___
Python-bugs-list mailing list
Unsubscribe:
Xavier de Gaye added the comment:
The attached patch fixes the issue. There is at least already an existing test
case: test_subprocess.MiscTests.test_getoutput calls
subprocess.getstatusoutput() that runs a Popen instance with shell=True.
--
stage: -> patch review
Added file: h
Changes by Xavier de Gaye :
--
nosy: +haypo
stage: patch review -> commit review
___
Python tracker
<http://bugs.python.org/issue27472>
___
___
Python-bugs-lis
Xavier de Gaye added the comment:
Following (and thanks to :) Martin's review and comments, this new patch:
* does not use the not portable '-e' echo option
* uses single quotes (') to avoid the escaping
* improves the error message
“make touch” does not always fix the probl
Xavier de Gaye added the comment:
Forgot to say that with the patch and no python in $PATH, the following error
message is output:
$ touch Include/typeslots.h
$ make
Cannot generate Objects/typeslots.inc, python not found !
Re-run configure with python in PATH.
make
Xavier de Gaye added the comment:
This patch follows the first mechanism listed by Martin. The change in
configure.ac fixes the problem described by Victor, it does not generate an
empty Objects/typeslots.inc file when python is not found that would cause the
cryptic " : invalid slot o
Xavier de Gaye added the comment:
I confirm that, on 3.6 and after the changesets that fixed issue 22359, pgen is
always cross-compiled whatever the timestamps and that pgen is not run on a
cross-build for Android. So I think it should work as well now for Trevor with
v2.7.12
Xavier de Gaye added the comment:
> the underlying problem is that pgen gets built in cases where it shouldn't
This statement does not take into account the following note of your initial
post: "note that the same $(CFLAGS) needs to be added to the rule for
$(BUILDPYTHON) if
Xavier de Gaye added the comment:
The attached patch ignores the following test modules listed in msg266084:
Lib/distutils/tests/test_build_scripts.py|68 col 31| ("#!/bin/sh\n"
Lib/distutils/tests/test_install_scripts.py|57 col 38| write_script("shell.sh",
("#!/
Xavier de Gaye added the comment:
Yes, issue 27027 adds test.support.is_android and there is no need now to wait
for issue 16353. Thanks David for reminding me, I have just added a
cross-reference to issue 16353.
--
___
Python tracker
<h
Xavier de Gaye added the comment:
Issue 27472 adds test.support.unix_shell as the path to the default shell.
--
___
Python tracker
<http://bugs.python.org/issue16
Changes by Xavier de Gaye :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Xavier de Gaye added the comment:
> The list of locations where '/bin/sh' is hard coded in the standard library:
I have entered issue 27472.
--
___
Python tracker
<http://bugs.pytho
Xavier de Gaye added the comment:
issue #27472: add the 'unix_shell' attribute to test.support
--
dependencies: +add the 'unix_shell' attribute to test.support
___
Python tracker
<http://bug
Changes by Xavier de Gaye :
--
dependencies: +add the 'is_android' attribute to test.support
___
Python tracker
<http://bugs.python.org/issue27472>
___
___
New submission from Xavier de Gaye:
'/bin/sh' is hard-coded in few places in the test suite, but the Android shell
is at '/system/bin/sh', see msg266084.
--
assignee: xdegaye
components: Tests
messages: 270044
nosy: xdegaye
priority: normal
severity: normal
stage
Changes by Xavier de Gaye :
--
assignee: -> xdegaye
___
Python tracker
<http://bugs.python.org/issue27027>
___
___
Python-bugs-list mailing list
Unsubscrib
Xavier de Gaye added the comment:
New patch using the changes made in issue 27442.
--
dependencies: -android: add platform.android_ver()
keywords: +needs review -patch
stage: -> patch review
title: add is_android in test.support to detect Android platform -> add the
'
Changes by Xavier de Gaye :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Xavier de Gaye added the comment:
Thanks Berker and Stefan for your help on 'hg diff --git'. Yes Stefan, maybe
your patch has a [review] button because Rietveld found that your patch applied
cleanly against the head of the default branch at the time you have submitted
it, so it c
Xavier de Gaye added the comment:
> I suggest to push the change without the unit test.
Agreed.
--
___
Python tracker
<http://bugs.python.org/issue27442>
___
_
Xavier de Gaye added the comment:
@Berker
This does not work for me.
I found an old discussion [1] on the git format problem with Rietveld. The
thread diverges rapidly toward another subject, "submitting a branch instead of
a patch to the issue tracker" but comes back to the origin
Changes by Xavier de Gaye :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Xavier de Gaye added the comment:
> Are you generating the patch using "hg diff"? I don't see the base revision
> in your patch, and so there is no [Review] link on your patch.
I am using 'hg diff' with ~/.hgrc set to 'git = on' and this time, naivel
Xavier de Gaye added the comment:
In sysconfig.parse_config_h(), the variables in pyconfig.h that have a
commented-out '#undef' line are set to 0. Fortunately, there is no Android API
level 0.
Checking '== 0' ensures that autoreconf has been run to add '#und
Xavier de Gaye added the comment:
I think the way the condition was written previously is more expressive, so
the patch does not change that. The 'not' here expresses the fact that in the
shell syntax, the condition is true when the test returns 0 [1], but we still
want to expres
Xavier de Gaye added the comment:
New patch that gets rid of the changes in configure made by my version of
autoconf. This version is 2.69 though, i.e. the same as the generated configure
file that is under control of mercurial in the default branch.
--
assignee: -> xdegaye
st
Changes by Xavier de Gaye :
--
title: Fix cross-compilation with Android NDK and Clang -> $CPP invocation in
configure must use $CPPFLAGS
versions: +Python 3.5
___
Python tracker
<http://bugs.python.org/issu
Xavier de Gaye added the comment:
New patch incorporating the substitutions to '$CPP $CPPFLAGS' and
ANDROID_API_LEVEL.
--
stage: patch review -> commit review
Added file: http://bugs.python.org/file43636/android_api_3.patch
___
Python t
Xavier de Gaye added the comment:
Integrating Python into AOSP does not make sense. The patch can be changed with
s/ANDROID_API/ANDROID_API_LEVEL.
--
___
Python tracker
<http://bugs.python.org/issue27
Xavier de Gaye added the comment:
According to issue 27453, do this minor change in the patch: s/$CC -E/$CPP
$CPPFLAGS.
--
___
Python tracker
<http://bugs.python.org/issue27
Xavier de Gaye added the comment:
With configure run as './configure CC="$(CC)" ...' and when CC is set to:
CC = clang --sysroot=$(SYSROOT) -target $(TARGET) -gcc-toolchain
$(GCC_TOOLCHAIN)
and building for armv7 on android-21, then configure runs $CPP as:
checking for CPP
Xavier de Gaye added the comment:
A patch to expose the Android API level in sysconfig.get_config_vars().
--
components: +Library (Lib) -Interpreter Core
title: expose Android API level in sys.implementation -> expose the Android API
level in sysconfig.get_config_vars()
Added f
Xavier de Gaye added the comment:
Well, issue 16353 has been entered upon attempting to fix issue 16255 (see
msg173477).
So an alternative exists. Issue 16353 could be closed as 'wont't fix'. The
list of locations where '/bin/sh' is hard coded in the standard library
Xavier de Gaye added the comment:
@Ned
The information that the interpreter is an Android built, is needed in issue
16353 [1][2]. In msg266135, the corresponding patch adds the 'is_android'
attribute to the already bloated sys module. I had thought then about using
sysconfig.get_
Xavier de Gaye added the comment:
> I don't think sys.implementation is a good place to contain the information
> of the underlying platform.
Quite the opposite, the ndk API level gives an information about the
implementation of the currently running Python interpreter sayin
Xavier de Gaye added the comment:
issue #27442: expose Android API level in sys.implementation
--
dependencies: +expose Android API level in sys.implementation
___
Python tracker
<http://bugs.python.org/issue26
Xavier de Gaye added the comment:
Patch added.
--
keywords: +patch
stage: -> patch review
Added file: http://bugs.python.org/file43610/android_api.patch
___
Python tracker
<http://bugs.python.org/issu
New submission from Xavier de Gaye:
Expose the Android API level that python was built against, in
sys.implementation as _android_api.
Purposes:
* Identify the platform as Android.
* Allow detecting a mismatch with the runtime sdk version returned by
platform.android_ver() (issue 26855
Xavier de Gaye added the comment:
With this patch, cross-building the 3.6 source with only python 3.5.1 on the
PATH, produces the following configure error:
checking for python interpreter for cross build... configure: error:
python3.6 interpreter not found
--
keywords: +patch
Xavier de Gaye added the comment:
Adding -E to PYTHON_FOR_BUILD fixes the x86_64 install because in my Android
cross-build setup, the native interpreter is built from the same source tree as
the cross-build. However, currently the interpreter used for the cross-build
may be any interpreter
New submission from Xavier de Gaye:
Cross-building the 3.6 source with PYTHON_FOR_BUILD using archlinux python
3.5.1 as found in PATH, fails with:
_PYTHON_PROJECT_BASE=/home/xavier/src/android/pyona/build/python3.6-android-21-x86
_PYTHON_HOST_PLATFORM=linux-x86
PYTHONPATH=/home/xavier/src
Xavier de Gaye added the comment:
> On Android cross-builds, it should be possible to reproduce the failure when
> the build system and the host system have the same PLATFORM_TRIPLET
I confirm that this is the case. The following backtrace is produced when
cross-building and inst
Xavier de Gaye added the comment:
Johannes, what are the values of CONFIG_ARGS and libdir in the config.log of
your Linux SuSE.
--
nosy: +xdegaye
___
Python tracker
<http://bugs.python.org/issue26
Xavier de Gaye added the comment:
Regeneration of the platdir files needs to be aware of the value of sysroot
[1]. For example on Android cross-builds, sysroot must be set to the path of
the headers and libraries for the targeted Android API level corresponding to a
version of the Android
Xavier de Gaye added the comment:
The byte-compiling for cross-builds fails because PYTHON_FOR_BUILD defined in
configure, sets PYTHONPATH with the directory of the newly built extension
modules shared libraries and because PYTHON_FOR_BUILD is used to run
compileall.py in the Makefile
Xavier de Gaye added the comment:
issue #22724: byte-compile fails for cross-builds
--
dependencies: +byte-compile fails for cross-builds
___
Python tracker
<http://bugs.python.org/issue26
Xavier de Gaye added the comment:
> The same problem occurs when cross-compiling for Android and running
> test_sysconfig and test_distutils.
This is misleading. Actually, test_sysconfig and test_distutils do not fail
when run from the source tree, but fail on an installed python, wh
Changes by Xavier de Gaye :
--
dependencies: +rename the platform directory from plat-$(MACHDEP) to
plat-$(PLATFORM_TRIPLET)
___
Python tracker
<http://bugs.python.org/issue26
Xavier de Gaye added the comment:
The same problem occurs when cross-compiling for Android and running
test_sysconfig and test_distutils.
Some other points:
* The generation of the platform directory breaks the support of read only
source trees. The files of this directory are not tracked by
Xavier de Gaye added the comment:
issue #23968: rename the platform directory from plat-$(MACHDEP) to
plat-$(PLATFORM_TRIPLET)
--
___
Python tracker
<http://bugs.python.org/issue26
Xavier de Gaye added the comment:
> the list_dir() nested function is never called
Verifying that load_tests is called is the purpose of this test. In this case
should_recurse is false in _find_tests() and os.listdir() is not invoked by
this method.
This new patch does not use vfs
Xavier de Gaye added the comment:
Thanks for the review Pamela, indeed self.vfs is not defined.
The patched test_unittest runs without failure because the list_dir() nested
function is never called. It is also never called in the un-patched version.
Actually the un-patched
New submission from Xavier de Gaye:
This is with ncurses 6.0.
When running the test suite with:
./python -bb -E -Wd -m test -r -w -uall
test_curses fails as reported in issue 27323 and when the test runner re-runs
test_curses in verbose mode at the end to test for a transient error, it
Changes by Xavier de Gaye :
--
versions: +Python 2.7, Python 3.5
___
Python tracker
<http://bugs.python.org/issue27323>
___
___
Python-bugs-list mailing list
Unsub
Changes by Xavier de Gaye :
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
New submission from Xavier de Gaye:
Not sure if this is relevant, I am using:
readline 6.3
ncurses 6.0
The test runs fine when run alone, with the 8991930 random seed:
$ ./python -bb -E -Wd -m test -r -w -uall --randseed 8991930
New submission from Xavier de Gaye:
This is with ncurses 6.0.
$ ./python -m test -v -u curses -m test_module_funcs test_curses
== CPython 3.6.0a2+ (default:e3bb87952c62, Jun 15 2016, 08:24:47) [GCC 6.1.1
20160501]
== Linux-4.6.1-2-ARCH-x86_64-with-arch little-endian
== hash algorithm
New submission from Xavier de Gaye:
==
FAIL: test_compile_path (test.test_compileall.CompileallTests)
--
Traceback (most recent call last):
File "/home/x
Changes by Xavier de Gaye :
--
assignee: -> xdegaye
stage: -> commit review
___
Python tracker
<http://bugs.python.org/issue26862>
___
___
Python-bugs-
Changes by Xavier de Gaye :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
New submission from Xavier de Gaye:
Building Python with clang and ccache produces about 200 'parentheses-equality'
warnings with the message:
warning: equality comparison with extraneous parentheses
[-Wparentheses-equality]
It seems that clang does not recognize that these
Xavier de Gaye added the comment:
Yes, those changes incorrectly assume that the source directory and the build
directory are always different (using VPATH). Alex patch LGTM, this other patch
overwrites the graminit.[ch] files, not sure if this is better.
--
Added file: http
Xavier de Gaye added the comment:
Agreed, and it is not part of the versioning scheme either.
--
___
Python tracker
<http://bugs.python.org/issue26855>
___
___
Xavier de Gaye added the comment:
The patch is simpler since android/api-level.h is now included in pyport.h by
changeset 09af54099973.
--
Added file: http://bugs.python.org/file43234/posixmodule_3.patch
___
Python tracker
<http://bugs.python.
Xavier de Gaye added the comment:
The problem can be fixed by changing the switch interval to a higher value when
the test is run on an Android emulator. Issue 26855 can provide a way to know
when this is the case through the value of the ro.kernel.qemu property.
--
dependencies
Xavier de Gaye added the comment:
The ro.kernel.qemu property is set to 1 on an Android emulator and 0 otherwise.
I think it should be added to the list. On some threading tests where the
switch interval is set to one microsecond, it is necessary to set the switch
interval to a higher value
Xavier de Gaye added the comment:
This patch fixes the TypeError.
New issue 27218: improve tracing performance with f_trace set to Py_None.
--
Added file: http://bugs.python.org/file43198/none_f_trace.patch
___
Python tracker
<http://bugs.python.
New submission from Xavier de Gaye:
When a trace function set by sys.settrace() returns None, tracing of the
current scope should stop, but this feature is not implemented (issue 11992).
Currently f_trace is never set to Py_None. Setting f_trace to Py_None in
trace_trampoline() when the trace
Xavier de Gaye added the comment:
pycond_timedwait_2.patch prints the delta time in microseconds when deadline is
in the past. Running the patch with the following command:
python -m test -m test_lru_cache_threaded -v test_functools
gives these results:
a) natively:
deadline is never in
Changes by Xavier de Gaye :
Added file:
http://bugs.python.org/file43192/test_lru_cache_threaded-armv7-printf.txt
___
Python tracker
<http://bugs.python.org/issue26
Changes by Xavier de Gaye :
Added file:
http://bugs.python.org/file43191/test_lru_cache_threaded-x86-printf.txt
___
Python tracker
<http://bugs.python.org/issue26
Xavier de Gaye added the comment:
See also issue 24565.
--
nosy: +xdegaye
___
Python tracker
<http://bugs.python.org/issue26779>
___
___
Python-bugs-list mailin
Xavier de Gaye added the comment:
On a 'call' trace event, the bdb dispatch_call() function returns None when
there is nothing to trace in this function (no breakpoints). With the changes
made by the patch in ceval.c, the costly maybe_call_line_trace() function is
not called on ea
Xavier de Gaye added the comment:
This patch fixes the testGetaddrinfo test for API 21 (the test runs fine on API
23):
The failing statement 'socket.getaddrinfo(HOST, "http")' in testGetaddrinfo
does not test explicitly for "http" and for the absence of
Xavier de Gaye added the comment:
Problems with the socket module on Android:
API 21:
a) Both getservbyname() and getservbyport() fail when the optional
'protocolname' parameter is not set to 'tcp' or 'udp'.
b) getservbyname() fails when 'servicename
Xavier de Gaye added the comment:
This patch fixes the testGetServBy test for API 21 and 23 (fixing the cases a)
and e) of my previous msg).
--
keywords: +patch
Added file: http://bugs.python.org/file43000/null-proto.patch
___
Python tracker
<h
Xavier de Gaye added the comment:
Following Serhiy suggestion at msg224477, this tentative patch adds the
is_android attribute to the posix module and the default_shell attribute to the
os module. No documentation for the moment. No test case is needed I think, as
the changes in issue 16255
Xavier de Gaye added the comment:
issue #16255: subrocess.Popen needs /bin/sh but Android only has /system/bin/sh
issue #16353: add function to os module for getting path to default shell
--
dependencies: +subrocess.Popen needs /bin/sh but Android only has /system/bin/sh
Xavier de Gaye added the comment:
The list of locations where '/bin/sh' is hard coded in the standard library:
Lib/distutils/tests/test_build_scripts.py|68 col 31| ("#!/bin/sh\n"
Lib/distutils/tests/test_install_scripts.py|57 col 38| write_script("shell.sh",
(&qu
Xavier de Gaye added the comment:
> I've moved the include into pyport.h
and also fixed the error in my patch, thanks :)
With issue26857.diff, importing the socket module does not fail both with an
API 21 emulator and an API 23
Xavier de Gaye added the comment:
issue #22747: Interpreter fails in initialize on systems where HAVE_LANGINFO_H
is undefined
--
dependencies: +Interpreter fails in initialize on systems where HAVE_LANGINFO_H
is undefined
___
Python tracker
<h
Xavier de Gaye added the comment:
On linux with large file support, OSError is raised when the file system limit
is exceeded, here with ext4:
>>> f.seek(2**44 - 2**11)
Traceback (most recent call last):
File "", line 1, in
OSError: [Errno 22] Invalid argument
>&
Xavier de Gaye added the comment:
test_getgroups is ok on an android emulator running API 23 with the attached
patch, and the test is skipped when running API 21.
--
dependencies: +add is_android in test.support to detect Android platform
-android: add platform.android_ver()
keywords
Xavier de Gaye added the comment:
f.seek(number) raises ValueError (ValueError: cannot fit 'int' into an
offset-sized integer) when 'number' is greater than the size allowed by off_t.
ValueError is not handled in test_mmap to detect that large file is not
support
Xavier de Gaye added the comment:
This patch skips the large file support test.
--
dependencies: +add is_android in test.support to detect Android platform
Added file: http://bugs.python.org/file42941/skip-large-file.patch
___
Python tracker
<h
Xavier de Gaye added the comment:
Size of off_t is also 4 when building on API 23 with or without
'-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1'
added to the CC envt variable.
--
___
Python tracker
<http://bu
Xavier de Gaye added the comment:
New patch test.asyncio_2.patch uses test.support.is_android and adds a
dependency to issue #27027.
--
dependencies: +add is_android in test.support to detect Android platform
Added file: http://bugs.python.org/file42940/test.asyncio_2.patch
Xavier de Gaye added the comment:
An improvement to Python startup time on Android (Android does not have
nl_langinfo()) is to have _bootlocale.getpreferredencoding() return 'ascii'
without importing locale, when none of the locale environment variables is set.
With patch
Xavier de Gaye added the comment:
Sorry for the confusion, the file system encoding is not the locale encoding.
In issue #9548, Antoine proposed a patch that avoids the import of the re,
collections and functools modules by the _io module on startup, by refactoring
and moving code from locale
Xavier de Gaye added the comment:
No, regular users can't adjust dependencies, but I can now. Thanks Zachary.
--
___
Python tracker
<http://bugs.python.org/is
Changes by Xavier de Gaye :
--
dependencies: +Large files are not supported on Android, RTLD_* macros are not
defined on Android, add is_android in test.support to detect Android platform,
android: test_cmd_line fails, android: test_concurrent_futures fails, android
Changes by Xavier de Gaye :
--
dependencies: +add is_android in test.support to detect Android platform
___
Python tracker
<http://bugs.python.org/issue26
901 - 1000 of 1492 matches
Mail list logo