[issue34475] functools.partial objects have no __qualname__ attribute

2018-09-09 Thread Chris Jerdonek
Chris Jerdonek added the comment: Using p.func would name the function passed to functools.partial() rather than the partial object itself. -- ___ Python tracker ___

[issue34475] functools.partial objects have no __qualname__ attribute

2018-09-09 Thread hongweipeng
hongweipeng added the comment: the functools.partial returns an instance not fun or cls.using `p.func.__qualname__` may be you want. -- nosy: +hongweipeng ___ Python tracker

[issue34618] Encoding error running in subprocess with captured output

2018-09-09 Thread Eryk Sun
Eryk Sun added the comment: The interpreter uses the system ANSI codepage for non-console files. In your case this is codepage 1252. In my current setup I can't reproduce this issue since I'm using the new (beta) support in Windows 10 to configure the ANSI codepage as UTF-8 (65001). You

[issue34600] python3 regression ElementTree.iterparse() unable to capture comments

2018-09-09 Thread Martin Hosken
Martin Hosken added the comment: Blast. Bugs. Sorry. Missing superclass init call in CommentingTb. I enclose the whole thing again to save editing. Also fixes comment output to give text. from __future__ import print_function import sys import xml.etree.ElementTree as et import

[issue34600] python3 regression ElementTree.iterparse() unable to capture comments

2018-09-09 Thread Martin Hosken
Martin Hosken added the comment: Sorry. This test is rather long because it is 3 tests: from __future__ import print_function import sys import xml.etree.ElementTree as et import xml.etree.cElementTree as cet from io import StringIO teststr = u""" Hello World """ testf =

[issue21109] tarfile: Traversal attack vulnerability

2018-09-09 Thread shashank
shashank added the comment: A. Regrading Jakub's tests, I suppose the changes needed are to for every name in tar i) find reasonable occurrence of symlink's name and replace it with smylink's linkname ii) convert it to normal path and then check for relative / absolute paths B. Jakub, are

[issue34421] Cannot install package with unicode module names on Windows

2018-09-09 Thread Jeremy Kloth
Jeremy Kloth added the comment: For pip, in call_subprocess() (given here in rough pseudo-code) is_python = (cmd[0] == sys.executable) kwds = {} if is_python: env['PYTHONIOENCODING'] = 'utf8' kwds['encoding'] = 'utf8' proc = Popen(..., **kwds) . . . if stdout is not None: while

[issue34619] Typo in docs.python.jp

2018-09-09 Thread kuri8ive
New submission from kuri8ive <1yen@gmail.com>: Typo in https://docs.python.jp/3/tutorial/index.html "Python Web サイト(htts://www.python.org)" should be "Python Web サイト(https://www.python.org) " -- assignee: docs@python components: Documentation messages: 324906 nosy: docs@python,

[issue34618] Encoding error running in subprocess with captured output

2018-09-09 Thread Jeremy Kloth
Jeremy Kloth added the comment: Related to issue34421 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34618] Encoding error running in subprocess with captured output

2018-09-09 Thread Jeremy Kloth
New submission from Jeremy Kloth : When running Python via subprocess with captured output an encoding error occurs attempting to output a Unicode filename. The same does not happen when just using spawnl(). Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)]

[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

2018-09-09 Thread Steven D'Aprano
Steven D'Aprano added the comment: For what its worth, I'm +1 with Serhiy that we raise an exception on a non-string argument, including the case where the caller forgets to provide a reason at all. I don't think that @skip with no reason was ever intended to work (it certainly wasn't

[issue27869] test failures under Bash on Windows / WSL

2018-09-09 Thread Paul Waldorf
Paul Waldorf added the comment: Thought my experience could be helpful. My env is varies from @brett.cannon in that I'm running Debian 9 (Stretch) on my WSL, which makes me think that these failures have more to do with WSL than any difference in distros? Configured with ./configure

[issue34617] socket.recvfrom(): docs should warn about packet truncation when bufsize is insufficient

2018-09-09 Thread Anees Ahmed
New submission from Anees Ahmed : When one is receiving UDP packets (socket.SOCK_DGRAM) using: socket.recvfrom(bufsize, flags) the UDP packet payload is truncated if it was too big to fit into the buffer (decided by `bufsize` here). This is documented in Linux Docs: All receive

[issue34616] implement "Async exec"

2018-09-09 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- nosy: +minrk, willingc, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34616] implement "Async exec"

