[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-02-08 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry, my patch doesn't work on Xcode (Apple LLVM). computed-gotos is still enabled by default. Apple doesn't expose LLVM version. It's really annoying. $ cat x.c #include int main() { printf("__clang__ : %d\n", __clang__);

[issue32802] Travis does not compile Python if there is one change in the Documentation

2018-02-08 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +patch pull_requests: +5406 stage: -> patch review ___ Python tracker ___

[issue32802] Travis does not compile Python if there is one change in the Documentation

2018-02-08 Thread Stéphane Wirtel
New submission from Stéphane Wirtel : If there is one .rst file in a commit, Travis does not compile Python, since this commit https://github.com/python/cpython/commit/b2ec3615c81ca4f3c938245842a45956da8d5acb Here is a fix. -- messages: 311841 nosy: matrixise

[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-02-08 Thread Zhiming Wang
Zhiming Wang added the comment: Yeah, Apple LLVM versions are a major headache. I resorted to feature detection, using C++ coroutines support as the clang 5 distinguisher[1]: $ cat /tmp/test/stub.cc #include int main() { return 0; } $

[issue32799] returned a result with an error set

2018-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since contextlib._GeneratorContextManager is implemented in Python, it is unlikely that it is a culprit of the error. Do you use any third-party extensions? Likely some extension provoked the error. Can you provide a minimal

[issue32790] Keep trailing zeros in precision for string format option g

2018-02-08 Thread Mark Dickinson
Mark Dickinson added the comment: > Maybe the documentation could also add this information in the chart for 'g' > here: Agreed that that would make sense. All the information is *there* in the docs (the alternate format is described a bit above that table), but it's not

[issue32799] returned a result with an error set

2018-02-08 Thread Eli Ribble
Eli Ribble added the comment: To my knowledge, no, we don't use any python extensions. Unless extensions can be installed via pip, in which case I would need to audit our many dependencies to determine if any of them ultimately pull in any extensions as part of a pip

[issue32802] Travis does not compile Python if there is one change in the Documentation

2018-02-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +5408 ___ Python tracker ___

[issue32802] Travis does not compile Python if there is one change in the Documentation

2018-02-08 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 32921f90821ab54ffb757b7e996e5b7a71fac25e by Mariatta (Stéphane Wirtel) in branch 'master': bpo-32802: Fix Travis build (GH-5589) https://github.com/python/cpython/commit/32921f90821ab54ffb757b7e996e5b7a71fac25e

[issue32802] Travis does not compile Python if there is one change in the Documentation

2018-02-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +5407 ___ Python tracker ___

[issue8525] Display exception's subclasses in help()

2018-02-08 Thread Sanyam Khurana
Change by Sanyam Khurana : -- assignee: -> CuriousLearner versions: +Python 3.8 -Python 3.7 ___ Python tracker ___

[issue32802] Travis does not compile Python if there is one change in the Documentation

2018-02-08 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset fe92c441519d0c4fc93bb98fc1bb4e225dea44c4 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-32802: Fix Travis build (GH-5589) (GH-5591)

[issue32802] Travis does not compile Python if there is one change in the Documentation

2018-02-08 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks! -- resolution: -> fixed stage: backport needed -> resolved status: open -> closed ___ Python tracker

[issue32802] Travis does not compile Python if there is one change in the Documentation

2018-02-08 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Good catch! Thanks Stéphane. I'm thinking it will be best for other PRs to rebase against this new travis configuration. But that seems like a lot of work... -- assignee: -> Mariatta stage: patch review -> backport needed

[issue32794] PyNumber_Float counterpart that doesn't accept strings

2018-02-08 Thread Mark Dickinson
Mark Dickinson added the comment: > Maybe use PyNumber_Check() [...] Ah, that works. It reads better than the `PyFloat_AsDouble` solution, too, since it's far from obvious that `PyFloat_AsDouble` goes to the trouble to coerce a float-y thing to a float. I did some

[issue8525] Display exceptions' subclasses in help()

2018-02-08 Thread ppperry
Change by ppperry : -- title: Display exception's subclasses in help() -> Display exceptions' subclasses in help() ___ Python tracker

[issue32791] Add\Remove Programs entry is not created.

2018-02-08 Thread Steve Dower
Steve Dower added the comment: This is the same as issue25166 It can't be fixed easily (Wix doesn't actually support this), but I have some ideas that have been looking okayish. Still hoping to get it to work fully for 3.7, but as it affects the installer we may not

[issue32585] Add ttk::spinbox to tkinter.ttk

2018-02-08 Thread Ned Deily
Ned Deily added the comment: It is past the feature code cutoff for 3.7.0 but the risks seem low and the benefit reasonably high. Please make sure it is merged ASAP to allow time for buildbot exposure, etc, prior to 370b2. -- stage: test needed -> commit review

[issue32690] Return function locals() in order of creation?

2018-02-08 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +5409 ___ Python tracker ___

[issue32802] Travis does not compile Python if there is one change in the Documentation

2018-02-08 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset ad3997c592ee9b75fdcd44a0eaa51d748a2e2394 by Mariatta (Miss Islington (bot)) in branch '3.7': bpo-32802: Fix Travis build (GH-5589) (GH-5590)

[issue32792] ChainMap should preserve order of underlying mappings

2018-02-08 Thread Ned Deily
Ned Deily added the comment: See discussion on PR 5586 regarding backporting to 3.6.x. -- versions: -Python 3.6 ___ Python tracker

[issue32790] Keep trailing zeros in precision for string format option g

2018-02-08 Thread Mark Dickinson
Mark Dickinson added the comment: The behaviour here is intentional, though the reasons for doing it this way are at least partly historical: it's the way that %g formatting works in C's *printf functions (see C99 7.19.6.1p8 for details), and as a direct result of that

[issue32804] urllib.retrieve documentation doesn't mention context parameter

2018-02-08 Thread Julian O
New submission from Julian O : In 2014, urlretrieve was changed to accept a context parameter to configure, for example, SSL settings. Ref: https://github.com/python/cpython/commit/b206473ef8a7abe9abf5ab8776ea3bcb90adc747 However, 2.7.14 documentation does not

[issue32784] Wrong argument name for csv.DictReader in documentation

2018-02-08 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: 3.5 is for security fixes only now. We don't do documentation or regular bug fixes there anymore. -- versions: -Python 3.5 ___ Python tracker

[issue32585] Add ttk::spinbox to tkinter.ttk

2018-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a48e78a0b7761dd74f1d03fc69e0f6caa6f02fe6 by Serhiy Storchaka (Alan D Moore) in branch 'master': bpo-32585: Add tkinter.ttk.Spinbox. (#5221)

[issue32585] Add ttk::spinbox to tkinter.ttk

2018-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ned. -- ___ Python tracker ___

[issue32585] Add ttk::spinbox to tkinter.ttk

2018-02-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +5410 stage: commit review -> patch review ___ Python tracker ___

[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-02-08 Thread Ned Deily
Ned Deily added the comment: Can anyone explain what the difference is between 2.7 and 3.6, i.e. why there is the performance regression for 2.7 but not for 3.6 using the same compiler instance? It would be better to understand and solve that problem rather than trying to

[issue32803] smtplib: LMTP broken in the case of multiple RCPT

2018-02-08 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: 3.5 and 3.4 are in security fix only mode, so narrowing the relevant versions. -- nosy: +barry versions: -Python 3.4, Python 3.5 ___ Python tracker

[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-02-08 Thread INADA Naoki
INADA Naoki added the comment: How can we distinguish Apple LLVM with LLVM easily? Or should we disable computed-gotos by default on LLVM? It's only for Python 2. 5x slowdown is too large comparing to 10% speedup. -- ___

[issue32803] smtplib: LMTP broken in the case of multiple RCPT

2018-02-08 Thread jasen betts
New submission from jasen betts : smtplib's LMTP support is broken, LMTP returns multiple responses at and of data if there have been multiple successful RCPT TO commands, but smtplib::data() only looks for a single response. see the example conversation on page 3

[issue32394] socket lib beahavior change in 3.6.4

2018-02-08 Thread Ma Lin
Ma Lin added the comment: > What's about other OS/flags? > Should we commit that every exposed socket flag is supported in runtime? > It looks like very heavy burden. Let alone run-time check. Flags only depend on .C code and the building SDK, therefore, for a certain

[issue32793] smtplib: duplicated debug message

2018-02-08 Thread TaoQingyun
New submission from TaoQingyun <845767...@qq.com>: ``` if self.debuglevel > 0: self._print_debug('connect:', (host, port)) ``` The above both in _get_socket and connect method, and connect also invoke _get_socket. -- components: Library (Lib) files:

[issue32794] PyNumber_Float counterpart that doesn't accept strings

2018-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe use PyNumber_Check() to distinguish these two cases? if (PyNumber_Check(obj)) return PyNumber_Float(obj); PyErr_SetString(PyExc_TypeError, "not a number"); return NULL; -- nosy:

[issue32794] PyNumber_Float counterpart that doesn't accept strings

2018-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For converting a string to a float there is PyFloat_FromString(). So that this part of functionality of PyNumber_Float() is redundant. In long perspective it would be worth to deprecate it. --

[issue32796] 3.8-dev definition not available

2018-02-08 Thread Christian Heimes
Christian Heimes added the comment: 3.8 is master branch. -- nosy: +christian.heimes ___ Python tracker ___

[issue32792] ChainMap should preserve order of underlying mappings

2018-02-08 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +5404 stage: -> patch review ___ Python tracker ___

[issue32796] 3.8-dev definition not available

2018-02-08 Thread Jensen Taylor
New submission from Jensen Taylor : I can't build with Python 3.8 yet on Travis-CI because of this -- messages: 311825 nosy: Jensen Taylor priority: normal severity: normal status: open title: 3.8-dev definition not available versions: Python 3.8

[issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout

2018-02-08 Thread Mike Lewis
New submission from Mike Lewis : When using a timeout with check_output(), the call does not terminate unless the child process generates output after the timeout. Looking at the code, it appears there is a second call to communicate() after the timeout has

[issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout

2018-02-08 Thread Mike Lewis
Mike Lewis added the comment: Example of the output: $ ./timeout.py Subprocess with idle stdout at timeout: start at 1518081130.44 Timed out at: 1518081135.45, 5 seconds Generating stdout from subprocess: start at 1518081135.45 Timed out at: 1518081136.47, 1

[issue32792] ChainMap should preserve order of underlying mappings

2018-02-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +ned.deily, serhiy.storchaka ___ Python tracker ___

[issue32792] ChainMap should preserve order of underlying mappings

2018-02-08 Thread Raymond Hettinger
New submission from Raymond Hettinger : This also applies to 3.6 because ChainMap can be used with OrderedDict. -- components: Library (Lib) messages: 311817 nosy: rhettinger priority: normal severity: normal status: open title: ChainMap should preserve

[issue32794] PyNumber_Float counterpart that doesn't accept strings

2018-02-08 Thread Mark Dickinson
New submission from Mark Dickinson : Our abstract objects layer in the C-API includes PyNumber_Float [1], which is equivalent to a Python-level `float` call, including the behaviour of accepting strings. I'm not convinced that it's a particularly useful function: I suspect

[issue32792] ChainMap should preserve order of underlying mappings

2018-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: An alternate implementation: d = {} for mapping in reversed(self.maps): d.update(mapping) return iter(d) Unfortunately both implementations work only with hashable keys. In general case mappings may be not hashtables.

[issue32796] 3.8-dev definition not available

2018-02-08 Thread Nathaniel Smith
Nathaniel Smith added the comment: I think you meant to file this on pyenv, which is the tool that travis needs to have updated to know about 3.8 before they can start providing builds. Their bug tracker is here: https://github.com/pyenv/pyenv/issues -- nosy: +njs

[issue32796] 3.8-dev definition not available

2018-02-08 Thread Christian Heimes
Christian Heimes added the comment: I'm not sure I follow. Are you having trouble to locate the 3.8 branch or are you missing 3.8-dev on Travis CI? The 3.8 branch is the master branch. Python upstream development does not provide dev builds for Travis CI. Please report the

[issue32642] add support for path-like objects in sys.path

2018-02-08 Thread Jay Yin
Jay Yin added the comment: what file(s) is/are the sys.path code located in? -- ___ Python tracker ___

[issue32804] urllib.retrieve documentation doesn't mention context parameter

2018-02-08 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +easy ___ Python tracker ___ ___

[issue32804] urllib.retrieve documentation doesn't mention context parameter

2018-02-08 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: effectively, there is no documentation about this new parameter. -- nosy: +matrixise ___ Python tracker

[issue32761] Create IDLE Modern Mac keyset

2018-02-08 Thread Ned Deily
Ned Deily added the comment: Terry, it would be better to get opinions from others who really use IDLE on macOS. But, FWIW: - I agree with Raymond that Ctrl-A makes much more sense as the default for beginning of line for the reasons he cites. - Command-A is appropriate

[issue32784] Wrong argument name for csv.DictReader in documentation

2018-02-08 Thread cowlinator
cowlinator added the comment: Hi, thanks for the quick action on this! The documentation is still wrong for 3.5 . I had selected 3.5 for the affected versions, but I guess it got removed? -- versions: +Python 3.5 ___ Python

[issue32801] Lib/_strptime.py: utilize all()

2018-02-08 Thread Дилян Палаузов
New submission from Дилян Палаузов : diff --git a/Lib/_strptime.py b/Lib/_strptime.py --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -238,10 +238,7 @@ class TimeRE(dict): """ to_convert = sorted(to_convert, key=len, reverse=True) -for

[issue30688] support named Unicode escapes (\N{name}) in re

2018-02-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +5405 ___ Python tracker ___

[issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x

2018-02-08 Thread INADA Naoki
INADA Naoki added the comment: I don't know exactly. But as far as I saw, Python 3's eval loop has less function-wide local variables. For example, ROT_THREE uses only block local variable.

[issue32585] Add ttk::spinbox to tkinter.ttk

2018-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: All tests are passed. Ned, is it possible to get this feature in 3.7? I didn't have possibility to merge it before 3.7b1. This is just an addition of a simple class. It should be added years ago, it was not added before just

[issue32797] Tracebacks from Cython modules no longer work

2018-02-08 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : Displaying the source code in tracebacks for Cython-compiled extension modules in IPython no longer works due to PEP 302. Various fixes are possible, the two most obvious ones are: 1. linecache should continue searching for the

[issue32790] Keep trailing zeros in precision for string format option g

2018-02-08 Thread Severin Wünsch
Severin Wünsch added the comment: This meet my needs. Maybe the documentation could also add this information in the chart for 'g' here: https://docs.python.org/3.7/library/string.html#format-specification-mini-language as only into the running text. As I did not notice

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-08 Thread Byron Hawkins
New submission from Byron Hawkins : open_file = open("file.txt", "r+b") file_map = mmap.mmap(open_file, 0) file_map.seek(offset) file_map.write("foobar") # success file_map.flush() # success file_map.flush(offset, len("foobar")) # Fails with "errno 22" This example

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-08 Thread Christian Heimes
Christian Heimes added the comment: offset must be a multiple of pagesize. This is a known but undocumented restriction on some platforms, see http://man7.org/linux/man-pages/man2/msync.2.html -- assignee: -> docs@python components: +Documentation -Library (Lib)

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-08 Thread Christian Heimes
Christian Heimes added the comment: I'm marking this as a low priority and simple documentation bug. The mmap module exposes the page size of the architecture as mmap.PAGESIZE. -- keywords: +easy ___ Python tracker

[issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args

2018-02-08 Thread Byron Hawkins
Byron Hawkins added the comment: Couldn't the implementation check the page size and throw a better error (for relevant platforms)? Or better yet, adjust the offset to the nearest inclusive page boundary. -- ___ Python

[issue32799] returned a result with an error set

2018-02-08 Thread Eli Ribble
New submission from Eli Ribble : We've had about 200 occurrences of this error in various parts of our code. I have captured stack traces using sentry so I may be able to provide more detail if requested. The ultimate problem is that a SystemError is raised from within

[issue32800] Replace deprecated link to new page on w3c site

2018-02-08 Thread sblondon
New submission from sblondon : The documentation about namespace of ElemenTree (https://docs.python.org/3/library/xml.etree.elementtree.html#parsing-xml-with-namespaces) has a link for 'default namespace' to