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

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

2018-08-28 Thread Michael Osipov
Michael Osipov <[email protected]> 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 consi

[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 <[email protected]>: -- keywords: +patch pull_requests: +8440 stage: -> patch review ___ Python tracker ___ _

[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://ma

[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 confi

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

2018-08-28 Thread Michael Osipov
Michael Osipov <[email protected]> added the comment: Victor, looking to... -- ___ Python tracker ___ ___ Python-bugs-list mailing

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

2018-08-28 Thread Michael Osipov
Michael Osipov <[email protected]> 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_hp

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

2018-08-28 Thread Michael Osipov
Michael Osipov <[email protected]> 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/cpy

[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-pack

[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 lo

[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/tes

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

2018-08-28 Thread Michael Osipov
Michael Osipov <[email protected]> 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_

[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 h

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

[issue34526] Path.relative_to() taking multiple arguments could be better documented

2018-08-28 Thread Antony Lee
New submission from Antony Lee : Currently, the docs for Path.relative_to read PurePath.relative_to(*other) Compute a version of this path relative to the path represented by other. If it’s impossible, ValueError is raised: (examples follow) It's a bit confusing why other is a star-arg

[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: +8442 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[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: ... > byte 0xA7 decoded to Unicode character U+00A7 ... Well, it confirms what I expected: nl_langinfo(CODESET) announces "roman8", but mbstowcs() uses Latin1 encoding in practice. So I wrote the PR 8969 which forces the ASCII encoding in that case. I'm not

[issue11190] test_locale error on AIX

2018-08-28 Thread Michael Felt
Michael Felt added the comment: Ok - testing other Python3 versions: 3.4.9 - failed 3.5.5 - failed 3.7.0 - passes - ah - but due to skip tests! test_strcoll (test.test_locale.TestEnUSCollation) ... testing with 'en_US.ISO8859-1'... ok test_strcoll_with_diacritic (test.test_locale.TestEnUSCol

[issue11190] test_locale error on AIX

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: > So, I guess it is still an issue to be examined, just not urgently. The test pass in the master branch, so I close the issue. If you want to do something, discuss with the maintainers of AIX C library to ask them if strcoll() work as expected according to

[issue34519] Add additional aliases for HP Roman 8

2018-08-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please provide references for the definition of 'cp1051' and 'ibm1051'. -- nosy: +lemburg, serhiy.storchaka ___ Python tracker ___

[issue34519] Add additional aliases for HP Roman 8

2018-08-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The hp-roman8 codec was added in issue996067. The link to the original data (ftp://dkuug.dk/i18n/charmaps/HP-ROMAN8) is dead now. -- ___ Python tracker __

[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor
New submission from STINNER Victor : vstinner@freebsd$ env -i LC_ALL=POSIX ./python -m test -v test_cmd_line_script -m test_non_ascii == CPython 3.8.0a0 (heads/master:096329f0b2, Aug 28 2018, 09:30:55) [Clang 4.0.0 (tags/RELEASE_400/final 297347)] == FreeBSD-11.1-RELEASE-amd64-64bit-ELF littl

[issue26544] platform.libc_ver() returns incorrect version number

2018-08-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +8443 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue26544] platform.libc_ver() returns incorrect version number

2018-08-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +8444 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +8445 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue26544] platform.libc_ver() returns incorrect version number

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: Would it be possible to add a few tests on platform._comparable_version()? It would make me more confortable for backports. -- ___ Python tracker __

[issue34508] return of non-parenthesized star-unpacking expression a SyntaxError

2018-08-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Other examples: eval('*(1, 2), 3') a = []; a += *(1, 2), 3 for i in *(1, 2), 3: pass def g(): yield *(1, 2), 3 -- nosy: +benjamin.peterson, gvanrossum, serhiy.storchaka ___ Python tracker

[issue26544] platform.libc_ver() returns incorrect version number

2018-08-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +8446 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue34523] Choose the filesystem encoding before Python initialization (add _PyCoreConfig.filesystem_encoding)

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: The compilation failed on my PR when running PCbuild\amd64\_freeze_importlib.exe: ValueError: only 'strict' and 'surrogateescape' error handlers are supported, not 'surrogatepass' The error comes from locale_error_handler(). Before my change, PyUnicode_Enc

[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5cb258950ce9b69b1f65646431c464c0c17b1510 by Victor Stinner in branch 'master': bpo-34527: POSIX locale enables the UTF-8 Mode (GH-8972) https://github.com/python/cpython/commit/5cb258950ce9b69b1f65646431c464c0c17b1510 -- _

[issue34528] Windows installer: Failed to run untrusted mode.

2018-08-28 Thread Cabu
New submission from Cabu : At work, we are using Windows 7 Enterprise. I have local admin rights on a separate account. When trying to install Python 3.6.3 or 3.7.0 for amd64, the installer stop after a couple of seconds without any message/popup. But, I have found the attched log in a temp

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

2018-08-28 Thread Michael Osipov
Michael Osipov <[email protected]> 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

[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2018-08-28 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This might be redundant but I googled 'itertools tee thread safe' and came across a detailed SO answer from 2017 that explains the issue along with a similar example that causes segfault in the compiler but it was not reported here it seems. It als

[issue24482] itertools.tee causes segfault in a multithreading environment, while the equivalent implementation doesn't

2018-08-28 Thread Xiang Zhang
Change by Xiang Zhang : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL ___ Python tracker

[issue24482] itertools.tee causes segfault in a multithreading environment, while the equivalent implementation doesn't

2018-08-28 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I can also reproduce the original script's segfault in 2.7 but not in master. There is a related bug as per the original description by Dmitry that itertools.tee is not thread safe in https://bugs.python.org/msg323817 and a related SO answer to thi

[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: > -check('utf8=0', [arg.decode(encoding, 'surrogateescape')], > +check('utf8=0', [arg.decode('ascii', 'surrogateescape')], >LC_ALL='C') > (...) > == Tests result: SUCCESS == Good, it works. I updated my PR 8969 to

[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +8447 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 65ef7425a32ee411d8047a4fad0fc6bb9ff733b1 by Victor Stinner in branch '3.7': bpo-34527: POSIX locale enables the UTF-8 Mode (GH-8972) (GH-8974) https://github.com/python/cpython/commit/65ef7425a32ee411d8047a4fad0fc6bb9ff733b1 -- __

[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +8448 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: Note: Python 2.7 is not affected: it doesn't have "force_ascii" and "LC_ALL=POSIX ./python -m test test_cmd_line_script" pass successfully. -- versions: +Python 3.6 ___ Python tracker

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

2018-08-28 Thread Michael Felt
Michael Felt added the comment: No time to compile for a couple of days. Stress from others wins instead. Maybe on Friday. Sent from my iPhone > On 28 Aug 2018, at 13:20, STINNER Victor wrote: > > > STINNER Victor added the comment: > >> -check('utf8=0', [arg.decode(encodi

[issue34523] Choose the filesystem encoding before Python initialization (add _PyCoreConfig.filesystem_encoding)

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: > The compilation failed on my PR when running > PCbuild\amd64\_freeze_importlib.exe: (...) This issue should now be fixed. -- ___ Python tracker _

[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-08-28 Thread STINNER Victor
New submission from STINNER Victor : Example: $ env -i ./python -c 'import distutils.spawn; print(distutils.spawn.find_executable("true"))' Traceback (most recent call last): File "", line 1, in File "/home/vstinner/prog/python/master/Lib/distutils/spawn.py", line 176, in find_executable

[issue34529] add the option for json.dumps to return newline delimited json

2018-08-28 Thread ron
New submission from ron : Many service providers such as Google BigQuery do not accept Json. They accept newline delimited Json. https://cloud.google.com/bigquery/docs/loading-data-cloud-storage-json#limitations please allow to receive this format directly from the dump. -- messages:

[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-08-28 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +8449 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure that it's worth it to modify Python 3.7 and older. distutils changes are now well welcomed (breaking setuptools or pip is unpopular :-)). -- nosy: +Marcus.Smith, dstufft, ncoghlan, paul.moore versions: -Python 2.7, Python 3.6, Python 3.7

[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4ff38870b1de8a3add5357edf125c2866bc42b54 by Victor Stinner in branch '3.6': bpo-34527: Fix FreeBSD with POSIX locale (GH-8975) https://github.com/python/cpython/commit/4ff38870b1de8a3add5357edf125c2866bc42b54 -- __

[issue34498] Python 3.7 breaks on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

2018-08-28 Thread Łukasz Langa
Łukasz Langa added the comment: > I would say we could update the check in `functools` to accept more things. Could we revert abstract types in `typing` to respond True to `isinstance(..., type)` again? I don't want singledispatch, or any other library like it, to have to special-case typing

[issue34523] Choose the filesystem encoding before Python initialization (add _PyCoreConfig.filesystem_encoding)

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-34485 which allows to select (using _PyCoreConfig) the encoding and error handlers of standard streams like sys.stdout. -- ___ Python tracker _

[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: I wanted to quickly fix this issue since I'm working on 3 different issues where I got conflicts with these changes, and the other issues were impacted by this bug. I sent an email to python-dev about this issue: https://mail.python.org/pipermail/python-dev/

[issue34498] Python 3.7 breaks on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

2018-08-28 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Could we revert abstract types in `typing` to respond True to > `isinstance(..., type)` again? No, making them classes will cause significant performance penalty (I don't remember numbers now, but importing `typing` may be twice slower). Plus this will r

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

2018-08-28 Thread Martin Panter
Martin Panter added the comment: This sounds like a duplicate of Issue 28539. My understanding of that report is that Urllib3 half parses the URL by splitting out the port number, but returns a hostname with square brackets intact. Requests then passes the hostname (string with brackets) and

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

2018-08-28 Thread Michael Osipov
Michael Osipov <[email protected]> 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),

[issue34508] return of non-parenthesized star-unpacking expression a SyntaxError

2018-08-28 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Serhiy. I'm happy to extend my PR to cover those cases, if there's general agreement that it's worth doing so. (*I* personally think this is worth doing, since it smooths some currently rough edges and removes a few surprises, but I'm not comfortable

[issue1529353] Squeezer - squeeze large output in IDLE's shell

2018-08-28 Thread Tal Einat
Tal Einat added the comment: I've gone ahead and addressed all of the significant issues raised here: * Squeezer is no longer an extension * Expanding problematically large outputs prompts the user for confirmation * "copy" and "view" moved to a right-click context menu * use IDLE's TextView f

[issue24632] Improve documentation about __main__.py

2018-08-28 Thread Mitch Gann
Mitch Gann added the comment: Can someone please update the Docs on this? Its been over 3 years since the issue was raised and seems fairly straightforward to address. Also considering its a fairly important feature of the language which deals with the entry point for packages/modules to b

[issue34529] add the option for json.dumps to return newline delimited json

2018-08-28 Thread Michał Radwański
Michał Radwański added the comment: So this format is just a series of JSON, delimited by a newline. Instead of changing API, you might consider this piece of code: def ndjsondump(objects): return '\n'.join(json.dumps(obj) for obj in objects) Conversely, first you `str.splitlines`, then `

[issue34508] return of non-parenthesized star-unpacking expression a SyntaxError

2018-08-28 Thread Guido van Rossum
Guido van Rossum added the comment: I think all of these are good. Perhaps with a small change the for-loop example can allow an elegant way of iterating over multiple iterables. It would need a special case so that `for x in *a, *b:` doesn't first construct a tuple of all elements in a and

[issue34531] doc Move comment about list sorting behavour outside impl-detail directive

2018-08-28 Thread Andrés Delfino
New submission from Andrés Delfino : As this text is phrased: CPython implementation detail: While a list is being sorted, the effect of attempting to mutate, or even inspect, the list is undefined. The C implementation of Python makes the list appear empty for the duration, and raises ValueE

[issue34531] doc Move comment about list sorting behavour outside impl-detail directive

2018-08-28 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +8450 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[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: New changeset d500e5307aec9c5d535f66d567fadb9c587a9a36 by Victor Stinner in branch 'master': bpo-34403: On HP-UX, force ASCII for C locale (GH-8969) https://github.com/python/cpython/commit/d500e5307aec9c5d535f66d567fadb9c587a9a36 -- __

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

2018-08-28 Thread Michael Osipov
Michael Osipov <[email protected]> added the comment: Can we backport this to 3.7 at least? -- ___ Python tracker ___ ___ Python-bu

[issue21109] tarfile: Traversal attack vulnerability

2018-08-28 Thread Jakub Wilk
Jakub Wilk added the comment: I've tested Lars's patch against my collection of sly tarballs: https://github.com/jwilk/path-traversal-samples SafeTarFile defeated most, but not all attacks. It still allows directory traversal for these two tarfile: 1) https://github.com/jwilk/path-traversal-

[issue34508] return of non-parenthesized star-unpacking expression a SyntaxError

2018-08-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > It would need a special case so that `for x in *a, *b:` doesn't first > construct a tuple of all elements in a and b. Thoughts? It may be surprising that `for x in *a, *b:` behave differently from `for x in (*a, *b):`. It is idiomatic to create a list o

[issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings

2018-08-28 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Yes, I've referenced the relevant message from #6697 in #34454. The specific test you've referenced should be changed after #34481 is fixed -- it highlights inconsistency between C and Python implementations. --

[issue34532] Python launcher on Windows exits with error when requesting list of available versions

2018-08-28 Thread Brendan Gerrity
New submission from Brendan Gerrity : When any of the list available pythons arguments is used (e.g. `py -0`), the launcher exits with the error code 103 `RC_NO_PYTHON`. This is inconsistent with the launcher's `-h` help argument, which exits with a 0. -- components: Windows messages

[issue34508] return of non-parenthesized star-unpacking expression a SyntaxError

2018-08-28 Thread Guido van Rossum
Guido van Rossum added the comment: That's fair. Maybe we shouldn't support `for x in *a, *b:` at all then, until we've got a BDFL decision? (Because once you support it one way you can't easily change the semantics without breaking backwards compatibility.) -- _

[issue34508] return of non-parenthesized star-unpacking expression a SyntaxError

2018-08-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I understand why non-parenthesized tuples are supported in assignments, in return statements and yield expressions and in for loops, but I'm surprised that they are supported in augmented assignments: `a += 1, 2, 3`. -- ___

[issue34533] Apply PEP384 to _csv module

2018-08-28 Thread Eddie Elizondo
New submission from Eddie Elizondo : This applies the heap type refactoring from PEP 384 to the _csv module. -- components: Extension Modules messages: 324268 nosy: eelizondo priority: normal severity: normal status: open title: Apply PEP384 to _csv module type: enhancement versions: Py

[issue34533] Apply PEP384 to _csv module

2018-08-28 Thread Eddie Elizondo
Change by Eddie Elizondo : -- keywords: +patch pull_requests: +8451 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue34508] return of non-parenthesized star-unpacking expression a SyntaxError

2018-08-28 Thread Guido van Rossum
Guido van Rossum added the comment: > I'm surprised that they are supported in augmented assignments: `a += 1, 2, > 3`. I guess at the time it was felt that it was better to support it everywhere it *could* be supported -- and if a is a list it even makes some amount of sense. In any case i

[issue34531] doc Move comment about list sorting behavour outside impl-detail directive

2018-08-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: The sentence should be left as-is. It is there to make the following two sentences more intelligible. The docs otherwise make no promises about other implementations and this is as it should be. -- nosy: +rhettinger resolution: -> rejected stag

[issue34529] add the option for json.dumps to return newline delimited json

2018-08-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Would this need be fulfilled by the *separators* option? >>> from json import dumps >>> query = dict(system='primary', action='load') >>> print(dumps(query, separators=(',\n', ': '))) {"system": "primary", "action": "load"} -- n

[issue34062] Python launcher on Windows does not work with --list or --list-paths

2018-08-28 Thread Brendan Gerrity
Change by Brendan Gerrity : -- nosy: +bgerrity ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-08-28 Thread Elliot Edmunds
Elliot Edmunds added the comment: Not sure how helpful it would be to have the re.sub expressions for lstrip and rstrip, but I think it would look like: l_stripped = re.sub(r'^\s*', '', foo) r_stripped = re.sub(r'\s*$', '', foo) -- nosy: +Elliot Edmunds Added file: https://bugs.pytho

[issue34534] importlib.resources does not work with packages that have no __init__.py

2018-08-28 Thread Girts Folkmanis
New submission from Girts Folkmanis : importlib.resources does not seem to work with packages that don't have __init__.py present. Since 3.3+ generally there is no need to create empty __init__.py, as directories are automatically treated as packages even without the file present. So my expec

[issue34534] importlib.resources does not work with packages that have no __init__.py

2018-08-28 Thread Eric V. Smith
Eric V. Smith added the comment: What's the difference between "namespace packages and implicit non-namespace packages"? I think those are the same thing, aren't they? -- nosy: +barry, brett.cannon, eric.smith ___ Python tracker

[issue34535] queue.Queue(timeout=0.001) avg delay Windows:14.5ms, Ubuntu: 0.063ms

2018-08-28 Thread Paul Overing
New submission from Paul Overing : I have found that using timeout with a python queue.Queue() results in an average delay of 14.5ms in Windows over Ubuntu in python 3.6.5/3.7, I subtracted the 1 ms timeout. I have also tried datetime.datetime.now() to measure the time, with similar results

[issue34534] importlib.resources does not work with packages that have no __init__.py

2018-08-28 Thread Girts Folkmanis
Girts Folkmanis added the comment: > What's the difference between "namespace packages and implicit non-namespace > packages"? To me, the semantic difference is that "namespace packages" are what is used when you have "foo.bar" and "foo.baz" come from different distributions (https://packa

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: I don't agree with "This means that a PyTypeObject's ob_type should always be set by PyType_Ready.", and therefore don't agree with the change to PyVarObject_HEAD_INIT. In particular this is not correct when the type has a custom metatype (e.g. ob_type !=

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: (added "object model" reviewers to the nosy list) -- nosy: +benjamin.peterson, twouters ___ Python tracker ___ _

[issue34534] importlib.resources does not work with packages that have no __init__.py

2018-08-28 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: https://docs.python.org/3/reference/import.html#regular-packages Regular packages have __init__.py files and namespace packages do not. "Implicit non-namespace packages" aren't really A Thing. This design choice is deliberate; namespace packages themselves

[issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned

2018-08-28 Thread Paul Pinterits
New submission from Paul Pinterits : In a conversation with Ethan Furman (the author of the enum module) I've been informed that Enum automatically checks whether the _missing_ method has returned an instance of the correct class, and raises a TypeError if not. (Link: https://stackoverflow.co

[issue34535] queue.Queue(timeout=0.001) avg delay Windows:14.5ms, Ubuntu: 0.063ms

2018-08-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue22872] multiprocessing.Queue raises AssertionError

2018-08-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue34522] PyTypeObject's tp_base initialization bug

2018-08-28 Thread Eddie Elizondo
Eddie Elizondo added the comment: @ronaldoussoren Please read the complete analysis from the mailing list: https://mail.python.org/pipermail/python-dev/2018-August/154946.html. The description here was just a rehash and I probably missed some context. Particularly, when I said: "PyTypeObjec

[issue34537] test_gdb fails with LC_ALL=C

2018-08-28 Thread STINNER Victor
New submission from STINNER Victor : On Python 3.7 and master, test_strings() of test_gdb fails if gdb uses Python 3.6 (before UTF-8 Mode and C locale coercion): * gdb uses ASCII encoding for stdout * tested Python uses UTF-8 thanks to the UTF-8 Mode and/or C locale coercion vstinner@apu$ LC_

[issue34485] _PyCoreConfig: add stdio_encoding and stdio_errors

2018-08-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +8452 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34479] ArgumentParser subparser error display at the wrong level

2018-08-28 Thread paul j3
paul j3 added the comment: The subparser is called with `parse_known_args` which just puts unknown args in a _UNRECOGNIZED_ARGS_ATTR attribute slot in the namespace, which is then passed back to the main parser. (this occurs in _SubParsersAction.__call__) If `parser.parse_known_args` is use

[issue34538] Remove encouragement to author a base class for all Exception subclasses in a module

2018-08-28 Thread Nathaniel Manista
New submission from Nathaniel Manista : https://docs.python.org/3.8/tutorial/errors.html (and all other versions of that page back at least as far as 2.7) currently contain the guidance "When creating a module that can raise several distinct errors, a common practice is to create a base class

[issue34520] test_asyncio leaked [2, 2, 2] references, sum=6 in AMD64 Windows8.1 Refleaks 3.7

2018-08-28 Thread Brett Cannon
Brett Cannon added the comment: If it isn't leaking in 3.8 then it's possibly not disposing of the event loop (I added a check for that in https://github.com/python/cpython/commit/8425de4147eb8d83befbb8ea77516fc764bb4309#diff-226dcee10b9d2f379e54d4415489236f ). -- nosy: +brett.canno

[issue34520] test_asyncio leaked [2, 2, 2] references, sum=6 in AMD64 Windows8.1 Refleaks 3.7

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-32710. -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue34207] test_cmd_line test_utf8_mode test_warnings fail in all FreeBSD 3.x (3.8) buildbots

2018-08-28 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[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: > Can we backport this to 3.7 at least? My policy is to focus on the master branch to support a new platform. Then add a buildbot and find a core developer to maintain this platform. See the PEP 11 for details. I would prefer to see a full test suite passin

[issue34485] _PyCoreConfig: add stdio_encoding and stdio_errors

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9e4994d410970fb4e75168401d159ba47a8f7108 by Victor Stinner in branch 'master': bpo-34485: Enhance init_sys_streams() (GH-8978) https://github.com/python/cpython/commit/9e4994d410970fb4e75168401d159ba47a8f7108 -- __

[issue34200] importlib: python -m test test_pkg -m test_7 fails randomly

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: Recent failure on AMD64 Debian root 3.x: https://buildbot.python.org/all/#/builders/27/builds/1433 0:07:40 load avg: 2.19 [278/418/1] test_pkg failed -- running: test_tools (1 min 18 sec) test_1 (test.test_pkg.TestPkg) ... ok test_2 (test.test_pkg.TestPkg) .

[issue34200] importlib: python -m test test_pkg -m test_7 fails randomly

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: Brett: > I can't reproduce with master on macOS. Vladimir Matveev: > I've tried to repro this on Mac, Windows box and Windows VM - works fine for > all cases. Well, it's a race condition :-( It seems hard to reproduce, but it exists ;-) --

[issue34200] importlib: python -m test test_pkg -m test_7 fails randomly

2018-08-28 Thread STINNER Victor
STINNER Victor added the comment: Failure on AMD64 Windows8.1 Non-Debug 3.x buildbot: https://buildbot.python.org/all/#/builders/12/builds/1223 ERROR: test_4 (test.test_pkg.TestPkg) FAIL: test_7 (test.test_pkg.TestPkg) -- ___ Python tracker

[issue34485] _PyCoreConfig: add stdio_encoding and stdio_errors

2018-08-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +8453 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue33407] Implement Py_DEPRECATED() macro for Visual Studio

2018-08-28 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +8454 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

  1   2   >