[issue32484] ImportError for gdbm 1.14

2018-01-02 Thread Chi Hsuan Yen

Chi Hsuan Yen <yan12...@gmail.com> added the comment:

I can confirm a rebuild fixes _gdbm for Python 3.6.4.

This is also a bug in gdbm - it should bump soname (gdbm.so.4 => gdbm.so.5) for 
such an ABI incompatibility. I've sent a report to gdbm developers.

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32484>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32484] ImportError for gdbm 1.14

2018-01-02 Thread Chi Hsuan Yen

Change by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32484>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32401] No module named '_ctypes'

2017-12-21 Thread Chi Hsuan Yen

Chi Hsuan Yen <yan12...@gmail.com> added the comment:

Most likely the same issue as issue31652. Passing --without-ensurepip to 
./configure is a workaround.

--
nosy: +Chi Hsuan Yen

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32401>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29556] Remove unused #include

2017-11-24 Thread Chi Hsuan Yen

Chi Hsuan Yen <yan12...@gmail.com> added the comment:

As https://github.com/python/cpython/pull/98 is merged, this issue is fixed. 
Thanks haypo for the review!

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29556>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26467] Add async magic method support to unittest.mock.Mock

2017-11-04 Thread Chi Hsuan Yen

Change by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue26467>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31916] ensurepip not honoring value of $(DESTDIR) - pip not installed

2017-10-31 Thread Chi Hsuan Yen

Chi Hsuan Yen <yan12...@gmail.com> added the comment:

This is a pip bug https://github.com/pypa/pip/issues/3063

--
nosy: +Chi Hsuan Yen

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31916>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31813] python -m enshure pip stucks

2017-10-19 Thread Chi Hsuan Yen

Chi Hsuan Yen <yan12...@gmail.com> added the comment:

Might be caused by this bug: https://github.com/pypa/pip/issues/3532

pip uses lockfile, and lockfile uses hard links, which are prohibited on newer 
Android versions unless you're root. A workaround is configuring python with 
|./configure --without-ensurepip|.

--
nosy: +Chi Hsuan Yen

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31813>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31769] configure includes user CFLAGS when detecting pthreads support

2017-10-12 Thread Chi Hsuan Yen

Change by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31710] setup.py: _ctypes won't getbuilt when system ffi is only in $PREFIX

2017-10-06 Thread Chi Hsuan Yen

Chi Hsuan Yen <yan12...@gmail.com> added the comment:

> even if cflags/ldflags are ok 

Might be this. setup.py doesn't use -I flags in $CFLAGS. It looks into 
$CPPFLAGS only.

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31710>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Chi Hsuan Yen

Chi Hsuan Yen <yan12...@gmail.com> added the comment:

IIRC bugs of bugs.python.org should go to 
http://psf.upfronthosting.co.za/roundup/meta/

--
nosy: +Chi Hsuan Yen

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31605>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29442] Replace optparse with argparse in setup.py

2017-09-26 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Thanks to Serhiy Storchaka's work in issue 30152, this patch can be simplified. 
I've rebased my branch and updated the pull request.

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29442>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10496] Python startup should not require passwd entry

2017-09-18 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue10496>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2017-04-24 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue29442] Replace optparse with argparse in setup.py

2017-04-22 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I guess you were asking whether the newly compiled Python binary is able to 
build extension modules or not? I rebased PR 139 against the latest git master 
and seems it's fine. Running `make distclean`, `./configure` and then `make` 
builds all modules as expected. The result is the same on Travis CI and 
Appveyor.

About "elegant": I guess the only issue regarding elegancy in my patch is the 
local import in  GNUTranslations._parse(). For me moving setup.py away from 
deprecated modules is a good reason for introducing local imports. Does it 
sound OK?

--

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



[issue28491] Remove bundled libffi for OSX

2017-03-15 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Update: my pull request at https://github.com/libffi/libffi/pull/288 is merged. 
Future libffi releases don't need pkg-config anymore. However, I guess the 
system copy won't be updated in near future.

--

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



[issue29779] New environment variable PYTHONHISTORY

2017-03-12 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

That's a great feature! Here's a question: what should be CPython's behavior 
when PYTHONHISTORY is explicitly set to empty? Currently there's an error:

$ PYTHONHISTORY= ./python
Python 3.7.0a0 (master:f6595983e08fe20cf06a2535d74d912c6dbb044f, Mar 12 2017, 
19:22:29) 
[GCC 6.3.1 20170306] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
Error in atexit._run_exitfuncs:
FileNotFoundError: [Errno 2] No such file or directory

Maybe it's better to just disable the history functionality in this case?

By the way, seems comments starting from 
https://github.com/python/cpython/pull/473/files#diff-f34a16518c608b2ca946d3f5ca0a1942R419
 should be updated too.

--

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



[issue29779] New environment variable PYTHONHISTORY

2017-03-12 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-03-04 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I've just tried with the latest git-master. With NDK r13b and my build scripts, 
[1] test_curses passed.

shell@ASUS_Z00E_2:/data/local/tmp $ python3.7m -m test test_curses -u curses   
Run tests sequentially
0:00:00 [1/1] test_curses
1 test OK.

Total duration: 1 sec
Tests result: SUCCESS
abcshell@ASUS_Z00E_2:/data/local/tmp $ 

By the way, with NDK r14 and unified headers, [2] the test also passed. Note 
that this configuration is not officially supported by CPython yet. (issue29040)

[1] https://github.com/yan12125/python3-android/tree/ndk-r13
[2] https://github.com/yan12125/python3-android/tree/master

