[issue43718] HTTP CONNECT response not subject to debug level

2021-06-28 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Thanks Andrei, please ahead and provide the PR. You'll do it faster than I do.

--

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



[issue43718] HTTP CONNECT response not subject to debug level

2021-04-03 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

Looking at 
https://github.com/python/cpython/blob/63c69440c7adb0de1d191a8d3d100b335d5c2f81/Lib/http/client.py#L898
self.debuglevel is not passed to response_class() and for debugging purposes I 
miss to see:
> send: b'CONNECT some-host:443 HTTP/1.0\r\n'
> send: b'\r\n'
> reply: 'HTTP/1.0 502 Bad Gateway\r\n'

reply is missing. It trivial to pass the debug level.

--
components: Library (Lib)
messages: 390139
nosy: michael-o
priority: normal
severity: normal
status: open
title: HTTP CONNECT response not subject to debug level
versions: Python 3.10, Python 3.8, Python 3.9

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



[issue43717] Confusing OSError on HTTP CONNECT failure

2021-04-03 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

When working with proxies and HTTP CONNECT I came across these lines: 
https://github.com/python/cpython/blob/63c69440c7adb0de1d191a8d3d100b335d5c2f81/Lib/http/client.py#L901-L903

I truly fail to see why this is an OSError. OSErrors 
(https://docs.python.org/3/library/exceptions.html#os-exceptions) describe a 
low-level issues, but HTTP is a high level protocol. I would expect something 
like NotConnected or at least something which derives from HTTPException.

OSError is expected on socket issues only.

--
components: Library (Lib)
messages: 390138
nosy: michael-o
priority: normal
severity: normal
status: open
title: Confusing OSError on HTTP CONNECT failure
type: behavior
versions: Python 3.9

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



[issue30511] shutil.make_archive should not need to chdir (alternatively: make shutil.make_archive thread-safe)

2021-03-30 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Just wasted two hours for this. Can someone really update the documentation of 
it if this is not going to change.

--
nosy: +michael-o

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



[issue11102] configure doesn't find "major()" on HP-UX v11.31

2020-06-18 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
nosy: +michael-o

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



[issue36849] Native libcurses on HP-UX not properly detected

2019-05-08 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
keywords: +patch
pull_requests: +13099
stage:  -> patch review

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



[issue36849] Native libcurses on HP-UX not properly detected

2019-05-08 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

The module _curses fails to build because curses cannot be found on HP-UX. In 
this case, it has an unorthodox location:

> $ ll /usr/lib/hpux32/libcurses.so
lr-xr-xr-x 1 bin bin 17 2018-09-07 15:29 /usr/lib/hpux32/libcurses.so -> 
./libxcurses.so.1*

A PR is in preparation

--
components: Build
messages: 341856
nosy: michael-o
priority: normal
severity: normal
status: open
title: Native libcurses on HP-UX not properly detected
type: compile error
versions: Python 3.8

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



[issue36758] configured libdir not correctly passed to Python executable

2019-04-30 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

I do compile Python from master on HP-UX with aCC:

# echo $LDFLAGS $CPPFLAGS
-L/opt/ports/lib/hpux32 -I/opt/ports/include
UNIX_STD=1998 LDFLAGS="$LDFLAGS -lreadline" CPPFLAGS="-I$PREFIX/include/ncurses 
$CPPFLAGS" ./configure --prefix=/opt/python \
  --libdir=/opt/python/lib/hpux32 --with-system-expat 
--with-openssl=/opt/openssl

having libs in hpux32 or hpux64 is a convention on this platform. When Python 
is installed the following happens:

$ /opt/python/bin/python3
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
Python 3.8.0a3+ (default, Apr 30 2019, 12:09:29) [C] on hp-ux11
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/opt/python/lib/python38.zip', '/opt/python/lib/python3.8', 
'/opt/python/lib/lib-dynload', 
'/net/home/osipovmi/.local/lib/python3.8/site-packages', 
'/opt/python/lib/python3.8/site-packages']

I don't see hpux32 anywhere here. Though all shared objects are there.

Reconfiguring:

# echo $LDFLAGS $CPPFLAGS
-L/opt/ports/lib/hpux32 -I/opt/ports/include
UNIX_STD=1998 LDFLAGS="$LDFLAGS -lreadline" CPPFLAGS="-I$PREFIX/include/ncurses 
$CPPFLAGS" ./configure --prefix=/opt/python \
  --with-system-expat --with-openssl=/opt/openssl

gives me the expected result:
$ /opt/python/bin/python3
Python 3.8.0a3+ (default, Apr 30 2019, 12:21:15) [C] on hp-ux11
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/opt/python/lib/python38.zip', '/opt/python/lib/python3.8', 
'/opt/python/lib/python3.8/lib-dynload', 
'/net/home/osipovmi/.local/lib/python3.8/site-packages', 
'/opt/python/lib/python3.8/site-packages']
>>>

It pretty much seems like '--libdir' is not correctly passed down to the 
installation.