2018-09-09 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : Hi, This is an issue, prompted by twitter (https://twitter.com/Mbussonn/status/1038866329971961859) and by the imminent release of IPython 7.0 that provides an async REPL to discuss the introducion of something I'll call "Async exec", the exact

[issue34615] subprocess.call wrong exit code

2018-09-09 Thread Kay Hayen
Kay Hayen added the comment: I think that the whole reason I was doing this, is because with "os.execl" on Windows, the exit code was always lost, but of course it is very important and "subprocess.call" promises to return it. I just tried if 3.7 has any better exit code handling right

[issue17781] optimize compilation options

2018-09-09 Thread Zachary Ware
Zachary Ware added the comment: After 2.5 years without response, I think the answer is probably "no" :) -- resolution: -> fixed stage: -> resolved status: pending -> closed ___ Python tracker

[issue34615] subprocess.call wrong exit code

2018-09-09 Thread Kay Hayen
New submission from Kay Hayen : Hello there, I am probably confusing myself. I am using this kind of code in Nuitka to emulate "os.execl" on Windows, and so far it never let me down: r = subprocess.call( args, shell = False )

[issue30717] Add unicode grapheme cluster break algorithm

2018-09-09 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12733] Request for grapheme support in Python re lib

2018-09-09 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34486] "RuntimeError: release unlocked lock" when starting a thread

2018-09-09 Thread Vladimir Matveev
Vladimir Matveev added the comment: To bring in analogy: C# has lock statement that allow to run a block of code holding a mutual-exclusion lock on some object. ``` lock(o) { } ``` is compiled as ``` object _lock = o; bool _lockTaken = false; try {

[issue34614] Builtin `abs(Path)` should return `Path.absolute()`.

2018-09-09 Thread Brandt Bucher
Brandt Bucher added the comment: That all makes sense. Thanks for the quick response! -- ___ Python tracker ___ ___

[issue34614] Builtin `abs(Path)` should return `Path.absolute()`.

2018-09-09 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34614] Builtin `abs(Path)` should return `Path.absolute()`.

