[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-25 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Oct 25, 2018, at 13:17, Ned Deily wrote: > > OK. When you asy "every version of Python 3", are those all versions you've > built yourself? If so, what ./configure arguments do you use? Yes, built myself from source (both .tar.gz and git tag). I don’t u

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: Yes, that's exactly right. That's how local variables work in Python: x = 999 # global x def demo(): if False: x = 1 x # local x has no value does the same thing. This is standard, documented behaviour, regardless of which kind of assignment

[issue33944] Deprecate and remove pth files

2018-10-25 Thread Antony Lee
Antony Lee added the comment: There are a number of packages that can "self-import" into any Python process depending on the presence of an environment variable, by installing a pth file that contains something like `import os; __import__("thepkg") if os.environ.get("THEENVVAR") else None`.

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread James Hewitt
James Hewitt added the comment: So just the fact that somewhere in the function a name is referenced, even if that code isn't actually executed, is enough to change the local namespace. I think I knew that, but didn't know that's what it meant :) I guess the moral is, pay attention to scope

[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-25 Thread Ned Deily
Ned Deily added the comment: I've also tried building on a vanilla-ish 10.8 VM, both without and with installing the /usr/include headers, and I still don't see the failure you're seeing. If you look at Modules/posixmodule.c, you'll see there's a fair amount of Apple-specifc or -caused hack

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: Exmaple 1: --- import abc import functools class AbstractExpensiveCalculator(abc.ABC): @abc.abstractmethod @functools.cached_property def calculate(self): pass AbstractExpensiveCalculator() --- Exmaple 2: --- import abc import functools

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: Context: @functools.cached_property has been added by bpo-21145. -- ___ Python tracker ___ ___ Py

[issue21145] Add the @cached_property decorator

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: FYI there is discussion in bpo-34995 about the usage of @cached_property with abstract methods. -- nosy: +vstinner ___ Python tracker ___ __

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-25 Thread miss-islington
miss-islington added the comment: New changeset 1770d1c5121ed6c64d7072875738f97e07eede8a by Miss Islington (bot) (Stéphane Wirtel) in branch 'master': bpo-35038: AttributeError: 'frame' object has no attribute 'f_restricted'. (GH-10098) https://github.com/python/cpython/commit/1770d1c5121ed6c

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +9436 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-25 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +9435 stage: needs patch -> patch review ___ Python tracker ___ ___ Py

[issue34547] Wsgiref server does not handle closed connections gracefully

2018-10-25 Thread Petter S
Change by Petter S : -- pull_requests: +9437, 9438 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34547] Wsgiref server does not handle closed connections gracefully

2018-10-25 Thread Petter S
Change by Petter S : -- pull_requests: +9437 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-25 Thread miss-islington
miss-islington added the comment: New changeset c64c4056c1fce0a18e5810fc6352712612a64010 by Miss Islington (bot) in branch '3.7': bpo-35038: AttributeError: 'frame' object has no attribute 'f_restricted'. (GH-10098) https://github.com/python/cpython/commit/c64c4056c1fce0a18e5810fc6352712612a

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-25 Thread miss-islington
miss-islington added the comment: New changeset 3b87151879adb795c3c0372832c87da84ee93974 by Miss Islington (bot) in branch '3.6': bpo-35038: AttributeError: 'frame' object has no attribute 'f_restricted'. (GH-10098) https://github.com/python/cpython/commit/3b87151879adb795c3c0372832c87da84ee

[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-25 Thread Ned Deily
Ned Deily added the comment: "on a vanilla-ish 10.8 VM" ?? I meant 10.14, of course. -- ___ Python tracker ___ ___ Python-bugs-list

[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9439 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35022] MagicMock should support `__fspath__`

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6c83d9f4a72905d968418bef670bb3091d2744db by Victor Stinner (Max Bélanger) in branch 'master': bpo-35022: unittest.mock.MagicMock now also supports __fspath__ (GH-9960) https://github.com/python/cpython/commit/6c83d9f4a72905d968418bef670bb3091d274

[issue35022] MagicMock should support `__fspath__`

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: Thanks Maxime Belanger for your contribution! Thanks Mario Corchero for the review. Oh, you added Python 3.7 to this issue, but sadly we don't add new features to minor Python versions (like Python 3.7.2) :-( Otherwise, it would mean that depending on the

[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset c89a93271447ec65e83a1dc7605e62dbf272cafd by Victor Stinner in branch 'master': bpo-35053: Define _PyTraceMalloc_NewReference in object.h (GH-10107) https://github.com/python/cpython/commit/c89a93271447ec65e83a1dc7605e62dbf272cafd -- _

[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: Oh :-( I didn't expect that I would have to declare PyTraceMalloc_NewReference() in object.h even if Py_LIMITED_API is defined... Python currently leaks too much things even if Py_LIMITED_API is defined. It's time to break the C API! :-) https://pythoncapi.r

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-10-25 Thread Carl Meyer
Carl Meyer added the comment: FWIW, it seems to me (author of `cached_property` patch) that while just using `@property` on the abstract method plus a comment is a reasonable and functional workaround that sacrifices only a small documentation value, there's no reason why `@cached_property`

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9440 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue35038] AttributeError: 'frame' object has no attribute 'f_restricted'

2018-10-25 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: all the PRs have been merged, we can close this issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35055] Error when we try to download the epub archive

2018-10-25 Thread Ned Deily
Ned Deily added the comment: @Stéphane, please leave this open for now until we have a better resolution. We'll make sure it gets closed. -- ___ Python tracker ___ __

[issue35055] Error when we try to download the epub archive

2018-10-25 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: thanks ned -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Steven, Sure, I am going to explain, I was at the social event of PyCon Germany without my laptop and the code was not really clear on my smartphone. I wanted to know if there was an indentation issue. It's also the reason for my big reply with the initi

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9441 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9442 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9443 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9444 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots

2018-10-25 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3ec9af75f6825a32f369ee182a388c365db241b6 by Victor Stinner in branch 'master': bpo-9263: _Py_NegativeRefcount() use _PyObject_AssertFailed() (GH-10109) https://github.com/python/cpython/commit/3ec9af75f6825a32f369ee182a388c365db241b6 -

[issue35007] Minor change to weakref docs

2018-10-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue35064] COUNT_ALLOCS build export inc_count() and dec_count() functions which don't have a "Py_" prefix

2018-10-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-25 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +9445 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-25 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +9446 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-25 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +9446, 9447 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-25 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +9448 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-25 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +9449 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-25 Thread Senthil Kumaran
Senthil Kumaran added the comment: This should be it - https://github.com/python/cpython/pull/10116 https://github.com/python/cpython/pull/10114 https://github.com/python/cpython/pull/10113 https://github.com/python/cpython/pull/10115 Lets merge these simple PRs and close this issue. --

[issue1154351] add get_current_dir_name() to os module

2018-10-25 Thread Braden Groom
Change by Braden Groom : -- pull_requests: +9450 stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue35072] re.sub does not play nice with chr(92)