--

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



[issue29708] support reproducible Python builds

2017-03-04 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue28747] Expose SSL_CTX_set_cert_verify_callback

2017-02-24 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue20916] ssl.enum_certificates() will not return all certificates trusted by Windows

2017-02-24 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-02-22 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> Is tmpfile() available on Android?

Yes. Just tried it with Android NDK r13 with clang and API 21 (Android 5.0). 
Here's the source code test.c:

#include 

int main()
{
FILE *fp = NULL;
char c = '\0';

fp = tmpfile();
fprintf(fp, "123\n");
scanf("%c", );
fclose(fp);
return 0;
}

Compilation command:

/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target 
aarch64-none-android-linux -gcc-toolchain 
/opt/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 
--sysroot /opt/android-ndk/platforms/android-21/arch-arm64/usr -pie test.c

(didn't test gcc as it's declared as 'deprecated' in NDK)

Before scanf() returns, the temporary file is already deleted:

shell@ASUS_Z00E_2:/ $ ls -l /proc/19300/fd 
lrwx-- shellshell 2017-02-22 15:21 0 -> /dev/pts/0
lrwx-- shellshell 2017-02-22 15:21 1 -> /dev/pts/0
lrwx-- shellshell 2017-02-22 15:21 2 -> /dev/pts/0
lrwx-- shellshell 2017-02-22 15:20 3 -> 
/data/local/tmp/tmp.VguNf9sqcW (deleted)
lr-x-- shellshell 2017-02-22 15:21 9 -> /dev/__properties__

For interested, here's its implementation: 
https://android.googlesource.com/platform/bionic/+/android-5.0.0_r1/libc/bionic/tmpfile.cpp

--

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



[issue7438] Allow to use a part of subprocess module during building Python

2017-02-19 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-19 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Thanks for the response. Sorry if my previous work on Android brings confusion.

To prevent possible wasting of time in the future, I'd like to confirm myself 
for some conclusions: CPython's support for Android targets only stable 
releases of the official NDK. That includes all building time and runtime 
results. I guess that's the current policy? Thanks in advance for any further 
replies.

--

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



[issue29442] Replace optparse with argparse in setup.py

2017-02-19 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I see your points. Indeed in many times I didn't think carefully before leaving 
a comment, and not even noticing that my comments can be offensive afterwards. 
I apologize for all those cases and I'll be more careful when interacting with 
others in the future.

@Xavier: I'm gratitude for your patience on taking so much time explaining what 
I've done wrong. It's an invaluable course.

Let me change the title of this issue first. That will make it more moderate 
and also clearer.

--
title: Use argparse and drop dirty optparse hacks in setup.py -> Replace 
optparse with argparse in setup.py

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> Any reason why you do omit mentioning these important facts in the issue ?

Both in the title of this issue and that PR, I mention "NDK r14 beta 2". I'm 
not sure what you're referring to. On IRC, irker states the title first and 
then the comment content. I believe people will read the title first to 
determine whether they're interested or not. On email notifications of b.p.o 
and Github updates, the title is used as the email subject, so people can 
determine whether they want to see this email fast.

> Maybe you think that Stephan, Victor and the other readers are aware of this ?

As explained above, I've already stated "beta" clearly

> What about the time they waste reading this issue and your PR when this issue 
> does not make sense with the NDK we are using (NDK r13) and is just a waste 
> of time now ?

For me, reading the title takes a few seconds. If a developer thinks there's no 
need to support beta platforms, they can just ignore it.

> Why do you publish a PR ?

This is a real issue. Usually NDK beta 2 is almost identical to the final 
release. For me it's good to fix things as soon as possible. There are some 
other examples for beta toolchains like issue1465, issue27806 or issue27596.

If you think issues on beta should be postponed until the final release, I can 
keep my patches locally and submit them later.

--

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Well, I have to commit changes to configure and pyconfig.h, otherwise Travis 
tests fail. Maybe .travis.yml should call autoreconf first.

--

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I've improved the patch and submitted it as PR 159. Now on Android:

1. _locale is built
2. _locale has several symbols, including CODESET
3. _locale doesn't have nl_langinfo()

Basically _locale maps what langinfo.h does. On Android langinfo.h has several 
#defines like CODESET but nl_langinfo() is missing from langinfo.h and libc.so.

On my ASUS ZE500KL, both test_locale and test_site (see: issue28596) pass.

--

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-18 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
pull_requests: +124

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



[issue29591] Various security vulnerabilities in bundled expat

2017-02-17 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-02-17 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Here are test results for PR 53:

shell@ASUS_Z00E_2:/data/local/tmp $ python3.7m -m test -u curses test_curses
Run tests sequentially
0:00:00 [1/1] test_curses
1 test OK.

Total duration: 1 sec
Tests result: SUCCESS
abcshell@ASUS_Z00E_2:/data/local/tmp $ 

I know little about the C API. Just a question: isn't 
PyImport_ImportModuleNoBlock deprecated?

--

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



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-16 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


Removed file: http://bugs.python.org/file46511/setup-argparse.patch

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



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-16 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Now I have a working patch at PR 139, and dropping optparse is still the way to 
go, so I reopen it.

I'm not familiar with CPython conventions. Sorry if reopening an issue is 
impolite.

--
resolution: not a bug -> 
status: closed -> open

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



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-16 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
pull_requests: +99

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



[issue29567] Allow argparse to be used in setup.py

2017-02-16 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

As PR 119 is closed, I'll continue this in issue29442

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

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



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-15 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Aha the fix is simple => issue29567