I can see that at least this is wrong:
./Lib/distutils/tests/test_install.py:59:libdir = 
os.path.join(destination, "lib", "python")
./Lib/distutils/command/install.py:32:'purelib': 
'$base/lib/python$py_version_short/site-packages',
./Lib/distutils/command/install.py:33:'platlib': 
'$platbase/lib/python$py_version_short/site-packages',
./Lib/distutils/command/install.py:39:'purelib': '$base/lib/python',
./Lib/distutils/command/install.py:40:'platlib': '$base/lib/python',
./Lib/sysconfig.py:23:'stdlib': 
'{installed_base}/lib/python{py_version_short}',
./Lib/sysconfig.py:24:'platstdlib': 
'{platbase}/lib/python{py_version_short}',
./Lib/sysconfig.py:25:'purelib': 
'{base}/lib/python{py_version_short}/site-packages',
./Lib/sysconfig.py:26:'platlib': 
'{platbase}/lib/python{py_version_short}/site-packages',
./Lib/sysconfig.py:35:'stdlib': '{installed_base}/lib/python',
./Lib/sysconfig.py:36:'platstdlib': '{base}/lib/python',
./Lib/sysconfig.py:37:'purelib': '{base}/lib/python',
./Lib/sysconfig.py:38:'platlib': '{base}/lib/python',
./Lib/sysconfig.py:65:'stdlib': 
'{userbase}/lib/python{py_version_short}',
./Lib/sysconfig.py:66:'platstdlib': 
'{userbase}/lib/python{py_version_short}',
./Lib/sysconfig.py:67:'purelib': 
'{userbase}/lib/python{py_version_short}/site-packages',
./Lib/sysconfig.py:68:'platlib': 
'{userbase}/lib/python{py_version_short}/site-packages',
./Lib/sysconfig.py:74:'stdlib': '{userbase}/lib/python',
./Lib/sysconfig.py:75:'platstdlib': '{userbase}/lib/python',
./Lib/sysconfig.py:76:'purelib': '{userbase}/lib/python/site-packages',
./Lib/sysconfig.py:77:'platlib': '{userbase}/lib/python/site-packages',
./configure.ac:4653:  
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
./Misc/python-config.sh.in:50:LIBDEST=${prefix_real}/lib/python${VERSION}
./Modules/getpath.c:129:wchar_t *lib_python;   /* 
"lib/pythonX.Y" */
./Modules/getpath.c:131:wchar_t zip_path[MAXPATHLEN+1];/* 
".../lib/pythonXY.zip" */
./Modules/getpath.c:520: * e.g. /usr/local/lib/python1.5 is reduced to 
/usr/local.
./Modules/getpath.c:1018:err = joinpath(calculate->zip_path, 
L"lib/python00.

[issue36734] Modules/faulthandler.c does not compile on HP-UX due to bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2

2019-04-30 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

I do not know because I haven't really tested that branch. My HP-UX PRs 
(https://github.com/python/cpython/pulls/michael-o) are still open and apply to 
master currently. We (you and me) agreed some time ago, that we go master first.

--

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



[issue36734] Modules/faulthandler.c does not compile on HP-UX due to bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2

2019-04-30 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

The memset() works as expected and compiles for me.

--

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



[issue36734] Modules/faulthandler.c does not compile on HP-UX due to bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2

2019-04-26 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

> /opt/aCC/bin/aCC -Ae  -O  -I./Include/internal  -I. -I./Include 
> -I/opt/ports/include -I/opt/ports/include  -DPy_BUILD_CORE_BUILTIN  -c 
> ./Modules/faulthandler.c -o Modules/faulthandler.o
> "./Modules/faulthandler.c", line 1373: error #2029: expected an expression
>   stack_t current_stack = {};

The fix is trivial:
> stack_t current_stack = {0};

Can also provide a PR for that.

--
components: Build
messages: 340913
nosy: gregory.p.smith, michael-o
priority: normal
severity: normal
status: open
title: Modules/faulthandler.c does not compile on HP-UX due to 
bpo-35214/1584a0081500d35dc93ff88e5836df35faf3e3e2
type: compile error
versions: Python 3.8

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



[issue14568] HP-UX local libraries not included

2019-04-26 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Please close because there is actually no /usr/local on HP-UX, System V does 
use /opt, not /usr/local.

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-10-30 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Victor, looks good to me: 0:00:26 [ 23/419/3] test_utf8_mode passed.

I don't know wether it is related, but test_unicode crash dumps here:
0:00:22 [ 16/419/2] test_unicode crashed (Exit code -11)
Fatal Python error: Segmentation fault

Current thread 0x0001 (most recent call first):
  File "/var/osipovmi/cpython/Lib/test/test_unicode.py", line 2465 in 
PyUnicode_FromFormat
  File "/var/osipovmi/cpython/Lib/test/test_unicode.py", line 2468 in 
check_format
  File "/var/osipovmi/cpython/Lib/test/test_unicode.py", line 2472 in 
test_from_format
  File "/var/osipovmi/cpython/Lib/unittest/case.py", line 610 in run
  File "/var/osipovmi/cpython/Lib/unittest/case.py", line 658 in __call__
  File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 122 in run
  File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 122 in run
  File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 122 in run
  File "/var/osipovmi/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/var/osipovmi/cpython/Lib/test/support/testresult.py", line 162 in run
  File "/var/osipovmi/cpython/Lib/test/support/__init__.py", line 1928 in 
_run_suite
  File "/var/osipovmi/cpython/Lib/test/support/__init__.py", line 2022 in 
run_unittest
  File "/var/osipovmi/cpython/Lib/test/libregrtest/runtest.py", line 175 in 
test_runner
  File "/var/osipovmi/cpython/Lib/test/libregrtest/runtest.py", line 179 in 
runtest_inner
  File "/var/osipovmi/cpython/Lib/test/libregrtest/runtest.py", line 134 in 
runtest
  File "/var/osipovmi/cpython/Lib/test/libregrtest/runtest_mp.py", line 68 in 
run_tests_worker
  File "/var/osipovmi/cpython/Lib/test/libregrtest/main.py", line 587 in _main
  File "/var/osipovmi/cpython/Lib/test/libregrtest/main.py", line 571 in main
  File "/var/osipovmi/cpython/Lib/test/libregrtest/main.py", line 627 in main
  File "/var/osipovmi/cpython/Lib/test/regrtest.py", line 46 in _main
  File "/var/osipovmi/cpython/Lib/test/regrtest.py", line 50 in 
  File "/var/osipovmi/cpython/Lib/runpy.py", line 85 in _run_code
  File "/var/osipovmi/cpython/Lib/runpy.py", line 192 in _run_module_as_main

Is that related to your PEP?

--

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



[issue12572] HP/UX compiler workarounds

2018-10-15 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

I believe this issue can be safely closed. It is a no-brainer to compile Python 
from master on HP-UX with aCC these days. It works for me at least.

--
nosy: +michael-o

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



[issue34519] Add additional aliases for HP Roman 8

2018-08-30 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Wikipedia references it: https://en.wikipedia.org/wiki/HP_Roman#Roman-8
as well as IBM on its pages: 
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.wmqfte.doc/codepages.htm

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-29 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Please close, issue fixed. Thank you very much.

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-28 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Can we backport this to 3.7 at least?

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-28 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Victor,

this looks good to me:
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ git fetch vstinner
> remote: Counting objects: 65, done.
> remote: Compressing objects: 100% (18/18), done.
> remote: Total 65 (delta 41), reused 43 (delta 37), pack-reused 10
> Unpacking objects: 100% (65/65), done.
> From https://github.com/vstinner/cpython
>  + 6171da5569...559de620d7 hpux_force_ascii -> vstinner/hpux_force_ascii  
> (forced update)
>  * [new branch]posix_locale37   -> vstinner/posix_locale37
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ git reset --hard  vstinner/hpux_force_ascii
> HEAD is now at 559de620d7 bpo-34403: On HP-UX, force ASCII for C locale
> $ gmake -j 8
> ...
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ LC_ALL=C ./python -m test -j0 -r -uall,-network
> ...
> == Tests result: FAILURE ==
> 
> 357 tests OK.
> 
> 35 tests failed:
> test_asyncio test_asyncore test_bytes test_c_locale_coercion
> test_code test_concurrent_futures test_ctypes test_devpoll
> test_distutils test_embed test_faulthandler test_fileio test_gdb
> test_httpservers test_importlib test_io test_mmap
> test_multiprocessing_fork test_multiprocessing_forkserver
> test_multiprocessing_main_handling test_multiprocessing_spawn
> test_normalization test_os test_pkg test_posix test_pty test_re
> test_signal test_socket test_subprocess test_support
> test_threading test_time test_unicode test_zlib
> 
> 26 tests skipped:
> test_curses test_dbm_gnu test_epoll test_idle test_kqueue
> test_lzma test_msilib test_ossaudiodev test_smtpnet
> test_socketserver test_spwd test_startfile test_tcl test_timeout
> test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle
> test_urllib2net test_urllibnet test_winconsoleio test_winreg
> test_winsound test_xmlrpc_net test_zipfile64
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ ./python -m test -j0 -r -uall,-network
> ...
> == Tests result: FAILURE ==
> 
> 357 tests OK.
> 
> 35 tests failed:
> test_asyncio test_asyncore test_bytes test_c_locale_coercion
> test_code test_concurrent_futures test_ctypes test_devpoll
> test_distutils test_embed test_faulthandler test_fileio test_gdb
> test_httpservers test_importlib test_io test_mmap
> test_multiprocessing_fork test_multiprocessing_forkserver
> test_multiprocessing_main_handling test_multiprocessing_spawn
> test_normalization test_os test_posix test_pty test_re
> test_readline test_signal test_socket test_subprocess test_support
> test_threading test_time test_unicode test_zlib
> 
> 26 tests skipped:
> test_curses test_dbm_gnu test_epoll test_idle test_kqueue
> test_lzma test_msilib test_ossaudiodev test_smtpnet
> test_socketserver test_spwd test_startfile test_tcl test_timeout
> test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle
> test_urllib2net test_urllibnet test_winconsoleio test_winreg
> test_winsound test_xmlrpc_net test_zipfile64
> 
> Total duration: 14 min 23 sec
> Tests result: FAILURE

The test_utf8_mode passes. Some other tests likely fail due to this Roman8 
stuff: test_re and friends. I am analyzing the failures step by step and have 
already a few fixes around. Waiting for other PRs to be merged first.

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-28 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Here is the output to your questions:
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ git checkout hpux_force_ascii
> Branch 'hpux_force_ascii' set up to track remote branch 'hpux_force_ascii' 
> from 'vstinner'.
> Switched to a new branch 'hpux_force_ascii'
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ git cherry-pick 217af1d38db3e1e875180c6fa160f0fc80e46003
> [hpux_force_ascii 7ce2927185] bpo-34403, bpo-34207: Fix 
> test_utf8_mode.test_cmd_line()
>  Author: Victor Stinner 
>  Date: Tue Aug 28 09:35:25 2018 +0200
>  1 file changed, 20 insertions(+), 11 deletions(-)
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ export CC=/opt/aCC/bin/cc ; \
>  export CXX=/opt/aCC/bin/aCC ; \
>  export LDFLAGS=-L/usr/local/lib/hpux32 ; \
>  export UNIX_STD=1998 ; \
> ./configure --prefix=/var/osipovmi/python37-testing --without-gcc 
> --with-system-expat --with-pydebug --with-openssl=/opt/openssl
> ...
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ gmake -j 8
> ...
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ ./python -m test test_utf8_mode
> Run tests sequentially
> 0:00:00 [1/1] test_utf8_mode
> test test_utf8_mode failed -- Traceback (most recent call last):
>   File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 235, in 
> test_cmd_line
> LC_ALL='C')
>   File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 214, in check
> self.assertEqual(args, ascii(expected), out)
> AssertionError: "['h\\udca7\\udce9']" != "['h\\xcf\\xd5']"
> - ['h\udca7\udce9']
> + ['h\xcf\xd5']
>  : roman8:['h\udca7\udce9']
> 
> test_utf8_mode failed
> 
> == Tests result: FAILURE ==
> 
> 1 test failed:
> test_utf8_mode
> 
> Total duration: 3 sec 58 ms
> Tests result: FAILURE
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ git diff
> diff --git a/Lib/test/test_utf8_mode.py b/Lib/test/test_utf8_mode.py
> index 5af35aed61..89c1f92615 100644
> --- a/Lib/test/test_utf8_mode.py
> +++ b/Lib/test/test_utf8_mode.py
> @@ -231,7 +231,7 @@ class UTF8ModeTests(unittest.TestCase):
> 
>  # Check that the command line is decoded from the locale encoding
>  with self.subTest(encoding=encoding):
> -check('utf8=0', [arg.decode(encoding, 'surrogateescape')],
> +check('utf8=0', [arg.decode('ascii', 'surrogateescape')],
>LC_ALL='C')
> 
>  def test_optim_level(self):
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ ./python -m test test_utf8_mode
> Run tests sequentially
> 0:00:00 [1/1] test_utf8_mode
> 
> == Tests result: SUCCESS ==
> 
> 1 test OK.
> 
> Total duration: 3 sec 65 ms
> Tests result: SUCCESS
> 
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ LC_ALL=C ./python -X utf8=0
> Python 3.8.0a0 (heads/hpux_force_ascii:7ce2927185, Aug 28 2018, 12:43:04) [C] 
> on hp-ux11
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import locale ; import sys
> >>> sys.getfilesystemencoding() ; locale.getpreferredencoding()
> 'hp-roman8'
> 'roman8'
> >>>
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $

I cannot give a qualified answer on
> Maybe Python should also force ASCII here?
but since you have figured out that the conversion is broken, one must treat is 
as such or use ASCII only and UTF-8 for the rest.

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-28 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Please see here:
> osipovmi@blnn724x:~ []
> $ uname -a
> HP-UX blnn724x B.11.31 U ia64 HP-UX
> osipovmi@blnn724x:~ []
> $ locale
> LANG=de_DE.utf8
> LC_CTYPE="de_DE.utf8"
> LC_COLLATE="de_DE.utf8"
> LC_MONETARY="de_DE.utf8"
> LC_NUMERIC="de_DE.utf8"
> LC_TIME="de_DE.utf8"
> LC_MESSAGES="de_DE.utf8"
> LC_ALL=
> osipovmi@blnn724x:~ []
> $ cc -o c_locale c_locale.c
> osipovmi@blnn724x:~ []
> $ file c_locale
> c_locale:   ELF-32 executable object file - IA64
> osipovmi@blnn724x:~ []
> $ ./c_locale
> LC_ALL: C C C C C C
> LC_CTYPE: C C C C C C
> nl_langinfo(CODESET): roman8
> byte 0x00 decoded to Unicode character U+
> byte 0x01 decoded to Unicode character U+0001
> byte 0x02 decoded to Unicode character U+0002
> byte 0x03 decoded to Unicode character U+0003
> byte 0x04 decoded to Unicode character U+0004
> byte 0x05 decoded to Unicode character U+0005
> byte 0x06 decoded to Unicode character U+0006
> byte 0x07 decoded to Unicode character U+0007
> byte 0x08 decoded to Unicode character U+0008
> byte 0x09 decoded to Unicode character U+0009
> byte 0x0A decoded to Unicode character U+000A
> byte 0x0B decoded to Unicode character U+000B
> byte 0x0C decoded to Unicode character U+000C
> byte 0x0D decoded to Unicode character U+000D
> byte 0x0E decoded to Unicode character U+000E
> byte 0x0F decoded to Unicode character U+000F
> byte 0x10 decoded to Unicode character U+0010
> byte 0x11 decoded to Unicode character U+0011
> byte 0x12 decoded to Unicode character U+0012
> byte 0x13 decoded to Unicode character U+0013
> byte 0x14 decoded to Unicode character U+0014
> byte 0x15 decoded to Unicode character U+0015
> byte 0x16 decoded to Unicode character U+0016
> byte 0x17 decoded to Unicode character U+0017
> byte 0x18 decoded to Unicode character U+0018
> byte 0x19 decoded to Unicode character U+0019
> byte 0x1A decoded to Unicode character U+001A
> byte 0x1B decoded to Unicode character U+001B
> byte 0x1C decoded to Unicode character U+001C
> byte 0x1D decoded to Unicode character U+001D
> byte 0x1E decoded to Unicode character U+001E
> byte 0x1F decoded to Unicode character U+001F
> byte 0x20 decoded to Unicode character U+0020
> byte 0x21 decoded to Unicode character U+0021
> byte 0x22 decoded to Unicode character U+0022
> byte 0x23 decoded to Unicode character U+0023
> byte 0x24 decoded to Unicode character U+0024
> byte 0x25 decoded to Unicode character U+0025
> byte 0x26 decoded to Unicode character U+0026
> byte 0x27 decoded to Unicode character U+0027
> byte 0x28 decoded to Unicode character U+0028
> byte 0x29 decoded to Unicode character U+0029
> byte 0x2A decoded to Unicode character U+002A
> byte 0x2B decoded to Unicode character U+002B
> byte 0x2C decoded to Unicode character U+002C
> byte 0x2D decoded to Unicode character U+002D
> byte 0x2E decoded to Unicode character U+002E
> byte 0x2F decoded to Unicode character U+002F
> byte 0x30 decoded to Unicode character U+0030
> byte 0x31 decoded to Unicode character U+0031
> byte 0x32 decoded to Unicode character U+0032
> byte 0x33 decoded to Unicode character U+0033
> byte 0x34 decoded to Unicode character U+0034
> byte 0x35 decoded to Unicode character U+0035
> byte 0x36 decoded to Unicode character U+0036
> byte 0x37 decoded to Unicode character U+0037
> byte 0x38 decoded to Unicode character U+0038
> byte 0x39 decoded to Unicode character U+0039
> byte 0x3A decoded to Unicode character U+003A
> byte 0x3B decoded to Unicode character U+003B
> byte 0x3C decoded to Unicode character U+003C
> byte 0x3D decoded to Unicode character U+003D
> byte 0x3E decoded to Unicode character U+003E
> byte 0x3F decoded to Unicode character U+003F
> byte 0x40 decoded to Unicode character U+0040
> byte 0x41 decoded to Unicode character U+0041
> byte 0x42 decoded to Unicode character U+0042
> byte 0x43 decoded to Unicode character U+0043
> byte 0x44 decoded to Unicode character U+0044
> byte 0x45 decoded to Unicode character U+0045
> byte 0x46 decoded to Unicode character U+0046
> byte 0x47 decoded to Unicode character U+0047
> byte 0x48 decoded to Unicode character U+0048
> byte 0x49 decoded to Unicode character U+0049
> byte 0x4A decoded to Unicode character U+004A
> byte 0x4B decoded to Unicode character U+004B
> byte 0x4C decoded to Unicode character U+004C
> byte 0x4D decoded to Unicode character U+004D
> byte 0x4E decoded to Unicode character U+004E
> byte 0x4F decoded to Unicode character U+004F
> byte 0x50 decoded to Unicode character U+0050
> byte 0x51 decoded to Unicode character U+0051
> byte 0x52 decoded to Unicode character

[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-28 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Running off: 217af1d38db3e1e875180c6fa160f0fc80e46003

> $ ./python -m test test_utf8_mode
> Run tests sequentially
> 0:00:00 [1/1] test_utf8_mode
> test test_utf8_mode failed -- Traceback (most recent call last):
>   File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 235, in 
> test_cmd_line
> LC_ALL='C')
>   File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 214, in check
> self.assertEqual(args, ascii(expected), out)
> AssertionError: "['h\\xa7\\xe9']" != "['h\\xcf\\xd5']"
> - ['h\xa7\xe9']
> + ['h\xcf\xd5']
>  : roman8:['h\xa7\xe9']
> 
> test_utf8_mode failed
> 
> == Tests result: FAILURE ==
> 
> 1 test failed:
> test_utf8_mode
> 
> Total duration: 2 sec 997 ms
> Tests result: FAILURE

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-28 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

It unfortunately does not:
> osipovmi@blnn724x:/var/osipovmi/cpython []
> $ git branch
>   3.6
>   3.7
>   bpo-14568
>   bpo-34401
>   bpo-34403
>   bpo-34412
>   bpo-34448
>   bpo-34449
>   bpo-34519
>   master
>   test_c_locale_coercion_hpux
> * utf8_cmd_line
> $ ./python -m test test_utf8_mode
> Run tests sequentially
> 0:00:00 [1/1] test_utf8_mode
> test test_utf8_mode failed -- Traceback (most recent call last):
>   File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 231, in 
> test_cmd_line
> check('utf8=0', [c_arg], LC_ALL='C')
>   File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 218, in check
> self.assertEqual(args, ascii(expected), out)
> AssertionError: "['h\\xc2\\xa7\\xc3\\xa9']" != "['h\\xf4\\xcf\\xfb\\u02cb']"
> - ['h\xc2\xa7\xc3\xa9']
> + ['h\xf4\xcf\xfb\u02cb']
>  : roman8:['h\xc2\xa7\xc3\xa9']
> 
> test_utf8_mode failed
> 
> == Tests result: FAILURE ==
> 
> 1 test failed:
> test_utf8_mode
> 
> Total duration: 2 sec 921 ms
> Tests result: FAILURE

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-28 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Victor, looking to...

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-28 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
keywords: +patch
pull_requests: +8440
stage:  -> patch review

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-28 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Now I know why this cannot with Roman 8: it contains chars which are multibyte 
in Unicode (UTF-8) which cannot be mapped into a 7-bit/8-bit encoding. 
Therefore CP1252 does not work because it has Unicode chars too. ISO-8859-1 
solely consists of single byte chars.

This test needs to be skipped on HP-UX. I will provide a patch for that.

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-27 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Wow, this is pretty surprising. The very same patch for AIX works on HP-UX 
flawlessly:

$ ./python -m test test_utf8_mode
Run tests sequentially
0:00:00 [1/1] test_utf8_mode

== Tests result: SUCCESS ==

1 test OK.

Total duration: 2 sec 769 ms
Tests result: SUCCESS


I still don't really understand why because decode() and ascii() are comparing 
apples and oranges to me.

Michael, since you provided a decent solution would you mind to extend your 
patch for HP-UX? You deserve the credits.

--

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



[issue34347] AIX: test_utf8_mode.test_cmd_line fails

2018-08-27 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Interesting is that the very same approach does not work for HP-UX even if I 
swap out the params for HP-UX:

$ ./python -m test test_utf8_mode
Run tests sequentially
0:00:00 [1/1] test_utf8_mode
test test_utf8_mode failed -- Traceback (most recent call last):
  File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 226, in 
test_cmd_line
check('utf8=0', [c_arg], LC_ALL='C')
  File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 217, in check
self.assertEqual(args, ascii(expected), out)
AssertionError: "['h\\xc3\\xa9\\xe2\\x82\\xac']" != 
"['h\\xfb\\u02cb\\xe3\\x82\\u02dc']"
- ['h\xc3\xa9\xe2\x82\xac']
+ ['h\xfb\u02cb\xe3\x82\u02dc']
 : roman8:['h\xc3\xa9\xe2\x82\xac']

--

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



[issue14568] HP-UX local libraries not included

2018-08-27 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Can someone review the PR for this?

--
nosy: +michael-o
versions: +Python 3.6, Python 3.7, Python 3.8

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



[issue34519] Add additional aliases for HP Roman 8

2018-08-27 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
keywords: +patch
pull_requests: +8431
stage:  -> patch review

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



[issue34519] Add additional aliases for HP Roman 8

2018-08-27 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

HP Roman 8 is also known as 'hp-roman8', 'cp1051' and 'ibm1051'. They are 
missing from the aliases.py.

--
components: Library (Lib)
messages: 324178
nosy: michael-o
priority: normal
severity: normal
status: open
title: Add additional aliases for HP Roman 8
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-27 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Maybe Victor Stinner has some insights here.

--
nosy: +vstinner

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-27 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Maybe skipping the test is the best thing:
diff --git a/Lib/test/test_utf8_mode.py b/Lib/test/test_utf8_mode.py
index 26e2e13ec5..d6c4b321be 100644
--- a/Lib/test/test_utf8_mode.py
+++ b/Lib/test/test_utf8_mode.py
@@ -12,7 +12,7 @@ from test.support.script_helper import assert_python_ok, 
assert_python_failure


 MS_WINDOWS = (sys.platform == 'win32')
-
+HPUX = (sys.platform.startswith('hp-ux'))

 class UTF8ModeTests(unittest.TestCase):
 DEFAULT_ENV = {
@@ -205,6 +205,7 @@ class UTF8ModeTests(unittest.TestCase):
 self.assertEqual(out, 'UTF-8 UTF-8')

 @unittest.skipIf(MS_WINDOWS, 'test specific to Unix')
+@unittest.skipIf(HPUX, 'test specific to Unix with ASCII default locale')
 def test_cmd_line(self):
 arg = 'h\xe9\u20ac'.encode('utf-8')
 arg_utf8 = arg.decode('utf-8')

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-27 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

So I changed the test code to:

diff --git a/Lib/test/test_utf8_mode.py b/Lib/test/test_utf8_mode.py
index 26e2e13ec5..d9f8a3ed8b 100644
--- a/Lib/test/test_utf8_mode.py
+++ b/Lib/test/test_utf8_mode.py
@@ -208,7 +208,7 @@ class UTF8ModeTests(unittest.TestCase):
 def test_cmd_line(self):
 arg = 'h\xe9\u20ac'.encode('utf-8')
 arg_utf8 = arg.decode('utf-8')
-arg_ascii = arg.decode('ascii', 'surrogateescape')
+arg_ascii = arg.decode('roman8', 'surrogateescape')
 code = 'import locale, sys; print("%s:%s" % 
(locale.getpreferredencoding(), ascii(sys.argv[1:])))'

 def check(utf8_opt, expected, **kw):

and the output is:
==
FAIL: test_cmd_line (test.test_utf8_mode.UTF8ModeTests)
--
Traceback (most recent call last):
  File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 224, in 
test_cmd_line
check('utf8=0', [c_arg], LC_ALL='C')
  File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 217, in check
self.assertEqual(args, ascii(expected), out)
AssertionError: "['h\\xc3\\xa9\\xe2\\x82\\xac']" != 
"['h\\xfb\\u02cb\\xe3\\x82\\u02dc']"
- ['h\xc3\xa9\xe2\x82\xac']
+ ['h\xfb\u02cb\xe3\x82\u02dc']
 : roman8:['h\xc3\xa9\xe2\x82\xac']

I still don't understand that.

I believe that surrogate escape only works for ASCII and nothing else. If so, 
this test must be skipped on HP-UX and AIX.

--

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-25 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

I think you are absoltely right.

> In any case, it seems to be broken for any system that does not have UTF-8 as 
> default.

You likely mean ASCII. Python assumes that LANG=C is ASCII which is not the 
case for AIX and HP-UX.

Your patch looks reasonable, I will try this on Monday. The problem is that 
there is no roman8 codec in Python. Maybe ISO-8859-1 will do it for the test, 
but I am still eager to add one.

> I mention this because it seems neither roman8 nor roman9 have 'official' iso 
> names or alias (correct me if I am wrong).

There are no ISO names because this is not an ISO encoding. This is an HP 
invention aka hp-roman8 (roman8, ibm-1051, r8, Cp1051).

Edit: there is roman8 support: 
https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Lib/encodings/hp_roman8.py
 as well as aliases.

There are a few aliases missing: cp1051, ibm1051 and hp-roman8. This needs an 
additonal PR.

--

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



[issue34347] AIX: test_utf8_mode.test_cmd_line fails

2018-08-25 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

This is a very thorough analysis. Kudos to that.

--
nosy: +michael-o

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



[issue34449] HP aCC complains about invalid -fPIC on HP-UX

2018-08-21 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
keywords: +patch
pull_requests: +8319
stage:  -> patch review

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



[issue34449] HP aCC complains about invalid -fPIC on HP-UX

2018-08-21 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

The compiler (HP aCC) says:

> /opt/aCC/bin/cc -Ae -b -L/usr/local/lib/hpux32 
> build/temp.hp-ux-B.11.31-ia64-3.8-pydebug/var/osipovmi/cpython/Modules/_ctypes/_ctypes.o
>  
> build/temp.hp-ux-B.11.31-ia64-3.8-pydebug/var/osipovmi/cpython/Modules/_ctypes/callbacks.o
>  
> build/temp.hp-ux-B.11.31-ia64-3.8-pydebug/var/osipovmi/cpython/Modules/_ctypes/callproc.o
>  
> build/temp.hp-ux-B.11.31-ia64-3.8-pydebug/var/osipovmi/cpython/Modules/_ctypes/stgdict.o
>  
> build/temp.hp-ux-B.11.31-ia64-3.8-pydebug/var/osipovmi/cpython/Modules/_ctypes/cfield.o
>  -L/usr/local/lib/hpux64 -L/usr/lib/hpux32 -L/usr/lib/hpux64 -L/usr/lib 
> -L/lib -L/usr/local/lib/hpux32 -L/usr/local/lib -lffi -ldl -o 
> build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so -fPIC
> cc: warning 901: unknown option: `-fPIC': use +help for online documentation.

On clang or GCC this is a compile time option, never a link option. For HP aCC 
objects must be compiled with +z -- which actually happens -- and linked with 
+b to a shared library -- which also happens here --. One can safely drop this 
switch from setup.py.

--
components: Build
messages: 323827
nosy: michael-o
priority: normal
severity: normal
status: open
title: HP aCC complains about invalid -fPIC on HP-UX
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

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



[issue34404] test_time incorrectly defined

2018-08-21 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
versions: +Python 3.6, Python 3.8

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



[issue34448] incomplete/missing message from configure.ac for usable wchar_t

2018-08-21 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
versions: +Python 3.6

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



[issue34401] Make test_gdb work on HP-UX

2018-08-21 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
versions: +Python 3.6, Python 3.8

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-21 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
versions: +Python 3.6, Python 3.8

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



[issue34448] incomplete/missing message from configure.ac for usable wchar_t

2018-08-21 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
keywords: +patch
pull_requests: +8318
stage:  -> patch review

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



[issue34448] incomplete/missing message from configure.ac for usable wchar_t

2018-08-21 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

If the wchar_t is usable on a system we get the following:

> checking for UCS-4 tcl... no
> checking whether wchar_t is signed... no
> yes
> checking whether byte ordering is bigendian... yes
> checking ABIFLAGS... dm
> checking SOABI... cpython-38dm

Yes -- that is a simple 'yes'. Dangling.

A PR is in preparation.

--
components: Build
messages: 323826
nosy: michael-o
priority: normal
severity: normal
status: open
title: incomplete/missing message from configure.ac for usable wchar_t
type: enhancement
versions: Python 3.7, Python 3.8

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



[issue14568] HP-UX local libraries not included

2018-08-20 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
pull_requests: +8308
stage:  -> patch review

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



[issue16533] HPUX: Unable to fork() in thread

2018-08-20 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Runs perfectly:
== CPython 3.8.0a0 (heads/bpo-34412:f1331c0e83, Aug 20 2018, 10:14:16) [C]
== HP-UX-B.11.31-ia64-32bit-ELF big-endian
== cwd: /var/osipovmi/cpython/build/test_python_22868
== CPU count: 4
== encodings: locale=utf8, FS=utf-8
Using random seed 4813536
Run tests in parallel using 6 child processes
0:00:02 [1/1] test_thread passed
test_barrier (test.test_thread.BarrierTest) ... waiting for tasks to end
task 0 will run for 0us
task 0 entering 0
task 1 will run for 12us
task 2 will run for 61us
task 3 will run for 31us
task 4 will run for 17us
task 7 will run for 9us
task 6 will run for 77us
task 8 will run for 95us
task 9 will run for 43us
task 5 will run for 48us
task 1 entering 0
task 2 entering 0
task 3 entering 0
task 4 entering 0
task 5 entering 0
task 7 entering 0
task 6 entering 0
task 8 entering 0
task 9 entering 0
task 9 leaving barrier
task 9 will run for 86us
task 0 leaving barrier
task 0 will run for 0us
task 0 entering 1
task 1 leaving barrier
task 1 will run for 25us
task 2 leaving barrier
task 2 will run for 59us
task 3 leaving barrier
task 3 will run for 67us
task 4 leaving barrier
task 4 will run for 91us
task 5 leaving barrier
task 5 will run for 84us
task 7 leaving barrier
task 7 will run for 22us
task 6 leaving barrier
task 6 will run for 31us
task 8 leaving barrier
task 8 will run for 12us
task 9 entering 1
task 1 entering 1
task 2 entering 1
task 3 entering 1
task 4 entering 1
task 5 entering 1
task 7 entering 1
task 6 entering 1
task 8 entering 1
task 8 leaving barrier
task 8 will run for 28us
task 0 leaving barrier
task 0 will run for 0us
task 0 entering 2
task 9 leaving barrier
task 9 will run for 87us
task 1 leaving barrier
task 1 will run for 59us
task 2 leaving barrier
task 2 will run for 82us
task 3 leaving barrier
task 3 will run for 73us
task 4 leaving barrier
task 4 will run for 11us
task 5 leaving barrier
task 5 will run for 17us
task 7 leaving barrier
task 7 will run for 98us
task 6 leaving barrier
task 6 will run for 63us
task 8 entering 2
task 9 entering 2
task 1 entering 2
task 2 entering 2
task 3 entering 2
task 4 entering 2
task 5 entering 2
task 7 entering 2
task 6 entering 2
task 6 leaving barrier
task 0 leaving barrier
task 8 leaving barrier
task 9 leaving barrier
task 1 leaving barrier
task 2 leaving barrier
task 3 leaving barrier
task 4 leaving barrier
task 5 leaving barrier
task 7 leaving barrier
tasks done
ok
test_acquire_contended (test.test_thread.LockTests) ... ok
test_acquire_destroy (test.test_thread.LockTests) ... ok
test_acquire_release (test.test_thread.LockTests) ... ok
test_constructor (test.test_thread.LockTests) ... ok
test_different_thread (test.test_thread.LockTests) ... ok
test_locked_repr (test.test_thread.LockTests) ... ok
test_reacquire (test.test_thread.LockTests) ... ok
test_repr (test.test_thread.LockTests) ... ok
test_state_after_timeout (test.test_thread.LockTests) ... ok
test_thread_leak (test.test_thread.LockTests) ... ok
test_timeout (test.test_thread.LockTests) ... ok
test_try_acquire (test.test_thread.LockTests) ... ok
test_try_acquire_contended (test.test_thread.LockTests) ... ok
test_weakref_deleted (test.test_thread.LockTests) ... ok
test_weakref_exists (test.test_thread.LockTests) ... ok
test_with (test.test_thread.LockTests) ... ok
test_forkinthread (test.test_thread.TestForkInThread) ... ok
test__count (test.test_thread.ThreadRunningTests) ... ok
test_nt_and_posix_stack_size (test.test_thread.ThreadRunningTests) ... caught 
expected ValueError setting stack_size(4096)
successfully set stack_size(262144)
successfully set stack_size(1048576)
successfully set stack_size(0)
trying stack_size = (262144)
creating task 1
creating task 2
creating task 3
creating task 4
creating task 5
creating task 6
creating task 7
creating task 8
creating task 9
creating task 10
waiting for all tasks to complete
task 1 will run for 86us
task 2 will run for 62us
task 3 will run for 67us
task 4 will run for 61us
task 5 will run for 52us
task 6 will run for 2us
task 7 will run for 1us
task 8 will run for 31us
task 9 will run for 12us
task 10 will run for 22us
task 1 done
task 2 done
task 3 done
task 4 done
task 5 done
task 6 done
task 7 done
task 8 done
task 9 done
task 10 done
all tasks done
trying stack_size = (1048576)
creating task 1
creating task 2
creating task 3
creating task 4
creating task 5
creating task 6
creating task 7
creating task 8
creating task 9
creating task 10
waiting for all tasks to complete
task 1 will run for 15us
task 2 will run for 37us
task 3 will run for 12us
task 4 will run for 93us
task 5 will run for 15us
task 6 will run for 45us
task 7 will run for 67us
task 8 will run for 19us
task 9 will run for 89us
task 10 will run for 58us
task 1 done
task 2 done
task 3 done
task 4 done
task 5 done
task 6 done
task 7 done
task 8 done
task 9 done
task 10 done
all tasks done
ok
test_save_exception_state_on_error (test.test_thread.ThreadRunningTests) 

[issue1648957] HP-UX: _ctypes/libffi/src/ia64/ffi/__attribute__/native cc

2018-08-20 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Cannot verify:
$ file ./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so
./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so:  ELF-32 shared object 
file - IA64
$ ldd ./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so

./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so:
libffi.so =>/usr/local/lib/hpux32/libffi.so
libdl.so.1 =>   /usr/lib/hpux32/libdl.so.1
libc.so.1 =>/usr/lib/hpux32/libc.so.1


This issue can be closed.

--
nosy: +michael-o

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



[issue12991] Python 64-bit build on HP Itanium - Executable built successfully but modules failed with HP Compiler

2018-08-20 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Cannot reproduced on master:
export LDFLAGS="-L/usr/local/lib/hpux64 +DD64"
export CFLAGS=+DD64

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2  _curses_panel _gdbm
_lzma _sqlite3  _tkinter
_uuid ossaudiodev   readline
spwd  zlib
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc  atexitpwd
time


Failed to build these modules:
_ctypes   _dbm  _elementtree
cmath math  pyexpat


Following modules built successfully but were removed because they could not be 
imported:
_asyncio

running build_scripts
copying and adjusting /var/osipovmi/cpython/Tools/scripts/pydoc3 -> 
build/scripts-3.8
copying and adjusting /var/osipovmi/cpython/Tools/scripts/idle3 -> 
build/scripts-3.8
copying and adjusting /var/osipovmi/cpython/Tools/scripts/2to3 -> 
build/scripts-3.8
changing mode of build/scripts-3.8/pydoc3 from 640 to 755
changing mode of build/scripts-3.8/idle3 from 640 to 755
changing mode of build/scripts-3.8/2to3 from 640 to 755
renaming build/scripts-3.8/pydoc3 to build/scripts-3.8/pydoc3.8
renaming build/scripts-3.8/idle3 to build/scripts-3.8/idle3.8
renaming build/scripts-3.8/2to3 to build/scripts-3.8/2to3-3.8

$ file ./python
./python:   ELF-64 executable object file - IA64
$ ./python
Python 3.8.0a0 (heads/bpo-34412:f1331c0e83, Aug 20 2018, 09:53:38) [C] on 
hp-ux11
Type "help", "copyright", "credits" or "license" for more information.
>>>

The necessary bits are libraries in 64 bit which I have only in 32 bit.
This issue can be closed.

--
nosy: +michael-o

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



[issue34401] Make test_gdb work on HP-UX

2018-08-20 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
pull_requests: +8307
stage:  -> patch review

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



[issue5999] compile error on HP-UX 11.22 ia64 - 'mbstate_t' is used as a type, but has not been defined as a type

2018-08-18 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

I cannot reproduce this with HP-UX 11.31 and master + 3.7.

I opt to close this one.

--
nosy: +michael-o

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



[issue1648923] HP-UX: -lcurses missing for readline.so

2018-08-18 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

I cannot reproduce this with master and 3.7 on HP-UX.

readline is linked and works with interactive python(1). curses module isn't 
buld because I don't have curses installed.

I opt to close this one.

--
nosy: +michael-o

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-18 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Thanks, I'll do that. Hopefully I can provide a patch for. Though, I am 
convinced that I have to write a custom codec for roman8 to make all at stuff 
work flawlessly.

--

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



[issue34402] strftime fails on HP-UX

2018-08-18 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Thanks changed appropriately. I here also have a PR idea I will try on Monday. 
It won't be idiotproof, but someone will likely comment on it and provide more 
input.

I am willing to provide even more patches, but am currently stuck with 
https://github.com/python/cpython/pull/8786 and juggle with "git stash" to make 
Python actually compile on HP-UX. This is cumbersome.

--
title: [SOLUTION] strftime fails on HP-UX -> strftime fails on HP-UX
type: crash -> behavior

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



[issue34401] Make test_gdb work on HP-UX

2018-08-18 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

My bad, I initially had attached a patch as you can see, but will turn that 
into a PR on GitHub on Monday. That's why I had that label, but removed the 
patch.

It doesn't crash, it is rather a behavior/regex issue in the test.

Thanks for pointing out. Will get to you with a solution on Monday.

--
title: [SOLUTION] Make test_gdb work on HP-UX -> Make test_gdb work on HP-UX
type: crash -> behavior

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Bevakasha!

--

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



[issue34381] Make tests with outbound connection optional

2018-08-17 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
keywords: +patch
pull_requests: +8273
stage:  -> patch review

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-08-17 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
pull_requests: +8272

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
keywords: +patch
pull_requests: +8271
stage: needs patch -> patch review

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

A PR is in preparation.

--

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
title: selectmodule.c does not compile on HP-UX due to 
bpo-31938/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee -> selectmodule.c does not 
compile on HP-UX due to bpo-31938/6dc57e2a20c

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee

2018-08-17 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

It seems like an oversight of the author, though it is not clear why this 
happily compiles with clang 3.4.1 on FreeBSD 10.4-STABLE and GCC on RHEL6.

The error is (HP-UX 11.31 and HP C/aC++ B3910B A.06.28.03 [Dec 13 2016]):

> /opt/aCC/bin/cc -Ae +z -O -I./Include -I. -I/usr/local/include 
> -I/var/osipovmi/cpython/Include -I/var/osipovmi/cpython -c 
> /var/osipovmi/cpython/Modules/selectmodule.c -o 
> build/temp.hp-ux-B.11.31-ia64-3.8-pydebug/var/osipovmi/cpython/Modules/selectmodule.o
> "/var/osipovmi/cpython/Modules/selectmodule.c", line 412: warning #4232-D:
>   conversion from "PyObject *" to a more strictly aligned type
>   "PyDictObject *" may cause misaligned access
>   self->ufd_len = PyDict_GET_SIZE(self->dict);
>   ^
> 
> "/var/osipovmi/cpython/Modules/selectmodule.c", line 849: error #2130:
>   expected a "{"
>   static PyObject *
>   ^
> 
> "/var/osipovmi/cpython/Modules/selectmodule.c", line 898: error #2101:
>   "timeout_obj" has already been declared in the current scope
>   PyObject *result_list = NULL, *timeout_obj = NULL;
>  ^
> 
> 2 errors detected in the compilation of 
> "/var/osipovmi/cpython/Modules/selectmodule.c".


caused by:

> +static PyObject *
> +select_devpoll_modify_impl(devpollObject *self, int fd,
> +   unsigned short eventmask)
> +/*[clinic end generated code: output=bc2e6d23aaff98b4 
> input=f0d7de3889cc55fb]*/
>  static PyObject *
>  devpoll_modify(devpollObject *self, PyObject *args)
>  {
> -return internal_devpoll_register(self, args, 1);
> +return internal_devpoll_register(self, fd, eventmask, 1);
>  }

Signature change, but prototype has not been changed.

>  static PyObject *
> -poll_poll(pollObject *self, PyObject *args)
> +select_poll_poll_impl(pollObject *self, PyObject *timeout_obj)
> +/*[clinic end generated code: output=876e837d193ed7e4 
> input=7a446ed45189e894]*/
>  {
> -PyObject *result_list = NULL, *timeout_obj = NULL;
> +PyObject *result_list = NULL;
>  int poll_result, i, j;
>  PyObject *value = NULL, *num = NULL;
>  _PyTime_t timeout = -1, ms = -1, deadline = 0;
>  int async_err = 0;
> 
> -if (!PyArg_ParseTuple(args, "|O:poll", &timeout_obj)) {
> -return NULL;
> -}
> -
> -if (timeout_obj != NULL && timeout_obj != Py_None) {
> +if (timeout_obj != Py_None) {

timeout_obj has been added to the function signature, but the internal NULL 
assignment has not been removed.

--
components: Build, Library (Lib)
messages: 323640
nosy: michael-o
priority: normal
severity: normal
status: open
title: selectmodule.c does not compile on HP-UX due to 
bpo-31938/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee
type: compile error
versions: Python 3.8

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



[issue34412] strsignal(3) does not exist on HP-UX

2018-08-16 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
keywords: +patch
pull_requests: +8259
stage:  -> patch review

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



[issue34412] strsignal(3) does not exist on HP-UX

2018-08-16 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

References:
* https://github.com/google/cmockery/issues/11
* https://www.spinics.net/lists/dash/msg00547.html

--

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



[issue34412] strsignal(3) does not exist on HP-UX

2018-08-16 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

HP-UX does not provide any mappings from signals to strings. The proper 
approach is to map just like for Windows. Alternatively, one could simply 
return the singal as an int.

--
components: Library (Lib)
messages: 323600
nosy: michael-o
priority: normal
severity: normal
status: open
title: strsignal(3) does not exist on HP-UX
type: compile error
versions: Python 3.8

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



[issue34401] [SOLUTION] Make test_gdb work on HP-UX

2018-08-16 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


Removed file: https://bugs.python.org/file47749/test_gdb.patch

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



[issue34401] [SOLUTION] Make test_gdb work on HP-UX

2018-08-15 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
title: [solution] Make test_gdb work on HP-UX -> [SOLUTION] Make test_gdb work 
on HP-UX

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



[issue34381] Make tests with outbound connection optional

2018-08-15 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

That looks promising, I figured out that there is "./python -m test -h".

make test TESTOPTS="-uall,-network" works flawlessly.

I would have expected a link to https://devguide.python.org/runtests/ from 
https://github.com/python/cpython/blob/master/README.rst#testing.

So my request is just to update the rst file.

--

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



[issue34404] test_time incorrectly defined

2018-08-14 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

The proper format for int < 0 must be "%05d".

--

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



[issue34404] test_time incorrectly defined

2018-08-14 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

I see a test failure on HP-UX:
> test_negative (test.test_time.TestStrftime4dyear) ... FAIL
> ==
> FAIL: test_negative (test.test_time.TestStrftime4dyear)
> --
> Traceback (most recent call last):
>   File "/var/osipovmi/cpython/Lib/test/test_time.py", line 687, in 
> test_negative
> return super().test_negative()
>   File "/var/osipovmi/cpython/Lib/test/test_time.py", line 713, in 
> test_negative
> self.assertEqual(self.yearstr(-1), self._format % -1)
> AssertionError: '-0001' != '-001'
> - -0001
> ?  -
> + -001

The bug is in the test class, not cause by HP-UX.
Lib/test/test_time.py:713 says "self.assertEqual(self.yearstr(-1), self._format 
% -1)" where self._format is set in line 654 to "_format = '%04d'" because
> Python 3.7.0+ (heads/3.7-dirty:ea8835fb30, Aug 14 2018, 14:44:19) [C] on 
> hp-ux11
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import time
> >>> time.strftime('%Y', (1,) + (0,) * 8)
> '0001'

Unfortunately, the zero padding in printf() applies to the entire string 
length. So
> >>> "%+04d" % -1
> '-001'

on HP-UX, Linux and FreeBSD.

The format string must add an additional zero for negative numbers.

--
components: Tests
messages: 323519
nosy: michael-o
priority: normal
severity: normal
status: open
title: test_time incorrectly defined
type: behavior
versions: Python 3.7

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-14 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

Running from 3.7 branch on HP-UX 11.31 ia64, 32 bit, big endian.
The test output is:
> Re-running failed tests in verbose mode
> Re-running test 'test_utf8_mode' in verbose mode
> test_cmd_line (test.test_utf8_mode.UTF8ModeTests) ... FAIL
> test_env_var (test.test_utf8_mode.UTF8ModeTests) ... ok
> test_filesystemencoding (test.test_utf8_mode.UTF8ModeTests) ... ok
> test_io (test.test_utf8_mode.UTF8ModeTests) ... ok
> test_io_encoding (test.test_utf8_mode.UTF8ModeTests) ... ok
> test_locale_getpreferredencoding (test.test_utf8_mode.UTF8ModeTests) ... ok
> test_optim_level (test.test_utf8_mode.UTF8ModeTests) ... ok
> test_posix_locale (test.test_utf8_mode.UTF8ModeTests) ... ok
> test_stdio (test.test_utf8_mode.UTF8ModeTests) ... ok
> test_xoption (test.test_utf8_mode.UTF8ModeTests) ... ok
> 
> ==
> FAIL: test_cmd_line (test.test_utf8_mode.UTF8ModeTests)
> --
> Traceback (most recent call last):
>   File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 230, in 
> test_cmd_line
> check('utf8=0', [c_arg], LC_ALL='C')
>   File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 223, in check
> self.assertEqual(args, ascii(expected), out)
> AssertionError: "['h\\xc3\\xa9\\xe2\\x82\\xac']" != 
> "['h\\udcc3\\udca9\\udce2\\udc82\\udcac']"
> - ['h\xc3\xa9\xe2\x82\xac']
> + ['h\udcc3\udca9\udce2\udc82\udcac']
>  : roman8:['h\xc3\xa9\xe2\x82\xac']
> 
> --
> Ran 10 tests in 2.595s
> 
> FAILED (failures=1)
> test test_utf8_mode failed
> 1 test failed again:
> test_utf8_mode
> 
> == Tests result: FAILURE then FAILURE ==
> 
> 1 test failed:
> test_utf8_mode
> 
> 1 re-run test:
> test_utf8_mode
> 
> Total duration: 7 sec 265 ms
> Tests result: FAILURE then FAILURE
> Makefile:1066: recipe for target 'test' failed
> gmake: *** [test] Error 2
> 

I tried to understand the issue, but my Python knowledge is too low, especially 
I do not understand by a byte array "arg = 'h\xe9\u20ac'.encode('utf-8')" is 
passed as one arg to the forked process.

I highly assume that this is related to the non-standard, default character 
encoding on HP-UX: https://en.wikipedia.org/wiki/HP_Roman#HP_Roman-8 (roman8).

A stupid 8 bit encoding. The very same snippet on FreeBSD says:
> $ LC_ALL=C python3.6 test_utf8.py
> US-ASCII:[]

Willing to test and modify if someone tells what to do.

--
components: Library (Lib), Tests
messages: 323516
nosy: michael-o
priority: normal
severity: normal
status: open
title: test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions
type: behavior
versions: Python 3.7

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



[issue34401] [solution] Make test_gdb work on HP-UX

2018-08-14 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
title: Make test_gdb work on HP-UX -> [solution] Make test_gdb work on HP-UX

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



[issue34402] [SOLUTION] strftime fails on HP-UX

2018-08-14 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

The worst thing about wcsftime(3) is that it silently fails by not writing to 
output buffer. timemodule.c allocates more and more memory and then gives up.

--

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



[issue34402] [SOLUTION] strftime fails on HP-UX

2018-08-14 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

strftime() fails on HP-UX. It is mapped to wcsftime(3). It has a quirk on HP-UX 
that is does not conform to POSIX. To enable POSIX compat one has to do 
(excerpt from manpage):
> APPLICATION USAGE
>   The "Unix Standards Only" prototype of wcsftime() is available to
>   applications if they are:
>a. c99 conformant.
> 
>b. Compiled with -D_XOPEN_SOURCE macro with a value >=500.
> 
>c. Compiled with -D_POSIX_C_SOURCE macro with a value >= 200112.
> 
>   Also the application must be compiled with the environment variable
>   UNIX_STD set to the value 98 or above and exported.

b and c are satasfied according to config.log. Let's get to a). The manpage of 
aCC says:
>  EXTERNAL INFLUENCES
> Environment Variables
>   [...]
>   UNIX95 or UNIX_STD specify the XPG4 behavior for c89(1) and c99(1).
>   -D_XOPEN_UNIX is also set.  UNIX_STD must be set to 1995, 1998 or
>   2003.  Both these variables cause an appropriate object file to be
>   linked into executables in order to customize libc to match ISO/IEC
>   9899:1990/Amendment 1:1995 (1995) and the C++ and C99 Standards for
>   the various wide char (1998) or other C99 libc functions (2003).
>   NOTE: 2003 is only available on HP-UX 11.31.

So one must at least do "export UNIX_STD=1998".

I am quite certain that other parts of Python are affected too.

The safest bet would be actually to test wcsftime at configure time wether the 
output is fine and have this env var set in the Makefile, unfortunately, this 
will only work for GNU make. Alternatively, a warning at the very end of the 
configure run has to be printed to export this env var.

If done, test_strftime and test_teststrptime will pass flawlessly.

--
components: Library (Lib)
messages: 323512
nosy: michael-o
priority: normal
severity: normal
status: open
title: [SOLUTION] strftime fails on HP-UX
type: crash
versions: Python 3.7

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



[issue34401] Make test_gdb work on HP-UX

2018-08-14 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
type:  -> crash

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



[issue34401] Make test_gdb work on HP-UX

2018-08-14 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

Regex in test_gdb.py needs to be changed and test can continue, though will be 
skipped due to old version.

--
components: Tests
files: test_gdb.patch
keywords: patch
messages: 323508
nosy: michael-o
priority: normal
severity: normal
status: open
title: Make test_gdb work on HP-UX
versions: Python 3.7
Added file: https://bugs.python.org/file47749/test_gdb.patch

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



[issue34381] Make tests with outbound connection optional

2018-08-11 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

I am currently trying investigate tests failures on HP-UX to port some 
engineering applications away from Fortran to Python, but a bunch of tests 
require outbound connection which I do not have. I do have an HTTP proxy only.

Please add something to TESTOPTS, e.g., '-o' (offline) to skip test. I'd like 
to focus on the real test failures.

--
components: Tests
messages: 323413
nosy: michael-o
priority: normal
severity: normal
status: open
title: Make tests with outbound connection optional
type: enhancement
versions: Python 3.7

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