[issue34171] Lib/trace.cover not removed by the clean target

2018-08-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset e3f20828f6b7f59baa2d25437176ee32ae7700b0 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-34171: Fix test_trace. (GH-8940) (GH-8951)
https://github.com/python/cpython/commit/e3f20828f6b7f59baa2d25437176ee32ae7700b0


--

___
Python tracker 

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



[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-08-28 Thread chen wu


chen wu  added the comment:

yeah, i noticed that. but this function also return host with '[]'.

183# IPv6
184if url and url[0] == '[':
185host, url = url.split(']', 1)
186host += ']'

if url is [aaa:bbb]:123, host is [aaa:bbb] and url is ':123'after this process.

when host=[aaa:bbb] passed to httplib.HTTPConnection, its function 'putrequest' 
will put 'Host:[[aaa:bbb]]:123' in headers.

--

___
Python tracker 

___
___
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 U+0052
> byte 0x53 decoded to Unicode character U+0053
> byte 0x54 decoded to Unicode character U+0054
> byte 0x55 decoded to Unicode character U+0055
> byte 0x56 decoded to Unicode character U+0056
> byte 0x57 decoded to Unicode character U+0057
> byte 0x58 decoded to Unicode character U+0058
> byte 0x59 decoded to Unicode character U+0059
> byte 0x5A decoded to Unicode character 

[issue34516] httplib sets unbefitting "Host" in request header when requests an ipv6 format url.

2018-08-28 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

urrlib3 seems to handle this case at 
https://github.com/urllib3/urllib3/blob/c41fa8c7ed8cb7315195dc15e67958754ea276d5/src/urllib3/util/url.py#L184
 . 

Test cases : 
https://github.com/urllib3/urllib3/blob/0f85e05af9ef2ded671a7b47506dfd24b32decf0/test/test_util.py#L80

Thanks

--

___
Python tracker 

___
___
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 STINNER Victor


STINNER Victor  added the comment:

>   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']

Hum, it looks like a bug in the C library of HP-UX. It announces that the 
locale encoding is "roman8", but the mbstowcs() function decodes from the 
Latin1 encoding. The updated test uses the byte string: b'h\xa7\xe9'. The OS 
announces the encoding roman8, so the test expects the Unicode string: 
b'h\xa7\xe9'.decode('roman8') == 'h\xcf\xd5' but it gets 'h\xa7\xe9' which 
looks more like the byte string has been decoded from Latin1: 
b'h\xa7\xe9'.decode('latin1') == 'h\xa7\xe9'.

Michael: would you mind to compile and run the attached c_locale.c test 
program? It sets the LC_ALL locale to C, dump locales (LC_ALL, LC_CTYPE, 
nl_langinfo(CODESET)), and then decode all bytes from the locale encoding 
(LC_CTYPE). The output should help me to understand what is the *effective* 
encoding of HP-UX for the C locale.

You may modify the c_locale.c to replace "C" with "POSIX", to see if the 
behaviour is different.

--
Added file: https://bugs.python.org/file47767/c_locale.c

___
Python tracker 

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



[issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux

2018-08-28 Thread Carlos Velasco


Carlos Velasco  added the comment:

This updated patch fix two missing lib/lib64
It works for me.

# python3-32 -c "import sys; print('\n'.join(sys.path))"
/usr/lib/python37.zip
/usr/lib/python3.7
/usr/lib/python3.7/lib-dynload
/root/.local/lib/python3.7/site-packages
/usr/lib/python3.7/site-packages


# python3-64 -c "import sys; print('\n'.join(sys.path))"  
/usr/lib64/python37.zip
/usr/lib64/python3.7
/usr/lib64/python3.7/lib-dynload
/root/.local/lib64/python3.7/site-packages
/usr/lib64/python3.7/site-packages

--
nosy: +carlos.velasco
Added file: https://bugs.python.org/file47766/python-3.6.0-multilib-new-3.patch

___
Python tracker 

___
___
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:

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 

___
___
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 

___
___
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 

___
___
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 STINNER Victor

STINNER Victor  added the comment:

Hi, I'm the author of the UTF-8 Mode PEP (PEP 540) and its implementation. I 
wrote test_utf8_mode. I wasn't sure that it was a good idea to hardcode the 
locale encoding depending on the platform. The fact that AIX and HP-UX use 
different locale encoding confirms that it was a bad choice. My PR 8967 gets 
the locale encoding at runtime instead of hardcoding it. It should fix the test 
on AIX and HP-UX.

To fix the test on HP-UX, I also removed the euro sign (U+20AC: €) from the 
test string. There is no need to test large code point: a single non-ASCII 
character is enough to validate the code.

Michael Osipov: would you mind to test my PR on HP-UX please?

--

___
Python tracker 

___
___
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 STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8441

___
Python tracker 

___
___
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 

___
___
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 

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



[issue21145] Add the @cached_property decorator

2018-08-28 Thread Nick Coghlan


Nick Coghlan  added the comment:


New changeset d658deac6060ee92b449a3bf424b460eafd99f3e by Nick Coghlan (Carl 
Meyer) in branch 'master':
bpo-21145: Add cached_property decorator in functools (#6982)
https://github.com/python/cpython/commit/d658deac6060ee92b449a3bf424b460eafd99f3e


--

___
Python tracker 

___
___
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:

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 

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



<    1   2