2018-09-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm, thanks for taking the time of proposing this and submitting a PR, but no. The documentation for `abs()` states: """ Return the absolute value of a number. The argument may be an integer or a floating point number. If the argument is a complex number,

[issue34486] "RuntimeError: release unlocked lock" when starting a thread

2018-09-09 Thread Xiang Zhang
Xiang Zhang added the comment: It's not right to replace with statement by manually calling __enter__ and __exit__. If there is any exception after __enter__ and before __exit__, __exit__ method will be skipped. That's not what we want. -- ___

[issue34614] Builtin `abs(Path)` should return `Path.absolute()`.

2018-09-09 Thread Antoine Pitrou
Change by Antoine Pitrou : -- title: Builtin `abs(Path)` returns `Path.absolute()`. -> Builtin `abs(Path)` should return `Path.absolute()`. ___ Python tracker ___

[issue34614] Builtin `abs(Path)` returns `Path.absolute()`.

2018-09-09 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> pitrou nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2018-09-09 Thread paul j3
paul j3 added the comment: It's been sometime since I looked at this issue. The main sticking point is passing unittests, and ensuring that there are no backward compatibility issues. But, since FileType is a standalone class, anyone could put a corrected version in their own workspace

[issue34486] "RuntimeError: release unlocked lock" when starting a thread

2018-09-09 Thread hongweipeng
hongweipeng added the comment: It seems to me the problem is related to nested `finally` or `with`, which can't handle signals well. class Event: ... def wait(self, timeout=None): self._cond.__enter__() signaled = self._flag if not signaled:

[issue34614] Builtin `abs(Path)` returns `Path.absolute()`.

2018-09-09 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +8581 stage: -> patch review ___ Python tracker ___ ___

[issue34614] Builtin `abs(Path)` returns `Path.absolute()`.

2018-09-09 Thread Brandt Bucher
New submission from Brandt Bucher : This complements the current Path behavior that overrides division operators for path joining, in that it makes manually-constructed paths easier to form and arguably more readable. Before: p = Path("some", "relative", "path") q = p.absolute() / "some" /

[issue34421] Cannot install package with unicode module names on Windows

2018-09-09 Thread Julien Malard
Julien Malard added the comment: Hello, Thanks for the insights and better fixes. Regarding (1), do you have any pointers on how or where to fix pip? I have an inprogress pull request there (https://github.com/pypa/pip/pull/5712) to fix a related unicode error during installation and could

[issue34569] test__xxsubinterpreters.ShareableTypeTests._assert_values fails on AIX - 32-bit mode

2018-09-09 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +8580 stage: -> patch review ___ Python tracker ___ ___

[issue34421] Cannot install package with unicode module names on Windows

2018-09-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 9126 makes distutils.log using "backslashreplace" instead of "unicode-escape" and simplifies the code (it is more efficient now, although the performance of logging is not critical). "unicode-escape" escapes all non-ASCII characters, even encodable. It

[issue34421] Cannot install package with unicode module names on Windows

2018-09-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +8579 stage: commit review -> patch review ___ Python tracker ___ ___

[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-09-09 Thread Chih-Hsuan Yen
Chih-Hsuan Yen added the comment: I created the backport PR for 2.7 branch. Can anyone reopen this issue? -- versions: +Python 2.7 ___ Python tracker ___

[issue32502] uuid1() fails if only 64-bit interface addresses are available

2018-09-09 Thread Chih-Hsuan Yen
Change by Chih-Hsuan Yen : -- pull_requests: +8578 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34608] gc.get_referrers behavior change 3.6 to 3.7

2018-09-09 Thread INADA Naoki
INADA Naoki added the comment: Benjamin is right. This is very implementation detail. We shouldn't rely on such edge case. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.

2018-09-09 Thread Mike Thompson
Mike Thompson added the comment: I am a teacher, and this feature would really help me teach Python to my students. Especially when I am teaching the course remotely. -- nosy: +mthompsonwhs ___ Python tracker

[issue34597] Python needs to check existence of functions at runtime for targeting older macOS platforms

2018-09-09 Thread Ronald Oussoren
Ronald Oussoren added the comment: Binaries currently work on the system you compiled on and any later release of macOS. That's the only "promise" there currently is. Anything better requires work, and hence someone willing to do that work. I'd love to be able to build on the latest macOS

[issue20104] expose posix_spawn(p)

2018-09-09 Thread STINNER Victor
STINNER Victor added the comment: I close the issue, it's now done. If someone wants to experiment in posix_spawn() in subprocess, please open a new issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

[issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam

2018-09-09 Thread STINNER Victor
STINNER Victor added the comment: The bug has been fixed. For %R, does someone want to propose a change for master? William? -- ___ Python tracker ___

[issue20104] expose posix_spawn(p)

2018-09-09 Thread STINNER Victor
STINNER Victor added the comment: > Thank you for your contribution Pablo. This issue have appeared much more complex and less obvious than it looked initially. Yeah, thanks Pablo for your tenacy! This function is interesting in term of performance and correctness ("atomic" function, signal

[issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam

2018-09-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7a633ed79cfba2cfc0f80410ddcaeecadc2030e9 by Victor Stinner (William Grzybowski) in branch '3.7': [3.7] bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) (GH-9104)

[issue34604] Possible mojibake in pwd.getpwnam and grp.getgrnam

2018-09-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1bcd891c200b8122493ddad5a203331e1a3bfcb5 by Victor Stinner (William Grzybowski) in branch '3.6': [3.6] bpo-34604: Fix possible mojibake in pwd.getpwnam() and grp.getgrnam() (GH-9098) (GH-9105)

[issue34421] Cannot install package with unicode module names on Windows

2018-09-09 Thread Jeremy Kloth
Jeremy Kloth added the comment: The existing re-code solution is being triggered, as the `errors` in this case is 'surrogateescape' with an encoding of 'cp1252'. Here, pip is using subprocess.Popen() to have Python run setup.py. During execution, a filename,

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2018-09-09 Thread hongweipeng
Change by hongweipeng : -- pull_requests: +8577 stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > in error messages And in reprs. It is common to format a repr as "{typename}(...)" or "<{typename}(...)>". The difference is whether the typename is a short or fully qualified name. -- ___ Python tracker

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Ok, I wrote PR 9122 to add %t format and modify %T format: Nice! I agree that it is easy to use _PyType_Name() directly. But using _PyType_FullName() instead of tp_name can be cumbersome because it returns a new object and needs error handling. > Or

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-09 Thread STINNER Victor
STINNER Victor added the comment: > I think we need to handle only two cases: short and fully qualified names. > __qualname__ without __module__ doesn't make sense, and the value of tp_name > depends on implementation details (is it Python class or builtin class, heap > class or dynamic

[issue34595] PyUnicode_FromFormat(): add %T format for an object type name

2018-09-09 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +8576 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34613] asyncio.StreamReader initialization documentation incorrectly declare limit as None

2018-09-09 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +8574 stage: -> patch review ___ Python tracker ___ ___

[issue34421] Cannot install package with unicode module names on Windows

2018-09-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would prefer to use the backslashreplace error handler rather of the unicode-escape codec. Just as few lines above, but with ASCII encoding. msg = msg.encode('ascii', 'backslashreplace').decode('ascii') It is still not clear to me why the current

[issue34613] asyncio.StreamReader initialization documentation incorrectly declare limit as None

2018-09-09 Thread Laurent Peuch
New submission from Laurent Peuch : asyncio.StreamReader documentation incorrectly declare its initialization argument "limit" to be "None" by default https://docs.python.org/3/library/asyncio-stream.html#asyncio.StreamReader In the source code it is set to _DEFAULT_LIMIT

[issue34611] some examples in 'itertools' modules docs are inaccuracy.

2018-09-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Karthikeyan. The doc examples read fine as-is. They have worked well for many users for a long time. It only takes seconds of experimentation to see exactly what is returned. There is also a plain text description and a rough pure