--

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



[issue29567] Allow argparse to be used in setup.py

2017-02-15 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
pull_requests: +78

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



[issue29567] Allow argparse to be used in setup.py

2017-02-15 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

When proposing a fix for issue29442, I got another issue - argparse can't be 
used in setup.py for native (non-cross) builds because argparse imports gettext 
and gettext imports struct. I'll propose a fix for that.

--
components: Build
messages: 287854
nosy: Chi Hsuan Yen
priority: normal
severity: normal
status: open
title: Allow argparse to be used in setup.py
type: enhancement
versions: Python 3.7

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



[issue24665] CJK support for textwrap

2017-02-14 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Some CJK character are marked as "ambiguous width". Seems in this patch 
ambiguous characters are assumed as narrow. Maybe it's better to document it?

--
nosy: +Chi Hsuan Yen

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



[issue29556] Remove unused #include

2017-02-14 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
title: Remove an unused #include from bltinmodule.c -> Remove unused #include 


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



[issue29556] Remove an unused #include from bltinmodule.c

2017-02-14 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Hmmm, seems there are more redundant #include ; let me check one by 
one

--

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



[issue29556] Remove an unused #include from bltinmodule.c

2017-02-14 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
pull_requests: +58

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



[issue29556] Remove an unused #include from bltinmodule.c

2017-02-14 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

This #include is added in b744ba1d14c5487576c95d0311e357b707600b47 (issue8610) 
and later the use of CODESET is removed in 
d64e8a75e5138d5e5970f0c70995ae5cc377c421 (issue9642).

Found this in investigating issue29436

Add haypo as both commit is written by you

--
components: Build
messages: 287780
nosy: Chi Hsuan Yen, haypo
priority: normal
severity: normal
status: open
title: Remove an unused #include from bltinmodule.c
type: enhancement
versions: Python 3.7

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



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-13 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

You're right. argparse has indirect dependency on dynamic modules so it can't 
be used in setup.py. Cross builds use prebuilt Python binaries so there's no 
problem. Sorry for those noises.

I still think it's a dirty hack as it limits scalability and brings lots of 
problems when adding new features, but I can't find a good way to remove it :(

--

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



[issue29538] bugs.python.org does not redirect to HTTPS

2017-02-13 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

>From CPython's developer guide [1]:

"Issues about the tracker should be reported to the meta tracker."

> which doesn't support HTTPS at all

I don't know where I should go for issues about the meta tracker. Maybe a 
meta-meta tracker? :D

[1] http://cpython-devguide.readthedocs.io/tracker.html

--

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



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-13 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I have used my old patch several days on Android, and it seems quite fine. 
Anyway that's not important anymore.

--

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



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-13 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I've found a simpler patch set for supporting Android builds, so I don't need 
this patch anymore. If you don't think it's necessary, just close it.

> usage of os.system() in some places

I'm indeed sick with them :D

--

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



[issue29541] Python3 error while building on Alt-F

2017-02-13 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

That's super strange. crypt() is used in _crypt module only, and this modules 
is not used elsewhere in Python. A few more tests may help diagnostics

1. What's the result of ```./python -E```?
2. Does `import crypt` run fine in ./python?
3. Are there pre-installed Python on Alt-F? Uninstall them first may help
4. Is there a symbol called crypt in `nm ./python`?

--

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



[issue29538] bugs.python.org does not redirect to HTTPS

2017-02-13 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Duplicate of http://psf.upfronthosting.co.za/roundup/meta/issue463

--
nosy: +Chi Hsuan Yen

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



[issue29541] Python3 error while building on Alt-F

2017-02-13 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

My patch at https://hg.python.org/cpython/rev/ca2f024ce7cb may help. It points 
out missing symbols earlier.

--
nosy: +Chi Hsuan Yen

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



[issue27640] add the '--disable-test-suite' option to configure

2017-02-10 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-02-10 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Just tried boot-flag.patch with 
https://github.com/python/cpython/commit/16e07881bd3867d471dd0a25c5117672b65c90ee.
 Doesn't work out-of-box:

#./Programs/_freeze_importlib \
./Lib/importlib/_bootstrap.py Python/importlib.h
/bin/sh: line 1: ./Lib/importlib/_bootstrap.py: Permission denied
make: *** [Makefile:749: Python/importlib.h] Error 126

My fix is: merge the two lines into a single one. See my attached patch.

By the way, the BOOT hack is quite similar to GENERATED_COMMENT in introduced 
in issue27641. Maybe they can merge?

My environment:

* Arch Linux x86_64
* /bin/sh symlinks to bash, which is 4.4.12
* GNU Make 4.2.1

--
nosy: +Chi Hsuan Yen
Added file: http://bugs.python.org/file46620/boot-flag.patch

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



[issue29439] _decimal on Android requires linking with libm

2017-02-07 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Actually my device is 6.0. Seems there's nothing interesting between API 23 and 
24 on android-changes-for-ndk-developers.md :)

Anyway, _decimal should not depend on the whether the python binary references 
to libm.so or not. Instead, _decimal should explicitly have an explicit 
DT_NEEDED entry to libm.so if it uses symbols from libm.

> Strange that on other systems the compilers don't complain (usually they do).

I guess on most system python is built with --enable-shared, so _decimal.so has 
an entry to libpython3.7m.so, and the latter references libm.so. If a linker 
supports recursive search, it can find the symbol.

For future references, here's the partial output of logcat when I run python 
with `LD_DEBUG=3 python3.7m` and import _decimal:

02-07 19:43:25.697  1026610266 linker  D  DEBUG: 
/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_decimal.cpython-37m.so: 
looking up log10 in python3.7m (from global group)
02-07 19:43:25.697  1026610266 linker  I  SEARCH log10 in 
python3.7m@0x55634f3000 h=735a40(elf) 452
02-07 19:43:25.697  1026610266 linker  I  NOT FOUND log10 
in python3.7m@0x55634f3000 735a40 452
02-07 19:43:25.698  1026610266 linker  D  DEBUG: 
/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_decimal.cpython-37m.so: 
looking up log10 in /system/vendor/lib64/libNimsWrap.so (from global group)
02-07 19:43:25.698  1026610266 linker  I  SEARCH log10 in 
/system/vendor/lib64/libNimsWrap.so@0x7f7c5fb000 (gnu)
02-07 19:43:25.698  1026610266 linker  I  NOT FOUND log10 
in /system/vendor/lib64/libNimsWrap.so@0x7f7c5fb000
02-07 19:43:25.698  1026610266 linker  D  DEBUG: 
/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_decimal.cpython-37m.so: 
looking up log10 in 
/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_decimal.cpython-37m.so 
(from local group)
02-07 19:43:25.698  1026610266 linker  I  SEARCH log10 in 
/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_decimal.cpython-37m.so@0x7f7c157000
 h=735a40(elf) 49
02-07 19:43:25.698  1026610266 linker  I  NOT FOUND log10 
in 
/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_decimal.cpython-37m.so@0x7f7c157000
 735a40 49
02-07 19:43:25.698  1026610266 linker  D  DEBUG: 
/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_decimal.cpython-37m.so: 
looking up log10 in libdl.so (from local group)
02-07 19:43:25.698  1026610266 linker  I  SEARCH log10 in 
libdl.so@0x0 h=735a40(elf) 0
02-07 19:43:25.698  1026610266 linker  I  NOT FOUND log10 
in libdl.so@0x0 735a40 0
02-07 19:43:25.698  1026610266 linker  D  DEBUG: 
/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_decimal.cpython-37m.so: 
looking up log10 in /system/lib64/libc.so (from local group)
02-07 19:43:25.698  1026610266 linker  I  SEARCH log10 in 
/system/lib64/libc.so@0x7f7c4f6000 (gnu)
02-07 19:43:25.698  1026610266 linker  I  NOT FOUND log10 
in /system/lib64/libc.so@0x7f7c4f6000
02-07 19:43:25.698  1026610266 linker  D  DEBUG: cannot 
locate symbol "log10" referenced by 
"/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_decimal.cpython-37m.so"...

And BioniC's linker only checks HASH table of ELF: 
https://android.googlesource.com/platform/bionic/+/master/linker/linker_soinfo.cpp#277,
 so log10 is not found in python3.7m

> This is misleading

Maybe it is. I mean "I didn't write a patch for _decimal at issue21668 as 
_decimal didn't build then"

> Perhaps test_decimal should fail for CPython if _decimal can't be imported.

I create a simple script to ensure all installed dynamic modules can be 
imported: 
https://github.com/yan12125/python3-android/blob/master/devscripts/import_all.py.
 It may be worth to transform it into a proper unittest and put it into 
Lib/test/

--

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



[issue27659] Prohibit implicit C function declarations

2017-02-06 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> If yes, can we close the issue?

Yes and thanks! As a side note, on Android it prevents broken 
grp.cpython-37m.so, too.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

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



[issue29440] _dbm requires -lgdbm if gdbm is built as static libraries

2017-02-04 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Sorry, -lgdbm should come after -lgdbm_compat, or symbols in libgdbm.a are 
still not resolved. I don't know why - linking is a magic :(

--
Added file: http://bugs.python.org/file46517/gdbm.patch

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



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-03 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

The change is clear and self-explained. See the patch.

Motivations:

1. The hack "To prevent optparse from raising an exception..." works for single 
letter flags (-I, -L, etc.) only. I plan to add --sysroot related codes for 
Android builds and I don't want more hacks. Apparently argparse does not need 
this hack as it can parse all known flags before throwing an error
2. optparse is deprecated

Add the developer that introduced this hack. Also Serhiy, who sseems interested 
in removing optparse from the code base. (issue18973, issue18971)

--
components: Build
files: setup-argparse.patch
keywords: patch
messages: 286922
nosy: Chi Hsuan Yen, brett.cannon, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use argparse and drop dirty optparse hacks in setup.py
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file46511/setup-argparse.patch

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



[issue29440] _dbm requires -lgdbm if gdbm is built as static libraries

2017-02-03 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Add the developer who wrote this line (issue15044)

--
nosy: +ncoghlan

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



[issue29440] _dbm requires -lgdbm if gdbm is built as static libraries

2017-02-03 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

In setup.py, _dbm links to gdbm_compat only. If gdbm is built as dynamic 
libraries, libgdbm_compat.so has a NEEDED flag for libgdbm.so, so both symbols 
in libgdbm and libgdbm_compat can be used. However, as static libraries does 
not provide such a flag, importing _dbm raises ImportError:

shell@ASUS_Z00E_2:/data/local/tmp $ python3.7m -c 'import _dbm'
Traceback (most recent call last):
  File "", line 1, in 
ImportError: dlopen failed: cannot locate symbol "gdbm_errno" referenced by 
"/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_dbm.cpython-37m.so"...

gdbm_errno is a symbol in libgdbm.a.

gdbm manual [1] suggests linking to both libraries, too.