2018-10-25 Thread Samuel Warfield
New submission from Samuel Warfield : Bug with regex substitutions. When calling the re.sub() method directly char(92), the double backslash charecter as the replacement, throws an exception. Whereas compiling a regex object then calling its own .sub() method works completely fine. I did a quick

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-10-25 Thread INADA Naoki
INADA Naoki added the comment: > I like the idea of using @functools.cached_property in an abstract class as > "documentation". To announce that the property will be cached, even if > technically it will not be cached. It's more to use the code as documentation > than to execute any code.

[issue35072] re.sub does not play nice with chr(92)

2018-10-25 Thread Ezio Melotti
Ezio Melotti added the comment: I'm assuming you want to replace double backslashes with single backslashes in stringy_thing, so I defined stringy_thingy and tried both your snippets but they are both failing: >>> stringy_thingy = r'foo\\bar\\baz' >>> print(stringy_thingy) # stringy_thingy c

[issue35073] 'from app import __init__' behaves differently with native import and importlib

2018-10-25 Thread Quentin Agren
New submission from Quentin Agren : I'm running Python 3.6 on Ubuntu 16.04 I don't know if this should qualify as a bug, but I noticed the following behavior difference in the (contrived?) scenario of directly importing '__init__' from a package: ## Setup ## mkdir app echo 'print(f"Executin

[issue35073] 'from app import __init__' behaves differently with native import and importlib

2018-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: `from app import __init__` is equivalent to `importlib.import_module('app').__init__`. `importlib.import_module('.__init__', 'app')` is equivalent to `import app.__init__`. -- nosy: +serhiy.storchaka ___ Python

[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: Why do we need this Py_STATIC_INLINE macro? If you want to have one for enabling always inline, that's fine with me, since it's compiler-specific. But the current Py_STATIC_INLINE macro seems to conflate linkage with always-inline behavior. -- _

[issue35054] Add more index entries for symbols

2018-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ddb961d2abe5d5fde76d85b21a77e4e91e0043ad by Serhiy Storchaka in branch 'master': bpo-35054: Add more index entries for symbols. (GH-10064) https://github.com/python/cpython/commit/ddb961d2abe5d5fde76d85b21a77e4e91e0043ad --

[issue34547] Wsgiref server does not handle closed connections gracefully

2018-10-25 Thread Petter S
Change by Petter S : -- pull_requests: -9437 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue34547] Wsgiref server does not handle closed connections gracefully

2018-10-25 Thread Petter S
Change by Petter S : -- pull_requests: -9438 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue35074] source install [3.7.1] on debian jessie

2018-10-25 Thread Leo Li
New submission from Leo Li : Hi Team, I met the issue consistently on 3.7 and 3.7.1. The configure is well, but when the make will output error messges: step1: [ok] sudo ./configure --prefix=/opt/python3.71 --enable-optimizations step2: make [fail] if test $? -ne 0 ; then \ echo "gene

<    1   2