[1] http://www.gnu.org.ua/software/gdbm/manual/html_node/Compatibility.html

--
components: Build
files: gdbm.patch
keywords: patch
messages: 286907
nosy: Chi Hsuan Yen
priority: normal
severity: normal
status: open
title: _dbm requires -lgdbm if gdbm is built as static libraries
type: compile error
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46507/gdbm.patch

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



[issue29439] _decimal on Android requires linking with libm

2017-02-03 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

Just like issue21668, _decimal requires -lm on Android. This wasn't fixed 
because _decimal didn't build before issue26846 lands. More specificially, 
log10 is called 
https://hg.python.org/cpython/file/tip/Modules/_decimal/libmpdec/mpdecimal.c#l7862

Added _decimal and Android experts

--
components: Cross-Build
files: decimal.patch
keywords: patch
messages: 286906
nosy: Alex.Willmer, Chi Hsuan Yen, skrah, xdegaye
priority: normal
severity: normal
status: open
title: _decimal on Android requires linking with libm
type: behavior
versions: Python 3.7
Added file: http://bugs.python.org/file46506/decimal.patch

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-03 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Here's a copy of $ANDROID_NDK/sysroot/usr/include/langinfo.h. (/sysroot/ stores 
unified headers [1]) To use those headers correctly, packagers have to add 
-D__ANDROID_API__=XY to CPPFLAGS. On the other hand, __ANDROID_API_FUTURE__ is 
defined in $ANDROID_NDK/sysroot/usr/include/android/api-level.h:

/*
 * Magic version number for a current development build, which has
 * not yet turned into an official release.
 */
#ifndef __ANDROID_API_FUTURE__
#define __ANDROID_API_FUTURE__ 1
#endif

As a result nl_langinfo() does not exist in all real API versions.

[1] 
https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md

--
Added file: http://bugs.python.org/file46504/langinfo.h

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-03 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

Since Android NDK r14 beta 2, unified headers provide langinfo.h but there's no 
nl_langinfo() in it, causing linking failures:

libpython3.7m.a(pylifecycle.o): In function `get_locale_encoding':
/home/yen/Projects/python3-android/src/cpython/Python/pylifecycle.c:234: 
undefined reference to `nl_langinfo'
libpython3.7m.a(fileutils.o): In function `_Py_device_encoding':
/home/yen/Projects/python3-android/src/cpython/Python/fileutils.c:65: undefined 
reference to `nl_langinfo'
libpython3.7m.a(_localemodule.o): In function `PyLocale_nl_langinfo':
/home/yen/Projects/python3-android/src/cpython/./Modules/_localemodule.c:447: 
undefined reference to `nl_langinfo'

Or compiler errors due to implicit function declarations if the patch at 
issue22747 is applied.

nl_langinfo.patch fixes it by adding some extra guarding macros.

Added some people from issue22747 to the nosy list, where the last change about 
langinfo.h and Android occurred.

--
components: Build
files: nl_langinfo.patch
keywords: patch
messages: 286877
nosy: Chi Hsuan Yen, haypo, skrah, xdegaye
priority: normal
severity: normal
status: open
title: Compilation failure against Android NDK r14 beta 2
type: compile error
versions: Python 3.7
Added file: http://bugs.python.org/file46503/nl_langinfo.patch

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



[issue27659] Prohibit implicit C function declarations

2017-02-02 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Hello, any updates here? I hope this merged soon so that potential issues on 
obscure platforms can be fixed as soon as possible.

--

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



[issue29397] linux/random.h present but cannot be compiled

2017-02-01 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Could you upload a copy of config.log?

Also added developers that play in random.h games

--
components: +Build
nosy: +Chi Hsuan Yen, benjamin.peterson, haypo

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



[issue29308] venv should match virtualenv VIRTUAL_ENV_DISABLE_PROMPT config

2017-01-18 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +vinay.sajip

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



[issue27659] Prohibit implicit C function declarations

2017-01-16 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Thanks for the comment and sorry for the mistake. Here's another updated patch.

In PEP7:

> Use 4-space indents and no tabs at all.

Does that apply to configuration files, too?

--
Added file: 
http://bugs.python.org/file46302/prohibit-implicit-function-declarations.patch

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



[issue29264] sparc/ffi.c:440 error: 'asm' undeclared

2017-01-14 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Since Python 3.6, building ctypes with bundled libffi is deprecated. Please 
build libffi separately and configure CPython with --with-system-ffi.

This issue can be closed as third-party.

--
nosy: +Chi Hsuan Yen

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



[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2017-01-12 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Here's a new patch using fake library names.

And thanks for those related issues about asdl_c.py!

--
Added file: http://bugs.python.org/file46273/issue29082_3.patch

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



[issue29240] Implementation of the PEP 540: Add a new UTF-8 mode

2017-01-12 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-01-06 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I guess replace mkstemp (C function) with tempfile.mkstemp (Python function) 
can solve the problem.

--
nosy: +Chi Hsuan Yen

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



[issue26851] android compilation and link flags

2017-01-05 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> Note that the system libffi must also be compiled with these same flags

Just tried. With my packaging scripts, CPython on ARM is compiled with 
-mfloat-abi=softfp -mfpu=vfpv3-d16 while libffi not. test_ctypes pass as usual. 
Maybe ctypes test suite is not complete?

And by the way, if all packages on a system should be compiled with the same 
set of flags, shouldn't those flags specified in build/package scripts rather 
than Makefile of individual packages?

--

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



[issue29128] No way to instsall win32com on python 3.6

2017-01-02 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

https://github.com/pywin32/pypiwin32/pull/2

Anyway this is not a Python issue but pywin32's.

--
nosy: +Chi Hsuan Yen

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



[issue29057] Compiler failure on Mac OS X - sys/random.h

2017-01-01 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Here's a how-to for reproducing this bug on Sierra:

1. Install Xcode 7.3.1 (All 7.x should be fine)
2. ./configure 
--enable-universalsdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
3. make

On Benjamin's question:

> why does configure define HAVE_SYS_RANDOM_H if including sys/random.h causes 
> an error?

autoconf defines several "default includes". For example in line 592 of 
configure:

#ifdef HAVE_SYS_TYPES_H
# include 
#endif

And in line 5559:

# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
  inttypes.h stdint.h unistd.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" 
"$ac_includes_default
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

The check for sys/random.h starts from line 7758, so sys/types.h is already 
(accidentally) included when checking it.

So, here's the fix.

--

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



[issue29057] Compiler failure on Mac OS X - sys/random.h

2017-01-01 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


Added file: http://bugs.python.org/file46109/issue29057.patch

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



[issue29057] Compiler failure on Mac OS X - sys/random.h

2017-01-01 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-31 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Oops, Parser/asdl_c.py shouldn't be included. Here's the correct patch

--
Added file: http://bugs.python.org/file46103/issue29082.patch

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



[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-31 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I finally get Windows builds working. Here's the patch.

--
Added file: http://bugs.python.org/file46102/issue29082.patch

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



[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-31 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


Removed file: 
http://bugs.python.org/file46055/LoadLibrary_revert_arg_parsing.patch

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



[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-29 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Change this line:

export CFLAGS="-I/usr/local/Cellar/openssl/1.0.2j/include/openssl"

into:

export CFLAGS="-I/usr/local/Cellar/openssl/1.0.2j/include"

--

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



[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-29 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Ah, things are quite the opposite :)

You have to set CFLAGS and LDFLAGS so that setup.py can find openssl headers 
and libraries from Homebrew. For example:

export CFLAGS="-I/usr/local/opt/openssl/include"
export LDFLAGS="-L/usr/local/opt/openssl/lib"

The reason for that is that Apple once shipped their forked OpenSSL in older 
Mac OS X versions, so Homebrew can't install OpenSSL headers and libraries to 
public paths (/usr/local/include & /usr/local/lib). On the other hand, CPython 
should not use paths in /usr/local/opt/ as it's internal details of Homebrew.

--

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



[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-28 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Did you set CFLAGS and LDFLAGS?

--
nosy: +Chi Hsuan Yen

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



[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-27 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Sorry, but I'm afraid of being unable to test it. I tried to setup a Windows 
build environment for 2.x but failed. (I've once successfully built 3.x on 
Windows for issue25939, but things seems different now :(

--
keywords: +patch
Added file: 
http://bugs.python.org/file46055/LoadLibrary_revert_arg_parsing.patch

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



[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-27 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

In issue27330, there's one more change besides fixing possible memory leaks. In 
LoadLibrary function of _ctypes: [1]

-if (!PyArg_ParseTuple(args, "O|O:LoadLibrary", , ))
+if (!PyArg_ParseTuple(args, "S|O:LoadLibrary", , ))

Before this change, both bytes and unicode objects are accepted in 
_ctypes.LoadLibrary() (Unicode objects are implicitly converted to bytes), and 
after this change only bytes objects are valid.

There are two options:
* Revert the relevant PyArg_ParseTuple.
  It's better to have fewer surprises on 2.7 branch :)
* Document the change.

I prefer the first option as in our project ```from __future__ import 
unicode_literals``` is used everywhere, and in Python 3 only Unicode objects 
are acceptable in _ctypes.LoadLibrary().

Downstream report: https://github.com/rg3/youtube-dl/issues/11540

Added the author and the reviewer in issue27330.

[1] e04c054beb53

--
components: ctypes
messages: 284081
nosy: Chi Hsuan Yen, martin.panter, serhiy.storchaka
priority: normal
severity: normal
status: open
title: In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects
type: behavior
versions: Python 2.7

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



[issue27659] Prohibit implicit C function declarations

2016-12-25 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> Would it be possible to not add this option for third party extensions?

Good suggestion. Just use $CFLAGS_NODIST instead of $BASECFLAGS.

--
Added file: 
http://bugs.python.org/file46036/prohibit-implicit-function-declarations.patch

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



[issue27659] Prohibit implicit C function declarations

2016-12-25 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

(Re-use the existing issue)

Here's a patch that tries to add -Werror=implicit-function-declaration to 
$BASECFLAGS.

This is useful for cross-compiling. When a function is missing, the error jumps 
out during the build time rather than runtime.

Tested configurations:
* Arch Linux x86_64 native build
* macOS Sierra native build
* Android ARM, API 21 cross build

I'd like to hear some ideas from macOS experts as in my memory macOS's build 
system is fragile than that on Linux.

--
components: +Build
nosy: +ned.deily, ronaldoussoren
title: Check for the existence of crypt() -> Prohibit implicit C function 
declarations
type: compile error -> enhancement
Added file: 
http://bugs.python.org/file46033/prohibit-implicit-function-declarations.patch

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



[issue29068] Fix example code for PyErr_Fetch

2016-12-25 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

Remove an extra *

The typo is there in 3.5~3.7 branches. 2.7 branch does not have this example.

Nosy the two major commiters to Python/errors.c

--
assignee: docs@python
components: Documentation
files: PyErr_Fetch-fix.patch
keywords: patch
messages: 283993
nosy: Chi Hsuan Yen, docs@python, martin.panter, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix example code for PyErr_Fetch
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46029/PyErr_Fetch-fix.patch

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



[issue29051] Improve error reporting involving f-strings (PEP 498)

2016-12-23 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

Here are the two examples I found confusing when playing with f-strings. The 
first one involves with a NameError:

$ cat test2
f'''
{
FOO
}
'''

$ python3.7m test2
Traceback (most recent call last):
  File "test2", line 5, in 
'''
NameError: name 'FOO' is not defined


It would be better if the error reporter points to the actual line of the error:

$ python3.7m test2
Traceback (most recent call last):
  File "test2", line 3, in 
FOO
NameError: name 'FOO' is not defined

The second one involves a SyntaxError:

$ cat test2 
f'''
{
a b c
}
'''

$ python3.7m test2
  File "", line 2
a b c
  ^
SyntaxError: invalid syntax

It would be better if the line number is relative to the file instead of the 
expression in f-strings:

$ python3.7m test2
  File "test2", line 3
a b c
  ^
SyntaxError: invalid syntax

By the way, external checkers like pyflakes also suffers. They rely on ASTs. 
Nodes in f-strings have their lineno relative to the {...} expression instead 
of the whole code string. For example:

import ast

code = '''
f'{LOL}'
'''

for node in ast.walk(ast.parse(code, "", "exec")):
if isinstance(node, ast.Name):
print(node.lineno)


Prints 1 instead of 2.

Another by the way, ruby reports correct line numbers:

$ cat test3 
"
#{
FOO
}
"

$ ruby test3 
test3:3:in `': uninitialized constant FOO (NameError)


$ cat test3 
"
#{
@@
}
"

$ ruby test3
test3:3: `@@' without identifiers is not allowed as a class variable name
test3:3: syntax error, unexpected end-of-input


Added the author and the primary reviewer of issue24965.

--
components: Interpreter Core
messages: 283874
nosy: Chi Hsuan Yen, eric.smith, martin.panter
priority: normal
severity: normal
status: open
title: Improve error reporting involving f-strings (PEP 498)
type: enhancement
versions: Python 3.6, Python 3.7

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



[issue29040] building Android with android-ndk-r14

2016-12-21 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Thanks for compiling up necessary changes for NDK r14! Seems that indicates 
future Python versions will require at least NDK r14 to build?

Another headache from unified headers is that it requires different --sysroot 
in compilation and linking. Currently setup.py/distutils does not cope with it 
well. See my dirty hack at [1] for an ad-hoc workaround.

[1] 
https://github.com/yan12125/python3-android/blob/master/mk/python/distutils-android-sysroot.patch

--
nosy: +Chi Hsuan Yen

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



[issue28762] configure links with lockf and F_LOCK is not declared in Android API 24

2016-12-21 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

FYI: Since Android NDK r14 beta1, F_LOCK is defined in unified headers. [1] In 
$ANDROID_NDK/sysroot/usr/include/bits/lockf.h:

#define F_ULOCK 0
#define F_LOCK 1
#define F_TLOCK 2
#define F_TEST 3

[1] 
https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md

--
nosy: +Chi Hsuan Yen

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



[issue29007] Virus detected when attempting to download numpy-1.11.3-cp35-none-win32.whl

2016-12-18 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Sorry Crys, I misclicked on SSL and I don't have the permission to revert it :/

--

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



[issue29007] Virus detected when attempting to download numpy-1.11.3-cp35-none-win32.whl

2016-12-18 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

numpy is not part of Python. Please report this to http://www.numpy.org/

--
assignee:  -> christian.heimes
components: +SSL
nosy: +Chi Hsuan Yen, christian.heimes

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



[issue28996] wcscoll is broken on Android and test_locale fails

2016-12-17 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

I'm afraid that the sentence "wcscoll/wcsxfrm have known bugs" is misleading 
for people who are not quite familiar with Android. The actual cause is that 
BioniC's setlocale() behaves differently than other platforms. Most 
implementations returns NULL if en_US.UTF-8 is not available, but BioniC 
returns C.UTF-8. I guess it's better to add some comments for the real cause on 
Android.

--
nosy: +Chi Hsuan Yen

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



[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-12-16 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue28446] pyvenv generates malformed hashbangs for scripts

2016-12-16 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Seems there are quite a few typos/copy-paste errors in the original 
steps-to-reproduce. Here are my steps on macOS:

$ ./python-build/python.exe -m venv 'aaa bbb'
$ source ./aaa\ bbb/bin/activate
$ pip
zsh: /Users/yen/tmp/aaa bbb/bin/pip: bad interpreter: "/Users/yen/tmp/aaa: no 
such file or directory

The result is similar on Linux.

Like Alex said, I don't think there's a portable solution, either, so here's a 
patch to warn users for possibly broken paths.

macOS kernel has another bug/limitation. In XNU, '#' symbol also breaks shebang:

$ ./python-build/python.exe -m venv 'aaa#bbb'
$ source ./aaa\#bbb/bin/activate
$ pip
zsh: /Users/yen/tmp/aaa#bbb/bin/pip: bad interpreter: 
/Users/yen/tmp/aaa#bbb/bin/python: no such file or directory

This is even confusing as the kernel thinks the interpreter is 
/Users/yen/tmp/aaa (everything after the first # is thrown away, see [1]) while 
zsh/bash thinks it's /Users/yen/tmp/aaa#bbb/bin/python. As a result, I add a 
warning for #, too

Some related discussions:
1. https://github.com/pypa/pip/issues/923 (pip does not support spaces in 
directories names)
2. https://github.com/pypa/virtualenv/issues/53 (Whitespace in root path of 
virtualenv breaks scripts)
3. https://github.com/pypa/virtualenv/issues/973 (bad interpreter error when 
creating virtualenv's in directories with '#' in name)

Adding venv maintainer and some macOS experts

[1] 
https://opensource.apple.com/source/xnu/xnu-3789.21.4/bsd/kern/kern_exec.c.auto.html,
 line 511

--
components: +Library (Lib)
keywords: +patch
nosy: +Chi Hsuan Yen, ned.deily, ronaldoussoren, vinay.sajip
versions: +Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45926/venv-check-path.patch

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



[issue7291] urllib2 cannot handle https with proxy requiring auth

2016-12-15 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Modify target versions to bugfix and feature branches

--
versions: +Python 3.7 -Python 2.6, Python 3.4

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



[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2016-12-15 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen <yan12...@gmail.com>:


--
nosy: +Chi Hsuan Yen

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



[issue28946] AttributeError: module 'signal' has no attribute 'SIGALRM'

2016-12-12 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Can you import _signal? And what's the output of dir(_signal)?

Another possibility is that there's another signal.py in the search path. Could 
you also paste the output of repr(signal)?

By the way, here on Arch Linux, both signal.SIGINT and signal.SIGALRM are there.

--
nosy: +Chi Hsuan Yen

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



[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2016-12-11 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Sorry I didn't read your patch carefully and it's surprising for me that you 
didn't remove/modify this line in configure.ac:

CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"

With this line left there, feature detections for _curses are broken as 
./configure check against native (/usr/include) headers, whose results make 
little sense for cross-builds.

--

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



[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2016-12-10 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

@xdegaye: no-path-to-ncursesw.patch fixes a problem yet introducing a new one. 
With that patch auto-detection of ncurses include files are broken. Now users 
have to specify the path manually even for native builds.

--

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



[issue20211] setup.py: do not add system header locations when cross compiling

2016-12-10 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

xdegaye's explanation is incorrect. The actual scene is much more complicated. 
First, let me explain why things may be broken. The wrong directory is included 
only if all of the following conditions are met:

1. PYTHON_FOR_BUILD is not installed with --prefix=/usr. A common example is 
those which are installed with pyenv. This condition is here simply because of 
`os.path.normpath(sys.base_prefix) != '/usr'`
2. The build script uses $DESTDIR convention to compile CPython
3. Header files in $DESTDIR$PREFIX/include are not equivalent to 
$PREFIX/include. Here "equivalent" means they are for the same set of 
architecture/kernel/... This is a common case when cross compiling, while a 
famous exception is the multiarch framework on Debian-based systems.

For example, if I use --prefix=/usr and DESTDIR=/tmp/python3-android/build, 
INCLUDEDIR will be /usr/include, which should not be included. On the other 
hand, if I use --prefix=/tmp/python3-android/build/usr and omit DESTDIR, 
INCLUDEDIR is correct /tmp/python3-android/build/usr/include. With $DESTDIR 
specified, the build script has the responsibility to specify 
$DESTDIR$PREFIX/include in CPPFLAGS, or CPython interpreter core won't even 
build, so skipping adding INCLUDEDIR in setup.py is safe. However, for the 
latter case (not using DESTDIR), the build script still needs to specify 
correct CPPFLAGS. I see it as a CPython limitation and worth documentation.

For Debian's multiarch framework, paths are already handled by 
add_multiarch_paths(). I'm not sure whether $PREFIX/include should still be 
included or not. (I don't use Debian-based systems)

--

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



[issue28190] Detect curses headers correctly for cross-compiling

2016-12-09 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> The only change that is needed here is to not include /usr/include/ncursesw 
> in setup.py when cross compiling

No. Lots of codes in _cursesmodule.c need to know whether it's ncursesw, 
ncurses, or SysV's curses. For example: (segments below are from unpatched 
codebase)

#if !defined(__hpux) || defined(HAVE_NCURSES_H)
/* On HP/UX 11, these are of type cchar_t, which is not an
   integral type. If this is a problem on more platforms, a
   configure test should be added to determine whether ACS_S1
   is of integral type. */
SetDictInt("ACS_S1",(ACS_S1));
SetDictInt("ACS_S9",(ACS_S9));
SetDictInt("ACS_DIAMOND",   (ACS_DIAMOND));
SetDictInt("ACS_CKBOARD",   (ACS_CKBOARD));
SetDictInt("ACS_DEGREE",(ACS_DEGREE));
SetDictInt("ACS_PLMINUS",   (ACS_PLMINUS));
SetDictInt("ACS_BULLET",(ACS_BULLET));
SetDictInt("ACS_LARROW",(ACS_LARROW));
SetDictInt("ACS_RARROW",(ACS_RARROW));
SetDictInt("ACS_DARROW",(ACS_DARROW));
SetDictInt("ACS_UARROW",(ACS_UARROW));
SetDictInt("ACS_BOARD", (ACS_BOARD));
SetDictInt("ACS_LANTERN",   (ACS_LANTERN));
SetDictInt("ACS_BLOCK", (ACS_BLOCK));
#endif

And

static int
PyCurses_ConvertToCchar_t(PyCursesWindowObject *win, PyObject *obj,
  chtype *ch
#ifdef HAVE_NCURSESW
  , wchar_t *wch
#endif
  )

So detecting ncurses's actual include path is necessary.

--

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



  1   2   3   >