From report at bugs.python.org Wed May 1 00:41:31 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 01 May 2019 04:41:31 +0000 Subject: [issue36694] Excessive memory use or memory fragmentation when unpickling many small objects In-Reply-To: <1555866680.03.0.817045016777.issue36694@roundup.psfhosted.org> Message-ID: <1556685691.11.0.518326970831.issue36694@roundup.psfhosted.org> Inada Naoki added the comment: Memory allocation pattern is: alloc 24 # float alloc 24 alloc 24 alloc 64 # temporary tuple alloc 72 free 64 # free temporary tuples free 64 free 64 This cause some sort of fragmentation. Some pools in arenas are unused. This prevents pymalloc to return arenas to OS. (Note that pymalloc manages memory as arena (256KiB) > pool (4KiB) > blocks (requested sizes <= 512). pymalloc can return the memory to OS only when arena is clean) But this is not too bad because many pools is free. Any allocation which size < 512 can reuse the free pools. If you run some code after unpickle, the pools will be reused efficiently. (In case of very bad fragmentation, many pools are dirty: some blocks in pools are used while many blocks in the pool is free. So only same size alloc request can use the pool.) There are two approach to fix this problem. 1. Investigate why temporary tuple is not freed until last stage of unpickle. 2. When there are too many free pools, return some by MADV_FREE or MADV_DONTNEED. I think (1) should be considered first. But (2) is more general solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 00:41:39 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 01 May 2019 04:41:39 +0000 Subject: [issue36694] Excessive memory use or memory fragmentation when unpickling many small objects In-Reply-To: <1555866680.03.0.817045016777.issue36694@roundup.psfhosted.org> Message-ID: <1556685699.78.0.0202501642733.issue36694@roundup.psfhosted.org> Change by Inada Naoki : ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 02:50:54 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 01 May 2019 06:50:54 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1556693454.44.0.272140156977.issue30458@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +12953 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 03:07:31 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 01 May 2019 07:07:31 +0000 Subject: [issue36761] Extended slice assignment + iterable unpacking In-Reply-To: <1556650082.38.0.163364239874.issue36761@roundup.psfhosted.org> Message-ID: <1556694451.01.0.804853765182.issue36761@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +georg.brandl, gvanrossum versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 03:22:40 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 01 May 2019 07:22:40 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data Message-ID: <1556695360.21.0.794709437035.issue36764@roundup.psfhosted.org> New submission from Batuhan : Types module doesn't have a type for _abc_data ---------- messages: 341180 nosy: isidentical priority: normal severity: normal status: open title: Types module doesn't have a type for _abc_data _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 03:35:28 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 01 May 2019 07:35:28 +0000 Subject: [issue36694] Excessive memory use or memory fragmentation when unpickling many small objects In-Reply-To: <1555866680.03.0.817045016777.issue36694@roundup.psfhosted.org> Message-ID: <1556696128.36.0.826362357123.issue36694@roundup.psfhosted.org> Inada Naoki added the comment: I confirmed this fragmentation is caused by memo in Unpickler. Pickler memos "reduce"-ed tuples while it is just a temporary object. I am not sure that this behavior is good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 03:57:44 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 01 May 2019 07:57:44 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556695360.21.0.794709437035.issue36764@roundup.psfhosted.org> Message-ID: <1556697464.38.0.0545818052145.issue36764@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +12954 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 04:04:24 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 01 May 2019 08:04:24 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556695360.21.0.794709437035.issue36764@roundup.psfhosted.org> Message-ID: <1556697864.65.0.398472833653.issue36764@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Library (Lib) nosy: +yselivanov type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 05:17:22 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 01 May 2019 09:17:22 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556695360.21.0.794709437035.issue36764@roundup.psfhosted.org> Message-ID: <1556702242.86.0.248745872242.issue36764@roundup.psfhosted.org> Inada Naoki added the comment: It's implementation detail of abc. I don't want expose it in public. (Note that we maintain pure Python version of abc module too.) Why you need it in types module? I don't think all types exposed via types module. Only useful types should be exposed. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 05:23:10 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 May 2019 09:23:10 +0000 Subject: [issue36761] Extended slice assignment + iterable unpacking In-Reply-To: <1556650082.38.0.163364239874.issue36761@roundup.psfhosted.org> Message-ID: <1556702590.11.0.000567590970172.issue36761@roundup.psfhosted.org> Serhiy Storchaka added the comment: For the second case, you can use a, *L[::2] = "abc" For the first case this does not work, because an assignment can have only one starred expression. Making the first case to work as you expected is breaking change. Currently L[:], *rest = 'abcdef' sets L to ['a'] and rest to ['b', 'c', 'd', 'e', 'f']. Consistent implementing of your idea would set L to ['a', 'b', 'c'] and rest to ['d', 'e', 'f'] (because len(L[:]) == 3 before assignment). What is your use case? Why do you need such syntax? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 05:32:37 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 01 May 2019 09:32:37 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556702242.86.0.248745872242.issue36764@roundup.psfhosted.org> Message-ID: Batuhan added the comment: I'm working on a project that is a custom byte code interpreter for some extended types. I needed ABCData there and i thought types module already has that, but i was wrong so i added. Isn't types module exposing some types that are implementation detail such as cells? On Wed, May 1, 2019, 12:17 PM Inada Naoki wrote: > > Inada Naoki added the comment: > > It's implementation detail of abc. I don't want expose it in public. > (Note that we maintain pure Python version of abc module too.) > > Why you need it in types module? > I don't think all types exposed via types module. Only useful types > should be exposed. > > ---------- > nosy: +inada.naoki > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 05:45:04 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 01 May 2019 09:45:04 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556695360.21.0.794709437035.issue36764@roundup.psfhosted.org> Message-ID: <1556703904.63.0.680925942771.issue36764@roundup.psfhosted.org> Inada Naoki added the comment: > I'm working on a project that is a custom byte code interpreter for some extended types. I needed ABCData there I still don't understand why you need _abc_data. > Isn't types module exposing some types that are implementation detail such as cells? cell object is implementation detail of CPython core. While other Python implementations will not have it, it is long lived in CPython and it is stable. On the other hand, _abc_data is implementation detail of extension module, not interpreter. For example, _json.Encoder is not exposed in types module. If it is really needed, type of _abc_data can be exposed via _abc module. But I prefer keep internal data opaque unless there are reasonable reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 06:47:02 2019 From: report at bugs.python.org (Kasra Vand) Date: Wed, 01 May 2019 10:47:02 +0000 Subject: [issue36765] Invalid grammar for f_expression Message-ID: <1556707622.28.0.558014565805.issue36765@roundup.psfhosted.org> New submission from Kasra Vand : Due to the discussion in following SO question https://stackoverflow.com/questions/55933956/what-does-a-star-asterisk-do-in-f-string/55934472#55933956 and the inconsistency of the source behaviour with the documentation I think using `"*" or_expr` for f_expression is wrong or at least not what it meant to be and very vague. I was wondering if there's any reason for using `"*" or_expr`. ---------- assignee: docs at python components: Documentation messages: 341186 nosy: Kasra Vand, docs at python priority: normal severity: normal status: open title: Invalid grammar for f_expression type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 06:54:26 2019 From: report at bugs.python.org (Kasra Vand) Date: Wed, 01 May 2019 10:54:26 +0000 Subject: [issue36765] Invalid grammar for f_expression In-Reply-To: <1556707622.28.0.558014565805.issue36765@roundup.psfhosted.org> Message-ID: <1556708066.13.0.142334689108.issue36765@roundup.psfhosted.org> Kasra Vand added the comment: Due to the discussion in following SO question https://stackoverflow.com/questions/55933956/what-does-a-star-asterisk-do-in-f-string/55934472#55933956 and the inconsistency of the source behaviour with the documentation I think using `"*" or_expr` for f_expression is wrong or at least not what it meant to be and very vague. I was wondering if there's any reason for using `"*" or_expr` instead of let's say just `expr` which I think is what the `or_expr` identifier is intended to be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 07:07:31 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 01 May 2019 11:07:31 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556695360.21.0.794709437035.issue36764@roundup.psfhosted.org> Message-ID: <1556708851.07.0.846763423187.issue36764@roundup.psfhosted.org> Batuhan added the comment: > I still don't understand why you need _abc_data. I'm using it both for comparisons which needed to build an abstract base class and typing. Currently there are 2 ways, i need to create a dummy abc and put type() calls everywhere or i need to set a constant to my module and _abc_data is totally irrelevant with this. I dont think users want that. > On the other hand, _abc_data is implementation detail of extension module, not interpreter. Abstract base classes can be called a core part of python too and when someone needs to obtain type of the struct that holds state of ABCs it shouldnt be hard, types module should expose it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 07:30:01 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 01 May 2019 11:30:01 +0000 Subject: [issue36765] Invalid grammar for f_expression In-Reply-To: <1556707622.28.0.558014565805.issue36765@roundup.psfhosted.org> Message-ID: <1556710201.24.0.976696583718.issue36765@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 07:32:18 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 01 May 2019 11:32:18 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556695360.21.0.794709437035.issue36764@roundup.psfhosted.org> Message-ID: <1556710338.25.0.218378763325.issue36764@roundup.psfhosted.org> Inada Naoki added the comment: > I'm using it both for comparisons which needed to build an abstract base class and typing. Currently there are 2 ways, i need to create a dummy abc and put type() calls everywhere or i need to set a constant to my module and _abc_data is totally irrelevant with this. I dont think users want that. It doesn't make sense to me. Could you elaborate? > Abstract base classes can be called a core part of python too abc is core part. But note that _py_abc can be used instead of _abc. _abc_data is used only when _abc is used as backend of abc. At least, your pull request doesn't work correctly when _py_abc is used. > and when someone needs to obtain type of the struct that holds state of ABCs it shouldnt be hard, types module should expose it. I think it is bad idea and we don't support such usage officially at all. Such code doesn't work when _py_abc is used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 07:36:08 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 01 May 2019 11:36:08 +0000 Subject: [issue36765] Invalid grammar for f_expression In-Reply-To: <1556707622.28.0.558014565805.issue36765@roundup.psfhosted.org> Message-ID: <1556710568.06.0.410086387592.issue36765@roundup.psfhosted.org> Eric V. Smith added the comment: I don't think this is a problem. There are plenty of things allowed by Python's grammar that are converted to errors in subsequent passes. For example: >>> *[1] File "", line 1 SyntaxError: can't use starred expression here >>> *[1],*[2] (1, 2) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 07:56:01 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 01 May 2019 11:56:01 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556695360.21.0.794709437035.issue36764@roundup.psfhosted.org> Message-ID: <1556711761.15.0.137727865615.issue36764@roundup.psfhosted.org> Batuhan added the comment: It is based on default behavior of cpython. It tries to import _abc first instead of _py_abc and this type targets c implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 08:00:11 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 01 May 2019 12:00:11 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1556712011.02.0.991447304362.issue30458@roundup.psfhosted.org> miss-islington added the comment: New changeset 2fc936ed24cf04ed32f6015a8aa78c8ea40da66b by Miss Islington (bot) (Xtreak) in branch 'master': bpo-30458: Disable https related urllib tests on a build without ssl (GH-13032) https://github.com/python/cpython/commit/2fc936ed24cf04ed32f6015a8aa78c8ea40da66b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 08:02:40 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 01 May 2019 12:02:40 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1556712160.81.0.555840308417.issue30458@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 08:13:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 May 2019 12:13:50 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556712830.66.0.0345211986494.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +12955 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 08:28:15 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 May 2019 12:28:15 +0000 Subject: [issue36694] Excessive memory use or memory fragmentation when unpickling many small objects In-Reply-To: <1555866680.03.0.817045016777.issue36694@roundup.psfhosted.org> Message-ID: <1556713695.83.0.628543224965.issue36694@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +12956 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 08:30:38 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 May 2019 12:30:38 +0000 Subject: [issue36694] Excessive memory use or memory fragmentation when unpickling many small objects In-Reply-To: <1555866680.03.0.817045016777.issue36694@roundup.psfhosted.org> Message-ID: <1556713838.51.0.67620154131.issue36694@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 13036 makes the C implementation no longer memoizing temporary objects. This decreases memory fragmentation and peak memory consumption on pickling and unpickling. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 09:12:27 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 01 May 2019 13:12:27 +0000 Subject: [issue36766] Typos in docs and code comments Message-ID: <1556716347.32.0.805084032343.issue36766@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : I ran aspell through the files and found below to be typos while manually filtering the aspell output. I have classified it into sections since I am not sure if code comments are worth fixing and added relevant files where they are present. I am tagging the issue for PyCon US dev sprints. Please don't make a PR for this if you have already contributed a PR. # Docs folder Cotnent -> Content-Transfer-Encoding (Doc/library/email.generator.rst) attibute -> attribute (Doc/library/pyclbr.rst) milleseconds -> milliseconds (Doc/library/idle.rst) # Code comments actuall -> actual (Lib/test/test_dataclasses.py) actully -> actually (Lib/contextlib.py) agains -> against (Lib/pathlib.py) Amerian -> American (Lib/test/test_random.py) Conflic -> Conflict (Lib/idlelib/idle_test/test_config.py) Depedent -> Dependent (Lib/test/datetimetester.py) Diffent -> Different (Lib/test/support/__init__.py) Diplay -> Display (Objects/object.c) Doens't -> Doesn't (Lib/test/test_ssl.py) Dono't -> Don't (Lib/test/test_importlib/test_lazy.py) intermitted -> intermittent (Lib/test/pickletester.py) invokation -> Invocation (Lib/platform.py) occuring -> occurring (Lib/test/test_tools/test_i18n.py) permuations -> permutations (Lib/tokenize.py) resouce -> resource (Lib/multiprocessing/resource_sharer.py) statists -> statistics (Lib/pstats.py) # Docstring Dafault -> Default (Lib/turtle.py) Diplay -> Display (Lib/idlelib/help.py) Intput -> Input (Lib/lib2to3/pgen2/tokenize.py) milleseconds -> milliseconds (Lib/idlelib/configdialog.py, Lib/idlelib/help.html) ---------- assignee: Mariatta components: Documentation messages: 341194 nosy: Mariatta, cheryl.sabella, xtreak priority: normal severity: normal status: open title: Typos in docs and code comments type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 09:15:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 May 2019 13:15:53 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556716553.87.0.196826888196.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +12957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 09:23:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 May 2019 13:23:02 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556716982.9.0.442756596393.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1a9f0d8efded4bf37c864ed572beff28c43c7c77 by Victor Stinner in branch 'master': bpo-36763: Add _PyCoreConfig_SetString() (GH-13035) https://github.com/python/cpython/commit/1a9f0d8efded4bf37c864ed572beff28c43c7c77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 09:49:57 2019 From: report at bugs.python.org (Senhui Guo) Date: Wed, 01 May 2019 13:49:57 +0000 Subject: [issue36767] Segmentation fault when running c extension on macOS Message-ID: <1556718597.1.0.626589085866.issue36767@roundup.psfhosted.org> New submission from Senhui Guo : I was trying to build a c extension with cpython while it keeps crashing when I get it running, the code is quite simple: ```cpp #include "Python.h" int main () { PyObject *p; p = PySet_New(NULL); } ``` I build with command `clang -I/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m -L/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m test.c -o run` when I ran it `./run`, segmentation fault: 11 kicks in However, if I go with python2, it worked fine: `clang -I /usr/local/Cellar/python\@2/2.7.16/Frameworks/Python.framework/Versions/2.7/include/python2.7 -L /usr/local/opt/python\@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/ -lpython2.7 test.c -o run` I was wondering if it is the problem with macOS? I tried build python from source, but didn't work, keeps crashing ---------- components: macOS messages: 341196 nosy: Senhui Guo, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Segmentation fault when running c extension on macOS type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:01:56 2019 From: report at bugs.python.org (Charles P) Date: Wed, 01 May 2019 14:01:56 +0000 Subject: [issue36768] distutils.util.convert_path mangles windows paths with forward slashes Message-ID: <1556719316.49.0.543223746824.issue36768@roundup.psfhosted.org> New submission from Charles P : https://github.com/python/cpython/blob/master/Lib/distutils/util.py#L106-L131 Due to the split('/') and os.path.join(), this function converts an absolute path of the form "C:/foobar" into a relative "C:foobar", which is likely to be entirely different Usecase: pip install --prefix=/home/charles/python foobar within an MSYS2 terminal automagically converts the path to C:/Users/charles/python for some reason or another, but it's not exactly uncommon for users to use forward slashes on Windows regardless I'm not entirely sure what the correct fix would be here, or even if it should be fixed at a higher level - in setuptools or pip ---------- components: Distutils messages: 341197 nosy: LordAro, dstufft, eric.araujo priority: normal severity: normal status: open title: distutils.util.convert_path mangles windows paths with forward slashes type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:12:45 2019 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 01 May 2019 14:12:45 +0000 Subject: [issue36769] doc Document that fnmatch.filter supports any kind of iterable not just lists Message-ID: <1556719965.28.0.191162970906.issue36769@roundup.psfhosted.org> New submission from Andr?s Delfino : Documentation on fnmatch.filter says: Return the subset of the list of names that match pattern. It is the same as [n for n in names if fnmatch(n, pattern)], but implemented more efficiently. But the function actual accepts any kind of iterable. I think it should be documented. ---------- assignee: docs at python components: Documentation messages: 341198 nosy: adelfino, docs at python priority: normal severity: normal status: open title: doc Document that fnmatch.filter supports any kind of iterable not just lists type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:13:08 2019 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 01 May 2019 14:13:08 +0000 Subject: [issue36769] doc Document that fnmatch.filter supports any kind of iterable not just lists In-Reply-To: <1556719965.28.0.191162970906.issue36769@roundup.psfhosted.org> Message-ID: <1556719988.99.0.737295458787.issue36769@roundup.psfhosted.org> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +12958 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:26:57 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 01 May 2019 14:26:57 +0000 Subject: [issue26493] Bad formatting in WinError 193 when using subprocess.check_call In-Reply-To: <1457283389.71.0.286389844503.issue26493@psf.upfronthosting.co.za> Message-ID: <1556720817.28.0.916027798376.issue26493@roundup.psfhosted.org> Steve Dower added the comment: > I suggested creating a new issue to fix the calls that omit this flag. Right, that's a separate issue that is easily fixed (and backported, IMHO). Though I suspect that we've not used the flags in those ones because we think we *can* properly format the message, so fixing the use of inserts is a better option than simply going back to the unformatted message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:32:36 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 01 May 2019 14:32:36 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556721156.46.0.50215153648.issue34616@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:34:53 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 May 2019 14:34:53 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556721293.05.0.0521478124725.issue34616@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:35:34 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 01 May 2019 14:35:34 +0000 Subject: [issue36767] Segmentation fault when running c extension on macOS In-Reply-To: <1556718597.1.0.626589085866.issue36767@roundup.psfhosted.org> Message-ID: <1556721334.57.0.182576303923.issue36767@roundup.psfhosted.org> Ronald Oussoren added the comment: The program you include in your report will crash because the interpreter is never initialised. See the embedding documentation for more information: https://docs.python.org/3/extending/embedding.html ---------- resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:36:08 2019 From: report at bugs.python.org (Owen Chia) Date: Wed, 01 May 2019 14:36:08 +0000 Subject: [issue36770] stdlib - shutil.make_archive - add support for different ZIP compression method Message-ID: <1556721368.48.0.786007999998.issue36770@roundup.psfhosted.org> New submission from Owen Chia : if you just want to use different zip compression method, no need to rewrite entire _make_zipfile function. e.g. >>> shutil.make_archive('archive', 'zip_lzma', '/path/to/whatever') ---------- components: Library (Lib) files: shutil.make_archive.patch keywords: patch messages: 341201 nosy: giampaolo.rodola, owenchia, tarek priority: normal severity: normal status: open title: stdlib - shutil.make_archive - add support for different ZIP compression method type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file48293/shutil.make_archive.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:40:40 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 01 May 2019 14:40:40 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1556721640.17.0.570825267254.issue29512@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +12959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:50:54 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 01 May 2019 14:50:54 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556722254.23.0.897954744103.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: Slides and demo (videos) during PyCon2019 Language Summit: https://github.com/Carreau/talks/tree/master/2019-05-01-Language-Summit One question was how to handle non-asyncio in Core Python, REPL. My response was to not take care of that in the first time, but provide the building blocks for alternative REPL, in a second time provide an async-input, and a way to register runner for alternative async libraries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:56:53 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 01 May 2019 14:56:53 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556722613.38.0.682575609683.issue34616@roundup.psfhosted.org> Nathaniel Smith added the comment: > My response was to not take care of that in the first time, but provide the building blocks for alternative REPL, in a second time provide an async-input, and a way to register runner for alternative async libraries. Yeah, I think this is pretty simple: the runtime/stdlib should provide the primitives to compile top-level async code, get coroutines, etc., and then a REPL like ipython can take care of handing that off to asyncio or whatever library they want. Maybe in the long run the builtin REPL should get async support "out of the box", but that's much less clear, and anyway we should split that off into a separate issue if we want to discuss it. async-input isn't even useful for ipython, is it? you use prompt-toolkit :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 10:57:15 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 01 May 2019 14:57:15 +0000 Subject: [issue36329] use the right python "make -C Doc/ serve" In-Reply-To: <1556658299.65.0.382673742846.issue36329@roundup.psfhosted.org> Message-ID: <20190501145700.jhlxqlltmt3wt3kk@xps> St?phane Wirtel added the comment: >Personally, I'd prefer removing the 'serve' target completely. make -C >Doc htmlview should already cover most of its use cases. There is no >deprecation period needed and there is already a replacement (and IMO >better) for it. Hi Berker, When I have read your message, I was surprised because this target already exists since 2010. It's true we can run the makefile with my current workflow is make -C Doc/ venv && make -C Doc/ html serve and open my browser at http://localhost:8000 but with your suggestion, I think it's better for us and also for the contributors, just make -C Doc/ venv htmlview. This target will open the browser with the result of the html build. So, I have discussed with @Julien Palard and he told me that he did not use the 'serve' target and he discovered the target via my issue. But there will be an other issue, in the devguide, there is also a 'serve' target in the Makefile with a copy of tools/serve.py. But there is no htmlview target. For the moment, we have a common solution for the two project if we want to show the result to the user, make serve. We could: * remove 'make serve' from CPython and Devguide * remove tools/serve.py from CPython and Devguide * add htmlview to the DevGuide * update the documentation +1 for removing the serve.py script and use htmlview. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 11:00:16 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 01 May 2019 15:00:16 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556722816.91.0.804415001437.issue13611@roundup.psfhosted.org> Stefan Behnel added the comment: > I personally think it's ready to go into the last alpha release Since I didn't get any negative comments or requests for deferral, I'll merge this today to get the feature into the last (still unreleased) alpha. We still have the beta phase to resolve issues with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 11:00:32 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 01 May 2019 15:00:32 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1556722832.95.0.817796528423.issue36742@roundup.psfhosted.org> Steve Dower added the comment: New changeset 98a4dcefbbc3bce5ab07e7c0830a183157250259 by Steve Dower in branch '2.7': bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017) https://github.com/python/cpython/commit/98a4dcefbbc3bce5ab07e7c0830a183157250259 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 11:04:12 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 01 May 2019 15:04:12 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1556723052.0.0.45209957675.issue36742@roundup.psfhosted.org> Steve Dower added the comment: I'll leave the 3.6 backport in Ned's hands and close this issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 11:10:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 01 May 2019 15:10:49 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1556723449.9.0.451881417287.issue36742@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > I'll leave the 3.6 backport in Ned's hands and close this issue. 3.5 was added as an affected version and seems the original fix was merged to 3.5 too. 3.4 is EoL so is it worthy of backporting to 3.5? I guess the backport would not have merge conflicts and is straightforward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 11:13:25 2019 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 01 May 2019 15:13:25 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556723605.0.0.612090843134.issue34616@roundup.psfhosted.org> Yury Selivanov added the comment: > Yeah, I think this is pretty simple: the runtime/stdlib should provide the primitives to compile top-level async code, get coroutines, etc., and then a REPL like ipython can take care of handing that off to asyncio or whatever library they want. Exactly. FWIW I'm +1 to have this in 3.8. Do you have a patch for this? If not I can take a look at this myself tomorrow or the day after. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 11:20:07 2019 From: report at bugs.python.org (CJ Kucera) Date: Wed, 01 May 2019 15:20:07 +0000 Subject: [issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames Message-ID: <1556724007.57.0.489851634937.issue36771@roundup.psfhosted.org> New submission from CJ Kucera : It'd be nice to have an option to os.walk which would return DirEntry objects in its return tuple, as opposed to just the string filenames/dirnames. (Or failing that, an alternate function which does so.) The function already uses os.scandir() internally, so the DirEntry objects already exist -- I assume it'd be a pretty easy change. At the moment, if I want to be efficient and use os.scandir() myself, I've got to basically reimplement os.walk(), which seems silly since os.walk is already calling scandir itself. ---------- components: Library (Lib) messages: 341210 nosy: apocalyptech priority: normal severity: normal status: open title: Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 11:23:08 2019 From: report at bugs.python.org (Berker Peksag) Date: Wed, 01 May 2019 15:23:08 +0000 Subject: [issue36329] use the right python "make -C Doc/ serve" In-Reply-To: <20190501145700.jhlxqlltmt3wt3kk@xps> Message-ID: Berker Peksag added the comment: Yeah, we can add htmlview to devguide. I?ve even added it to Django after I discovered it in CPython :) -- --Berker ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 11:52:03 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 01 May 2019 15:52:03 +0000 Subject: [issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames In-Reply-To: <1556724007.57.0.489851634937.issue36771@roundup.psfhosted.org> Message-ID: <1556725923.18.0.69705993271.issue36771@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +12960 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 11:59:45 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 01 May 2019 15:59:45 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1556726385.36.0.145885972464.issue36742@roundup.psfhosted.org> Steve Dower added the comment: Yes, you're right. I'll do that port as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 12:03:35 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 01 May 2019 16:03:35 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1556726615.31.0.00117065864051.issue36742@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +12961 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 12:11:46 2019 From: report at bugs.python.org (CJ Kucera) Date: Wed, 01 May 2019 16:11:46 +0000 Subject: [issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames In-Reply-To: <1556724007.57.0.489851634937.issue36771@roundup.psfhosted.org> Message-ID: <1556727106.35.0.264439486963.issue36771@roundup.psfhosted.org> CJ Kucera added the comment: I've started up a Github PR for this, btw, though IMO it's not really in a mergeable state yet: 1) I wasn't sure what to do about os.fwalk(), since that *doesn't* already generate DirEntry objects, and this change would introduce a small inconsistency between the two, functionalitywise. 2) Also wasn't sure what to do about unit tests, though I'll ponder that some more once I've got some time later. 3) The actual implementation is pretty trivial, but could perhaps be handled differently. The systems's still processing my CLA signature, as well, so there's that too. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 12:16:12 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 01 May 2019 16:16:12 +0000 Subject: [issue34442] zlib module not built on windows In-Reply-To: <1534776014.27.0.56676864532.issue34442@psf.upfronthosting.co.za> Message-ID: <1556727372.52.0.892336005075.issue34442@roundup.psfhosted.org> Zachary Ware added the comment: With no further explanation of what went wrong, I'm closing the issue. ---------- resolution: -> works for me stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 13:24:56 2019 From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Cabessa?=) Date: Wed, 01 May 2019 17:24:56 +0000 Subject: [issue36757] uuid constructor accept invalid strings (extra dash) In-Reply-To: <1556615988.91.0.308330120393.issue36757@roundup.psfhosted.org> Message-ID: <1556731496.72.0.00434072774902.issue36757@roundup.psfhosted.org> C?dric Cabessa added the comment: > Is there are reason your validator doesn't use uuid.UUID to normalize the value? That is, whatever the customer provides, why not use the result of stringifying the resulting UUID Yes, this is exactly what we do now However this behaviour is a bit surprising, we were thinking that uuid.UUID could be used as a validator I understand the risk of breaking existing code with a fix that enforce a strict form. Maybe a line should be added in the documentation to prevent people using this as a validator without more check? But ok, you can close the bug if you prefer ... I think there no perfect solution :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 13:32:22 2019 From: report at bugs.python.org (Berker Peksag) Date: Wed, 01 May 2019 17:32:22 +0000 Subject: [issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1556731942.57.0.130656434674.issue27682@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 3d37ea25dc97e4cb024045581979570835deb13c by Berker Peksag (Petter Strandmark) in branch 'master': bpo-27682: Handle client connection terminations in wsgiref (GH-9713) https://github.com/python/cpython/commit/3d37ea25dc97e4cb024045581979570835deb13c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 13:32:49 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 01 May 2019 17:32:49 +0000 Subject: [issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1556731969.81.0.235459507471.issue27682@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +12963 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 13:37:37 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 01 May 2019 17:37:37 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556732257.07.0.311333532148.issue13611@roundup.psfhosted.org> Zackery Spytz added the comment: The PR has reference leaks. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 13:52:46 2019 From: report at bugs.python.org (Berker Peksag) Date: Wed, 01 May 2019 17:52:46 +0000 Subject: [issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1556733166.41.0.238104480568.issue27682@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 47ffc1a9f6fab1c17cdcc325d4af066317369ed7 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-27682: Handle client connection terminations in wsgiref (GH-9713) https://github.com/python/cpython/commit/47ffc1a9f6fab1c17cdcc325d4af066317369ed7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 14:01:08 2019 From: report at bugs.python.org (Berker Peksag) Date: Wed, 01 May 2019 18:01:08 +0000 Subject: [issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1556733668.0.0.282525879264.issue27682@roundup.psfhosted.org> Berker Peksag added the comment: Thank you! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 14:15:01 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 01 May 2019 18:15:01 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556734501.01.0.114432017114.issue13611@roundup.psfhosted.org> Stefan Behnel added the comment: Thanks for testing, Zackery. I resolved the reference leaks. They were already in the PR for issue 36676. Both PRs updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 14:17:31 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 01 May 2019 18:17:31 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556734651.22.0.697246172392.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: > async-input isn't even useful for ipython, is it? you use prompt-toolkit :-) You don't have to use prompt_toolkit (https://github.com/ipython/rlipython), but yes we don't need this. > Do you have a patch for this? If not I can take a look at this myself tomorrow or the day after. No, I do not have a patch. I can provide a few test case and I am happy to spend some task to sit-down and discuss what we exactly do so far in IPython. I'm flying back Sunday morning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 14:23:57 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 01 May 2019 18:23:57 +0000 Subject: [issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames In-Reply-To: <1556727106.35.0.264439486963.issue36771@roundup.psfhosted.org> Message-ID: <20190501182343.2au6qzznvjrdvl2f@xps> St?phane Wirtel added the comment: Hi, I think you have to create a new function and not to modify the current os.walk(), just because you change the type of the returned value. We have to avoid the inconsistency for the caller of os.walk(). is it a list of DirEntry or another list? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 14:27:03 2019 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 01 May 2019 18:27:03 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556735223.07.0.303638551992.issue34616@roundup.psfhosted.org> Yury Selivanov added the comment: > No, I do not have a patch. I can provide a few test case That would be helpful! > and I am happy to spend some task to sit-down and discuss what we exactly do so far in IPython. I'm flying back Sunday morning. Yes, let's do that around Friday/Saturday (feel free to ping me via a Twitter DM). I'm also leaving on Sunday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 14:28:25 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 01 May 2019 18:28:25 +0000 Subject: [issue26493] Bad formatting in WinError 193 when using subprocess.check_call In-Reply-To: <1457283389.71.0.286389844503.issue26493@psf.upfronthosting.co.za> Message-ID: <1556735305.17.0.66499157398.issue26493@roundup.psfhosted.org> Eryk Sun added the comment: > I suspect that we've not used the flags in those ones because we > think we *can* properly format the message, so fixing the use of > inserts is a better option than simply going back to the > unformatted message. We're advised that it's "unsafe to take an arbitrary system error code returned from an API and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS". We don't control the content of system error messages. If we get the number and type of arguments wrong for the message inserts, then FormatMessageW may fail with an invalid parameter error, as it does in the examples I showed, or return nonsense, or even crash the process due to an unhandled access violation. Also, nothing was implemented in _overlapped.FormatMessage or _ctypes.FormatError to special case an `Arguments` array for particular error codes, or even to expose this capability to Python code. I think omitting the flag was just a mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 14:34:49 2019 From: report at bugs.python.org (CJ Kucera) Date: Wed, 01 May 2019 18:34:49 +0000 Subject: [issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames In-Reply-To: <1556724007.57.0.489851634937.issue36771@roundup.psfhosted.org> Message-ID: <1556735689.32.0.421962356828.issue36771@roundup.psfhosted.org> CJ Kucera added the comment: Yeah, I'd wondered that too (re: a separate function) but it seemed like an awful lot of duplicated code. The PR I'd put through just changes the datatypes within the `filenames` and `dirnames` lists... I'd been thinking that'd be sufficient since you wouldn't get that without specifying the optional boolean, but perhaps not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 14:39:57 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 01 May 2019 18:39:57 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556711761.15.0.137727865615.issue36764@roundup.psfhosted.org> Message-ID: Batuhan added the comment: We can try to obtain the type of ABCData and if we can't (if py_abc is used) we can set ABCData to NotImplemented. On Wed, May 1, 2019, 2:56 PM Batuhan wrote: > > Batuhan added the comment: > > It is based on default behavior of cpython. It tries to import _abc first > instead of _py_abc and this type targets c implementation. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 15:21:00 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 01 May 2019 19:21:00 +0000 Subject: [issue36673] Comment/PI parsing support for ElementTree In-Reply-To: <1555745602.83.0.523900497502.issue36673@roundup.psfhosted.org> Message-ID: <1556738460.41.0.133405237117.issue36673@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 43851a202cabce1e6be699e7177735c778b6697e by Stefan Behnel in branch 'master': bpo-36673: Implement comment/PI parsing support for the TreeBuilder in ElementTree. (#12883) https://github.com/python/cpython/commit/43851a202cabce1e6be699e7177735c778b6697e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 15:23:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 May 2019 19:23:42 +0000 Subject: [issue36762] Teach "import *" to warn when overwriting globals or builtins In-Reply-To: <1556663502.82.0.194449689186.issue36762@roundup.psfhosted.org> Message-ID: <1556738622.25.0.3622531037.issue36762@roundup.psfhosted.org> Serhiy Storchaka added the comment: What if existing globals are overwritten intentionally? For example, the stat module defines some constant and then use the star import from _stat. Other example is the datetime module. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 15:31:14 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 01 May 2019 19:31:14 +0000 Subject: [issue36673] Comment/PI parsing support for ElementTree In-Reply-To: <1555745602.83.0.523900497502.issue36673@roundup.psfhosted.org> Message-ID: <1556739074.98.0.944817723425.issue36673@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 15:48:10 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 01 May 2019 19:48:10 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556740090.28.0.265236918834.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: Extra notes from in-person discussion; We might want a both a Sync-REPL and Async-REPL `compile()` mode depending on wether the REPL support async. One of the other question was wether `exec` should look at wether an eventloop is running, or if it should just return a coroutine and it's the -programmer job to check wether there is an event loop or not and do the right thing. Also for info all the top level async-await PR and issues on IPython can be found here: https://github.com/ipython/ipython/issues?q=label%3Aasync%2Fawait+is%3Aclosed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 15:50:00 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 01 May 2019 19:50:00 +0000 Subject: [issue36676] Make ET.XMLParser target aware of namespace prefixes In-Reply-To: <1555758404.88.0.535141671486.issue36676@roundup.psfhosted.org> Message-ID: <1556740200.87.0.911339779183.issue36676@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset dde3eebdaa8d2c51971ca704d53af7cbcda8bb34 by Stefan Behnel in branch 'master': bpo-36676: Namespace prefix aware parsing support for the ET.XMLParser target (GH-12885) https://github.com/python/cpython/commit/dde3eebdaa8d2c51971ca704d53af7cbcda8bb34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 16:10:45 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 01 May 2019 20:10:45 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1556741445.54.0.450447958487.issue30458@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +12964 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 16:22:16 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 01 May 2019 20:22:16 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556742136.8.0.565687879448.issue34616@roundup.psfhosted.org> Andrew Svetlov added the comment: I recall the idea of passing a specific flag to `compile()` for accepting await and family on top level of passed code string. Than compile can return a code object with CO_COROUTINE flag set. Returned code object can be analyzed for this flag and executed with `await exec(code)`. Actual coroutine executor can be asyncio/trio/twisted/whatever, it depends on what code calls this `await`. Did I miss something? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 16:34:20 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 01 May 2019 20:34:20 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556742860.68.0.243893573448.issue13611@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset e1d5dd645d5f59867cb0ad63179110f310cbca89 by Stefan Behnel in branch 'master': bpo-13611: C14N 2.0 implementation for ElementTree (GH-12966) https://github.com/python/cpython/commit/e1d5dd645d5f59867cb0ad63179110f310cbca89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 16:36:15 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 01 May 2019 20:36:15 +0000 Subject: [issue36676] Make ET.XMLParser target aware of namespace prefixes In-Reply-To: <1555758404.88.0.535141671486.issue36676@roundup.psfhosted.org> Message-ID: <1556742975.0.0.869280784578.issue36676@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 16:37:18 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 01 May 2019 20:37:18 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556743038.2.0.947804925959.issue13611@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 16:38:32 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 01 May 2019 20:38:32 +0000 Subject: [issue36673] Comment/PI parsing support for ElementTree In-Reply-To: <1555745602.83.0.523900497502.issue36673@roundup.psfhosted.org> Message-ID: <1556743112.03.0.481758471472.issue36673@roundup.psfhosted.org> Change by Stefan Behnel : ---------- pull_requests: -12811 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 16:39:26 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 01 May 2019 20:39:26 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1556743166.96.0.480043372514.issue30458@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset b7378d77289c911ca6a0c0afaf513879002df7d5 by Gregory P. Smith in branch 'master': bpo-30458: Use InvalidURL instead of ValueError. (GH-13044) https://github.com/python/cpython/commit/b7378d77289c911ca6a0c0afaf513879002df7d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 18:40:51 2019 From: report at bugs.python.org (david awad) Date: Wed, 01 May 2019 22:40:51 +0000 Subject: [issue34088] [EASY] sndhdr.what() throws exceptions on unknown files In-Reply-To: <1531255806.14.0.56676864532.issue34088@psf.upfronthosting.co.za> Message-ID: <1556750451.6.0.871448594459.issue34088@roundup.psfhosted.org> david awad added the comment: It's been a while since then but I really think we can get this fix merged in the next two weeks or so. Can someone give this another look? I had a quick question for Serhiy Here: https://github.com/python/cpython/pull/8319#discussion_r273539593 If we could get that resolved I think this can finally be done and I can try to help out on a different PR and do a better job in the future. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 20:06:37 2019 From: report at bugs.python.org (Windson Yang) Date: Thu, 02 May 2019 00:06:37 +0000 Subject: [issue36759] datetime: astimezone() results in OSError: [Errno 22] Invalid argument In-Reply-To: <1556624186.01.0.847614978011.issue36759@roundup.psfhosted.org> Message-ID: <1556755597.85.0.357468683194.issue36759@roundup.psfhosted.org> Windson Yang added the comment: Thanks, SilentGhost, you are right. I will leave this to a Windows expert instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 20:28:22 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 May 2019 00:28:22 +0000 Subject: [issue35864] Replace OrderedDict with regular dict in namedtuple's _asdict() method. In-Reply-To: <1548901211.98.0.0872539907535.issue35864@roundup.psfhosted.org> Message-ID: <1556756902.44.0.575251449229.issue35864@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +12965 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 20:29:46 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 May 2019 00:29:46 +0000 Subject: [issue36018] Add a Normal Distribution class to the statistics module In-Reply-To: <1550448059.37.0.914986932061.issue36018@roundup.psfhosted.org> Message-ID: <1556756986.33.0.670636680019.issue36018@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +12966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 20:33:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 May 2019 00:33:37 +0000 Subject: [issue36762] Teach "import *" to warn when overwriting globals or builtins In-Reply-To: <1556663502.82.0.194449689186.issue36762@roundup.psfhosted.org> Message-ID: <1556757217.51.0.0560227439058.issue36762@roundup.psfhosted.org> Raymond Hettinger added the comment: > What if existing globals are overwritten intentionally? That's why it would be a warning instead of an error. Also, with warnings we can suppress specific instances (by module or by message). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 20:36:23 2019 From: report at bugs.python.org (Windson Yang) Date: Thu, 02 May 2019 00:36:23 +0000 Subject: [issue36757] uuid constructor accept invalid strings (extra dash) In-Reply-To: <1556615988.91.0.308330120393.issue36757@roundup.psfhosted.org> Message-ID: <1556757383.75.0.969867752642.issue36757@roundup.psfhosted.org> Windson Yang added the comment: > Maybe a line should be added in the documentation to prevent people using this as a validator without more check? I don't expect uuid.UUID could be used as a validator myself, but I agreed we can warn users in the documentation if lots of them confuse about it. ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 20:40:09 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 May 2019 00:40:09 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments Message-ID: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> New submission from Raymond Hettinger : Follow the lead of the dataclasses module and allow lru_cache() to be used as a straight decorator rather than as a function that returns a decorator. Both of these would now be supported: @lru_cache def f(x): ... @lru_cache(maxsize=256) def f(x): ... ---------- components: Library (Lib) messages: 341239 nosy: eric.smith, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Let lru_cache be used as a decorator with no arguments type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 20:44:05 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 May 2019 00:44:05 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1556757845.58.0.0854787950952.issue36772@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +12967 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 20:49:16 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 May 2019 00:49:16 +0000 Subject: [issue36018] Add a Normal Distribution class to the statistics module In-Reply-To: <1550448059.37.0.914986932061.issue36018@roundup.psfhosted.org> Message-ID: <1556758156.04.0.647180392069.issue36018@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 671d782f8dc52942dc8c48a513bf24ff8465b112 by Raymond Hettinger in branch 'master': bpo-36018: Update example to show mean and stdev (GH-13047) https://github.com/python/cpython/commit/671d782f8dc52942dc8c48a513bf24ff8465b112 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 21:02:48 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 02 May 2019 01:02:48 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556695360.21.0.794709437035.issue36764@roundup.psfhosted.org> Message-ID: <1556758968.39.0.419897508164.issue36764@roundup.psfhosted.org> Inada Naoki added the comment: You didn't explain why people not only you need it. "Could you elaborate?" Unless clear use cases, I'm strong -1 on adding it in typing module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 21:22:34 2019 From: report at bugs.python.org (Windson Yang) Date: Thu, 02 May 2019 01:22:34 +0000 Subject: [issue36761] Extended slice assignment + iterable unpacking In-Reply-To: <1556650082.38.0.163364239874.issue36761@roundup.psfhosted.org> Message-ID: <1556760154.33.0.805853878913.issue36761@roundup.psfhosted.org> Windson Yang added the comment: In your first case, *any positive index except 2 will work*, For example: L = [0, 1, 2] L[::1], *rest = "abcdef" # L became ['a'] or L[::3], *rest = "abcdef" # L became ['a', 1, 2] I found iff when you change the length of L to 1(L[::3]) or didn't change L at all (L[::1], L[::]), this expression will work. But I'm not sure that is what you expected. ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 21:26:32 2019 From: report at bugs.python.org (Windson Yang) Date: Thu, 02 May 2019 01:26:32 +0000 Subject: [issue36762] Teach "import *" to warn when overwriting globals or builtins In-Reply-To: <1556663502.82.0.194449689186.issue36762@roundup.psfhosted.org> Message-ID: <1556760392.42.0.293814500964.issue36762@roundup.psfhosted.org> Windson Yang added the comment: Another question will be are we going to replace the * in our source code in the future? Since I found lots of our code use 'from xxx import *' pattern. ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 22:52:02 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 02 May 2019 02:52:02 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1556765522.95.0.681533310655.issue29512@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +12968 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 22:52:21 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 02 May 2019 02:52:21 +0000 Subject: [issue29512] regrtest refleak: implement bisection feature In-Reply-To: <1486640763.77.0.630012847727.issue29512@psf.upfronthosting.co.za> Message-ID: <1556765541.83.0.474633662619.issue29512@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +12969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 23:22:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 03:22:13 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556767333.33.0.975059741567.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +12970 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 1 23:52:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 03:52:01 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556769121.82.0.77706070742.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cb9fbd35885a8921b9df99e801df4f82e3ba336b by Victor Stinner in branch 'master': bpo-36763: Make _PyCoreConfig.check_hash_pycs_mode public (GH-13052) https://github.com/python/cpython/commit/cb9fbd35885a8921b9df99e801df4f82e3ba336b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:04:48 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:04:48 +0000 Subject: [issue1260171] subprocess: more general (non-buffering) communication Message-ID: <1556769888.94.0.773275953075.issue1260171@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:12:38 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:12:38 +0000 Subject: [issue1191964] add non-blocking read and write methods to subprocess.Popen Message-ID: <1556770358.59.0.230361415925.issue1191964@roundup.psfhosted.org> Josiah Carlson added the comment: Someone else can resurrect this concept and/ore patch if they care about this feature. Best of luck to future readers. ---------- stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:14:01 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:14:01 +0000 Subject: [issue1442493] IDLE shell window gets very slow when displaying long lines Message-ID: <1556770441.57.0.555968612179.issue1442493@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:14:40 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:14:40 +0000 Subject: [issue4277] asynchat's handle_error inconsistency In-Reply-To: <1226060153.34.0.769481825348.issue4277@psf.upfronthosting.co.za> Message-ID: <1556770480.88.0.631218724543.issue4277@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiah.carlson, josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:15:24 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:15:24 +0000 Subject: [issue6911] Document changes in asynchat In-Reply-To: <1252942019.67.0.473669726807.issue6911@psf.upfronthosting.co.za> Message-ID: <1556770524.01.0.906980679752.issue6911@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:15:46 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:15:46 +0000 Subject: [issue13372] handle_close called twice in poll2 In-Reply-To: <1320773533.14.0.440579615875.issue13372@psf.upfronthosting.co.za> Message-ID: <1556770546.25.0.7869774502.issue13372@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:16:32 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:16:32 +0000 Subject: [issue35913] asyncore: allow handling of half closed connections In-Reply-To: <1549468264.52.0.429414559636.issue35913@roundup.psfhosted.org> Message-ID: <1556770592.02.0.709949198334.issue35913@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:17:48 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:17:48 +0000 Subject: [issue1043134] Add preferred extensions for MIME types Message-ID: <1556770668.74.0.378853340984.issue1043134@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:18:21 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:18:21 +0000 Subject: [issue13451] sched.py: speedup cancel() method In-Reply-To: <1321923822.73.0.49972384361.issue13451@psf.upfronthosting.co.za> Message-ID: <1556770701.36.0.362437682178.issue13451@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiah.carlson, josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:30:18 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:30:18 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1556771418.34.0.372944905978.issue3783@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:31:14 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:31:14 +0000 Subject: [issue1453973] addheaders for urlopen / open / xxxx_open Message-ID: <1556771474.53.0.357259915419.issue1453973@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:31:53 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:31:53 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module Message-ID: <1556771513.57.0.0710683782367.issue1572968@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:32:26 2019 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 May 2019 04:32:26 +0000 Subject: [issue1509060] Interrupt/kill threads w/exception Message-ID: <1556771546.88.0.322354749005.issue1509060@roundup.psfhosted.org> Change by Josiah Carlson : ---------- nosy: -josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:36:15 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 May 2019 04:36:15 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1556771775.06.0.163331455834.issue36772@roundup.psfhosted.org> Serhiy Storchaka added the comment: I do not like mixing decorators and decorator fabrics. But this can of worms has already been open by dataclasses. The question is whether we want to extend this design to the rest of the stdlib. lru_cache() resisted this change for a long time. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 00:56:17 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 May 2019 04:56:17 +0000 Subject: [issue36762] Teach "import *" to warn when overwriting globals or builtins In-Reply-To: <1556663502.82.0.194449689186.issue36762@roundup.psfhosted.org> Message-ID: <1556772977.5.0.175905698441.issue36762@roundup.psfhosted.org> Serhiy Storchaka added the comment: This will force legal third-party code to add special code to suppress warnings. This is breaking change. Other problem is with shadowing builtins. This increases chance of breakage when introduce new builtins. Currently adding a new builtin does not affect existing code which does not use this builting, but all will be changed if implement this feature. Since shadowing a builtin and overwriting an existing global is not always an error, I think this warning should not be the part of the interpreter, but rather a part of third-party linters (which can be configured to ignore some warnings for particular projects). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 01:38:17 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 May 2019 05:38:17 +0000 Subject: [issue36764] Types module doesn't have a type for _abc_data In-Reply-To: <1556695360.21.0.794709437035.issue36764@roundup.psfhosted.org> Message-ID: <1556775497.88.0.216070415635.issue36764@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Inada. This is a deep implementation detail. Instances of this type are not even exposed to users. And the types module should not contain all types used in CPython. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 01:45:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 May 2019 05:45:37 +0000 Subject: [issue36766] Typos in docs and code comments In-Reply-To: <1556716347.32.0.805084032343.issue36766@roundup.psfhosted.org> Message-ID: <1556775937.85.0.109343608324.issue36766@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 01:55:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 May 2019 05:55:36 +0000 Subject: [issue36765] Invalid grammar for f_expression In-Reply-To: <1556707622.28.0.558014565805.issue36765@roundup.psfhosted.org> Message-ID: <1556776536.34.0.833557060549.issue36765@roundup.psfhosted.org> Serhiy Storchaka added the comment: Concur with Eric. The formal definition of the Python grammar is wider than valid Python, because we do not want to make it too complex. Invalid constructions are filtered out later. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 02:09:55 2019 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Thu, 02 May 2019 06:09:55 +0000 Subject: [issue36699] building for riscv multilib (patch attached) In-Reply-To: <1555957491.02.0.328369650892.issue36699@roundup.psfhosted.org> Message-ID: <1556777395.3.0.75638345541.issue36699@roundup.psfhosted.org> Micha? G?rny added the comment: This is not really an upstream issue, it is due to Gentoo-specific patching. ---------- nosy: +mgorny _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 02:26:50 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 02 May 2019 06:26:50 +0000 Subject: [issue36694] Excessive memory use or memory fragmentation when unpickling many small objects In-Reply-To: <1555866680.03.0.817045016777.issue36694@roundup.psfhosted.org> Message-ID: <1556778410.3.0.523618311616.issue36694@roundup.psfhosted.org> Inada Naoki added the comment: I'm using 1/10 version of dump.py I removed total_size() because it creates some garbages. sys._debugmallocstats() after load.py: master: # arenas allocated total = 1,223 # arenas reclaimed = 5 # arenas highwater mark = 1,218 # arenas allocated current = 1,218 1218 arenas * 262144 bytes/arena = 319,291,392 # bytes in allocated blocks = 218,026,128 # bytes in available blocks = 149,024 23835 unused pools * 4096 bytes = 97,628,160 PR 13036: # arenas allocated total = 849 # arenas reclaimed = 3 # arenas highwater mark = 846 # arenas allocated current = 846 846 arenas * 262144 bytes/arena = 221,773,824 # bytes in allocated blocks = 217,897,968 # bytes in available blocks = 140,096 61 unused pools * 4096 bytes = 249,856 Now "arena allocated current" is same to after dump.py: # arenas allocated total = 847 # arenas reclaimed = 1 # arenas highwater mark = 846 # arenas allocated current = 846 846 arenas * 262144 bytes/arena = 221,773,824 # bytes in allocated blocks = 217,998,792 # bytes in available blocks = 131,112 38 unused pools * 4096 bytes = 155,648 It looks nice. Additionally, both of "time python dump.py" and "time python load.py" become slightly faster. master dump: dump (Note that this time includes not only dump, but also constructing data) real 0m3.539s user 0m3.266s sys 0m0.196s master load: real 0m1.408s user 0m1.292s sys 0m0.116s PR-13036 dump: real 0m2.758s user 0m2.598s sys 0m0.088s PR-13036 load: real 0m1.239s user 0m1.183s sys 0m0.056s Would pickle experts review the PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 02:27:04 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 02 May 2019 06:27:04 +0000 Subject: [issue36694] Excessive memory use or memory fragmentation when unpickling many small objects In-Reply-To: <1555866680.03.0.817045016777.issue36694@roundup.psfhosted.org> Message-ID: <1556778424.46.0.987111079777.issue36694@roundup.psfhosted.org> Change by Inada Naoki : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 02:30:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 May 2019 06:30:36 +0000 Subject: [issue36756] tkinter tk.createcommand memory leak In-Reply-To: <1556615385.08.0.753953745903.issue36756@roundup.psfhosted.org> Message-ID: <1556778636.69.0.594975781252.issue36756@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are two problems: one in your code and one in tkinter or Tcl. The problem with your code is that it creates new Tcl interpreters in loop. Create a single Tcl interpreters and create commands in a loop. This will reduce the leak to constant amount. The problem with either the tkinter module or the Tcl interpreter is that the reference to created commands should be released when delete the command explicitly (Tcl_DeleteCommand), or create a new command with the same name (Tcl_CreateCommand), or delete the Tcl interpreter (Tcl_DeleteInterp), but for unknown cause this doesn't happen in the last case. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 03:51:20 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 02 May 2019 07:51:20 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556783480.9.0.39497512552.issue13611@roundup.psfhosted.org> Change by Stefan Behnel : ---------- pull_requests: +12971 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 04:01:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 May 2019 08:01:27 +0000 Subject: [issue25707] Add the close method for ElementTree.iterparse() object In-Reply-To: <1448287045.22.0.0931965485798.issue25707@psf.upfronthosting.co.za> Message-ID: <1556784087.84.0.218369710863.issue25707@roundup.psfhosted.org> Serhiy Storchaka added the comment: Implicit closing an exhausted iterator helps only the iterator is iterated to the end. If the iteration has been stopped before the end, we get a leak of the file descriptor. Closing the file descriptor in the finalizer can be deferred to undefined term, especially in implementations without reference counting. Since file descriptors are limited resource, this can cause troubles in real programs. Reasons for close() in iterparse objects are the same as for close in files and generators. Maybe we will need to implement the full generator protocol (send() and throw()) in the iterparse objects, but currently I do not know use cases for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 04:08:36 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 May 2019 08:08:36 +0000 Subject: [issue36765] Invalid grammar for f_expression In-Reply-To: <1556707622.28.0.558014565805.issue36765@roundup.psfhosted.org> Message-ID: <1556784516.83.0.507495161405.issue36765@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks, Serhiy. I suppose that we could add a note to the documentation, but I'm not sure it would be worth the confusion it would create. It's best to think of this is "it's just an expression, like everywhere else in Python". If I ever decide I like PEP 536, maybe then things will become clearer (although possibly not: the same issue will still exist, but I think it will become more obvious that expressions are treated just like they are elsewhere). So I'm going to close this. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 04:18:16 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 May 2019 08:18:16 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1556785096.79.0.223245511019.issue36772@roundup.psfhosted.org> Eric V. Smith added the comment: The 90% use case with dataclasses is satisfied with just "@dataclass", and perhaps the target user there is less sophisticated. But the main difference between @dataclass and @lru_cache is that all of the parameters to @dataclass are keyword-only. Which I did because they are mostly all booleans, and "@dataclass(True, False, True)" isn't very helpful. That's not the case with @lru_cache. Whether that makes a difference for this issue in particular, I'm not sure. I agree that this violates "only one way to do it". But I haven't seen anyone use "@dataclass()", and I've also never seen anyone be confused by the fact that once you want parameters, you change to using parens. For the dataclass case, I think that working both ways has been helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 04:22:05 2019 From: report at bugs.python.org (JUN-WEI SONG) Date: Thu, 02 May 2019 08:22:05 +0000 Subject: [issue36260] Cpython/Lib vulnerability found and request a patch submission In-Reply-To: <1552288618.75.0.236192047967.issue36260@roundup.psfhosted.org> Message-ID: <1556785325.34.0.807979528481.issue36260@roundup.psfhosted.org> JUN-WEI SONG added the comment: Thank you very much for your reply. Based on discussions above, consensuses are improving the zipfile documentation. And we (JUN-WEI SONG & KunYu Chen) would like to work on this. With opinions of Serhiy Storchaka, Christian Heimes and the ideas we have, possible pitfalls are listed below. 1. From file itself: Decompression may fail due to an incorrect password, an incorrect CRC checksum, an incorrect PKZIP format, an unsupported compression method, or an unsupported decryption. 2. File system: Each file system has different limitations such as allowable characters in directory entries, the max length of file name, the max length of path name, the max size of single file, the max number of files, the max number of files in a single directory, etc. Decompression will fail as long as these limitations are exceeded. 3. Operating system: The lack of memory or disk space would lead to decompression failed (see also Zip Bomb). 4. Interrupt: Users should be careful in interrupting the process of decompression, such as control-C or killing the process during decompression, which may result in incomplete decompression of the archive. 5. Different default behaviors: Users should figure out different default extraction behaviors, such as when extracting into the existing tree, it will overwriting an existing file without asking, or when in a case-insensitive file system, it keeps only one file when extracting an archive which contains many files that have the same name but different case. Please let us know if anything?s missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 04:24:59 2019 From: report at bugs.python.org (papad) Date: Thu, 02 May 2019 08:24:59 +0000 Subject: [issue36773] Race condition during pickle.load() Message-ID: <1556785499.96.0.563265579216.issue36773@roundup.psfhosted.org> New submission from papad : There seems to be a race condition when unpickling the same object from different threads (My guess is it's related to imports that are related to the unpickled object). I have used the following files for reproduction (File contents are in the attached archive, also pasted at the bottom of the issue report): import_me.py - Containing the object we will pickle pickle_object.py - the code to pickle the object trigger.py - a piece of code to unpickle the object from different threads simultaneously and trigger the crash I have used the files in the attached archive (containing the 3 files mentioned above) to reproduce run the following commands: pickle_object.py trigger.py Running trigger.py will crash on about 50% of the runs with the following error: Traceback (most recent call last): File "./trigger.py", line 16, in pickle_load_thread pickle.load(h) AttributeError: Can't get attribute 'PickleMe' on I have tested this on the following software stacks: 1. python:3.7.3 docker - linux version: 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 GNU/Linux - python: 3.7.3 - distro: Debian GNU/Linux 9 (stretch) 2. my laptop - linux version: 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux - python: 3.6.7 - distro: Ubuntu 18.04.2 LTS I'm uncertain if this is a bug related to pickle or python module importing. Similar issues I've found: https://bugs.python.org/issue12680 and https://bugs.python.org/issue30891. --------------------------------------------------------------------------------------- filename: import_me.py #! /usr/bin/python3 class PickleMe(object): def __init__(self): self.a = "a" --------------------------------------------------------------------------------------- filename: pickle_object.py #! /usr/bin/python3 import pickle from import_me import PickleMe p = PickleMe() with open('pickled', 'wb') as h: pickle.dump(p, h) --------------------------------------------------------------------------------------- filename: trigger.py #! /usr/bin/python3 import threading import pickle import logging threads = [] def pickle_load_thread(): logging.error("Thread %d loading", threading.get_ident()) try: with open('pickled', 'rb') as h: pickle.load(h) except: logging.exception("Exception in loading") def start_pickle_load_thread(): for x in range(2): load_thread = threading.Thread(target=pickle_load_thread) load_thread.daemon = True threads.append(load_thread) for x in threads: x.start() if __name__ == '__main__': start_pickle_load_thread() for t in threads: t.join() ---------- components: Library (Lib) files: reproduce.tar.gz messages: 341257 nosy: papad priority: normal severity: normal status: open title: Race condition during pickle.load() type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48294/reproduce.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 04:32:19 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 02 May 2019 08:32:19 +0000 Subject: [issue25707] Add the close method for ElementTree.iterparse() object In-Reply-To: <1448287045.22.0.0931965485798.issue25707@psf.upfronthosting.co.za> Message-ID: <1556785939.9.0.406189554748.issue25707@roundup.psfhosted.org> Stefan Behnel added the comment: Ok, I think it's reasonable to make the resource management explicit for the specific case of letting iterparse() open the file. That suggests that there should also be context manager support, given that safe usages would often involve a try-finally. Since it might not always be obvious for users when they need to close the iterator or not, I would also suggest to not let it raise an error on a double-close, i.e. if .close() was already called or the iterator was already exhausted (and the file closed automatically), calling .close() should just do nothing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 04:35:15 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 02 May 2019 08:35:15 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556786115.35.0.717514110481.issue13611@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 0d5864fa07ab4f03188c690a5eb07bdd1fd1cb9c by Stefan Behnel in branch 'master': bpo-13611: Include C14N 2.0 test data in installation (GH-13053) https://github.com/python/cpython/commit/0d5864fa07ab4f03188c690a5eb07bdd1fd1cb9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 04:41:11 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 02 May 2019 08:41:11 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556786471.57.0.953451253727.issue13611@roundup.psfhosted.org> Stefan Behnel added the comment: A buildbot failure made me notice that the test files were not part of the CPython installation yet, so I added them. I also took the opportunity to add a README file that describes where they come from and under which conditions they were originally provided by the W3C (IANAL, but basically free use with copyright notice). https://www.w3.org/Consortium/Legal/2015/doc-license Is there anything else I have to take care of when adding externally provided/licensed files to the source tree? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 07:17:28 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 02 May 2019 11:17:28 +0000 Subject: [issue36773] Race condition during pickle.load() In-Reply-To: <1556785499.96.0.563265579216.issue36773@roundup.psfhosted.org> Message-ID: <1556795848.02.0.645251680416.issue36773@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 07:40:45 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 May 2019 11:40:45 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging Message-ID: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> New submission from Eric V. Smith : I originally propsed this here: https://mail.python.org/pipermail/python-ideas/2018-October/053956.html, and there has also been some discussion on discourse. The proposal is to add a !d "type conversion" to f-strings, to make for simpler "print-based debugging". The idea is that !d would be like !r, etc., except that the resulting string would be: - the text of the expression, followed by - an equal sign, followed by - the value of the expression So this code: s = 'A string' result = f'{s!d}' Would set result to 's="A string"'. Note that the text of the expression is exactly what's between the opening brace and the !. So: result = f'{s !d}' Would set result to 's ="A string"'. Note the space before the equal sign. I can't decide if I'm going to allow a format specifier. If I do, it would apply to the entire resulting string. So: result = f'{s!d:*^20}' Would set result to '****s="A string"****'. But I might reserve format specs for further use, perhaps to apply to the value of the expression instead of the resulting string. Of course this is of most value for more complex expressions. This: v = 3 result = f'{v*9+15!d}' Would set result to 'v*9+15=42'. I'd expect this mostly to be used with print() or logging, but it's a general f-string feature. I have a patch almost ready. ---------- assignee: eric.smith components: Interpreter Core messages: 341261 nosy: eric.smith priority: normal severity: normal stage: needs patch status: open title: f-strings: Add a !d conversion for ease of debugging type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 08:05:43 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 02 May 2019 12:05:43 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <20190502120536.GC5010@ando.pearwood.info> Steven D'Aprano added the comment: On Thu, May 02, 2019 at 11:40:45AM +0000, Eric V. Smith wrote: > > New submission from Eric V. Smith : > > I originally propsed this here: https://mail.python.org/pipermail/python-ideas/2018-October/053956.html, and there has also been some discussion on discourse. > > The proposal is to add a !d "type conversion" to f-strings, to make for simpler "print-based debugging". The idea is that !d would be like !r, etc., except that the resulting string would be: > > - the text of the expression, followed by > - an equal sign, followed by > - the value of the expression I don't want to see this added as a special case to f-strings. I think there are enough use-cases for having access to expressions, complete with source code, as first-class values to make this a general feature of the language and not baked into f-strings. I have a proto-PEP discussing this. > I have a patch almost ready. Please don't limit this useful feature to f-strings. "Debugging strings" only scratches the surface of what this could be useful for. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 08:47:29 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 May 2019 12:47:29 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556801249.3.0.982001966031.issue36774@roundup.psfhosted.org> Eric V. Smith added the comment: I support a general mechanism. But I think that if it's much more than the 2 characters that this would take, then I don't want to use it for f-strings. The whole point here (as with all f-string features) is a concise way to get the string you're after. But if you have some ideas, I'm willing to entertain them. I want this feature to land in 3.8, for which we're rapidly running out of time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 09:03:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 13:03:55 +0000 Subject: [issue1191964] add non-blocking read and write methods to subprocess.Popen Message-ID: <1556802235.34.0.42047873881.issue1191964@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 09:05:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 13:05:13 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556802313.09.0.249957302158.issue13611@roundup.psfhosted.org> STINNER Victor added the comment: > Is there anything else I have to take care of when adding externally provided/licensed files to the source tree? Maybe complete Doc/license.rst? https://docs.python.org/dev/license.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 09:06:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 13:06:15 +0000 Subject: [issue36260] Zip Bomb vulnerability In-Reply-To: <1552288618.75.0.236192047967.issue36260@roundup.psfhosted.org> Message-ID: <1556802375.34.0.883469719864.issue36260@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Cpython/Lib vulnerability found and request a patch submission -> Zip Bomb vulnerability _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 09:09:00 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 02 May 2019 13:09:00 +0000 Subject: [issue36773] Race condition during pickle.load() In-Reply-To: <1556785499.96.0.563265579216.issue36773@roundup.psfhosted.org> Message-ID: <1556802540.15.0.0471313465048.issue36773@roundup.psfhosted.org> Ronald Oussoren added the comment: This could be a duplicate of Issue34572 ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 09:54:10 2019 From: report at bugs.python.org (Andy Dirnberger) Date: Thu, 02 May 2019 13:54:10 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556805250.7.0.405550827773.issue36774@roundup.psfhosted.org> Change by Andy Dirnberger : ---------- nosy: +dirn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 10:01:12 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 02 May 2019 14:01:12 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556805672.68.0.213435079872.issue36774@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 10:14:31 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 02 May 2019 14:14:31 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1556806471.88.0.10511571829.issue36772@roundup.psfhosted.org> Stefan Behnel added the comment: I'm generally ok with such APIs. It seems needless to require @lru_cache() def f(): ... when a simple decorator would suffice. I think I might decide otherwise in cases where almost all usages require arguments, but if the no-arguments case is common (and there is no ambiguity in the arguments), then I prefer not requiring parentheses. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 10:43:07 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 02 May 2019 14:43:07 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556808187.94.0.75745658309.issue13611@roundup.psfhosted.org> Change by Stefan Behnel : ---------- pull_requests: +12972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 10:51:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 14:51:44 +0000 Subject: [issue36775] Rework filesystem codec implementation Message-ID: <1556808704.71.0.363298231326.issue36775@roundup.psfhosted.org> New submission from STINNER Victor : I would like to add callbacks in PyInterpreterState for the filesystem encoding to avoid parsing the encoding name at each encode/decode call (PyUnicode_EncodeFSDefault, PyUnicode_DecodeFSDefault). ---------- components: Interpreter Core messages: 341267 nosy: vstinner priority: normal severity: normal status: open title: Rework filesystem codec implementation versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:02:58 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 02 May 2019 15:02:58 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556809378.46.0.103477350217.issue36774@roundup.psfhosted.org> Gregory P. Smith added the comment: for reference, the discourse thread: https://discuss.python.org/t/f-string-debug-conversion/99/14 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:04:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 May 2019 15:04:04 +0000 Subject: [issue14546] lll.py can't handle multiple parameters correctly In-Reply-To: <1334154576.79.0.440664410533.issue14546@psf.upfronthosting.co.za> Message-ID: <1556809444.55.0.559859078933.issue14546@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset c4e78b116f9a4299f3b3bfbbd18ef49782bb1143 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026) https://github.com/python/cpython/commit/c4e78b116f9a4299f3b3bfbbd18ef49782bb1143 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:07:17 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 02 May 2019 15:07:17 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556809637.83.0.771384876964.issue36774@roundup.psfhosted.org> Gregory P. Smith added the comment: Steven: We shouldn't block this immediately useful feature from going in for f-strings on waiting for some much broader first class access to expressions feature. !d would be practical today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:10:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 15:10:14 +0000 Subject: [issue36775] Rework filesystem codec implementation In-Reply-To: <1556808704.71.0.363298231326.issue36775@roundup.psfhosted.org> Message-ID: <1556809814.89.0.659817352572.issue36775@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +12973 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:11:26 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 02 May 2019 15:11:26 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556809886.09.0.575891238821.issue36774@roundup.psfhosted.org> Gregory P. Smith added the comment: hallway conversation with Eric: neither of us have immediately good thoughts on a spelling other than !d for this. !! or != seem esoteric and/or unparseable, using a capital letter like !D could be new and odd and might be useful to differentiate types of debug output (!d vs !D, etc) so lets not start with caps. thus I'm not suggesting any alternative bikeshed color. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:18:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 15:18:50 +0000 Subject: [issue36776] test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x Message-ID: <1556810330.96.0.118002544008.issue36776@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 Windows7 SP1 3.x: https://buildbot.python.org/all/#/builders/40/builds/2106 ERROR: test_lll_multiple_dirs (test.test_tools.test_lll.lllTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_tools\test_lll.py", line 24, in test_lll_multiple_dirs os.symlink(fn, os.path.join(dir, 'symlink')) OSError: [WinError 1314] A required privilege is not held by the client: 'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmp1wogs146\\foo1' -> 'C:\\Users\\Buildbot\\AppData\\Local\\Temp\\tmp1wogs146\\symlink' The function failed twice. ---------- components: Tests messages: 341272 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:18:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 02 May 2019 15:18:56 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556810336.26.0.54291114141.issue36774@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: !d sounds good and makes teaching easier. Adding additional symbol sort of clutters the experience in f'{name!!}'. I think it will be a good thing to have it in 3.8 since it serves one of the common things in debugging f'name = {name}' and perhaps it could be expanded out of f-strings after feedback. Rust also introduced similar feature with https://doc.rust-lang.org/beta/std/macro.dbg.html and received very positive feedback . This will be a very exciting thing to look forward in 3.8 :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:20:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 15:20:19 +0000 Subject: [issue36776] test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x In-Reply-To: <1556810330.96.0.118002544008.issue36776@roundup.psfhosted.org> Message-ID: <1556810419.0.0.168560284772.issue36776@roundup.psfhosted.org> STINNER Victor added the comment: New test added by bpo-14546. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:20:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 15:20:35 +0000 Subject: [issue14546] lll.py can't handle multiple parameters correctly In-Reply-To: <1334154576.79.0.440664410533.issue14546@psf.upfronthosting.co.za> Message-ID: <1556810435.2.0.891378237466.issue14546@roundup.psfhosted.org> STINNER Victor added the comment: test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x: see bpo-36776. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:22:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 15:22:11 +0000 Subject: [issue14546] lll.py can't handle multiple parameters correctly In-Reply-To: <1334154576.79.0.440664410533.issue14546@psf.upfronthosting.co.za> Message-ID: <1556810531.49.0.990502316021.issue14546@roundup.psfhosted.org> STINNER Victor added the comment: > test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x: see bpo-36776. I guess that the test should be decorated by @support.skip_unless_symlink or something like that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:22:52 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 02 May 2019 15:22:52 +0000 Subject: [issue36776] test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x In-Reply-To: <1556810330.96.0.118002544008.issue36776@roundup.psfhosted.org> Message-ID: <1556810572.14.0.998772453887.issue36776@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +ZackerySpytz, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:29:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 15:29:00 +0000 Subject: [issue36775] Rework filesystem codec implementation In-Reply-To: <1556808704.71.0.363298231326.issue36775@roundup.psfhosted.org> Message-ID: <1556810940.15.0.868976894168.issue36775@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e251095a3f4778102f554cecffcfd837f4d1db6c by Victor Stinner in branch 'master': bpo-36775: Add _Py_FORCE_UTF8_FS_ENCODING macro (GH-13056) https://github.com/python/cpython/commit/e251095a3f4778102f554cecffcfd837f4d1db6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:31:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 15:31:22 +0000 Subject: [issue36775] Rework filesystem codec implementation In-Reply-To: <1556808704.71.0.363298231326.issue36775@roundup.psfhosted.org> Message-ID: <1556811082.68.0.0407444831367.issue36775@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +12974 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:41:27 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 02 May 2019 15:41:27 +0000 Subject: [issue36776] test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x In-Reply-To: <1556810330.96.0.118002544008.issue36776@roundup.psfhosted.org> Message-ID: <1556811687.18.0.613043621858.issue36776@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +12975 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:53:40 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 02 May 2019 15:53:40 +0000 Subject: [issue36776] test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x In-Reply-To: <1556810330.96.0.118002544008.issue36776@roundup.psfhosted.org> Message-ID: <1556812420.64.0.580101956695.issue36776@roundup.psfhosted.org> Zackery Spytz added the comment: I'm sorry. I have submitted a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:53:55 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 May 2019 15:53:55 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1556812435.34.0.982956895484.issue35184@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report and thanks for the PR. I am confused here as I cannot reproduce the failure. Can someone show what is invalid in the Makefile? Also, if the change really does need to be made to Setup.dist (3.7) or Setup (master -> 3.8), then setup.py should likely be changed to reduce future confusion (although it presumably doesn't make a difference to the compile). Further, please submit PRs like this against the master branch (unless the problem only exists in a specific released branches); fixes are normally applied to the master branch and the core developer handling the merge will elect to backport to appropriate branches as needed. ---------- nosy: +ned.deily versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:54:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 15:54:25 +0000 Subject: [issue36775] Rework filesystem codec implementation In-Reply-To: <1556808704.71.0.363298231326.issue36775@roundup.psfhosted.org> Message-ID: <1556812465.12.0.354001408308.issue36775@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 43fc3bb7cf0278735eb0010d7b3043775a120cb5 by Victor Stinner in branch 'master': bpo-36775: Add _PyUnicode_InitEncodings() (GH-13057) https://github.com/python/cpython/commit/43fc3bb7cf0278735eb0010d7b3043775a120cb5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 11:58:53 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 May 2019 15:58:53 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556812733.12.0.833140422637.issue36774@roundup.psfhosted.org> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +12976 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 12:00:38 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 May 2019 16:00:38 +0000 Subject: [issue9194] winreg:fixupMultiSZ should check that P < Q in the inner loop In-Reply-To: <1278558407.29.0.39315930303.issue9194@psf.upfronthosting.co.za> Message-ID: <1556812838.27.0.854375341827.issue9194@roundup.psfhosted.org> Ned Deily added the comment: New changeset dadc34784444950c389c120fb16f44e5a29cc43f by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687) (GH-12910) https://github.com/python/cpython/commit/dadc34784444950c389c120fb16f44e5a29cc43f ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 12:01:10 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 May 2019 16:01:10 +0000 Subject: [issue9194] winreg:fixupMultiSZ should check that P < Q in the inner loop In-Reply-To: <1278558407.29.0.39315930303.issue9194@psf.upfronthosting.co.za> Message-ID: <1556812870.19.0.144702051332.issue9194@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 12:02:39 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 May 2019 16:02:39 +0000 Subject: [issue36742] urlsplit doesn't accept a NFKD hostname with a port number In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1556812959.54.0.592238873187.issue36742@roundup.psfhosted.org> Ned Deily added the comment: New changeset e5f9f4adb95233c66578e6f7ea176687af2f78ca by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-36742: Fixes handling of pre-normalization characters in urlsplit() (GH-13017) (GH-13024) https://github.com/python/cpython/commit/e5f9f4adb95233c66578e6f7ea176687af2f78ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 12:30:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 May 2019 16:30:53 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556814653.33.0.0157819227396.issue36774@roundup.psfhosted.org> Serhiy Storchaka added the comment: To implement converting printf-style string formatting into f-string expressions (see issue28307) I need to add new convertors: 'd': int(x) where x is a number, used for %d, %u, %i 'i': operator.index(i), used for %x, %o, %b 'f': float(x) where x is a number, used for %f, %g, %e They may be private, only exposed in the AST between optimizer and code generator. But they can also be supported by Python grammar and str.format() if there is a use case for this. If 'd' be used for other purposes, I will need to find other character for converting a number to integer (with possible truncation). Any suggestions? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 12:34:56 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 02 May 2019 16:34:56 +0000 Subject: [issue14546] lll.py can't handle multiple parameters correctly In-Reply-To: <1334154576.79.0.440664410533.issue14546@psf.upfronthosting.co.za> Message-ID: <1556814896.97.0.0284960439869.issue14546@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +12977 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 12:43:18 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 May 2019 16:43:18 +0000 Subject: [issue36694] Excessive memory use or memory fragmentation when unpickling many small objects In-Reply-To: <1555866680.03.0.817045016777.issue36694@roundup.psfhosted.org> Message-ID: <1556815398.91.0.153886846177.issue36694@roundup.psfhosted.org> Serhiy Storchaka added the comment: Great work Inada-san! Thank you for your investigations! PR 13036 increases the chance of using borrowed references during pickling. Since this bug exists in the current code too (it just can be exposed in smaller number of cases), it should be fixed in any case. So I going to fix this bug before merging PR 13036, and fix it in a way that does not prevent the optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 12:47:03 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 02 May 2019 16:47:03 +0000 Subject: [issue36777] unittest discover throws TypeError on empty packages Message-ID: <1556815623.31.0.225997144606.issue36777@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : In the given folder structure unittest discover fails. I think this is due to issue32303 where __file__ was set as None and I guess empty packages didn't have __file__ set before which has None value now. Hence the_module.__file__ returns None and thus subsequent calls to os.path.dirname raise TypeError. There is one another location in the same file in unittest module causing this issue. See also issue36406 for similar error in doctest with the change. I reverted bbbcf8693b876daae4469765aa62f8924f39a7d2 just to confirm the issue. I am adding devs in issue32303 and unittest. Any thoughts on this would be helpful. ? cpython git:(master) ? tree test1 test1 ??? test2 ??? test_foo.py 1 directory, 1 file ? cpython git:(master) ? ./python.exe -m unittest discover test1.test2 Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/__main__.py", line 18, in main(module=None) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/main.py", line 100, in __init__ self.parseArgs(argv) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/main.py", line 124, in parseArgs self._do_discovery(argv[2:]) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/main.py", line 244, in _do_discovery self.createTests(from_discovery=True, Loader=Loader) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/main.py", line 154, in createTests self.test = loader.discover(self.start, self.pattern, self.top) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/loader.py", line 306, in discover os.path.dirname((the_module.__file__))) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/posixpath.py", line 152, in dirname p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType # 3.6.4 works that doesn't have the change ? cpython git:(master) ? python3.6 -m unittest discover test1.test2 . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK A unittest would be as below : def test_empty_package_discovery(self): # bpo-36789: Return zero test cases when using discovery in # empty packages. with support.temp_dir() as path: dirname, basename = os.path.split(path) os.mkdir(os.path.join(path, 'test2')) with support.DirsOnSysPath(dirname): loader = unittest.TestLoader() empty_package = f"{basename}.test2" tests_count = loader.discover(empty_package).countTestCases() self.assertEqual(loader.discover(empty_package).countTestCases(), 0) One possible fix would be to check for __file__ == None and return empty list of test cases but this causes a behavior change like below where my patch returns 0 and python 3.6 returns 1 test. # Patch diff --git a/Lib/unittest/loader.py b/Lib/unittest/loader.py index ba7105e1ad..f465b2419f 100644 --- a/Lib/unittest/loader.py +++ b/Lib/unittest/loader.py @@ -302,6 +302,10 @@ class TestLoader(object): the_module = sys.modules[start_dir] top_part = start_dir.split('.')[0] try: + filepath = the_module.__file__ + # __file__ is None for empty packages. Hence return empty list of tests. + if filepath == None: + return self.suiteClass([]) start_dir = os.path.abspath( os.path.dirname((the_module.__file__))) except AttributeError: # Behavior change ? cpython git:(unittest-empty-package) ? ./python.exe -m unittest discover test1.test2 ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK ? cpython git:(unittest-empty-package) ? python3.6 -m unittest discover test1.test2 . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK My patch also causes reference leak and I am not sure why. So I guess mine is not the best approach to solving this. ? cpython git:(unittest-empty-package) ? ./python.exe -m test --fail-env-changed -R 3:3 test_unittest Run tests sequentially 0:00:00 load avg: 1.46 [1/1] test_unittest beginning 6 repetitions 123456 ...... test_unittest leaked [99, 99, 99] references, sum=297 test_unittest leaked [38, 38, 38] memory blocks, sum=114 test_unittest failed in 43 sec 634 ms == Tests result: FAILURE == 1 test failed: test_unittest Total duration: 43 sec 655 ms Tests result: FAILURE ---------- components: Library (Lib) messages: 341285 nosy: barry, brett.cannon, eric.smith, ezio.melotti, michael.foord, rbcollins, xtreak priority: normal severity: normal status: open title: unittest discover throws TypeError on empty packages type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 12:58:20 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 02 May 2019 16:58:20 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1556816300.15.0.353892978786.issue30458@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: IMO it does qualify as a security issue. In case of urllib to be lenient and can be exploited it's good to document like tarfile and xml modules that have a warning about untrusted data potentially causing issues and perhaps link to a url validator that adheres to RFC in pypi. I would expect stdlib to handle this but in case it's not handled due to backwards compatibility and potential regressions a warning could be made about the same in the docs noting down the responsibility of the functions and that they are not always safe against malicious data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 13:02:47 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 May 2019 17:02:47 +0000 Subject: [issue35726] QueueHandler formatting affects other handlers In-Reply-To: <1547301313.72.0.148950825212.issue35726@roundup.psfhosted.org> Message-ID: <1556816567.23.0.862299661675.issue35726@roundup.psfhosted.org> Ned Deily added the comment: New changeset 386b6f07a9703746590a5f29281b93c931c0e6d3 by Ned Deily (Xtreak) in branch '3.7': [3.7] bpo-35726: Prevented QueueHandler formatting from affecting other handlers (GH-11537) (GH-12716) https://github.com/python/cpython/commit/386b6f07a9703746590a5f29281b93c931c0e6d3 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 13:05:45 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 02 May 2019 17:05:45 +0000 Subject: [issue35726] QueueHandler formatting affects other handlers In-Reply-To: <1547301313.72.0.148950825212.issue35726@roundup.psfhosted.org> Message-ID: <1556816745.69.0.133881184719.issue35726@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +12978 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 13:18:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 17:18:12 +0000 Subject: [issue36775] Rework filesystem codec implementation In-Reply-To: <1556808704.71.0.363298231326.issue36775@roundup.psfhosted.org> Message-ID: <1556817492.58.0.477244826131.issue36775@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +12979 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 13:24:05 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 May 2019 17:24:05 +0000 Subject: [issue35726] QueueHandler formatting affects other handlers In-Reply-To: <1547301313.72.0.148950825212.issue35726@roundup.psfhosted.org> Message-ID: <1556817845.41.0.0442154782557.issue35726@roundup.psfhosted.org> Ned Deily added the comment: New changeset 3f8f64ebf3ab05038ed0b5a4adc83d0a5e9fbb82 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-35726: Add test for QueueHandler with multiple handlers (GH-11659) (GH-13061) https://github.com/python/cpython/commit/3f8f64ebf3ab05038ed0b5a4adc83d0a5e9fbb82 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 13:25:02 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 May 2019 17:25:02 +0000 Subject: [issue35726] QueueHandler formatting affects other handlers In-Reply-To: <1547301313.72.0.148950825212.issue35726@roundup.psfhosted.org> Message-ID: <1556817902.21.0.93478843979.issue35726@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 13:26:13 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 02 May 2019 17:26:13 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556817973.45.0.513807277452.issue36774@roundup.psfhosted.org> Gregory P. Smith added the comment: regarding issue28307 - It is not always correct to convert a %d %u %i used to render v into f'{int(v)}'. That'd lose the TypeError when v is not an integer. If you are looking at making internal private conversions for the purposes of that issue, I think they should be things that'll never conflict with a normal public API token that might be used in the future. (ie: don't reserve 'd' 'i' or 'f' for internal only use - use special values) i'm being vague on purpose here as i don't know how f-strings are parsed and tokenized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 13:35:01 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 02 May 2019 17:35:01 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1556818501.17.0.0836799304901.issue30458@roundup.psfhosted.org> Gregory P. Smith added the comment: A note from the urllib3 fixes to this: They chose to go the route of auto-%-encoding the offending characters in URLs instead. I do not think the stdlib should do this. One thing to note though is that they claim URLs with spaces embedded in them are apparently somewhat common in the world, we might want to relax our check to not include space (\x20) in the rejected characters for that reason. A space alone cannot be used for injection. Someone could append an incorrect HTTP protocol version to a request using it " HTTP/1.0" but that would be followed by the actual " HTTP/x.y" generated by our library which at that point is up to the server to parse and or reject as odd. Without the ability to inject \r\n the headers to go with the protocol cannot be modified; so a change in protocol version could at most alter how some headers may be treated. Worst case: they upgrade/downgrade the http version in a non-pedantic server - i believe this to be low impact (feel free to prove me wrong with a working example against a common server). Best case: The server rejects the unparseable request or considers their " HTTP/1.0" to be part of their URL path. In a world where unescaped spaces in URLs are common, some servers _might_ already take the strategy of splitting only on the first and last spaces in the request line anyways, considering everything in the middle to be the url with embedded spaces. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 13:47:42 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 02 May 2019 17:47:42 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1556819262.33.0.165777145464.issue30458@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > One thing to note though is that they claim URLs with spaces embedded in them are apparently somewhat common in the world, we might want to relax our check to not include space (\x20) in the rejected characters for that reason. Guess I missed it in the PR discussion and read your comment [0] now about the change from golang's fix that excluded space as a problematic character. Is it worth documenting this change somewhere like a versionchanged directive in http.client? [0] https://github.com/python/cpython/pull/12755#discussion_r279888496 Thanks for the details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 13:49:46 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 02 May 2019 17:49:46 +0000 Subject: [issue14546] lll.py can't handle multiple parameters correctly In-Reply-To: <1334154576.79.0.440664410533.issue14546@psf.upfronthosting.co.za> Message-ID: <1556819386.96.0.874367461054.issue14546@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +12980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 13:50:29 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 May 2019 17:50:29 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1556819429.93.0.142248492201.issue36772@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +dino.viehland, eric.snow, giampaolo.rodola, njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:00:01 2019 From: report at bugs.python.org (Aaron Hurst) Date: Thu, 02 May 2019 18:00:01 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1556820001.42.0.286688128819.issue35184@roundup.psfhosted.org> Aaron Hurst added the comment: Hi Ned, >From a fresh checkout of master on Ubuntu 18.04, I uncomment the pyexpat line in Modules/Setup and run: cpython$ ./configure ... cpython$ make Makefile:273: *** missing separator. Stop. Here is the offending section of the resulting Makefile: 269 # === Definitions added by makesetup === 270 271 LOCALMODLIBS= 272 BASEMODLIBS= 273 pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DXML_$ 274 PYTHONPATH=$(COREPYTHONPATH) 275 COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:03:32 2019 From: report at bugs.python.org (Aaron Hurst) Date: Thu, 02 May 2019 18:03:32 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1556820212.83.0.527257052679.issue35184@roundup.psfhosted.org> Change by Aaron Hurst : ---------- pull_requests: +12981 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:04:48 2019 From: report at bugs.python.org (Aaron Hurst) Date: Thu, 02 May 2019 18:04:48 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1556820288.06.0.161951268725.issue35184@roundup.psfhosted.org> Aaron Hurst added the comment: Sorry for my misunderstanding of the process, and thanks for explaining. I resubmitted the PR against the master branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:07:09 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 May 2019 18:07:09 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1556820429.5.0.900560378899.issue34155@roundup.psfhosted.org> Ned Deily added the comment: @barry, @r.david.murray, With the additional info about attacks in the wild, should we now consider this a security issue? If so, someone needs to provide an actual PR. (Raising the priority to "deferred blocker" pending evaluation.) ---------- nosy: +ned.deily priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:25:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 18:25:11 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556821511.45.0.270407383405.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +12982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:37:54 2019 From: report at bugs.python.org (Eric Cosatto) Date: Thu, 02 May 2019 18:37:54 +0000 Subject: [issue36716] Embedded Python fails to import module files with version_platform extensions In-Reply-To: <1556143659.79.0.1234879845.issue36716@roundup.psfhosted.org> Message-ID: <1556822274.05.0.744587264647.issue36716@roundup.psfhosted.org> Eric Cosatto added the comment: Problem solved: Running the following code in the CommandLine Python and in the C++ embedded python clarified the problem: import importlib.machinery print(importlib.machinery.all_suffixes()) CommandLine Python: > ['.py', '.pyw', '.pyc', '.cp37-win_amd64.pyd', '.pyd'] C++ Embedded Python: > ['.py', '.pyw', '.pyc', '_d.cp37-win_amd64.pyd', '_d.pyd'] It shows that the Embedded python is running in Debug mode and therefore adds a _d to the suffix. Yet the numpy or pytorch installed only non-debug files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:38:47 2019 From: report at bugs.python.org (Eric Cosatto) Date: Thu, 02 May 2019 18:38:47 +0000 Subject: [issue36716] Embedded Python fails to import module files with version_platform extensions In-Reply-To: <1556143659.79.0.1234879845.issue36716@roundup.psfhosted.org> Message-ID: <1556822327.75.0.344830103696.issue36716@roundup.psfhosted.org> Eric Cosatto added the comment: I'm closing the issue, see my previous post. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:40:18 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 May 2019 18:40:18 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1556822418.43.0.571706412326.issue35184@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the updates, Aaron. The plot thickens! If I perform the steps on a current macOS system, the result is: 273 pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DXML_POOR_ENTROPY=1 -DUSE_PYEXPAT_CAPI which works just fine. So it seems the underlying problem is actually a difference in the behavior of the makesetup shell script, most likely some difference in one of the utilities it uses, like sed, perhaps a BSD vs GNU difference. I won't have more time to look into this further today but feel free to do so if you like. In any case, we should fix the root problem in makesetup rather than trying to work around it elsewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:40:38 2019 From: report at bugs.python.org (Paul Moore) Date: Thu, 02 May 2019 18:40:38 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556822438.96.0.184378450414.issue36774@roundup.psfhosted.org> Paul Moore added the comment: +1 from me. It's something I'd find useful, and it's a natural extension of the f-string syntax. > I can't decide if I'm going to allow a format specifier. The only useful interpretation IMO would be for {expr!d:fmt} to expand to expr={expr:fmt}. If you're not willing to include that in the initial implementation, I'd rather see :fmt reserved for now, with the intention that it's implemented like this at a later date. Having :fmt apply to the whole string including the "expr=" bit would be basically useless to me. For a motivating example, consider f"{datetime.now()!d:%Y-%m-%d}", which is something I could easily imagine using. Steven D'Aprano: > I think there are enough use-cases for having access to > expressions, complete with source code, as first-class > values to make this a general feature of the language > and not baked into f-strings. I have a proto-PEP > discussing this. I have no problem with something like this, but I don't think it precludes the proposed f-string extension. The use cases are sufficiently different that I'd expect the two features to live happily together - there's no need to block the f-string extension for a proposal like this. ---------- nosy: +paul.moore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:44:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 18:44:43 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556822683.54.0.75298906148.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +12983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:46:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 18:46:32 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556822792.68.0.13104311914.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 373893ce51b0eaf0dec901e36a3e4217fbed3e32 by Victor Stinner in branch 'master': bpo-36763: Add _PyCoreConfig._config_version (GH-13065) https://github.com/python/cpython/commit/373893ce51b0eaf0dec901e36a3e4217fbed3e32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:47:58 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 02 May 2019 18:47:58 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1556822878.21.0.51944702949.issue34162@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +12984 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:54:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 18:54:33 +0000 Subject: [issue36776] test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x In-Reply-To: <1556810330.96.0.118002544008.issue36776@roundup.psfhosted.org> Message-ID: <1556823273.89.0.189296578528.issue36776@roundup.psfhosted.org> STINNER Victor added the comment: Another failure: https://buildbot.python.org/all/#builders/58/builds/2317 Python on x86 Windows7 3.x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:55:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 18:55:03 +0000 Subject: [issue36776] test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x In-Reply-To: <1556810330.96.0.118002544008.issue36776@roundup.psfhosted.org> Message-ID: <1556823303.74.0.223950958752.issue36776@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6ae2bbbdfcb8969d1d362b17c2fbd5a684fa4f9d by Victor Stinner (Zackery Spytz) in branch 'master': bpo-36776: Add @support.skip_unless_symlink to test_lll.py (GH-13058) https://github.com/python/cpython/commit/6ae2bbbdfcb8969d1d362b17c2fbd5a684fa4f9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 14:56:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 18:56:33 +0000 Subject: [issue36775] Rework filesystem codec implementation In-Reply-To: <1556808704.71.0.363298231326.issue36775@roundup.psfhosted.org> Message-ID: <1556823393.51.0.521209148959.issue36775@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 709d23dee69e700b87d5a4cb59e149d0e1af7993 by Victor Stinner in branch 'master': bpo-36775: _PyCoreConfig only uses wchar_t* (GH-13062) https://github.com/python/cpython/commit/709d23dee69e700b87d5a4cb59e149d0e1af7993 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:03:53 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 02 May 2019 19:03:53 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1556823833.19.0.568134858572.issue34162@roundup.psfhosted.org> Terry J. Reedy added the comment: PR 12579 started as a fixup for 3.7.4, but there seemed to be a problem of duplicate commits. The fix, based on Ned Deily's comments, after fetching from upstream: cd ../37 # 3.7 workspace git branch -D news37 # and dict37, whatever it was git reset --hard 784f52a^ git merge upstream/37 git push --force origin Then git checkout -b news37 to add dates and fix for 3.7.4 to produce PR 13067 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:07:27 2019 From: report at bugs.python.org (Aaron Hurst) Date: Thu, 02 May 2019 19:07:27 +0000 Subject: [issue35184] Makefile is not correctly generated when compiling pyextat with DXML_POOR_ENTROPY=1 In-Reply-To: <1541609240.08.0.788709270274.issue35184@psf.upfronthosting.co.za> Message-ID: <1556824047.66.0.68620047865.issue35184@roundup.psfhosted.org> Aaron Hurst added the comment: Hi Ned, Thanks for testing this. I also observe that macOS compiles "without error"... but it's still broken... and silently. This is because the pyexpat line isn't being turned into the expected set of source compilation rules, but it is instead being dumped into the variable definition section. Why is it being interpreted by makesetup as a variable definition? With the equals character, it matches this pattern: # Lines can also have the form # # = # # which defines a Make variable definition inserted into Makefile.in But it is intended to match this pattern: # Lines have the following structure: # # ... [ ...] [ ...] [ ...] For reference, here is the corresponding rule in makesetup: > *=*) DEFS="$line$NL$DEFS"; continue;; I fully support tweaking this pattern to better differentiate when "=" means a variable definition and when "=" is part of a compilation flag, but given that pyexpat is the only such case, my one-line fix makes things consistent again. For now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:07:42 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 02 May 2019 19:07:42 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1556824062.76.0.856435898879.issue36710@roundup.psfhosted.org> Neil Schemenauer added the comment: I think there are two questions to answer. First, do we want to support multiple runtimes per process? Second, if we do, what is the best way to do that? Some people would argue that multiple runtimes are not needed or are too hard to do. Maybe they are correct, I'm not sure. We should try to get a consensus on that first question. If we do decide to do it, then we need to answer the second question. Passing a "context" argument around seems the best solution. That is how the Java JNI does it. It sounds like that's how Javascript VMs do it too. We don't need to get creative. Look at what other VMs do and copy the best idea. If we do decide to do it, evolving the codebase and all extension modules is going to be a massive task. I would imagine that we can have a backwards compatible API layer that uses TSS. The layer that passes context explicitly would still have to maintain the TSS. There could be a build option that turns that backwards compatibility on or off. If off, you would gain some performance advantage because TSS does not have to be kept up-to-date. My feeling right now that even though this is a massive job, it is the correct thing to do. CPUs continue to gain cores. Improving CPython's ability to do multi-threading and multi-processing should be a priority for CPython core developers. ---------- nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:25:27 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 May 2019 19:25:27 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556825127.28.0.623023950858.issue36774@roundup.psfhosted.org> Eric V. Smith added the comment: Re: format specs and what they apply to. The problem is that you want f"{expr!d}" to expand to f"expr={repr(expr)}". And I think you want that because it's the most useful behavior for strings. Without the repr it's not very useful for strings. But you want to have the format spec apply to the expression, not the repr of the expression. So maybe f"{expr!d:spec}" should expand to f"expr={repr(format(expr, spec))}" So f"{datetime.now()!d:%Y-%m-%d}" would become: f"datetime.now()={repr(format(datetime.now(), '%Y-%m-%d'))}" but that gives: "datetime.now()='2019-05-02'" Do we want the repr of the resulting string here (the single quotes around 2019-05-02)? I think probably no (think float formatting). So the question is: how do you get repr by default, but allow the format spec? The only thing I've come up with is: - f"{expr!d}" expands to f"expr={repr(expr)}", but - f"{expr!d:spec} expands to f"expr={format(expr, spec)}" I think this is the most useful version. But is it too complex to explain? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:25:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 19:25:38 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556825138.08.0.142009860803.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 70005ac0fddd8585725b92acd1bc2b8e7b81999c by Victor Stinner in branch 'master': bpo-36763: _PyCoreConfig_SetPyArgv() preinitializes Python (GH-13037) https://github.com/python/cpython/commit/70005ac0fddd8585725b92acd1bc2b8e7b81999c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:27:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 19:27:57 +0000 Subject: [issue36776] test_tools: test_lll_multiple_dirs() failed on AMD64 Windows7 SP1 3.x In-Reply-To: <1556810330.96.0.118002544008.issue36776@roundup.psfhosted.org> Message-ID: <1556825277.05.0.956280274818.issue36776@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:29:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 19:29:10 +0000 Subject: [issue14546] lll.py can't handle multiple parameters correctly In-Reply-To: <1334154576.79.0.440664410533.issue14546@psf.upfronthosting.co.za> Message-ID: <1556825350.87.0.132951223726.issue14546@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e85ba1e69288e3fce400ed4cdbefab58934b5904 by Victor Stinner (Miss Islington (bot)) in branch '3.7': [3.7] bpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026) (GH-13060) https://github.com/python/cpython/commit/e85ba1e69288e3fce400ed4cdbefab58934b5904 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:29:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 19:29:25 +0000 Subject: [issue14546] lll.py can't handle multiple parameters correctly In-Reply-To: <1334154576.79.0.440664410533.issue14546@psf.upfronthosting.co.za> Message-ID: <1556825365.0.0.236048227095.issue14546@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7c2c01f02a1821298a62dd16ecc3a12da663e14b by Victor Stinner (Zackery Spytz) in branch '2.7': [2.7] bpo-14546: Fix the argument handling in Tools/scripts/lll.py (GH-13026) (GH-13063) https://github.com/python/cpython/commit/7c2c01f02a1821298a62dd16ecc3a12da663e14b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:30:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 19:30:04 +0000 Subject: [issue14546] lll.py can't handle multiple parameters correctly In-Reply-To: <1334154576.79.0.440664410533.issue14546@psf.upfronthosting.co.za> Message-ID: <1556825404.24.0.354131555695.issue14546@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Carton He for the bug report, thanks Zackery Spytz for the fix, thanks Serhiy Storchaka for the review ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:30:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 19:30:24 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556825424.84.0.847021018502.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4631da1242fc96002a3c0462a87d087e567368aa by Victor Stinner in branch 'master': bpo-36763: Remove _PyCoreConfig._init_main (GH-13066) https://github.com/python/cpython/commit/4631da1242fc96002a3c0462a87d087e567368aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:34:05 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 02 May 2019 19:34:05 +0000 Subject: [issue34162] idlelib/NEWS.txt for 3.8.0 (and backports) In-Reply-To: <1532067299.29.0.56676864532.issue34162@psf.upfronthosting.co.za> Message-ID: <1556825645.7.0.0322746614902.issue34162@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 304ca211c4912f040151e518d9d66fd2d625c5e9 by Terry Jan Reedy in branch '3.7': [3.7] bpo-34162: Fix idlelib/NEWS.text for 3.7.4 (#13067) https://github.com/python/cpython/commit/304ca211c4912f040151e518d9d66fd2d625c5e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:35:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 19:35:54 +0000 Subject: [issue36475] PyEval_AcquireLock() and PyEval_AcquireThread() do not handle runtime finalization properly. In-Reply-To: <1553887580.94.0.470279627742.issue36475@roundup.psfhosted.org> Message-ID: <1556825754.56.0.823858797508.issue36475@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +12985 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 15:41:42 2019 From: report at bugs.python.org (Paul Moore) Date: Thu, 02 May 2019 19:41:42 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556825127.28.0.623023950858.issue36774@roundup.psfhosted.org> Message-ID: Paul Moore added the comment: > So the question is: how do you get repr by default, but allow the format spec? > > The only thing I've come up with is: > - f"{expr!d}" expands to f"expr={repr(expr)}", but > - f"{expr!d:spec} expands to f"expr={format(expr, spec)}" > > I think this is the most useful version. But is it too complex to explain? Agreed, this is the most useful version. Not only do I not think it's too complicated to explain, I actually think it's the obvious behaviour, and what people would expect even without an explanation. If asked, I'd explain it as: f"{expr!d:spec}" expands to "expr=". If ":spec" is omitted, repr() is used. That seems simple enough to me - the key is that we're just saying "if :spec is omitted, we use repr". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 16:00:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 20:00:16 +0000 Subject: [issue36775] Rework filesystem codec implementation In-Reply-To: <1556808704.71.0.363298231326.issue36775@roundup.psfhosted.org> Message-ID: <1556827216.34.0.989064727047.issue36775@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 16:00:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 May 2019 20:00:51 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1556827251.01.0.102789193031.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: I updated my PEP 587: [Python-Dev] RFC: PEP 587 "Python Initialization Configuration": 2nd version https://mail.python.org/pipermail/python-dev/2019-May/157290.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 16:12:44 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 02 May 2019 20:12:44 +0000 Subject: [issue13611] Integrate ElementC14N module into xml.etree package In-Reply-To: <1324023461.04.0.625039310668.issue13611@psf.upfronthosting.co.za> Message-ID: <1556827964.95.0.566570469891.issue13611@roundup.psfhosted.org> Stefan Behnel added the comment: > Maybe complete Doc/license.rst? Thanks, done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 16:46:25 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 02 May 2019 20:46:25 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 Message-ID: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> New submission from Paul Monson : Windows desktop skus have a default ANSI codepage (returned by GetACP()) of 1252 (Western European). Windows IoT Core and Windows Nano Server have a default codepage of 65001 (UTF-8). This causes test_site.StartupImportTests.test_startup_imports to fail on Windows IoT Core and Windows Nano Server because cp65001.py is loaded instead of the frozen cp1252.py at startup. I tried changing the default codepage to 65001 on my dev machine and rebuilding Python and it had no effect that I could tell on the generated frozen importlibs. The simplest solutions would be for the test_startup_imports test to be skipped or changed to pass when the locale.getpreferredencoding() returns 'cp65001' ---------- components: Tests, Windows messages: 341316 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 16:48:32 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 02 May 2019 20:48:32 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1556830112.5.0.00492199020796.issue36778@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +12986 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 18:10:21 2019 From: report at bugs.python.org (=?utf-8?q?Andreas_K=2E_H=C3=BCttel?=) Date: Thu, 02 May 2019 22:10:21 +0000 Subject: [issue36699] building for riscv multilib (patch attached) In-Reply-To: <1555957491.02.0.328369650892.issue36699@roundup.psfhosted.org> Message-ID: <1556835021.64.0.027107449933.issue36699@roundup.psfhosted.org> Andreas K. H?ttel added the comment: Who am I to disagree. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 19:04:09 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 02 May 2019 23:04:09 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1556838249.64.0.339843549266.issue35070@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +12987 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 20:45:22 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 03 May 2019 00:45:22 +0000 Subject: [issue36779] strptime returns empty string on Windows if default codepage is a Unicode codepage Message-ID: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> New submission from Paul Monson : Need to work around a CRT bug in the use of _tzset() + _tzname[] Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[]. This causes time.tzname to be an empty string. I have reported the bug. One possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7 ---------- messages: 341318 nosy: Paul Monson priority: normal severity: normal status: open title: strptime returns empty string on Windows if default codepage is a Unicode codepage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 20:47:28 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 03 May 2019 00:47:28 +0000 Subject: [issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage In-Reply-To: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> Message-ID: <1556844448.59.0.488959897645.issue36779@roundup.psfhosted.org> Change by Paul Monson : ---------- title: strptime returns empty string on Windows if default codepage is a Unicode codepage -> time.tzname returns empty string on Windows if default codepage is a Unicode codepage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 21:23:14 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 03 May 2019 01:23:14 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1556846594.73.0.608215474757.issue36778@roundup.psfhosted.org> Change by Paul Monson : ---------- pull_requests: +12988 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 21:44:15 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 May 2019 01:44:15 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1556847855.39.0.43941789444.issue36772@roundup.psfhosted.org> Raymond Hettinger added the comment: At Pycon today, I mostly got all positive feedback on this. Apparently py.test already follows this pattern. Another developer said they found the () to be distracting and would welcome not having to use them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 21:45:21 2019 From: report at bugs.python.org (Windson Yang) Date: Fri, 03 May 2019 01:45:21 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1556847921.22.0.80106713067.issue34155@roundup.psfhosted.org> Windson Yang added the comment: I found the issue located in https://github.com/python/cpython/blob/master/Lib/email/_parseaddr.py#L277 elif self.field[self.pos] in '.@': # email address is just an addrspec # this isn't very efficient since we start over self.pos = oldpos self.commentlist = oldcl addrspec = self.getaddrspec() returnlist = [(SPACE.join(self.commentlist), addrspec)] The parseaddr function runs a for in loop over the input string, when it meets '.@' it will do something. That is why when the input string is 'foo at bar.com@example.com' will return ('', 'foo at bar.com'). One possible solution will be to check the string in the reverse order then we can always get the last '@' in the string. ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 22:01:30 2019 From: report at bugs.python.org (daniel hahler) Date: Fri, 03 May 2019 02:01:30 +0000 Subject: [issue35824] http.cookies._CookiePattern modifying regular expressions In-Reply-To: <1548385865.75.0.22198302427.issue35824@roundup.psfhosted.org> Message-ID: <1556848890.13.0.998470069562.issue35824@roundup.psfhosted.org> daniel hahler added the comment: I seems like http.cookiejar should be used for clients, which includes more relaxed parsing of cookies. This is mentioned in the docs at https://github.com/python/cpython/blame/443fe5a52a3d6a101795380227ced38b4b5e0a8b/Doc/library/http.cookies.rst#L63-L65. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 22:09:13 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 03 May 2019 02:09:13 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1556849353.82.0.511655027705.issue34155@roundup.psfhosted.org> Barry A. Warsaw added the comment: Well, at least we're not alone. Here's a screen capture from Mail.app Version 12.4 (3445.104.8). ---------- Added file: https://bugs.python.org/file48295/Screen Shot 2019-05-02 at 22.07.27.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 22:13:18 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 03 May 2019 02:13:18 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1556849598.03.0.686667513866.issue36778@roundup.psfhosted.org> Inada Naoki added the comment: Could you paste how the test fails? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 2 23:02:37 2019 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 03 May 2019 03:02:37 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1556852557.34.0.249101864783.issue36772@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 00:46:30 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 03 May 2019 04:46:30 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1556858790.14.0.0833589979474.issue36778@roundup.psfhosted.org> Paul Monson added the comment: ====================================================================== FAIL: test_startup_imports (test.test_site.StartupImportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\docker\pythond\lib\test\test_site.py", line 542, in test_startup_imports self.assertFalse(modules.intersection(collection_mods), stderr) AssertionError: {'operator', 'keyword', 'functools', 'heapq', 'collections', 'reprlib'} is not false : import _frozen_importlib # frozen import _imp # builtin import '_thread' # import '_warnings' # import '_weakref' # import '_frozen_importlib_external' # import '_io' # import 'marshal' # import 'nt' # import _thread # previously loaded ('_thread') import '_thread' # import _weakref # previously loaded ('_weakref') import '_weakref' # import 'winreg' # # installing zipimport hook import 'time' # import 'zipimport' # # installed zipimport hook # c:\docker\pythond\lib\encodings\__pycache__\__init__.cpython-38.pyc matches c:\docker\pythond\lib\encodings\__init__.py # code object from 'c:\\docker\\pythond\\lib\\encodings\\__pycache__\\__init__.cpython-38.pyc' # c:\docker\pythond\lib\__pycache__\codecs.cpython-38.pyc matches c:\docker\pythond\lib\codecs.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\codecs.cpython-38.pyc' import '_codecs' # import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x01D9DBD0> # c:\docker\pythond\lib\encodings\__pycache__\aliases.cpython-38.pyc matches c:\docker\pythond\lib\encodings\aliases.py # code object from 'c:\\docker\\pythond\\lib\\encodings\\__pycache__\\aliases.cpython-38.pyc' import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x01EFF900> import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x01D9DA50> # c:\docker\pythond\lib\encodings\__pycache__\utf_8.cpython-38.pyc matches c:\docker\pythond\lib\encodings\utf_8.py # code object from 'c:\\docker\\pythond\\lib\\encodings\\__pycache__\\utf_8.cpython-38.pyc' import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x01D9DCC0> import '_signal' # # c:\docker\pythond\lib\encodings\__pycache__\cp65001.cpython-38.pyc matches c:\docker\pythond\lib\encodings\cp65001.py # code object from 'c:\\docker\\pythond\\lib\\encodings\\__pycache__\\cp65001.cpython-38.pyc' # c:\docker\pythond\lib\__pycache__\functools.cpython-38.pyc matches c:\docker\pythond\lib\functools.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\functools.cpython-38.pyc' # c:\docker\pythond\lib\__pycache__\abc.cpython-38.pyc matches c:\docker\pythond\lib\abc.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\abc.cpython-38.pyc' import '_abc' # import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x01F16FC0> # c:\docker\pythond\lib\collections\__pycache__\__init__.cpython-38.pyc matches c:\docker\pythond\lib\collections\__init__.py # code object from 'c:\\docker\\pythond\\lib\\collections\\__pycache__\\__init__.cpython-38.pyc' # c:\docker\pythond\lib\__pycache__\_collections_abc.cpython-38.pyc matches c:\docker\pythond\lib\_collections_abc.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\_collections_abc.cpython-38.pyc' import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x01F423C0> # c:\docker\pythond\lib\__pycache__\operator.cpython-38.pyc matches c:\docker\pythond\lib\operator.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\operator.cpython-38.pyc' import '_operator' # import 'operator' # <_frozen_importlib_external.SourceFileLoader object at 0x01F4D630> # c:\docker\pythond\lib\__pycache__\keyword.cpython-38.pyc matches c:\docker\pythond\lib\keyword.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\keyword.cpython-38.pyc' import 'keyword' # <_frozen_importlib_external.SourceFileLoader object at 0x01F58810> # c:\docker\pythond\lib\__pycache__\heapq.cpython-38.pyc matches c:\docker\pythond\lib\heapq.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\heapq.cpython-38.pyc' import '_heapq' # import 'heapq' # <_frozen_importlib_external.SourceFileLoader object at 0x01F588D0> import 'itertools' # # c:\docker\pythond\lib\__pycache__\reprlib.cpython-38.pyc matches c:\docker\pythond\lib\reprlib.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\reprlib.cpython-38.pyc' import 'reprlib' # <_frozen_importlib_external.SourceFileLoader object at 0x01F59900> import '_collections' # import 'collections' # <_frozen_importlib_external.SourceFileLoader object at 0x01F25810> import '_functools' # import 'functools' # <_frozen_importlib_external.SourceFileLoader object at 0x01EFFCC0> import 'encodings.cp65001' # <_frozen_importlib_external.SourceFileLoader object at 0x01EFF9F0> # c:\docker\pythond\lib\encodings\__pycache__\latin_1.cpython-38.pyc matches c:\docker\pythond\lib\encodings\latin_1.py # code object from 'c:\\docker\\pythond\\lib\\encodings\\__pycache__\\latin_1.cpython-38.pyc' import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x01EFF810> # c:\docker\pythond\lib\__pycache__\io.cpython-38.pyc matches c:\docker\pythond\lib\io.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\io.cpython-38.pyc' import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x01D88DB0> Python 3.8.0a3+ (heads/iot-merged-dirty:88716a51a3, Apr 5 2019, 11:11:18) [MSC v.1916 32 bit (ARM)] on win32 Type "help", "copyright", "credits" or "license" for more information. # c:\docker\pythond\lib\__pycache__\site.cpython-38.pyc matches c:\docker\pythond\lib\site.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\site.cpython-38.pyc' # c:\docker\pythond\lib\__pycache__\os.cpython-38.pyc matches c:\docker\pythond\lib\os.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\os.cpython-38.pyc' # c:\docker\pythond\lib\__pycache__\stat.cpython-38.pyc matches c:\docker\pythond\lib\stat.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\stat.cpython-38.pyc' import '_stat' # import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x01F25990> # c:\docker\pythond\lib\__pycache__\ntpath.cpython-38.pyc matches c:\docker\pythond\lib\ntpath.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\ntpath.cpython-38.pyc' # c:\docker\pythond\lib\__pycache__\genericpath.cpython-38.pyc matches c:\docker\pythond\lib\genericpath.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\genericpath.cpython-38.pyc' import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x01F9CDE0> import 'ntpath' # <_frozen_importlib_external.SourceFileLoader object at 0x01F9C5D0> import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x01F873F0> # c:\docker\pythond\lib\__pycache__\_sitebuiltins.cpython-38.pyc matches c:\docker\pythond\lib\_sitebuiltins.py # code object from 'c:\\docker\\pythond\\lib\\__pycache__\\_sitebuiltins.cpython-38.pyc' import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x01F87FC0> import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x01F16C60> # cleanup[3] wiping _functools # cleanup[3] wiping _collections # cleanup[3] wiping heapq # cleanup[3] wiping _heapq # destroy _heapq # cleanup[3] wiping _operator # cleanup[3] wiping _collections_abc # cleanup[3] wiping _abc # cleanup[3] wiping encodings.utf_8 # cleanup[3] wiping encodings.aliases # cleanup[3] wiping codecs # cleanup[3] wiping _codecs # cleanup[3] wiping winreg # cleanup[3] wiping _weakref # cleanup[3] wiping _thread # cleanup[3] wiping nt # cleanup[3] wiping marshal # cleanup[3] wiping _io # cleanup[3] wiping _frozen_importlib_external # destroy io # destroy nt # destroy winreg # destroy marshal # cleanup[3] wiping _warnings # cleanup[3] wiping _imp # cleanup[3] wiping _frozen_importlib # destroy _frozen_importlib_external # destroy _imp # destroy _warnings # cleanup[3] wiping sys # clear builtins._ # clear sys.path # clear sys.argv # clear sys.ps1 # clear sys.ps2 # clear sys.last_type # clear sys.last_value # clear sys.last_traceback # clear sys.path_hooks # clear sys.path_importer_cache # clear sys.meta_path # clear sys.__interactivehook__ # clear sys.flags # clear sys.float_info # restore sys.stdin # restore sys.stdout # restore sys.stderr # cleanup[2] removing sys # cleanup[2] removing builtins # cleanup[2] removing _frozen_importlib # cleanup[2] removing _imp # cleanup[2] removing _warnings # cleanup[2] removing _frozen_importlib_external # cleanup[2] removing _io # cleanup[2] removing marshal # cleanup[2] removing nt # cleanup[2] removing _thread # cleanup[2] removing _weakref # cleanup[2] removing winreg # cleanup[2] removing time # cleanup[2] removing zipimport # destroy zipimport # cleanup[2] removing _codecs # cleanup[2] removing codecs # cleanup[2] removing encodings.aliases # cleanup[2] removing encodings # destroy encodings # cleanup[2] removing encodings.utf_8 # cleanup[2] removing _signal # cleanup[2] removing __main__ # destroy __main__ # cleanup[2] removing _abc # cleanup[2] removing abc # cleanup[2] removing _collections_abc # cleanup[2] removing _operator # cleanup[2] removing operator # destroy operator # cleanup[2] removing keyword # destroy keyword # cleanup[2] removing _heapq # cleanup[2] removing heapq # cleanup[2] removing itertools # cleanup[2] removing reprlib # destroy reprlib # cleanup[2] removing _collections # cleanup[2] removing collections # destroy collections # cleanup[2] removing _functools # cleanup[2] removing functools # cleanup[2] removing encodings.cp65001 # cleanup[2] removing encodings.latin_1 # cleanup[2] removing io # destroy io # cleanup[2] removing _stat # cleanup[2] removing stat # cleanup[2] removing genericpath # cleanup[2] removing ntpath # cleanup[2] removing os.path # cleanup[2] removing os # cleanup[2] removing _sitebuiltins # cleanup[2] removing site # destroy site # destroy time # destroy _signal # destroy itertools # destroy _sitebuiltins # destroy abc # destroy ntpath # destroy _stat # destroy os # destroy stat # destroy genericpath # cleanup[3] wiping encodings.latin_1 # cleanup[3] wiping encodings.cp65001 # destroy functools # cleanup[3] wiping builtins # destroy _functools # destroy _collections_abc # destroy _operator # destroy heapq # destroy _weakref # destroy _collections # destroy _thread # destroy _abc # destroy _frozen_importlib ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 02:07:00 2019 From: report at bugs.python.org (Martha Simons) Date: Fri, 03 May 2019 06:07:00 +0000 Subject: [issue27409] List socket.SO_*, SCM_*, MSG_*, IPPROTO_* symbols In-Reply-To: <1467168896.94.0.840314714269.issue27409@psf.upfronthosting.co.za> Message-ID: <1556863620.36.0.681595242777.issue27409@roundup.psfhosted.org> Martha Simons added the comment: That patch was never updated nor comitted, but it sounds like this kind of addition might be https://goo.gl/LhppLn acceptable. ---------- nosy: +Martha Simons _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 02:12:18 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 03 May 2019 06:12:18 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1556863938.04.0.596945520549.issue36778@roundup.psfhosted.org> Inada Naoki added the comment: @Victor It seems you added cp65001 as Windows-only encoding in bpo-13216. How do you think about removing cp65001 encoding, and add 'cp65001' -> 'utf_8' alias which is available on all platforms? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 02:44:21 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 03 May 2019 06:44:21 +0000 Subject: [issue30485] Element.findall(path, dict) doesn't insert null namespace In-Reply-To: <1495803428.74.0.976679303383.issue30485@psf.upfronthosting.co.za> Message-ID: <1556865861.92.0.168024800269.issue30485@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 02:51:27 2019 From: report at bugs.python.org (Martha Simons) Date: Fri, 03 May 2019 06:51:27 +0000 Subject: [issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll In-Reply-To: <1365444634.63.0.621793850181.issue17667@psf.upfronthosting.co.za> Message-ID: <1556866287.31.0.570586806037.issue17667@roundup.psfhosted.org> Change by Martha Simons : Added file: https://bugs.python.org/file48296/27409.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 03:45:11 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 03 May 2019 07:45:11 +0000 Subject: [issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage In-Reply-To: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> Message-ID: <1556869511.16.0.0752344521838.issue36779@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> test needed type: -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 04:09:24 2019 From: report at bugs.python.org (Dave Page) Date: Fri, 03 May 2019 08:09:24 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1556870964.86.0.282309713668.issue35070@roundup.psfhosted.org> Dave Page added the comment: The submitted patch from websurfer5 resolves the issue for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 04:11:06 2019 From: report at bugs.python.org (wkoot) Date: Fri, 03 May 2019 08:11:06 +0000 Subject: [issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1556871066.27.0.210081960783.issue27682@roundup.psfhosted.org> Change by wkoot : ---------- nosy: +wkoot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 04:32:46 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 03 May 2019 08:32:46 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556872366.74.0.0655855082228.issue36774@roundup.psfhosted.org> Eric V. Smith added the comment: The most recent version of the patch implements the conditional repr/format behavior. I'm pretty happy with it. Other than docs, I think this is done. I'm going to discuss it with a few more people at PyCon, then commit it. There's a slight optimization I'm considering (pre-append the '=' to the expression text at compile time, instead of at runtime), but I'll do that later, if ever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 05:28:03 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Fri, 03 May 2019 09:28:03 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors Message-ID: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> New submission from Hrvoje Nik?i? : At interpreter shutdown, Python waits for all pending futures of all executors to finish. There seems to be no way to disable the wait for pools that have been explicitly shut down with pool.shutdown(wait=False). The attached script demonstrates the issue. In our code the futures are running blocking network calls that can be canceled by the user. The cancel action automatically cancels the pending futures and informs the running ones that they should exit. The remaining futures are those whose callables are "stuck" in network calls with long or infinite timeouts, such as reading from a non-responding network filesystem. Since those can't be interrupted, we use pool.shutdown(wait=False) to disown the whole pool. This works nicely, until the application exit, at which point it blocks trying to wait for the pending futures to finish. This can take an arbitrary amount of time, possibly never finishing. A similar question has come up on StackOverflow, with the only answer recommending to unregister concurrent.futures.thread._python_exit: https://stackoverflow.com/q/48350257/1600898 . We are ourselves using a similar hack, but we would like to contribute a proper way to disown an executor. The current behavior is explicitly documented, so presumably it can't be (easily) changed, but we could add a "disown" keyword argument to shutdown(), or a new disown() method, which would serve to explicitly disable the waiting. If this is considered desirable, I will create a pull request. ---------- components: Library (Lib) files: pool-shutdown messages: 341329 nosy: hniksic priority: normal severity: normal status: open title: Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors versions: Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48297/pool-shutdown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 05:49:33 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 May 2019 09:49:33 +0000 Subject: [issue36781] Optimize sum() for bools Message-ID: <1556876973.98.0.990157093134.issue36781@roundup.psfhosted.org> New submission from Serhiy Storchaka : To count the number of items that satisfy certain condition you can use either sum(1 for x in data if pred(x)) or sum(pred(x) for x in data) where pred(x) is a boolean expression. The latter case is shorter but slower. There are two causes for this: 1. The generator expression needs to generate more items, not only when pred(x) is true, but also when pred(x) is false. 2. sum() is optimized for integers and floats, but not for bools. The first cause is out of the scope of this issue, but sum() can optimized for bools. $ ./python -m timeit -s "a = [True] * 10**6" -- "sum(a)" Unpatched: 10 loops, best of 5: 22.3 msec per loop Patched: 50 loops, best of 5: 6.26 msec per loop $ ./python -m timeit -s "a = list(range(10**6))" -- "sum(x % 2 == 0 for x in a)" Unpatched: 5 loops, best of 5: 89.8 msec per loop Patched: 5 loops, best of 5: 67.5 msec per loop $ ./python -m timeit -s "a = list(range(10**6))" -- "sum(1 for x in a if x % 2 == 0)" 5 loops, best of 5: 53.9 msec per loop ---------- components: Interpreter Core messages: 341330 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Optimize sum() for bools type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 05:51:44 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 03 May 2019 09:51:44 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1556877104.14.0.760087337871.issue36780@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +bquinlan, pitrou type: -> behavior versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 06:25:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 May 2019 10:25:41 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556879141.33.0.981608258497.issue36774@roundup.psfhosted.org> Serhiy Storchaka added the comment: This conversion is very special. For all other conversions {value:!c:format_spec} is equivalent to format(conv(value), format_spec), but not this conversion. It is also specific for f-strings, and is not particularly useful in format strings. Would not be better to use more special syntax for it? For example "!=" or "!!"? Letters can be reserved for future "normal" conversions. It may be we even allowed to register new converters by name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 07:16:10 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 03 May 2019 11:16:10 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556882170.68.0.573262874435.issue36774@roundup.psfhosted.org> Eric V. Smith added the comment: != would be my preference, but it can't work. f'{0!=1}' is already legal. I'm not crazy about !!. I think that will be too confusing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 08:25:17 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 03 May 2019 12:25:17 +0000 Subject: [issue34848] range.index only takes one argument when it's documented as taking the usual 3 In-Reply-To: <1538279738.27.0.545547206417.issue34848@psf.upfronthosting.co.za> Message-ID: <1556886317.59.0.749898947845.issue34848@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +12989 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 08:27:51 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 03 May 2019 12:27:51 +0000 Subject: [issue36743] Docs: Descript __get__ signature defined differently across the docs In-Reply-To: <1556387803.45.0.177981206888.issue36743@roundup.psfhosted.org> Message-ID: <1556886471.84.0.272219179719.issue36743@roundup.psfhosted.org> Jeroen Demeyer added the comment: Personally, I have always found "instance" and "owner" very confusing names for these arguments. If you want to change the documentation, I would recommend changing those names too. Better names would be "obj" and "cls" or something like that. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 08:42:13 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 03 May 2019 12:42:13 +0000 Subject: [issue36743] Docs: Descript __get__ signature defined differently across the docs In-Reply-To: <1556387803.45.0.177981206888.issue36743@roundup.psfhosted.org> Message-ID: <1556887333.18.0.351278677322.issue36743@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Perhaps the datamodel docs can be clarified to note that callers are allowed to omit the third argument That's not true in general, only when __get__ is a slot wrapper (i.e. for classes implemented in C). When __get__ is a Python function, nothing special is done, it's just a Python function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 09:11:51 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 03 May 2019 13:11:51 +0000 Subject: [issue34214] Pylint recusion stack overflow abort In-Reply-To: <1532463381.11.0.56676864532.issue34214@psf.upfronthosting.co.za> Message-ID: <1556889111.26.0.256618591789.issue34214@roundup.psfhosted.org> Jeroen Demeyer added the comment: FYI: this one-liner installs the crashing versions: pip3 install git+https://github.com/nickdrozd/astroid.git at crash git+https://github.com/nickdrozd/pylint.git at crash ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 09:46:57 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 03 May 2019 13:46:57 +0000 Subject: [issue36782] Add tests for the datetime C API Message-ID: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> New submission from Paul Ganssle : A decent fraction of the datetime C API has no tests. If we had tests, we could have prevented bpo #36025, which was a regression in the FromTimestamp method. I would like to open this issue to suggest the addition of tests for the full interface, to prevent further regressions here. To write a test, first add a wrapper function in the _testcapimodule module: https://github.com/python/cpython/blob/master/Modules/_testcapimodule.c#L2218 Then test that function here: https://github.com/python/cpython/blob/master/Lib/test/datetimetester.py#L5821 See an example at GH PR 11922: https://github.com/python/cpython/pull/11922 I recommend testing *both* the version of the function accessed by the Macro (e.g. PyDate_FromTimestamp) and from the C API capsule (e.g. PyDateTimeApi->FromTimestamp), since projects access these functions in both ways. C API Documentation is here: https://docs.python.org/3/c-api/datetime.html Currently untested: - PyDate_FromDate / PyDateTimeAPI->Date_FromDate - PyDateTime_FromDateAndTime / PyDateTimeAPI->DateTime_FromDateAndTime - PyDateTime_FromDateAndTimeAndFold / PyDateTimeAPI->DateTime_FromDateAndTimeAndFold - PyTime_FromTime -> PyDateTimeAPI->Time_FromTime - PyTime_FromTimeAndFold -> PyDateTime->Time_FromTimeAndFold - PyDelta_FromDSU / PyDateTime->Delta_FromDelta Untested macros with no corresponding API module: - PyDateTime_DATE_GET_YEAR - PyDateTime_DATE_GET_MONTH - PyDateTime_DATE_GET_DAY - PyDateTime_DATE_GET_HOUR - PyDateTime_DATE_GET_MINUTE - PyDateTime_DATE_GET_SECOND - PyDateTime_DATE_GET_MICROSECOND - PyDateTime_DELTA_GET_DAYS - PyDateTime_DELTA_GET_SECONDS - PyDateTime_DELTA_GET_MICROSECONDS I can spawn smaller issues for this if that's preferred, but I figured we'd start with this big meta-issue. ---------- components: Tests keywords: easy messages: 341336 nosy: p-ganssle priority: low severity: normal status: open title: Add tests for the datetime C API type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 09:48:26 2019 From: report at bugs.python.org (Eric N. Vander Weele) Date: Fri, 03 May 2019 13:48:26 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1556891306.21.0.498201719286.issue36782@roundup.psfhosted.org> Change by Eric N. Vander Weele : ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 09:51:55 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 03 May 2019 13:51:55 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions Message-ID: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> New submission from Paul Ganssle : In Python 3.6, Time_FromTimeAndFold and PyDateTime_FromDateAndTimeAndFold were added as part of the PEP 495 implementation, but no documentation was added for the C API portions of this change: https://docs.python.org/3.7/c-api/datetime.html The functions were added to this portion of the C API capsule: https://github.com/python/cpython/blob/master/Include/datetime.h#L173 Macros are here: https://github.com/python/cpython/blob/master/Include/datetime.h#L222 These functions should be documented, with `..versionadded:: 3.6` ---------- assignee: docs at python components: Documentation keywords: easy messages: 341337 nosy: docs at python, p-ganssle priority: low severity: normal status: open title: No documentation for _FromXandFold C API functions versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 09:52:32 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 03 May 2019 13:52:32 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1556891552.91.0.693323593964.issue36783@roundup.psfhosted.org> Change by Paul Ganssle : ---------- nosy: +Mariatta, cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 10:02:55 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 03 May 2019 14:02:55 +0000 Subject: [issue36784] __import__ with empty folder after importlib.invalidate_caches causes reference leak Message-ID: <1556892175.48.0.910434484078.issue36784@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : I originally hit upon this with issue36777 where I have used support.script_helper.make_script which calls importlib.invalidate_caches and then trying to use __import__ on an empty folder causes reference leak. I tried 3.8 to 3.5 and it exists on each version. A sample script as below. I tried using try finally instead of DirsOnSysPath in doubt and it still causes leak. I couldn't find any issues on search and let me know if I am using something in an incorrect manner. import importlib import unittest import os, sys import os.path from test import support def test_importlib_cache(): with support.temp_dir() as path: dirname, basename = os.path.split(path) os.mkdir(os.path.join(path, 'test2')) importlib.invalidate_caches() with support.DirsOnSysPath(dirname): __import__("{basename}.test2".format(basename=basename)) class Tests(unittest.TestCase): def test_bug(self): for _ in range(10): test_importlib_cache() ? cpython git:(master) ? ./python.exe -m test -R 3:3 test_import_bug Run tests sequentially 0:00:00 load avg: 1.56 [1/1] test_import_bug beginning 6 repetitions 123456 ...... test_import_bug leaked [980, 980, 980] references, sum=2940 test_import_bug leaked [370, 370, 370] memory blocks, sum=1110 test_import_bug failed == Tests result: FAILURE == 1 test failed: test_import_bug Total duration: 1 sec 529 ms Tests result: FAILURE I also tried __import__('test1.test2') instead of __import__("{basename}.test2".format(basename=basename)) and the program doesn't cause reference leak. Moving importlib.invalidate_caches() above support.temp_dir() also causes leak so I guess it's not something to do with temporary directories that are cleaned up after tests. ? cpython git:(master) ? mkdir -p test1/test2 ? cpython git:(master) ? ./python.exe -m test -R 3:3 test_import_bug Run tests sequentially 0:00:00 load avg: 1.97 [1/1] test_import_bug beginning 6 repetitions 123456 ...... test_import_bug passed == Tests result: SUCCESS == 1 test OK. Total duration: 557 ms Tests result: SUCCESS ---------- components: Library (Lib) messages: 341338 nosy: brett.cannon, eric.snow, ncoghlan, xtreak priority: normal severity: normal status: open title: __import__ with empty folder after importlib.invalidate_caches causes reference leak type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 10:04:33 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 03 May 2019 14:04:33 +0000 Subject: [issue36777] unittest discover throws TypeError on empty packages In-Reply-To: <1556815623.31.0.225997144606.issue36777@roundup.psfhosted.org> Message-ID: <1556892273.22.0.387117093852.issue36777@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I opened issue36784 for reference leak in the initial report along with a reproducer that is reproducible on master branch without my changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 10:18:08 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 03 May 2019 14:18:08 +0000 Subject: [issue34214] Pylint recusion stack overflow abort In-Reply-To: <1532463381.11.0.56676864532.issue34214@psf.upfronthosting.co.za> Message-ID: <1556893088.79.0.592550100191.issue34214@roundup.psfhosted.org> Jeroen Demeyer added the comment: What seems to be happening is a recursion error while handling a recursion error. Essentially >>> def f(): ... try: ... f() ... except: ... f() ... >>> f() Fatal Python error: Cannot recover from stack overflow. So unless I'm missing something here, I don't see why this should be considered a CPython bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 11:06:24 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 03 May 2019 15:06:24 +0000 Subject: [issue36512] future_factory argument for Thread/ProcessPoolExecutor In-Reply-To: <1554234773.66.0.185942114441.issue36512@roundup.psfhosted.org> Message-ID: <1556895984.96.0.696699602883.issue36512@roundup.psfhosted.org> Andrew Svetlov added the comment: What is your use case? ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 11:09:20 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 03 May 2019 15:09:20 +0000 Subject: [issue36341] bind() on AF_UNIX socket may fail in tests run as non-root In-Reply-To: <1552901311.8.0.284051575659.issue36341@roundup.psfhosted.org> Message-ID: <1556896160.82.0.312056753021.issue36341@roundup.psfhosted.org> miss-islington added the comment: New changeset 4461d704e23a13dfbe78ea3020e4cbeff4b68dc2 by Miss Islington (bot) (xdegaye) in branch 'master': bpo-36341: Fix tests calling bind() on AF_UNIX sockets (GH-12399) https://github.com/python/cpython/commit/4461d704e23a13dfbe78ea3020e4cbeff4b68dc2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 11:09:35 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 03 May 2019 15:09:35 +0000 Subject: [issue36341] bind() on AF_UNIX socket may fail in tests run as non-root In-Reply-To: <1552901311.8.0.284051575659.issue36341@roundup.psfhosted.org> Message-ID: <1556896175.66.0.0199212181216.issue36341@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 11:18:06 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 03 May 2019 15:18:06 +0000 Subject: [issue36613] asyncio._wait() don't remove callback in case of exception In-Reply-To: <1555072688.4.0.270726893934.issue36613@roundup.psfhosted.org> Message-ID: <1556896686.96.0.620507853898.issue36613@roundup.psfhosted.org> miss-islington added the comment: New changeset c1964e9e2177eabe821f3e4243be8b99e0d2d542 by Miss Islington (bot) (gescheit) in branch 'master': bpo-36613: call remove_done_callback if exception (GH-12800) https://github.com/python/cpython/commit/c1964e9e2177eabe821f3e4243be8b99e0d2d542 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 11:18:17 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 03 May 2019 15:18:17 +0000 Subject: [issue36613] asyncio._wait() don't remove callback in case of exception In-Reply-To: <1555072688.4.0.270726893934.issue36613@roundup.psfhosted.org> Message-ID: <1556896697.39.0.0944469871387.issue36613@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +12990 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 11:19:10 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 03 May 2019 15:19:10 +0000 Subject: [issue36613] asyncio._wait() don't remove callback in case of exception In-Reply-To: <1555072688.4.0.270726893934.issue36613@roundup.psfhosted.org> Message-ID: <1556896750.13.0.220023180731.issue36613@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 11:35:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 03 May 2019 15:35:30 +0000 Subject: [issue24638] asyncio "loop argument must agree with future" error message could be improved In-Reply-To: <1436967590.12.0.584324642332.issue24638@psf.upfronthosting.co.za> Message-ID: <1556897730.5.0.259795032395.issue24638@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 4737b923df6fbdb9e2bf3fdccea2112270556e0a by Andrew Svetlov (Zackery Spytz) in branch 'master': bpo-24638: Improve the error message in asyncio.ensure_future() (#12848) https://github.com/python/cpython/commit/4737b923df6fbdb9e2bf3fdccea2112270556e0a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 11:35:41 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 03 May 2019 15:35:41 +0000 Subject: [issue24638] asyncio "loop argument must agree with future" error message could be improved In-Reply-To: <1436967590.12.0.584324642332.issue24638@psf.upfronthosting.co.za> Message-ID: <1556897741.53.0.669072047153.issue24638@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 11:35:54 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 03 May 2019 15:35:54 +0000 Subject: [issue36613] asyncio._wait() don't remove callback in case of exception In-Reply-To: <1555072688.4.0.270726893934.issue36613@roundup.psfhosted.org> Message-ID: <1556897754.98.0.0661975667135.issue36613@roundup.psfhosted.org> miss-islington added the comment: New changeset 769ac7e7b809dfc60abd0d7e6f020c6ffe06a6c0 by Miss Islington (bot) in branch '3.7': bpo-36613: call remove_done_callback if exception (GH-12800) https://github.com/python/cpython/commit/769ac7e7b809dfc60abd0d7e6f020c6ffe06a6c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 12:02:20 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 03 May 2019 16:02:20 +0000 Subject: [issue35947] Update libffi_msvc to current version of libffi In-Reply-To: <1549665646.45.0.12391127948.issue35947@roundup.psfhosted.org> Message-ID: <1556899340.78.0.56743909707.issue35947@roundup.psfhosted.org> Change by Paul Monson : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 12:02:33 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 03 May 2019 16:02:33 +0000 Subject: [issue36509] Add iot layout for windows iot containers In-Reply-To: <1554224379.78.0.511205388496.issue36509@roundup.psfhosted.org> Message-ID: <1556899353.8.0.502779462772.issue36509@roundup.psfhosted.org> Change by Paul Monson : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 12:04:07 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 03 May 2019 16:04:07 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1556899447.31.0.174873015333.issue36782@roundup.psfhosted.org> Paul Ganssle added the comment: This ticket should be reserved for the mentored sprint. ---------- assignee: -> Mariatta nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 12:04:30 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 03 May 2019 16:04:30 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1556899470.6.0.608578870554.issue36783@roundup.psfhosted.org> Paul Ganssle added the comment: This ticket should be reserved for the mentored sprint. ---------- assignee: docs at python -> Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 12:43:29 2019 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 May 2019 16:43:29 +0000 Subject: [issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll In-Reply-To: <1365444634.63.0.621793850181.issue17667@psf.upfronthosting.co.za> Message-ID: <1556901809.55.0.110309775778.issue17667@roundup.psfhosted.org> Change by Zachary Ware : Removed file: https://bugs.python.org/file48296/27409.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 12:44:31 2019 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 May 2019 16:44:31 +0000 Subject: [issue27409] List socket.SO_*, SCM_*, MSG_*, IPPROTO_* symbols In-Reply-To: <1467168896.94.0.840314714269.issue27409@psf.upfronthosting.co.za> Message-ID: <1556901871.65.0.0313303785807.issue27409@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg341325 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 12:53:26 2019 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 03 May 2019 16:53:26 +0000 Subject: [issue33882] doc Mention breakpoint() in debugger-related FAQ In-Reply-To: <1529192953.25.0.56676864532.issue33882@psf.upfronthosting.co.za> Message-ID: <1556902406.98.0.871818082795.issue33882@roundup.psfhosted.org> ?ric Araujo added the comment: New changeset cf48e55f7f7718482fa712552f0cbc0aea1c826f by ?ric Araujo (Andre Delfino) in branch 'master': bpo-33882: mention breakpoint() in debugger-related FAQ (GH-7759) https://github.com/python/cpython/commit/cf48e55f7f7718482fa712552f0cbc0aea1c826f ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 12:53:40 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 03 May 2019 16:53:40 +0000 Subject: [issue33882] doc Mention breakpoint() in debugger-related FAQ In-Reply-To: <1529192953.25.0.56676864532.issue33882@psf.upfronthosting.co.za> Message-ID: <1556902420.47.0.950685663055.issue33882@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +12991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 14:28:21 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 May 2019 18:28:21 +0000 Subject: [issue36785] Implement PEP 574 Message-ID: <1556908101.83.0.107763193732.issue36785@roundup.psfhosted.org> New submission from Antoine Pitrou : Now that PEP 574 (Pickle protocol 5 with out-of-band data) has been accepted, it should be implemented. ---------- components: Extension Modules, Library (Lib) messages: 341349 nosy: ncoghlan, pitrou priority: normal severity: normal stage: needs patch status: open title: Implement PEP 574 type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 14:37:08 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 May 2019 18:37:08 +0000 Subject: [issue36786] "make install" should run compileall in parallel Message-ID: <1556908628.98.0.810004261153.issue36786@roundup.psfhosted.org> New submission from Antoine Pitrou : Title says it all. Currently, "make install" will bytecode-compile Python sources sequentially even though compileall supports doing it in parallel. ---------- components: Build messages: 341350 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: "make install" should run compileall in parallel type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 14:50:44 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 May 2019 18:50:44 +0000 Subject: [issue36785] Implement PEP 574 In-Reply-To: <1556908101.83.0.107763193732.issue36785@roundup.psfhosted.org> Message-ID: <1556909444.32.0.473006003954.issue36785@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- keywords: +patch pull_requests: +12992 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 14:55:39 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 May 2019 18:55:39 +0000 Subject: [issue36785] Implement PEP 574 In-Reply-To: <1556908101.83.0.107763193732.issue36785@roundup.psfhosted.org> Message-ID: <1556909739.03.0.896262060747.issue36785@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- assignee: -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 14:58:21 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 03 May 2019 18:58:21 +0000 Subject: [issue28238] In xml.etree.ElementTree findall() can't search all elements in a namespace In-Reply-To: <1474461492.99.0.941056742104.issue28238@psf.upfronthosting.co.za> Message-ID: <1556909901.29.0.98670002407.issue28238@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 47541689ccea79dfcb055c6be5800b13fcb6bdd2 by Stefan Behnel in branch 'master': bpo-28238: Implement "{*}tag" and "{ns}*" wildcard tag selection support for ElementPath, and extend the surrounding tests and docs. (GH-12997) https://github.com/python/cpython/commit/47541689ccea79dfcb055c6be5800b13fcb6bdd2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 14:59:05 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 03 May 2019 18:59:05 +0000 Subject: [issue28238] In xml.etree.ElementTree findall() can't search all elements in a namespace In-Reply-To: <1474461492.99.0.941056742104.issue28238@psf.upfronthosting.co.za> Message-ID: <1556909945.12.0.647924149914.issue28238@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 15:02:01 2019 From: report at bugs.python.org (Eryk Sun) Date: Fri, 03 May 2019 19:02:01 +0000 Subject: [issue35148] cannot activate a venv environment on a Swiss German windows In-Reply-To: <1541176783.96.0.788709270274.issue35148@psf.upfronthosting.co.za> Message-ID: <1556910121.72.0.978707885278.issue35148@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> venv activate.bat reset codepage fails on windows 10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 15:09:26 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 May 2019 19:09:26 +0000 Subject: [issue36786] "make install" should run compileall in parallel In-Reply-To: <1556908628.98.0.810004261153.issue36786@roundup.psfhosted.org> Message-ID: <1556910566.85.0.297021112009.issue36786@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- keywords: +patch pull_requests: +12993 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 15:22:03 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 03 May 2019 19:22:03 +0000 Subject: [issue32309] Implement asyncio.run_in_executor shortcut In-Reply-To: <1513194861.88.0.213398074469.issue32309@psf.upfronthosting.co.za> Message-ID: <1556911323.77.0.733439136682.issue32309@roundup.psfhosted.org> Andrew Svetlov added the comment: In Python 3.7 loop.run_in_executor() is the only user-faced method that requires a loop. asyncio.ThreadPool() sounds great. Maybe thread group can provide better api. But for Python 3.8 adding `run_in_executor` top-level function looks the only easy and obvious way to help people getting rid of explicit loop usage. Yuri, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 15:23:08 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 03 May 2019 19:23:08 +0000 Subject: [issue14440] Close background process if IDLE closes abnormally. In-Reply-To: <1333027712.59.0.103811521392.issue14440@psf.upfronthosting.co.za> Message-ID: <1556911388.62.0.29908231531.issue14440@roundup.psfhosted.org> Andrew Svetlov added the comment: outdated ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 15:34:02 2019 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 03 May 2019 19:34:02 +0000 Subject: [issue36758] configured libdir not correctly passed to Python executable In-Reply-To: <1556622948.14.0.900799269401.issue36758@roundup.psfhosted.org> Message-ID: <1556912042.15.0.37189605777.issue36758@roundup.psfhosted.org> Xavier de Gaye added the comment: I can reproduce the problem. The Makefile uses LIBDIR as set by configure to install the libraries and this is not consistent with Modules/getpath.c that finds the locations of the libraries (see the detailed comments at the top of the source file) without searching for LIBDIR. The work around is to use PYTHONHOME. Michael is right and ./configure should at least issue a warning when --libdir is used. ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 16:30:35 2019 From: report at bugs.python.org (Gawain Bolton) Date: Fri, 03 May 2019 20:30:35 +0000 Subject: [issue36787] Python3 regresison: String formatting of None object Message-ID: <1556915435.58.0.661540149736.issue36787@roundup.psfhosted.org> New submission from Gawain Bolton : Python 2.7.16 (default, Apr 6 2019, 01:42:57) [GCC 8.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print('{:^10}'.format(None)) None However this does not work with Python3: Python 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> print('{:^10}'.format(None)) Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to NoneType.__format__ Given that the None type is output as a string, it makes sense for string formatting options to be usable with it. It also makes code less fragile and avoids having to write special cases for when values could be None. ---------- components: Library (Lib) messages: 341355 nosy: Gawain Bolton priority: normal severity: normal status: open title: Python3 regresison: String formatting of None object type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 16:35:17 2019 From: report at bugs.python.org (Gawain Bolton) Date: Fri, 03 May 2019 20:35:17 +0000 Subject: [issue36787] Python3 regresison: String formatting of None object In-Reply-To: <1556915435.58.0.661540149736.issue36787@roundup.psfhosted.org> Message-ID: <1556915717.36.0.819891548126.issue36787@roundup.psfhosted.org> Gawain Bolton added the comment: Note: I have a patch which fixes this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 16:50:24 2019 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 May 2019 20:50:24 +0000 Subject: [issue36787] Python3 regresison: String formatting of None object In-Reply-To: <1556915435.58.0.661540149736.issue36787@roundup.psfhosted.org> Message-ID: <1556916624.81.0.0971057919994.issue36787@roundup.psfhosted.org> Zachary Ware added the comment: You can use `!s` to be sure that the object is a string: >>> '{!s:^10}'.format(None) ' None ' I think it's unlikely the behavior of NoneType.__format__ will be changed, but I'm adding Eric Smith to make that determination as the maintainer of str.format. See issue7994 for the background on the change that produced this behavior. ---------- nosy: +eric.smith, zach.ware versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 17:27:43 2019 From: report at bugs.python.org (Roundup Robot) Date: Fri, 03 May 2019 21:27:43 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1556918863.33.0.184020929953.issue34155@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +12994 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 17:50:00 2019 From: report at bugs.python.org (TheComet) Date: Fri, 03 May 2019 21:50:00 +0000 Subject: [issue36788] Add clamp() function to builtins Message-ID: <1556920200.45.0.0628062537563.issue36788@roundup.psfhosted.org> New submission from TheComet : It would be nice to have a clamp() builtin in addition to min() and max() so one can type e.g. "clamp(value, 2, 5)" instead of having to type "min(max(value, 5), 2)". ---------- components: Library (Lib) messages: 341358 nosy: TheComet priority: normal severity: normal status: open title: Add clamp() function to builtins type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 17:56:59 2019 From: report at bugs.python.org (TheComet) Date: Fri, 03 May 2019 21:56:59 +0000 Subject: [issue36788] Add clamp() function to builtins In-Reply-To: <1556920200.45.0.0628062537563.issue36788@roundup.psfhosted.org> Message-ID: <1556920619.95.0.408111049145.issue36788@roundup.psfhosted.org> TheComet added the comment: I have implemented it on my branch here: https://github.com/TheComet/cpython/blob/fix-issue-36788/Python/bltinmodule.c It still needs further testing and I haven't leak checked it properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 18:00:15 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 03 May 2019 22:00:15 +0000 Subject: [issue36787] Python3 regresison: String formatting of None object In-Reply-To: <1556915435.58.0.661540149736.issue36787@roundup.psfhosted.org> Message-ID: <1556920815.34.0.124310028015.issue36787@roundup.psfhosted.org> Eric V. Smith added the comment: This behavior isn't going to change. As Zach says, if you want to convert any value to a string, use !s. We want to fail as soon as possible: if a class (such as NoneType) doesn't implement __format__, then trying to format an instance with a format spec that doesn't apply to it should be an error. If you want to support strings or None, then it's your job to ensure the conversion. As issue7994 says, one of the big drivers of this change (I'll argue it's really a bugfix) was that you could never add __format__ to class if it didn't previously have one. Or if you did, it would have to support at least the string format spec, since there might be code that formatted it with "^10", for example. As things currently stand, we could add __format__ to NoneType and have "T/F" mean convert to "True" or "False". If NoneTypes were already format-able with "^10", this change wouldn't be possible. ---------- assignee: -> eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 18:32:38 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 03 May 2019 22:32:38 +0000 Subject: [issue36788] Add clamp() function to builtins In-Reply-To: <1556920200.45.0.0628062537563.issue36788@roundup.psfhosted.org> Message-ID: <1556922758.44.0.507886615168.issue36788@roundup.psfhosted.org> Steven D'Aprano added the comment: I doubt this is important enough to go into builtins, the only practical use-case I know of for this function is with numbers, so this could go in the math module. But putting that aside, there are some other problems: - it isn't clear that clamp() is meaningful for anything that could possibly need a key function; - the behaviour you have for iterable arguments is inconsistent with the existing behaviour of min(max(x, a), b): min(max('a string', 'd'), 'm') => returns 'd' not ['d', 'd', 'm', 'm', 'm', 'i', 'm', 'g'] - your iterable behaviour is easily done with a comprehension and doesn't need to be supported by the function itself [clamp(x, a, b) for x in values] - what do you intend clamp() to do with NAN arguments? - for numbers, it is sometimes useful to do one-sided clamping, e.g. clamp(x, -1, ?). You should read over this thread here: https://mail.python.org/pipermail/python-ideas/2016-July/041262.html ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 19:57:59 2019 From: report at bugs.python.org (jpic) Date: Fri, 03 May 2019 23:57:59 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1556918863.35.0.261968400893.issue34155@roundup.psfhosted.org> Message-ID: jpic added the comment: I haven't found this specific case in an RFC, but checked Go's net/mail library behavior and it just considers it broken: $ cat mail.go package main import "fmt" import "net/mail" func main() { fmt.Println((&mail.AddressParser{}).Parse("a at example.com")) fmt.Println((&mail.AddressParser{}).Parse("a at malicious.org@example.com ")) } $ go run mail.go mail: expected single address, got "@example.com" That would fix the security issue but not the whole ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 20:00:17 2019 From: report at bugs.python.org (mbiggs) Date: Sat, 04 May 2019 00:00:17 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes Message-ID: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> New submission from mbiggs : In the Unicode HOWTO: http://docs.python.org/3.3/howto/unicode.html It says the following: "UTF-8 has several convenient properties: (...) 2. A Unicode string is turned into a sequence of bytes containing no embedded zero bytes. This avoids byte-ordering issues, and means UTF-8 strings can be processed by C functions such as strcpy() and sent through protocols that can?t handle zero bytes." This is not right. UTF-8 uses the zero byte to represent the Unicode codepoint U+0000 (the ASCII NULL character). This is a valid character in UTF-8 and is handled just fine by python's UTF-8 string encoding/decoding. ---------- assignee: docs at python components: Documentation messages: 341363 nosy: docs at python, mbiggs priority: normal severity: normal status: open title: Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 20:06:45 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 04 May 2019 00:06:45 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes In-Reply-To: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> Message-ID: <1556928405.4.0.629187646124.issue36789@roundup.psfhosted.org> Andrew Svetlov added the comment: This is right for 99.99% cases: utf8 doesn't encode any character except explicit zero with zero bytes. UTF-16 for example encodes 'a' as b'\xff\xfea\x00' ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 20:10:11 2019 From: report at bugs.python.org (Alexander Riccio) Date: Sat, 04 May 2019 00:10:11 +0000 Subject: [issue36790] test_asyncio fails with application verifier! Message-ID: <1556928611.19.0.664021052346.issue36790@roundup.psfhosted.org> New submission from Alexander Riccio : I compiled PCBuild Debug x64 from an updated clone of upstream, and when running the testsuite under Application Verifier with handle verification, the test triggers an invalid handle access by passing an invalid overlapped handle to CancelIoEx with this code: Py_CancelIoEx(self->handle, &self->overlapped) (where self->handle appears to be the offending variable). I have no idea who's calling _overlapped.cancel, and a quick spelunking through the codebase only confuses me more. ---------- components: Tests files: python_test_invalid_handle_failure.TXT messages: 341365 nosy: Alexander Riccio priority: normal severity: normal status: open title: test_asyncio fails with application verifier! versions: Python 3.8 Added file: https://bugs.python.org/file48298/python_test_invalid_handle_failure.TXT _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 20:13:49 2019 From: report at bugs.python.org (Alexander Riccio) Date: Sat, 04 May 2019 00:13:49 +0000 Subject: [issue36790] test_asyncio fails with application verifier! In-Reply-To: <1556928611.19.0.664021052346.issue36790@roundup.psfhosted.org> Message-ID: <1556928829.66.0.814814049903.issue36790@roundup.psfhosted.org> Alexander Riccio added the comment: Hmm, proceeding a bit further pointed to finish_recv in windows_events.py ---------- Added file: https://bugs.python.org/file48299/python_invalid_handle.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 20:19:06 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 04 May 2019 00:19:06 +0000 Subject: [issue36790] test_asyncio fails with application verifier! In-Reply-To: <1556928611.19.0.664021052346.issue36790@roundup.psfhosted.org> Message-ID: <1556929146.58.0.411229581649.issue36790@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 21:10:58 2019 From: report at bugs.python.org (jpic) Date: Sat, 04 May 2019 01:10:58 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: Message-ID: jpic added the comment: The pull request has been updated to mimic net/mail's behavior rather than trying to workaround user input. Before: >>> email.message_from_string('From: a at malicious.org@important.com', policy=email.policy.default)['from'].addresses (Address(display_name='', username='a', domain='malicious.org'),) >>> parseaddr('a at malicious.org@important.com') ('', 'a at malicious.org') After: >>> email.message_from_string('From: a at malicious.org@important.com', policy=email.policy.default)['from'].addresses (Address(display_name='', username='', domain=''),) >>> parseaddr('a at malicious.org@important.com') ('', 'a@') I like what I saw under the hood, please feel free to hack me for other tasks in the email stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 21:27:55 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 04 May 2019 01:27:55 +0000 Subject: [issue33777] dummy_threading: .is_alive method returns True after execution has completed In-Reply-To: <1528250405.09.0.592728768989.issue33777@psf.upfronthosting.co.za> Message-ID: <1556933275.6.0.144381807096.issue33777@roundup.psfhosted.org> Jeffrey Kintscher added the comment: This behavior still exists in 3.7.3: Python 3.7.3 (default, May 1 2019, 00:00:47) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from dummy_threading import Thread >>> def f(): print('foo') ... >>> t = Thread(target=f) >>> t.start() foo >>> t.is_alive() True >>> t.join() >>> t.is_alive() False It is inconsistent with the threading module behavior (which matches the 2.x behavior): Python 3.7.3 (default, May 1 2019, 00:00:47) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from threading import Thread >>> def f(): print('foo') ... >>> t = Thread(target=f) >>> t.start() foo >>> t.is_alive() False >>> t.join() >>> t.is_alive() False I would classify this as a bug since the documentation claims the dummy_threading module is supposed to be a drop-in replacement for the threading module. ---------- nosy: +websurfer5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 21:39:49 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 04 May 2019 01:39:49 +0000 Subject: [issue33777] dummy_threading: .is_alive method returns True after execution has completed In-Reply-To: <1528250405.09.0.592728768989.issue33777@psf.upfronthosting.co.za> Message-ID: <1556933989.7.0.415917517056.issue33777@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I also see inconsistent behaviorbetween the enumerate() functions in threading and dummy_threading: Python 3.7.3 (default, May 1 2019, 00:00:47) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from threading import Thread >>> from threading import enumerate >>> enumerate() [<_MainThread(MainThread, started 4618048960)>] >>> def f(): print('foo') ... >>> t = Thread(target=f) >>> enumerate() [<_MainThread(MainThread, started 4618048960)>] >>> t.start() foo >>> enumerate() [<_MainThread(MainThread, started 4618048960)>] >>> t.is_alive() False >>> enumerate() [<_MainThread(MainThread, started 4618048960)>] >>> t.join() >>> enumerate() [<_MainThread(MainThread, started 4618048960)>] Python 3.7.3 (default, May 1 2019, 00:00:47) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from dummy_threading import Thread >>> from dummy_threading import enumerate >>> enumerate() [<_MainThread(MainThread, started 1)>] >>> def f(): print('foo') ... >>> t = Thread(target=f) >>> enumerate() [<_MainThread(MainThread, started 1)>] >>> t.start() foo >>> enumerate() [] >>> t.is_alive() True >>> enumerate() [] >>> t.join() >>> enumerate() [<_DummyThread(Dummy-2, started daemon 1)>] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 3 22:16:20 2019 From: report at bugs.python.org (Windson Yang) Date: Sat, 04 May 2019 02:16:20 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1556936180.55.0.64812418912.issue34155@roundup.psfhosted.org> Windson Yang added the comment: Frome the answer from Alnitak (https://stackoverflow.com/questions/12355858/how-many-symbol-can-be-in-an-email-address). Maybe we should raise an error when the address has multiple @ in it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 00:23:06 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 04 May 2019 04:23:06 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556809637.83.0.771384876964.issue36774@roundup.psfhosted.org> Message-ID: <20190504042259.GF5010@ando.pearwood.info> Steven D'Aprano added the comment: > Steven: We shouldn't block this immediately useful feature from going > in for f-strings on waiting for some much broader first class access > to expressions feature. !d would be practical today. I hear you, and after giving it much more thought I agree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 00:26:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 May 2019 04:26:34 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556863938.04.0.596945520549.issue36778@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: cp65001 is *not* utf-8: Microsoft decided to handle surrogates differently for some reasons. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 01:45:38 2019 From: report at bugs.python.org (Tom Hale) Date: Sat, 04 May 2019 05:45:38 +0000 Subject: [issue36656] Allow os.symlink(src, target, force=True) to prevent race conditions In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1556948738.21.0.425089349934.issue36656@roundup.psfhosted.org> Tom Hale added the comment: Yes, but by default (because of difficulty) people won't check for this case: 1. I delete existing symlink in order to recreate it 2. Attacker watching symlink finds it deleted and recreates it 3. I try to create symlink, and an unexpected exception is raised ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 01:54:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 May 2019 05:54:49 +0000 Subject: [issue36791] sum() relies on C signed overflow behaviour Message-ID: <1556949289.05.0.226850923115.issue36791@roundup.psfhosted.org> New submission from Serhiy Storchaka : sum() assumes that an arithmetic operation on signed longs will wrap modulo 2**(bits_in_long) on overflow. However, signed overflow causes undefined behaviour according to the C standards (e.g., C99 6.5, para. 5), and gcc is known to assume that signed overflow never occurs in correct code, and to make use of this assumption when optimizing. See also issue7406. ---------- components: Interpreter Core messages: 341374 nosy: mark.dickinson, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: sum() relies on C signed overflow behaviour type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 01:57:28 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 May 2019 05:57:28 +0000 Subject: [issue36791] sum() relies on C signed overflow behaviour In-Reply-To: <1556949289.05.0.226850923115.issue36791@roundup.psfhosted.org> Message-ID: <1556949448.16.0.757659802301.issue36791@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +12995 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 02:10:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 04 May 2019 06:10:23 +0000 Subject: [issue36784] __import__ with empty folder after importlib.invalidate_caches causes reference leak In-Reply-To: <1556892175.48.0.910434484078.issue36784@roundup.psfhosted.org> Message-ID: <1556950223.47.0.95002157381.issue36784@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Interesting, I used tracemalloc to see if it helps and it gave me a line in Lib/tempfile.py . Supplying path to support.temp_dir(path="/tmp/") causes random directory code was not to be hit and there was no memory leak. So I removed the _Random() initialization in _RandomNameSequence in Lib/tempfile.py and instead of self._rng.choice I used random.choice and still had the leak. I replaced the code to generate random letters letters = [choose(c) for dummy in range(8)] where choose is random.choice with c = "a" and the memory leak stopped. I tried below combinations at line [0] and ran test to see if the memory leaks. I also tried -R 10:10 just to make sure my limits are higher enough. Using random.shuffle on a set of characters also causes leak. I am not sure why a combination of importlib.invalidate_caches, support.temp_dir using tempfile and __import__ causes these leaks or perhaps I am debugging or using huntrleaks in an incorrect manner. # No leak letters = [choose("a") for dummy in range(8)] letters = ["a" for dummy in range(8)] letters = [choose(self.characters[0]) for dummy in range(8)] # Memory leak letters = [choose("ab") for dummy in range(8)] letters = [choose(self.characters[:]) for dummy in range(8)] letters = [choose(list(self.characters)) for dummy in range(8)] # Below also leaks characters = list("abcde") # list("abcd") doesn't leak self.rng.shuffle(characters) letters = characters[:8] from unittest import TestCase import tracemalloc import sys import os from test import support def test_importlib_cache_tempdir(): import importlib importlib.invalidate_caches() with support.temp_dir() as path: # with support.temp_dir(path="/tmp") as path: (no leak) dirname = os.path.dirname(path) basename = os.path.basename(path) os.mkdir(os.path.join(path, 'test2')) with support.DirsOnSysPath(dirname): __import__(f"{basename}.test2".format(basename=basename)) class Tests(TestCase): def test_bug(self): tracemalloc.start() for _ in range(10): test_importlib_cache_tempdir() snapshot = tracemalloc.take_snapshot() top_stats = snapshot.statistics('traceback') print("[ Top 10 ]") for stat in top_stats[:10]: for line in stat.traceback.format(): print(line) $ ./python.exe -m test -R 3:3 test_import_bug_tempdir Run tests sequentially 0:00:00 load avg: 2.55 [1/1] test_import_bug_tempdir beginning 6 repetitions 123456 [ Top 10 ] File "", line 1486 File "", line 1461 File "", line 1469 File "", line 683 File "", line 509 File "", line 1378 File "", line 344 File "", line 36 File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/tempfile.py", line 136 self._rng = _Random() File "", line 1342 .[ Top 10 ] File "", line 1486 File "", line 1461 File "", line 1469 File "", line 683 File "", line 509 File "", line 344 File "", line 36 File "", line 64 File "", line 1342 File "", line 1378 .[ Top 10 ] File "", line 1486 File "", line 1461 File "", line 1469 File "", line 683 File "", line 509 File "", line 344 File "", line 36 File "", line 64 File "", line 1342 File "", line 1132 .[ Top 10 ] File "", line 1486 File "", line 1461 File "", line 1469 File "", line 509 File "", line 683 File "", line 344 File "", line 36 File "", line 64 File "", line 1342 File "", line 1132 .[ Top 10 ] File "", line 1486 File "", line 1461 File "", line 1469 File "", line 509 File "", line 683 File "", line 344 File "", line 36 File "", line 64 File "", line 1342 File "", line 1132 .[ Top 10 ] File "", line 1486 File "", line 1461 File "", line 1469 File "", line 509 File "", line 683 File "", line 344 File "", line 36 File "", line 64 File "", line 1342 File "", line 1132 . test_import_bug_tempdir leaked [980, 980, 980] references, sum=2940 test_import_bug_tempdir leaked [370, 370, 370] memory blocks, sum=1110 test_import_bug_tempdir failed == Tests result: FAILURE == 1 test failed: test_import_bug_tempdir Total duration: 3 sec 254 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 02:44:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 May 2019 06:44:36 +0000 Subject: [issue36656] Allow os.symlink(src, target, force=True) to prevent race conditions In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1556952276.72.0.178465568067.issue36656@roundup.psfhosted.org> Serhiy Storchaka added the comment: So what? Detected problem is better than non-detected problem. If and unexpected exception causes troubles in your code, it is up to you what to do with it: silence it, terminate an application, try to recreate a symlink in other place, etc. In any case this will not solve bigger problem that you have: attacker is able to change your symlinks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 03:35:12 2019 From: report at bugs.python.org (Eryk Sun) Date: Sat, 04 May 2019 07:35:12 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1556955312.8.0.837007007732.issue36778@roundup.psfhosted.org> Eryk Sun added the comment: > cp65001 is *not* utf-8: Microsoft decided to handle surrogates > differently for some reasons. Do you mean valid UTF-16 surrogate pairs? For example: >>> codecs.code_page_encode(65001, '\ud800\udc00') (b'\xf0\x90\x80\x80', 2) PyUnicode_AsUnicodeAndSize is neutral about storing surrogate codes in a 16-bit wchar_t string. In particular, the Python string in this case contains two surrogate codes, but they're passed to WideCharToMultiByte as a UTF-16 surrogate pair for the single character U+10000. Anyway, it seems to me this issue will be resolved if cp65001.py is rewritten without functools.partial. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 04:40:31 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 04 May 2019 08:40:31 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556959231.13.0.702524514521.issue36774@roundup.psfhosted.org> Eric V. Smith added the comment: Serhiy's point about how special this is is very valid. It's so special that I can't figure out where to document it. f-strings are really only documented in Doc/reference/lexical_analysis.rst, and !d details, especially the format/repr distinction, seems like too much information for that document. But I could be wrong about that. And since this feature can't be used in str.format(), it can't be documented in Doc/library/string.rst. In fact, it should contain a note about !d not applying. Rather than make the documentation worse, I think I'll just open a separate issue for it when I commit this. Maybe someone else will have some ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 07:52:52 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 04 May 2019 11:52:52 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1556970772.05.0.649953662623.issue36774@roundup.psfhosted.org> Eric V. Smith added the comment: And for those who *really* want to be able to apply a format spec to the result of the entire !d expression, you can always use nested f-strings: >>> for x in [3.1415, 0.5772156649, 100]: ... print(f'{f"{x!d:.1f}":*^20}') ... *******x=3.1******** *******x=0.6******** ******x=100.0******* Not that I recommend this, but at least it's possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 08:33:18 2019 From: report at bugs.python.org (Charlie Clark) Date: Sat, 04 May 2019 12:33:18 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set Message-ID: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> New submission from Charlie Clark : Based on a bug report (https://bitbucket.org/openpyxl/openpyxl/issues/1266/locale) from a user of the openpyxl library I've identified a bug in the zipfile module that causes the Python process to crash on Windows. Currently tested with Python 3.7.3 (32-bit on Windows 10). Sample code import faulthandler import locale from zipfile import ZipFile faulthandler.enable() locale.setlocale(locale.LC_ALL, 'de_DE') out = open("out.zip", "wb") archive = ZipFile(out, "w") archive.writestr("properties.xml", b"") faulthandler fingers line 1757 as the culprit but running this line locally does not cause the crash. The issue seems to be limited to Windows. ---------- components: Interpreter Core, Windows messages: 341380 nosy: CharlieClark, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: zipfile.writestr causes a Python crash on Windows if the locale is set versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 09:02:09 2019 From: report at bugs.python.org (jpic) Date: Sat, 04 May 2019 13:02:09 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1556936180.55.0.64812418912.issue34155@roundup.psfhosted.org> Message-ID: jpic added the comment: At is allowed in the local part if quoted, the proposed patch acts within get_domain() and getdomain() and does not affect local part parsing. This still works: >>> parseaddr('"fo at bar"@bar.com') ('', '"fo at bar"@bar.com') >>> email.message_from_string('From: "a at b"@ex.com ',policy=email.policy.default)['from'].addresses (Address(display_name='', username='a at b', domain='ex.com'),) I'm not against raising an exception in parseaddr, but you should know that currently nothing in parseaddr seems to raise an exception: jpic at ci:~/cpython$ grep raise Lib/email/_parseaddr.py jpic at ci:~/cpython$ For example: >>> parseaddr('aoeu') ('', 'aoeu') >>> parseaddr('a@') ('', 'a@') None of the above calls raised an exception. That is the reason why I did not introduce a new Exception in the getdomain() change: I thought it would be more consistent with the rest of the API as such. As for the new API, the patch does raise a parse error: # this detect that the next caracter right after the parsed domain is another @ if value and value[0] == '@': raise errors.HeaderParseError('Multiple domains') But that's in the lower level API that is planned for going public later on (probably when it will have unit tests), it's just the higher level API that the user faces that swallows it. As a user you can still know about that parse problem using the defects attribute: >>> email.message_from_string('From: a at malicious.org@example.com', policy=email.policy.default)['from'].defects[0] InvalidHeaderDefect('invalid address in address-list') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 09:10:24 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 May 2019 13:10:24 +0000 Subject: [issue36793] Do not set tp_str Message-ID: <1556975423.86.0.374987997006.issue36793@roundup.psfhosted.org> New submission from Serhiy Storchaka : object.__str__() calls the __repr__() method. Therefore by default you do not need to define the __str__() method if it is the same as __repr__(): just define the __repr__() method. But there are few builtin classes which define both __repr__() and __str__() methods which are equal. In most cases this is a legacy of Python 2 where they where different. 1. float and complex. In earlier Python 2 versions the repr of floating point number was longer (and more precise) that the str which was limited for readability. This was changed several times and in Python 3 the repr and the str are equal and contain as much digits as needed for the closest decimal approximation. 2. int. In Python 2 the repr of long integer was different from the str: it contained the "L" suffix. 3. bool. Since it is an int subclass with different repr, it needs to define __str__ to override int's __str__. 4. subprocess.Handle and sre_constants._NamedIntConstant. As bool they need to override int's __str__. 5. doctest.DocTestCase, doctest.DocFileCase. They need to override unittest.TestCase's __str__. 6. http.client.IncompleteRead, xmlrpc.client.Error. They need to override BaseException's __str__ (don't know why they want to do this). 7. asyncore.dispatcher, email.charset.Charset, logging.LogRecord, xmlrpc.client.MultiCall, xmlrpc.client.ServerProxy, decimal.Context (C implementation only), _pydecimal._WorkRep. There is no need to define __str__. In most of these cases the __str__ definition is redundant and can be removed. In cases 5 and 6 it is better to reset __str__ to object.__str__. The only failing tests in the Python testsuite is the json module test. The json module calls int.__str__ explicitly. It can be fixed by replacing it with int.__repr__. The user visible effect of these changes is that defining __repr__ in a subclass of these classes will affect the str() result (as for most of other classes). Although it is unlikely that you want to keep the str representation of the parent class when change the repr in the child class. ---------- components: Interpreter Core messages: 341382 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Do not set tp_str versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 09:21:30 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 May 2019 13:21:30 +0000 Subject: [issue36793] Do not set tp_str In-Reply-To: <1556975423.86.0.374987997006.issue36793@roundup.psfhosted.org> Message-ID: <1556976090.74.0.0582872158835.issue36793@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +12996 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 09:22:28 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 May 2019 13:22:28 +0000 Subject: [issue36793] Do not define unneeded __str__ equal to __repr__ In-Reply-To: <1556975423.86.0.374987997006.issue36793@roundup.psfhosted.org> Message-ID: <1556976148.78.0.327288059511.issue36793@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- title: Do not set tp_str -> Do not define unneeded __str__ equal to __repr__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 09:25:05 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 May 2019 13:25:05 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1556976305.32.0.723603940406.issue36792@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 09:36:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 May 2019 13:36:42 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1556977002.14.0.737068281297.issue36778@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think it is better to just make the check in the test conditional. It already contains some macOs specific conditions. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 09:52:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 May 2019 13:52:41 +0000 Subject: [issue36791] sum() relies on C signed overflow behaviour In-Reply-To: <1556949289.05.0.226850923115.issue36791@roundup.psfhosted.org> Message-ID: <1556977961.32.0.716286576576.issue36791@roundup.psfhosted.org> Serhiy Storchaka added the comment: I tested few cases (all positive, all negative, mixed), and did not found any performance difference after this change. ./python -m perf timeit -s "a = list(range(10**4))" -- "sum(a)" ./python -m perf timeit -s "a = [-i for i in range(10**4)]" -- "sum(a)" ./python -m perf timeit -s "a = [i*(-1)**i for i in range(10**4)]" -- "sum(a)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 10:20:06 2019 From: report at bugs.python.org (Mikhail Gerasimov) Date: Sat, 04 May 2019 14:20:06 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 Message-ID: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> New submission from Mikhail Gerasimov : Compare: https://docs.python.org/3.6/library/asyncio-sync.html#asyncio.Lock https://docs.python.org/3.8/library/asyncio-sync.html#asyncio.Lock First version is much more detailed. It allows to avoid confusions like one with unlocking order: https://stackoverflow.com/q/55951233/1113207 ---------- assignee: docs at python components: Documentation, asyncio messages: 341385 nosy: asvetlov, docs at python, germn, yselivanov priority: normal severity: normal status: open title: asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 11:27:13 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 May 2019 15:27:13 +0000 Subject: [issue26978] Implement pathlib.Path.link (Using os.link) In-Reply-To: <1556420459.86.0.258434208738.issue26978@roundup.psfhosted.org> Message-ID: <1556983633.4.0.00863882984894.issue26978@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 6b5b013bcc22a27d6231c2796882e44ddb42be67 by Antoine Pitrou (Joannah Nanjekye) in branch 'master': bpo-26978: Implement pathlib.Path.link_to (Using os.link) (GH-12990) https://github.com/python/cpython/commit/6b5b013bcc22a27d6231c2796882e44ddb42be67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 11:27:24 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 May 2019 15:27:24 +0000 Subject: [issue26978] Implement pathlib.Path.link (Using os.link) In-Reply-To: <1556420459.86.0.258434208738.issue26978@roundup.psfhosted.org> Message-ID: <1556983644.73.0.875674851575.issue26978@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 11:34:53 2019 From: report at bugs.python.org (Daniel Wallace) Date: Sat, 04 May 2019 15:34:53 +0000 Subject: [issue34038] urllib2.urlopen fails if http_proxy(s) is set to a sock5 proxy In-Reply-To: <1530678835.56.0.56676864532.issue34038@psf.upfronthosting.co.za> Message-ID: <1556984093.16.0.127094086649.issue34038@roundup.psfhosted.org> Daniel Wallace added the comment: I think this is caused by the fact that socks5 proxies are not supported? $ cat ~/issue34038.py from urllib.request import urlopen, HTTPError url = 'http://icanhazip.com' u = urlopen(url) $./python.exe ~/issue34038.py Traceback (most recent call last): File "/Users/dwallace/issue34038.py", line 4, in u = urlopen(url) File "/Users/dwallace/workspace/cpython/Lib/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/Users/dwallace/workspace/cpython/Lib/urllib/request.py", line 524, in open response = self._open(req, data) File "/Users/dwallace/workspace/cpython/Lib/urllib/request.py", line 541, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/Users/dwallace/workspace/cpython/Lib/urllib/request.py", line 502, in _call_chain result = func(*args) File "/Users/dwallace/workspace/cpython/Lib/urllib/request.py", line 804, in meth(r, proxy, type)) File "/Users/dwallace/workspace/cpython/Lib/urllib/request.py", line 832, in proxy_open return self.parent.open(req, timeout=req.timeout) File "/Users/dwallace/workspace/cpython/Lib/urllib/request.py", line 524, in open response = self._open(req, data) File "/Users/dwallace/workspace/cpython/Lib/urllib/request.py", line 546, in _open return self._call_chain(self.handle_open, 'unknown', File "/Users/dwallace/workspace/cpython/Lib/urllib/request.py", line 502, in _call_chain result = func(*args) File "/Users/dwallace/workspace/cpython/Lib/urllib/request.py", line 1386, in unknown_open raise URLError('unknown url type: %s' % type) urllib.error.URLError: Though the error message could be better. You can work around this by setting the default socket. import urllib.request import socket import socks url = 'http://icanhazip.com' socks.set_default_proxy(socks.SOCKS5, "localhost",port=8888) socket.socket = socks.socksocket print(urllib.request.urlopen(url).read()) ---------- nosy: +Daniel Wallace _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 11:38:36 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 04 May 2019 15:38:36 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556984316.99.0.178590343925.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: > Did I miss something? No I think for the async stuff that should be a big improvement already. Either a flag, or different "MODE", like 'single','exec' and 'eval'. I'l love for something like 'exec' but where not only we can have multiple statement, but where the last statement behave like single and "expression statements that evaluate to something other than None will be printed". The other thing would be for this mode to not turn the the fist statement into a module docstring in the AST if it is a string. I know that most of these are slightly orthogonal but do have backward compatibility consequences. I'll try to be at PyCon "Mentored Sprints" this afternoon, I'll be ha[[y to be mentored into contributing this to CPython. I'm also happy to discuss writing this in a pep. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 11:48:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 May 2019 15:48:07 +0000 Subject: [issue36475] PyEval_AcquireLock() and PyEval_AcquireThread() do not handle runtime finalization properly. In-Reply-To: <1553887580.94.0.470279627742.issue36475@roundup.psfhosted.org> Message-ID: <1556984887.97.0.347366682671.issue36475@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c664b342a47e4b4650706d07e3e40a295e3a4407 by Victor Stinner in branch 'master': bpo-36475: Make PyThread_exit_thread with _Py_NO_RETURN (GH-13068) https://github.com/python/cpython/commit/c664b342a47e4b4650706d07e3e40a295e3a4407 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 11:49:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 May 2019 15:49:55 +0000 Subject: [issue34848] range.index only takes one argument when it's documented as taking the usual 3 In-Reply-To: <1538279738.27.0.545547206417.issue34848@psf.upfronthosting.co.za> Message-ID: <1556984995.11.0.947407376613.issue34848@roundup.psfhosted.org> STINNER Victor added the comment: I merged the pull requests. Thanks. ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 11:54:18 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 04 May 2019 15:54:18 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1556985258.44.0.508339216474.issue36772@roundup.psfhosted.org> Eric Snow added the comment: FWIW, I've followed this pattern (one function is both decorator and factory) in my own code for quite a while. I've never found it confusing nor has anyone else (that I'm aware) that has used those decorators. One reason I've done decorators this way is because the empty parentheses are a visual distraction to readers. They also imply to readers that more is going on than really is. So I'm in favor of Raymond's plan. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 11:58:28 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 04 May 2019 15:58:28 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1556985508.79.0.518327459831.issue36772@roundup.psfhosted.org> Eric Snow added the comment: As to the issue of positional vs. keyword arguments, keyword arguments make the implementation easier in some cases. Otherwise I haven't seen positional arguments cause much of a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 13:12:30 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 04 May 2019 17:12:30 +0000 Subject: [issue32592] Drop support of Windows Vista in Python 3.7 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1556989950.85.0.497244958644.issue32592@roundup.psfhosted.org> Zackery Spytz added the comment: See also #29075. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 13:39:18 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Sat, 04 May 2019 17:39:18 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1556991558.73.0.526935541964.issue36794@roundup.psfhosted.org> Hrvoje Nik?i? added the comment: Also, the docstring of asyncio.Lock still states: When more than one coroutine is blocked in acquire() waiting for the state to turn to unlocked, only one coroutine proceeds when a release() call resets the state to unlocked; first coroutine which is blocked in acquire() is being processed. ---------- nosy: +hniksic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 13:47:37 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 May 2019 17:47:37 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1556992057.67.0.408275092061.issue36794@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +12997 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 13:48:38 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 May 2019 17:48:38 +0000 Subject: [issue36795] "make venv" failed in Docs Message-ID: <1556992118.26.0.759759719454.issue36795@roundup.psfhosted.org> New submission from Antoine Pitrou : $ make venv python3 -m venv ./venv ./venv/bin/python3 -m pip install -U Sphinx blurb python-docs-theme /home/antoine/cpython/default/Doc/venv/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.3.0) doesn't match a supported version! Collecting Sphinx Cache entry deserialization failed, entry ignored Exception: Traceback (most recent call last): File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/commands/install.py", line 353, in run wb.build(autobuilding=True) File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file require_hashes File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link self.link = finder.find_requirement(self, upgrade) File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 465, in find_requirement all_candidates = self.find_all_candidates(req.name) File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 423, in find_all_candidates for page in self._get_pages(url_locations, project_name): File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 568, in _get_pages page = self._get_page(location) File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 683, in _get_page return HTMLPage.get_page(link, session=self.session) File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 811, in get_page inst = cls(resp.content, resp.url, resp.headers) File "/home/antoine/cpython/default/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 731, in __init__ namespaceHTMLElements=False, TypeError: parse() got an unexpected keyword argument 'transport_encoding' Makefile:126: recipe for target 'venv' failed make: *** [venv] Error 2 ---------- assignee: docs at python components: Documentation messages: 341395 nosy: brett.cannon, docs at python, ned.deily, pitrou priority: critical severity: normal stage: needs patch status: open title: "make venv" failed in Docs type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 14:07:09 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 May 2019 18:07:09 +0000 Subject: [issue36795] "make venv" failed in Docs In-Reply-To: <1556992118.26.0.759759719454.issue36795@roundup.psfhosted.org> Message-ID: <1556993229.89.0.63074541694.issue36795@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 14:07:13 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 May 2019 18:07:13 +0000 Subject: [issue34861] Improve cProfile standard output In-Reply-To: <1538392397.89.0.545547206417.issue34861@psf.upfronthosting.co.za> Message-ID: <1556993233.37.0.670009990561.issue34861@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +12998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 14:10:12 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 04 May 2019 18:10:12 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1556993412.37.0.111830912181.issue34616@roundup.psfhosted.org> Andrew Svetlov added the comment: Sorry, I don't know all the compilation workflow details to help you quickly (and will be very busy on other tasks during the sprint). Yuri will be absent on sprints. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 15:05:51 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Sat, 04 May 2019 19:05:51 +0000 Subject: [issue6911] Document changes in asynchat In-Reply-To: <1252942019.67.0.473669726807.issue6911@psf.upfronthosting.co.za> Message-ID: <1556996751.67.0.462749089058.issue6911@roundup.psfhosted.org> Sanyam Khurana added the comment: Given that Python 2.x and async chat is deprecated in favor of new async io, we're better in closing this issue, rather than trying to apply this cleanly on the master branch. ---------- nosy: +CuriousLearner resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 15:14:00 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 04 May 2019 19:14:00 +0000 Subject: [issue36795] "make venv" failed in Docs In-Reply-To: <1556992118.26.0.759759719454.issue36795@roundup.psfhosted.org> Message-ID: <1556997240.05.0.663375926626.issue36795@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Could it be a problem with pip and it's vendored html5lib version incompatibility? There is one bug report in pip repo about Anaconda patching pip that seems to cause this error : https://github.com/pypa/pip/issues/4902 . Can you please share the pip and python version to see if I can reproduce this? Is the pip being used part of the one at 3.6 release? ./venv/bin/pip --version I am using Python 3.6.4 from homebrew. I can reproduce this is by manually editing ./venv/lib/python3.6/site-packages/pip/_vendor/html5lib/_inputstream.py and removing transport_encoding from HTMLBinaryInputStream's constructor. ./venv/lib/python3.6/site-packages/pip/_vendor/html5lib/__init__.py contains the version number of html5lib. Mine is 1.0b10. Sample error I got similar to the report : ? Doc git:(master) ? ./venv/bin/pip install sphinx Collecting sphinx Exception: Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/commands/install.py", line 324, in run requirement_set.prepare_files(finder) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file require_hashes File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link self.link = finder.find_requirement(self, upgrade) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 465, in find_requirement all_candidates = self.find_all_candidates(req.name) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 423, in find_all_candidates for page in self._get_pages(url_locations, project_name): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 568, in _get_pages page = self._get_page(location) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 683, in _get_page return HTMLPage.get_page(link, session=self.session) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 811, in get_page inst = cls(resp.content, resp.url, resp.headers) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/index.py", line 731, in __init__ namespaceHTMLElements=False, File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/_vendor/html5lib/html5parser.py", line 35, in parse return p.parse(doc, **kwargs) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/_vendor/html5lib/html5parser.py", line 235, in parse self._parse(stream, False, None, *args, **kwargs) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/_vendor/html5lib/html5parser.py", line 85, in _parse self.tokenizer = _tokenizer.HTMLTokenizer(stream, parser=self, **kwargs) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/_vendor/html5lib/_tokenizer.py", line 36, in __init__ self.stream = HTMLInputStream(stream, **kwargs) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Doc/venv/lib/python3.6/site-packages/pip/_vendor/html5lib/_inputstream.py", line 151, in HTMLInputStream return HTMLBinaryInputStream(source, **kwargs) TypeError: __init__() got an unexpected keyword argument 'transport_encoding' You are using pip version 9.0.1, however version 19.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 15:31:40 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 04 May 2019 19:31:40 +0000 Subject: [issue36796] Error handling cleanup in _testcapimodule.c Message-ID: <1556998300.08.0.689848500132.issue36796@roundup.psfhosted.org> New submission from Zackery Spytz : Many functions in _testcapimodule.c lack error handling. This can cause spurious errors when stress testing the interpreter. ---------- components: Extension Modules messages: 341399 nosy: ZackerySpytz priority: normal severity: normal status: open title: Error handling cleanup in _testcapimodule.c versions: Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 15:34:47 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 04 May 2019 19:34:47 +0000 Subject: [issue36796] Error handling cleanup in _testcapimodule.c In-Reply-To: <1556998300.08.0.689848500132.issue36796@roundup.psfhosted.org> Message-ID: <1556998487.95.0.796443778776.issue36796@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +12999 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 15:50:07 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 04 May 2019 19:50:07 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1556999407.33.0.877207795301.issue36782@roundup.psfhosted.org> anthony shaw added the comment: Reserving this issue (in mentored sprint) ---------- nosy: +anthony shaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 15:53:29 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 04 May 2019 19:53:29 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1556999609.24.0.689763735949.issue36782@roundup.psfhosted.org> Change by anthony shaw : ---------- nosy: +edison.abahurire _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 16:15:39 2019 From: report at bugs.python.org (Eryk Sun) Date: Sat, 04 May 2019 20:15:39 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557000939.09.0.369368845745.issue36778@roundup.psfhosted.org> Eryk Sun added the comment: > I think it is better to just make the check in the test conditional. Okay. The test verifies work done to minimize interpreter startup time, but probably the relative cost of importing functools (and thus collections et al) isn't significant compared to the overall cost of spawning a process in a Windows desktop environment. That may not be the case for Nano Server and IoT Core. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 16:27:33 2019 From: report at bugs.python.org (Kojo Idrissa) Date: Sat, 04 May 2019 20:27:33 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1557001653.64.0.755494565654.issue33071@roundup.psfhosted.org> Kojo Idrissa added the comment: I'm working on this (@kojoidrissa) ---------- nosy: +kojoidrissa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 16:33:22 2019 From: report at bugs.python.org (Julia) Date: Sat, 04 May 2019 20:33:22 +0000 Subject: [issue11001] Various obvious errors in cookies documentation In-Reply-To: <1295908065.55.0.221906287574.issue11001@psf.upfronthosting.co.za> Message-ID: <1557002002.1.0.311538675771.issue11001@roundup.psfhosted.org> Julia added the comment: Working on it at the moment ---------- nosy: +jiliuk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 16:41:09 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 May 2019 20:41:09 +0000 Subject: [issue11001] Various obvious errors in cookies documentation In-Reply-To: <1295908065.55.0.221906287574.issue11001@psf.upfronthosting.co.za> Message-ID: <1557002469.06.0.45947428607.issue11001@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 16:50:28 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 04 May 2019 20:50:28 +0000 Subject: [issue11001] Various obvious errors in cookies documentation In-Reply-To: <1295908065.55.0.221906287574.issue11001@psf.upfronthosting.co.za> Message-ID: <1557003028.8.0.584385892029.issue11001@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.7, Python 3.8 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 16:55:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 04 May 2019 20:55:22 +0000 Subject: [issue32592] Drop support of Windows Vista in Python 3.8 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1557003322.38.0.0520676619827.issue32592@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: Drop support of Windows Vista in Python 3.7 -> Drop support of Windows Vista in Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 16:57:12 2019 From: report at bugs.python.org (Kojo Idrissa) Date: Sat, 04 May 2019 20:57:12 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1557003432.02.0.860329648298.issue33071@roundup.psfhosted.org> Change by Kojo Idrissa : ---------- keywords: +patch pull_requests: +13001 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 16:57:13 2019 From: report at bugs.python.org (Julia) Date: Sat, 04 May 2019 20:57:13 +0000 Subject: [issue27432] Unittest truncating of error message not works In-Reply-To: <1467365269.89.0.517880663648.issue27432@psf.upfronthosting.co.za> Message-ID: <1557003433.64.0.545333956216.issue27432@roundup.psfhosted.org> Julia added the comment: Working on it at the moment (Mentored Sprint) ---------- nosy: +jiliuk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:03:04 2019 From: report at bugs.python.org (Catherine Alvarado) Date: Sat, 04 May 2019 21:03:04 +0000 Subject: [issue36166] DOC: Fix markup on function parameter on datamodel.rst In-Reply-To: <1551528835.64.0.987531721426.issue36166@roundup.psfhosted.org> Message-ID: <1557003784.21.0.883468982281.issue36166@roundup.psfhosted.org> Catherine Alvarado added the comment: I'm going to work on this one. ---------- nosy: +calvarado _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:05:02 2019 From: report at bugs.python.org (Jonatan Yucra Rodriguez) Date: Sat, 04 May 2019 21:05:02 +0000 Subject: [issue36189] DOC: Correct word in tutorial introduction In-Reply-To: <1551725586.73.0.662699652702.issue36189@roundup.psfhosted.org> Message-ID: <1557003902.47.0.905793281073.issue36189@roundup.psfhosted.org> Jonatan Yucra Rodriguez added the comment: I would like to take this issue. ---------- nosy: +jonyucra _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:05:47 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 04 May 2019 21:05:47 +0000 Subject: [issue36797] Cull more oudated distutils information Message-ID: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> New submission from Nick Coghlan : Prompted by #33071, I'm going to do a pass through the legacy distutils documentation deleting outdated information that is better maintained elsewhere. ---------- assignee: ncoghlan messages: 341407 nosy: jaraco, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Cull more oudated distutils information type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:22:18 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 May 2019 21:22:18 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1557004938.02.0.760069937636.issue36782@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +13002 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:26:42 2019 From: report at bugs.python.org (Edison Abahurire) Date: Sat, 04 May 2019 21:26:42 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1557005202.69.0.342459742134.issue36782@roundup.psfhosted.org> Edison Abahurire added the comment: I have done PyDate_FromDate in GH-13088 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:46:06 2019 From: report at bugs.python.org (Catherine Alvarado) Date: Sat, 04 May 2019 21:46:06 +0000 Subject: [issue36166] DOC: Fix markup on function parameter on datamodel.rst In-Reply-To: <1551528835.64.0.987531721426.issue36166@roundup.psfhosted.org> Message-ID: <1557006366.51.0.339547437719.issue36166@roundup.psfhosted.org> Change by Catherine Alvarado : ---------- keywords: +patch pull_requests: +13003 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:46:44 2019 From: report at bugs.python.org (Jonatan Yucra Rodriguez) Date: Sat, 04 May 2019 21:46:44 +0000 Subject: [issue36189] DOC: Correct word in tutorial introduction In-Reply-To: <1551725586.73.0.662699652702.issue36189@roundup.psfhosted.org> Message-ID: <1557006404.34.0.260222484711.issue36189@roundup.psfhosted.org> Change by Jonatan Yucra Rodriguez : ---------- keywords: +patch pull_requests: +13004 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:50:23 2019 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 04 May 2019 21:50:23 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1557006623.02.0.35969905375.issue34616@roundup.psfhosted.org> Yury Selivanov added the comment: Here's a VERY rough first implementation to play with: https://github.com/1st1/cpython/commit/ad2ed0aed922d7c36f2fced64264124613e37f09 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:54:38 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 04 May 2019 21:54:38 +0000 Subject: [issue36166] DOC: Fix markup on function parameter on datamodel.rst In-Reply-To: <1551528835.64.0.987531721426.issue36166@roundup.psfhosted.org> Message-ID: <1557006878.07.0.950552591187.issue36166@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 5e98f05e55d13981c7c92fb14b9c013e4227c3c1 by Cheryl Sabella (Catherine Alvarado) in branch 'master': bpo-36166: Change to rst datamodel file. (GH-13089) https://github.com/python/cpython/commit/5e98f05e55d13981c7c92fb14b9c013e4227c3c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:55:32 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 04 May 2019 21:55:32 +0000 Subject: [issue36189] DOC: Correct word in tutorial introduction In-Reply-To: <1551725586.73.0.662699652702.issue36189@roundup.psfhosted.org> Message-ID: <1557006932.44.0.866689579383.issue36189@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 98a1e06c47f655c7601b130cf8d549de9f08369e by Cheryl Sabella (Jonatan) in branch 'master': bpo-36189: Fixing typo in tutorial introduction (GH-13090) https://github.com/python/cpython/commit/98a1e06c47f655c7601b130cf8d549de9f08369e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:57:46 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 04 May 2019 21:57:46 +0000 Subject: [issue36166] DOC: Fix markup on function parameter on datamodel.rst In-Reply-To: <1551528835.64.0.987531721426.issue36166@roundup.psfhosted.org> Message-ID: <1557007066.77.0.433401129423.issue36166@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:57:55 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 May 2019 21:57:55 +0000 Subject: [issue27432] Unittest truncating of error message not works In-Reply-To: <1467365269.89.0.517880663648.issue27432@psf.upfronthosting.co.za> Message-ID: <1557007075.94.0.932120202211.issue27432@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +13005 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 17:58:55 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 04 May 2019 21:58:55 +0000 Subject: [issue36189] DOC: Correct word in tutorial introduction In-Reply-To: <1551725586.73.0.662699652702.issue36189@roundup.psfhosted.org> Message-ID: <1557007135.01.0.886515736375.issue36189@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 18:17:23 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 04 May 2019 22:17:23 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1557008243.38.0.240464454494.issue36797@roundup.psfhosted.org> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 18:22:45 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 04 May 2019 22:22:45 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1557008565.92.0.0777923997033.issue36797@roundup.psfhosted.org> Change by Nick Coghlan : ---------- keywords: +patch pull_requests: +13006 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 20:51:37 2019 From: report at bugs.python.org (Martin Panter) Date: Sun, 05 May 2019 00:51:37 +0000 Subject: [issue1160328] urllib2 post error when using httpproxy Message-ID: <1557017497.61.0.968101993537.issue1160328@roundup.psfhosted.org> Martin Panter added the comment: Today, proxy.pconline.com.cn resolves to a local (inaccessible) address for me (192.168.11.254). After changing the proxy address to localhost, and testing with Python 2.6.8, I can?t see any evidence of a bug in Python. Winsock error 10053 is WSAECONNABORTED, which apparently can be triggered after a lower-level protocol failure or timeout. So this could be the fault of the proxy, network, or a firewall. I am closing this, assuming nobody else can to reproduce this fifteen years later. The closest I got is the following HTTP seen at the proxy: >>> [conn, address] = listener.accept() >>> pprint(conn.recv(3000).splitlines(keepends=True)) [b'GET http://192.168.10.177:8080/price/login.do?method=list HTTP/1.1\r\n', b'Accept-Encoding: identity\r\n', b'Host: 192.168.10.177:8080\r\n', b'Proxy-Authorization: Basic cGljOmlMdXNhbHQ=\r\n', b'Connection: close\r\n', b'User-Agent: Python-urllib/2.6\r\n', b'\r\n'] >>> conn.sendall(b'HTTP/1.1 200 Okay\r\nContent-Length: 0\r\n\r\n') >>> conn.close() >>> [conn, address] = listener.accept() >>> pprint(conn.recv(3000).splitlines(keepends=True)) [b'POST http://192.168.10.177:8080/price/login.do?method=login HTTP/1.1\r\n', b'Accept-Encoding: identity\r\n', b'Content-Length: 27\r\n', b'Host: 192.168.10.177:8080\r\n', b'User-Agent: Python-urllib/2.6\r\n', b'Connection: close\r\n', b'Proxy-Authorization: Basic cGljOmlMdXNhbHQ=\r\n', b'Content-Type: application/x-www-form-urlencoded\r\n', b'\r\n', b'password=admin&userId=admin'] If I close the proxy?s listener before sending the first response, this causes ECONNREFUSED for the second request, with a similar back trace: $ python2.6 t.py Traceback (most recent call last): File "t.py", line 13, in response = urllib2.urlopen(request, postdata) File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, data) File "/usr/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/usr/lib/python2.6/urllib2.py", line 1181, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib/python2.6/urllib2.py", line 1156, in do_open raise URLError(err) urllib2.URLError: ---------- nosy: +martin.panter resolution: -> works for me stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 21:23:34 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 05 May 2019 01:23:34 +0000 Subject: [issue36798] := breaks f-strings Message-ID: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> New submission from Eric V. Smith : The walrus operator breaks f-strings, because the f-string scanner sees the colon as the end of the expression. >>> x = '10' >>> f'{x:=10}' Traceback (most recent call last): File "", line 1, in ValueError: '=' alignment not allowed in string format specifier This becomes: format(x, '=10'), which is an error if x is a string. ---------- assignee: eric.smith components: Interpreter Core messages: 341413 nosy: eric.smith, larry, lukasz.langa priority: release blocker severity: normal status: open title: := breaks f-strings versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 21:27:28 2019 From: report at bugs.python.org (mbiggs) Date: Sun, 05 May 2019 01:27:28 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes In-Reply-To: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> Message-ID: <1557019648.92.0.555484204975.issue36789@roundup.psfhosted.org> mbiggs added the comment: So a correct statement would be "A UTF-8 string is turned into a sequence of bytes that contains embedded zero bytes only where they represent the NULL character (U+0000)." I think it's important to correct this because the part about processing UTF-8 with C functions like strcpy(), was wrong and could cause bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 21:36:05 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sun, 05 May 2019 01:36:05 +0000 Subject: [issue36684] codecov.io code coverage has not updated since 2019-04-13 In-Reply-To: <1555804519.07.0.0840911433327.issue36684@roundup.psfhosted.org> Message-ID: <1557020165.45.0.659447038908.issue36684@roundup.psfhosted.org> Gordon P. Hemsley added the comment: Testing has shown that the gcc build itself runs fine. The problem appears to be with how the coverage tests are run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 21:36:50 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 05 May 2019 01:36:50 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557020210.5.0.495544280848.issue36798@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +emilyemorehouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 22:52:30 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 05 May 2019 02:52:30 +0000 Subject: [issue36189] DOC: Correct word in tutorial introduction In-Reply-To: <1551725586.73.0.662699652702.issue36189@roundup.psfhosted.org> Message-ID: <1557024750.91.0.442067553689.issue36189@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13007 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 22:53:07 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 05 May 2019 02:53:07 +0000 Subject: [issue36166] DOC: Fix markup on function parameter on datamodel.rst In-Reply-To: <1551528835.64.0.987531721426.issue36166@roundup.psfhosted.org> Message-ID: <1557024787.74.0.566893635314.issue36166@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13008 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 23:20:50 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 05 May 2019 03:20:50 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557026450.17.0.617600369238.issue36798@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 23:21:31 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 05 May 2019 03:21:31 +0000 Subject: [issue36166] DOC: Fix markup on function parameter on datamodel.rst In-Reply-To: <1551528835.64.0.987531721426.issue36166@roundup.psfhosted.org> Message-ID: <1557026491.08.0.0103620493076.issue36166@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 37125ff6e2f988a14b46525b7df24d2997bee836 by Cheryl Sabella (Miss Islington (bot)) in branch '3.7': bpo-36166: Change to rst datamodel file. (GH-13089) (#13094) https://github.com/python/cpython/commit/37125ff6e2f988a14b46525b7df24d2997bee836 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 4 23:22:36 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 05 May 2019 03:22:36 +0000 Subject: [issue36189] DOC: Correct word in tutorial introduction In-Reply-To: <1551725586.73.0.662699652702.issue36189@roundup.psfhosted.org> Message-ID: <1557026556.89.0.895538423417.issue36189@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 2b5ffc02c00b16ede6555391c6965746c8fe554b by Cheryl Sabella (Miss Islington (bot)) in branch '3.7': bpo-36189: Fixing typo in tutorial introduction (GH-13093) https://github.com/python/cpython/commit/2b5ffc02c00b16ede6555391c6965746c8fe554b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 01:20:04 2019 From: report at bugs.python.org (Minmin Gong) Date: Sun, 05 May 2019 05:20:04 +0000 Subject: [issue28269] [MinGW] Can't compile Python/dynload_win.c due to static strcasecmp In-Reply-To: <1474800483.31.0.700864577383.issue28269@psf.upfronthosting.co.za> Message-ID: <1557033604.49.0.124835343241.issue28269@roundup.psfhosted.org> Change by Minmin Gong : ---------- pull_requests: +13009 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 01:54:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 05:54:52 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes In-Reply-To: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> Message-ID: <1557035692.66.0.722797616604.issue36789@roundup.psfhosted.org> Serhiy Storchaka added the comment: I agree that the documentation should be updated. Do you mind to create a pull request mbiggs? There are UTF-8 variants which guarantee that the encoded text has no zero bytes (see Modified UTF-8), but Python only provides the standard UTF-8 and UTF-8 with BOM. ---------- keywords: +easy nosy: +serhiy.storchaka stage: -> needs patch versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 02:09:02 2019 From: report at bugs.python.org (Reuben Thomas) Date: Sun, 05 May 2019 06:09:02 +0000 Subject: [issue36799] Typo in ctypes documentation Message-ID: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> New submission from Reuben Thomas : "It is possible to defined" ? "It is possible to define" ---------- assignee: docs at python components: Documentation messages: 341419 nosy: docs at python, rrt priority: normal severity: normal status: open title: Typo in ctypes documentation versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 02:32:07 2019 From: report at bugs.python.org (Yuval Greenfield) Date: Sun, 05 May 2019 06:32:07 +0000 Subject: [issue36800] Invalid coding error hidden on Windows Message-ID: <1557037927.09.0.679611511238.issue36800@roundup.psfhosted.org> New submission from Yuval Greenfield : These lines fail on Windows in a surprising way: # -*- coding: utf8 -*- import threading print("threading %s" % threading) Normally they would throw this: ```File "C:\Python36\Lib\site-packages\missinglink_kernel\callback\log_monitor.py", line 1 SyntaxError: encoding problem: utf8``` But attached is a file that throws this instead: ``` Traceback (most recent call last): File "C:\Python36\Lib\site-packages\missinglink_kernel\callback\log_monitor.py", line 2, in import threading NameError: name 'threading' is not defined ``` It seems that the amount of lines in the file will cause the exception hiding bug to manifest. This issue did reproduce on my Windows machine here: * Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32 * Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32 * Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32 It did NOT reproduce on my Mac at all: It does not repro on my mac at all: * Python 3.7.1 (default, Dec 14 2018, 13:28:58) [Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin * Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin ---------- components: Windows files: log_monitor.py messages: 341420 nosy: paul.moore, steve.dower, tim.golden, ubershmekel, zach.ware priority: normal severity: normal status: open title: Invalid coding error hidden on Windows type: compile error versions: Python 3.7 Added file: https://bugs.python.org/file48300/log_monitor.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 02:34:24 2019 From: report at bugs.python.org (Yuval Greenfield) Date: Sun, 05 May 2019 06:34:24 +0000 Subject: [issue36800] Invalid coding error hidden on Windows In-Reply-To: <1557037927.09.0.679611511238.issue36800@roundup.psfhosted.org> Message-ID: <1557038064.11.0.61467457147.issue36800@roundup.psfhosted.org> Yuval Greenfield added the comment: Note I am aware the actual problem is "utf8" vs "utf-8". But for some reason on Windows the exception does not reflect that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 02:41:05 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 05 May 2019 06:41:05 +0000 Subject: [issue34915] LWPCookieJar.save() creates *.lwp file in 644 mode In-Reply-To: <1538834336.96.0.545547206417.issue34915@psf.upfronthosting.co.za> Message-ID: <1557038465.04.0.734387590037.issue34915@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Martin, any thoughts on this change? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 02:59:37 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 05 May 2019 06:59:37 +0000 Subject: [issue36800] Invalid coding error hidden on Windows In-Reply-To: <1557037927.09.0.679611511238.issue36800@roundup.psfhosted.org> Message-ID: <1557039577.84.0.38222638846.issue36800@roundup.psfhosted.org> Change by SilentGhost : ---------- type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 03:13:11 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 05 May 2019 07:13:11 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557040391.67.0.135127383179.issue36798@roundup.psfhosted.org> SilentGhost added the comment: This doesn't seem at all related to walrus operator, I can reproduce this error on 3.6.7 and 3.7.3, given that format call returns exactly the same error, it seems like '=' is simply not a valid alignment for strings. I'm not saying that walrus operator did not introduce any errors, but those could be perhaps best tested using the following code: f'{x:=^10}' ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 04:49:31 2019 From: report at bugs.python.org (papad) Date: Sun, 05 May 2019 08:49:31 +0000 Subject: [issue36773] Race condition during pickle.load() In-Reply-To: <1556785499.96.0.563265579216.issue36773@roundup.psfhosted.org> Message-ID: <1557046171.03.0.698730168814.issue36773@roundup.psfhosted.org> papad added the comment: In what version should this be fixed? I see https://bugs.python.org/issue34572 says the fix is in version 3.7, while I'm experiencing this on python 3.7.3, which version should I check? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 06:41:49 2019 From: report at bugs.python.org (Larry Hastings) Date: Sun, 05 May 2019 10:41:49 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557052909.5.0.66923375169.issue36798@roundup.psfhosted.org> Larry Hastings added the comment: The point is that := is valid expression syntax in Python 3.8, but you can't use it in an f-string. The fact that the error is the same in 3.6 and 3.7 is irrelevant because := was not valid syntax in those versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 07:04:19 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 05 May 2019 11:04:19 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557054259.04.0.458093712397.issue36798@roundup.psfhosted.org> SilentGhost added the comment: > The point is that := is valid expression syntax in Python 3.8, but you can't use it in an f-string. Good? Allowing walrus operator in the f-strings will just lead to the debugging hell. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 07:14:49 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 05 May 2019 11:14:49 +0000 Subject: [issue33530] Implement Happy Eyeball in asyncio In-Reply-To: <1526439388.6.0.682650639539.issue33530@psf.upfronthosting.co.za> Message-ID: <1557054889.27.0.888985386946.issue33530@roundup.psfhosted.org> miss-islington added the comment: New changeset 88f07a804a0adc0b6ee87687b59d8416113c7331 by Miss Islington (bot) (twisteroid ambassador) in branch 'master': bpo-33530: Implement Happy Eyeballs in asyncio, v2 (GH-7237) https://github.com/python/cpython/commit/88f07a804a0adc0b6ee87687b59d8416113c7331 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 07:15:57 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 05 May 2019 11:15:57 +0000 Subject: [issue33530] Implement Happy Eyeball in asyncio In-Reply-To: <1526439388.6.0.682650639539.issue33530@psf.upfronthosting.co.za> Message-ID: <1557054957.58.0.0655303640066.issue33530@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 07:17:58 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 05 May 2019 11:17:58 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557055078.07.0.180944662177.issue36798@roundup.psfhosted.org> Eric V. Smith added the comment: f-strings are not going to take a position on what a "good" expression is, and what is and isn't allowed. If it's a Python expression that could possibly be parsed in the f-string context, f-strings will allow it. This is clearly a bug in 3.8. I'll have a PR today or during the sprints. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 07:25:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 11:25:07 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557055507.01.0.650400128916.issue36798@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can use it in parenthesis: >>> f'{(x:=10)}' '10' It should be explicitly documented, that what looks like the assignment operator is not always the assignment operator in f-strings. >>> x = 10 >>> f'{x:=10}' ' 10' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 07:26:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 11:26:27 +0000 Subject: [issue36791] sum() relies on C signed overflow behaviour In-Reply-To: <1556949289.05.0.226850923115.issue36791@roundup.psfhosted.org> Message-ID: <1557055587.61.0.781413189617.issue36791@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 29500737d45cbca9604d9ce845fb2acc3f531401 by Serhiy Storchaka in branch 'master': bpo-36791: Safer detection of integer overflow in sum(). (GH-13080) https://github.com/python/cpython/commit/29500737d45cbca9604d9ce845fb2acc3f531401 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 07:50:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 11:50:52 +0000 Subject: [issue36773] Race condition during pickle.load() In-Reply-To: <1556785499.96.0.563265579216.issue36773@roundup.psfhosted.org> Message-ID: <1557057052.33.0.212745454577.issue36773@roundup.psfhosted.org> Serhiy Storchaka added the comment: It should be fixed in 3.7.3. https://docs.python.org/3.7/whatsnew/changelog.html#python-3-7-3-release-candidate-1 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 07:55:09 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 05 May 2019 11:55:09 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557057309.34.0.274203559862.issue36798@roundup.psfhosted.org> Eric V. Smith added the comment: Correct about the parens. I'm just going to fix it a the top level, without parens. There's no reason it shouldn't work, the fact that it doesn't work now is just an accident of implementation. I'll fix it by adding a special test, the same way that != has a special test. For those who say it shouldn't be allowed at the top level anyway, but should be allowed in parens: if we decide that (which I disagree with), then it should not be disallowed because of an accidental interaction with format specs. It should be explicitly checked for and disallowed. Again, I am not planning on making that change. I'm just going to allow it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 08:08:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 12:08:53 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557058133.97.0.305751875986.issue36798@roundup.psfhosted.org> Serhiy Storchaka added the comment: Allowing it at the top level is a breaking change. It should not be done without deprecation. And I think that it is better to use parenthesis around the assignment operator (or better do not use it in f-strings at all) that deprecate the "=" alignment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 08:20:38 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 05 May 2019 12:20:38 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557058838.6.0.988069476464.issue36798@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: There was a note on PEP 572 (https://www.python.org/dev/peps/pep-0572/#exceptional-cases) to prohibit as a top level expression and a discussion on the issue also didn't agree with it https://bugs.python.org/issue35224#msg339098 . It might cause confusion to users due to this difference inside and outside of f-strings. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 08:44:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 12:44:44 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557060284.51.0.125624382062.issue36798@roundup.psfhosted.org> Serhiy Storchaka added the comment: Note that Guido prefers to use parentheses around the assignment operator even if the grammar does nor require this. He used this style in What's New. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 08:45:39 2019 From: report at bugs.python.org (Manjusaka) Date: Sun, 05 May 2019 12:45:39 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557060339.43.0.0983916430152.issue36792@roundup.psfhosted.org> Manjusaka added the comment: I can't reproduce this error on my system by using the same code. Could you share the system info with us? ---------- nosy: +Manjusaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 08:48:52 2019 From: report at bugs.python.org (Manjusaka) Date: Sun, 05 May 2019 12:48:52 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557060532.53.0.484544504687.issue36792@roundup.psfhosted.org> Manjusaka added the comment: Or would you share the Exception with us ? I guess it's caused by system setting ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 08:50:57 2019 From: report at bugs.python.org (Charlie Clark) Date: Sun, 05 May 2019 12:50:57 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557060657.88.0.337778881606.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:07:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 05 May 2019 13:07:02 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1557061622.13.0.99926114777.issue36799@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Reuben, would you like to make a PR for this change? The change needs to be done in https://github.com/python/cpython/blob/master/Doc/library/ctypes.rst ? cpython git:(master) ? rg 'It is possible to defined' Doc/library/ctypes.rst 2379: It is possible to defined sub-subclasses of structure types, they inherit 2427: It is possible to defined sub-subclasses of structures, they inherit the ---------- keywords: +easy nosy: +xtreak stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:08:57 2019 From: report at bugs.python.org (Reuben Thomas) Date: Sun, 05 May 2019 13:08:57 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1557061737.67.0.399373754156.issue36799@roundup.psfhosted.org> Reuben Thomas added the comment: No, as I'm not an active Python contributor, do not aspire to be one, and don't really want to have to learn yet another contribution system to a major project just to fix a trivial typo. Sorry! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:11:11 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 05 May 2019 13:11:11 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1557061871.13.0.616603822899.issue36799@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: No problem, I have tagged it as easy and hope someone makes GitHub PR for the same. Thank you for the report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:12:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 13:12:04 +0000 Subject: [issue36781] Optimize sum() for bools In-Reply-To: <1556876973.98.0.990157093134.issue36781@roundup.psfhosted.org> Message-ID: <1557061924.11.0.145922798302.issue36781@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +13010 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:13:59 2019 From: report at bugs.python.org (Manjusaka) Date: Sun, 05 May 2019 13:13:59 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557062039.06.0.340454778998.issue36792@roundup.psfhosted.org> Manjusaka added the comment: Same environment. But I still can not reproduce this exception. I guess maybe it's about the local time or timezone problem. I will find a way to figure it out ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:19:17 2019 From: report at bugs.python.org (Larry Hastings) Date: Sun, 05 May 2019 13:19:17 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557062357.51.0.0791984263384.issue36798@roundup.psfhosted.org> Larry Hastings added the comment: I'm not sure why Guido's preferences would be relevant. f-strings support expressions, := is a valid expression, f-strings therefore must support it. f-strings expressions are not top-level statements and therefore will not require parentheses around :=. There appears to be some confusion around f-strings' use of : to delimit a "format specification". Supporting := won't break format specifications, although it will require some intelligence--if you see a :, you must examine the next character to know whether it's := or a format specification. It is not a breaking change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:23:38 2019 From: report at bugs.python.org (Charlie Clark) Date: Sun, 05 May 2019 13:23:38 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557062618.96.0.797413753936.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: That's what we thought when we looked at it, but as I said, I couldn't reproduce it with just the `time` call or the `ZInfo` instantiation, so something odd is happening. I do have a German version of Windows as I suspect the original reporter does. You'd think that sort of thing wouldn't matter? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:44:32 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 05 May 2019 13:44:32 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain Message-ID: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> New submission from Andrew Svetlov : Now `await writer.drain()` performs `await sleep(0)` if underlying transport is closing. It works well only for plain sockets. SSL transport needs more context switches to shut down the SSL connection. Drain wakes up too early to check if the transport is actually closed. ---------- components: asyncio messages: 341445 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Wait for connection_lost in StreamWriter.drain type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:48:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 13:48:56 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1557064136.43.0.03441686429.issue36772@roundup.psfhosted.org> Serhiy Storchaka added the comment: To clarify, I am not opposing this feature. I had doubts because if the memory does not betray me similar propositions for lru_cache or other decorator fabrics were rejected in past. But times change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:55:56 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sun, 05 May 2019 13:55:56 +0000 Subject: [issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element In-Reply-To: <1514141500.33.0.213398074469.issue32424@psf.upfronthosting.co.za> Message-ID: <1557064556.36.0.00741825689391.issue32424@roundup.psfhosted.org> Gordon P. Hemsley added the comment: It seems the final open question on this is whether the mismatch between the Python and C implementations is enough to bypass PendingDeprecationWarning for copy() in favor of jumping straight to DeprecationWarning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:58:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 13:58:21 +0000 Subject: [issue36654] Add example to tokenize.tokenize In-Reply-To: <1555559036.7.0.0522143852215.issue36654@roundup.psfhosted.org> Message-ID: <1557064701.97.0.87049067699.issue36654@roundup.psfhosted.org> Serhiy Storchaka added the comment: I do not think a new example is needed. The existing example already demonstrates the use of file's readline method. If you need an example for opening a file, the tokenize module documentation is not an appropriate place for this. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 09:58:21 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sun, 05 May 2019 13:58:21 +0000 Subject: [issue36684] codecov.io code coverage has not updated since 2019-04-13 In-Reply-To: <1555804519.07.0.0840911433327.issue36684@roundup.psfhosted.org> Message-ID: <1557064701.27.0.165385148456.issue36684@roundup.psfhosted.org> Gordon P. Hemsley added the comment: It seems the primary cause of the problem is simply that testing crossed the boundary of maximum execution time allotted by Travis CI. I'm experimenting now with ways to speed up testing without losing granularity. However, given how long code coverage has been missing, it might be worthwhile to move forward on a stopgap solution that at least gets code coverage being tracked again, if not comprehensively. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 10:00:41 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 05 May 2019 14:00:41 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557064841.88.0.711481166512.issue36801@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13011 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 10:10:52 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 05 May 2019 14:10:52 +0000 Subject: [issue36802] Revert back StreamWriter awrite/aclose but provide await writer.write() and await writer.close() Message-ID: <1557065452.04.0.483828473478.issue36802@roundup.psfhosted.org> New submission from Andrew Svetlov : Yuri and I decided that `writer.awrite()` and `writer.aclose()` look ugly. Instead, we return awaitable object from these methods to allow both `writer.write(b'data')` and `await writer.write(b'data')` for the method. The same for `writer.close()` call. ---------- components: asyncio messages: 341450 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Revert back StreamWriter awrite/aclose but provide await writer.write() and await writer.close() versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 10:29:54 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 05 May 2019 14:29:54 +0000 Subject: [issue36802] Revert back StreamWriter awrite/aclose but provide await writer.write() and await writer.close() In-Reply-To: <1557065452.04.0.483828473478.issue36802@roundup.psfhosted.org> Message-ID: <1557066594.42.0.655148928057.issue36802@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13012 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 10:32:05 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 05 May 2019 14:32:05 +0000 Subject: [issue36798] := breaks f-strings In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557066725.85.0.638793360369.issue36798@roundup.psfhosted.org> Eric V. Smith added the comment: The fact that adding := support could break existing working code does give me pause to make any change here, and does suggest that a deprecation period would be needed in order to modify the f-string expression scanning behavior. One concern I have is that if something akin to PEP 536 is used to implement f-strings, then it would require some work (but not be impossible) to avoid allowing :=. In 3.8, := is prohibited in "expression as a statement" mode, but that's not the mode that f-strings expressions operate in: they're just normal expressions, and I would normally just expect := to work. But the backward compatibility break here is the reason to possibly disallow supporting :=, not that := should just never work in f-strings without parens. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 10:55:45 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 05 May 2019 14:55:45 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557068145.9.0.512288375531.issue36798@roundup.psfhosted.org> Change by Eric V. Smith : ---------- title: := breaks f-strings -> f-strings do not support top-level := _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 11:26:00 2019 From: report at bugs.python.org (Davin Potts) Date: Sun, 05 May 2019 15:26:00 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1557069960.11.0.283667102106.issue33725@roundup.psfhosted.org> Davin Potts added the comment: I believe we must change the default behavior on MacOS to use spawn instead of fork. Encouraging people to use fork by default on MacOS is encouraging them to create something that effectively will not work. Keeping fork as the default behavior when we have already turned off all of the tests of fork behavior on MacOS also makes no sense. Existing Python code that depends upon the default behavior (fork) on MacOS has already been broken -- if we make this change, we are arguably not breaking anyone's working code. Users can and will still be able to specify the start mechanism on MacOS, including fork. This empowers users to continue to handle even the most esoteric use cases without loss of functionality from multiprocessing. Though admittedly, without an ability to test the behavior of fork, this will need to be marked as deprecated. I will supply a patch making this change and updating the docs shortly after PyCon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 11:33:43 2019 From: report at bugs.python.org (dibya ranjan mishra) Date: Sun, 05 May 2019 15:33:43 +0000 Subject: [issue36803] Getting a lot of runtime misaligned address error while building python 2.7.6 with UBSAN Message-ID: <1557070423.41.0.167231888065.issue36803@roundup.psfhosted.org> New submission from dibya ranjan mishra : I downloaded python 2.7.6 source and am trying to build with UBSAN flag following the instructions https://devguide.python.org/clang/. But I am getting a lot of misaligned address errors when I run make or make test command. Below is an example: Objects/listobject.c:161:5: runtime error: member access within misaligned address 0x2adff0773228 for type 'struct (anonymous struct at Include/objimpl.h:253:5)', which requires 16 byte alignment I need this ubsan enabled python 2.7 as a part of my project. ---------- components: Build messages: 341453 nosy: dibya ranjan mishra priority: normal severity: normal status: open title: Getting a lot of runtime misaligned address error while building python 2.7.6 with UBSAN type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 11:42:39 2019 From: report at bugs.python.org (Emily Morehouse) Date: Sun, 05 May 2019 15:42:39 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557070959.61.0.398435818647.issue36798@roundup.psfhosted.org> Emily Morehouse added the comment: My initial reaction is that named expressions should not be valid in f-strings and should instead raise an exception, the same way that using `a := 10` does. >>> a := 10 File "", line 1 a := 10 ^ SyntaxError: invalid syntax It could be expected that named expressions could be used in f-strings in the same way as, say, list comprehensions or when used in parenthesis. One of the tricky things about named expressions is that the scope of the variable being assigned to gets "elevated" to the enclosing scope (this is a slightly simplified explanation but applies for most cases). Since f-strings are executed when defined and not where they are used, this could lead to confusing behavior. Is it available only when defined? Would users expect a variable to be available again when the f-string if it were saved to a variable? Would we modify the expected behavior of named expressions to contain scope to only the f-string? I'm not sure that any of these are particularly clear in behavior or in the definitions laid out in PEP 572. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 11:44:41 2019 From: report at bugs.python.org (Davin Potts) Date: Sun, 05 May 2019 15:44:41 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1557071081.05.0.235141315071.issue33725@roundup.psfhosted.org> Davin Potts added the comment: Victor raises an important question: should the *default* start behavior be made consistent across platforms? Assuming we change it on MacOS, the default start behavior on Windows and MacOS will be spawn but the default start behavior on Linux and FreeBSD (among others) will be fork. Reasons to consider such a breaking change: * This inconsistency in default start behavior on different platforms (Windows versus not) has historically been a significant source of confusion for many, many users. * These days, the majority of users are not already familiar with the rule "fork-before-creating-threads" and so are surprised and confused when they fork a process that already has spun up multiple threads and bad things happen. * We are changing the default on one platform (MacOS), which should prompt us to consider how are defaults are set elsewhere. Reasons to reject such a breaking change: * Though changing the default does not break everyone's code everywhere, it will require changes to any code that depends upon the default start method AND depends upon data/functions/stuff from the parent to also be present in the forked child process. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 12:05:25 2019 From: report at bugs.python.org (Cooper Lees) Date: Sun, 05 May 2019 16:05:25 +0000 Subject: [issue34556] Add --upgrade to venv module In-Reply-To: <1535729151.14.0.56676864532.issue34556@psf.upfronthosting.co.za> Message-ID: <1557072325.81.0.594758942123.issue34556@roundup.psfhosted.org> Change by Cooper Lees : ---------- keywords: +patch pull_requests: +13013 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 12:06:38 2019 From: report at bugs.python.org (Dominik Geldmacher) Date: Sun, 05 May 2019 16:06:38 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557072398.83.0.435248256146.issue36792@roundup.psfhosted.org> Dominik Geldmacher added the comment: I can reproduce it on Python 3.7.3 german Windows10 enterprise Windows fatal exception: code 0xc0000374 Current thread 0x00003bc8 (most recent call first): File "C:\Python37\lib\zipfile.py", line 1757 in writestr ---------- nosy: +Dominik Geldmacher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 12:34:57 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 05 May 2019 16:34:57 +0000 Subject: [issue36793] Do not define unneeded __str__ equal to __repr__ In-Reply-To: <1556975423.86.0.374987997006.issue36793@roundup.psfhosted.org> Message-ID: <1557074097.14.0.122301732111.issue36793@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 12:35:10 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 05 May 2019 16:35:10 +0000 Subject: [issue36793] Do not define unneeded __str__ equal to __repr__ In-Reply-To: <1556975423.86.0.374987997006.issue36793@roundup.psfhosted.org> Message-ID: <1557074110.69.0.24069969805.issue36793@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 12:38:12 2019 From: report at bugs.python.org (Manjusaka) Date: Sun, 05 May 2019 16:38:12 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557074292.65.0.906180034039.issue36792@roundup.psfhosted.org> Manjusaka added the comment: Hi Dominik Geldmacher May I get your system version? 1809 or 1903? I guess maybe it's microsoft error ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 12:51:18 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 16:51:18 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557075078.42.0.884108429042.issue36798@roundup.psfhosted.org> Serhiy Storchaka added the comment: f-strings are defined and used at the same place, as any other expression. You can not save an f-string to a variable, as you can not save a multiplication. But you can save a string which is a result of the f-string evaluation. Perhaps you were fooled by the name of f-strings. It looks as a special kind of strings, but actually it is a kind of expressions, like addition or multiplication. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 12:56:41 2019 From: report at bugs.python.org (Tim Golden) Date: Sun, 05 May 2019 16:56:41 +0000 Subject: [issue36800] Invalid coding error hidden on Windows In-Reply-To: <1557037927.09.0.679611511238.issue36800@roundup.psfhosted.org> Message-ID: <1557075401.07.0.237038827646.issue36800@roundup.psfhosted.org> Tim Golden added the comment: Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)] on win32 I can't reproduce this on Windows. And it does seem an unlikely combination of effect and cause. Do I take it that if you take out all the "logging..." lines, the thing works? ie you do correctly import threading and it shows a reasonable value when you print(threading)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 13:19:38 2019 From: report at bugs.python.org (tegdev) Date: Sun, 05 May 2019 17:19:38 +0000 Subject: [issue23041] csv needs more quoting rules In-Reply-To: <1418402205.61.0.685044268577.issue23041@psf.upfronthosting.co.za> Message-ID: <1557076778.73.0.83887257756.issue23041@roundup.psfhosted.org> tegdev added the comment: The correct handling of None values belongs to the csv module. There is a use case to migrate a DB2 database to PostgreSQL. DB2 has a command line tool "db2 export ..." which produces csv-files. A row ['Hello', null, 'world'] is exported to "Hello,,"world". I would like to read in these exports with python and put it to PostgreSQL. But with the csv library I can't read it in correctly. The input is converted to: ['Hello', '', 'world'] It should read as: ['Hello', None, 'world'] It is pretty easy to write a correct CSV reader with ANTLR but it's terribly slow. And last but not least: if someone writes a list the reading should the identity. Thats not True for the csv libraray. Example: import csv hello_out_lst = ['Hello', None, 'world'] with open('hello.csv', 'w') as ofh: writer = csv.writer(ofh, delimiter=',') writer.writerow(hello_out_lst) with open('hello.csv', 'r') as ifh: reader = csv.reader(ifh, delimiter=',') for row in reader: hello_in_lst = row is_equal = hello_out_lst == hello_in_lst print(f'{hello_out_lst} is equal {hello_in_lst} ? {is_equal}') The result is: ['Hello', None, 'world'] is equal ['Hello', '', 'world'] ? False ---------- nosy: +tegdev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 13:26:54 2019 From: report at bugs.python.org (Emily Morehouse) Date: Sun, 05 May 2019 17:26:54 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557077214.81.0.515256708978.issue36798@roundup.psfhosted.org> Emily Morehouse added the comment: Ah yes, that's what I meant. I was thinking about the confusion between f-strings (evaluated immediately and stored as a string) vs other versions of string formatting which are evaluated when used. I've seen the mix of the two confuse people when evaluating performance. I don't think this is particularly relevant to this issue though, so we can ignore it :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 13:51:12 2019 From: report at bugs.python.org (Dominik Geldmacher) Date: Sun, 05 May 2019 17:51:12 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557078672.32.0.22705443.issue36792@roundup.psfhosted.org> Dominik Geldmacher added the comment: Enterprise 1809 and Professional 1803 (german localized) both reproduce the issue ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 13:56:09 2019 From: report at bugs.python.org (Manjusaka) Date: Sun, 05 May 2019 17:56:09 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557078969.75.0.311509883708.issue36792@roundup.psfhosted.org> Manjusaka added the comment: copy that I will reset my locale setting to figure it out ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 13:56:28 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 05 May 2019 17:56:28 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557078988.1.0.528082531736.issue36798@roundup.psfhosted.org> Stefan Behnel added the comment: FWIW, I think it's equally reasonable to allow assignment expressions directly in f-strings, as it is to require parentheses with a reference to the invalidity of top-level expressions. That makes me lean towards adding a parse-time error message that suggests the right way to do it, and leave it out as a feature for now, because it risks conflicting with ":" as format separator. We do not know yet if we will really need this feature. It's easier to add the feature later, than to remove it again in case we find that it gets in the way more than it helps. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 14:06:32 2019 From: report at bugs.python.org (Mark Green) Date: Sun, 05 May 2019 18:06:32 +0000 Subject: [issue36804] Pythonr fo Message-ID: <1557079592.59.0.449925637296.issue36804@roundup.psfhosted.org> Change by Mark Green : ---------- nosy: Mark Green priority: normal severity: normal status: open title: Pythonr fo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 14:12:42 2019 From: report at bugs.python.org (Mark Green) Date: Sun, 05 May 2019 18:12:42 +0000 Subject: [issue36804] Python for Windows installer Repair option does not repair PIP Message-ID: <1557079962.28.0.542500788373.issue36804@roundup.psfhosted.org> Change by Mark Green : ---------- components: +Installation, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware title: Pythonr fo -> Python for Windows installer Repair option does not repair PIP versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 14:12:56 2019 From: report at bugs.python.org (Mark Green) Date: Sun, 05 May 2019 18:12:56 +0000 Subject: [issue36804] Python for Windows installer Repair option does not repair PIP Message-ID: <1557079976.41.0.248196752033.issue36804@roundup.psfhosted.org> New submission from Mark Green : After installing Python for Windows using the standard installer, run "pip install --upgrade pip", which will damage pip as a result of running through pip.exe rather than python.exe. Both pip and python -m pip will now fail. Rerunning the Python Installer and choosing the Repair option will list PIP as a component, but will not repair it. Using the Modify option will state that PIP is already installed and will thus do nothing if told to install it. The only option is to uninstall and reinstall again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 14:24:30 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 05 May 2019 18:24:30 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1557080670.28.0.125609199666.issue36774@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 14:24:46 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 05 May 2019 18:24:46 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557080686.78.0.983493564139.issue36801@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 14:30:18 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 05 May 2019 18:30:18 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557081018.72.0.0698804542806.issue36798@roundup.psfhosted.org> Eric V. Smith added the comment: Because of the backward compatibility issues, I'm not going to change the f-string parser for this. We'll just need to document the requirements for using parens if you want to use :=. This is similar to the existing documentation about lambdas and f-strings in https://docs.python.org/3/reference/lexical_analysis.html#formatted-string-literals Patches welcome! To be clear: like lambdas, this is just limitation of embedding expressions inside strings, and it's also a limitation because format specs can start with equal signs. It's not a restriction because I think f-strings shouldn't contain "top-level" := expressions. ---------- assignee: eric.smith -> components: +Documentation -Interpreter Core priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 14:30:29 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 05 May 2019 18:30:29 +0000 Subject: [issue36805] Don't close subprocess stream if it's stdin is closed Message-ID: <1557081029.41.0.726970758357.issue36805@roundup.psfhosted.org> New submission from Andrew Svetlov : Closing stdin FD by child stream is a legal operation, there is no reason to close entire subprocess transport immediately. ---------- components: asyncio messages: 341467 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Don't close subprocess stream if it's stdin is closed type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 14:32:02 2019 From: report at bugs.python.org (Eryk Sun) Date: Sun, 05 May 2019 18:32:02 +0000 Subject: [issue36800] Invalid coding error hidden on Windows In-Reply-To: <1557037927.09.0.679611511238.issue36800@roundup.psfhosted.org> Message-ID: <1557081122.47.0.739539983046.issue36800@roundup.psfhosted.org> Eryk Sun added the comment: > Note I am aware the actual problem is "utf8" vs "utf-8". That shouldn't be an issue since "utf8" is an alias. The fact that your test file has LF line endings is an issue. It should be fixed in 3.7.4. See issue 20844. ---------- nosy: +eryksun resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> SyntaxError: encoding problem: iso-8859-1 on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 14:42:05 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 May 2019 18:42:05 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557081725.54.0.532195940162.issue36798@roundup.psfhosted.org> Serhiy Storchaka added the comment: And I think that PEP 572 should be updated too. This is a corner case that was omitted at initial consideration of the PEP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 14:45:56 2019 From: report at bugs.python.org (Charlie Clark) Date: Sun, 05 May 2019 18:45:56 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557081956.62.0.609225674889.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: winver tells me I have 1809. I'm only using Windows in a VM so I'm not that familiar with its innards. Also get the error with WinPython 3.6: Windows fatal exception: code 0xc0000374 Current thread 0x000010c0 (most recent call first): File "C:\Users\charlieclark\WPy64-3680\python-3.6.8.amd64\lib\zipfile.py", line 1658 in writestr File "", line 1 in ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 15:10:04 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 05 May 2019 19:10:04 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557083404.82.0.952523391939.issue36798@roundup.psfhosted.org> Eric V. Smith added the comment: I agree with Serhiy about the need to update PEP 572 to mention this. ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 15:15:37 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 05 May 2019 19:15:37 +0000 Subject: [issue36806] Forbid creating of stream objects outside of asyncio Message-ID: <1557083737.76.0.720112204128.issue36806@roundup.psfhosted.org> New submission from Andrew Svetlov : They were intended to be used by asyncio factories like open_connection from the very beginning but internals was leaked into asyncio top-level namespace. The idea is: 1. provide `_asyncio_internal` keyword-only parameter to leaked classes constructor 2. have it False by default 3. Use `_asyncio_internal=True` when called from asyncio code. 3. Raise DeprecationWarning if `_asyncio_internal` is False ---------- components: asyncio messages: 341472 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Forbid creating of stream objects outside of asyncio versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 15:22:17 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 05 May 2019 19:22:17 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557084137.17.0.66907134447.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: Related to issue bpo-36319 ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 16:16:23 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 05 May 2019 20:16:23 +0000 Subject: [issue36806] Forbid creating of stream objects outside of asyncio In-Reply-To: <1557083737.76.0.720112204128.issue36806@roundup.psfhosted.org> Message-ID: <1557087383.21.0.817044393242.issue36806@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13014 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 16:22:26 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 05 May 2019 20:22:26 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() Message-ID: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> New submission from Guido van Rossum : This came up during today's final PyCon keynote -- IDLE was called out as one of the two editors *not* to use when live-coding on Adafruit's Circuit Playground Express (https://www.adafruit.com/product/3333). I *think* that the problem referred to is that IDLE doesn't guarantee that the bits are actually flushed to disk -- they may linger in the OS filesystem cache. ---------- assignee: terry.reedy components: IDLE messages: 341474 nosy: gvanrossum, terry.reedy priority: normal severity: normal stage: patch review status: open title: IDLE doesn't call os.fsync() type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 16:23:02 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 05 May 2019 20:23:02 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557087782.13.0.724418023365.issue36807@roundup.psfhosted.org> Change by Guido van Rossum : ---------- keywords: +patch pull_requests: +13015 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 17:41:59 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 05 May 2019 21:41:59 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1557071081.05.0.235141315071.issue33725@roundup.psfhosted.org> Message-ID: <5D6A143C-5638-466B-8A4E-EA337B3290E8@python.org> Barry A. Warsaw added the comment: On May 5, 2019, at 11:44, Davin Potts wrote: > > Victor raises an important question: should the *default* start behavior be made consistent across platforms? Yes, I think it should. The pros of consistency and correctness outweigh the breaking change IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 17:59:55 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Sun, 05 May 2019 21:59:55 +0000 Subject: [issue36793] Do not define unneeded __str__ equal to __repr__ In-Reply-To: <1556975423.86.0.374987997006.issue36793@roundup.psfhosted.org> Message-ID: <1557093595.59.0.280595778817.issue36793@roundup.psfhosted.org> Josh Rosenberg added the comment: I like this. Always annoying to explicitly override both __repr__ and __str__ on subclasses of stuff like int when they should be the same. Patch looks good to me; I was originally wondering why some classes were replacing: __str__ = __repr__ with: __str__ = object.__str__ but checking their inheritance chains, it's clear *some* overload is needed for consistency, and using object.__str__ means reverting to the default case where subclasses only need to overload __repr__, rather than forcing all subclasses to overload both. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 18:14:13 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Sun, 05 May 2019 22:14:13 +0000 Subject: [issue36781] Optimize sum() for bools In-Reply-To: <1556876973.98.0.990157093134.issue36781@roundup.psfhosted.org> Message-ID: <1557094453.19.0.392951689565.issue36781@roundup.psfhosted.org> Change by Josh Rosenberg : ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 18:25:59 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Sun, 05 May 2019 22:25:59 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes In-Reply-To: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> Message-ID: <1557095159.93.0.0240622174783.issue36789@roundup.psfhosted.org> Josh Rosenberg added the comment: Minor bikeshed: If updating the documentation, refer to U+0000 as "the null character" or "NUL", not "NULL". Using "NULL" allows for confusion with NULL pointers; "the null character" (the name used in the Unicode standard) or "NUL" (the official three letter abbreviation in ASCII, Unicode too I think) has no such opportunity for confusion. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 19:35:09 2019 From: report at bugs.python.org (Arthur Goldberg) Date: Sun, 05 May 2019 23:35:09 +0000 Subject: [issue36808] Understanding "cannot import name" exception Message-ID: <1557099309.88.0.0800567814981.issue36808@roundup.psfhosted.org> New submission from Arthur Goldberg : I'm attempting to better understand an ImportError: cannot import name '' error by reading the cpython source. But I cannot find this error in the source. The closest I find is in cpython/Python/ceval.c, lines 5060 & 5068, but they both say: cannot import name %R from %R (*) and my message doesn't include the 'from ...'. I'm using: Python 3.6.5 (default, Sep 14 2018, 14:56:31) [GCC 7.3.0] on linux Thanks, Arthur ---------- components: Interpreter Core messages: 341478 nosy: ArthurGoldberg priority: normal severity: normal status: open title: Understanding "cannot import name" exception type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 20:57:04 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 06 May 2019 00:57:04 +0000 Subject: [issue36808] Understanding "cannot import name" exception In-Reply-To: <1557099309.88.0.0800567814981.issue36808@roundup.psfhosted.org> Message-ID: <1557104224.97.0.573298833408.issue36808@roundup.psfhosted.org> Eryk Sun added the comment: The issue tracker is not the right forum for questions about Python development or CPython internals. You can ask for help on the python-list mailing list. ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 21:27:58 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 06 May 2019 01:27:58 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557106078.59.0.202325447668.issue36807@roundup.psfhosted.org> Guido van Rossum added the comment: If/when you accept this we should also backport it as far as we can. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 21:44:48 2019 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 06 May 2019 01:44:48 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes In-Reply-To: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> Message-ID: <1557107088.05.0.24779517739.issue36789@roundup.psfhosted.org> Change by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 23:27:40 2019 From: report at bugs.python.org (Furzoom) Date: Mon, 06 May 2019 03:27:40 +0000 Subject: [issue36809] Crash for test test_importlib Message-ID: <1557113260.01.0.872364127661.issue36809@roundup.psfhosted.org> New submission from Furzoom : 0:06:04 load avg: 0.73 [185/416] test_importlib Fatal Python error: Segmentation fault Current thread 0x00002b774411ee40 (most recent call first): File "/home/mn/Downloads/Python-3.7.3/Lib/test/support/__init__.py", line 1543 in gc_collect File "/home/mn/Downloads/Python-3.7.3/Lib/test/test_importlib/test_locks.py", line 132 in test_all_locks File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/case.py", line 615 in run File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/case.py", line 663 in __call__ File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/suite.py", line 122 in run File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/suite.py", line 84 in __call__ File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/suite.py", line 122 in run File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/suite.py", line 84 in __call__ File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/suite.py", line 122 in run File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/suite.py", line 84 in __call__ File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/suite.py", line 122 in run File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/suite.py", line 84 in __call__ File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/suite.py", line 122 in run File "/home/mn/Downloads/Python-3.7.3/Lib/unittest/suite.py", line 84 in __call__ File "/home/mn/Downloads/Python-3.7.3/Lib/test/support/testresult.py", line 162 in run File "/home/mn/Downloads/Python-3.7.3/Lib/test/support/__init__.py", line 1899 in _run_suite File "/home/mn/Downloads/Python-3.7.3/Lib/test/support/__init__.py", line 1995 in run_unittest File "/home/mn/Downloads/Python-3.7.3/Lib/test/libregrtest/runtest.py", line 178 in test_runner File "/home/mn/Downloads/Python-3.7.3/Lib/test/libregrtest/runtest.py", line 182 in runtest_inner File "/home/mn/Downloads/Python-3.7.3/Lib/test/libregrtest/runtest.py", line 137 in runtest File "/home/mn/Downloads/Python-3.7.3/Lib/test/libregrtest/main.py", line 408 in run_tests_sequential File "/home/mn/Downloads/Python-3.7.3/Lib/test/libregrtest/main.py", line 515 in run_tests File "/home/mn/Downloads/Python-3.7.3/Lib/test/libregrtest/main.py", line 619 in _main File "/home/mn/Downloads/Python-3.7.3/Lib/test/libregrtest/main.py", line 586 in main File "/home/mn/Downloads/Python-3.7.3/Lib/test/libregrtest/main.py", line 640 in main File "/home/mn/Downloads/Python-3.7.3/Lib/test/regrtest.py", line 46 in _main File "/home/mn/Downloads/Python-3.7.3/Lib/test/regrtest.py", line 50 in File "/home/mn/Downloads/Python-3.7.3/Lib/runpy.py", line 85 in _run_code File "/home/mn/Downloads/Python-3.7.3/Lib/runpy.py", line 193 in _run_module_as_main ---------- components: Tests files: import_test.log messages: 341481 nosy: furzoom priority: normal severity: normal status: open title: Crash for test test_importlib type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48301/import_test.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 23:32:56 2019 From: report at bugs.python.org (Furzoom) Date: Mon, 06 May 2019 03:32:56 +0000 Subject: [issue36809] Crash for test test_importlib In-Reply-To: <1557113260.01.0.872364127661.issue36809@roundup.psfhosted.org> Message-ID: <1557113576.21.0.441605681521.issue36809@roundup.psfhosted.org> Furzoom added the comment: Thread 1 (Thread 0x2b2679113e00 (LWP 22373)): #0 0x00002b2679c56c37 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00002b2679c5a028 in __GI_abort () at abort.c:89 #2 0x00000000004571ef in fatal_error (prefix=prefix at entry=0x5d4190 <__func__.13297> "_PySys_BeginInit", msg=msg at entry=0x5d3d4f "can't initialize sys module", status=status at entry=-1) at Python/pylifecycle.c:2179 #3 0x000000000045747c in _Py_FatalInitError (err=...) at Python/pylifecycle.c:2198 #4 0x000000000056c372 in pymain_init (pymain=pymain at entry=0x7fffb85610a0) at Modules/main.c:3001 #5 0x000000000056cc79 in pymain_main (pymain=pymain at entry=0x7fffb85610a0) at Modules/main.c:3033 #6 0x000000000056d38c in _Py_UnixMain (argc=, argv=) at Modules/main.c:3073 #7 0x00002b2679c41f45 in __libc_start_main (main=0x4a2790
, argc=6, argv=0x7fffb85611e8, init=, fini=, rtld_fini=, stack_end=0x7fffb85611d8) at libc-start.c:287 #8 0x000000000056a0b6 in _start () ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 5 23:49:48 2019 From: report at bugs.python.org (sehnsucht13) Date: Mon, 06 May 2019 03:49:48 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1557114588.15.0.991591730275.issue36799@roundup.psfhosted.org> Change by sehnsucht13 : ---------- keywords: +patch pull_requests: +13016 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 00:06:23 2019 From: report at bugs.python.org (sehnsucht13) Date: Mon, 06 May 2019 04:06:23 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1557115583.83.0.272354140079.issue36799@roundup.psfhosted.org> sehnsucht13 added the comment: I have made a PR for this. The only delay is that my CLA needs to be approved. ---------- nosy: +sehnsucht13 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 01:53:11 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 06 May 2019 05:53:11 +0000 Subject: [issue36684] codecov.io code coverage has not updated since 2019-04-13 In-Reply-To: <1555804519.07.0.0840911433327.issue36684@roundup.psfhosted.org> Message-ID: <1557121991.72.0.182562981884.issue36684@roundup.psfhosted.org> Inada Naoki added the comment: FYI, https://github.com/python/cpython/pull/7773#issuecomment-398262396 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 02:17:33 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 06 May 2019 06:17:33 +0000 Subject: [issue36684] codecov.io code coverage has not updated since 2019-04-13 In-Reply-To: <1555804519.07.0.0840911433327.issue36684@roundup.psfhosted.org> Message-ID: <1557123453.42.0.585616082805.issue36684@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +13018 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 02:30:35 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 May 2019 06:30:35 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557124235.5.0.683529766839.issue36807@roundup.psfhosted.org> Terry J. Reedy added the comment: This seems like a good idea. I am assuming that open('somename', ...) always result in a file object with .fileno defined. Although I am mostly not touching 2.7, this should be easy to do. It will have to be done manually since iomenu was then IOBinding. ---------- versions: +Python 2.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 03:23:58 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 May 2019 07:23:58 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557127438.79.0.0144008416965.issue36807@roundup.psfhosted.org> Terry J. Reedy added the comment: OS and disk interaction is not something I know a lot about. I don't know how long different OSes take to write things out by themselves, and therefore how much real danger there is of loosing data. However, IDLE is used in places where power is less reliable than it is for me, and if not doing this makes IDLE look bad, and if it does not noticeably delay running a file (and I expect not), then it seems like a good idea. Digging further, Kurt Kaiser added f.flush in 3/19/2006. On 2013-08-04, for #18151, Serhiy submitted a patch for 3.3 with the comment "Here is a patch which replace the "open ... close" idiom to the "with open" idiom in IDLE." It replaced f = open(filename, "wb") f.write(chars) f.flush() f.close() with with open(filename, "wb") as f: f.write(chars) I have no idea why f.flush was deleted. An oversight? There is no discussion on the issue. I merged Serhiy's patch and backported to 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 03:34:24 2019 From: report at bugs.python.org (Yuval Greenfield) Date: Mon, 06 May 2019 07:34:24 +0000 Subject: [issue36800] Invalid coding error hidden on Windows In-Reply-To: <1557037927.09.0.679611511238.issue36800@roundup.psfhosted.org> Message-ID: <1557128064.16.0.601265966585.issue36800@roundup.psfhosted.org> Yuval Greenfield added the comment: Replacing `utf8` with `utf-8` is the best workaround in my situation. Using the `utf8` alias is required to reproduce the issue based on my testing and the cited issue (https://bugs.python.org/issue20844). Thank you for the reference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 03:34:51 2019 From: report at bugs.python.org (Lovasoa) Date: Mon, 06 May 2019 07:34:51 +0000 Subject: [issue36810] Recursive type annotations do not work in documentation tests Message-ID: <1557128091.8.0.92390495342.issue36810@roundup.psfhosted.org> New submission from Lovasoa : When using documentations tests to test a function that uses typing.get_type_hints, an error is thrown. The error is thrown when trying to get the type hints for a class that was defined in a documentation test. I was able to reproduce it both on current and PEP563 type annotations: https://gist.github.com/lovasoa/74ea62a89f5bf073b0e0c2f222008ae3 ---------- components: Interpreter Core files: test_recursive.py messages: 341489 nosy: lovasoa priority: normal severity: normal status: open title: Recursive type annotations do not work in documentation tests type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48302/test_recursive.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 03:42:44 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 May 2019 07:42:44 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557128564.17.0.380001807047.issue36807@roundup.psfhosted.org> Terry J. Reedy added the comment: The io doc says for IOBase flush() Flush the write buffers of the stream if applicable. This does nothing for read-only and non-blocking streams. and for BufferedWriter flush() Force bytes held in the buffer into the raw stream. A BlockingIOError should be raised if the raw stream blocks. On 3.x, open(filename, "wb"), used in writefile(), returns a BufferedWriter. So it seems than an exception is possible, which would crash IDLE without try-except. Serhiy, please read the previous message(s). Do you remember if you intended to remove the f.flush in writefile(), which Guido proposes to restore? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 03:59:18 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 06 May 2019 07:59:18 +0000 Subject: [issue36809] Crash for test test_importlib In-Reply-To: <1557113260.01.0.872364127661.issue36809@roundup.psfhosted.org> Message-ID: <1557129558.62.0.294672524083.issue36809@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 04:06:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 08:06:40 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557130000.42.0.641912705253.issue36807@roundup.psfhosted.org> Serhiy Storchaka added the comment: f.flush() was removed because it is redundant if followed by f.close(). f.close() calls f.flush() internally. f.close() is now called implicitly in __exit__() when exit from the with statement. Guido restores f.flush() because he needs to flush the buffer of the buffered stream before calling os.fsync(f.fileno()). And f.fileno() can be used only for not closed file. So this change looks reasonable to me. I do not know what are the troubles with Adafruit's Circuit Playground Express. I think that flushing the OS filesystem cache is the work of the OS itself, and lingering the data in the OS-wide cache should not affect userspace. But maybe there are specific circumstences, for example if IDLE and the consumer of Python source files are ran on different machines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 07:28:16 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 06 May 2019 11:28:16 +0000 Subject: [issue36790] test_asyncio fails with application verifier! In-Reply-To: <1556928611.19.0.664021052346.issue36790@roundup.psfhosted.org> Message-ID: <1557142096.34.0.472082965743.issue36790@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- components: +asyncio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 07:30:30 2019 From: report at bugs.python.org (top worker) Date: Mon, 06 May 2019 11:30:30 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557142229.99.0.816429861116.issue1054@roundup.psfhosted.org> top worker added the comment: Thank you so much guys... it really helped a lot... amazing post ---------- nosy: +topworker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 08:14:21 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 06 May 2019 12:14:21 +0000 Subject: [issue28002] Some f-strings do not round trip through Tools/parser/test_unparse.py In-Reply-To: <1473268698.62.0.800338957351.issue28002@psf.upfronthosting.co.za> Message-ID: <1557144861.64.0.791622168236.issue28002@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- assignee: -> eric.smith versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 08:17:40 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 06 May 2019 12:17:40 +0000 Subject: [issue36809] Crash for test test_importlib In-Reply-To: <1557113260.01.0.872364127661.issue36809@roundup.psfhosted.org> Message-ID: <1557145060.38.0.949891836589.issue36809@roundup.psfhosted.org> Change by Eric Snow : ---------- nosy: +brett.cannon, eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 08:29:10 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 May 2019 12:29:10 +0000 Subject: [issue30793] Parsing error on f-string-expressions containing strings with backslash In-Reply-To: <1498676293.91.0.9735369648.issue30793@psf.upfronthosting.co.za> Message-ID: <1557145750.76.0.938354258487.issue30793@roundup.psfhosted.org> Eric V. Smith added the comment: I'm going to close this. Either this problem is going to be addressed independently of this issue, or it's never going to be fixed. Either way, we don't need this issue to be open in order to come to a resolution. ---------- resolution: -> postponed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 08:38:01 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 06 May 2019 12:38:01 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557146281.66.0.862429600242.issue36807@roundup.psfhosted.org> Guido van Rossum added the comment: That board implements a USB filesystem that you plug into a computer (via a cable). The control software on the board watches this USB filesystem, and when the "code.py" file changes it reloads that file and executes it with CircuitPython (Adafruit's fork of MicroPython). So the recommended workflow for the user is: edit the code to program a LED blinking pattern (for example); save the file; watch the LEDs on the board blink in the programmed pattern. Repeat with other changes. Endless fun. Where IDLE currently doesn't cooperate is that after a save operation, the OS kernel doesn't immediately flush the bytes to the USB filesystem, so the board doesn't see the changes to the file until the OS cache gets flushed at the kernel's whim. (The board uses very low level fs operations because it's an 8-bit microprocessor with very little memory and therefore has very primitive software.) The os.fsync() call ought to fix it by forcing the kernel to flush the bytes to the USB filesystem right away. This also helps when the user saves the file and immediately pulls out the USB cable. The OS will issue a warning in an attempt to train users to "Eject" first, but beginners are prone to making this mistake repeatedly. Hope this helps. You should really watch @nnja's keynote once it goes online, it was really cool. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 08:39:26 2019 From: report at bugs.python.org (Larry Hastings) Date: Mon, 06 May 2019 12:39:26 +0000 Subject: [issue16024] Doc cleanup regarding path=fd, dir_fd, follow_symlinks, etc In-Reply-To: <1348500599.22.0.118178834994.issue16024@psf.upfronthosting.co.za> Message-ID: <1557146366.05.0.116800327961.issue16024@roundup.psfhosted.org> Larry Hastings added the comment: New changeset e152169da95b52fa41931572bc90857253c4a5dd by larryhastings (Cheryl Sabella) in branch 'master': bpo-16024: Doc cleanup regarding path_fd, dir_fd, follow_symlinks (GH-5505) https://github.com/python/cpython/commit/e152169da95b52fa41931572bc90857253c4a5dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 08:40:04 2019 From: report at bugs.python.org (Larry Hastings) Date: Mon, 06 May 2019 12:40:04 +0000 Subject: [issue16024] Doc cleanup regarding path=fd, dir_fd, follow_symlinks, etc In-Reply-To: <1348500599.22.0.118178834994.issue16024@psf.upfronthosting.co.za> Message-ID: <1557146404.4.0.886443031092.issue16024@roundup.psfhosted.org> Larry Hastings added the comment: At last! Thanks for reviving it, Cheryl! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 09:43:04 2019 From: report at bugs.python.org (Edison Abahurire) Date: Mon, 06 May 2019 13:43:04 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1557150184.03.0.297522393732.issue36782@roundup.psfhosted.org> Edison Abahurire added the comment: I have done PyDateTime_FromDateAndTime. I'm moving on to add PyDateTime_FromDateAndTimeAndFold (plus documentation for fold as requested in https://bugs.python.org/issue36783) before making a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 09:44:29 2019 From: report at bugs.python.org (Filip Bengtsson) Date: Mon, 06 May 2019 13:44:29 +0000 Subject: [issue20906] Issues in Unicode HOWTO In-Reply-To: <1394702187.81.0.00522221343959.issue20906@psf.upfronthosting.co.za> Message-ID: <1557150269.15.0.0913213719721.issue20906@roundup.psfhosted.org> Change by Filip Bengtsson : ---------- pull_requests: +13019 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 09:45:14 2019 From: report at bugs.python.org (Edison Abahurire) Date: Mon, 06 May 2019 13:45:14 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557150314.36.0.656386104685.issue36783@roundup.psfhosted.org> Edison Abahurire added the comment: I'm working on this because I think it should be done complementarily with adding the test for PyDateTime_FromDateAndTimeAndFold at https://bugs.python.org/issue36782. #Pycon2019 sprints ---------- nosy: +edison.abahurire _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 09:46:57 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 06 May 2019 13:46:57 +0000 Subject: [issue35393] Typo in documentation In-Reply-To: <1543865960.77.0.788709270274.issue35393@psf.upfronthosting.co.za> Message-ID: <1557150417.7.0.021489860963.issue35393@roundup.psfhosted.org> Cheryl Sabella added the comment: This doc page was re-written as part of bpo-20906, so I am closing this as out of date. ---------- nosy: +cheryl.sabella resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Issues in Unicode HOWTO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 09:51:58 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 06 May 2019 13:51:58 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1557150718.33.0.0404954918506.issue36710@roundup.psfhosted.org> Steve Dower added the comment: I think Neil is right, though I believe we'll have a clear enough internal boundary that we should only rarely have to maintain TSS for the sake of legacy callers. The build option should just turn off the entire legacy API, which would also make it easier to remove one day. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 09:52:28 2019 From: report at bugs.python.org (Logan Jones) Date: Mon, 06 May 2019 13:52:28 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557150748.58.0.775546255979.issue36798@roundup.psfhosted.org> Logan Jones added the comment: I'm going to try to tackle this. I'm not exactly sure how to go about updating the PEP, but the docs should have a PR in the next 15 minutes or so. ---------- nosy: +Logan Jones _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 09:54:35 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 13:54:35 +0000 Subject: [issue28002] Some f-strings do not round trip through Tools/parser/test_unparse.py In-Reply-To: <1473268698.62.0.800338957351.issue28002@psf.upfronthosting.co.za> Message-ID: <1557150875.95.0.0418972995783.issue28002@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is the same problem with annotations. >>> from __future__ import annotations >>> def f() -> X[f'''{"'"}''']: pass ... >>> print(f.__annotations__['return']) X[f'{"\'"}'] You can look at https://github.com/berkerpeksag/astor. Maybe this problem is solved in that project. ---------- nosy: +berker.peksag, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:02:00 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 06 May 2019 14:02:00 +0000 Subject: [issue33039] int() and math.trunc don't accept objects that only define __index__ In-Reply-To: <1520672231.04.0.467229070634.issue33039@psf.upfronthosting.co.za> Message-ID: <1557151320.58.0.745606908532.issue33039@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +13020 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:04:08 2019 From: report at bugs.python.org (Charlie Clark) Date: Mon, 06 May 2019 14:04:08 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557151448.82.0.0422865992454.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: I can confirm the error is caused by time.localtime(time.time()) as indicated by the related bug. I've also found the crash log. It's in C:\ProgramData\Microsoft\Windows\WER\ReportQueue on my machine. Well, at least that's all I can find. ---------- Added file: https://bugs.python.org/file48303/Report.wer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:05:51 2019 From: report at bugs.python.org (Logan Jones) Date: Mon, 06 May 2019 14:05:51 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557151551.5.0.740968112616.issue36798@roundup.psfhosted.org> Change by Logan Jones : ---------- keywords: +patch pull_requests: +13021 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:08:43 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 06 May 2019 14:08:43 +0000 Subject: [issue34682] Typo reports on docs@ In-Reply-To: <1536943787.72.0.956365154283.issue34682@psf.upfronthosting.co.za> Message-ID: <1557151723.51.0.112510587253.issue34682@roundup.psfhosted.org> Cheryl Sabella added the comment: This is a good first issue even though there are multiple changes. Some of the changes are no longer needed since the docs have changed, so please check the current comments and the current docs to see what still needs to be applied. ---------- keywords: +easy nosy: +cheryl.sabella type: -> enhancement versions: -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:11:13 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 06 May 2019 14:11:13 +0000 Subject: [issue33039] int() and math.trunc don't accept objects that only define __index__ In-Reply-To: <1520672231.04.0.467229070634.issue33039@psf.upfronthosting.co.za> Message-ID: <1557151873.07.0.266148452873.issue33039@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Cheryl, thanks for the ping. I wasn't sure my patch was correct but reading typeobject.c:add_operators(), it is actually more straight-forward than I thought. Serhiy Storchaka: This is indeed a duplicate of issue20092. I believe the solution proposed by Nick Coghlan is better than the one of Amitava Bhattacharyya, "adding a call to `nb_index` (if that slot exists) in `_PyLong_FromNbInt`" though. One thing to note regarding the proposed patch: the following stops to work and raises a RecursionError since __index__ == __int__: class MyInt(int): def __index__(self): return int(self) + 1 I changed test_int_subclass_with_index() as `int(self) + 1` is the same thing as `self + 1` for int subclasses. I don't think this sort of code should appear in the wild but if you think it is important not to break compatibility here, I think I could check for number subclasses before overriding __index__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:12:08 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 06 May 2019 14:12:08 +0000 Subject: [issue33340] Inaccurate docs on `import` behaviour In-Reply-To: <1524477096.11.0.682650639539.issue33340@psf.upfronthosting.co.za> Message-ID: <1557151928.89.0.833871752472.issue33340@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +brett.cannon type: behavior -> enhancement versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:23:12 2019 From: report at bugs.python.org (Divya Gorantla) Date: Mon, 06 May 2019 14:23:12 +0000 Subject: [issue34682] Typo reports on docs@ In-Reply-To: <1536943787.72.0.956365154283.issue34682@psf.upfronthosting.co.za> Message-ID: <1557152592.26.0.940207213548.issue34682@roundup.psfhosted.org> Divya Gorantla added the comment: I'll be working on this issue ---------- nosy: +divyag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:27:22 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 06 May 2019 14:27:22 +0000 Subject: [issue36811] Warning when compiling _elementree.c Message-ID: <1557152842.63.0.0923910614914.issue36811@roundup.psfhosted.org> New submission from St?phane Wirtel : Hi Stefan, When I compile the last master, I get this warning. Could do you try? Thanks /home/stephane/src/github.com/python/cpython/Include -I/home/stephane/src/github.com/python/cpython -c /home/stephane/src/github.com/python/cpython/Modules/_elementtree.c -o build/temp.linux-x86_64-3.8-pydebug/home/stephane/src/github.com/python/cpython/Modules/_elementtree.o /home/stephane/src/github.com/python/cpython/Modules/_elementtree.c: In function ?checkpath?: /home/stephane/src/github.com/python/cpython/Modules/_elementtree.c:1174:44: warning: suggest parentheses around ?&&? within ?||? [-Wparentheses] p[1] == '}' || p[1] == '*' && p[2] == '}')) { ~~~~~~~~~~~~^~~~~~~~~~~~~~ ---------- assignee: scoder components: Build messages: 341507 nosy: matrixise, scoder priority: normal severity: normal status: open title: Warning when compiling _elementree.c versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:29:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 14:29:29 +0000 Subject: [issue33039] int() and math.trunc don't accept objects that only define __index__ In-Reply-To: <1520672231.04.0.467229070634.issue33039@psf.upfronthosting.co.za> Message-ID: <1557152969.16.0.410396517555.issue33039@roundup.psfhosted.org> Serhiy Storchaka added the comment: Then let to continue the discussion on the older issue which has larger discussion. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:30:46 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 14:30:46 +0000 Subject: [issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not In-Reply-To: <1388260592.79.0.323683192221.issue20092@psf.upfronthosting.co.za> Message-ID: <1557153046.49.0.0596607072079.issue20092@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +13022 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:31:39 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 06 May 2019 14:31:39 +0000 Subject: [issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not In-Reply-To: <1388260592.79.0.323683192221.issue20092@psf.upfronthosting.co.za> Message-ID: <1557153099.24.0.735407105049.issue20092@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- pull_requests: +13023 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:38:54 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 14:38:54 +0000 Subject: [issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not In-Reply-To: <1388260592.79.0.323683192221.issue20092@psf.upfronthosting.co.za> Message-ID: <1557153534.25.0.7903204122.issue20092@roundup.psfhosted.org> Serhiy Storchaka added the comment: See also the discussion on the duplicated issue33039. Few months ago I wrote the PR that makes constructors of int, float and complex to fall back to __index__ if corresponding special methods __int__, __float__ and __complex__ are not defined. I did not exposed it to public because binding __int__ to __index__ looks better to me. But perhaps some tests from that PR can be used in an alternate PR. ---------- components: +Interpreter Core nosy: +serhiy.storchaka versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:39:37 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 06 May 2019 14:39:37 +0000 Subject: [issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames In-Reply-To: <1556724007.57.0.489851634937.issue36771@roundup.psfhosted.org> Message-ID: <1557153577.38.0.668409377927.issue36771@roundup.psfhosted.org> St?phane Wirtel added the comment: And another solution, you could use the pathlib.Path class for your project. Have a nice day, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:42:26 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 14:42:26 +0000 Subject: [issue35534] SIGSEGV in stackdepth_walk In-Reply-To: <1545220383.87.0.788709270274.issue35534@psf.upfronthosting.co.za> Message-ID: <1557153746.16.0.949238546038.issue35534@roundup.psfhosted.org> anthony shaw added the comment: stackdepth_walk no longer exists in Python 3, this is a 2.7 specific issue. opcode_stack_effect in compile.c will have the expected stack effect. If there is a mismatch between the Opcodes compiled with the distribution and the ones in the compile.c opcode_stack_effect, it can cause a crash. Ensure that `make regen-all` is run before compiling with a clean build to avoid this. ---------- nosy: +anthony shaw versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:42:37 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 06 May 2019 14:42:37 +0000 Subject: [issue28002] Some f-strings do not round trip through Tools/parser/test_unparse.py In-Reply-To: <1473268698.62.0.800338957351.issue28002@psf.upfronthosting.co.za> Message-ID: <1557153757.32.0.505702010024.issue28002@roundup.psfhosted.org> R?mi Lapeyre added the comment: The issue is also present in Astor: Python 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> tree = ast.parse(""" ... f'''{"'"}''' ... """) >>> import astor >>> astor.to_source(tree) 'f"""{"\'"}"""\n' >>> f"""{"\'"}""" File "", line 1 SyntaxError: f-string expression part cannot include a backslash The issue comes too from calling repr to format the inner string as it does not try to minimize the number of \. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:45:03 2019 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 06 May 2019 14:45:03 +0000 Subject: [issue36811] Warning when compiling _elementree.c In-Reply-To: <1557152842.63.0.0923910614914.issue36811@roundup.psfhosted.org> Message-ID: <1557153903.69.0.530299811283.issue36811@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch pull_requests: +13024 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:45:06 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 06 May 2019 14:45:06 +0000 Subject: [issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames In-Reply-To: <1556724007.57.0.489851634937.issue36771@roundup.psfhosted.org> Message-ID: <1557153906.54.0.312751277088.issue36771@roundup.psfhosted.org> St?phane Wirtel added the comment: I would like to have the advices of Serhiy. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:47:02 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 06 May 2019 14:47:02 +0000 Subject: [issue29164] make test always fail at 218/405 ( AssertionError: ', ' not found in '1234.5' ) In-Reply-To: <1483582865.63.0.483903091008.issue29164@psf.upfronthosting.co.za> Message-ID: <1557154022.73.0.494362238305.issue29164@roundup.psfhosted.org> Cheryl Sabella added the comment: I'm going to close this as out of date since the OP didn't provide the requested additional information. Please re-open if it can still be recreated. ---------- nosy: +cheryl.sabella resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 10:48:37 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 14:48:37 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1557154117.56.0.891886390009.issue36780@roundup.psfhosted.org> Brian Quinlan added the comment: >> The current behavior is explicitly documented, so presumably >> it can't be (easily) changed And it isn't clear that it would be desirable to change this even if it were possible - doing structured resource clean-up seems consistent with the rest of Python. That being said, I can see the user case for this. If you added this as an argument to shutdown() then you'd probably also have to add it as an option to the constructors (for people using Executors as context managers). But, if you have to add it to the constructor anyway, you may as well *only* add it to the constructor. I'll let an active maintainer weigh in on whether, on balance, they think that this functionality is worth complicating the API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:01:33 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 15:01:33 +0000 Subject: [issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames In-Reply-To: <1556724007.57.0.489851634937.issue36771@roundup.psfhosted.org> Message-ID: <1557154893.31.0.614655970912.issue36771@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with St?phane. The boolean option for changing the type of the returned value is considered a bad design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:02:23 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 15:02:23 +0000 Subject: [issue34214] Pylint recusion stack overflow abort In-Reply-To: <1532463381.11.0.56676864532.issue34214@psf.upfronthosting.co.za> Message-ID: <1557154943.67.0.489941931318.issue34214@roundup.psfhosted.org> anthony shaw added the comment: I agree with Jerome, that handling recursion errors is a part of a 3rd party package and not a bug with CPython. ---------- nosy: +anthony shaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:03:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 May 2019 15:03:00 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557154980.74.0.933285855681.issue36778@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13025 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:03:31 2019 From: report at bugs.python.org (Matthew Tanous) Date: Mon, 06 May 2019 15:03:31 +0000 Subject: [issue36812] posix_spawnp returns error when used with file_actions Message-ID: <1557155011.55.0.26778375432.issue36812@roundup.psfhosted.org> New submission from Matthew Tanous : Ran into this on macOS while trying to play around with the new posix_spawn bindings. It appears to me that the file_actions path is not what is being used by file_actions here. It may be that I am misunderstanding something, but I thought I would bring it up. Python 3.8.0a3 (v3.8.0a3:9a448855b5, Mar 25 2019, 17:05:20) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> file_actions = [(os.POSIX_SPAWN_OPEN, 1, '.tmp/temp_file', os.O_CREAT | os.O_RDWR, 777)] >>> os.posix_spawnp('whoami', ['whoami'], file_actions=file_actions) Traceback (most recent call last): File "", line 1, in TypeError: posix_spawnp() takes exactly 3 positional arguments (2 given) >>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=file_actions) Traceback (most recent call last): File "", line 1, in PermissionError: [Errno 13] Permission denied: 'whoami' ---------- components: Library (Lib) messages: 341518 nosy: Matthew Tanous priority: normal severity: normal status: open title: posix_spawnp returns error when used with file_actions type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:03:59 2019 From: report at bugs.python.org (Bar Harel) Date: Mon, 06 May 2019 15:03:59 +0000 Subject: [issue36813] QueueListener not calling task_done upon termination Message-ID: <1557155039.79.0.434860875914.issue36813@roundup.psfhosted.org> New submission from Bar Harel : QueueListener does not call task_done upon termination, causing an unsuspecting thread to deadlock. Steps to reproduce: >>> import queue >>> q = queue.Queue() >>> from logging.handlers import QueueListener >>> h = QueueListener(q) >>> h.start() >>> h.stop() # Goodbye cruel world! >>> q.join() Fixing and uploading a patch as we speak. ---------- components: Library (Lib) messages: 341519 nosy: bar.harel priority: normal severity: normal status: open title: QueueListener not calling task_done upon termination type: behavior versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:04:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 May 2019 15:04:08 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557155048.81.0.140278071887.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: Paul Monson: I'm unable to reproduce exactly your issue, but I tried to reproduce it partially using PYTHONIOENCODING=cp65001. My PR 13110 avoids "import functools" at startup. Can you please try it and check if it fix test_site? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:04:16 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 06 May 2019 15:04:16 +0000 Subject: [issue34214] Pylint recusion stack overflow abort In-Reply-To: <1532463381.11.0.56676864532.issue34214@psf.upfronthosting.co.za> Message-ID: <1557155056.3.0.33166370881.issue34214@roundup.psfhosted.org> Cheryl Sabella added the comment: Thank you for the research. I'm closing this as third party. ---------- nosy: +cheryl.sabella resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:05:56 2019 From: report at bugs.python.org (Matthew Tanous) Date: Mon, 06 May 2019 15:05:56 +0000 Subject: [issue36814] posix_spawn explicit file_actions=None throws error Message-ID: <1557155156.27.0.0390065046289.issue36814@roundup.psfhosted.org> New submission from Matthew Tanous : Allowing posix_spawn file_actions to default to None works, but explicitly setting it throws a TypeError: Python 3.8.0a3 (v3.8.0a3:9a448855b5, Mar 25 2019, 17:05:20) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=None) Traceback (most recent call last): File "", line 1, in TypeError: file_actions must be a sequence or None This required me to default to an empty sequence to complete it: >>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=[]) 6308 ---------- components: Library (Lib) messages: 341522 nosy: Matthew Tanous priority: normal severity: normal status: open title: posix_spawn explicit file_actions=None throws error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:06:27 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 06 May 2019 15:06:27 +0000 Subject: [issue36813] QueueListener not calling task_done upon termination In-Reply-To: <1557155039.79.0.434860875914.issue36813@roundup.psfhosted.org> Message-ID: <1557155187.23.0.658746262608.issue36813@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +rhettinger stage: -> needs patch versions: -Python 3.6, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:07:56 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 06 May 2019 15:07:56 +0000 Subject: [issue36717] Allow retrieval of return value from the target of a threading.Thread In-Reply-To: <1556151774.22.0.129640685398.issue36717@roundup.psfhosted.org> Message-ID: <1557155276.61.0.0909345843335.issue36717@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:08:46 2019 From: report at bugs.python.org (redshiftzero) Date: Mon, 06 May 2019 15:08:46 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes In-Reply-To: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> Message-ID: <1557155326.77.0.382481764915.issue36789@roundup.psfhosted.org> Change by redshiftzero : ---------- keywords: +patch pull_requests: +13026 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:13:28 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 06 May 2019 15:13:28 +0000 Subject: [issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames In-Reply-To: <1556724007.57.0.489851634937.issue36771@roundup.psfhosted.org> Message-ID: <1557155608.77.0.327183542641.issue36771@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your contribution but as discussed in this issue, we prefer to have a new function and not a new boolean flag. Here is my suggestions. * Create an other PR where you add a new function * Change the title of this issue. Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:15:34 2019 From: report at bugs.python.org (CJ Kucera) Date: Mon, 06 May 2019 15:15:34 +0000 Subject: [issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames In-Reply-To: <1556724007.57.0.489851634937.issue36771@roundup.psfhosted.org> Message-ID: <1557155734.12.0.796777242756.issue36771@roundup.psfhosted.org> CJ Kucera added the comment: Will do, thanks for the input! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:19:17 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 15:19:17 +0000 Subject: [issue31372] Add SSLSocket.get_verify_result() In-Reply-To: <1504734544.0.0.0583935394089.issue31372@psf.upfronthosting.co.za> Message-ID: <1557155957.0.0.525625685229.issue31372@roundup.psfhosted.org> anthony shaw added the comment: Please review the PR again, some of the code no longer applies as it targets master and the PR is quite old. ---------- nosy: +anthony shaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:22:53 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 06 May 2019 15:22:53 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557156173.86.0.980592165588.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: So does that mean that simply doing: import locale, time locale.setlocale(locale.LC_ALL, 'de_DE') time.localtime(time.time()) is enough to trigger the heap corruption? If yes, then what is the output of: import locale, time locale.setlocale(locale.LC_ALL, 'de_DE') time.strftime('%Z') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:25:07 2019 From: report at bugs.python.org (Logan Jones) Date: Mon, 06 May 2019 15:25:07 +0000 Subject: [issue36022] [Security] logging.config should not use eval() In-Reply-To: <1550489368.54.0.864409036165.issue36022@roundup.psfhosted.org> Message-ID: <1557156307.59.0.357125239875.issue36022@roundup.psfhosted.org> Logan Jones added the comment: I'd like to work on this during the Pycon sprints ---------- nosy: +loganasherjones _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:27:10 2019 From: report at bugs.python.org (Dustin Mendoza) Date: Mon, 06 May 2019 15:27:10 +0000 Subject: [issue36766] Typos in docs and code comments In-Reply-To: <1556716347.32.0.805084032343.issue36766@roundup.psfhosted.org> Message-ID: <1557156430.88.0.22755379777.issue36766@roundup.psfhosted.org> Dustin Mendoza added the comment: I'd like to work on this for the mentored Sprints ---------- nosy: +Giant_Robato _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:28:55 2019 From: report at bugs.python.org (Charlie Clark) Date: Mon, 06 May 2019 15:28:55 +0000 Subject: [issue36792] zipfile.writestr causes a Python crash on Windows if the locale is set In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557156535.5.0.33617657797.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: import time, locale locale.setlocale(locale.LC_ALL, 'de_DE') 'de_DE' time.strftime("%Z") aborted (disconnected) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:29:48 2019 From: report at bugs.python.org (Gus Goulart) Date: Mon, 06 May 2019 15:29:48 +0000 Subject: [issue36777] unittest discover throws TypeError on empty packages In-Reply-To: <1556815623.31.0.225997144606.issue36777@roundup.psfhosted.org> Message-ID: <1557156588.74.0.602137057075.issue36777@roundup.psfhosted.org> Gus Goulart added the comment: Confirming that the issue seems to have been introduced on 3.7. Working on this at the PyCon US 2019 sprints. ---------- nosy: +gus.goulart _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:31:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 May 2019 15:31:33 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557156693.18.0.147562274285.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: Victor: > cp65001 is *not* utf-8: Microsoft decided to handle surrogates differently for some reasons. Eryk: > Do you mean valid UTF-16 surrogate pairs? (...) Code page 65001 handles lone surrogate differently on Windows XP and older. It changed in Windows Vista: https://unicodebook.readthedocs.io/operating_systems.html#encode-and-decode-functions Steve Dower removed support for Vista from test_codecs.py 3 years ago: commit f5aba58480bb0dd45181f609487ac2ecfcc98673 Author: Steve Dower Date: Tue Sep 6 19:42:27 2016 -0700 Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec lookup Maybe it's time to remove Lib/encodings/cp65001.py and add an alias cp65001 => utf_8 in Lib/encodings/aliases.py? See bpo-32592. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:32:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 May 2019 15:32:47 +0000 Subject: [issue29075] Remove Windows Vista support In-Reply-To: <1482775241.44.0.333291277311.issue29075@psf.upfronthosting.co.za> Message-ID: <1557156767.55.0.1921573552.issue29075@roundup.psfhosted.org> STINNER Victor added the comment: I close this issue as a duplicate of bpo-32592 which has a longer history. ---------- nosy: +vstinner resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Drop support of Windows Vista in Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:34:14 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 15:34:14 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1557156854.08.0.850099315956.issue32430@roundup.psfhosted.org> anthony shaw added the comment: PR GH-5062 is still open in GitHub, is this PR still required? ---------- nosy: +anthony shaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:34:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 May 2019 15:34:16 +0000 Subject: [issue32592] Drop support of Windows Vista in Python 3.8 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1557156856.07.0.74865973527.issue32592@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-29075 as duplicate of this issue. IMHO it's too late to remove code from Python 3.8. We are too close from the feature freeze: removing Vista code is a risk of introducing subtle issue. I prefer to now wait for Python 3.9. It's not like the "dead code" is causing any major issue. Or does someone see a good reason to remove Vista support *right now*? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:35:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 May 2019 15:35:22 +0000 Subject: [issue32592] Drop support of Windows Vista in Python 3.8 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1557156922.43.0.513484885082.issue32592@roundup.psfhosted.org> STINNER Victor added the comment: Before Vista, the code page 65001 behaved differently than official UTF-8 codec. Vista changed that. Maybe it's time to remove Lib/encodings/cp65001.py and make it an alias to utf_8 codec: see https://bugs.python.org/issue36778#msg341531 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:35:57 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 15:35:57 +0000 Subject: [issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses In-Reply-To: <1508701595.06.0.213398074469.issue31841@psf.upfronthosting.co.za> Message-ID: <1557156957.36.0.249912204375.issue31841@roundup.psfhosted.org> anthony shaw added the comment: This issue has been open for some time and the PR references an upstream branch that no longer exists. Can this request be closed, or has the conversation yet to be resolved? ---------- nosy: +anthony shaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:36:38 2019 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 06 May 2019 15:36:38 +0000 Subject: [issue36811] Warning when compiling _elementree.c In-Reply-To: <1557152842.63.0.0923910614914.issue36811@roundup.psfhosted.org> Message-ID: <1557156998.85.0.912844780245.issue36811@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 6b95149eccac540a911a5ada03fcb7d623a0de37 by Stefan Behnel in branch 'master': bpo-36811: Fix a C compiler warning in _elementtree.c. (GH-13109) https://github.com/python/cpython/commit/6b95149eccac540a911a5ada03fcb7d623a0de37 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:37:22 2019 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 06 May 2019 15:37:22 +0000 Subject: [issue36811] Warning when compiling _elementree.c In-Reply-To: <1557152842.63.0.0923910614914.issue36811@roundup.psfhosted.org> Message-ID: <1557157042.72.0.602749291543.issue36811@roundup.psfhosted.org> Stefan Behnel added the comment: Thanks for the report. In simple cases like this, I think it's fine to comment in the original ticket and/or pull request. There's no real need for a dedicated ticket, at least not before an official release. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:37:34 2019 From: report at bugs.python.org (Sebastian Koslowski) Date: Mon, 06 May 2019 15:37:34 +0000 Subject: [issue36275] DOC: venv.create doesn't include prompt parameter In-Reply-To: <1552435549.43.0.602415941786.issue36275@roundup.psfhosted.org> Message-ID: <1557157054.17.0.673117292585.issue36275@roundup.psfhosted.org> Sebastian Koslowski added the comment: I would like to work on this. ---------- nosy: +skoslowski _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:37:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 May 2019 15:37:43 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1557157063.57.0.933546150095.issue32430@roundup.psfhosted.org> STINNER Victor added the comment: > PR GH-5062 is still open in GitHub, is this PR still required? It's not. I closed it, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:39:40 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 15:39:40 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1557157180.71.0.446152966373.issue15987@roundup.psfhosted.org> anthony shaw added the comment: This discussion is inconclusive and targets an old version of CPython, can this issue be closed? ---------- nosy: +anthony shaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:43:06 2019 From: report at bugs.python.org (Pam McA'Nulty) Date: Mon, 06 May 2019 15:43:06 +0000 Subject: [issue36815] test_socket test_host_resolution_bad_address test failure Message-ID: <1557157386.93.0.718979150708.issue36815@roundup.psfhosted.org> New submission from Pam McA'Nulty : - Cloned a new cpython onto my new MacOS system (Mojave 10.14.4) - built as per https://devguide.python.org/ - test failure: ``` ./python.exe -m test -j3 test_socket Run tests in parallel using 3 child processes 0:00:24 load avg: 0.88 [1/1/1] test_socket failed /Users/pamelamcanulty/cpython/Lib/test/test_socket.py:2424: RuntimeWarning: received malformed or improperly-truncated ancillary data result = sock.recvmsg(bufsize, *args) /Users/pamelamcanulty/cpython/Lib/test/test_socket.py:2515: RuntimeWarning: received malformed or improperly-truncated ancillary data result = sock.recvmsg_into([buf], *args) test test_socket failed -- Traceback (most recent call last): File "/Users/pamelamcanulty/cpython/Lib/test/test_socket.py", line 936, in test_host_resolution_bad_address socket.gethostbyname(addr) AssertionError: OSError not raised : ::1q == Tests result: FAILURE == 1 test failed: test_socket Total duration: 24 sec 153 ms Tests result: FAILURE ``` ---------- components: macOS messages: 341542 nosy: Pam.McANulty, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: test_socket test_host_resolution_bad_address test failure type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:43:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 May 2019 15:43:13 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557157393.17.0.290457425021.issue36792@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: zipfile.writestr causes a Python crash on Windows if the locale is set -> [Windows] time: crash on formatting time with de_DE locale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:44:04 2019 From: report at bugs.python.org (Bar Harel) Date: Mon, 06 May 2019 15:44:04 +0000 Subject: [issue36813] QueueListener not calling task_done upon termination In-Reply-To: <1557155039.79.0.434860875914.issue36813@roundup.psfhosted.org> Message-ID: <1557157444.07.0.00820655355949.issue36813@roundup.psfhosted.org> Change by Bar Harel : ---------- keywords: +patch pull_requests: +13027 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:44:04 2019 From: report at bugs.python.org (Pam McA'Nulty) Date: Mon, 06 May 2019 15:44:04 +0000 Subject: [issue36815] Test Failure MacOS : test_socket test_host_resolution_bad_address In-Reply-To: <1557157386.93.0.718979150708.issue36815@roundup.psfhosted.org> Message-ID: <1557157444.98.0.292469910006.issue36815@roundup.psfhosted.org> Change by Pam McA'Nulty : ---------- title: test_socket test_host_resolution_bad_address test failure -> Test Failure MacOS : test_socket test_host_resolution_bad_address _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:47:09 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 06 May 2019 15:47:09 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1557157629.69.0.126641501487.issue36533@roundup.psfhosted.org> ?ukasz Langa added the comment: This deadlock is a release blocker for 3.8.0. FTR, I don't consider it blocking alphas and betas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:48:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 May 2019 15:48:21 +0000 Subject: [issue36809] Crash for test test_importlib In-Reply-To: <1557113260.01.0.872364127661.issue36809@roundup.psfhosted.org> Message-ID: <1557157701.53.0.239540430754.issue36809@roundup.psfhosted.org> STINNER Victor added the comment: Hi Furzoom. Would you mind to provide more info about what you are trying to do? What is your operating system? How did you download Python? How did you compile Python? What is your operating system? Can you show the command that you used to run tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:48:56 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 15:48:56 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1557157736.54.0.47167376881.issue26903@roundup.psfhosted.org> Brian Quinlan added the comment: If no one has short-term plans to improve multiprocessing.connection.wait, then I'll update the docs to list this limitation, ensure that ProcessPoolExecutor never defaults to >60 processes on windows and raises a ValueError if the user explicitly passes a larger number. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:49:53 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 15:49:53 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1557157793.15.0.327021338378.issue15987@roundup.psfhosted.org> anthony shaw added the comment: Closing issue, PR branch has since been removed and targets Python 3.4 ---------- nosy: +anthonypjshaw resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:50:15 2019 From: report at bugs.python.org (Dmitry Kazakov) Date: Mon, 06 May 2019 15:50:15 +0000 Subject: [issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses In-Reply-To: <1508701595.06.0.213398074469.issue31841@psf.upfronthosting.co.za> Message-ID: <1557157815.36.0.559229764045.issue31841@roundup.psfhosted.org> Change by Dmitry Kazakov : ---------- pull_requests: -4438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:50:50 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 06 May 2019 15:50:50 +0000 Subject: [issue36811] Warning when compiling _elementree.c In-Reply-To: <1557152842.63.0.0923910614914.issue36811@roundup.psfhosted.org> Message-ID: <1557157850.52.0.592177115993.issue36811@roundup.psfhosted.org> St?phane Wirtel added the comment: Sure, you are right but I was working on an issue with Julien Palard. next time I will fix it myself. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:50:55 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 06 May 2019 15:50:55 +0000 Subject: [issue36815] Test Failure MacOS : test_socket test_host_resolution_bad_address In-Reply-To: <1557157386.93.0.718979150708.issue36815@roundup.psfhosted.org> Message-ID: <1557157855.44.0.405648984425.issue36815@roundup.psfhosted.org> SilentGhost added the comment: This could happen depending on you ISP behaviour. In any case this looks like a duplicate of issue 34105. ---------- nosy: +SilentGhost resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:51:19 2019 From: report at bugs.python.org (Bar Harel) Date: Mon, 06 May 2019 15:51:19 +0000 Subject: [issue36813] QueueListener not calling task_done upon termination In-Reply-To: <1557155039.79.0.434860875914.issue36813@roundup.psfhosted.org> Message-ID: <1557157879.59.0.653840286604.issue36813@roundup.psfhosted.org> Bar Harel added the comment: Alright, patch submitted. Shall I add regression tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:53:57 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 15:53:57 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1557158037.13.0.210103612756.issue26903@roundup.psfhosted.org> Change by Brian Quinlan : ---------- assignee: -> bquinlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:55:03 2019 From: report at bugs.python.org (Dmitry Kazakov) Date: Mon, 06 May 2019 15:55:03 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557158103.82.0.983783228526.issue27639@roundup.psfhosted.org> Change by Dmitry Kazakov : ---------- pull_requests: -4870 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:55:10 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 06 May 2019 15:55:10 +0000 Subject: [issue36582] collections.UserString encode method returns a string In-Reply-To: <1554853133.32.0.976890929788.issue36582@roundup.psfhosted.org> Message-ID: <1557158110.51.0.144260396208.issue36582@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I think this is an easy issue. The relevant code is at https://github.com/python/cpython/blob/cec01849f142ea96731b4725975b89d3af757656/Lib/collections/__init__.py#L1210 where the encoded result has to be fixed. Trey, if you haven't started working on it I think it's a good first issue for sprints. A simple unittest patch that fails on master. This can have additional tests with both encoding and errors present and both of them absent hitting all three code paths in the function. diff --git a/Lib/test/test_userstring.py b/Lib/test/test_userstring.py index 71528223d3..81a4908dbd 100644 --- a/Lib/test/test_userstring.py +++ b/Lib/test/test_userstring.py @@ -39,6 +39,11 @@ class UserStringTest( # we don't fix the arguments, because UserString can't cope with it getattr(object, methodname)(*args) + def test_encode(self): + data = UserString("hello") + self.assertEqual(data.encode(encoding='utf-8'), b'hello') if __name__ == "__main__": unittest.main() ---------- nosy: +Mariatta, cheryl.sabella, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:55:09 2019 From: report at bugs.python.org (Sebastian Koslowski) Date: Mon, 06 May 2019 15:55:09 +0000 Subject: [issue36275] DOC: venv.create doesn't include prompt parameter In-Reply-To: <1552435549.43.0.602415941786.issue36275@roundup.psfhosted.org> Message-ID: <1557158109.97.0.694490444665.issue36275@roundup.psfhosted.org> Change by Sebastian Koslowski : ---------- keywords: +patch pull_requests: +13028 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:56:32 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 15:56:32 +0000 Subject: [issue36582] collections.UserString encode method returns a string In-Reply-To: <1554853133.32.0.976890929788.issue36582@roundup.psfhosted.org> Message-ID: <1557158192.01.0.629118418.issue36582@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:56:50 2019 From: report at bugs.python.org (Patrick Muehlbauer) Date: Mon, 06 May 2019 15:56:50 +0000 Subject: [issue30668] DOC: missing word in license.rst In-Reply-To: <1497464826.74.0.48412228971.issue30668@psf.upfronthosting.co.za> Message-ID: <1557158210.59.0.603802556567.issue30668@roundup.psfhosted.org> Change by Patrick Muehlbauer : ---------- keywords: +patch pull_requests: +13029 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:57:30 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 06 May 2019 15:57:30 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557158250.13.0.174127644196.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: Ok, now let's try it using the C runtime directly: import ctypes, struct libc = ctypes.cdll.msvcrt buf = ctypes.create_string_buffer(1024) tm = struct.pack('9i', 2019, 5, 6, 9, 50, 4, 0, 126, 1) print('count:', libc.strftime(buf, 1024, b'%Z', tm)) print('value:', buf.value) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:58:37 2019 From: report at bugs.python.org (Charlie Clark) Date: Mon, 06 May 2019 15:58:37 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557158317.27.0.613915706215.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: import ctypes, struct libc = ctypes.cdll.msvcrt buf = ctypes.create_string_buffer(1024) tm = struct.pack('9i', 2019, 5, 6, 9, 50, 4, 0, 126, 1) print('count:', libc.strftime(buf, 1024, b'%Z', tm)) print('value:', buf.value) count: 28 value: b'Mitteleurop\xe4ische Sommerzeit' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 11:58:51 2019 From: report at bugs.python.org (Dustin Mendoza) Date: Mon, 06 May 2019 15:58:51 +0000 Subject: [issue36766] Typos in docs and code comments In-Reply-To: <1556716347.32.0.805084032343.issue36766@roundup.psfhosted.org> Message-ID: <1557158331.6.0.328032871302.issue36766@roundup.psfhosted.org> Change by Dustin Mendoza : ---------- keywords: +patch pull_requests: +13030 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:00:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 16:00:47 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557158447.65.0.784696012686.issue27639@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +easy -patch stage: patch review -> needs patch versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:04:28 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 06 May 2019 16:04:28 +0000 Subject: [issue32223] distutils doesn't correctly read UTF-8 content from config files In-Reply-To: <1512492386.04.0.213398074469.issue32223@psf.upfronthosting.co.za> Message-ID: <1557158668.43.0.484047581968.issue32223@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi, I have closed the PR because there is no feedback from deliverance and the CLA must be signed for the processing. Once the CLA will be signed, the PR could be re-opened. Thank you so much, ---------- nosy: +matrixise versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:05:10 2019 From: report at bugs.python.org (Patrick Muehlbauer) Date: Mon, 06 May 2019 16:05:10 +0000 Subject: [issue30668] DOC: missing word in license.rst In-Reply-To: <1497464826.74.0.48412228971.issue30668@psf.upfronthosting.co.za> Message-ID: <1557158710.77.0.343449044663.issue30668@roundup.psfhosted.org> Patrick Muehlbauer added the comment: Hi, first time contributor here :) I opened a PR for this as part of the Pycon 2019 sprints. ---------- nosy: +treebee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:07:07 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 06 May 2019 16:07:07 +0000 Subject: [issue28866] Type cache is not correctly invalidated on a class defining mro() In-Reply-To: <1480862145.72.0.468660451957.issue28866@psf.upfronthosting.co.za> Message-ID: <1557158827.17.0.506306694863.issue28866@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +13031 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:23:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 May 2019 16:23:18 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1557159798.1.0.495873498128.issue15987@roundup.psfhosted.org> STINNER Victor added the comment: Please don't close an issue too fast. The PR 1368 is still open and contains valuable code. Moreover, I don't see anyone here saying that the feature is a bad idea. The feature has not been implemented, so the issue should remain open, even if PR 1368 is outdated. > ...issue... targets Python 3.4 Well, it's just that the issue has been created a long time ago, but the feature request remain value for Python 3.8. ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:29:19 2019 From: report at bugs.python.org (MICHAEL BLAHAY) Date: Mon, 06 May 2019 16:29:19 +0000 Subject: [issue27497] csv module: Add return value to DictWriter.writeheader In-Reply-To: <1468336448.04.0.83850338242.issue27497@psf.upfronthosting.co.za> Message-ID: <1557160159.75.0.773864668148.issue27497@roundup.psfhosted.org> MICHAEL BLAHAY added the comment: I would like to drive this to conclusion since it appears this issue has not had any real activity in a while. First thing that needs to be determined is whether this enhancement is still desirable. Who can answer this? ---------- nosy: +MICHAEL BLAHAY _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:32:48 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 06 May 2019 16:32:48 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557160368.01.0.141611273689.issue36798@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset ae2c32f32b61f3b141ba4b0b1ad71781d2f9a1a1 by Guido van Rossum (Logan Jones) in branch 'master': bpo-36798: Updating f-string docs for := use case (GH-13107) https://github.com/python/cpython/commit/ae2c32f32b61f3b141ba4b0b1ad71781d2f9a1a1 ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:33:17 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 06 May 2019 16:33:17 +0000 Subject: [issue36798] f-strings do not support top-level := In-Reply-To: <1557019414.93.0.89677106735.issue36798@roundup.psfhosted.org> Message-ID: <1557160397.78.0.536893731985.issue36798@roundup.psfhosted.org> Guido van Rossum added the comment: PEP and docs have been amended. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:33:21 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 06 May 2019 16:33:21 +0000 Subject: [issue27497] csv module: Add return value to DictWriter.writeheader In-Reply-To: <1468336448.04.0.83850338242.issue27497@psf.upfronthosting.co.za> Message-ID: <1557160401.94.0.35856529375.issue27497@roundup.psfhosted.org> SilentGhost added the comment: Michael, there is a up-to-date PR that's waiting for approval. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:34:45 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 06 May 2019 16:34:45 +0000 Subject: [issue32388] Remove cross-version binary compatibility In-Reply-To: <1513790879.02.0.213398074469.issue32388@psf.upfronthosting.co.za> Message-ID: <1557160485.75.0.552561005058.issue32388@roundup.psfhosted.org> Antoine Pitrou added the comment: I updated the PR (sorry to let this sleep). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:35:05 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 06 May 2019 16:35:05 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557160505.71.0.351999377899.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: Oops, I forgot to add in my snippet, the setlocale() call prior to calling the C strftime() function. So an updated test: import locale locale.setlocale(locale.LC_ALL, 'de_DE') import ctypes, struct libc = ctypes.cdll.msvcrt buf = ctypes.create_string_buffer(1024) tm = struct.pack('9i', 2019, 5, 6, 9, 50, 4, 0, 126, 1) print('count:', libc.strftime(buf, 1024, b'%Z', tm)) print('value:', buf.value) wbuf = ctypes.create_unicode_buffer(1024) print('count:', libc.wcsftime(wbuf, 1024, '%Z', tm)) print('value:', wbuf.value) print('count:', libc.mbstowcs(wbuf, buf, 1024)) print('value:', wbuf.value) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:45:10 2019 From: report at bugs.python.org (Charlie Clark) Date: Mon, 06 May 2019 16:45:10 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557161110.85.0.642410469067.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: import ctypes, struct libc = ctypes.cdll.msvcrt buf = ctypes.create_string_buffer(1024) tm = struct.pack('9i', 2019, 5, 6, 9, 50, 4, 0, 126, 1) print('count:', libc.strftime(buf, 1024, b'%Z', tm)) print('value:', buf.value) wbuf = ctypes.create_unicode_buffer(1024) print('count:', libc.wcsftime(wbuf, 1024, '%Z', tm)) print('value:', wbuf.value) print('count:', libc.mbstowcs(wbuf, buf, 1024)) print('value:', wbuf.value) count: 28 value: b'Mitteleurop\xe4ische Sommerzeit' count: 28 value: Mitteleurop?ische Sommerzeit count: 28 value: Mitteleurop?ische Sommerzeit ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:47:24 2019 From: report at bugs.python.org (Paul Monson) Date: Mon, 06 May 2019 16:47:24 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557161244.29.0.808884927404.issue36778@roundup.psfhosted.org> Change by Paul Monson : ---------- title: test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 -> test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:55:11 2019 From: report at bugs.python.org (Daniel Fortunov) Date: Mon, 06 May 2019 16:55:11 +0000 Subject: [issue36582] collections.UserString encode method returns a string In-Reply-To: <1554853133.32.0.976890929788.issue36582@roundup.psfhosted.org> Message-ID: <1557161711.7.0.0576381916066.issue36582@roundup.psfhosted.org> Daniel Fortunov added the comment: I'll pick this up in the PyCon US 2019 sprint this afternoon. ---------- nosy: +dfortunov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 12:56:58 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 May 2019 16:56:58 +0000 Subject: [issue36594] Undefined behavior due to incorrect usage of %p in format strings In-Reply-To: <1554941666.55.0.100758767166.issue36594@roundup.psfhosted.org> Message-ID: <1557161818.73.0.697039822501.issue36594@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 1a2252ed39bc1b71cdaa935d7726d82909af93ab by Brett Cannon (Zackery Spytz) in branch 'master': bpo-36594: Fix incorrect use of %p in format strings (GH-12769) https://github.com/python/cpython/commit/1a2252ed39bc1b71cdaa935d7726d82909af93ab ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:01:27 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 06 May 2019 17:01:27 +0000 Subject: [issue29842] Make Executor.map work with infinite/large inputs correctly In-Reply-To: <1489800776.56.0.575396558681.issue29842@psf.upfronthosting.co.za> Message-ID: <1557162087.79.0.956109530416.issue29842@roundup.psfhosted.org> Josh Rosenberg added the comment: Noticed unresolved comments (largely on documentation) on the PR and since I'm sprinting this week I finally had the time to address them. I merged the latest master into the PR, hope that's considered the correct way to approach this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:01:35 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 06 May 2019 17:01:35 +0000 Subject: [issue29842] Make Executor.map work with infinite/large inputs correctly In-Reply-To: <1489800776.56.0.575396558681.issue29842@psf.upfronthosting.co.za> Message-ID: <1557162095.29.0.79081274376.issue29842@roundup.psfhosted.org> Change by Josh Rosenberg : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:08:47 2019 From: report at bugs.python.org (MICHAEL BLAHAY) Date: Mon, 06 May 2019 17:08:47 +0000 Subject: [issue27497] csv module: Add return value to DictWriter.writeheader In-Reply-To: <1468336448.04.0.83850338242.issue27497@psf.upfronthosting.co.za> Message-ID: <1557162527.27.0.0431364195813.issue27497@roundup.psfhosted.org> MICHAEL BLAHAY added the comment: Ah ha, so there is. I'm glad this one will get closed out. Sorry for noob mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:14:21 2019 From: report at bugs.python.org (Matthew Tanous) Date: Mon, 06 May 2019 17:14:21 +0000 Subject: [issue36812] posix_spawnp returns error when used with file_actions In-Reply-To: <1557155011.55.0.26778375432.issue36812@roundup.psfhosted.org> Message-ID: <1557162861.92.0.845491869007.issue36812@roundup.psfhosted.org> Matthew Tanous added the comment: I have some updated information. This works as expected when I set the permissions properly using an octal number 0o777. The issue appears to be that when the permissions don't exist as specified, the PermissionError reports the process name, not the file path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:25:29 2019 From: report at bugs.python.org (Bjoern Meier) Date: Mon, 06 May 2019 17:25:29 +0000 Subject: [issue36270] DOC: Add link to sys.exc_info for "Reference Manual" In-Reply-To: <1552400076.95.0.491371003303.issue36270@roundup.psfhosted.org> Message-ID: <1557163529.93.0.810317571693.issue36270@roundup.psfhosted.org> Change by Bjoern Meier : ---------- keywords: +patch pull_requests: +13032 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:26:10 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 06 May 2019 17:26:10 +0000 Subject: [issue28729] Exception from sqlite3 adapter masked by sqlite3.InterfaceError In-Reply-To: <1479425140.19.0.0824888445668.issue28729@psf.upfronthosting.co.za> Message-ID: <1557163570.94.0.327152284833.issue28729@roundup.psfhosted.org> Julien Palard added the comment: This has been fixed in fc662ac332443a316a120fa5287c235dc4f8739b. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:31:07 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 06 May 2019 17:31:07 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1557163867.3.0.401274929347.issue36772@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I am +1 to this. Making it easier for the case of decorator factories that are called with all the defaults is a very common pattern in the wild. There are even known idioms for how to reduce the indentation of the naive approach (returning partials of the factory). In particular for lru_cache, my experience is that every time I teach this feature, people are confused initially about the '()' at the end of the call. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:32:11 2019 From: report at bugs.python.org (Divya Gorantla) Date: Mon, 06 May 2019 17:32:11 +0000 Subject: [issue34682] Typo reports on docs@ In-Reply-To: <1536943787.72.0.956365154283.issue34682@psf.upfronthosting.co.za> Message-ID: <1557163931.8.0.288164640866.issue34682@roundup.psfhosted.org> Change by Divya Gorantla : ---------- keywords: +patch pull_requests: +13033 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:32:56 2019 From: report at bugs.python.org (Paul Monson) Date: Mon, 06 May 2019 17:32:56 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557163976.03.0.882681051195.issue36778@roundup.psfhosted.org> Paul Monson added the comment: > Okay. The test verifies work done to minimize interpreter startup time, but probably the relative cost of importing functools (and thus collections et al) isn't significant compared to the overall cost of spawning a process in a Windows desktop environment. That may not be the case for Nano Server and IoT Core. Is there an easy way to measure this? > PYTHONIOENCODING=cp65001 I tried setting PYTHONIOENCODING=cp1252 on Windows IoT Core as a workaround and it didn't work. Victor> My PR 13110 avoids "import functools" at startup. Can you please try it and check if it fix test_site? I tried the PR and it fixes test_startup_imports, which seems promising. The PR breaks other test_site tests on Windows IoT Core. The same ones you pointed out in the PR discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:36:09 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 17:36:09 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1557164169.99.0.231734566107.issue26903@roundup.psfhosted.org> Brian Quinlan added the comment: BTW, the 61 process limit comes from: 63 - - ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:36:26 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 17:36:26 +0000 Subject: [issue24263] unittest cannot load module whose name starts with Unicode In-Reply-To: <1435031451.77.0.239152930978.issue24263@psf.upfronthosting.co.za> Message-ID: <1557164186.66.0.846134687037.issue24263@roundup.psfhosted.org> anthony shaw added the comment: The original PR refers to a branch that no longer exists, but the behaviour documented still applies to master. There were some changes to the test loader, but none that fixed this issue. ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:38:19 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 17:38:19 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1557164299.9.0.0881129633439.issue36780@roundup.psfhosted.org> Brian Quinlan added the comment: OK, I completely disagree with my statement: """If you added this as an argument to shutdown() then you'd probably also have to add it as an option to the constructors (for people using Executors as context managers). But, if you have to add it to the constructor anyway, you may as well *only* add it to the constructor.""" This functionality wouldn't apply to context manager use (since the point of the context manager is to ensure resource clean-up). So maybe another argument to shutdown() would make sense ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:38:50 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 17:38:50 +0000 Subject: =?utf-8?q?=5Bissue34820=5D_binascii=2Ec=3A1578=3A1=3A_error=3A_the_contro?= =?utf-8?q?l_flow_of_function_=E2=80=98binascii=5Fcrc32=E2=80=99_does_not_?= =?utf-8?q?match_its_profile_data_=28counter_=E2=80=98arcs=E2=80=99=29?= In-Reply-To: <1538056682.62.0.545547206417.issue34820@psf.upfronthosting.co.za> Message-ID: <1557164330.26.0.794876137325.issue34820@roundup.psfhosted.org> anthony shaw added the comment: There is not enough information to triage this issue and since the last request there has been no reply. Closing issue. ---------- nosy: +anthonypjshaw stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:40:14 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 06 May 2019 17:40:14 +0000 Subject: [issue28795] Misleading stating, that SIGINT handler is installed by default In-Reply-To: <1480026357.5.0.735730414686.issue28795@psf.upfronthosting.co.za> Message-ID: <1557164414.7.0.894467810638.issue28795@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +13034 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:40:24 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 17:40:24 +0000 Subject: [issue31813] python -m ensurepip hangs In-Reply-To: <1508341378.28.0.213398074469.issue31813@psf.upfronthosting.co.za> Message-ID: <1557164424.36.0.138845814569.issue31813@roundup.psfhosted.org> anthony shaw added the comment: I believe the issue is caused by the issue referenced in the last comment. Closing issue ---------- nosy: +anthonypjshaw resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:44:16 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 17:44:16 +0000 Subject: [issue5243] Missing dependency in distutils build In-Reply-To: <1234519029.27.0.18013582736.issue5243@psf.upfronthosting.co.za> Message-ID: <1557164656.83.0.582297839401.issue5243@roundup.psfhosted.org> anthony shaw added the comment: This issue has been open for some time, looking at the install_lib in master, there have been no changes to call 'build_clib' so the issue documented here would still apply. ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:48:39 2019 From: report at bugs.python.org (Logan Jones) Date: Mon, 06 May 2019 17:48:39 +0000 Subject: [issue15305] Test harness unnecessarily disambiguating twice In-Reply-To: <1341834351.63.0.548541942582.issue15305@psf.upfronthosting.co.za> Message-ID: <1557164919.23.0.480931095734.issue15305@roundup.psfhosted.org> Logan Jones added the comment: I'm working on this in the PyCon 2019 sprints. Near as I can tell, while this issue still seems relevant, I think it might actually be for the best that this multiple disambiguation is left in the test suite. I removed the pid reference in the TESTFN and the tests passed in both the parallel and sequential cases. However, removing the pid results in multiprocessing tests having to be written more carefully if they choose to use the TESTFN. Here is an explanation for why you would leave this code in. When running the tests in sequential mode, the tests will run in a CWD that includes the pid. When writing a multi-processing test using the TESTFN you would have to remember to add the os.getpid call to the actual TESTFN instead of it just being included by default. Ultimately, this is really just extra information that is included in the temporary filenames. It might be worth just closing this issue. ---------- nosy: +loganasherjones _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 13:50:03 2019 From: report at bugs.python.org (MICHAEL BLAHAY) Date: Mon, 06 May 2019 17:50:03 +0000 Subject: [issue11698] Improve repr for structseq objects to show named, but unindexed fields In-Reply-To: <1301264097.04.0.982421975108.issue11698@psf.upfronthosting.co.za> Message-ID: <1557165003.28.0.971141544889.issue11698@roundup.psfhosted.org> MICHAEL BLAHAY added the comment: I will work on this ---------- nosy: +MICHAEL BLAHAY _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:05:40 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 May 2019 18:05:40 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak Message-ID: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> New submission from Gregory P. Smith : test_httplib uses self-signed.pythontest.net in it's test_networked_good_cert test. On modern Linux distros (current Debian testing sid), the certificate it currently uses is rightfully rejected as being too weak: ERROR: test_networked_good_cert (test.test_httplib.HTTPSTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/greg/oss/cpython/Lib/test/test_httplib.py", line 1628, in test_networked_good_cert h.request('GET', '/') File "/home/greg/oss/cpython/Lib/http/client.py", line 1221, in request self._send_request(method, url, body, headers, encode_chunked) File "/home/greg/oss/cpython/Lib/http/client.py", line 1267, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/home/greg/oss/cpython/Lib/http/client.py", line 1216, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/greg/oss/cpython/Lib/http/client.py", line 1004, in _send_output self.send(msg) File "/home/greg/oss/cpython/Lib/http/client.py", line 944, in send self.connect() File "/home/greg/oss/cpython/Lib/http/client.py", line 1383, in connect self.sock = self._context.wrap_socket(self.sock, File "/home/greg/oss/cpython/Lib/ssl.py", line 405, in wrap_socket return self.sslsocket_class._create( File "/home/greg/oss/cpython/Lib/ssl.py", line 853, in _create self.do_handshake() File "/home/greg/oss/cpython/Lib/ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:1055) The TLS certificate on the server needs to be updated to something modern. I _believe_ this can be done by someone with infrastructure access via an update to https://github.com/python/pythontestdotnet/tree/master/tls Assigning to EWDurbin for triage and redirection to someone else infrastructury if he's not the right person. How to know if it has been fixed? Monitor the test_networked_good_cert test on any "Debian buster" builtbot(s) such as https://buildbot.python.org/all/#/workers/23 to make sure it is not skipped. (the test _currently_ fails, I am going to have it be _skipped_ on this specific key too small error for the time being to get that stable buildbot green again) ---------- assignee: EWDurbin components: SSL, Tests messages: 341579 nosy: EWDurbin, gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: self-signed.pythontest.net TLS certificate key is too weak type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:08:20 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 06 May 2019 18:08:20 +0000 Subject: [issue24339] iso6937 encoding missing In-Reply-To: <1433078403.47.0.568019085367.issue24339@psf.upfronthosting.co.za> Message-ID: <1557166100.13.0.162311556462.issue24339@roundup.psfhosted.org> Julien Palard added the comment: For the moment, I'm closing this issue as there's no activity on it I suspect it may no be that usefull. I may be wrong, so if someone actually needs this, don't hesitate either to put it as a package on PyPI (it should probably go there anyway), either to reopen the issue. ---------- resolution: -> postponed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:08:20 2019 From: report at bugs.python.org (Mark Shannon) Date: Mon, 06 May 2019 18:08:20 +0000 Subject: [issue28866] Type cache is not correctly invalidated on a class defining mro() In-Reply-To: <1480862145.72.0.468660451957.issue28866@psf.upfronthosting.co.za> Message-ID: <1557166100.67.0.559705219874.issue28866@roundup.psfhosted.org> Mark Shannon added the comment: This failure appears to be a symptom of recursively traversing __bases__ rather scanning __mro__ in the implementation of type.__subclasses__ The MCACHE depends on type.__subclasses__ being correct and it is not correct for weird.py python -i weird.py >>> C = Meta("C", (), {}) >>> C.__mro__ (, , ) >>> Foo.__subclasses__() [] >>> C.__bases__ (,) Fixing this may need a change in the API for type.__subclasses__() to return all subclasses, as defined by __mro__, not just the bases. A simpler, temporary fix might be to set Py_TPFLAGS_HAVE_VERSION_TAG to 0 for any class that has a custom mro() ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:10:56 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 May 2019 18:10:56 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. Message-ID: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> New submission from Eric V. Smith : This is an alternative proposal to issue36774. We (Eric V. Smith and Larry Hastings) propose a minor language change. This level of change doesn't require a PEP, so in this post-BDFL world what we need is "a consensus among core developers". So please vote! Note that "+" is typed using "shift-=", and the "1" key can be found very nearby. Python programmers often use "printf-style" debugging. In the (really) bad old days this was pretty wordy: print "foo=", foo, "bar=", bar f-strings make this slightly nicer to type: print(f"foo={foo} bar={bar}") But you still have to repeat yourself: you have to write out the *string* "foo", and then the *expession* "foo". Wouldn't it be nice if you didn't have to? f-strings are uniquely able to help with this. Their implementation requires them to know the original text of the expression which they then compile. It's not difficult for f-strings to retain the text and prepend it; the tricky part is figuring out how to spell it. The initial idea was to use an f-string "conversion", which we originally spelled "!=": f'{foo!=}' This spelling won't work, because f-strings permit arbitrary Python expressions, and != of course tests for inequality. We considered other spellings: !d (debug) !e (equals) !x (?) !! (easy to type) We'd planned to go with !d. In fact Eric gave a lightning talk about this on Friday night and used this spelling. And then! On Saturday, the best spelling revealed itself! Behold the majesty of: {foo=} This code: foo=5 print(f"{foo=}") would print foo=5 With this spelling change, we've also refined the semantics. By default, f-strings use format() (technically they call __format__ on the value). But the point of this is for debugging. But you want repr() for debugging. When you use this on a string, you want to see the quoted string; when you use this on a datetime object, you want to see the datetime repr, not the default formatted string. Second, this is now composable with conversions. So you can use {foo=!s} to use str() instead of repr() on the value. Relatedly, we've added a new conversion: "!f" means "use format()", which you could never explicitly specify before. For example, to only format pi to two decimal places: f"{math.pi=!f:.2f}" => "3.14" Finally, and this is the best part: what if you want whitespace around the equals sign? Well, to the left is no problem; whitespace is preserved from the original text inside the curly braces: f"{ chr(65) =}" => " chr(65) ='A'" But we also explicitly permit, and preserve, whitespace *after* the equals sign: f"{chr(65) = }" => "chr(65) = 'A'" What's particularly elegant is that we simply preserve all the characters up to the final delimiter. The equals sign sets a flag but doesn't stop flushing through text. So this: vvvvvvvvvv f"{chr(65) = }" is *exactly* the same as this: vvvvvvvvvv "chr(65) = 'A'" Please vote! Eric and /arry ---------- assignee: eric.smith components: Interpreter Core messages: 341582 nosy: eric.smith, larry priority: normal severity: normal stage: patch review status: open title: Add = to f-strings for easier debugging. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:11:51 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 May 2019 18:11:51 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557166311.36.0.51702838536.issue36817@roundup.psfhosted.org> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +13035 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:17:48 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 06 May 2019 18:17:48 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557166668.05.0.0869931649092.issue36817@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:19:51 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 May 2019 18:19:51 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557166791.65.0.96779702087.issue36817@roundup.psfhosted.org> Change by Eric V. Smith : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:21:39 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 06 May 2019 18:21:39 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557166899.86.0.0708660214413.issue36817@roundup.psfhosted.org> Barry A. Warsaw added the comment: I'll assume you can resolve any weird corner cases, in which case +1 ---------- type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:22:57 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 18:22:57 +0000 Subject: [issue5243] Missing dependency in distutils build In-Reply-To: <1234519029.27.0.18013582736.issue5243@psf.upfronthosting.co.za> Message-ID: <1557166977.48.0.326831243613.issue5243@roundup.psfhosted.org> Change by anthony shaw : ---------- nosy: +dstufft, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:23:01 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 May 2019 18:23:01 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557166981.9.0.353588010757.issue35925@roundup.psfhosted.org> Gregory P. Smith added the comment: PR coming ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:24:29 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 18:24:29 +0000 Subject: [issue26303] Shared execution context between doctests in a module In-Reply-To: <1454774062.04.0.526927951264.issue26303@psf.upfronthosting.co.za> Message-ID: <1557167069.47.0.347942567938.issue26303@roundup.psfhosted.org> anthony shaw added the comment: this issue would be good for pycon sprints ---------- nosy: +Mariatta, anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:24:31 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 May 2019 18:24:31 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557167071.94.0.291868687799.issue36817@roundup.psfhosted.org> Change by Eric V. Smith : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:26:33 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 May 2019 18:26:33 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1557167193.39.0.985381573824.issue36774@roundup.psfhosted.org> Eric V. Smith added the comment: See issue36817 for an alternative proposal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:27:06 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 18:27:06 +0000 Subject: [issue31603] Please add argument to override stdin/out/err in the input builtin In-Reply-To: <1506494047.11.0.154975027568.issue31603@psf.upfronthosting.co.za> Message-ID: <1557167226.5.0.814270396521.issue31603@roundup.psfhosted.org> anthony shaw added the comment: The discussion on python-ideas has some unresolved questions. Wren, did you get a definitive answer on this idea? ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:27:22 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 18:27:22 +0000 Subject: [issue26303] Shared execution context between doctests in a module In-Reply-To: <1454774062.04.0.526927951264.issue26303@psf.upfronthosting.co.za> Message-ID: <1557167242.67.0.723385739648.issue26303@roundup.psfhosted.org> Change by anthony shaw : ---------- assignee: docs at python -> Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:27:45 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 May 2019 18:27:45 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557167265.21.0.760646917967.issue35925@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +13036 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:29:54 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 18:29:54 +0000 Subject: [issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception In-Reply-To: <1477517141.8.0.311598434825.issue28540@psf.upfronthosting.co.za> Message-ID: <1557167394.45.0.492837323677.issue28540@roundup.psfhosted.org> anthony shaw added the comment: Francisco, I recommend converting the patch into a GitHub pull request to make it easier to code review. Mark, Raymond, please could you re-review this patch. ---------- nosy: +anthonypjshaw, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:31:29 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 May 2019 18:31:29 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557167489.29.0.684984730117.issue36816@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +13037 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:32:21 2019 From: report at bugs.python.org (Roundup Robot) Date: Mon, 06 May 2019 18:32:21 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1557167541.86.0.365943801759.issue36675@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +13038 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:32:44 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 06 May 2019 18:32:44 +0000 Subject: [issue30668] DOC: missing word in license.rst In-Reply-To: <1497464826.74.0.48412228971.issue30668@psf.upfronthosting.co.za> Message-ID: <1557167564.84.0.100424874196.issue30668@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 4920c093da8a3061faea62d62f2ddf0c5c443360 by St?phane Wirtel (Patrick M?hlbauer) in branch 'master': bpo-30668: add missing word in license.rst (GH-13115) https://github.com/python/cpython/commit/4920c093da8a3061faea62d62f2ddf0c5c443360 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:33:23 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 06 May 2019 18:33:23 +0000 Subject: [issue30668] DOC: missing word in license.rst In-Reply-To: <1497464826.74.0.48412228971.issue30668@psf.upfronthosting.co.za> Message-ID: <1557167603.85.0.950009230068.issue30668@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:36:31 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 May 2019 18:36:31 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557167791.66.0.726881694759.issue36816@roundup.psfhosted.org> Gregory P. Smith added the comment: EWDurbin says I can just open a PR with new certs in the repo and it'll go from there. :) ---------- assignee: EWDurbin -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:37:50 2019 From: report at bugs.python.org (MICHAEL BLAHAY) Date: Mon, 06 May 2019 18:37:50 +0000 Subject: [issue11698] Improve repr for structseq objects to show named, but unindexed fields In-Reply-To: <1301264097.04.0.982421975108.issue11698@psf.upfronthosting.co.za> Message-ID: <1557167870.04.0.346729247652.issue11698@roundup.psfhosted.org> MICHAEL BLAHAY added the comment: I have been advised to avoid enhancements like this one, so I am setting this back down. Also, this should be relabeled as easy(c). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:38:46 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Mon, 06 May 2019 18:38:46 +0000 Subject: [issue36165] DOC: ssl.rst is missing formatting on two links In-Reply-To: <1551525027.87.0.0940888364493.issue36165@roundup.psfhosted.org> Message-ID: <1557167926.16.0.122282779902.issue36165@roundup.psfhosted.org> Toshio Kuratomi added the comment: I'll take a look at this one. ---------- nosy: +a.badger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:38:51 2019 From: report at bugs.python.org (MICHAEL BLAHAY) Date: Mon, 06 May 2019 18:38:51 +0000 Subject: [issue36582] collections.UserString encode method returns a string In-Reply-To: <1554853133.32.0.976890929788.issue36582@roundup.psfhosted.org> Message-ID: <1557167931.53.0.171179254123.issue36582@roundup.psfhosted.org> MICHAEL BLAHAY added the comment: I will pick this on up ---------- nosy: +MICHAEL BLAHAY _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:40:31 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 18:40:31 +0000 Subject: [issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used In-Reply-To: <1539108839.31.0.545547206417.issue34946@psf.upfronthosting.co.za> Message-ID: <1557168031.6.0.539460658468.issue34946@roundup.psfhosted.org> Change by anthony shaw : ---------- keywords: +patch pull_requests: +13040 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:42:31 2019 From: report at bugs.python.org (MICHAEL BLAHAY) Date: Mon, 06 May 2019 18:42:31 +0000 Subject: [issue36582] collections.UserString encode method returns a string In-Reply-To: <1554853133.32.0.976890929788.issue36582@roundup.psfhosted.org> Message-ID: <1557168151.45.0.687377541949.issue36582@roundup.psfhosted.org> MICHAEL BLAHAY added the comment: My mistake, dfortunov is already working on this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:43:18 2019 From: report at bugs.python.org (Dustin Mendoza) Date: Mon, 06 May 2019 18:43:18 +0000 Subject: [issue36754] Remove smart quotes in pydoc text In-Reply-To: <1556560405.97.0.464374588222.issue36754@roundup.psfhosted.org> Message-ID: <1557168198.78.0.685625321175.issue36754@roundup.psfhosted.org> Change by Dustin Mendoza : ---------- keywords: +patch pull_requests: +13041 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:45:44 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 06 May 2019 18:45:44 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. Message-ID: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> New submission from Eric Snow : Currently we use the _PyRuntime static global to access the runtime state in various places. At the same time, in thread contexts we get access to the thread state from Thread-Local Storage and the interpreter state by indirection from there. We should do the same for the runtime state instead of using the global directly. My plan is to add a PyInterpreterState.runtime field. It can then be used in the same way we use PyThreadState.interp to access the interpreter state. ---------- assignee: eric.snow components: Interpreter Core messages: 341595 nosy: eric.snow, vstinner priority: normal severity: normal stage: patch review status: open title: Add PyInterpreterState.runtime. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:47:38 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 06 May 2019 18:47:38 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. In-Reply-To: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> Message-ID: <1557168458.22.0.58166529819.issue36818@roundup.psfhosted.org> Change by Eric Snow : ---------- keywords: +patch pull_requests: +13042 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:49:06 2019 From: report at bugs.python.org (Dustin Mendoza) Date: Mon, 06 May 2019 18:49:06 +0000 Subject: [issue36754] Remove smart quotes in pydoc text In-Reply-To: <1556560405.97.0.464374588222.issue36754@roundup.psfhosted.org> Message-ID: <1557168546.08.0.963878808075.issue36754@roundup.psfhosted.org> Dustin Mendoza added the comment: In my editor (VSCode) on windows it outputs correctly as a smart quote but if I write the output to a file or the console I get the "?" effect. A sent a PR to replace the smart quotes with escaped quotes but I wonder if we should also do a scan across everything to see if there are more smart quote instances (I'm still pretty new to the entire codebase so I can't say for sure if this is would even be necessary) ---------- nosy: +Giant_Robato _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:51:19 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 06 May 2019 18:51:19 +0000 Subject: [issue36275] DOC: venv.create doesn't include prompt parameter In-Reply-To: <1552435549.43.0.602415941786.issue36275@roundup.psfhosted.org> Message-ID: <1557168679.3.0.894613555111.issue36275@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 3921b1cc34c2fc8b8b480c19a95ec306de710fdd by Cheryl Sabella (Sebastian Koslowski) in branch 'master': bpo-36275: enhance documentation for venv.create() (GH-13114) https://github.com/python/cpython/commit/3921b1cc34c2fc8b8b480c19a95ec306de710fdd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:51:21 2019 From: report at bugs.python.org (Andrei Talaba) Date: Mon, 06 May 2019 18:51:21 +0000 Subject: [issue36819] Crash during encoding using UTF-16/32 and custom error handler Message-ID: <1557168681.45.0.232948256283.issue36819@roundup.psfhosted.org> New submission from Andrei Talaba : The CPython interpreter write out-of-bounds of allocated memory in certain edge cases in the utf-16 and utf-32 encoders. The attached script registers two error handlers that either write one ascii character, or two bytes, and tells the encoder to start again from the start of the encoding error. The script then tries to encode an invalid codepoint in either utf-16 or utf-32. Each of the calls to encode independently cause segfaults Since the encoder starts over again and keeps trying to append the result of the error handler, the lack of proper re-allocations leads to a buffer overflow, and corrupts the stack. ---------- components: Interpreter Core files: encode_crash.py messages: 341599 nosy: atalaba, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Crash during encoding using UTF-16/32 and custom error handler type: crash versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48304/encode_crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:51:22 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 06 May 2019 18:51:22 +0000 Subject: [issue36275] DOC: venv.create doesn't include prompt parameter In-Reply-To: <1552435549.43.0.602415941786.issue36275@roundup.psfhosted.org> Message-ID: <1557168682.87.0.00682365111199.issue36275@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:53:36 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 May 2019 18:53:36 +0000 Subject: [issue22640] Add silent mode for py_compile In-Reply-To: <1413361400.01.0.34334853586.issue22640@psf.upfronthosting.co.za> Message-ID: <1557168816.11.0.0707931474701.issue22640@roundup.psfhosted.org> Brett Cannon added the comment: I don't see anything wrong with the idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:54:38 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 06 May 2019 18:54:38 +0000 Subject: [issue36275] DOC: venv.create doesn't include prompt parameter In-Reply-To: <1552435549.43.0.602415941786.issue36275@roundup.psfhosted.org> Message-ID: <1557168878.61.0.700394445541.issue36275@roundup.psfhosted.org> Cheryl Sabella added the comment: @skoslowski Thank you for the PR! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:55:13 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 06 May 2019 18:55:13 +0000 Subject: [issue36275] DOC: venv.create doesn't include prompt parameter In-Reply-To: <1552435549.43.0.602415941786.issue36275@roundup.psfhosted.org> Message-ID: <1557168913.23.0.668133111707.issue36275@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:56:58 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 06 May 2019 18:56:58 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> Message-ID: <1557169018.66.0.765043103203.issue11107@roundup.psfhosted.org> Josh Rosenberg added the comment: I'm trying to sprint on this this week. I already had a PoC put together, but it has some significant issues caused by one major quirk with slices: 1. They're immutable, but 2. They're not hashable In various places, it is (reasonably) assumed that constants can be hashed (so as to coalesce identical constants), and since slice objects can't be, this causes problems. In my proof of concept, I cheated, and added a field to the slice object, hashable, that was only set to true when the slice was a result of: 1. ast_opt.c's constant coalescence 2. marshal.c's r_object reading in a slice from the bytecode Obviously this isn't practical for an actual patch, and I'm trying to figure out if there is a way around it. Right now, it seems like ast_opt.c's approach may not be necessary (even if I don't set hashable, it still works, and seems to coalesce, which seems odd; pretty sure when I first started the slices tried to get stored as dict keys at some point). I'm still having issues figuring out to handle marshaling; my code currently works, but where the first load of a module (from .py) performs constant coalescence, my attempts to make slices use w_ref/R_REF appropriately have been unsuccessful. I'd greatly appreciate any help/tips from anyone who knows enough about: 1. The constant coalescence code for ast/compile steps (for first load) 2. The rules for w_ref/R_REF in the marshal code (for writing out and loading from compiled bytecode files) 3. Working around the (possible) need for hashable objects in the constant coalescent/marshal-ing code If you're at the sprints, I'm sitting in the CPython room directly in front of the entrance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 14:57:26 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 06 May 2019 18:57:26 +0000 Subject: [issue36766] Typos in docs and code comments In-Reply-To: <1556716347.32.0.805084032343.issue36766@roundup.psfhosted.org> Message-ID: <1557169046.75.0.549170438417.issue36766@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 964663089547ca110199e23867b46b07ff4be88c by St?phane Wirtel (penguindustin) in branch 'master': bpo-36766: Typos in docs and code comments (GH-13116) https://github.com/python/cpython/commit/964663089547ca110199e23867b46b07ff4be88c ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:00:07 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 06 May 2019 19:00:07 +0000 Subject: [issue30668] DOC: missing word in license.rst In-Reply-To: <1497464826.74.0.48412228971.issue30668@psf.upfronthosting.co.za> Message-ID: <1557169207.47.0.54834632352.issue30668@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your contribution, I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:00:12 2019 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 06 May 2019 19:00:12 +0000 Subject: [issue32223] distutils doesn't correctly read UTF-8 content from config files In-Reply-To: <1512492386.04.0.213398074469.issue32223@psf.upfronthosting.co.za> Message-ID: <1557169212.59.0.222424407867.issue32223@roundup.psfhosted.org> ?ric Araujo added the comment: No, setup.py and setup.cfg are invented by distutils and extended by setuptools. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:02:39 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 19:02:39 +0000 Subject: [issue26278] BaseTransport.close() does not trigger connection_lost() In-Reply-To: <1454515056.72.0.0290408111031.issue26278@psf.upfronthosting.co.za> Message-ID: <1557169359.23.0.252952442792.issue26278@roundup.psfhosted.org> anthony shaw added the comment: This issue was never responded to, are you still having this issue? Which version of CPython are you using and can you please provide steps to reproduce the problem. ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:06:42 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 19:06:42 +0000 Subject: [issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used In-Reply-To: <1539108839.31.0.545547206417.issue34946@psf.upfronthosting.co.za> Message-ID: <1557169602.02.0.595542478611.issue34946@roundup.psfhosted.org> anthony shaw added the comment: Submitted PR to add the deprecation warning, since this initial discussion, some other functions also raise DeprecationWarning's in code. ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:07:06 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 19:07:06 +0000 Subject: [issue28742] argparse.ArgumentDefaultsHelpFormatter sometimes provides inaccurate documentation of defaults, so they should be overrideable In-Reply-To: <1479514629.23.0.218870455687.issue28742@psf.upfronthosting.co.za> Message-ID: <1557169626.84.0.343319296531.issue28742@roundup.psfhosted.org> anthony shaw added the comment: Hi Peter, this proposal would be easier to review as a GitHub Pull Request. ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:07:35 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 19:07:35 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1557169655.01.0.778906589784.issue26903@roundup.psfhosted.org> Change by Brian Quinlan : ---------- keywords: +patch pull_requests: +13045 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:08:13 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 06 May 2019 19:08:13 +0000 Subject: [issue30668] DOC: missing word in license.rst In-Reply-To: <1497464826.74.0.48412228971.issue30668@psf.upfronthosting.co.za> Message-ID: <1557169693.74.0.235289114608.issue30668@roundup.psfhosted.org> miss-islington added the comment: New changeset 8777915adeb6c884bcab262a33da3daddd2b2120 by Miss Islington (bot) in branch '3.7': bpo-30668: add missing word in license.rst (GH-13115) https://github.com/python/cpython/commit/8777915adeb6c884bcab262a33da3daddd2b2120 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:10:29 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 19:10:29 +0000 Subject: [issue13582] IDLE and pythonw.exe stderr problem In-Reply-To: <1323632290.53.0.810720020667.issue13582@psf.upfronthosting.co.za> Message-ID: <1557169829.27.0.523065382114.issue13582@roundup.psfhosted.org> anthony shaw added the comment: Revisiting this issue as it's still open. The original patch was for 3.3a0, there have been many changes to both IDLE and the Windows build since, including the recent IDLE entry point in the new Windows installer. Steve, Terry, please could you review to check if this issue is still relevant or can be closed off. ---------- nosy: +anthonypjshaw, cheryl.sabella, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:14:03 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 06 May 2019 19:14:03 +0000 Subject: [issue36754] Remove smart quotes in pydoc text In-Reply-To: <1556560405.97.0.464374588222.issue36754@roundup.psfhosted.org> Message-ID: <1557170043.17.0.227988661672.issue36754@roundup.psfhosted.org> Steve Dower added the comment: So pydoc_topics.py is an auto-generated file, which means we need to fix the generator as well if we decide to go that route. However, I suspect there's a problem somewhere else causing the console output to not go through stdout correctly. I'm not familiar enough with how help() works to know where. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:15:04 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Mon, 06 May 2019 19:15:04 +0000 Subject: [issue36165] DOC: ssl.rst is missing formatting on two links In-Reply-To: <1551525027.87.0.0940888364493.issue36165@roundup.psfhosted.org> Message-ID: <1557170104.12.0.549574632213.issue36165@roundup.psfhosted.org> Change by Toshio Kuratomi : ---------- keywords: +patch pull_requests: +13046 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:18:53 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 06 May 2019 19:18:53 +0000 Subject: [issue32592] Drop support of Windows Vista in Python 3.8 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1557170333.04.0.876419717701.issue32592@roundup.psfhosted.org> Eryk Sun added the comment: > Maybe it's time to remove Lib/encodings/cp65001.py and make it an > alias to utf_8 codec Note that Unicode console support already assumes they're equivalent. For stdin, we read UTF-16LE via ReadConsoleW and encode bytes to the UTF-8 BufferedReader via WideCharToMultiByte with CP_UTF8 (65001). For stdout/stderr, we decode bytes from the UTF-8 BufferedWriter via MultiByteToWideChar with CP_UTF8 and write UTF-16LE via WriteConsoleW. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:19:23 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 May 2019 19:19:23 +0000 Subject: [issue36766] Typos in docs and code comments In-Reply-To: <1556716347.32.0.805084032343.issue36766@roundup.psfhosted.org> Message-ID: <1557170363.1.0.132419287847.issue36766@roundup.psfhosted.org> Terry J. Reedy added the comment: Please do not close this until at least the idlelib changes are backported. ---------- nosy: +terry.reedy versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:24:32 2019 From: report at bugs.python.org (Andrei Talaba) Date: Mon, 06 May 2019 19:24:32 +0000 Subject: [issue36819] Crash during encoding using UTF-16/32 and custom error handler In-Reply-To: <1557168681.45.0.232948256283.issue36819@roundup.psfhosted.org> Message-ID: <1557170672.23.0.111631187998.issue36819@roundup.psfhosted.org> Change by Andrei Talaba : ---------- keywords: +patch pull_requests: +13047 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:26:10 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 06 May 2019 19:26:10 +0000 Subject: [issue36275] DOC: venv.create doesn't include prompt parameter In-Reply-To: <1552435549.43.0.602415941786.issue36275@roundup.psfhosted.org> Message-ID: <1557170770.82.0.910038940783.issue36275@roundup.psfhosted.org> miss-islington added the comment: New changeset 9a03c773285fda707fc4ce9a69347b83afeeb49f by Miss Islington (bot) in branch '3.7': bpo-36275: enhance documentation for venv.create() (GH-13114) https://github.com/python/cpython/commit/9a03c773285fda707fc4ce9a69347b83afeeb49f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:29:13 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 19:29:13 +0000 Subject: [issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc) In-Reply-To: <1447174958.96.0.448093662654.issue25597@psf.upfronthosting.co.za> Message-ID: <1557170953.39.0.10157615429.issue25597@roundup.psfhosted.org> anthony shaw added the comment: The assertions in the attached test still fail on master (3.8a3), so this still applies. Michael, are you able to look at this, the code hasn't changed since the original PEP417 implementation, which doesn't specify if this behaviour should be supported. The documentation does not specify that this is supported also, so i suspect this is an enhancement request. elif result is None: wraps = None if self._mock_wraps is not None: # XXXX should we get the attribute without triggering code # execution? wraps = getattr(self._mock_wraps, name) result = self._get_child_mock( parent=self, name=name, wraps=wraps, _new_name=name, _new_parent=self ) ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:29:26 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 19:29:26 +0000 Subject: [issue36395] Add deferred single-threaded/fake executor to concurrent.futures In-Reply-To: <1553218760.85.0.609828298764.issue36395@roundup.psfhosted.org> Message-ID: <1557170966.25.0.607705150976.issue36395@roundup.psfhosted.org> Brian Quinlan added the comment: Hey Brian, why can't you use threads in your unit tests? Are you worried about non-determinism or resource usage? Could you make a ThreadPoolExecutor with a single worker? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:29:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 19:29:42 +0000 Subject: [issue36793] Do not define unneeded __str__ equal to __repr__ In-Reply-To: <1556975423.86.0.374987997006.issue36793@roundup.psfhosted.org> Message-ID: <1557170982.97.0.737906876908.issue36793@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 96aeaec64738b730c719562125070a52ed570210 by Serhiy Storchaka in branch 'master': bpo-36793: Remove unneeded __str__ definitions. (GH-13081) https://github.com/python/cpython/commit/96aeaec64738b730c719562125070a52ed570210 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:30:41 2019 From: report at bugs.python.org (Michael Blahay) Date: Mon, 06 May 2019 19:30:41 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557171041.22.0.375473054804.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: Here is a test that more explicitly shows the problem. >>> from collections import UserList >>> UserList([0,1,2,3,4,5])[0:2].__class__ >>> It can clearly be seen here that the return type of the slicing operator is list when it should, in this case, be UserList (or whatever class one is using that is derived from UserList). ---------- nosy: +mblahay _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:32:00 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 19:32:00 +0000 Subject: [issue26374] concurrent_futures Executor.map semantics better specified in docs In-Reply-To: <1455711990.13.0.290959896018.issue26374@psf.upfronthosting.co.za> Message-ID: <1557171120.4.0.498967315835.issue26374@roundup.psfhosted.org> Brian Quinlan added the comment: Can we close this bug then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:32:15 2019 From: report at bugs.python.org (Mario Corchero) Date: Mon, 06 May 2019 19:32:15 +0000 Subject: [issue36820] Captured exceptions are keeping user objects alive unnecessarily in the stdlib Message-ID: <1557171135.51.0.216377454002.issue36820@roundup.psfhosted.org> New submission from Mario Corchero : There are multiple places in the standard library where the code captures an exception and reraises it later (outside of the original except). This is known to cause a cycle as saving the exception has a traceback that eventually points back to the exception, but it is especially problematic as it keeps alive the objects that the user has as well. This can be reproduced with the following example: ``` import weakref class A: pass ref = None def x(): global ref cool_var = A() ref = weakref.ref(cool_var) assert ref() try: 1/0 except Exception as e: ee = e try: x() except Exception: pass print(ref()) assert ref() is None ``` There are places in the standard library that try to get around this. See https://github.com/python/cpython/commit/acb9fa79fa6453c2bbe3ccfc9cad2837feb90093 as an example. This change did not include the exception path though, when the `err` variable is raised, the issue is still present. This issue is to fix the instances found in socket.py, codeop.py and dyld.py. By either setting the variable to None to remove the name or if it needs to be reraised by using a finally to delete it. This is basically the same that a try except would do, which automagically adds a finally to delete the local name used in the `except X as y`. There was a discussion with twouters,pablogsal,barry about potentially adding something extra to the exception handling to try to clean this up but it was suggested the best approach is for the user to handle it and maybe a linter to potentially flag it, as there might also be multiple references to the exception being captured. It was also proposed to just change the situations where this happens in the standard library to remove the name if possible. Note that eventually those objects will just be collected by the gc, it is just an improvement. I'm preparing a PR for those three modules. ---------- components: Library (Lib) messages: 341620 nosy: mariocj89, pablogsal, twouters priority: low severity: normal status: open title: Captured exceptions are keeping user objects alive unnecessarily in the stdlib type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:37:05 2019 From: report at bugs.python.org (Mario Corchero) Date: Mon, 06 May 2019 19:37:05 +0000 Subject: [issue36820] Captured exceptions are keeping user objects alive unnecessarily in the stdlib In-Reply-To: <1557171135.51.0.216377454002.issue36820@roundup.psfhosted.org> Message-ID: <1557171425.32.0.0684762735944.issue36820@roundup.psfhosted.org> Change by Mario Corchero : ---------- keywords: +patch pull_requests: +13048 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:39:10 2019 From: report at bugs.python.org (Dustin Mendoza) Date: Mon, 06 May 2019 19:39:10 +0000 Subject: [issue36766] Typos in docs and code comments In-Reply-To: <1556716347.32.0.805084032343.issue36766@roundup.psfhosted.org> Message-ID: <1557171550.35.0.0519095906735.issue36766@roundup.psfhosted.org> Change by Dustin Mendoza : ---------- pull_requests: +13049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:40:30 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 19:40:30 +0000 Subject: [issue36542] Allow to overwrite the signature for Python functions In-Reply-To: <1554539621.71.0.0901781243935.issue36542@roundup.psfhosted.org> Message-ID: <1557171630.4.0.242122135872.issue36542@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset d53cf99dca4605ace4b81b1e585616b3e1b74fa6 by Serhiy Storchaka in branch 'master': bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705) https://github.com/python/cpython/commit/d53cf99dca4605ace4b81b1e585616b3e1b74fa6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:41:14 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 06 May 2019 19:41:14 +0000 Subject: [issue36766] Typos in docs and code comments In-Reply-To: <1556716347.32.0.805084032343.issue36766@roundup.psfhosted.org> Message-ID: <1557171674.11.0.090843216137.issue36766@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi Terry, Sure, thank you for the reminder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:42:01 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 06 May 2019 19:42:01 +0000 Subject: [issue26374] concurrent_futures Executor.map semantics better specified in docs In-Reply-To: <1455711990.13.0.290959896018.issue26374@psf.upfronthosting.co.za> Message-ID: <1557171721.15.0.427516586225.issue26374@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I would propose closing since the original doc issue regarding order and map in Python 3 is resolved. Just to add there is a PR to make map less eager : https://github.com/python/cpython/pull/707/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:42:16 2019 From: report at bugs.python.org (Brian McCutchon) Date: Mon, 06 May 2019 19:42:16 +0000 Subject: [issue36395] Add deferred single-threaded/fake executor to concurrent.futures In-Reply-To: <1553218760.85.0.609828298764.issue36395@roundup.psfhosted.org> Message-ID: <1557171736.84.0.207808890959.issue36395@roundup.psfhosted.org> Brian McCutchon added the comment: Mostly nondeterminism. It seems like creating a ThreadPoolExecutor with one worker could still be nondeterministic, as there are two threads: the main thread and the worker thread. It gets worse if multiple executors are needed. Another option would be to design and document futures.Executor to be extended so that I can make my own fake executor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:43:33 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 19:43:33 +0000 Subject: [issue26374] concurrent_futures Executor.map semantics better specified in docs In-Reply-To: <1455711990.13.0.290959896018.issue26374@psf.upfronthosting.co.za> Message-ID: <1557171813.08.0.476468573086.issue26374@roundup.psfhosted.org> Change by Brian Quinlan : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:46:31 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 19:46:31 +0000 Subject: [issue24939] Remove unicode_format.h from stringlib In-Reply-To: <1440538211.37.0.431052107009.issue24939@psf.upfronthosting.co.za> Message-ID: <1557171991.06.0.312796199259.issue24939@roundup.psfhosted.org> Change by anthony shaw : ---------- keywords: +patch pull_requests: +13050 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:46:49 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 19:46:49 +0000 Subject: [issue36395] Add deferred single-threaded/fake executor to concurrent.futures In-Reply-To: <1553218760.85.0.609828298764.issue36395@roundup.psfhosted.org> Message-ID: <1557172009.07.0.374834266294.issue36395@roundup.psfhosted.org> Brian Quinlan added the comment: Do you have a example that you could share? I can't think of any other fakes in the standard library and I'm hesitant to be the person who adds the first one ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:46:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 May 2019 19:46:52 +0000 Subject: [issue36819] Crash during encoding using UTF-16/32 and custom error handler In-Reply-To: <1557168681.45.0.232948256283.issue36819@roundup.psfhosted.org> Message-ID: <1557172012.68.0.697518790171.issue36819@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:47:11 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 06 May 2019 19:47:11 +0000 Subject: [issue36820] Captured exceptions are keeping user objects alive unnecessarily in the stdlib In-Reply-To: <1557171135.51.0.216377454002.issue36820@roundup.psfhosted.org> Message-ID: <1557172031.75.0.305246550812.issue36820@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:47:45 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 19:47:45 +0000 Subject: [issue24939] Remove unicode_format.h from stringlib In-Reply-To: <1440538211.37.0.431052107009.issue24939@psf.upfronthosting.co.za> Message-ID: <1557172065.75.0.290181335681.issue24939@roundup.psfhosted.org> anthony shaw added the comment: Eric, there have been further changes to Objects/stringlib/unicode_format.h since this original note, I've raised a PR with the intent of your note from 2015. There also hasn't been any change to the situation, unicode_format.h is only used in unicodeobject.c stil. ---------- nosy: +anthonypjshaw stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:48:38 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 19:48:38 +0000 Subject: [issue24939] Remove unicode_format.h from stringlib In-Reply-To: <1440538211.37.0.431052107009.issue24939@psf.upfronthosting.co.za> Message-ID: <1557172118.98.0.320745696878.issue24939@roundup.psfhosted.org> anthony shaw added the comment: > The things that are in this file but are unrelated to unicodeobject.c are the support routines for implementing string.Formatter. I'm not sure which functions that relates to, if you could let me know I'd be happy to add those to the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:50:38 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 19:50:38 +0000 Subject: [issue33971] os.mknod is subject to "umask" In-Reply-To: <1530020156.39.0.56676864532.issue33971@psf.upfronthosting.co.za> Message-ID: <1557172238.13.0.293842604242.issue33971@roundup.psfhosted.org> anthony shaw added the comment: NB: This issue would be good for PyCon sprints ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:50:59 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 19:50:59 +0000 Subject: [issue33971] os.mknod is subject to "umask" In-Reply-To: <1530020156.39.0.56676864532.issue33971@psf.upfronthosting.co.za> Message-ID: <1557172259.18.0.55437279743.issue33971@roundup.psfhosted.org> Change by anthony shaw : ---------- assignee: docs at python -> Mariatta nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:52:27 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 19:52:27 +0000 Subject: [issue22361] Ability to join() threads in concurrent.futures.ThreadPoolExecutor In-Reply-To: <1410172185.62.0.239101325071.issue22361@psf.upfronthosting.co.za> Message-ID: <1557172347.7.0.322879158576.issue22361@roundup.psfhosted.org> Brian Quinlan added the comment: So you actually use the result of ex.submit i.e. use the resulting future? If you don't then it might be easier to just create your own thread. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:53:14 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Mon, 06 May 2019 19:53:14 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1557172394.81.0.964820525741.issue36780@roundup.psfhosted.org> Hrvoje Nik?i? added the comment: I agree with the last comment. The disowning functionality is only used in specific circumstances, so it's perfectly fine to keep the functionality as a shutdown flag. I also agree that the change cannot be *unconditional*, for backward compatibility if not for other reasons. The StackOverflow question, and more importantly the existence of shutdown(wait=False), suggest that there are legitimate cases when one doesn't want to wait for all running futures to finish. If a flag to shutdown() is considered to complicate the API, then perhaps we could add an opt-out by subclassing the executor and overriding a semi-private method. Currently there seems to be no way to just abandon the thread pool. Since user threads don't and never will support cancellation, the options are: 1. add the disown option to shutdown, as suggested 2. monkey-patch concurrent.futures to not block at shutdown 3. make functions executed by the pool externally cancellable 4. roll our own thread pool #1 is suggested by this issue, and #2 is what we do now, but it's obviously unacceptable in the long term. #3 is infeasible because the functions we submit to the pool heavily rely on http (through "requests") and database communication, which don't support user-driven cancellation. #4 would be technically possible, but it would require reimplementing half of concurrent.futures (badly), just for the purpose of being able to get rid of the mandatory wait at interpreter exit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:54:38 2019 From: report at bugs.python.org (Yongnan Wu) Date: Mon, 06 May 2019 19:54:38 +0000 Subject: [issue34766] BaseProxy cache should be cleaned when Manager client is reconnected In-Reply-To: <1537900896.87.0.545547206417.issue34766@psf.upfronthosting.co.za> Message-ID: <1557172478.69.0.114429889835.issue34766@roundup.psfhosted.org> Yongnan Wu added the comment: pong ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:56:21 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 06 May 2019 19:56:21 +0000 Subject: [issue24939] Remove unicode_format.h from stringlib In-Reply-To: <1440538211.37.0.431052107009.issue24939@psf.upfronthosting.co.za> Message-ID: <1557172581.31.0.839216209023.issue24939@roundup.psfhosted.org> Eric V. Smith added the comment: I think I meant things like PyFieldNameIter_Type, but it would require some analysis. ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:56:22 2019 From: report at bugs.python.org (Logan Jones) Date: Mon, 06 May 2019 19:56:22 +0000 Subject: [issue28002] Some f-strings do not round trip through Tools/parser/test_unparse.py In-Reply-To: <1473268698.62.0.800338957351.issue28002@psf.upfronthosting.co.za> Message-ID: <1557172582.37.0.177425088766.issue28002@roundup.psfhosted.org> Logan Jones added the comment: After speaking with Lukasz about this, it seems like the unparser is using the normal unicode repr to determine what should be returned. The default unicode repr will escape quotes if necessary. This is not allowed for f-strings and is the root cause of the problem. One way to solve this is to add a flag to the unicode_repr function to determine whether or not we need to allow triple quotes in the output of the repr. By default this will be false and will use backslashes, but the ast_unparse will use true for this. ---------- nosy: +loganasherjones _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 15:58:00 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 19:58:00 +0000 Subject: [issue23697] Module level map & submit for concurrent.futures In-Reply-To: <1426648820.66.0.638337601517.issue23697@psf.upfronthosting.co.za> Message-ID: <1557172680.42.0.544815921663.issue23697@roundup.psfhosted.org> Brian Quinlan added the comment: Using a default executor could be dangerous because it could lead to deadlocks. For example: mylib.py -------- def my_func(): tsubmit(...) tsubmit(...) tsubmit(somelib.some_func, ...) somelib.py ---------- def some_func(): tsubmit(...) # Potential deadlock if no more free threads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:03:05 2019 From: report at bugs.python.org (Andrei Talaba) Date: Mon, 06 May 2019 20:03:05 +0000 Subject: [issue36819] Crash during encoding using UTF-16/32 and custom error handler In-Reply-To: <1557168681.45.0.232948256283.issue36819@roundup.psfhosted.org> Message-ID: <1557172985.45.0.926802701011.issue36819@roundup.psfhosted.org> Change by Andrei Talaba : Removed file: https://bugs.python.org/file48304/encode_crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:03:26 2019 From: report at bugs.python.org (Andrei Talaba) Date: Mon, 06 May 2019 20:03:26 +0000 Subject: [issue36819] Crash during encoding using UTF-16/32 and custom error handler In-Reply-To: <1557168681.45.0.232948256283.issue36819@roundup.psfhosted.org> Message-ID: <1557173006.6.0.783678063501.issue36819@roundup.psfhosted.org> Change by Andrei Talaba : Added file: https://bugs.python.org/file48305/encode_crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:04:26 2019 From: report at bugs.python.org (Eric N. Vander Weele) Date: Mon, 06 May 2019 20:04:26 +0000 Subject: [issue36820] Captured exceptions are keeping user objects alive unnecessarily in the stdlib In-Reply-To: <1557171135.51.0.216377454002.issue36820@roundup.psfhosted.org> Message-ID: <1557173066.09.0.428379745846.issue36820@roundup.psfhosted.org> Change by Eric N. Vander Weele : ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:06:01 2019 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 May 2019 20:06:01 +0000 Subject: [issue24195] Add `Executor.filter` to concurrent.futures In-Reply-To: <1431638802.0.0.167827013304.issue24195@psf.upfronthosting.co.za> Message-ID: <1557173161.57.0.805130845843.issue24195@roundup.psfhosted.org> Brian Quinlan added the comment: Hey Ethan, I'm really sorry about dropping the ball on this. I've been burnt out on Python stuff for the last couple of years. When we left this, it looked like the -1s were in the majority and no one new has jumped on to support `filter`. If you wanted to add this, I wouldn't object. But I've been inactive so long that I don't think that I should make the decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:09:43 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 06 May 2019 20:09:43 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557173383.54.0.618171699005.issue36792@roundup.psfhosted.org> Eryk Sun added the comment: > libc = ctypes.cdll.msvcrt That's the private CRT of Windows, not the Universal CRT for applications. In a release build (python.exe), use ctypes.CDLL('ucrtbase', use_errno=True). In a debug build (python_d.exe), use ctypes.CDLL('ucrtbased', use_errno=True). I suppose we should use API sets [1] for the release build, such as "api-ms-win-crt-locale-l1-1-0" and "api-ms-win-crt-time-l1-1-0". But they resolve to "ucrtbase". [1]: https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-extension-apis ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:15:06 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 20:15:06 +0000 Subject: [issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets In-Reply-To: <1446549321.99.0.809607214975.issue25541@psf.upfronthosting.co.za> Message-ID: <1557173706.02.0.479190719066.issue25541@roundup.psfhosted.org> anthony shaw added the comment: hi, which version of Python were you using to do this? Please could you provide the full code snippet to reproduce the issue. The following example binds to the correct namespace from socket import * sock = socket(AF_UNIX, SOCK_STREAM) sock.bind("\0/var/tmp/sock.tmp") ---------- nosy: +anthonypjshaw, scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:16:11 2019 From: report at bugs.python.org (Sebastian Koslowski) Date: Mon, 06 May 2019 20:16:11 +0000 Subject: [issue36784] __import__ with empty folder after importlib.invalidate_caches causes reference leak In-Reply-To: <1556892175.48.0.910434484078.issue36784@roundup.psfhosted.org> Message-ID: <1557173771.0.0.30028402625.issue36784@roundup.psfhosted.org> Sebastian Koslowski added the comment: So, I dug into this here at the PyCon19 sprints and as far as I can see there is no actual leak. What you are seeing in your code example is from the state, that is kept between successive run of your import. All the cases you reported as not leaking generate a fixed tempdir. However, if the tempdir is random (or at least differs between runs) two new modules are added to sys.modules and one entry is added to the path_importer_cache for each run. These are not cleared by invalidate_caches(). If you append the following lines to test_importlib_cache_tempdir() these objects (and the caches in them) get cleared and your test passes. sys.modules.pop(basename + ".test2") sys.modules.pop(basename) sys.path_importer_cache.pop(path) This can also be confirmed using sys.gettotalrefcount(). ---------- nosy: +skoslowski _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:17:36 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 06 May 2019 20:17:36 +0000 Subject: [issue36784] __import__ with empty folder after importlib.invalidate_caches causes reference leak In-Reply-To: <1556892175.48.0.910434484078.issue36784@roundup.psfhosted.org> Message-ID: <1557173856.81.0.865931827841.issue36784@roundup.psfhosted.org> Julien Palard added the comment: Thanks Sebastian for looking at it \o/ ---------- nosy: +mdk resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:19:49 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 20:19:49 +0000 Subject: [issue32971] Docs on unittest.TestCase.assertRaises() should clarify context manager details In-Reply-To: <1519840682.18.0.467229070634.issue32971@psf.upfronthosting.co.za> Message-ID: <1557173989.98.0.0567950448872.issue32971@roundup.psfhosted.org> Change by anthony shaw : ---------- pull_requests: -9605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:20:48 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 20:20:48 +0000 Subject: [issue32971] Docs on unittest.TestCase.assertRaises() should clarify context manager details In-Reply-To: <1519840682.18.0.467229070634.issue32971@psf.upfronthosting.co.za> Message-ID: <1557174048.67.0.938219304843.issue32971@roundup.psfhosted.org> Change by anthony shaw : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:21:03 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 06 May 2019 20:21:03 +0000 Subject: [issue36784] __import__ with empty folder after importlib.invalidate_caches causes reference leak In-Reply-To: <1556892175.48.0.910434484078.issue36784@roundup.psfhosted.org> Message-ID: <1557174063.71.0.321311480206.issue36784@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:23:42 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 20:23:42 +0000 Subject: [issue34368] ftplib __init__ function can't handle 120 or 4xy reply when connect to the server In-Reply-To: <1533877262.72.0.56676864532.issue34368@psf.upfronthosting.co.za> Message-ID: <1557174222.4.0.208327609535.issue34368@roundup.psfhosted.org> Change by anthony shaw : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:32:36 2019 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 06 May 2019 20:32:36 +0000 Subject: [issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets In-Reply-To: <1446549321.99.0.809607214975.issue25541@psf.upfronthosting.co.za> Message-ID: <1557174756.65.0.701253026633.issue25541@roundup.psfhosted.org> Stefan Behnel added the comment: Looks like the issue was originally reported against Python 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:33:14 2019 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 06 May 2019 20:33:14 +0000 Subject: [issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets In-Reply-To: <1446549321.99.0.809607214975.issue25541@psf.upfronthosting.co.za> Message-ID: <1557174794.51.0.293350296894.issue25541@roundup.psfhosted.org> Change by Stefan Behnel : ---------- nosy: -scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:42:20 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 20:42:20 +0000 Subject: [issue24939] Remove unicode_format.h from stringlib In-Reply-To: <1440538211.37.0.431052107009.issue24939@psf.upfronthosting.co.za> Message-ID: <1557175340.7.0.437941329831.issue24939@roundup.psfhosted.org> anthony shaw added the comment: The code is mostly: FieldNameIterator * related functions FormatterIterator * related functions MarkupIterator * related functions There are a few other utility methods in there as well ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:50:56 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 May 2019 20:50:56 +0000 Subject: [issue13582] IDLE and pythonw.exe stderr problem In-Reply-To: <1323632290.53.0.810720020667.issue13582@psf.upfronthosting.co.za> Message-ID: <1557175856.02.0.330702864885.issue13582@roundup.psfhosted.org> Terry J. Reedy added the comment: Good question. There are two issues when starting IDLE with pythonw.exe, so that sys.__stderr__ and sys.stderr are initially None. 1. None.write is an attribute error that crashes Python. Therefore, don't do that. Instead use print. By default, and when 'file=None' is given directly or by reference, print writes to sys.stdout if it exists or gives up otherwise. I checked for possible (None).write code and did not find any except where commented out. These should be deleted or converted to prints. Possible None files are passed to traceback.print_exception and traceback.print_stack and these both use print, not write. All but two of the stderr crash issues Roger listed in msg149414 are closed, and the last two either should be or should have a different problem. Still relevant is 2. Unprinted messages cannot be read by the user. So display them in a text widget. Open question 1: backup to print?, default display method?, or both (when possible)? Ned implies that both would be good on Mac, and maybe same would be true everywhere. Open question 2: what patch? I need to consider Roger's patch in relation to idlelib changes since, including new PseudoFiles, changes to text viewer, and new query module. The above is about sys in the IDLE GUI process. The user code process is started with sys.executable, and sys.stdout and sys.stderr are replaced with Pseudofiles that direct output to the idle process shell. The value of sys.__stdout__ and __stderr__ depend on sys.executable. If None, prints will go to sys.stdout and hence Shell, and writes raise AttributeError, which also appears in the Shell. If normal, prints and writes go to the console. I should check if enough of this is in the docs. It might be a good idea to wrap both processes in a top-level try-except to attempt to display any unexpected internal error. I will clean the nosy list as this issue does not involve Steve Dower and many others are long inactive. ---------- nosy: -Todd.Rovito, amaury.forgeotdarc, devplayer, roger.serwy, steve.dower versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:52:21 2019 From: report at bugs.python.org (Michael Blahay) Date: Mon, 06 May 2019 20:52:21 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557175941.28.0.489769365664.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: The root cause of this issue seems to be the failure to implement type usage in __getitem__ when the deprecated __getslice__ was removed. This is why slicing worked correctly in 2.7, but not the 3.x versions. In 3.8, the __getitem__ method is used to create the slice, but here we can see that all it does is pass the task to data, which is of type list and then fails to convert the result to the correct type. def __getitem__(self, i): return self.data[i] Using other methods as examples, the fix should look like this: def __getitem__(self, i): return self.__class__(self.data[i]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:54:31 2019 From: report at bugs.python.org (Michael Blahay) Date: Mon, 06 May 2019 20:54:31 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557176071.28.0.0395163699283.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: It is also worth noting that the definition of UserList moved from Lib/UserList.py in 2.7 to Lib/collections/__init__.py in 3.x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:55:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 06 May 2019 20:55:32 +0000 Subject: [issue36766] Typos in docs and code comments In-Reply-To: <1556716347.32.0.805084032343.issue36766@roundup.psfhosted.org> Message-ID: <1557176132.4.0.339869878728.issue36766@roundup.psfhosted.org> miss-islington added the comment: New changeset b2d29bfa5be5a0794c7c69078c43953967fcacf4 by Miss Islington (bot) (penguindustin) in branch '3.7': [3.7] bpo-36766: Typos in docs and code comments (GH-13116). (GH-13136) https://github.com/python/cpython/commit/b2d29bfa5be5a0794c7c69078c43953967fcacf4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 16:57:44 2019 From: report at bugs.python.org (Michael Blahay) Date: Mon, 06 May 2019 20:57:44 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557176264.7.0.0208604603547.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: Results from a quick unit test on the proposed changes were positive: >>> from collections import UserList >>> UserList([0,1,2,3,4,5])[0:2].__class__ If you compare this result with the one a couple comments above, you can see that the result is no longer a list, but rather of type UserList. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 17:07:07 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 May 2019 21:07:07 +0000 Subject: [issue36766] Typos in docs and code comments In-Reply-To: <1556716347.32.0.805084032343.issue36766@roundup.psfhosted.org> Message-ID: <1557176827.07.0.887038349619.issue36766@roundup.psfhosted.org> Terry J. Reedy added the comment: Dustin, thank you for both patches. Some people are not annoyed by minor typos. I am one who is. I hope you are enjoying and learning from the sprint. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 17:19:49 2019 From: report at bugs.python.org (Daniel Fortunov) Date: Mon, 06 May 2019 21:19:49 +0000 Subject: [issue36582] collections.UserString encode method returns a string In-Reply-To: <1554853133.32.0.976890929788.issue36582@roundup.psfhosted.org> Message-ID: <1557177589.48.0.759459717964.issue36582@roundup.psfhosted.org> Change by Daniel Fortunov : ---------- keywords: +patch pull_requests: +13051 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 17:23:42 2019 From: report at bugs.python.org (Daniel Fortunov) Date: Mon, 06 May 2019 21:23:42 +0000 Subject: [issue36582] collections.UserString encode method returns a string In-Reply-To: <1554853133.32.0.976890929788.issue36582@roundup.psfhosted.org> Message-ID: <1557177822.42.0.773866091799.issue36582@roundup.psfhosted.org> Daniel Fortunov added the comment: PR submitted here: https://github.com/python/cpython/pull/13138 Rather than adding three different tests for the different code paths I chose to collapse the three different code paths by surfacing the underlying str.encode() defaults in the method signature of UserString.encode(), taking it down to a one-line implementation. @xtreak: Thanks for the super-helpful triage and failing test case! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 17:54:18 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 06 May 2019 21:54:18 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557179658.42.0.159669756178.issue35925@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13052 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 17:54:28 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 May 2019 21:54:28 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557179668.62.0.325321743261.issue35925@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 2cc0223f43a1ffd59c887a73e2b0ce5202f3be90 by Gregory P. Smith in branch 'master': bpo-35925: Skip SSL tests that fail due to weak external certs. (GH-13124) https://github.com/python/cpython/commit/2cc0223f43a1ffd59c887a73e2b0ce5202f3be90 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:08:47 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:08:47 +0000 Subject: [issue31968] exec(): method's default arguments from dict-inherited globals In-Reply-To: <1510058956.93.0.213398074469.issue31968@psf.upfronthosting.co.za> Message-ID: <1557180527.2.0.495551388557.issue31968@roundup.psfhosted.org> Change by anthony shaw : ---------- pull_requests: +13053 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:09:11 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:09:11 +0000 Subject: [issue31968] exec(): method's default arguments from dict-inherited globals In-Reply-To: <1510058956.93.0.213398074469.issue31968@psf.upfronthosting.co.za> Message-ID: <1557180551.96.0.538823789279.issue31968@roundup.psfhosted.org> anthony shaw added the comment: Added a PR for the documentation clarification. ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:19:58 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:19:58 +0000 Subject: [issue25251] Unknown MS Compiler version 1900 In-Reply-To: <1443392264.43.0.443478210283.issue25251@psf.upfronthosting.co.za> Message-ID: <1557181198.03.0.991091020197.issue25251@roundup.psfhosted.org> anthony shaw added the comment: Closing as 3rd party feature for setuptools ---------- nosy: +anthonypjshaw resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:21:02 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:21:02 +0000 Subject: [issue28775] Option to set startup directory in IDLE In-Reply-To: <1479837252.01.0.0581172301847.issue28775@psf.upfronthosting.co.za> Message-ID: <1557181262.37.0.458530654252.issue28775@roundup.psfhosted.org> anthony shaw added the comment: Hi Nofar are you still interested on working on this request? ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:25:48 2019 From: report at bugs.python.org (Sam Martin) Date: Mon, 06 May 2019 22:25:48 +0000 Subject: [issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs In-Reply-To: <1521562363.32.0.467229070634.issue33110@psf.upfronthosting.co.za> Message-ID: <1557181548.25.0.142506296154.issue33110@roundup.psfhosted.org> Change by Sam Martin : ---------- keywords: +patch pull_requests: +13054 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:29:19 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:29:19 +0000 Subject: [issue27534] IDLE: Reduce number and time for user process imports In-Reply-To: <1468711156.27.0.318866145341.issue27534@psf.upfronthosting.co.za> Message-ID: <1557181759.93.0.000699504861204.issue27534@roundup.psfhosted.org> anthony shaw added the comment: It would be great for this issue to be revisited, there has been some further interest from users. ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:36:51 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:36:51 +0000 Subject: [issue28367] Add more standard baud rate constants to "termios" In-Reply-To: <1475695367.16.0.283640170005.issue28367@psf.upfronthosting.co.za> Message-ID: <1557182211.88.0.780750210766.issue28367@roundup.psfhosted.org> Change by anthony shaw : ---------- pull_requests: +13055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:39:33 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:39:33 +0000 Subject: [issue28367] Add more standard baud rate constants to "termios" In-Reply-To: <1475695367.16.0.283640170005.issue28367@psf.upfronthosting.co.za> Message-ID: <1557182373.43.0.372958492847.issue28367@roundup.psfhosted.org> anthony shaw added the comment: Converted the original patch as a PR GH-13142 this seems like a good idea and an easy change ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:47:32 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:47:32 +0000 Subject: [issue36821] Termios module largely untested Message-ID: <1557182852.99.0.825312332022.issue36821@roundup.psfhosted.org> New submission from anthony shaw : I noticed that the termios.c module is largely untested. There is some coverage via test_pty, test_ioctl and test_getpass, but there is nothing to cover regression and the behaviours in the module functions. Tests are required for: - termios.tcgetattr() - termios.tcsetattr() - termios.tcsendbreak() - termios.tcdrain() - termios.tcflush() - termios.tcflow() ---------- assignee: anthonypjshaw components: Tests messages: 341656 nosy: anthonypjshaw priority: normal severity: normal status: open title: Termios module largely untested type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:47:59 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:47:59 +0000 Subject: [issue36821] Termios module largely untested In-Reply-To: <1557182852.99.0.825312332022.issue36821@roundup.psfhosted.org> Message-ID: <1557182879.96.0.365266842885.issue36821@roundup.psfhosted.org> anthony shaw added the comment: This could be a good issue for the PyCon sprints, otherwise I'm happy to implement it ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:53:12 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:53:12 +0000 Subject: [issue36819] Crash during encoding using UTF-16/32 and custom error handler In-Reply-To: <1557168681.45.0.232948256283.issue36819@roundup.psfhosted.org> Message-ID: <1557183192.53.0.710934728949.issue36819@roundup.psfhosted.org> anthony shaw added the comment: Easily reproduced on master, thanks (lldb) run encode_crash.py Process 14743 launched: '/Users/anthonyshaw/repo/cpython/python.exe' (x86_64) Objects/unicodeobject.c:448: _PyUnicode_CheckConsistency: Assertion "((((((PyObject*)(op))->ob_type))->tp_flags & ((1UL << 28))) != 0)" failed Enable tracemalloc to get the memory block allocation traceback object : Process 14743 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) frame #0: 0x00000001000b5c15 python.exe`PyObject_Repr(v=0x0000000101376f90) at object.c:535:11 532 infinitely. */ 533 if (Py_EnterRecursiveCall(" while getting the repr of an object")) 534 return NULL; -> 535 res = (*v->ob_type->tp_repr)(v); 536 Py_LeaveRecursiveCall(); 537 if (res == NULL) 538 return NULL; ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 18:58:56 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 22:58:56 +0000 Subject: [issue36814] posix_spawn explicit file_actions=None throws error In-Reply-To: <1557155156.27.0.0390065046289.issue36814@roundup.psfhosted.org> Message-ID: <1557183536.49.0.25450486577.issue36814@roundup.psfhosted.org> anthony shaw added the comment: Verified on master Python 3.8.0a3+ (heads/bpo-28367:373c7aa098, May 6 2019, 17:34:39) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=None) Traceback (most recent call last): File "", line 1, in NameError: name 'os' is not defined >>> import os >>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=None) Traceback (most recent call last): File "", line 1, in TypeError: file_actions must be a sequence or None ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 19:05:13 2019 From: report at bugs.python.org (Brian McCutchon) Date: Mon, 06 May 2019 23:05:13 +0000 Subject: [issue36395] Add deferred single-threaded/fake executor to concurrent.futures In-Reply-To: <1553218760.85.0.609828298764.issue36395@roundup.psfhosted.org> Message-ID: <1557183913.22.0.335687761564.issue36395@roundup.psfhosted.org> Brian McCutchon added the comment: I understand your hesitation to add a fake. Would it be better to make it possible to subclass Executor so that a third party implementation of this can be developed? As for an example, here is an example of nondeterminism when using a ThreadPoolExecutor with a single worker. It sometimes prints "False" and sometimes "True" on my machine. from concurrent import futures import time complete = False def complete_eventually(): global complete for _ in range(150000): pass complete = True with futures.ThreadPoolExecutor(max_workers=1) as pool: pool.submit(complete_eventually) print(complete) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 19:07:06 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 23:07:06 +0000 Subject: [issue36814] posix_spawn explicit file_actions=None throws error In-Reply-To: <1557155156.27.0.0390065046289.issue36814@roundup.psfhosted.org> Message-ID: <1557184026.75.0.87588268792.issue36814@roundup.psfhosted.org> anthony shaw added the comment: Issue is in parse_file_actions parse_file_actions(PyObject *file_actions, posix_spawn_file_actions_t *file_actionsp, PyObject *temp_buffer) { PyObject *seq; PyObject *file_action = NULL; PyObject *tag_obj; seq = v(file_actions, "file_actions must be a sequence or None"); if (seq == NULL) { return -1; } PySequence_Fast will raise a TypeError if PyObject_GetIter fails. ---------- assignee: -> anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 19:09:01 2019 From: report at bugs.python.org (Ian Good) Date: Mon, 06 May 2019 23:09:01 +0000 Subject: [issue34975] start_tls() difficult when using asyncio.start_server() In-Reply-To: <1539460993.6.0.788709270274.issue34975@psf.upfronthosting.co.za> Message-ID: <1557184141.46.0.887129867232.issue34975@roundup.psfhosted.org> Change by Ian Good : ---------- keywords: +patch pull_requests: +13056 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 19:09:25 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Mon, 06 May 2019 23:09:25 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1557184165.31.0.322339739379.issue33187@roundup.psfhosted.org> Sanyam Khurana added the comment: Hello Anjali, This PR is still lurking for your updates from almost 11 months. Please let us know if you're still working on this, else, we'll get this in. Thanks for your work! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 19:10:19 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 23:10:19 +0000 Subject: [issue36814] posix_spawn explicit file_actions=None throws error In-Reply-To: <1557155156.27.0.0390065046289.issue36814@roundup.psfhosted.org> Message-ID: <1557184219.68.0.0132191959192.issue36814@roundup.psfhosted.org> Change by anthony shaw : ---------- keywords: +patch pull_requests: +13057 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 19:10:51 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 23:10:51 +0000 Subject: [issue36814] posix_spawn explicit file_actions=None throws error In-Reply-To: <1557155156.27.0.0390065046289.issue36814@roundup.psfhosted.org> Message-ID: <1557184251.05.0.920256569393.issue36814@roundup.psfhosted.org> anthony shaw added the comment: Raised a fix in GH-13144 ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 19:14:02 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 06 May 2019 23:14:02 +0000 Subject: [issue36814] posix_spawn explicit file_actions=None throws error In-Reply-To: <1557155156.27.0.0390065046289.issue36814@roundup.psfhosted.org> Message-ID: <1557184442.91.0.964662144162.issue36814@roundup.psfhosted.org> anthony shaw added the comment: After patch: Python 3.8.0a3+ (heads/31968-dirty:c664b342a4, May 6 2019, 18:06:21) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=None) 17300 >>> anthonyshaw ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 19:48:23 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Mon, 06 May 2019 23:48:23 +0000 Subject: [issue36822] Minor grammatical fix in glossary.rst Message-ID: <1557186503.72.0.659127462032.issue36822@roundup.psfhosted.org> New submission from Sanyam Khurana : While working on translations, I saw a minor grammatical error in `Doc/glossary.rst`: ``` * The default Python prompt of the interactive shell when entering code for an indented code block ... ``` should be ``` * The default Python prompt of the interactive shell when entering the code for an indented code block ... ``` Attaching the path with this. ---------- assignee: docs at python components: Documentation messages: 341665 nosy: CuriousLearner, docs at python priority: normal severity: normal stage: needs patch status: open title: Minor grammatical fix in glossary.rst type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 19:50:18 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Mon, 06 May 2019 23:50:18 +0000 Subject: [issue36822] Minor grammatical fix in glossary.rst In-Reply-To: <1557186503.72.0.659127462032.issue36822@roundup.psfhosted.org> Message-ID: <1557186618.73.0.503321266553.issue36822@roundup.psfhosted.org> Change by Sanyam Khurana : ---------- keywords: +patch pull_requests: +13058 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 20:10:56 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Tue, 07 May 2019 00:10:56 +0000 Subject: [issue36684] codecov.io code coverage has not updated since 2019-04-13 In-Reply-To: <1555804519.07.0.0840911433327.issue36684@roundup.psfhosted.org> Message-ID: <1557187856.64.0.386867238316.issue36684@roundup.psfhosted.org> Gordon P. Hemsley added the comment: Hah, that's indeed where I've landed in my experimentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 20:18:38 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Tue, 07 May 2019 00:18:38 +0000 Subject: [issue36684] codecov.io code coverage has not updated since 2019-04-13 In-Reply-To: <1555804519.07.0.0840911433327.issue36684@roundup.psfhosted.org> Message-ID: <1557188318.86.0.201932175288.issue36684@roundup.psfhosted.org> Change by Gordon P. Hemsley : ---------- pull_requests: +13059 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 20:38:38 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 07 May 2019 00:38:38 +0000 Subject: [issue10653] test_time test_strptime fails on windows In-Reply-To: <1291820491.4.0.666293971337.issue10653@psf.upfronthosting.co.za> Message-ID: <1557189518.38.0.256504705513.issue10653@roundup.psfhosted.org> Change by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 21:23:19 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 07 May 2019 01:23:19 +0000 Subject: [issue23697] Module level map & submit for concurrent.futures In-Reply-To: <1426648820.66.0.638337601517.issue23697@psf.upfronthosting.co.za> Message-ID: <1557192199.55.0.405491406075.issue23697@roundup.psfhosted.org> Josh Rosenberg added the comment: For the process based versions, it makes it too easy to accidentally fork bomb yourself, since each process that call psubmit would implicitly created another #CPUs workers of its own, so a process based version Brian's case with a mere four top-level psubmits each of which performs a single psubmit of its own would logically involve 1 + #CPUs + #CPU**2 total processes, without the user ever explicitly asking for them. Especially in a fork-based context, this could easily trigger the Linux OOM-killer if the parent process is of even moderate size, since a four core system with a 1 GB parent process would suddenly be asking for up to 21 GB of memory. Most of that is only potentially used, given COW behavior, but the OOM killer assumes COW memory will eventually be copied (and it's largely right about that for CPython given the cyclic garbage collector's twiddling of reference counts), so it's hardly relevant if 21 GB is actually used; the OOM-killer doesn't care, and will murder the process anyway. The alternative would be having the default process executor shared with the child processes, but that just means process usage would be subject to the same deadlocks as in Brian's threaded case. This also defeats the purpose of the Executor model; Java, which pioneered it to my knowledge, intentionally required you to create the executor up front (typically in a single global location) because the goal is to allow you to change your program-wide parallelism model by changing a single line (the definition of the executor), with all uses of the executor remaining unchanged. Making a bunch of global functions implicitly tied to different executors/executor models means the parallelism is no longer centrally defined, so switching models means changes all over the code base (in Python, that's often unavoidable due to constraints involving pickling and data sharing, but there is no need to make it worse). ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 21:39:04 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 07 May 2019 01:39:04 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557193144.73.0.389083214333.issue36817@roundup.psfhosted.org> Ivan Levkivskyi added the comment: +1 from me (as a big fan of print-debugging). ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 22:22:53 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 07 May 2019 02:22:53 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557195773.82.0.62919506588.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: Thanks for the reminder Eryk Sun. This means the test needs to be run yet one more time :) import ctypes, locale, struct crt_time = ctypes.CDLL('api-ms-win-crt-time-l1-1-0', use_errno=True) locale.setlocale(locale.LC_ALL, 'de_DE') buf = ctypes.create_string_buffer(1024) tm = struct.pack('9i', 2019, 5, 6, 9, 50, 4, 0, 126, 1) print('count:', crt_time.strftime(buf, 1024, b'%Z', tm)) print('value:', buf.value) wbuf = ctypes.create_unicode_buffer(1024) print('count:', crt_time.wcsftime(wbuf, 1024, '%Z', tm)) print('value:', wbuf.value) crt_convert = ctypes.CDLL('api-ms-win-crt-convert-l1-1-0', use_errno=True) print('count:', crt_convert.mbstowcs(wbuf, buf, 1024)) print('value:', wbuf.value) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 22:27:11 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 07 May 2019 02:27:11 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557196031.83.0.306270135235.issue36783@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +13060 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 22:51:00 2019 From: report at bugs.python.org (Mitar) Date: Tue, 07 May 2019 02:51:00 +0000 Subject: [issue13824] argparse.FileType opens a file and never closes it In-Reply-To: <1326975939.94.0.524131708506.issue13824@psf.upfronthosting.co.za> Message-ID: <1557197460.73.0.863734084016.issue13824@roundup.psfhosted.org> Mitar added the comment: Why not make FileType instance also a context manager, so you could do something like: with arguments.input as f: assert arguments.input is f For backwards compatibility, FileType would open eagerly as now, but it would be closed at exit from context manager. We should just make sure we do not close stdout/stderr. ---------- nosy: +mitar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 22:54:08 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 07 May 2019 02:54:08 +0000 Subject: [issue36806] Forbid creating of stream objects outside of asyncio In-Reply-To: <1557083737.76.0.720112204128.issue36806@roundup.psfhosted.org> Message-ID: <1557197648.64.0.213585999412.issue36806@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 23:06:46 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 07 May 2019 03:06:46 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557198406.5.0.292646977602.issue36778@roundup.psfhosted.org> Inada Naoki added the comment: FYI, I expect cp65001 will be used more widely in near future, because non UTF-8 default encoding reduced Developer eXperience, and Microsoft try to improve DX recent years. Today, Microsoft announced new Terminal application. It seems use `SetConsoleOutputCP(65001)` and `SetConsoleCP(65001)`. I think treating cp65001 as right "UTF-8" locale is better for all Windows developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 23:12:50 2019 From: report at bugs.python.org (Edison Abahurire) Date: Tue, 07 May 2019 03:12:50 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1557198770.51.0.936602217701.issue36782@roundup.psfhosted.org> Edison Abahurire added the comment: I have submitted PR (under review) for these tests: - PyDate_FromDate / PyDateTimeAPI->Date_FromDate - PyDateTime_FromDateAndTime / PyDateTimeAPI->DateTime_FromDateAndTime - PyDateTime_FromDateAndTimeAndFold / PyDateTimeAPI->DateTime_FromDateAndTimeAndFold - PyTime_FromTime -> PyDateTimeAPI->Time_FromTime - PyTime_FromTimeAndFold -> PyDateTime->Time_FromTimeAndFold - PyDelta_FromDSU / PyDateTime->Delta_FromDelta ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 23:14:33 2019 From: report at bugs.python.org (Edison Abahurire) Date: Tue, 07 May 2019 03:14:33 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1557198873.97.0.779915425646.issue36782@roundup.psfhosted.org> Edison Abahurire added the comment: @p-ganssle Please open a new bpo for the Untested macros. I will be happy to work on that in the sprints tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 23:18:07 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 07 May 2019 03:18:07 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1557199087.81.0.991311391735.issue34616@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +13063 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 23:19:48 2019 From: report at bugs.python.org (Edison Abahurire) Date: Tue, 07 May 2019 03:19:48 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557199188.99.0.558615561687.issue36783@roundup.psfhosted.org> Edison Abahurire added the comment: I have submitted a PR to address this. Awaiting Review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 23:47:46 2019 From: report at bugs.python.org (Ryan Avery) Date: Tue, 07 May 2019 03:47:46 +0000 Subject: [issue36823] shutil.copytree copies directories and files but fails with that same directory with '[Errno 1] Operation not permitted') Message-ID: <1557200866.03.0.146601930994.issue36823@roundup.psfhosted.org> New submission from Ryan Avery : I am trying to use shutil.copytree on an Azure VM that has Azure FileStorage mounted with SMB 3.0. When I run the following to copy directories from one location on my Azure File Storage to another location on my File Storage, the whole directory, subdirectory, and files are copied succesfully but then this errors on those very same files: shutil.copytree( os.path.join(wflow.TRAIN, 'tile_512-4608'), os.path.join(wflow.TEST, 'tile_512-4608') ) Error: [('/mnt/point/landsat-1024-cp/train/tile_512-4608/image', '/mnt/point/landsat-1024-cp/test/tile_512-4608/image', '[Errno 1] Operation not permitted'), ('/mnt/point/landsat-1024-cp/train/tile_512-4608/mask', '/mnt/point/landsat-1024-cp/test/tile_512-4608/mask', '[Errno 1] Operation not permitted'), ('/mnt/point/landsat-1024-cp/train/tile_512-4608', '/mnt/point/landsat-1024-cp/test/tile_512-4608', '[Errno 1] Operation not permitted')] After this error, all of the items listed above were actually copied so I'm not sure why this errors ---------- components: Library (Lib) messages: 341677 nosy: rbavery priority: normal severity: normal status: open title: shutil.copytree copies directories and files but fails with that same directory with '[Errno 1] Operation not permitted') type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 23:50:27 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 07 May 2019 03:50:27 +0000 Subject: [issue24263] unittest cannot load module whose name starts with Unicode In-Reply-To: <1435031451.77.0.239152930978.issue24263@psf.upfronthosting.co.za> Message-ID: <1557201027.83.0.640368824255.issue24263@roundup.psfhosted.org> Change by Toshio Kuratomi : ---------- pull_requests: +13064 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 23:51:31 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 03:51:31 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557201091.85.0.599891162041.issue35925@roundup.psfhosted.org> miss-islington added the comment: New changeset ffa29b5aca1aaeae46af2582c401ef0ed20d4153 by Miss Islington (bot) in branch '3.7': bpo-35925: Skip SSL tests that fail due to weak external certs. (GH-13124) https://github.com/python/cpython/commit/ffa29b5aca1aaeae46af2582c401ef0ed20d4153 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 6 23:56:09 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 03:56:09 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557201369.87.0.360640736854.issue35925@roundup.psfhosted.org> Gregory P. Smith added the comment: The merged PR basically skips the specific failing unit test cases of the ssl key strength check error is detected during these network tests. It should probably be backported into 3.6 and 2.7 to ease maintenance and trust of the buildbots on those. Only people running regrtest -u all or at least -u networking to enable the live network connectivity tests would run into this when building their own CPython. ---------- stage: patch review -> backport needed versions: +Python 3.6 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 00:03:05 2019 From: report at bugs.python.org (Dan Halbert) Date: Tue, 07 May 2019 04:03:05 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557201785.01.0.385634464942.issue36807@roundup.psfhosted.org> Dan Halbert added the comment: I'm one of the CircuitPython core devs. This issue is OS-dependent: Windows and Linux don't necessarily write data and metadata out to USB drives promptly. The problem is particularly acute for FAT12 filesystems on Windows, which are typically 16MB or smaller: Windows can take up to 90 seconds to flush, due to a driver bug or perhaps some ancient concerns about floppy drives. MacOS doesn't have this issue. See https://superuser.com/questions/1197897/windows-delays-writing-fat-table-on-small-usb-drive-despite-quick-removal/1203781 for details. We have contacted Microsoft about this but getting it fixed is a long-term and uncertain process. I'll test on Windows when I return from PyCon. Thank you for the prompt fix! ---------- nosy: +dhalbert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 00:10:21 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 07 May 2019 04:10:21 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1557202221.13.0.818104765253.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: Thank Yuri for the guidance; I worked on it, cleaned things up a bit and posted a draft PR (#13148) with some example. That helps cleaning up a lot of code; and in the PR is a ~30 line example that implement an asyncio-repl. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:05:05 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 May 2019 05:05:05 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557205505.57.0.267304453154.issue36817@roundup.psfhosted.org> Serhiy Storchaka added the comment: I like this! Except that I think that !f is not needed. You can use repr by default only when no format spec is specified, and add explicit !r if you want to use repr with the format spec. If you want to format the value without repr and the format spec -- specify the empty format spec: f"{foo=:}". ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:49:12 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:49:12 +0000 Subject: [issue36822] Minor grammatical fix in glossary.rst In-Reply-To: <1557186503.72.0.659127462032.issue36822@roundup.psfhosted.org> Message-ID: <1557208152.0.0.349818160358.issue36822@roundup.psfhosted.org> Change by SilentGhost : ---------- type: enhancement -> behavior versions: -Python 3.5, Python 3.6, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:53:03 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:53:03 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208383.77.0.316757571682.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25952/pec1.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:54:23 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:54:23 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208463.61.0.345690381842.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25953/pec2.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:55:43 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:55:43 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208543.94.0.0780796253764.issue1054@roundup.psfhosted.org> SilentGhost added the comment: Closing as out of date. Too much spam in this issue. ---------- nosy: +SilentGhost -topworker resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:56:08 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:56:08 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208568.56.0.338765752106.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25954/pec3.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:56:17 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:56:17 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208577.54.0.444762540064.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25955/pec4.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:56:29 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:56:29 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208589.74.0.410881354655.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25956/pec5.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:56:36 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:56:36 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208596.03.0.157336887717.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25957/pec6.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:56:43 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:56:43 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208603.5.0.128950706888.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25958/pec7.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:56:48 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:56:48 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208608.89.0.293460496938.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25959/pec8.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:56:54 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:56:54 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208614.15.0.27863863423.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25960/pec9.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:56:59 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:56:59 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208619.28.0.482067695593.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25961/pec10.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:57:05 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:57:05 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208625.74.0.597193113111.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25962/pec11.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:57:11 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:57:11 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208631.52.0.997070612327.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25963/pec12.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:57:20 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:57:20 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208640.17.0.679970870425.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25964/pec13.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:57:26 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:57:26 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208646.56.0.656628914805.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25965/pec14.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:57:31 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:57:31 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208651.25.0.810541366913.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25966/pec15.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:57:36 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:57:36 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208656.86.0.0869717502657.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25967/pec16.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:57:41 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:57:41 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208661.63.0.863223772299.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25968/pec17.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:57:46 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:57:46 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208666.32.0.0842065364654.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25969/pec18.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:01 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:01 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208681.9.0.344062294667.issue1054@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: -SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:07 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:07 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208687.31.0.907058372277.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25970/pec19.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:13 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:13 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208693.49.0.590558473939.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25971/pec20.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:18 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:18 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208698.56.0.713431308525.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25972/pec21.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:25 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:25 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208705.36.0.584596716041.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25973/pec22.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:31 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:31 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208711.4.0.984070358233.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25974/pec23.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:37 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:37 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208717.08.0.719836389818.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25975/pec24.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:42 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:42 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208722.67.0.349575650537.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25976/pec25.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:47 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:47 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208727.9.0.913259579211.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25977/pec26.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:52 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:52 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208732.86.0.0651694545057.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25978/pec27.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:58:57 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:58:57 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208737.9.0.849881723897.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25979/pec28.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:59:03 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:59:03 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208743.93.0.188666161098.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25980/pec29.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:59:08 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:59:08 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208748.28.0.754556124531.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25981/pec30.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:59:13 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:59:13 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208753.63.0.242124194972.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25982/pec31.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:59:18 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:59:18 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208758.82.0.410482220147.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25983/pec32.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:59:23 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:59:23 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208763.7.0.546961281194.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25984/pec33.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:59:28 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:59:28 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208768.78.0.812345825227.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25985/pec34.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 01:59:34 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 05:59:34 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208774.73.0.2671450107.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25986/pec35.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:00:01 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:00:01 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208801.47.0.813842961582.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25987/pec36.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:00:06 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:00:06 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208806.89.0.854830542708.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25988/pec37.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:00:18 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:00:18 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208818.01.0.0248209195125.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25990/pec39.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:00:12 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:00:12 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208812.51.0.0808883098606.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25989/pec38.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:00:23 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:00:23 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208823.34.0.409912417933.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25991/pec40.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:00:29 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:00:29 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208829.92.0.121525517564.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25992/pec41.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:00:34 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:00:34 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208834.96.0.158763596986.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25993/pec42.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:00:44 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:00:44 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208844.58.0.231182606801.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25994/pec43.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:00:50 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:00:50 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208850.3.0.930313942626.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25995/pec44.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:01:02 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:01:02 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208862.53.0.134460779767.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25996/pec45.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:01:07 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:01:07 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208867.67.0.723493766648.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25997/pec46.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:01:14 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:01:14 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208874.15.0.984947851172.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file25998/pec47.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:01:18 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:01:18 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208878.74.0.530302864232.issue1054@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file26000/pec48.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:02:10 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:02:10 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208930.59.0.638969097105.issue1054@roundup.psfhosted.org> Change by SilentGhost : ---------- Removed message: https://bugs.python.org/msg341492 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:02:56 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:02:56 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1557208976.77.0.850205559098.issue1054@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:06:46 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:06:46 +0000 Subject: [issue36823] shutil.copytree copies directories and files but fails with that same directory with '[Errno 1] Operation not permitted') In-Reply-To: <1557200866.03.0.146601930994.issue36823@roundup.psfhosted.org> Message-ID: <1557209206.99.0.913268290265.issue36823@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +giampaolo.rodola, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:15:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 May 2019 06:15:42 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557209742.0.0.319180681958.issue27639@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 4981 LGTM (except that it would be worth to add the author's name in the NEWS entry). It is sad that it was not reviewed for 2 years and is closed now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:37:53 2019 From: report at bugs.python.org (Daniel Fortunov) Date: Tue, 07 May 2019 06:37:53 +0000 Subject: [issue36824] Refactor str tests to reflect that str and unicode are merged in Python 3 Message-ID: <1557211073.23.0.0911127825046.issue36824@roundup.psfhosted.org> New submission from Daniel Fortunov : Unit tests of `str` and related types (e.g. `UserString`) contain nomenclature and structure that dates back to the Python 2 distinction between `str` and `unicode`. Previously it was undesirable to disturb the structure of these tests too much as this would complicate the merging of bug fixes back to Python 2, however with Python 2 drawing near to end-of-life this is perhaps less of a concern. I would propose the following changes as a start: - Rename test_unicode.py to test_str.py, and `UnicodeTest` class to `StrTest` (to reflect the type that is now being tested) - Remove `MixinStrUnicodeUserStringTest` class and move its tests into `CommonTest` (The comment for this class says # additional tests that only work for # stringlike objects, i.e. str, UserString but in the absence of `unicode` the `CommonTest` class is also only used for these two types now.) - Promote tests from the current `UnicodeTest` class to `CommonTest` where it makes sense to do so; remove checks that no longer make sense. (e.g. checks around mixed `str`/`unicode` arguments that are all just `str` now) Maybe the duplicative `checkequalnofix()` method can also go away now? - The `BadSeq1` helper class is not used because the corresponding check was commented out in 2007. Either reinstate the check, or remove this class. I'm happy to submit a PR for this, but just wanted to get some feedback before making the changes. ---------- components: Library (Lib) messages: 341685 nosy: dfortunov, ncoghlan, xtreak priority: normal severity: normal status: open title: Refactor str tests to reflect that str and unicode are merged in Python 3 type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:40:32 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 06:40:32 +0000 Subject: [issue36824] Refactor str tests to reflect that str and unicode are merged in Python 3 In-Reply-To: <1557211073.23.0.0911127825046.issue36824@roundup.psfhosted.org> Message-ID: <1557211232.11.0.903432725267.issue36824@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Tests -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:45:25 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 May 2019 06:45:25 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557211525.15.0.205393682111.issue27639@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +13065 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:49:15 2019 From: report at bugs.python.org (PrzemeK) Date: Tue, 07 May 2019 06:49:15 +0000 Subject: [issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets In-Reply-To: <1446549321.99.0.809607214975.issue25541@psf.upfronthosting.co.za> Message-ID: <1557211755.92.0.0345073975832.issue25541@roundup.psfhosted.org> PrzemeK added the comment: Yep, it was 3.4 then... but I think problem still exists tl;dr: For abstract sockets (only?) filling struct with zeros is meaningful. long: * Python (cli) -> Python (srv) = works * C (cli) -> C (srv) = works * C (cli) -> Python (srv) = does NOT work * Python (cli) -> C (srv) = does NOT work (strace dumps below) $ gcc --version gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0 $ uname -a Linux ajzus 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux $ python3.7 --version Python 3.7.1 // 1st console $ gcc -g -Wall -Wextra -pedantic -o abs_srv abs_srv.c $ strace ./abs_srv ... socket(AF_UNIX, SOCK_STREAM, 0) = 3 bind(3, {sa_family=AF_UNIX, sun_path=@"/var/tmp/sock.tmp\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 110) = 0 listen(3, 5) = 0 accept(3, NULL, NULL // waiting // 2nd console $ ls /var/tmp/*.sock ls: cannot access '/var/tmp/*.sock': No such file or directory $ strace python3.7 abs_cli.py ... socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3 connect(3, {sa_family=AF_UNIX, sun_path=@"/var/tmp/sock.tmp"}, 20) = -1 ECONNREFUSED (Connection refused) ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:57:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 May 2019 06:57:49 +0000 Subject: [issue36824] Refactor str tests to reflect that str and unicode are merged in Python 3 In-Reply-To: <1557211073.23.0.0911127825046.issue36824@roundup.psfhosted.org> Message-ID: <1557212269.13.0.12960138896.issue36824@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is still the functionality common to str, bytes and bytearray. So it make sense to have the common class for testing str, bytes, bytearray and UserList and other common class (subclass of the former one) for testing str and UserList. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 02:59:38 2019 From: report at bugs.python.org (PrzemeK) Date: Tue, 07 May 2019 06:59:38 +0000 Subject: [issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets In-Reply-To: <1446549321.99.0.809607214975.issue25541@psf.upfronthosting.co.za> Message-ID: <1557212378.99.0.686570638118.issue25541@roundup.psfhosted.org> PrzemeK added the comment: Gist: https://gist.github.com/soutys/ffbe2e76a86835a9cc6b More: Padding `sun_path` with zeros for python cli code: ... client = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) client.connect("\0/var/tmp/sock.tmp" + "\0" * 90) ... gives strace like: ... socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3 connect(3, {sa_family=AF_UNIX, sun_path=@"/var/tmp/sock.tmp\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 110) = 0 write(1, "Ready.\n", 7Ready. ) = 7 ... = works ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 03:05:02 2019 From: report at bugs.python.org (Daniel Fortunov) Date: Tue, 07 May 2019 07:05:02 +0000 Subject: [issue36824] Refactor str tests to reflect that str and unicode are merged in Python 3 In-Reply-To: <1557211073.23.0.0911127825046.issue36824@roundup.psfhosted.org> Message-ID: <1557212702.16.0.578016569684.issue36824@roundup.psfhosted.org> Daniel Fortunov added the comment: Agreed. This functionality is in `BaseTest` (which is the base for `CommonTest`) and I don't propose to change this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 03:22:29 2019 From: report at bugs.python.org (=?utf-8?q?S=C3=BCmer_Cip?=) Date: Tue, 07 May 2019 07:22:29 +0000 Subject: [issue26278] BaseTransport.close() does not trigger connection_lost() In-Reply-To: <1454515056.72.0.0290408111031.issue26278@psf.upfronthosting.co.za> Message-ID: <1557213749.14.0.0809586294593.issue26278@roundup.psfhosted.org> S?mer Cip added the comment: I do not know I still have the issue since I have circumvented the problem. I have been using Python3.4, I think it was one of the earliest asyncio implementations. The way it can be reproduced is as following: 1) There are lots of active TCP connections connected to asyncio server (300-400 of them) 2) One of the clients close connection ungracefully(without sending a FIN) 3) We have a PING/PONG mechanism in the server (similar to http keep-alive), we call transport.close() on the socket if pong is not received within an interval. connection_lost() event is never gets called for the socket. This is not happening all the time, this is a random issue, the key here is to disconnect client without sending a FIN and there is outgoing buffer for client. Above is all I got. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 03:32:42 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 May 2019 07:32:42 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557214362.77.0.89238608908.issue36817@roundup.psfhosted.org> Eric V. Smith added the comment: > Except that I think that !f is not needed. You can use repr by default only when no format spec is specified, and add explicit !r if you want to use repr with the format spec. If you want to format the value without repr and the format spec -- specify the empty format spec: f"{foo=:}". I had this working in issue36774, but it seems like a little too much magic. It also prevents you from formatting the result of the repr, which works in f-strings without the =. Say you wanted a fixed width output. You need to apply a format to the value of the repr: >>> nums = [1/3, 1.0, 10.0, math.pi] >>> for n in nums: ... print(f'*{n=}*') ... *n=0.3333333333333333* *n=1.0* *n=10.0* *n=3.141592653589793* >>> for n in nums: ... print(f'*{n=:30}*') ... *n=0.3333333333333333 * *n=1.0 * *n=10.0 * *n=3.141592653589793 * If the presence of a format spec meant automatically apply the format to the value being printed, this wouldn't be possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 03:40:03 2019 From: report at bugs.python.org (Alexey Muranov) Date: Tue, 07 May 2019 07:40:03 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: <1557214803.15.0.915604364824.issue32768@roundup.psfhosted.org> Alexey Muranov added the comment: Here is a use case for writable bases: https://stackoverflow.com/q/56007866 class Stateful: """ Abstract base class for "stateful" classes. Subclasses must implement InitState mixin. """ @staticmethod def __new__(cls, *args, **kwargs): super_new = super(__class__, __class__).__new__ # XXX: see https://stackoverflow.com/a/9639512 class CurrentStateProxy(cls.InitState): @staticmethod def _set_state(state_cls=cls.InitState): __class__.__bases__ = (state_cls,) class Eigenclass(CurrentStateProxy, cls): @staticmethod def __new__(cls, *args, **kwargs): cls.__new__ = None # just in case return super_new(cls, *args, **kwargs) return Eigenclass(*args, **kwargs) class StatefulThing(Stateful): class StateA: """First state mixin.""" def say_hello(self): print("Hello!") self.hello_count += 1 self._set_state(self.StateB) return True def say_goodbye(self): print("Another goodbye?") return False class StateB: """Second state mixin.""" def say_hello(self): print("Another hello?") return False def say_goodbye(self): print("Goodbye!") self.goodbye_count += 1 self._set_state(self.StateA) return True # This one is required by Stateful. class InitState(StateA): """Third state mixin -- the initial state.""" def say_goodbye(self): print("Why?") return False def __init__(self): self.hello_count = self.goodbye_count = 0 def say_hello_followed_by_goodbye(self): self.say_hello() and self.say_goodbye() # ---------- # ## Demo ## # ---------- if __name__ == "__main__": t1 = StatefulThing() t2 = StatefulThing() print("> t1, say hello:") t1.say_hello() print("> t2, say goodbye:") t2.say_goodbye() print("> t2, say hello:") t2.say_hello() print("> t1, say hello:") t1.say_hello() print("> t1, say hello followed by goodbye:") t1.say_hello_followed_by_goodbye() print("> t2, say goodbye:") t2.say_goodbye() print("> t2, say hello followed by goodbye:") t2.say_hello_followed_by_goodbye() print("> t1, say goodbye:") t1.say_goodbye() print("> t2, say hello:") t2.say_hello() print("---") print( "t1 said {} hellos and {} goodbyes." .format(t1.hello_count, t1.goodbye_count) ) print( "t2 said {} hellos and {} goodbyes." .format(t2.hello_count, t2.goodbye_count) ) # Expected output: # # > t1, say hello: # Hello! # > t2, say goodbye: # Why? # > t2, say hello: # Hello! # > t1, say hello: # Another hello? # > t1, say hello followed by goodbye: # Another hello? # > t2, say goodbye: # Goodbye! # > t2, say hello followed by goodbye: # Hello! # Goodbye! # > t1, say goodbye: # Goodbye! # > t2, say hello: # Hello! # --- # t1 said 1 hellos and 1 goodbyes. # t2 said 3 hellos and 2 goodbyes. ---------- nosy: +alexey-muranov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 03:45:43 2019 From: report at bugs.python.org (Alexey Muranov) Date: Tue, 07 May 2019 07:45:43 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: <1557215143.91.0.750973963227.issue32768@roundup.psfhosted.org> Alexey Muranov added the comment: IMO "overriding" a method with itself should not change the behaviour. So it seems to me that the following is a bug: class C: def __init__(self, m): print(m) class D: @staticmethod def __new__(cls, *args, **kwargs): return super(__class__, __class__).__new__(cls, *args, **kwargs) def __init__(self, m): print(m) C(42) # fine D(42) # TypeError: object.__new__() takes exactly one argument Of course such overriding makes little sense in itself, but forbidding it makes even less sense and creates bugs in more complex scenarios. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 03:52:01 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 May 2019 07:52:01 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557215521.88.0.53464805901.issue36817@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can use f'*{n=!r:30}*' if you want to format the result of the repr. In you example the format spec is applied to both the value and the literal representation of the expression. Is it an error? I do not think this is an expected behavior. If you want to apply it to both the literal expression and its value you can use the nested f-string: f"*{f'{n=}':30}*". There is not too much more magic here: if both converter and format specifier are omitted use !r because it is a common special case. I think it is better than the other difference in the default converter used for debugging and normal formatting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 03:54:52 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 07 May 2019 07:54:52 +0000 Subject: [issue33777] dummy_threading: .is_alive method returns True after execution has completed In-Reply-To: <1528250405.09.0.592728768989.issue33777@psf.upfronthosting.co.za> Message-ID: <1557215692.32.0.512916466556.issue33777@roundup.psfhosted.org> Jeffrey Kintscher added the comment: It looks like the problem is that Thread._tstate_lock doesn't get released until Thread.join() is called. _tstate_lock is of type LockType, which has different definitions when using the threading module or the dummy_threading module. It is defined in Modules/_threadmodule.c when using the threading module, and in Lib/_dummy_thread.py when using the dummy_threading module. The lock is acquired when the new thread starts and is supposed to be released when the thread exits. Thread.is_alive() and Thread.join() both call Thread._wait_for_tstate_lock(), which in turn calls Thread._tstate_lock.acquire(). When Thread._wait_for_tstate_lock() successfully acquires the lock, it calls Thread._stop() to set the Thread._is_stop flag to indicate that the thread has exited. The Thread._is_stop flag is checked by Thread.is_alive() before trying to acquire the lock. Thread.is_alive() passes False to Thread._wait_for_tstate_lock(), while Thread.join() effectively passes True as the default parameter. Thread._wait_for_tstate_lock() then passes the parameter value to Thread._tstate_lock.acquire() to indicate whether to block until the lock is acquired (True) or try to acquire the lock and return immediately (False). The return value of the LockType.acquire() function indicates whether (True) or not (False) the lock was acquired. The function defined in the dummy_threading module always returns True when passed True and False when passed False. Since Thread.is_alive() passes False to Thread._wait_for_tstate_lock() and onwards to Thread._tstate_lock.acquire(), Thread._tstate_lock.acquire() returns False which causes Thread._wait_for_tstate_lock() to skip calling Thread._stop() and the Thread._is_stop flag doesn't get set. Thread.is_alive() returns "not self._is_stop", so it always returns True. Thread.join() passes True, so Thread._tstate_lock.acquire() returns True and Thread._wait_for_tstate_lock() calls Thread._stop to set the Thread._is_stop flag. Subsequent calls to Thread.is_alive() see that Thread._is_stop flag is set and return False (i.e. "not self._is_stop") without checking the lock. In a nutshell, the way the code is written, Thread.is_alive() always returns True until after Thread.join() is called. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 04:17:50 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 May 2019 08:17:50 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557217070.22.0.961332864006.issue36817@roundup.psfhosted.org> Eric V. Smith added the comment: > In you example the format spec is applied to both the value and the literal representation of the expression. Is it an error? I do not think this is an expected behavior. No, you're misreading it. I admit that my example wasn't great. Try this one: >>> for n in nums: ... print(f'*{n=:+<30}*') ... *n=0.3333333333333333++++++++++++* *n=1.0+++++++++++++++++++++++++++* *n=10.0++++++++++++++++++++++++++* *n=3.141592653589793+++++++++++++* > If you want to apply it to both the literal expression and its value you can use the nested f-string: f"*{f'{n=}':30}*". Correct. There's a similar discussion in issue36774. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 04:35:49 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 07 May 2019 08:35:49 +0000 Subject: [issue36825] Make TestCase aware of the command line arguments given to TestProgram Message-ID: <1557218149.53.0.915842063513.issue36825@roundup.psfhosted.org> New submission from R?mi Lapeyre : Hi, to make unittest more extensible and for issue 18765 (having a way to run pdb when tests fail), I would like to make TestCase aware of the command line arguments given to the TestProgram so they can adapt their behavior based on them. I suggested this change on python-ideas (https://mail.python.org/pipermail/python-ideas/2019-March/055842.html) but it did not get much attention. I'm opening a PR in the hope to get more feedback and will start writing documentation. Please comment if this is not appropriate or regarding anything I might have not thought of. ---------- components: Tests messages: 341697 nosy: remi.lapeyre priority: normal severity: normal status: open title: Make TestCase aware of the command line arguments given to TestProgram type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 04:39:39 2019 From: report at bugs.python.org (Charlie Clark) Date: Tue, 07 May 2019 08:39:39 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557218379.47.0.336001934834.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: The code crashes on this line: print('count:', crt_time.strftime(buf, 1024, b'%Z', tm)) ---------- Added file: https://bugs.python.org/file48306/Report.wer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 04:39:53 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 May 2019 08:39:53 +0000 Subject: [issue36826] ast_unparser.c doesn't handle := expressions Message-ID: <1557218393.13.0.153160088423.issue36826@roundup.psfhosted.org> New submission from Eric V. Smith : If either of these lines are added to test_annotations() in Lib/test/test_future.py, a SystemError will be raised: eq("(x:=10)") eq("f'{(x:=10):=10}'") Traceback (most recent call last): File "/Users/eric/local/python/cpython/Lib/test/test_future.py", line 258, in test_annotations eq("(x:=10)") File "/Users/eric/local/python/cpython/Lib/test/test_future.py", line 134, in assertAnnotationEqual actual = self.getActual(annotation) File "/Users/eric/local/python/cpython/Lib/test/test_future.py", line 121, in getActual exec(self.template.format(ann=annotation), {}, scope) SystemError: unknown expression kind ---------- components: Interpreter Core messages: 341699 nosy: emilyemorehouse, eric.smith, lukasz.langa priority: release blocker severity: normal stage: needs patch status: open title: ast_unparser.c doesn't handle := expressions type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 04:40:03 2019 From: report at bugs.python.org (Charlie Clark) Date: Tue, 07 May 2019 08:40:03 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557218403.01.0.268533727072.issue36792@roundup.psfhosted.org> Change by Charlie Clark : Added file: https://bugs.python.org/file48307/WER9DB9.tmp.WERInternalMetadata.xml _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 04:45:50 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 07 May 2019 08:45:50 +0000 Subject: [issue36825] Make TestCase aware of the command line arguments given to TestProgram In-Reply-To: <1557218149.53.0.915842063513.issue36825@roundup.psfhosted.org> Message-ID: <1557218750.76.0.323821517855.issue36825@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +13066 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 04:57:12 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 07 May 2019 08:57:12 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> Message-ID: <1557219432.41.0.614635148136.issue11107@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi josh.r, this may be dump but is there a reason not to make slices hashable? Couldn't they hash like a tuple (start, stop, step)? I looked around in the code, bpo and the mailing lists but could not find a reason why not, maybe it was just not useful at the time but could be implemented now? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 05:01:13 2019 From: report at bugs.python.org (Windson Yang) Date: Tue, 07 May 2019 09:01:13 +0000 Subject: [issue36823] shutil.copytree copies directories and files but fails with that same directory with '[Errno 1] Operation not permitted') In-Reply-To: <1557200866.03.0.146601930994.issue36823@roundup.psfhosted.org> Message-ID: <1557219673.76.0.0299349666148.issue36823@roundup.psfhosted.org> Windson Yang added the comment: Just to make sure, the expected behavior would be the items should not be copied because of the permission and the error messages above, right? ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 05:20:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 May 2019 09:20:11 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> Message-ID: <1557220811.52.0.655158499961.issue11107@roundup.psfhosted.org> Serhiy Storchaka added the comment: To support slice constants we need to change the marshal format and introduce new version (current version is 4 and it was stable for several releases). If my memory do not betray me we already discussed this on other issue and the conclusion was that the benefit of this is too small for such large change. But if we will need to add new marshal version for other reasons, supporting slices will be a nice addition. We just do not have enough reasons for this now. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 06:24:39 2019 From: report at bugs.python.org (Dmitry Kazakov) Date: Tue, 07 May 2019 10:24:39 +0000 Subject: [issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses In-Reply-To: <1508701595.06.0.213398074469.issue31841@psf.upfronthosting.co.za> Message-ID: <1557224679.3.0.968048140492.issue31841@roundup.psfhosted.org> Change by Dmitry Kazakov : ---------- pull_requests: +13067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 06:28:33 2019 From: report at bugs.python.org (Dmitry Kazakov) Date: Tue, 07 May 2019 10:28:33 +0000 Subject: [issue31841] Several methods of collections.UserString do not return instances of UserString or its subclasses In-Reply-To: <1508701595.06.0.213398074469.issue31841@psf.upfronthosting.co.za> Message-ID: <1557224913.34.0.835065227608.issue31841@roundup.psfhosted.org> Change by Dmitry Kazakov : ---------- pull_requests: -13067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 06:35:54 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 07 May 2019 10:35:54 +0000 Subject: [issue24263] unittest cannot load module whose name starts with Unicode In-Reply-To: <1435031451.77.0.239152930978.issue24263@psf.upfronthosting.co.za> Message-ID: <1557225354.07.0.105477022379.issue24263@roundup.psfhosted.org> Toshio Kuratomi added the comment: I've opened a new PR at https://github.com/python/cpython/pull/13149 with the commit from https://github.com/python/cpython/pull/1338 and some additional changes to address the review comments given by serhiy.storchaka and rbcollins ---------- nosy: +a.badger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 06:48:51 2019 From: report at bugs.python.org (Chris Withers) Date: Tue, 07 May 2019 10:48:51 +0000 Subject: [issue31855] mock_open is not compatible with read(n) (and pickle.load) In-Reply-To: <1508792590.83.0.213398074469.issue31855@psf.upfronthosting.co.za> Message-ID: <1557226131.51.0.607853573864.issue31855@roundup.psfhosted.org> Chris Withers added the comment: New changeset 11a8832c98b3db78727312154dd1d3ba76d639ec by Chris Withers (R?mi Lapeyre) in branch 'master': bpo-31855: unittest.mock.mock_open() results now respects the argument of read([size]) (GH-11521) https://github.com/python/cpython/commit/11a8832c98b3db78727312154dd1d3ba76d639ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 06:48:59 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 10:48:59 +0000 Subject: [issue31855] mock_open is not compatible with read(n) (and pickle.load) In-Reply-To: <1508792590.83.0.213398074469.issue31855@psf.upfronthosting.co.za> Message-ID: <1557226139.82.0.77546003334.issue31855@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13068 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 07:42:08 2019 From: report at bugs.python.org (Alexey Muranov) Date: Tue, 07 May 2019 11:42:08 +0000 Subject: [issue36827] Overriding __new__ method with itself changes behaviour of the class Message-ID: <1557229328.38.0.306180402683.issue36827@roundup.psfhosted.org> New submission from Alexey Muranov : I expect that overriding methods with themselves like in the following example should not change the behaviour of the class: class C: a = 1 def __init__(self, b): self.b = b def f(self, x): return x*self.a + self.b + 1 @classmethod def g(cls, y): return y*cls.a + 2 @staticmethod def h(z): return z + 3 class D(C): def f(self, *args, **kwargs): return super(__class__, self).f(*args, **kwargs) @classmethod def g(cls, *args, **kwargs): return super(__class__, cls).g(*args, **kwargs) @staticmethod def h(*args, **kwargs): return super(__class__, __class__).h(*args, **kwargs) c = C(7) d = D(7) assert c.f(42) == d.f(42) assert c.g(42) == d.g(42) assert c.h(42) == d.h(42) (Moreover, I expect to be able to extend superclass method this way.) However, this does not work with `__new__`: class C: def __init__(self, x): self.x = x print(x) class D(C): @staticmethod def __new__(*args, **kwargs): return super(__class__, __class__).__new__(*args, **kwargs) C(7) # fine D(7) # TypeError: object.__new__() takes exactly one argument I think this is not a desirable feature. I would call it a bug. By the way, I understand why `object`'s `__init__` can complain about a wrong number of arguments, but I do not see a point in making `object`'s `__new__` complain about it. Here is my current workaround: class T: @staticmethod def __new__(cls, *_args, **_kwargs): return object.__new__(cls) class E(C, T): @staticmethod def __new__(*args, **kwargs): return super(__class__, __class__).__new__(*args, **kwargs) C(42) # fine E(42) # fine A possibly related issue: #32768 (https://bugs.python.org/issue32768) ---------- components: Interpreter Core messages: 341705 nosy: alexey-muranov priority: normal severity: normal status: open title: Overriding __new__ method with itself changes behaviour of the class type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 07:47:49 2019 From: report at bugs.python.org (Philip Deegan) Date: Tue, 07 May 2019 11:47:49 +0000 Subject: [issue36545] Python 3.5 OOM during test_socket on make In-Reply-To: <1554573849.92.0.0783609732408.issue36545@roundup.psfhosted.org> Message-ID: <1557229669.8.0.817451909636.issue36545@roundup.psfhosted.org> Philip Deegan added the comment: This seems to be resolved on kernel 5.0.12 not it says "resource denied" and the test skips ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 07:47:53 2019 From: report at bugs.python.org (Philip Deegan) Date: Tue, 07 May 2019 11:47:53 +0000 Subject: [issue36545] Python 3.5 OOM during test_socket on make In-Reply-To: <1554573849.92.0.0783609732408.issue36545@roundup.psfhosted.org> Message-ID: <1557229673.63.0.22836071144.issue36545@roundup.psfhosted.org> Change by Philip Deegan : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 08:09:11 2019 From: report at bugs.python.org (Hans Ginzel) Date: Tue, 07 May 2019 12:09:11 +0000 Subject: [issue36828] Cannot install et_xmlfile Message-ID: <1557230951.74.0.443191193294.issue36828@roundup.psfhosted.org> New submission from Hans Ginzel : See attached log file, please. How to reproduce: rem Download https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-amd64.zip mkdir C:\Tools\Python unzip python-3.7.3-embed-amd64.zip -d C:\Tools\Python\3.7.3 path C:\Tools\Python\3.7.3;C:\Tools\Python\3.7.3\Scripts;%PATH% echo Remove comment in "#import site" on the last line, please. notepad C:\Tools\Python\3.7.3\python37._pth rem Download https://bootstrap.pypa.io/get-pip.py python get-pip.py Collecting pip Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB) |????????????????????????????????| 1.4MB 656kB/s Collecting setuptools Downloading https://files.pythonhosted.org/packages/ec/51/f45cea425fd5cb0b0380f5b0f048ebc1da5b417e48d304838c02d6288a1e/setuptools-41.0.1-py2.py3-none-any.whl (575kB) |????????????????????????????????| 583kB 3.2MB/s Collecting wheel Downloading https://files.pythonhosted.org/packages/96/ba/a4702cbb6a3a485239fbe9525443446203f00771af9ac000fa3ef2788201/wheel-0.33.1-py2.py3-none-any.whl Installing collected packages: pip, setuptools, wheel Successfully installed pip-19.1.1 setuptools-41.0.1 wheel-0.33.1 C:\Users\Hans\Downloads>pip install --log et-xmlfile.log et-xmlfile Collecting et-xmlfile Downloading https://files.pythonhosted.org/packages/22/28/a99c42aea746e18382ad9fb36f64c1c1f04216f41797f2f0fa567da11388/et_xmlfile-1.0.1.tar.gz ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\Hans\AppData\Local\Temp\pip-install-qws9gvg0\et-xmlfile\ ---------- components: Installation files: et-xmlfile.log messages: 341707 nosy: hginzel priority: normal severity: normal status: open title: Cannot install et_xmlfile type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48308/et-xmlfile.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 08:10:07 2019 From: report at bugs.python.org (Thomas Grainger) Date: Tue, 07 May 2019 12:10:07 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abortthe current process Message-ID: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> New submission from Thomas Grainger : Currently it's quite easy for these errors to go unnoticed. I'd like a way to easily detect these in CI. nedbat suggested piping the process output to another tool, and looking for 'Exception ignored in:' but this seems a little diff ---------- components: Interpreter Core messages: 341708 nosy: graingert priority: normal severity: normal status: open title: CLI option to make PyErr_WriteUnraisable abortthe current process type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 08:10:33 2019 From: report at bugs.python.org (Hans Ginzel) Date: Tue, 07 May 2019 12:10:33 +0000 Subject: [issue36828] Cannot install et-xmlfile In-Reply-To: <1557230951.74.0.443191193294.issue36828@roundup.psfhosted.org> Message-ID: <1557231033.34.0.0510288681228.issue36828@roundup.psfhosted.org> Change by Hans Ginzel : ---------- title: Cannot install et_xmlfile -> Cannot install et-xmlfile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 08:12:16 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 12:12:16 +0000 Subject: [issue36827] Overriding __new__ method with itself changes behaviour of the class In-Reply-To: <1557229328.38.0.306180402683.issue36827@roundup.psfhosted.org> Message-ID: <1557231136.42.0.0306515823757.issue36827@roundup.psfhosted.org> SilentGhost added the comment: It seems you're misunderstanding the point of __new__ and your usage of it is a bit strange. You're getting an error because you're ultimately calling object.__new__ which doesn't accept any other arguments but the class for instantiation. I'd suggest the documentation for object.__new__ (https://docs.python.org/3/reference/datamodel.html#object.__new__) and the Data model page in general. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 08:22:06 2019 From: report at bugs.python.org (Alexey Muranov) Date: Tue, 07 May 2019 12:22:06 +0000 Subject: [issue36827] Overriding __new__ method with itself changes behaviour of the class In-Reply-To: <1557229328.38.0.306180402683.issue36827@roundup.psfhosted.org> Message-ID: <1557231726.53.0.534306639103.issue36827@roundup.psfhosted.org> Alexey Muranov added the comment: The issue is the following: i expect overriding a method with itself to not change behaviour of the class. I do not see how my understanding of `__new__` or its point could be relevant. Do we agree that overriding a method with itself should not change behaviour? Is there a more correct way to do it than def foo(self, *args, **kwarg): # possible extensions # ... super(__class__, self).foo(*args, **kwarg) (modified accordingly for class and static methods)? When I do not override `__new__`, I expect Python to use `object`'s `__new__` (or at least pretend that it does). Therefore there should be no difference in behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 08:25:44 2019 From: report at bugs.python.org (Alexey Muranov) Date: Tue, 07 May 2019 12:25:44 +0000 Subject: [issue36827] Overriding __new__ method with itself changes behaviour of the class In-Reply-To: <1557229328.38.0.306180402683.issue36827@roundup.psfhosted.org> Message-ID: <1557231944.27.0.452738098088.issue36827@roundup.psfhosted.org> Alexey Muranov added the comment: Incidentally, the documentation gives the following signature of __new__: object.__new__(cls[, ...]) which suggests a variable number of arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 08:27:46 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 07 May 2019 12:27:46 +0000 Subject: [issue36812] posix_spawnp returns error when used with file_actions In-Reply-To: <1557155011.55.0.26778375432.issue36812@roundup.psfhosted.org> Message-ID: <1557232066.81.0.678613168339.issue36812@roundup.psfhosted.org> Toshio Kuratomi added the comment: The error message is reporting the path. However, it is only the path component that is specified in the call to the function. This behaviour is not limited to the posix_spawnp() function but happens with any interface that can look up a command in the path. For instance, here's what subprocess.Popen() gives me when I look use it against a 0644 file that is present in my PATH: >>> subprocess.Popen(['fever.py']) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.7/subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "/usr/lib64/python3.7/subprocess.py", line 1522, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: 'fever.py' ---------- nosy: +a.badger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 08:28:05 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 07 May 2019 12:28:05 +0000 Subject: [issue36828] Cannot install et-xmlfile In-Reply-To: <1557230951.74.0.443191193294.issue36828@roundup.psfhosted.org> Message-ID: <1557232085.02.0.567324076434.issue36828@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: et-xmlfile is not a part of CPython and this tracker is for bugs in CPython. I would suggest following up with the project repo on this and close this as third party issue. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 08:35:03 2019 From: report at bugs.python.org (Chris Withers) Date: Tue, 07 May 2019 12:35:03 +0000 Subject: [issue31855] mock_open is not compatible with read(n) (and pickle.load) In-Reply-To: <1508792590.83.0.213398074469.issue31855@psf.upfronthosting.co.za> Message-ID: <1557232503.37.0.100853987915.issue31855@roundup.psfhosted.org> Chris Withers added the comment: New changeset a6516f89aa0f416c7514ac364bb48ac7d1455487 by Chris Withers (Miss Islington (bot)) in branch '3.7': bpo-31855: unittest.mock.mock_open() results now respects the argument of read([size]) (GH-11521) (#13152) https://github.com/python/cpython/commit/a6516f89aa0f416c7514ac364bb48ac7d1455487 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 08:53:12 2019 From: report at bugs.python.org (keroru) Date: Tue, 07 May 2019 12:53:12 +0000 Subject: [issue36830] Typo in collections.deque Message-ID: <1557233592.36.0.483652950266.issue36830@roundup.psfhosted.org> New submission from keroru : https://docs.python.org/ja/3/library/collections.html#collections.deque has a typo in description of "rotate(n=1)" in Japanese. I suppose that "d.appendleft(d.popleft())" should be "d.append(d.popleft())". Thank you! ---------- assignee: docs at python components: Documentation messages: 341715 nosy: docs at python, keroru priority: normal severity: normal status: open title: Typo in collections.deque versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:03:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 07 May 2019 13:03:44 +0000 Subject: [issue36830] Typo in collections.deque In-Reply-To: <1557233592.36.0.483652950266.issue36830@roundup.psfhosted.org> Message-ID: <1557234224.93.0.35503851059.issue36830@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thank you for the report. English translation has the following text and I guess you are right at [0] . The tracker deals with English translation. Please consider reporting this to https://github.com/python/python-docs-ja which also accepts PR. [0] https://docs.python.org/3/library/collections.html#collections.deque.rotate Rotate the deque n steps to the right. If n is negative, rotate to the left. When the deque is not empty, rotating one step to the right is equivalent to d.appendleft(d.pop()), and rotating one step to the left is equivalent to d.append(d.popleft()). ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:04:49 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 07 May 2019 13:04:49 +0000 Subject: [issue36830] Typo in collections.deque In-Reply-To: <1557233592.36.0.483652950266.issue36830@roundup.psfhosted.org> Message-ID: <1557234289.13.0.823216810939.issue36830@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi @keroru, This is issue is related to the Japanese translation, not to the official documentation. Please, try to contact the translators. I am adding Julien, maybe he has the contact of the translators. ---------- nosy: +matrixise, mdk resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:06:28 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 07 May 2019 13:06:28 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abortthe current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557234388.09.0.161525985178.issue36829@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi Serhiy, What do you think about this idea? Normally, we could use -W error when there is an exception. ---------- nosy: +matrixise, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:07:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 07 May 2019 13:07:44 +0000 Subject: [issue31855] mock_open is not compatible with read(n) (and pickle.load) In-Reply-To: <1508792590.83.0.213398074469.issue31855@psf.upfronthosting.co.za> Message-ID: <1557234464.4.0.469780422122.issue31855@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: PR was merged and backported to 3.7. So I am closing this as fixed. Thanks R?mi for the patch. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:13:11 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 07 May 2019 13:13:11 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1557234791.57.0.940749659673.issue36794@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi hniksic, Could you add your Github Account to your BPO account, without that, we can't work on your PR, and you need to sign the CLA. Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:19:59 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 07 May 2019 13:19:59 +0000 Subject: [issue36831] ElementTree.find attribute matching with empty namespace Message-ID: <1557235199.92.0.526138899784.issue36831@roundup.psfhosted.org> New submission from Steve Dower : I suspect this is related to the fix for issue30485, but haven't fully debugged it. In PC/layout/support/appxmanifest.py, I have code that looks up an existing element and adds it if missing: def find_or_add(xml, element, attr=None, always_add=False): if always_add: e = None else: q = element if attr: q += "[@{}='{}']".format(*attr) e = xml.find(q, APPXMANIFEST_NS) if e is None: ... return e For my 3.8.0a4 build, this started failing to match elements with attributes included. As a result, I ended up with N elements in a space where the schema only allows 1, and part of the 3.8.0a4 release is now blocked (okay, it's unblocked because I manually fixed a file and built the rest by hand, but it still held things up by a day). I found that by removing the empty string entry in my namespaces dictionary the issue is fixed: APPXMANIFEST_NS = { #"": "http://schemas.microsoft.com/appx/manifest/foundation/windows10", "m": "http://schemas.microsoft.com/appx/manifest/foundation/windows10", ... } So I'm not exactly sure what's going on, but as code that worked fine in 3.8.0a3 and earlier now no longer works, I think we should see whether it was a deliberate break or accidental. If there's no reason to regress users, I'd prefer to avoid it. ---------- components: XML keywords: 3.7regression messages: 341721 nosy: eli.bendersky, lukasz.langa, scoder, steve.dower priority: normal severity: normal stage: needs patch status: open title: ElementTree.find attribute matching with empty namespace type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:29:02 2019 From: report at bugs.python.org (Larry Hastings) Date: Tue, 07 May 2019 13:29:02 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557235742.28.0.0487868932715.issue36817@roundup.psfhosted.org> Larry Hastings added the comment: > I think that !f is not needed. You can use repr by default only when > no format spec is specified, and add explicit !r if you want to use > repr with the format spec. Actually that's how !d worked. We changed the behavior because it was too "magical". We need to keep the f-strings format spec simple so it was easier to remember. I for one already have difficulty remembering how f-string formatting works, I don't want to make add even more complications. In the current proposal, the special syntax must be specified in a particular order, and the order is easy to remember because information always flows from left-to-right. The "=" must come before the "!" and/or the ":", and the "!" must come before the ":". Like so: f'{foo = !s :20}' Modification information strictly flows from left to right: * The = changes the "conversion function" to repr, but then you can override the conversion function with !. * The : format spec runs __format__ on the stuff to its left; if you're using the "format" conversion function, it applies the spec directly, otherwise it calls format with that spec to the output (the string) you got from the conversion function. If we made the default conversion function when using = dependent on the presence or absence of the format spec, now we have information flowing to the left, all the way from the end to the beginning. Eric and I agree: this is too magical and too hard to remember. We want to keep it simple. (True story: Eric had the !d implementation already done and ready for checkin. When he changed it to this = syntax he actually mostly *threw out* code, because this way is simpler and more regular. Hopefully you're thinking "well THAT sounds nice!"--we agree.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:36:50 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 07 May 2019 13:36:50 +0000 Subject: [issue36831] ElementTree.find attribute matching with empty namespace In-Reply-To: <1557235199.92.0.526138899784.issue36831@roundup.psfhosted.org> Message-ID: <1557236210.72.0.578980303095.issue36831@roundup.psfhosted.org> Steve Dower added the comment: Here is a test case that fails on 3.8.0a4 and succeeds on 3.7.3: def test_find_attribute_with_empty_ns(self): NS = "http://effbot.org/ns" element = ET.fromstring(f"""
""") self.assertIsNotNone(element.find("t:section[@id='1']", {"":NS, "t":NS})) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:42:24 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 07 May 2019 13:42:24 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557236544.18.0.9923832974.issue30458@roundup.psfhosted.org> Miro Hron?ok added the comment: I'll work on 3.7 backport. ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:44:15 2019 From: report at bugs.python.org (Michael Blahay) Date: Tue, 07 May 2019 13:44:15 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557236655.66.0.461434921645.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: Thank you for bringing up that PR. My team will review and try to find out why it was closed without a merge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:45:08 2019 From: report at bugs.python.org (Michael Blahay) Date: Tue, 07 May 2019 13:45:08 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557236708.39.0.112451856475.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: Please note that I am working with Erick Cervantes at PyCon2019 on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:47:37 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 07 May 2019 13:47:37 +0000 Subject: [issue36832] Port zipp to zipfile Message-ID: <1557236857.3.0.339513388865.issue36832@roundup.psfhosted.org> New submission from Jason R. Coombs : The [zipp package](https://pypi.org/project/zipp) implements a pathlib-compatable wrapper for zipfiles and is used by the importlib_metadata project. The port of importlib_metadata to importlib.metadata (issue34632) currently embeds that functionality, but this functionality is probably better exposed as part of the zipfile or pathlib modules. Yesterday, at PyCon sprints, we considered which stdlib module would be better to host this functionality, and a quick analysis revealed that there's no pathlib dependency but there is a zipfile dependency, suggesting that zipfile should be preferred. ---------- assignee: jaraco messages: 341727 nosy: barry, jaraco priority: normal severity: normal status: open title: Port zipp to zipfile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:47:51 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 07 May 2019 13:47:51 +0000 Subject: [issue36832] Port zipp to zipfile In-Reply-To: <1557236857.3.0.339513388865.issue36832@roundup.psfhosted.org> Message-ID: <1557236871.37.0.187899952132.issue36832@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- components: +Library (Lib) type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 09:54:37 2019 From: report at bugs.python.org (Dmitry Kazakov) Date: Tue, 07 May 2019 13:54:37 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557237277.31.0.0186261968551.issue27639@roundup.psfhosted.org> Change by Dmitry Kazakov : ---------- pull_requests: +13069 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:00:20 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 14:00:20 +0000 Subject: [issue36827] Overriding __new__ method with itself changes behaviour of the class In-Reply-To: <1557229328.38.0.306180402683.issue36827@roundup.psfhosted.org> Message-ID: <1557237620.67.0.452790588395.issue36827@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:03:04 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 07 May 2019 14:03:04 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557237784.27.0.0593860342099.issue30458@roundup.psfhosted.org> Change by Kubilay Kocak : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:08:26 2019 From: report at bugs.python.org (Alexey Muranov) Date: Tue, 07 May 2019 14:08:26 +0000 Subject: [issue36827] Overriding __new__ method with itself changes behaviour of the class In-Reply-To: <1557229328.38.0.306180402683.issue36827@roundup.psfhosted.org> Message-ID: <1557238106.4.0.55037967984.issue36827@roundup.psfhosted.org> Alexey Muranov added the comment: I've noticed some faults in my code examples: `super(__class__, __class__)` instead of a more appropriate `super(__class__, cls)`, forgotten `return` before `super(__class__, self).foo(*args, **kwarg)`, maybe there are more. I cannot edit previous comments, but this does not affect the main point. I've stumbled on this behaviour in a situation where it actually poses me a problem. However, here is some analogy: if a calculator returns 0 as the result of a multiplication of any number by 1, this cannot be justified by saying that no one needs to multiply numbers by 1 anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:09:44 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 14:09:44 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1557238184.51.0.95758212869.issue20185@roundup.psfhosted.org> Julien Palard added the comment: I rebased the conglomerate patch onto current master, and there's only three methods left, in floatobject.c, it's three methods inside a #if 0, it does not looks interesting to merge it (30 insertions, 12 deletions), so I'm closing this issue. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:10:46 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 May 2019 14:10:46 +0000 Subject: [issue36774] f-strings: Add a !d conversion for ease of debugging In-Reply-To: <1556797245.95.0.619255948077.issue36774@roundup.psfhosted.org> Message-ID: <1557238246.74.0.158026588749.issue36774@roundup.psfhosted.org> Eric V. Smith added the comment: After discussing this with Guido, we're going to go with a tweaked version of the '=' version of this in issue36817. So, I'm going to close this and continue the discussion there. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:14:39 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 07 May 2019 14:14:39 +0000 Subject: [issue36832] Port zipp to zipfile In-Reply-To: <1557236857.3.0.339513388865.issue36832@roundup.psfhosted.org> Message-ID: <1557238479.8.0.808280179788.issue36832@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +13070 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:17:31 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 07 May 2019 14:17:31 +0000 Subject: [issue36833] Add tests for Datetime C API Macros Message-ID: <1557238651.7.0.774867491617.issue36833@roundup.psfhosted.org> New submission from Paul Ganssle : This is a child issue for bpo 36782, specifically for testing the macro-only datetime C API functions Untested macros with no corresponding API module: - PyDateTime_GET_YEAR - PyDateTime_GET_MONTH - PyDateTime_GET_DAY - PyDateTime_DATE_GET_HOUR - PyDateTime_DATE_GET_MINUTE - PyDateTime_DATE_GET_SECOND - PyDateTime_DATE_GET_MICROSECOND - PyDateTime_TIME_GET_HOUR - PyDateTime_TIME_GET_MINUTE - PyDateTime_TIME_GET_SECOND - PyDateTime_TIME_GET_MICROSECOND - PyDateTime_DELTA_GET_DAYS - PyDateTime_DELTA_GET_SECONDS - PyDateTime_DELTA_GET_MICROSECONDS For all of these, I think you can write one "wrapper function" that just extracts all fields as a tuple (4 C API wrapper functions - date, datetime, time, timedelta). For each function, test with both the standard class and a subclass. ---------- assignee: p-ganssle components: Tests messages: 341731 nosy: edison.abahurire, p-ganssle priority: normal severity: normal status: open title: Add tests for Datetime C API Macros type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:18:03 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 May 2019 14:18:03 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557238683.71.0.0177172202352.issue36817@roundup.psfhosted.org> Eric V. Smith added the comment: After discussing this with Guido and Larry, we're going to go with the "implicit format mode", as outlined by Serhiy, and drop the !f feature. So the rules are: {x=} -> "x="+repr(x) {x=:.2f} -> "x="+format(x, ".2f") {x=:} -> "x="+format(x, "") {x=:!s:20} -> "x="+format(str(x), "20") {x=:!r:20} -> "x="+format(repr(x), "20") I think the 95% case will be {x=}, the 99%+ case will be {x=:2f} case. So I'm happy with this outcome. All functionality you had available with !f is still available, but with slightly different spellings. The most common cases now have the shortest spellings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:19:27 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 07 May 2019 14:19:27 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> Message-ID: <1557238767.48.0.118246104923.issue11107@roundup.psfhosted.org> Josh Rosenberg added the comment: Remi: The reason they're not hashable is presumably because it would make them valid dictionary keys, further confusing the difference between sequences and mappings. x[::-1] would, for a sequence, return a reversed sequence, but for a mapping, would end up using the slice as a key (not actually slicing) to obtain a single value. Confusing at best. Serhiy: It was discussed on the other issue, but the rationale there was, to quote Raymond: * too many other things need to be changed to support it * the measured win is somewhat small * we have a negative bias towards expanding the peephole optimizer * the AST may be a better place to do these kind of optimizations Of those, only the first bullet is (essentially) unchanged. Addressing the following points in order: * The win will likely be higher given that the __getslice__ protocol no longer exists; where slice objects need not be constructed in many cases in Python 2 (which had the SLICE+N bytecodes to perform subscripting directly, without a separate code to build a slice), leaving only slices with a step dependent on actually building slices. Nowadays, x[:-1] requires building a slice object, as does x[1:] and the like, where previously they did not * The approach I'm taking does not use the peephole optimizer in any way * I'm making the changes in the AST optimizer Perhaps the issues with "too many other things need to be changed" remain, but I'd like to at least have a PR in place so that, should the marshalling format change be accepted, we'd be able to take advantage of it. Side-note: The marshal code for marshalling slices that I chose was ':'; seemed rather appropriate for slices, and conveniently, it was not already in use. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:29:00 2019 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 07 May 2019 14:29:00 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1557239340.68.0.473473719048.issue36780@roundup.psfhosted.org> Brian Quinlan added the comment: Hey Hrvoje, I agree that #1 is the correct approach. `disown` might not be the best name - maybe `allow_shutdown` or something. But we can bike shed about that later. Are you interested in writing a patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:32:29 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 07 May 2019 14:32:29 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557239549.89.0.721795071959.issue30458@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- pull_requests: +13071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:35:02 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Tue, 07 May 2019 14:35:02 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1557239702.89.0.42645991452.issue36794@roundup.psfhosted.org> Hrvoje Nik?i? added the comment: How do I connect the accounts? Please note that I've previously submitted PRs which have been accepted, e.g. https://bugs.python.org/issue34476 and https://bugs.python.org/issue35465 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:41:24 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 May 2019 14:41:24 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abortthe current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557240084.25.0.966955550692.issue36829@roundup.psfhosted.org> Serhiy Storchaka added the comment: It looks like a good idea to me. But it should not be -W error. It should be an -X option, and this option should be used exclusively for debugging user extension modules. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:41:40 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Tue, 07 May 2019 14:41:40 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1557240100.35.0.0888592821305.issue36780@roundup.psfhosted.org> Hrvoje Nik?i? added the comment: > Are you interested in writing a patch? Yes - I wanted to check if there is interest in the feature before I commit time to write the patch, documentation, tests, etc. (And also I wanted to check if there's a better way to do it.) In any case, thanks for picking up on this. > `disown` might not be the best name - maybe `allow_shutdown` or something. Disown is an admittedly obscure reference to the shell built-in of the same name (https://tinyurl.com/qfn8ao7). The idea is to get the point across that the pool is truly abandoned, and its running futures are left to their own devices. Maybe wait_at_exit would be a clearer name: pool.shutdown(wait=False, wait_at_exit=True) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:44:21 2019 From: report at bugs.python.org (Sam Park) Date: Tue, 07 May 2019 14:44:21 +0000 Subject: [issue36834] mock.patch.object does not persist __module__ name for functions Message-ID: <1557240261.05.0.942052494289.issue36834@roundup.psfhosted.org> New submission from Sam Park : The expectation is that the __module__ attribute for a patched function should persist after patching. Minimal test case is attached. Simply run pytest in a venv with the files. Output: def test_zxc(): with mock.patch.object(mymodule, 'asd', side_effect=mymodule.asd, autospec=True) as spy_asd: > assert spy_asd.__module__ == 'mymodule' E AssertionError: assert None == 'mymodule' E + where None = .__module__ test_mymodule.py:8: AssertionError Originally reported at https://github.com/pytest-dev/pytest-mock/issues/146 before it was determined this was a unittest.mock issue. Happens on both Python 2.7 and 3.7. Probably not really tied to a specific Python version and more of mock library issue. My local venv: Python 3.7.2 pytest 4.4.1 ---------- components: Library (Lib), Tests files: minimal-test-case.zip messages: 341738 nosy: spark priority: normal severity: normal status: open title: mock.patch.object does not persist __module__ name for functions versions: Python 2.7, Python 3.7 Added file: https://bugs.python.org/file48309/minimal-test-case.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:47:40 2019 From: report at bugs.python.org (Mark Shannon) Date: Tue, 07 May 2019 14:47:40 +0000 Subject: [issue35354] Generator functions stack overflow In-Reply-To: <1543516829.1.0.788709270274.issue35354@psf.upfronthosting.co.za> Message-ID: <1557240460.03.0.985916401877.issue35354@roundup.psfhosted.org> Mark Shannon added the comment: I'm closing this as a duplicate of https://bugs.python.org/issue6028 Making a recursive call in an except block cannot be handled sensibly by the interpreter. On exceeding the stack depth, the interpreter will raise a RecursionError. Catching a RecursionError and then making a call will blow the stack, leaving the interpreter with no choice; it has to abort. ---------- nosy: +Mark.Shannon resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:50:11 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 07 May 2019 14:50:11 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557240611.22.0.537399299492.issue30458@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- pull_requests: +13072 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:53:47 2019 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 07 May 2019 14:53:47 +0000 Subject: [issue36395] Add deferred single-threaded/fake executor to concurrent.futures In-Reply-To: <1553218760.85.0.609828298764.issue36395@roundup.psfhosted.org> Message-ID: <1557240827.75.0.742768953858.issue36395@roundup.psfhosted.org> Brian Quinlan added the comment: Hey Brian, I understand the non-determinism. I was wondering if you had a non-theoretical example i.e. some case where the non-determinism had impacted a real test that you wrote? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 10:54:16 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Tue, 07 May 2019 14:54:16 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1557240856.85.0.470278812503.issue36794@roundup.psfhosted.org> Hrvoje Nik?i? added the comment: Ok, found it, and I've now updated the github name on my bpo account. I'll gladly sign the CLA if needed, I thought it wasn't necessary for small changes based on previous experience. Please advise whether it's necessary here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:00:27 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 07 May 2019 15:00:27 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557241227.34.0.188613580756.issue36783@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 5765ecf79fcee987f2f97c246c64b494324dfd33 by Cheryl Sabella (Edison A) in branch 'master': bpo-36783: Added C API Documentation for Time_FromTimeAndFold and PyDateTime_FromDateAndTimeAndFold (GH-13147) https://github.com/python/cpython/commit/5765ecf79fcee987f2f97c246c64b494324dfd33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:00:43 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 15:00:43 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557241243.11.0.871481437608.issue36783@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:01:48 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Tue, 07 May 2019 15:01:48 +0000 Subject: [issue18387] Add 'symbols' link to pydoc's html menu bar. In-Reply-To: <1373131695.63.0.960870867634.issue18387@psf.upfronthosting.co.za> Message-ID: <1557241308.12.0.873043806484.issue18387@roundup.psfhosted.org> Sanyam Khurana added the comment: Hey Ron, Friendly ping :) Can you please convert this into a pull request? ---------- nosy: +CuriousLearner versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:04:59 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 07 May 2019 15:04:59 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557241499.53.0.54027318073.issue36783@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:06:54 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 07 May 2019 15:06:54 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557241614.53.0.253204696366.issue36783@roundup.psfhosted.org> Cheryl Sabella added the comment: @edison.abahurire, thanks for the PR! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:06:54 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 07 May 2019 15:06:54 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1557241614.56.0.901689503502.issue36794@roundup.psfhosted.org> St?phane Wirtel added the comment: If I read the Licensing section into the devguide, a contributor (me, your, etc..) has to sign the CLA. https://devguide.python.org/pullrequest/#cla "To accept your change we must have your formal approval for distributing your work under the PSF license." the verb is must -> required! Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:07:08 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 15:07:08 +0000 Subject: [issue28866] Type cache is not correctly invalidated on a class defining mro() In-Reply-To: <1480862145.72.0.468660451957.issue28866@psf.upfronthosting.co.za> Message-ID: <1557241628.59.0.686151924277.issue28866@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +13074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:07:13 2019 From: report at bugs.python.org (Mark Shannon) Date: Tue, 07 May 2019 15:07:13 +0000 Subject: [issue33153] interpreter crash when multiplying large tuples In-Reply-To: <1522145451.62.0.467229070634.issue33153@psf.upfronthosting.co.za> Message-ID: <1557241633.16.0.777894078996.issue33153@roundup.psfhosted.org> Mark Shannon added the comment: I can't reproduce on 2.7.15rc1 on an x64 machine. Can you confirm that this is still an issue? ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:14:49 2019 From: report at bugs.python.org (Michael Blahay) Date: Tue, 07 May 2019 15:14:49 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557242089.06.0.716873590511.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: Let it be known that the author of PR 4981 is known as vaultah. He/she personally closed the pull request this morning stating a lack of need to be recognized for the work. Per his/her instructions I am reviewing the changes and incorporating in our solution as needed. Thank you vaultah! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:17:52 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 15:17:52 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557242272.98.0.835954432662.issue36783@roundup.psfhosted.org> miss-islington added the comment: New changeset 146010ea42fb949a48a1b79a13503995a5176833 by Miss Islington (bot) in branch '3.7': bpo-36783: Added C API Documentation for Time_FromTimeAndFold and PyDateTime_FromDateAndTimeAndFold (GH-13147) https://github.com/python/cpython/commit/146010ea42fb949a48a1b79a13503995a5176833 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:27:53 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 15:27:53 +0000 Subject: [issue28795] Misleading stating, that SIGINT handler is installed by default In-Reply-To: <1480026357.5.0.735730414686.issue28795@psf.upfronthosting.co.za> Message-ID: <1557242873.02.0.103307780564.issue28795@roundup.psfhosted.org> Julien Palard added the comment: New changeset e85ef7a7eacdef2f43e6bf2e67f335100e7ef2da by Julien Palard in branch 'master': bpo-28795: Signal documentation: Fix misleading statement. (GH-13121) https://github.com/python/cpython/commit/e85ef7a7eacdef2f43e6bf2e67f335100e7ef2da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:28:00 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 15:28:00 +0000 Subject: [issue28795] Misleading stating, that SIGINT handler is installed by default In-Reply-To: <1480026357.5.0.735730414686.issue28795@psf.upfronthosting.co.za> Message-ID: <1557242880.31.0.718755699371.issue28795@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:28:21 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 15:28:21 +0000 Subject: [issue28795] Misleading stating, that SIGINT handler is installed by default In-Reply-To: <1480026357.5.0.735730414686.issue28795@psf.upfronthosting.co.za> Message-ID: <1557242901.53.0.106056368363.issue28795@roundup.psfhosted.org> Change by Julien Palard : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:28:51 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 15:28:51 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557242931.58.0.19667508249.issue30458@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 7e200e0763f5b71c199aaf98bd5588f291585619 by Gregory P. Smith (Miro Hron?ok) in branch '3.7': bpo-30458: Disallow control chars in http URLs. (GH-12755) (GH-13154) https://github.com/python/cpython/commit/7e200e0763f5b71c199aaf98bd5588f291585619 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:29:33 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 15:29:33 +0000 Subject: [issue28795] Misleading stating, that SIGINT handler is installed by default In-Reply-To: <1480026357.5.0.735730414686.issue28795@psf.upfronthosting.co.za> Message-ID: <1557242973.05.0.0130169896212.issue28795@roundup.psfhosted.org> Julien Palard added the comment: Thanks for reporting Jan! It's finally merged \o/ ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:29:37 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 15:29:37 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557242977.1.0.361120018913.issue30458@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:30:27 2019 From: report at bugs.python.org (Thomas Grainger) Date: Tue, 07 May 2019 15:30:27 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abortthe current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557243027.98.0.249809305557.issue36829@roundup.psfhosted.org> Thomas Grainger added the comment: > this option should be used exclusively for debugging user extension modules. I have a very large codebase that fires the odd ResourceWarning, and after fixing them all I'd like to ensure that they do not reoccur. When using `-W error` it still won't fail CI. So I would use this -X option for more than debugging user extension modules ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:32:39 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 07 May 2019 15:32:39 +0000 Subject: [issue36656] Allow os.symlink(src, target, force=True) to prevent race conditions In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1557243159.4.0.156835857549.issue36656@roundup.psfhosted.org> Toshio Kuratomi added the comment: Additionally, the os module is supposed to closely follow the behaviour of the underlying operating system functions: https://docs.python.org/3/library/os.html > The design of all built-in operating system dependent modules of Python is such that as long as the same functionality is available, it uses the same interface; [..] The POSIX symlimk function on which this is based has made the decision not to overwrite an existing symlink (See the EEXIST error in https://pubs.opengroup.org/onlinepubs/009695399/functions/symlink.html or man pages on symlink from one of the Linux distros: http://man7.org/linux/man-pages/man2/symlink.2.html ) As with many other POSIX-derived filesystem functions, the technique you propose, relying on atomic filesystem renames) would seem to be the standard method of writing race-resistant code. Due to the mandate for the os module, it feels like that belongs in a utility function in custom code or another module rather than something for the os module. A couple of thoughts on what you could do instead: * A collection of utility functions that fixed race-conditions in filesystem handling could make a nice third party module on pypi. * The stdlib shutil module provides an API that's supposed to be easier to implement common use cases than the os.* functions. Perhaps you could propose your idea to the python-ideas mailing list as a new function in that module and see what people think of that? ---------- nosy: +a.badger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:39:51 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 07 May 2019 15:39:51 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557243591.09.0.927047386007.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: Thanks for your patience with this Charlie, but please try another run this time without the strftime() and mbstowcs() calls. Honest, we are getting closer! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:42:24 2019 From: report at bugs.python.org (Charlie Clark) Date: Tue, 07 May 2019 15:42:24 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557243744.25.0.123749987949.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: If the process crashes at the first print statement, I'm not sure how I can run the tests. Or should I try them separately? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:46:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 07 May 2019 15:46:44 +0000 Subject: [issue36834] mock.patch.object does not persist __module__ name for functions In-Reply-To: <1557240261.05.0.942052494289.issue36834@roundup.psfhosted.org> Message-ID: <1557244004.63.0.644530697605.issue36834@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I guess the problem is that to patch 'bar' in foo.bar the signature of bar is taken and then it's evaluated using exec [1] where the function body has _check_sig that checks for the signature during function call. _check_sig has attributes of func copied. Since it's evaluated using exec the returned funcopy variable might not have __module__ set as per the execution context. One possible approach would be to _copy_func_details(func, funcopy) so that the __module__ and other attributes are copied. This produces a test failure where in case of lambdas the __name__ is which is not a valid identifier and hence funcopy is used. Then __name__ is set as '' by my patch. Hence, 'funcopy' is replaced by '' causing below test failure. This could be resolved by setting __name__ again to the expected value. This was newly added for test coverage with adbf178e49113b2de0042e86a1228560475a65c5. My main worry is that it's used in create_autospec hence do we really want to copy __module__ and others to the patched function for places with create_autospec also with functions supplying autospec=True. This is a user expectation but I would like to know maintainers opinion as well of this change. Reproducer # cat /tmp/foo.py def bar(a: int): pass # /tmp/bar.py from unittest import mock import foo with mock.patch.object(foo, 'bar', autospec=True) as mocked_attribute: assert mocked_attribute.__module__ == 'foo' # Python 3.7 __module__ is None ? cpython git:(master) ? python3.7 /tmp/bar.py Traceback (most recent call last): File "/tmp/bar.py", line 6, in assert mocked_attribute.__module__ == 'foo', f'__module__ is {mocked_attribute.__module__}' AssertionError: __module__ is None # With patch ? cpython git:(master) ? ./python.exe /tmp/bar.py # No failure # Patch diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 1e8057d5f5..a7006fcf7d 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -165,6 +165,8 @@ def _set_signature(mock, original, instance=False): exec (src, context) funcopy = context[name] _setup_func(funcopy, mock, sig) + _copy_func_details(func, funcopy) + funcopy.__name__ = name return funcopy # Test failure without funcopy.__name__ = name in my patch where I don't restore the 'funcopy' for lambdas. But this can be fixed. ====================================================================== FAIL: test_spec_function_no_name (unittest.test.testmock.testhelpers.SpecSignatureTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/test/testmock/testhelpers.py", line 946, in test_spec_function_no_name self.assertEqual(mock.__name__, 'funcopy') AssertionError: '' != 'funcopy' - + funcopy ---------------------------------------------------------------------- Ran 386 tests in 2.911s [1] https://github.com/python/cpython/blob/e85ef7a7eacdef2f43e6bf2e67f335100e7ef2da/Lib/unittest/mock.py#L165 ---------- nosy: +cjw296, mariocj89, michael.foord, xtreak type: -> behavior versions: +Python 3.8 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:47:31 2019 From: report at bugs.python.org (Matthew Tanous) Date: Tue, 07 May 2019 15:47:31 +0000 Subject: [issue36812] posix_spawnp returns error when used with file_actions In-Reply-To: <1557155011.55.0.26778375432.issue36812@roundup.psfhosted.org> Message-ID: <1557244051.5.0.958690377357.issue36812@roundup.psfhosted.org> Matthew Tanous added the comment: Your example is an attempt to use Popen to run a file you don't have execute permissions for. In my example, it is not `whoami` that it is failing to create/open, but '.tmp/temp_file'. I would expect a `PermissionError: [Errno 13] Permission denied: '.tmp/temp_file'` returned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:48:17 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 07 May 2019 15:48:17 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1557244097.13.0.388940276647.issue36794@roundup.psfhosted.org> Andrew Svetlov added the comment: I would say that unblock order is an implementation detail (which is unlikely be changed though). I'm biased how should we document it. Yuri, your opinion is very welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:55:42 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 15:55:42 +0000 Subject: [issue28795] Misleading stating, that SIGINT handler is installed by default In-Reply-To: <1480026357.5.0.735730414686.issue28795@psf.upfronthosting.co.za> Message-ID: <1557244542.77.0.122630236571.issue28795@roundup.psfhosted.org> miss-islington added the comment: New changeset 721729fca4fab9fd11861844880b3f3780015ae0 by Miss Islington (bot) in branch '3.7': bpo-28795: Signal documentation: Fix misleading statement. (GH-13121) https://github.com/python/cpython/commit/721729fca4fab9fd11861844880b3f3780015ae0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 11:57:10 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 07 May 2019 15:57:10 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557244630.05.0.88526507382.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: You can safely execute each line individually (omitting the aforementioned count/value pairs) or depending on how the copy/paste is being done, just paste the script into a text editor (notepad) and comment out those lines. Then copy-paste that modified script. This time I'm really attempting to see if the internal encoding/decoding done in the CRT strftime() is failing somehow (it calls wcsftime). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:02:11 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 07 May 2019 16:02:11 +0000 Subject: [issue13824] argparse.FileType opens a file and never closes it In-Reply-To: <1326975939.94.0.524131708506.issue13824@psf.upfronthosting.co.za> Message-ID: <1557244931.5.0.406714794.issue13824@roundup.psfhosted.org> Josh Rosenberg added the comment: Mitar: argparse.FileType's __call__ (which is what "parses" the argument) returns whatever open (aka io.open) returns. Basically, post-parsing, there is nothing about the result of FileType that distinguishes it from a manually opened file (or when '-' is passed, from stdin/stdout). So it's already possible to do what you describe, simply by doing: parser = argparse.ArgumentParser() parser.add_argument('input', type=argparse.FileType()) arguments = parser.parse_args() with arguments.input as f: assert arguments.input is f That already "open[s] eagerly as now, but it would be closed at exit from context manager." The original report did not like that you couldn't prevent clobbering of an existing file in write mode (no longer true, since you can pass a mode of 'x' just like you can with open), and did not like that the result of parsing was implicitly opened immediately without being controllable *immediately* via a context manager. The only real solutions to that problem are either: 1. Making FileType (or a replacement) that is lazier in some way. 2. Making the argument namespace itself support context management The proposal to check validity and return a curried call to open is problematic given the TOCTOU issues, but a curried version that performs little or no checks up front, but performs argparse style clean exits if the deferred open fails would be reasonable. The alternative would be to integrate more heavily with the argument namespace, such that you could write code like: with parser.parse_args() as arguments: and in that scenario, the files would be opened immediately and stored on the namespace, but either only FileType, or any type result supporting context management, would be bulk __enter__-ed and bulk __exit__-ed upon exiting the with block. As is, a user could do most of this with contextlib.ExitStack, but it's more to reimplement (and tricky to get right, and would still rely on argparse to clean up files 1 through n-1 if opening file n fails for whatever reason before parsing completes). ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:02:37 2019 From: report at bugs.python.org (Charlie Clark) Date: Tue, 07 May 2019 16:02:37 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557244957.34.0.468869968154.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: print('count:', crt_time.wcsftime(wbuf, 1024, '%Z', tm)) also fails but crt_convert = ctypes.CDLL('api-ms-win-crt-convert-l1-1-0', use_errno=True) print('count:', crt_convert.mbstowcs(wbuf, buf, 1024)) seems to work okay. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:09:33 2019 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 May 2019 16:09:33 +0000 Subject: [issue36835] Move the warnings runtime state into per-interpreter state. Message-ID: <1557245373.48.0.875552675923.issue36835@roundup.psfhosted.org> New submission from Eric Snow : Currently the warnings module uses runtime-global state (PyRuntimeState.warnings). That should be moved down to per-interpreter state. There are three possible places: 1. the module's "module state" 2. the module's __dict__ 3. PyInterpreterState.warnings (new) I have a patch for the first option. ---------- assignee: eric.snow components: Interpreter Core messages: 341763 nosy: eric.snow priority: normal severity: normal stage: needs patch status: open title: Move the warnings runtime state into per-interpreter state. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:11:53 2019 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 May 2019 16:11:53 +0000 Subject: [issue36835] Move the warnings runtime state into per-interpreter state. In-Reply-To: <1557245373.48.0.875552675923.issue36835@roundup.psfhosted.org> Message-ID: <1557245513.27.0.691343048501.issue36835@roundup.psfhosted.org> Change by Eric Snow : ---------- keywords: +patch pull_requests: +13076 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:13:07 2019 From: report at bugs.python.org (Chris Angelico) Date: Tue, 07 May 2019 16:13:07 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1542070337.94.0.788709270274.issue35224@psf.upfronthosting.co.za> Message-ID: <1557245587.46.0.467740333873.issue35224@roundup.psfhosted.org> Change by Chris Angelico : ---------- pull_requests: +13077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:14:19 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 07 May 2019 16:14:19 +0000 Subject: [issue13824] argparse.FileType opens a file and never closes it In-Reply-To: <1326975939.94.0.524131708506.issue13824@psf.upfronthosting.co.za> Message-ID: <1557245659.14.0.800984579189.issue13824@roundup.psfhosted.org> R?mi Lapeyre added the comment: For information, issue 33927 is related. I removed one of the FileType from json.tool argument parser to work around this behavior (https://github.com/python/cpython/pull/7865/files#diff-e94945dd18482591faf1e294b029a6afR44). If paul.j3 does not have his patch anymore I volunteer to implement option 1 to have a better alternative in the stdlib. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:15:14 2019 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 May 2019 16:15:14 +0000 Subject: [issue36835] Move the warnings runtime state into per-interpreter state. In-Reply-To: <1557245373.48.0.875552675923.issue36835@roundup.psfhosted.org> Message-ID: <1557245714.51.0.783693978581.issue36835@roundup.psfhosted.org> Eric Snow added the comment: dupe of #36737 ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:15:40 2019 From: report at bugs.python.org (Eric Snow) Date: Tue, 07 May 2019 16:15:40 +0000 Subject: [issue36737] Warnings operate out of global runtime state. In-Reply-To: <1556317738.23.0.687262373674.issue36737@roundup.psfhosted.org> Message-ID: <1557245740.59.0.337198178451.issue36737@roundup.psfhosted.org> Change by Eric Snow : ---------- keywords: +patch pull_requests: +13078 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:17:34 2019 From: report at bugs.python.org (Riccardo Magliocchetti) Date: Tue, 07 May 2019 16:17:34 +0000 Subject: [issue36015] streamhandler cannot represent streams with an integer as name In-Reply-To: <1550431224.14.0.504793638163.issue36015@roundup.psfhosted.org> Message-ID: <1557245854.48.0.883552102791.issue36015@roundup.psfhosted.org> Riccardo Magliocchetti added the comment: Friendly ping, would be helpful to get this resolved for 3.8.0. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:18:25 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 07 May 2019 16:18:25 +0000 Subject: [issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb' In-Reply-To: <1330513271.31.0.437438851478.issue14156@psf.upfronthosting.co.za> Message-ID: <1557245905.78.0.226705545515.issue14156@roundup.psfhosted.org> Josh Rosenberg added the comment: Serhiy: To be clear, Moritz's patch won't work if stdin/stdout are io.StringIO or the like either, since StringIO lacks a buffer attribute. Personally, I'm content to: 1. Ignore the closeability of the standard handles; that's not part of this bug, and just introduces more headaches to getting a patch approved (and conceivably breaks back compat if the user *wants* the handle closed even if it's a standard handle). Nothing is made worse by ignoring it after all, just not made better immediately. 2. Ignore the possibility of stdin/stdout without a buffer attribute; it will raise an error, but that's a reasonable response to demanding a binary stream in a scenario where only a text stream is available 3. Not use fileno, as it mostly supports the "anti-close" behavior I dismissed in #1, and has a bunch of pitfalls (e.g. a standard handle rebound to a TextIOWrapper around GzipFile or the like has a fileno attribute, but using it bypasses the compression; basically, you can't consider fileno to be equivalent to the underlying binary stream, because binary streams can be wrapped as well). I'm going to convert Moritz's proposal to a PR and hope I can get core developer approval for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:18:32 2019 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 07 May 2019 16:18:32 +0000 Subject: [issue24767] can concurrent.futures len(Executor) return the number of tasks? In-Reply-To: <1438372513.29.0.46812629282.issue24767@psf.upfronthosting.co.za> Message-ID: <1557245912.01.0.183584333342.issue24767@roundup.psfhosted.org> Brian Quinlan added the comment: If we supported this, aren't we promising that we will always materialize the iterator passed to map? I think that we'd need a really strong use-case for this to be worth-while. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:18:26 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 16:18:26 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1557245906.01.0.263594975142.issue36533@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 64aa6d2000665efb1a2eccae176df9520bf5f5e6 by Gregory P. Smith in branch 'master': bpo-36533: Reinit logging.Handler locks on fork(). (GH-12704) https://github.com/python/cpython/commit/64aa6d2000665efb1a2eccae176df9520bf5f5e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:20:03 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Tue, 07 May 2019 16:20:03 +0000 Subject: [issue36836] Test Suite not working on 3.4 and 3.5 on MacOS Mojave Message-ID: <1557246003.67.0.167148241592.issue36836@roundup.psfhosted.org> New submission from Sanyam Khurana : I was testing this issue: https://bugs.python.org/issue10598 I checked both Python 3.4, 3.5, 3.6 and tagged commit v3.7.0 but I'm not able to run the test suite on any of them. I'm currently working on MacOS Mojave 10.14.4 I landed on issue https://bugs.python.org/issue36432 which was superseeded by https://bugs.python.org/issue34602 while searching for the error I got: ``` $ make test running build running build_ext building '_ssl' extension gcc -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I./Include -I. -I/usr/local/include -I/Users/sanyamkhurana/cpython/Include -I/Users/sanyamkhurana/cpython -c /Users/sanyamkhurana/cpython/Modules/_ssl.c -o build/temp.macosx-10.14-x86_64-3.6-pydebug/Users/sanyamkhurana/cpython/Modules/_ssl.o gcc -bundle -undefined dynamic_lookup build/temp.macosx-10.14-x86_64-3.6-pydebug/Users/sanyamkhurana/cpython/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.macosx-10.14-x86_64-3.6-pydebug/_ssl.cpython-36dm-darwin.so ld: library not found for -lssl clang: error: linker command failed with exit code 1 (use -v to see invocation) building '_hashlib' extension gcc -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I./Include -I. -I/usr/local/include -I/Users/sanyamkhurana/cpython/Include -I/Users/sanyamkhurana/cpython -c /Users/sanyamkhurana/cpython/Modules/_hashopenssl.c -o build/temp.macosx-10.14-x86_64-3.6-pydebug/Users/sanyamkhurana/cpython/Modules/_hashopenssl.o gcc -bundle -undefined dynamic_lookup build/temp.macosx-10.14-x86_64-3.6-pydebug/Users/sanyamkhurana/cpython/Modules/_hashopenssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.macosx-10.14-x86_64-3.6-pydebug/_hashlib.cpython-36dm-darwin.so ld: library not found for -lssl clang: error: linker command failed with exit code 1 (use -v to see invocation) building '_tkinter' extension gcc -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -DWITH_APPINIT=1 -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tcl.framework/Versions/Current/PrivateHeaders -I/System/Library/Frameworks/Tk.framework/Headers -I/System/Library/Frameworks/Tk.framework/Versions/Current/PrivateHeaders -I/usr/X11R6/include -I./Include -I. -I/usr/local/include -I/Users/sanyamkhurana/cpython/Include -I/Users/sanyamkhurana/cpython -c /Users/sanyamkhurana/cpython/Modules/_tkinter.c -o build/temp.macosx-10.14-x86_64-3.6-pydebug/Users/sanyamkhurana/cpython/Modules/_tkinter.o -framework Tk clang: warning: -framework Tk: 'linker' input unused [-Wunused-command-line-argument] In file included from /Users/sanyamkhurana/cpython/Modules/_tkinter.c:50: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found # include ^~~~~~~~~~~~ 1 error generated. Python build finished successfully! The necessary bits to build these optional modules were not found: _dbm _sqlite3 nis ossaudiodev spwd zlib To find the necessary bits, look in setup.py in detect_modules() for the module's name. The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: atexit pwd time Failed to build these modules: _hashlib _ssl _tkinter running build_scripts copying and adjusting /Users/sanyamkhurana/cpython/Tools/scripts/pydoc3 -> build/scripts-3.6 copying and adjusting /Users/sanyamkhurana/cpython/Tools/scripts/idle3 -> build/scripts-3.6 copying and adjusting /Users/sanyamkhurana/cpython/Tools/scripts/2to3 -> build/scripts-3.6 copying and adjusting /Users/sanyamkhurana/cpython/Tools/scripts/pyvenv -> build/scripts-3.6 changing mode of build/scripts-3.6/pydoc3 from 644 to 755 changing mode of build/scripts-3.6/idle3 from 644 to 755 changing mode of build/scripts-3.6/2to3 from 644 to 755 changing mode of build/scripts-3.6/pyvenv from 644 to 755 renaming build/scripts-3.6/pydoc3 to build/scripts-3.6/pydoc3.6 renaming build/scripts-3.6/idle3 to build/scripts-3.6/idle3.6 renaming build/scripts-3.6/2to3 to build/scripts-3.6/2to3-3.6 renaming build/scripts-3.6/pyvenv to build/scripts-3.6/pyvenv-3.6 ./python.exe -E -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform ./python.exe ./Tools/scripts/run_tests.py /Users/sanyamkhurana/cpython/python.exe -W default -bb -E -W error::BytesWarning -m test -r -w -j 0 -u all,-largefile,-audio,-gui Traceback (most recent call last): File "/Users/sanyamkhurana/cpython/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/Users/sanyamkhurana/cpython/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/sanyamkhurana/cpython/Lib/test/__main__.py", line 2, in main() File "/Users/sanyamkhurana/cpython/Lib/test/libregrtest/main.py", line 532, in main Regrtest().main(tests=tests, **kwargs) File "/Users/sanyamkhurana/cpython/Lib/test/libregrtest/main.py", line 468, in main self._main(tests, kwargs) File "/Users/sanyamkhurana/cpython/Lib/test/libregrtest/main.py", line 482, in _main setup_tests(self.ns) File "/Users/sanyamkhurana/cpython/Lib/test/libregrtest/setup.py", line 68, in setup_tests resource.setrlimit(resource.RLIMIT_STACK, (newsoft, hard)) ValueError: current limit exceeds maximum limit make: *** [test] Error 1 ``` It's happening in 3.4, 3.5, 3.6 branch. It's however not working on the master branch and the test suite is working completely fine on the master branch. ---------- components: Tests messages: 341770 nosy: CuriousLearner, cheryl.sabella, vstinner priority: normal severity: normal status: open title: Test Suite not working on 3.4 and 3.5 on MacOS Mojave type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:22:22 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Tue, 07 May 2019 16:22:22 +0000 Subject: [issue36836] Test Suite not working on 3.4, 3.5, 3.6, 3.7 on MacOS Mojave In-Reply-To: <1557246003.67.0.167148241592.issue36836@roundup.psfhosted.org> Message-ID: <1557246142.3.0.992345602152.issue36836@roundup.psfhosted.org> Change by Sanyam Khurana : ---------- title: Test Suite not working on 3.4 and 3.5 on MacOS Mojave -> Test Suite not working on 3.4, 3.5, 3.6, 3.7 on MacOS Mojave _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:23:26 2019 From: report at bugs.python.org (Benjamin Kane) Date: Tue, 07 May 2019 16:23:26 +0000 Subject: [issue36837] Make il8n tools available from `python -m` Message-ID: <1557246206.07.0.412069516419.issue36837@roundup.psfhosted.org> New submission from Benjamin Kane : Localizing a Python application involves using the `gettext` standard library module to read .mo files. There are three scripts to assist with this in https://github.com/bbkane/cpython/tree/master/Tools/i18n : - makelocalealias.py : Convert the X11 locale.alias file into a mapping dictionary suitable for locale.py. - msgfmt.py : Generate binary message catalog from textual translation description - pygettext.py : Generate .pot files identical to what GNU xgettext[2] generates for C and C++ code (these can be translated by msgfmt.py) I recently wrote a tutorial to localize a Python Script ( https://github.com/bbkane/arcade/blob/bbkane/add_localization_example/doc/examples/text_loc_example.rst ) and I had to tell my users (a student audience) to download these scripts from GitHub. I would have been much happier to ask them to use a builtin Python tool available from the `-m` switch (similar to `python -m json.tool`), so this issue is to add that. The docs ( https://docs.python.org/3/library/gettext.html#internationalizing-your-programs-and-modules ) mention these scripts, but do not provide any information on how to get them. Possible solutions: - turn gettext.py into a package and put these scripts into a tool subpackage (similar to json.tool) - Add a separate package (il8n perhaps) and put these scripts into there - Add links to these scripts and instructions to use them in the docs. ---------- messages: 341771 nosy: bbkane priority: normal severity: normal status: open title: Make il8n tools available from `python -m` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:24:29 2019 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 07 May 2019 16:24:29 +0000 Subject: [issue24980] Allow for providing 'on_new_thread' callback to 'concurrent.futures.ThreadPoolExecutor' In-Reply-To: <1441134792.06.0.689087897304.issue24980@psf.upfronthosting.co.za> Message-ID: <1557246269.66.0.386824741628.issue24980@roundup.psfhosted.org> Brian Quinlan added the comment: Do the `initializer` and `initargs` parameters deal with this use case for you? https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:25:08 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 07 May 2019 16:25:08 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557246308.12.0.471605768117.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: Here is another test, this time removing Python from the equation (mostly :) import ctypes, struct crt_locale = ctypes.CDLL('api-ms-win-crt-locale-l1-1-0', use_errno=True) crt_time = ctypes.CDLL('api-ms-win-crt-time-l1-1-0', use_errno=True) crt_locale._wsetlocale.restype = ctypes.c_wchar_p print('old locale:', crt_locale._wsetlocale(0, 0)) tm = struct.pack('9i', 2019, 5, 6, 9, 50, 4, 0, 126, 1) wbuf = ctypes.create_unicode_buffer(1024) print('count:', crt_time.wcsftime(wbuf, 1024, '%Z', tm)) print('value:', wbuf.value) print('new locale:', crt_locale._wsetlocale(0, 'de_DE')) print('count:', crt_time.wcsftime(wbuf, 1024, '%Z', tm)) print('value:', wbuf.value) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:25:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 07 May 2019 16:25:23 +0000 Subject: [issue36836] Test Suite not working on 3.4, 3.5, 3.6, 3.7 on MacOS Mojave In-Reply-To: <1557246003.67.0.167148241592.issue36836@roundup.psfhosted.org> Message-ID: <1557246323.75.0.0817688842431.issue36836@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:26:13 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 May 2019 16:26:13 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557246373.08.0.813219348749.issue36817@roundup.psfhosted.org> Eric V. Smith added the comment: The most recent version of the PR 0ec4daead4d5b3c42613bd210a51da60932035f3 has the behavior without !f and auto-selecting what used to be !f. It's ready for a final review before I commit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:26:55 2019 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 07 May 2019 16:26:55 +0000 Subject: [issue22630] `concurrent.futures.Future.set_running_or_notify_cancel` does not notify cancel In-Reply-To: <1413277554.48.0.992007500484.issue22630@psf.upfronthosting.co.za> Message-ID: <1557246415.53.0.405011722479.issue22630@roundup.psfhosted.org> Brian Quinlan added the comment: Ben, do you still think that your patch is relevant or shall we close this bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:28:33 2019 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 07 May 2019 16:28:33 +0000 Subject: [issue22729] concurrent.futures `wait` and `as_completed` depend on private api In-Reply-To: <1414269700.02.0.917285833698.issue22729@psf.upfronthosting.co.za> Message-ID: <1557246513.77.0.815814421809.issue22729@roundup.psfhosted.org> Brian Quinlan added the comment: How did the experiment go? Are people still interested in this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:30:00 2019 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 07 May 2019 16:30:00 +0000 Subject: [issue31783] Race condition in ThreadPoolExecutor when scheduling new jobs while the interpreter shuts down In-Reply-To: <1507930035.71.0.213398074469.issue31783@psf.upfronthosting.co.za> Message-ID: <1557246600.61.0.402561039598.issue31783@roundup.psfhosted.org> Change by Brian Quinlan : ---------- assignee: -> bquinlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:34:48 2019 From: report at bugs.python.org (Hans Ginzel) Date: Tue, 07 May 2019 16:34:48 +0000 Subject: [issue36828] Cannot install et-xmlfile In-Reply-To: <1557230951.74.0.443191193294.issue36828@roundup.psfhosted.org> Message-ID: <1557246888.96.0.523807552833.issue36828@roundup.psfhosted.org> Hans Ginzel added the comment: Thank you for suggestion. I agree. Where can I find the repo for et-xmlfile or the appropriate tracker respectively, please? I have found https://github.com/dimensions11/et_xmlfile. Is it the _master_ repo? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 12:40:03 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 07 May 2019 16:40:03 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557247203.32.0.820674698648.issue36817@roundup.psfhosted.org> Change by Eric V. Smith : ---------- pull_requests: +13079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:05:27 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 17:05:27 +0000 Subject: [issue11001] Various obvious errors in cookies documentation In-Reply-To: <1295908065.55.0.221906287574.issue11001@psf.upfronthosting.co.za> Message-ID: <1557248727.13.0.0565689276128.issue11001@roundup.psfhosted.org> miss-islington added the comment: New changeset 91cc01f40eec03ece2d6b04ad9ea786e77707d8d by Miss Islington (bot) (Julia Iliuk) in branch 'master': bpo-11001: updated cookie docs (GH-13086) https://github.com/python/cpython/commit/91cc01f40eec03ece2d6b04ad9ea786e77707d8d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:05:40 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 17:05:40 +0000 Subject: [issue11001] Various obvious errors in cookies documentation In-Reply-To: <1295908065.55.0.221906287574.issue11001@psf.upfronthosting.co.za> Message-ID: <1557248740.55.0.730886661896.issue11001@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13080 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:05:57 2019 From: report at bugs.python.org (Charlie Clark) Date: Tue, 07 May 2019 17:05:57 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557248757.11.0.26317997039.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: And this is the result. old locale: C count: 28 value: Mitteleurop?ische Sommerzeit new locale: de_DE count: -1 value: Windows fatal exception: code 0xc0000374 Looks like print('new locale:', crt_locale._wsetlocale(0, 'de_DE')) print('count:', crt_time.wcsftime(wbuf, 1024, '%Z', tm)) is the culprit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:11:12 2019 From: report at bugs.python.org (Mark Shannon) Date: Tue, 07 May 2019 17:11:12 +0000 Subject: [issue34408] possible null pointer dereference in pystate.c In-Reply-To: <1534277378.73.0.56676864532.issue34408@psf.upfronthosting.co.za> Message-ID: <1557249072.69.0.775212787774.issue34408@roundup.psfhosted.org> Mark Shannon added the comment: Any reason not to close this issue? ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:12:45 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 07 May 2019 17:12:45 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557249165.75.0.38801506196.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: Final test, this time, no Python what so ever. I've added a zip containing a simple C program (source and .exe) that performs the same test. The output should be similar to: -------- The current locale is now: C The time zone is: 'Mountain Daylight Time' (22 characters) -------- The updated locale is now: de_DE The time zone is: 'Mountain Daylight Time' (22 characters) -------- If this crashes, the problem is then within the CRT itself :( ---------- Added file: https://bugs.python.org/file48310/issue36792.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:13:48 2019 From: report at bugs.python.org (Alexey Muranov) Date: Tue, 07 May 2019 17:13:48 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: <1557249228.72.0.643402707579.issue32768@roundup.psfhosted.org> Alexey Muranov added the comment: There were problems with the use case for mutable bases that i posted (see #36827). Here is an updated version: https://gist.github.com/alexeymuranov/04e2807eb5679ac7e36da4454a58fa7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:16:59 2019 From: report at bugs.python.org (Alexey Muranov) Date: Tue, 07 May 2019 17:16:59 +0000 Subject: [issue36827] Overriding __new__ method with itself changes behaviour of the class In-Reply-To: <1557229328.38.0.306180402683.issue36827@roundup.psfhosted.org> Message-ID: <1557249419.01.0.025443413405.issue36827@roundup.psfhosted.org> Alexey Muranov added the comment: Here is an example of code where i got surprised by the current behaviour and had to apply some (ugly) workaround: https://gist.github.com/alexeymuranov/04e2807eb5679ac7e36da4454a58fa7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:18:15 2019 From: report at bugs.python.org (Charlie Clark) Date: Tue, 07 May 2019 17:18:15 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557249495.82.0.630668132787.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: This is the result \issue36792>test.exe -------- The current locale is now: C The time zone is: 'Mitteleurop?ische Sommerzeit' (28 characters) -------- The updated locale is now: de_DE The time zone is: '' (-1 characters) -------- NB something is wrong with that string. Should be Mitteleurop?siche Sommerzeit but that could just be an encoding thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:18:53 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 17:18:53 +0000 Subject: [issue31922] Can't receive replies from multicast UDP with asyncio In-Reply-To: <1509619876.25.0.213398074469.issue31922@psf.upfronthosting.co.za> Message-ID: <1557249533.87.0.255451328451.issue31922@roundup.psfhosted.org> miss-islington added the comment: New changeset 63deaa5b70108ef441c57728322da6b4321db4fc by Miss Islington (bot) (Vincent Michel) in branch 'master': bpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423) https://github.com/python/cpython/commit/63deaa5b70108ef441c57728322da6b4321db4fc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:19:03 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 17:19:03 +0000 Subject: [issue31922] Can't receive replies from multicast UDP with asyncio In-Reply-To: <1509619876.25.0.213398074469.issue31922@psf.upfronthosting.co.za> Message-ID: <1557249543.24.0.834533870062.issue31922@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +13081 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:20:20 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 07 May 2019 17:20:20 +0000 Subject: [issue36828] Cannot install et-xmlfile In-Reply-To: <1557230951.74.0.443191193294.issue36828@roundup.psfhosted.org> Message-ID: <1557249620.61.0.560012937389.issue36828@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I am not sure. Searching on PyPI gives me https://pypi.org/project/et_xmlfile/ and the homepage links to bitbucket repo that seems to be active. I am closing this issue as third party. ---------- resolution: -> third party stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:21:59 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 07 May 2019 17:21:59 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557249719.33.0.4401729224.issue36829@roundup.psfhosted.org> Zackery Spytz added the comment: I am working on this issue. ---------- nosy: +ZackerySpytz title: CLI option to make PyErr_WriteUnraisable abortthe current process -> CLI option to make PyErr_WriteUnraisable abort the current process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:32:48 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 17:32:48 +0000 Subject: [issue11001] Various obvious errors in cookies documentation In-Reply-To: <1295908065.55.0.221906287574.issue11001@psf.upfronthosting.co.za> Message-ID: <1557250368.66.0.0722391143652.issue11001@roundup.psfhosted.org> miss-islington added the comment: New changeset 1fe722cf14db0f786d6df1ff4392f44d37a9f867 by Miss Islington (bot) in branch '3.7': [3.7] bpo-11001: updated cookie docs (GH-13086) (GH-13161) https://github.com/python/cpython/commit/1fe722cf14db0f786d6df1ff4392f44d37a9f867 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:34:46 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 17:34:46 +0000 Subject: [issue11001] Various obvious errors in cookies documentation In-Reply-To: <1295908065.55.0.221906287574.issue11001@psf.upfronthosting.co.za> Message-ID: <1557250486.88.0.827491165625.issue11001@roundup.psfhosted.org> Gregory P. Smith added the comment: Thanks Julia! ---------- nosy: +gregory.p.smith resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:42:57 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 07 May 2019 17:42:57 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557250977.29.0.607304602083.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: Thanks again! I will have some more tests for you to try tomorrow as I am out of time for today. I'm currently of the belief that there is something Python is going to have to do to work around an issue within the CRT, but more testing will prove that theory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:42:59 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 17:42:59 +0000 Subject: [issue27432] Unittest truncating of error message not works In-Reply-To: <1467365269.89.0.517880663648.issue27432@psf.upfronthosting.co.za> Message-ID: <1557250979.87.0.347294726961.issue27432@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: Mariatta -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:45:58 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 17:45:58 +0000 Subject: [issue31922] Can't receive replies from multicast UDP with asyncio In-Reply-To: <1509619876.25.0.213398074469.issue31922@psf.upfronthosting.co.za> Message-ID: <1557251158.84.0.415635760693.issue31922@roundup.psfhosted.org> miss-islington added the comment: New changeset 19ca5b500af4b66e1082a03d8fbf448e1f56af30 by Miss Islington (bot) in branch '3.7': bpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423) https://github.com/python/cpython/commit/19ca5b500af4b66e1082a03d8fbf448e1f56af30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:49:38 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 17:49:38 +0000 Subject: [issue27432] Unittest truncating of error message not works In-Reply-To: <1467365269.89.0.517880663648.issue27432@psf.upfronthosting.co.za> Message-ID: <1557251378.0.0.324393533996.issue27432@roundup.psfhosted.org> Gregory P. Smith added the comment: safe_repr() as used internally by unittest wasn't intended to truncate by default as part of its "safety". The "safe" part is that it catches Exception and provides an alternate repr if the __repr__ raised. unittest.util.safe_repr() is a public API, just not documented. Lets take this issue to enhance it a bit and document it. Additionally as r.david.murray suggested, a way for unittest.TestCase to configure itself to enable safe_repr truncation by default would be nice. I'm currently thinking a feature similar to the class variable maxDiff. maxReprLength perhaps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 13:52:20 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 17:52:20 +0000 Subject: [issue27432] Support unittest assertion truncation of repr in error messages In-Reply-To: <1467365269.89.0.517880663648.issue27432@psf.upfronthosting.co.za> Message-ID: <1557251540.39.0.822164041941.issue27432@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- title: Unittest truncating of error message not works -> Support unittest assertion truncation of repr in error messages _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:11:52 2019 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 07 May 2019 18:11:52 +0000 Subject: [issue27497] csv module: Add return value to DictWriter.writeheader In-Reply-To: <1468336448.04.0.83850338242.issue27497@psf.upfronthosting.co.za> Message-ID: <1557252712.42.0.816467255594.issue27497@roundup.psfhosted.org> Skip Montanaro added the comment: I think this is ready to go. I added a comment to PR12306. As I am no longer a committer, I'm not sure what the next step is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:34:43 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 07 May 2019 18:34:43 +0000 Subject: [issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb' In-Reply-To: <1330513271.31.0.437438851478.issue14156@psf.upfronthosting.co.za> Message-ID: <1557254083.36.0.545069283573.issue14156@roundup.psfhosted.org> Change by Josh Rosenberg : ---------- pull_requests: +13082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:43:08 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Tue, 07 May 2019 18:43:08 +0000 Subject: [issue36836] Test Suite not working on 3.4, 3.5 on MacOS Mojave In-Reply-To: <1557246003.67.0.167148241592.issue36836@roundup.psfhosted.org> Message-ID: <1557254588.53.0.111183058078.issue36836@roundup.psfhosted.org> Sanyam Khurana added the comment: I had to clean-up my build a bit, and it seems like it's not really happening on 3.6, but it is still an issue with 3.4, 3.5, etc. I've added a PR for 3.5 to resolve the issue. ---------- assignee: -> CuriousLearner title: Test Suite not working on 3.4, 3.5, 3.6, 3.7 on MacOS Mojave -> Test Suite not working on 3.4, 3.5 on MacOS Mojave versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:44:10 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Tue, 07 May 2019 18:44:10 +0000 Subject: [issue36836] Test Suite not working on 3.4, 3.5 on MacOS Mojave In-Reply-To: <1557246003.67.0.167148241592.issue36836@roundup.psfhosted.org> Message-ID: <1557254650.17.0.0397558251261.issue36836@roundup.psfhosted.org> Change by Sanyam Khurana : ---------- keywords: +patch pull_requests: +13083 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:51:15 2019 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 07 May 2019 18:51:15 +0000 Subject: [issue31783] Race condition in ThreadPoolExecutor when scheduling new jobs while the interpreter shuts down In-Reply-To: <1507930035.71.0.213398074469.issue31783@psf.upfronthosting.co.za> Message-ID: <1557255075.8.0.641381100936.issue31783@roundup.psfhosted.org> Brian Quinlan added the comment: Great report Steven! I was able to reproduce this with the attached patch (just adds some sleeps and prints) and this script: from threading import current_thread from concurrent.futures import ThreadPoolExecutor from time import sleep pool = ThreadPoolExecutor(100) def f(): print("I'm running in: ", current_thread().name) def g(): print("I'm running in: ", current_thread().name) for _ in range(100): pool.submit(f) sleep(0.1) pool.submit(g) sleep(1.5) The output for me was: ? Creating new thread: ThreadPoolExecutor-0_0 I'm running in: ThreadPoolExecutor-0_0 Setting _shutdown ? Killing 1 workers ? ? Creating new thread: ThreadPoolExecutor-0_1 I'm running in: ThreadPoolExecutor-0_1 So another thread was created *after* shutdown. It seems like the most obvious way to fix this is by adding a lock for the global _shutdown variable. ---------- keywords: +patch Added file: https://bugs.python.org/file48311/find-race.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:52:07 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 07 May 2019 18:52:07 +0000 Subject: [issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb' In-Reply-To: <1330513271.31.0.437438851478.issue14156@psf.upfronthosting.co.za> Message-ID: <1557255127.48.0.146175661753.issue14156@roundup.psfhosted.org> Josh Rosenberg added the comment: I've created PR13165 to address this bug. It's 99% test updates; the actual code changes to argparse.py are trivial and should be equally trivial to review. The only functional change beyond Moritz's proposal is that I added support for having accepting '-' when the mode string uses 'a' or 'x' instead of 'w'; for sys.stdout, they're all effectively equivalent ('x' is trying to prevent stomping an existing file, which borrowing sys.stdout won't do, and sys.stdout is already more closely equivalent to mode 'a' in any event). No working code should break as a result of that change (passing 'a' or 'x' previously just caused FileType to exit immediately with a ValueError, which in turn caused parse_args to kill the program, which I'm assuming isn't considered a valuable "feature"). In addition to testing binary mode with argument '-' properly, I also added complete test cases for mode 'x' and 'xb' (for all arguments, both file names and '-') since we had no such tests, and ensuring exclusive creation mode behaves correctly is fairly important. ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:52:36 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 18:52:36 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1557255156.85.0.622057231946.issue36533@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:55:03 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 07 May 2019 18:55:03 +0000 Subject: [issue35723] Add "time zone index" cache to datetime objects In-Reply-To: <1547238857.17.0.663234077571.issue35723@roundup.psfhosted.org> Message-ID: <1557255303.92.0.271208553503.issue35723@roundup.psfhosted.org> Change by Paul Ganssle : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:55:39 2019 From: report at bugs.python.org (Brian McCutchon) Date: Tue, 07 May 2019 18:55:39 +0000 Subject: [issue36395] Add deferred single-threaded/fake executor to concurrent.futures In-Reply-To: <1553218760.85.0.609828298764.issue36395@roundup.psfhosted.org> Message-ID: <1557255339.36.0.874488427333.issue36395@roundup.psfhosted.org> Brian McCutchon added the comment: No, I do not have such an example, as most of my tests try to fake the executors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:58:31 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 18:58:31 +0000 Subject: [issue35125] asyncio shield: remove inner callback on outer cancellation In-Reply-To: <1540999121.33.0.788709270274.issue35125@psf.upfronthosting.co.za> Message-ID: <1557255511.95.0.429269413871.issue35125@roundup.psfhosted.org> miss-islington added the comment: New changeset b35acc5b3a0148c5fd4462968b310fb436726d5a by Miss Islington (bot) (Romain Picard) in branch 'master': bpo-35125: remove inner callback on outer cancellation in asyncio shield (GH-10340) https://github.com/python/cpython/commit/b35acc5b3a0148c5fd4462968b310fb436726d5a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 14:58:36 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 18:58:36 +0000 Subject: [issue35125] asyncio shield: remove inner callback on outer cancellation In-Reply-To: <1540999121.33.0.788709270274.issue35125@psf.upfronthosting.co.za> Message-ID: <1557255516.14.0.582193882354.issue35125@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13084 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:01:04 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 07 May 2019 19:01:04 +0000 Subject: [issue36836] Test Suite not working on 3.4, 3.5 on MacOS Mojave In-Reply-To: <1557246003.67.0.167148241592.issue36836@roundup.psfhosted.org> Message-ID: <1557255664.95.0.75856518089.issue36836@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi, I have discussed with @CuriousLearner and now he is aware that 3.5 and 3.6 are in security mode and not in bugfix mode. I remove 3.5 from the list, he is checking if there is an issue on 3.7 and master. ---------- nosy: +matrixise versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:03:43 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 19:03:43 +0000 Subject: [issue31200] address sanitizer build fails In-Reply-To: <1502702493.31.0.645434199194.issue31200@psf.upfronthosting.co.za> Message-ID: <1557255823.78.0.494693684211.issue31200@roundup.psfhosted.org> Julien Palard added the comment: Tried to reproduce it again, on master, but this does no longer segfault nor report leakages (as long as I use __INSURE__ using make -j18 profile-opt CFLAGS='-D__INSURE__') nor fail at build time. There's still a few memory warnings while running tests (subinterpreters and things). So I'm closing this (no build issue), thanks for reporting. ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:05:59 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 07 May 2019 19:05:59 +0000 Subject: [issue35125] asyncio shield: remove inner callback on outer cancellation In-Reply-To: <1540999121.33.0.788709270274.issue35125@psf.upfronthosting.co.za> Message-ID: <1557255959.64.0.617303042196.issue35125@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:06:55 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Tue, 07 May 2019 19:06:55 +0000 Subject: [issue36836] Test Suite not working on 3.4, 3.5 on MacOS Mojave In-Reply-To: <1557246003.67.0.167148241592.issue36836@roundup.psfhosted.org> Message-ID: <1557256015.64.0.765381110811.issue36836@roundup.psfhosted.org> Sanyam Khurana added the comment: The issue does not seem to be on 3.7 and master branch, so I'm closing the bug as well as the pull request. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:09:11 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 07 May 2019 19:09:11 +0000 Subject: [issue35924] curses segfault resizing window In-Reply-To: <1549497741.38.0.310308715457.issue35924@roundup.psfhosted.org> Message-ID: <1557256151.67.0.312308546471.issue35924@roundup.psfhosted.org> Toshio Kuratomi added the comment: I'm still debugging this but it may be an off-by-one error in ncurses, wresize.c. I've found that if I modify the following section in ncurses, our problem goes away: /* * Dispose of unwanted memory. */ if (!(win->_flags & _SUBWIN)) { if (ToCols == size_x) { for (row = ToLines + 1; row <= size_y; row++) { free(win->_line[row].text); } } else { for (row = 0; row <= size_y; row++) { free(win->_line[row].text); } } } free(win->_line); win->_line = new_lines; Replacing: for (row = ToLines + 1; row <= size_y; row++) { with: for (row = ToLines + 2; row <= size_y; row++) { fixes this error. ToLines is a parameter passed in to wresize. wresize will reuse ToLines number of rows from the old structure in the new structure. Due to that, I think that the chances are good that it is ncurses which is at fault here. I will try to rewrite the test case into a C program and then submit a bug report to ncurses upstream. I'm not sure that there's a way we can work around this until that's fixed. ---------- nosy: +a.badger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:11:49 2019 From: report at bugs.python.org (Roundup Robot) Date: Tue, 07 May 2019 19:11:49 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557256309.21.0.563884958428.issue27639@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13085 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:18:40 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 19:18:40 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1557256720.06.0.817138051229.issue36533@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +13086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:20:16 2019 From: report at bugs.python.org (Ryan Avery) Date: Tue, 07 May 2019 19:20:16 +0000 Subject: [issue36823] shutil.copytree copies directories and files but fails with that same directory with '[Errno 1] Operation not permitted') In-Reply-To: <1557219673.76.0.0299349666148.issue36823@roundup.psfhosted.org> Message-ID: Ryan Avery added the comment: I'm actually not sure what the expected behavior would be, because I can use the os module to copy, rename, and remove files and folders in this mounted File Share. Before encountering this error, I would expect shutil to do the same. But since this error comes up it would make more sense for shutil to not copy anything. Here are the permissions for the mounted directory, which is "." drwxrwxrwx 2 root root 0 May 3 17:44 . drwxr-xr-x 4 root root 4096 May 3 17:57 .. drwxrwxrwx 2 root root 0 Apr 8 22:07 external drwxrwxrwx 2 root root 0 May 7 00:16 landsat-1024-cp drwxrwxrwx 2 root root 0 Apr 8 23:02 regional_annotation_projects drwxrwxrwx 2 root root 0 May 3 21:08 results drwxrwxrwx 2 root root 0 May 3 03:53 western_nebraska_landsat_scenes On Tue, May 7, 2019 at 2:01 AM Windson Yang wrote: > > Windson Yang added the comment: > > Just to make sure, the expected behavior would be the items should not be > copied because of the permission and the error messages above, right? > > ---------- > nosy: +Windson Yang > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:20:55 2019 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 07 May 2019 19:20:55 +0000 Subject: [issue31783] Race condition in ThreadPoolExecutor when scheduling new jobs while the interpreter shuts down In-Reply-To: <1507930035.71.0.213398074469.issue31783@psf.upfronthosting.co.za> Message-ID: <1557256855.61.0.40739049634.issue31783@roundup.psfhosted.org> Brian Quinlan added the comment: I think that ProcessPoolExecutor might have a similar race condition - but not in exactly this code path since it would only be with the queue management thread (which is only started once). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:23:56 2019 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 07 May 2019 19:23:56 +0000 Subject: [issue31783] Race condition in ThreadPoolExecutor when scheduling new jobs while the interpreter shuts down In-Reply-To: <1507930035.71.0.213398074469.issue31783@psf.upfronthosting.co.za> Message-ID: <1557257036.12.0.240684367657.issue31783@roundup.psfhosted.org> Change by Brian Quinlan : ---------- pull_requests: +13087 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:28:10 2019 From: report at bugs.python.org (Bar Harel) Date: Tue, 07 May 2019 19:28:10 +0000 Subject: [issue36813] QueueListener not calling task_done upon termination In-Reply-To: <1557155039.79.0.434860875914.issue36813@roundup.psfhosted.org> Message-ID: <1557257290.84.0.732112283019.issue36813@roundup.psfhosted.org> Bar Harel added the comment: Alright. Regression tests added, all tests pass. Patch ready for upload! ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:37:17 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 19:37:17 +0000 Subject: [issue36838] running 'make html' from the Doc tree emits an unwelcoming error message Message-ID: <1557257837.73.0.0332753639305.issue36838@roundup.psfhosted.org> New submission from Gregory P. Smith : Running make in the Doc directory does not install all necessary tooling on its own. This is a hurdle to getting beginners up to speed on making documentation changes (often their very first changes in the CPython project). ``` :~/oss/cpython/throwaway:master$ make -C Doc html make: Entering directory '/.../oss/cpython/throwaway/Doc' mkdir -p build Building NEWS from Misc/NEWS.d with blurb /bin/sh: line 5: blurb: command not found Makefile:44: recipe for target 'build' failed make: *** [build] Error 127 make: Leaving directory '/.../oss/cpython/throwaway/Doc' ``` Doc builders need to run `make -C Doc venv` first. Just updating the logic to print that as an error message when the venv or any of the necessary tools within it are missing would be more welcoming. ---------- components: Build messages: 341806 nosy: gregory.p.smith priority: normal severity: normal status: open title: running 'make html' from the Doc tree emits an unwelcoming error message type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:38:03 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 19:38:03 +0000 Subject: [issue35125] asyncio shield: remove inner callback on outer cancellation In-Reply-To: <1540999121.33.0.788709270274.issue35125@psf.upfronthosting.co.za> Message-ID: <1557257882.99.0.696015707575.issue35125@roundup.psfhosted.org> miss-islington added the comment: New changeset 299f69c24c5f0fcfea0b7385b0da661cda78df19 by Miss Islington (bot) in branch '3.7': bpo-35125: remove inner callback on outer cancellation in asyncio shield (GH-10340) https://github.com/python/cpython/commit/299f69c24c5f0fcfea0b7385b0da661cda78df19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 15:56:26 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 07 May 2019 19:56:26 +0000 Subject: [issue36839] Support the buffer protocol in code objects Message-ID: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> New submission from Dino Viehland : Many Python deployments involve large code based that are used in scenarios where processes are fork-and-exec'd. When running in these environments code objects can end up occupying a lot of memory. Because the code objects are on random pages and are ref counted the ref counts can cause all of the code to not be shared across processes. If code objects supported the buffer protocol it would be possible to load code from a memory mapped file which is shared across all of the processes. ---------- assignee: dino.viehland components: Interpreter Core messages: 341808 nosy: dino.viehland priority: normal severity: normal stage: needs patch status: open title: Support the buffer protocol in code objects type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:04:36 2019 From: report at bugs.python.org (Daniel Fortunov) Date: Tue, 07 May 2019 20:04:36 +0000 Subject: [issue36824] Refactor str tests to reflect that str and unicode are merged in Python 3 In-Reply-To: <1557211073.23.0.0911127825046.issue36824@roundup.psfhosted.org> Message-ID: <1557259476.88.0.318736045772.issue36824@roundup.psfhosted.org> Change by Daniel Fortunov : ---------- keywords: +patch pull_requests: +13088 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:05:57 2019 From: report at bugs.python.org (Daniel Fortunov) Date: Tue, 07 May 2019 20:05:57 +0000 Subject: [issue36824] Refactor str tests to reflect that str and unicode are merged in Python 3 In-Reply-To: <1557211073.23.0.0911127825046.issue36824@roundup.psfhosted.org> Message-ID: <1557259557.01.0.172013623656.issue36824@roundup.psfhosted.org> Daniel Fortunov added the comment: PS opened here: https://github.com/python/cpython/pull/13172 I've tried to break down the changes into individual steps, with justification in commit messages. Happy to collapse these down into fewer commits before merge if preferred. I haven't done the "Promote tests from the current `UnicodeTest` class to `CommonTest`" portion yet, but I'm running out of sprint time so I wanted to submit what I have. I believe these changes are suitable for merge to master, but keen to hear feedback :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:08:39 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 20:08:39 +0000 Subject: [issue31589] Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters? In-Reply-To: <1506416349.22.0.925737411431.issue31589@psf.upfronthosting.co.za> Message-ID: <1557259719.39.0.296939329324.issue31589@roundup.psfhosted.org> Julien Palard added the comment: The download links are now working, EWDurbin upgraded the servers and it solved a few issues, also now when a build fail we do no longer erase the old PDF, so the links should always work. Thanks for reporting and don't hesistate to open a new issue if problem happen again (but maybe on the https://github.com/python/docsbuild-scripts/ issue tracker). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:09:43 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 20:09:43 +0000 Subject: [issue36838] running 'make html' from the Doc tree emits an unwelcoming error message In-Reply-To: <1557257837.73.0.0332753639305.issue36838@roundup.psfhosted.org> Message-ID: <1557259783.4.0.372896987067.issue36838@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:10:06 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 07 May 2019 20:10:06 +0000 Subject: [issue36840] Add stream.abort() async method Message-ID: <1557259806.05.0.192162125401.issue36840@roundup.psfhosted.org> New submission from Andrew Svetlov : It should call underlying `transport.abort()`, then wait for closing event (`await self.wait_closed()`) ---------- components: asyncio messages: 341811 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Add stream.abort() async method versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:13:54 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 20:13:54 +0000 Subject: [issue36830] Typo in collections.deque In-Reply-To: <1557233592.36.0.483652950266.issue36830@roundup.psfhosted.org> Message-ID: <1557260034.08.0.37889252813.issue36830@roundup.psfhosted.org> Julien Palard added the comment: I reopened the issue on the ja tracker: https://github.com/python/python-docs-ja/issues/20 and I'm closing it here. Thanks a lot keroru for reporting! ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:15:52 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 07 May 2019 20:15:52 +0000 Subject: [issue36840] Add stream.abort() async method In-Reply-To: <1557259806.05.0.192162125401.issue36840@roundup.psfhosted.org> Message-ID: <1557260152.23.0.985551261563.issue36840@roundup.psfhosted.org> Yury Selivanov added the comment: If we're just calling socket.close(), then what's the point of waiting for connection_lost? (I remember us discussing this, but I don't quite remember the details). Usually .abort() is a synchronous method, which kind of signals that "i want to close this immediately and I don't care what happens to it". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:16:08 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 20:16:08 +0000 Subject: [issue36838] running 'make html' from the Doc tree emits an unwelcoming error message In-Reply-To: <1557257837.73.0.0332753639305.issue36838@roundup.psfhosted.org> Message-ID: <1557260168.22.0.394332174142.issue36838@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +13089 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:22:02 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 07 May 2019 20:22:02 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557260522.78.0.569584057901.issue36829@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13090 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:25:20 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 20:25:20 +0000 Subject: [issue32275] SSL socket methods don't retry on EINTR? In-Reply-To: <1512989105.2.0.213398074469.issue32275@psf.upfronthosting.co.za> Message-ID: <1557260720.63.0.912689058188.issue32275@roundup.psfhosted.org> Change by Julien Palard : ---------- nosy: -mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:28:59 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 20:28:59 +0000 Subject: [issue36838] running 'make html' from the Doc tree emits an unwelcoming error message In-Reply-To: <1557257837.73.0.0332753639305.issue36838@roundup.psfhosted.org> Message-ID: <1557260939.07.0.566976855484.issue36838@roundup.psfhosted.org> Gregory P. Smith added the comment: I noted this at the mentored sprints this year when I suggested my mentee "cd Doc ; make html" to show them how to build the docs, check that they build and see what they look like. Once upon a time we used to auto-fetch and install sphinx (long ago?), this appears to have changed to make venv. This PR at least tells people what to do. Having the build file auto create the venv is... not quite desired. The way the Makefile is setup, it'll all still work if people have a late enough blurb and sphinx-build on their PATH. if we auto install the venv, those installed tools will override _both_ of those so if someone _wanted_ the version on their PATH for some reason it would override that (... i really don't recommend it but i'm not gonna break this for blurb or sphinx developers who may like this). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:29:47 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 20:29:47 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1557260987.02.0.632340522755.issue36533@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 3b4b28efbde63502709bede7c5f9403ec6f37428 by Gregory P. Smith in branch '3.7': [3.7] bpo-36533: Reinit logging.Handler locks on fork(). (GH-12704) (GH-13170) https://github.com/python/cpython/commit/3b4b28efbde63502709bede7c5f9403ec6f37428 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:32:05 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 20:32:05 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1557261125.71.0.218165792671.issue36533@roundup.psfhosted.org> Gregory P. Smith added the comment: The regression should be fixed. It'd be helpful if owners of applications that were running into this could test their applications with this specific change. ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:32:33 2019 From: report at bugs.python.org (Mitar) Date: Tue, 07 May 2019 20:32:33 +0000 Subject: [issue36841] Supporting customization of float encoding in JSON Message-ID: <1557261153.38.0.171143852563.issue36841@roundup.psfhosted.org> New submission from Mitar : Currently, there is only one argument which allows customization how float numbers are encoded in JSON: allow_nan. But this does not allow one to hook into the encoding of floating points really. The JSONEncoder is not called for float numbers. The motivation here is that we would like to encode NaN and Infinity values differently, instead of non-standard approach and instead of raising an exception. The "load" counterpart has "parse_float" which one can use to hook into parsing floats. I would suggest something similar, maybe "encode_float" which if provided would be used instead of the default. ---------- components: Library (Lib) messages: 341817 nosy: mitar priority: normal severity: normal status: open title: Supporting customization of float encoding in JSON _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:35:14 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 07 May 2019 20:35:14 +0000 Subject: [issue36841] Supporting customization of float encoding in JSON In-Reply-To: <1557261153.38.0.171143852563.issue36841@roundup.psfhosted.org> Message-ID: <1557261314.19.0.712307041952.issue36841@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +ezio.melotti, rhettinger type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:42:36 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 20:42:36 +0000 Subject: [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1557261756.28.0.282246762043.issue20709@roundup.psfhosted.org> Julien Palard added the comment: Closing this issue, it has been fixed a year ago, thanks Jan-Philip for reporting, St?phane for fixing, and everybody! \o/ \o/ ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:48:32 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 07 May 2019 20:48:32 +0000 Subject: [issue36842] Implement PEP 578 Message-ID: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> New submission from Steve Dower : Implement PEP 578 ---------- assignee: steve.dower messages: 341819 nosy: christian.heimes, steve.dower priority: normal pull_requests: 13091 severity: normal stage: patch review status: open title: Implement PEP 578 type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:53:22 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 20:53:22 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557262402.15.0.362743368779.issue36801@roundup.psfhosted.org> miss-islington added the comment: New changeset 1cc0ee7d9f6a2817918fafd24c18d8bb093a85d3 by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098) https://github.com/python/cpython/commit/1cc0ee7d9f6a2817918fafd24c18d8bb093a85d3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:53:31 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 20:53:31 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557262411.11.0.00501516558104.issue36801@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:56:33 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 07 May 2019 20:56:33 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1557262593.08.0.160115335395.issue36839@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +13093 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 16:59:51 2019 From: report at bugs.python.org (Robert Boehne) Date: Tue, 07 May 2019 20:59:51 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers Message-ID: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> New submission from Robert Boehne : build fails with: ./python -E ../../Python-3.7.3/setup.py build Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python ---------- components: Build messages: 341821 nosy: Robert Boehne priority: normal severity: normal status: open title: AIX build fails with failure to get random numbers type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:00:29 2019 From: report at bugs.python.org (Robert Boehne) Date: Tue, 07 May 2019 21:00:29 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557262829.81.0.959754747074.issue36843@roundup.psfhosted.org> Robert Boehne added the comment: robb at nepal:/raid/checkouts-raid/robb/nepal/build-py37$ gmake xlc_r -c -DNDEBUG -O -q64 -qlanglvl=extc99 -IObjects -IInclude -IPython -I. -I../../Python-3.7.3/Include -I/raid/checkouts-raid/robb/Python-2.7.15/Modules/zlib -DPy_BUILD_CORE -o Modules/_math.o ../../Python-3.7.3/Modules/_math.c LIBPATH=/raid/checkouts-raid/robb/nepal/build-py37 CC='xlc_r' LDSHARED='Modules/ld_so_aix xlc_r -bI:Modules/python.exp -L/raid/checkouts-raid/robb/zlib-dl/Release/rs6000aix_64/lib -Wl,-blibpath:/opt/IBM/xlmass/8.1.3/lib/aix61:/opt/IBM/xlc/13.1.3/lib:/usr/lib:/lib:/opt/Python-3.7/lib -q64 ' OPT='-DNDEBUG -O' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python -E ../../Python-3.7.3/setup.py build Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python Makefile:626: recipe for target 'sharedmods' failed gmake: *** [sharedmods] Error 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:01:04 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 07 May 2019 21:01:04 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1557262864.72.0.734708026189.issue34616@roundup.psfhosted.org> Andrew Svetlov added the comment: Matthias, please use GH-13148 for pointing on github pull requests. #xxxx is for links to this tracker issues. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:03:53 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 21:03:53 +0000 Subject: [issue36838] running 'make html' from the Doc tree emits an unwelcoming error message In-Reply-To: <1557257837.73.0.0332753639305.issue36838@roundup.psfhosted.org> Message-ID: <1557263033.54.0.953201070882.issue36838@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 3918ad6b45da31e05265de5a455102276717c659 by Gregory P. Smith in branch 'master': bpo-36838: Suggest 'make venv' when missing Doc/ tools. (GH-13173) https://github.com/python/cpython/commit/3918ad6b45da31e05265de5a455102276717c659 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:04:44 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 May 2019 21:04:44 +0000 Subject: [issue36838] running 'make html' from the Doc tree emits an unwelcoming error message In-Reply-To: <1557257837.73.0.0332753639305.issue36838@roundup.psfhosted.org> Message-ID: <1557263084.02.0.25575568521.issue36838@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:05:56 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 07 May 2019 21:05:56 +0000 Subject: [issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls) In-Reply-To: <1555752054.75.0.256314796752.issue36674@roundup.psfhosted.org> Message-ID: <1557263156.42.0.299414993819.issue36674@roundup.psfhosted.org> Change by Lisa Roach : ---------- keywords: +patch pull_requests: +13094 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:07:15 2019 From: report at bugs.python.org (Ivan Pozdeev) Date: Tue, 07 May 2019 21:07:15 +0000 Subject: [issue35723] Add "time zone index" cache to datetime objects In-Reply-To: <1547238857.17.0.663234077571.issue35723@roundup.psfhosted.org> Message-ID: <1557263235.17.0.953154397304.issue35723@roundup.psfhosted.org> Ivan Pozdeev added the comment: > which unfortunately use `is` to determine whether two datetimes are in the same zone or not This sounds like a bug. Whether a tzinfo is a constant from a predefined set or something with a smart comparison semantic is none of datetime's business. ---------- nosy: +Ivan.Pozdeev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:08:52 2019 From: report at bugs.python.org (Jason Madden) Date: Tue, 07 May 2019 21:08:52 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557263332.71.0.103351923848.issue36843@roundup.psfhosted.org> Change by Jason Madden : ---------- nosy: +jmadden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:10:42 2019 From: report at bugs.python.org (Michael Blahay) Date: Tue, 07 May 2019 21:10:42 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1557263442.04.0.183290629047.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: Ryan, what are the exact steps to reproduce the problem? This is what I get when I run the code you included: >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser.add_argument('things', nargs=argparse.REMAINDER, default=['nothing']) _StoreAction(option_strings=[], dest='things', nargs='...', const=None, default=['nothing'], type=None, choices=None, help=None, metavar=None) >>> parser.parse_args([]) Namespace(things=[]) >>> Namespace(things=[]) Traceback (most recent call last): File "", line 1, in NameError: name 'Namespace' is not defined ---------- nosy: +mblahay _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:11:03 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 07 May 2019 21:11:03 +0000 Subject: [issue36844] abiflag `m` is no longer showing when compiled with --enable-shared Message-ID: <1557263463.69.0.218039156148.issue36844@roundup.psfhosted.org> New submission from Anthony Sottile : This appears to be a regression between 3.8a3 and 3.8a4 -- though it may be intentional and I'm missing something? I noticed this while packaging 3.8 for deadsnakes https://github.com/deadsnakes/python3.8 I've created a minimal reproduction: $ git checkout v3.8.0a4 && git clean -fxfd && ./configure --enable-shared && make -j4 && ls *.so build/lib*/*sysconfigdata* ... build/lib.linux-x86_64-3.8/_sysconfigdata__linux_x86_64-linux-gnu.py libpython3.8.so libpython3.so $ git checkout v3.8.0a3 && git clean -fxfd && ./configure --enable-shared && make -j4 && ls *.so build/lib*/*sysconfigdata* ... build/lib.linux-x86_64-3.8/_sysconfigdata_m_linux_x86_64-linux-gnu.py libpython3.8m.so libpython3.so Notice how the abiflag in sysconfigdata in 3.8a3 is 'm' but in 3.8a4 it is '' My WAG at the relevant patch is 8c3ecc6bacc8d0cd534f2b5b53ed962dd1368c7b ---------- components: Build messages: 341827 nosy: Anthony Sottile priority: normal severity: normal status: open title: abiflag `m` is no longer showing when compiled with --enable-shared versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:20:04 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 07 May 2019 21:20:04 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557264004.01.0.960528717093.issue36843@roundup.psfhosted.org> Christian Heimes added the comment: Could you please use a debugger and step through _Py_HashRandomization_Init and pyurandom to see, where the initialization of the RNG is failing? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:21:25 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 21:21:25 +0000 Subject: [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1557264085.87.0.220950300307.issue24712@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +13095 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:23:06 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 21:23:06 +0000 Subject: [issue32393] nav menu jitter in old documentation In-Reply-To: <1513810852.69.0.213398074469.issue32393@psf.upfronthosting.co.za> Message-ID: <1557264186.71.0.0312129736416.issue32393@roundup.psfhosted.org> Julien Palard added the comment: I'm closing this as a duplicate of https://bugs.python.org/issue24712, for which I opened a pull request. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Docs page's sidebar vibrates on mouse wheel scroll on Chrome. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:26:56 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 07 May 2019 21:26:56 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1557264416.66.0.962496474889.issue36839@roundup.psfhosted.org> Change by Dino Viehland : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:26:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 May 2019 21:26:56 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557264416.8.0.474969208808.issue36843@roundup.psfhosted.org> STINNER Victor added the comment: Try to compress config.log to attach it. Or at least attach the output of "./configure" as a file. I'm looking for HAVE_GETRANDOM, HAVE_GETRANDOM_SYSCALL, HAVE_GETENTROPY defines that you can find in pyconfig.h. About /dev/urandom: does this device exist? Is your user allowed to read from it? For example, run "dd if=/dev/urandom of=random bs=1 count=1" command: does it fail? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:28:27 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 07 May 2019 21:28:27 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557264507.92.0.612829245835.issue36801@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:29:25 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 07 May 2019 21:29:25 +0000 Subject: [issue33948] doc truncated lines in PDF In-Reply-To: <1529772775.32.0.56676864532.issue33948@psf.upfronthosting.co.za> Message-ID: <1557264565.01.0.339936079607.issue33948@roundup.psfhosted.org> Julien Palard added the comment: We recentrly upgraded our PDF build toolchain and I don't see it happen again. Don't hesitate to reopen if you find another occurence of it. Thanks for reporting! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:32:40 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 07 May 2019 21:32:40 +0000 Subject: [issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls) In-Reply-To: <1555752054.75.0.256314796752.issue36674@roundup.psfhosted.org> Message-ID: <1557264760.22.0.995989237905.issue36674@roundup.psfhosted.org> Change by Lisa Roach : ---------- pull_requests: +13096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:33:10 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 07 May 2019 21:33:10 +0000 Subject: [issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls) In-Reply-To: <1555752054.75.0.256314796752.issue36674@roundup.psfhosted.org> Message-ID: <1557264790.89.0.167847972566.issue36674@roundup.psfhosted.org> Change by Lisa Roach : ---------- pull_requests: -13094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:36:42 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 07 May 2019 21:36:42 +0000 Subject: [issue36015] streamhandler cannot represent streams with an integer as name In-Reply-To: <1550431224.14.0.504793638163.issue36015@roundup.psfhosted.org> Message-ID: <1557265002.4.0.495104096594.issue36015@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset ca87eebb22d202c33f3317cbf85059cadc64fa9f by Vinay Sajip (Riccardo Magliocchetti) in branch 'master': bpo-36015: Handle StreamHandler representaton of stream with an integer name (GH-11908) https://github.com/python/cpython/commit/ca87eebb22d202c33f3317cbf85059cadc64fa9f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:41:08 2019 From: report at bugs.python.org (Mark Shannon) Date: Tue, 07 May 2019 21:41:08 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557265268.92.0.904937591327.issue27639@roundup.psfhosted.org> Mark Shannon added the comment: New changeset b1c3167c232c36ed3543ca351ff10c613639b5f5 by Mark Shannon (Michael Blahay) in branch 'master': bpo-27639: Correct return type for UserList slicing operation (#13169) https://github.com/python/cpython/commit/b1c3167c232c36ed3543ca351ff10c613639b5f5 ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:41:18 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 21:41:18 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557265278.18.0.830557963864.issue27639@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13097 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 17:48:39 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 07 May 2019 21:48:39 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557265719.39.0.758753028961.issue36801@roundup.psfhosted.org> miss-islington added the comment: New changeset 93aa57ac6594d1cc30d147720fc8a7a4e1ca2d3e by Miss Islington (bot) in branch '3.7': bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098) https://github.com/python/cpython/commit/93aa57ac6594d1cc30d147720fc8a7a4e1ca2d3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 18:13:30 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 07 May 2019 22:13:30 +0000 Subject: [issue36707] The "m" ABI flag of SOABI for pymalloc is no longer needed In-Reply-To: <1556065645.57.0.820338293941.issue36707@roundup.psfhosted.org> Message-ID: <1557267210.11.0.720054505058.issue36707@roundup.psfhosted.org> Miro Hron?ok added the comment: > But the impact of the change should probably also be discussed with at least some of the large distributors. Adapting the Fedora package. Will try to mass rebuild our packages to see what breaks. ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 18:14:54 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 07 May 2019 22:14:54 +0000 Subject: [issue36840] Add stream.abort() async method In-Reply-To: <1557259806.05.0.192162125401.issue36840@roundup.psfhosted.org> Message-ID: <1557267294.3.0.511469123493.issue36840@roundup.psfhosted.org> Andrew Svetlov added the comment: The reason is: until connection_lost() is called the transport is in the active state. Destruction of closing-but-not-closed-yet trasport raises a ResourceWarning. Plain TCP socket calls connection_lost() on the next loop iteration after .abort() call. SSL transport seems to do the same but in general it can require a few extra loop iterations. Better to make `stream.abort()` async function to avoid problems in the future. Otherwise, you always have to write stream.abort() await stream.wait_closed() which I consider a bad API ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 18:33:50 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 07 May 2019 22:33:50 +0000 Subject: [issue36844] abiflag `m` is no longer showing when compiled with --enable-shared In-Reply-To: <1557263463.69.0.218039156148.issue36844@roundup.psfhosted.org> Message-ID: <1557268430.06.0.82363952576.issue36844@roundup.psfhosted.org> Anthony Sottile added the comment: +vstinner Hmmm, actually the relevant commit appears to be 6c44fde3e03079e0c69f823dafbe04af50b5bd0d and intentional (I ran a git bisect to find this!) https://github.com/python/cpython/pull/12931 Does PEP 3149 require an update with this change, it still mentions --with-pymalloc and the `m` abi flag: https://www.python.org/dev/peps/pep-3149/ ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 18:41:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 May 2019 22:41:45 +0000 Subject: [issue31589] Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters? In-Reply-To: <1557259719.39.0.296939329324.issue31589@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: Thanks Julien for taking care of the documentation :-) It is good to have you aboard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 18:53:58 2019 From: report at bugs.python.org (Nicolai Moore) Date: Tue, 07 May 2019 22:53:58 +0000 Subject: [issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen Message-ID: <1557269638.8.0.459235898725.issue36845@roundup.psfhosted.org> New submission from Nicolai Moore : When using the tuple-form of constructing IPv4Network and IPv6Network will accept prefixlen outside of the normal allowed ranges. Example: >>> import ipaddress >>> ipaddress.IPv4Network(('172.21.1.0', 400)) IPv4Network('172.21.1.0/400') If given a negative number, it will error but not with a particularly useful error: >>> x = ipaddress.IPv4Network(('172.21.1.0', -1)) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.7/ipaddress.py", line 1532, in __init__ self.netmask, self._prefixlen = self._make_netmask(mask) File "/usr/lib64/python3.7/ipaddress.py", line 1112, in _make_netmask netmask = IPv4Address(cls._ip_int_from_prefix(prefixlen)) File "/usr/lib64/python3.7/ipaddress.py", line 444, in _ip_int_from_prefix return cls._ALL_ONES ^ (cls._ALL_ONES >> prefixlen) ValueError: negative shift count Looking at the code, I think all that is needed is a range check within the respective _make_netmask methods in _BaseV4 and _BaseV6 classes ---------- components: Library (Lib) messages: 341839 nosy: niconorsk priority: normal severity: normal status: open title: ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 19:59:13 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 07 May 2019 23:59:13 +0000 Subject: [issue36812] posix_spawnp returns error when used with file_actions In-Reply-To: <1557155011.55.0.26778375432.issue36812@roundup.psfhosted.org> Message-ID: <1557273553.27.0.747149375525.issue36812@roundup.psfhosted.org> Toshio Kuratomi added the comment: Ah okay, I'll see what information posix_spawnp() (the C function) returns on error for that case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 20:04:32 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 08 May 2019 00:04:32 +0000 Subject: [issue36844] abiflag `m` is no longer showing when compiled with --enable-shared In-Reply-To: <1557263463.69.0.218039156148.issue36844@roundup.psfhosted.org> Message-ID: <1557273872.38.0.374281599508.issue36844@roundup.psfhosted.org> Anthony Sottile added the comment: seems intentional => closing ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 20:06:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 May 2019 00:06:25 +0000 Subject: [issue36812] posix_spawnp returns error when used with file_actions In-Reply-To: <1557155011.55.0.26778375432.issue36812@roundup.psfhosted.org> Message-ID: <1557273985.45.0.0489878614513.issue36812@roundup.psfhosted.org> STINNER Victor added the comment: Depending on your libc implementation and your libc version, you may get more or less info about what gone wrong. The initial issue was not a bug but a mistake in the file mode. I close the issue. ---------- nosy: +vstinner resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 21:27:02 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 08 May 2019 01:27:02 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557278822.56.0.89445123464.issue36816@roundup.psfhosted.org> Gregory P. Smith added the comment: Updated cert+key committed to pythontestdotnet. reassigning to EWDurbin to see that they're deployed. https://github.com/python/pythontestdotnet/commit/2d121419796dad6d4285bf5aefd464aff0f47a91 ---------- assignee: gregory.p.smith -> EWDurbin resolution: -> remind stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 22:07:54 2019 From: report at bugs.python.org (Ryan Govostes) Date: Wed, 08 May 2019 02:07:54 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1557263442.04.0.183290629047.issue35495@roundup.psfhosted.org> Message-ID: Ryan Govostes added the comment: Just don?t run the last line which is just an echoing of the output of parser.parse_args() repeated. The Namespace type would need to be imported if you really wanted to but there?s no point. On Tuesday, May 7, 2019, Michael Blahay wrote: > > Michael Blahay added the comment: > > Ryan, what are the exact steps to reproduce the problem? This is what I > get when I run the code you included: > > >>> import argparse > >>> parser = argparse.ArgumentParser() > >>> parser.add_argument('things', nargs=argparse.REMAINDER, > default=['nothing']) > _StoreAction(option_strings=[], dest='things', nargs='...', const=None, > default=['nothing'], type=None, choices=None, help=None, metavar=None) > >>> parser.parse_args([]) > Namespace(things=[]) > >>> Namespace(things=[]) > Traceback (most recent call last): > File "", line 1, in > NameError: name 'Namespace' is not defined > > ---------- > nosy: +mblahay > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 22:23:43 2019 From: report at bugs.python.org (Dan Snider) Date: Wed, 08 May 2019 02:23:43 +0000 Subject: [issue36846] range_iterator does not use __index__ Message-ID: <1557282223.61.0.192486675978.issue36846@roundup.psfhosted.org> New submission from Dan Snider : I wouldn't even know where to begin to try and find a palatable solution for this that wouldn't be summarily dismissed. Perhaps it isn't unreasonable to suggest PyNumber_Index shouldn't use the less stringent PyLong_Check as the entry to the fast path. That is what happens right now and it can prevent the __index__ method defined for an int subtype being called in certain situation such as this one. Here's a silly but valid demonstration of what happens when there is more than 1 way to skin a... index. Apologies if it is unreadable but I wanted it to be a 'single' repl statement and cmd was being uncooperative without it being squished like this. if not not not not not not True: class Duper(super): def __call__(self, attr, *args): func = super.__getattribute__(self, attr) this = super.__self__.__get__(self) print(f'{this!r}.{func.__name__}(%s)'%', '.join(map(repr, args))) return super.__self_class__.__get__(self)(func(*args)) @classmethod class unbound(classmethod): def __set_name__(self, owner, name): setattr(owner, name, self.__func__(owner)) class Hex(int): __slots__ = () __call__ = __self__ = Duper.unbound() def __neg__(self): return self('__neg__') def __abs__(self): return self('__abs__') def __add__(a, b): return a('__add__', b) def __sub__(a, b): return a('__sub__', b) def __mul__(a, b): return a('__mul__', b) def __radd__(a, b): return a('__radd__', b) def __rsub__(a, b): return a('__rsub__', b) def __rmul__(a, b): return a('__rmul__', b) def __floordiv__(a, b): return a('__floordiv__', b) def __rfloordiv__(a, b): return a('__rfloordiv__', b) def __repr__(self): return f'({self.__self__.__pos__():#02x})' a, b, c, i = (Hex(i) for i in (0, 10, 2, 2)) print(f'creating range({a}, {b}, {c})...') r = range(a, b, c) print('', '-'*78) print(f'accessing the element at r[{i!r}]...') v = r[i] print('', '-'*78) print('iterating over the range...') for i in r: pass print('are we there yet?...\n') ---------- messages: 341845 nosy: bup priority: normal severity: normal status: open title: range_iterator does not use __index__ versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 22:27:29 2019 From: report at bugs.python.org (Windson Yang) Date: Wed, 08 May 2019 02:27:29 +0000 Subject: [issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks In-Reply-To: <1376696752.64.0.473845221037.issue18765@psf.upfronthosting.co.za> Message-ID: <1557282449.72.0.705119688542.issue18765@roundup.psfhosted.org> Windson Yang added the comment: Hello, @R?mi, are you still working on this issue? ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 22:50:26 2019 From: report at bugs.python.org (yjq) Date: Wed, 08 May 2019 02:50:26 +0000 Subject: [issue33350] WinError 10038 is raised when loop.sock_connect is wrapped with asyncio.wait_for In-Reply-To: <1524588676.0.0.682650639539.issue33350@psf.upfronthosting.co.za> Message-ID: <1557283826.6.0.945499655993.issue33350@roundup.psfhosted.org> yjq added the comment: updated: I tried the test.py and it didn't show this error. So I think what I got is not the same problem as issue33350 although it shows the same traceback message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 22:52:46 2019 From: report at bugs.python.org (Jayesh) Date: Wed, 08 May 2019 02:52:46 +0000 Subject: [issue36847] Segmentation fault (core dumped) Found when we import "schedule" and "mysql.connector" togather. Message-ID: <1557283966.35.0.5561345962.issue36847@roundup.psfhosted.org> New submission from Jayesh : When we import following two library, then coredump found. import sys #!/usr/bin/python import schedule import mysql.connector Python 2.7.12 Ubuntu 16.04 x64 Package Version ---------------------- ------- adium-theme-ubuntu 0.3.4 configparser 3.7.4 mysql-connector-python 8.0.16 MySQL-python 1.2.5 pip 19.1.1 protobuf 3.7.1 py-mysql 1.0 schedule 0.6.0 selenium 3.141.0 setuptools 20.7.0 six 1.12.0 unity-lens-photos 1.0 urllib3 1.25.2 wheel 0.29.0 ---------- components: Library (Lib) files: poc.py messages: 341848 nosy: jay.net.in priority: normal severity: normal status: open title: Segmentation fault (core dumped) Found when we import "schedule" and "mysql.connector" togather. versions: Python 2.7 Added file: https://bugs.python.org/file48312/poc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 23:05:06 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 08 May 2019 03:05:06 +0000 Subject: [issue36847] Segmentation fault (core dumped) Found when we import "schedule" and "mysql.connector" togather. In-Reply-To: <1557283966.35.0.5561345962.issue36847@roundup.psfhosted.org> Message-ID: <1557284706.23.0.447398323001.issue36847@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. schedule and mysql-connector are not part of standard library distributed with CPython. This tracker deals with issues in CPython. I would propose closing it as third party unless you can reproduce the segfault without third party code. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 23:10:12 2019 From: report at bugs.python.org (Jayesh) Date: Wed, 08 May 2019 03:10:12 +0000 Subject: [issue36847] Segmentation fault (core dumped) Found when we import "schedule" and "mysql.connector" togather. In-Reply-To: <1557283966.35.0.5561345962.issue36847@roundup.psfhosted.org> Message-ID: <1557285012.2.0.0999917201327.issue36847@roundup.psfhosted.org> Change by Jayesh : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 23:46:04 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 08 May 2019 03:46:04 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557287164.08.0.939184252615.issue36816@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 7 23:46:19 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 08 May 2019 03:46:19 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557287179.64.0.0552106571419.issue35925@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 00:06:46 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 08 May 2019 04:06:46 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557288406.48.0.455047767994.issue36807@roundup.psfhosted.org> Terry J. Reedy added the comment: I watched the talk by Nina Zakharenko at https://www.youtube.com/watch?v=35mXD40SvXM. Since I love being able to save, compile, and run a file with one keystroke, I appreciate people wanting to do the equivalent with CircuitExpress and Adafruit. In IDLE, print() output would appear in IDLE's Shell unless sys.stdout were replaced. Dan's note suggests that flush/fsynch would be more generally useful than for the board. I am inclined to add try: except: around the calls, and perhaps display a message "File was not saved" + traceback. Dan, slightly OT, but I am curious whether one can access USB ports (in a system-dependent manner) directly from python code via os.system and ctypes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 00:18:55 2019 From: report at bugs.python.org (Dan Halbert) Date: Wed, 08 May 2019 04:18:55 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557289135.83.0.754977437254.issue36807@roundup.psfhosted.org> Dan Halbert added the comment: >Dan, slightly OT, but I am curious whether one can access USB ports (in a system-dependent manner) directly from python code via os.system and ctypes? Do you mean from CircuitPython? The USB impplementation provides HID keyboard, mouse, and gamepad devices, CDC (serial), MIDI, and MSC (CIRCUITPY). We don't provide ctypes (though MicroPython does), but there are native modules that provide access to these devices. We will are planning to add user-defined USB descriptors. Also, we provide some enhancements in a CircuitPython-specific module to peek for input on CDC, so you can know when to call `input()`, without using the usual OS-dependent Python tricks for this. Right now REPL input/output is mixed with user input, as you mention, but we're considering adding a second serial CDC port so you'll be able to have a second serial channel and avoid colliding with the REPL. I'd be happy to discuss this kind of stuff with you further, by email or whatever other mechanism you have in mind, like some appropriate python mailing list or our own chat servers, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 01:58:55 2019 From: report at bugs.python.org (Mitar) Date: Wed, 08 May 2019 05:58:55 +0000 Subject: [issue13824] argparse.FileType opens a file and never closes it In-Reply-To: <1326975939.94.0.524131708506.issue13824@psf.upfronthosting.co.za> Message-ID: <1557295135.23.0.268547600424.issue13824@roundup.psfhosted.org> Mitar added the comment: > So it's already possible to do what you describe, simply by doing: I think there is an edge case here if a stdin/stdout is opened? It would get closed at exist from the context, no? So I suggest that a slight extension of what open otherwise returns is returned which make sure context manager applies only to non-stdin/stdout handles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 02:05:31 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 08 May 2019 06:05:31 +0000 Subject: [issue33153] interpreter crash when multiplying large tuples In-Reply-To: <1522145451.62.0.467229070634.issue33153@psf.upfronthosting.co.za> Message-ID: <1557295531.02.0.588860193113.issue33153@roundup.psfhosted.org> Inada Naoki added the comment: This bug is happened only on x86, not amd64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 02:34:12 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 May 2019 06:34:12 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557297252.89.0.935683988377.issue27639@roundup.psfhosted.org> Serhiy Storchaka added the comment: The real name of vaultah is Dmitry Kazakov. His PR LGTM. Did you notice that I recreated the original PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 02:57:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 08 May 2019 06:57:13 +0000 Subject: [issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable Message-ID: <1557298633.85.0.260410761482.issue36848@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : With issue17185 __signature__ was set so that inspect can use this to return signature for mock objects. But in PySide2 it has __signature__ set as a non-writeable property and hence trying to set __signature__ fails. It's actually setting __signature__ for mocked object but still has this error for PySide. mock backport report : https://github.com/testing-cabal/mock/issues/464 pytest-qt report : https://github.com/pytest-dev/pytest-qt/issues/258 ---------- components: Library (Lib) keywords: 3.7regression messages: 341855 nosy: cjw296, mariocj89, michael.foord, xtreak priority: normal severity: normal status: open title: autospec fails with AttributeError when mocked class has __signature__ non-writeable type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 03:12:15 2019 From: report at bugs.python.org (Michael Osipov) Date: Wed, 08 May 2019 07:12:15 +0000 Subject: [issue36849] Native libcurses on HP-UX not properly detected Message-ID: <1557299535.01.0.0874998234363.issue36849@roundup.psfhosted.org> New submission from Michael Osipov <1983-01-06 at gmx.net>: The module _curses fails to build because curses cannot be found on HP-UX. In this case, it has an unorthodox location: > $ ll /usr/lib/hpux32/libcurses.so lr-xr-xr-x 1 bin bin 17 2018-09-07 15:29 /usr/lib/hpux32/libcurses.so -> ./libxcurses.so.1* A PR is in preparation ---------- components: Build messages: 341856 nosy: michael-o priority: normal severity: normal status: open title: Native libcurses on HP-UX not properly detected type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 03:15:36 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 08 May 2019 07:15:36 +0000 Subject: [issue36015] streamhandler cannot represent streams with an integer as name In-Reply-To: <1550431224.14.0.504793638163.issue36015@roundup.psfhosted.org> Message-ID: <1557299736.03.0.665345894682.issue36015@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 03:29:49 2019 From: report at bugs.python.org (Michael Osipov) Date: Wed, 08 May 2019 07:29:49 +0000 Subject: [issue36849] Native libcurses on HP-UX not properly detected In-Reply-To: <1557299535.01.0.0874998234363.issue36849@roundup.psfhosted.org> Message-ID: <1557300589.93.0.0391000699047.issue36849@roundup.psfhosted.org> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- keywords: +patch pull_requests: +13099 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 03:43:31 2019 From: report at bugs.python.org (hans.meine) Date: Wed, 08 May 2019 07:43:31 +0000 Subject: [issue36850] shutil.copy2 fails with even with source network filesystem not supporting extended attributes Message-ID: <1557301411.76.0.646767757374.issue36850@roundup.psfhosted.org> New submission from hans.meine : This is a near duplicate of #24564, but has a slightly smaller scope. We're using a CIFS filesystem and noticed that copying files *from* that filesystem to a local path with `shutil.copy2` does not work, but fails with an `OSError: [Errno 22] Invalid argument`. This is because `copy2()` calls `copystat()` which contains try: names = os.listxattr(src, follow_symlinks=follow_symlinks) except OSError as e: if e.errno not in (errno.ENOTSUP, errno.ENODATA): raise In our case with our CIFS mount, and in the NFS mounts mentioned in #24564, `os.listxattr()` raises an IOError with `errno.EINVAL` (22). It was proposed in #24564 already to also ignore EINVAL, but with this issue I wanted to specifically propose to do so for the *reading* part. While I also think that copy2() should work with both source *and* target filesystems not supporting xattr, our use case where the likelihood of data loss is zero (because there have never been xattr in the first place) is particularly annoying. ---------- components: Library (Lib) messages: 341857 nosy: hans-meine priority: normal severity: normal status: open title: shutil.copy2 fails with even with source network filesystem not supporting extended attributes versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 03:49:39 2019 From: report at bugs.python.org (hans.meine) Date: Wed, 08 May 2019 07:49:39 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1557301779.66.0.52122746529.issue24564@roundup.psfhosted.org> hans.meine added the comment: I completely agree with msg322848, both with the suggested fix and with its rationale. A future API improvement could be to have a "strict" mode where errors copying xattr are not silently ignored anymore (if there are src xattr, but they cannot be written, or if src xattr cannot be read, for instance), but the current functionality seems to be "copy xattr if possible", and that should be fixed accordingly. I also opened #36850 arguing that in any case, EINVAL should be ignored when *reading* extended attributes, acknowledging that people might have more problems with ignoring errors on *writing* them when they were present on the source. However, as stated above, I personally vote for the fix suggested in msg322848. ---------- nosy: +hans-meine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 04:25:42 2019 From: report at bugs.python.org (Jan-Martin Kuhnigk) Date: Wed, 08 May 2019 08:25:42 +0000 Subject: [issue36850] shutil.copy2 fails with even with source network filesystem not supporting extended attributes In-Reply-To: <1557301411.76.0.646767757374.issue36850@roundup.psfhosted.org> Message-ID: <1557303942.74.0.706551264818.issue36850@roundup.psfhosted.org> Change by Jan-Martin Kuhnigk : ---------- nosy: +grebdioZ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 04:33:35 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 08 May 2019 08:33:35 +0000 Subject: [issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks In-Reply-To: <1376696752.64.0.473845221037.issue18765@psf.upfronthosting.co.za> Message-ID: <1557304415.18.0.388789072783.issue18765@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Windson, I had a working patch but got stuck on making this behavior optional (the `if SOMETHING_SAYS_TO_ENABLE_THIS:` in @gregory.p.smith initial post). To make TestCase aware of the command line arguments given to the test runner I opened issue 36825 so we could do `python test_myprogram.py` but did not get any feedback on it yet. If you see a way around this, please go ahead :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 04:43:20 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 08 May 2019 08:43:20 +0000 Subject: [issue36846] range_iterator does not use __index__ In-Reply-To: <1557282223.61.0.192486675978.issue36846@roundup.psfhosted.org> Message-ID: <1557305000.68.0.300658803221.issue36846@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi @bup, thanks for opening a new bug report. I'm not sure I get what is the issue though. Could you attach a more readable example and explain exactly when you expect __index__ to be called? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 05:16:39 2019 From: report at bugs.python.org (sandy-lcq) Date: Wed, 08 May 2019 09:16:39 +0000 Subject: [issue36464] Python 2.7 build install fails intermittently with -j on MacOS In-Reply-To: <1553811277.77.0.695389248612.issue36464@roundup.psfhosted.org> Message-ID: <1557306999.64.0.978000232184.issue36464@roundup.psfhosted.org> Change by sandy-lcq : ---------- keywords: +patch pull_requests: +13100 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 06:22:05 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 08 May 2019 10:22:05 +0000 Subject: [issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen In-Reply-To: <1557269638.8.0.459235898725.issue36845@roundup.psfhosted.org> Message-ID: <1557310925.67.0.722945987543.issue36845@roundup.psfhosted.org> SilentGhost added the comment: Would you like to submit a fix, Nicolai? ---------- nosy: +SilentGhost, pmoody stage: -> needs patch versions: -Python 3.5, Python 3.6, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 06:23:30 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 08 May 2019 10:23:30 +0000 Subject: [issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen In-Reply-To: <1557269638.8.0.459235898725.issue36845@roundup.psfhosted.org> Message-ID: <1557311010.13.0.43192536798.issue36845@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 06:25:58 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 08 May 2019 10:25:58 +0000 Subject: [issue18387] Add 'symbols' link to pydoc's html menu bar. In-Reply-To: <1373131695.63.0.960870867634.issue18387@psf.upfronthosting.co.za> Message-ID: <1557311158.03.0.979006564721.issue18387@roundup.psfhosted.org> Change by SilentGhost : ---------- versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 06:35:30 2019 From: report at bugs.python.org (Nicolai Moore) Date: Wed, 08 May 2019 10:35:30 +0000 Subject: [issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen In-Reply-To: <1557269638.8.0.459235898725.issue36845@roundup.psfhosted.org> Message-ID: <1557311730.07.0.447481810133.issue36845@roundup.psfhosted.org> Nicolai Moore added the comment: I'd be happy too. Would be a first time contribution though, so need to give me some time to figure my way around the process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 06:45:35 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 08 May 2019 10:45:35 +0000 Subject: [issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen In-Reply-To: <1557269638.8.0.459235898725.issue36845@roundup.psfhosted.org> Message-ID: <1557312335.28.0.610147253782.issue36845@roundup.psfhosted.org> SilentGhost added the comment: There are some guidelines available at https://devguide.python.org/pullrequest/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 06:57:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 May 2019 10:57:56 +0000 Subject: [issue36846] range_iterator does not use __index__ In-Reply-To: <1557282223.61.0.192486675978.issue36846@roundup.psfhosted.org> Message-ID: <1557313076.92.0.499505758488.issue36846@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is a duplicate of issue17576. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 07:03:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 May 2019 11:03:30 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557313410.68.0.131856386847.issue36829@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 07:13:00 2019 From: report at bugs.python.org (mbiggs) Date: Wed, 08 May 2019 11:13:00 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes In-Reply-To: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> Message-ID: <1557313980.55.0.0559165618913.issue36789@roundup.psfhosted.org> Change by mbiggs : ---------- pull_requests: +13102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 07:18:49 2019 From: report at bugs.python.org (Ernest W. Durbin III) Date: Wed, 08 May 2019 11:18:49 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557314329.32.0.626013114886.issue36816@roundup.psfhosted.org> Ernest W. Durbin III added the comment: Cert updated, reassigning back to gregory.p.smith to verify and close this out. ---------- assignee: EWDurbin -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 07:53:47 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 08 May 2019 11:53:47 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557316427.33.0.127446786989.issue36816@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: Lib/test/selfsigned_pythontestdotnet.pem in the cpython repository needs to be updated to match https://github.com/python/pythontestdotnet/blob/master/tls/self-signed-cert.pem, or the test fails :) ====================================================================== ERROR: test_networked_good_cert (test.test_httplib.HTTPSTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/yen/tmp/cpython/Lib/test/test_httplib.py", line 1632, in test_networked_good_cert h.request('GET', '/') File "/home/yen/tmp/cpython/Lib/http/client.py", line 1221, in request self._send_request(method, url, body, headers, encode_chunked) File "/home/yen/tmp/cpython/Lib/http/client.py", line 1267, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/home/yen/tmp/cpython/Lib/http/client.py", line 1216, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/yen/tmp/cpython/Lib/http/client.py", line 1004, in _send_output self.send(msg) File "/home/yen/tmp/cpython/Lib/http/client.py", line 944, in send self.connect() File "/home/yen/tmp/cpython/Lib/http/client.py", line 1383, in connect self.sock = self._context.wrap_socket(self.sock, File "/home/yen/tmp/cpython/Lib/ssl.py", line 405, in wrap_socket return self.sslsocket_class._create( File "/home/yen/tmp/cpython/Lib/ssl.py", line 853, in _create self.do_handshake() File "/home/yen/tmp/cpython/Lib/ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1055) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 07:55:05 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Wed, 08 May 2019 11:55:05 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557316505.61.0.778229070417.issue35925@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: -yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 08:17:34 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 08 May 2019 12:17:34 +0000 Subject: [issue36831] ElementTree.find attribute matching with empty namespace In-Reply-To: <1557236210.72.0.578980303095.issue36831@roundup.psfhosted.org> Message-ID: <158D18FF-6B4C-446A-AD1C-56DD1D4306E0@behnel.de> Stefan Behnel added the comment: Right, thanks for the reproducer. The default namespace should not apply to attributes. I'll write up a PR today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 08:20:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 May 2019 12:20:05 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557318005.62.0.157872858871.issue36829@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file48313/gc_callback.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 08:20:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 May 2019 12:20:13 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557318013.47.0.94241531344.issue36829@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file48314/uncollectable.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 08:20:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 May 2019 12:20:21 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557318021.77.0.163614243157.issue36829@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file48315/io_destructor.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 08:20:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 May 2019 12:20:28 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557318028.59.0.973825759942.issue36829@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file48316/site_hook.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 08:21:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 May 2019 12:21:46 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557318106.82.0.356037594252.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 13187 to control how unraisable exceptions are handled. Attached uncollectable.py, gc_callback.py and io_destructor.py examples can be used to test unraisable exceptions. Without my PR: --- $ ./python -Werror uncollectable.py ResourceWarning: gc: 2 uncollectable objects at shutdown; use gc.set_debug(gc.DEBUG_UNCOLLECTABLE) to list them $ ./python gc_callback.py Exception ignored in: Traceback (most recent call last): File "gc_callback.py", line 7, in wr_callback raise ValueError(42) ValueError: 42 $ ./python -X dev io_destructor.py io_destructor.py:4: ResourceWarning: unclosed file <_io.TextIOWrapper name='io_destructor.py' mode='r' encoding='UTF-8'> f = None ResourceWarning: Enable tracemalloc to get the object allocation traceback Exception ignored in: <_io.TextIOWrapper name='io_destructor.py' mode='r' encoding='UTF-8'> OSError: [Errno 9] Bad file descriptor --- For example, apply attached site_hook.patch to install a custom unraisablehook. Output with my PR + site_hook.patch: --- $ ./python -Werror uncollectable.py ResourceWarning: gc: 2 uncollectable objects at shutdown; use gc.set_debug(gc.DEBUG_UNCOLLECTABLE) to list them $ ./python gc_callback.py Exception ignored in: File "gc_callback.py", line 7, in wr_callback raise ValueError(42) ValueError: 42 Traceback (most recent call last): File "gc_callback.py", line 11, in obj = None $ ./python -X dev io_destructor.py io_destructor.py:4: ResourceWarning: unclosed file <_io.TextIOWrapper name='io_destructor.py' mode='r' encoding='UTF-8'> f = None ResourceWarning: Enable tracemalloc to get the object allocation traceback Exception ignored in: <_io.TextIOWrapper name='io_destructor.py' mode='r' encoding='UTF-8'> OSError: [Errno 9] Bad file descriptor Traceback (most recent call last): File "io_destructor.py", line 4, in f = None --- The first good news is that it *is* possible to write a custom hook for unraisable for one of the last unraisable exception: _PyGC_DumpShutdownStats() which logs "uncollectable objects at shutdown". When an unraisable exceptions is logged before Python finalization, the hook can inspect the Python stack to see where the exception has been raised which helps debugging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 08:22:35 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 08 May 2019 12:22:35 +0000 Subject: [issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable In-Reply-To: <1557298633.85.0.260410761482.issue36848@roundup.psfhosted.org> Message-ID: <1557318155.04.0.951632254467.issue36848@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: As noted in https://github.com/testing-cabal/mock/issues/464#issuecomment-490381389 just importing PySide2 makes __signature__ not writeable for any class defined after the import. $ python Python 3.8.0a4+ (heads/master:b1c3167c23, May 8 2019, 05:17:38) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class Foo: pass ... >>> Foo.__signature__ = 1 >>> import PySide2 >>> class Bar: pass ... >>> Bar.__signature__ = 1 Traceback (most recent call last): File "", line 1, in AttributeError: attribute '__signature__' of 'type' objects is not writable ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 08:52:52 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 08 May 2019 12:52:52 +0000 Subject: [issue36812] posix_spawnp returns error when used with file_actions In-Reply-To: <1557155011.55.0.26778375432.issue36812@roundup.psfhosted.org> Message-ID: <1557319972.44.0.118280246397.issue36812@roundup.psfhosted.org> Toshio Kuratomi added the comment: Yeah, I've verified what Victor said about the OS not giving us enough information to tell what file is causing the issue. However, I wonder if we should change the error message to be less confusing? I'm a godawful C programmer but maybe something like this: - PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, path->object); + if (file_actionsp != NULL) { + /* OSErrors can be triggered by the program being invoked or by a + * problem with the files in file_actions. Change the default + * error message so as not to confuse the programmer + */ + if (path->narrow != NULL) { + char *err_msg_fmt = "While spawning %s\0"; + unsigned int err_msg_size = strlen(path->narrow) + strlen(err_msg_fmt) + 1; + char* err_msg = malloc(err_msg_size); + + PyOS_snprintf(err_msg, err_msg_size, err_msg_fmt, path->narrow); + /* Slight abuse, we're sending an error message rather than + * a filename + */ + PyErr_SetFromErrnoWithFilename(PyExc_OSError, err_msg); + } + } + else + { + PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, path->object); + } Which leads to output like this: >>> import os >>> file_actions = [(os.POSIX_SPAWN_OPEN, 1, '.tmp/temp_file', os.O_CREAT | os.O_RDWR, 777)] >>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=file_actions) Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: 'While spawning whoami' I can submit a PR for that and people can teach me how to fix my C if it's considered useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 09:09:13 2019 From: report at bugs.python.org (Chris Withers) Date: Wed, 08 May 2019 13:09:13 +0000 Subject: [issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable In-Reply-To: <1557298633.85.0.260410761482.issue36848@roundup.psfhosted.org> Message-ID: <1557320953.46.0.646282180651.issue36848@roundup.psfhosted.org> Chris Withers added the comment: Wow, is this just an issue that the pyside guys need to fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 09:32:13 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 08 May 2019 13:32:13 +0000 Subject: [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1557322333.26.0.78306364995.issue24712@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 8ab24b2ebcf99f703f00297cb3a0c3ff857eecf8 by St?phane Wirtel (Julien Palard) in branch '2.7': [2.7] bpo-24712: Doc: Make sidebar sticky using browser support. (GH-13179) https://github.com/python/cpython/commit/8ab24b2ebcf99f703f00297cb3a0c3ff857eecf8 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 09:39:53 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 08 May 2019 13:39:53 +0000 Subject: [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1557322793.46.0.916012982761.issue24712@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 09:45:10 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 08 May 2019 13:45:10 +0000 Subject: [issue36832] Port zipp to zipfile In-Reply-To: <1557236857.3.0.339513388865.issue36832@roundup.psfhosted.org> Message-ID: <1557323110.27.0.132588654859.issue36832@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset b2758ff9553d8bebe4e9dd1cb3996212473810e3 by Barry Warsaw (Jason R. Coombs) in branch 'master': bpo-36832: add zipfile.Path (#13153) https://github.com/python/cpython/commit/b2758ff9553d8bebe4e9dd1cb3996212473810e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 09:47:41 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 08 May 2019 13:47:41 +0000 Subject: [issue36832] Port zipp to zipfile In-Reply-To: <1557236857.3.0.339513388865.issue36832@roundup.psfhosted.org> Message-ID: <1557323261.91.0.253761120346.issue36832@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 10:16:21 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 08 May 2019 14:16:21 +0000 Subject: [issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable In-Reply-To: <1557298633.85.0.260410761482.issue36848@roundup.psfhosted.org> Message-ID: <1557324981.07.0.799718336409.issue36848@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > Wow, is this just an issue that the pyside guys need to fix? I guess so. PySide __init__.py has "import shiboken" which also does type.__signature__. It seems like shiboken is some kind of generator to generate Python bindings from C++ QT code. I couldn't dig any deeper. Since this has caused two reports of regression I can add an except block to silence the AttributeError and add a comment to this issue but can only test it manually installing pyside to ensure the AttributeError is not thrown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 10:19:41 2019 From: report at bugs.python.org (Chris Withers) Date: Wed, 08 May 2019 14:19:41 +0000 Subject: [issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable In-Reply-To: <1557298633.85.0.260410761482.issue36848@roundup.psfhosted.org> Message-ID: <1557325181.67.0.363058706924.issue36848@roundup.psfhosted.org> Chris Withers added the comment: I'm not sure we should try and work around this; hijacking __signature__ python-wide is going to cause a bunch of other problems. My vote would be to just open a bug on the pyside tracker (wherever that is) and close the issue and and on the backport by pointing to that issue. thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 10:24:28 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 08 May 2019 14:24:28 +0000 Subject: [issue36837] Make il8n tools available from `python -m` In-Reply-To: <1557246206.07.0.412069516419.issue36837@roundup.psfhosted.org> Message-ID: <1557325468.55.0.585734133292.issue36837@roundup.psfhosted.org> Barry A. Warsaw added the comment: One other suggestion: put the bulk of Tools/i18n/pygettext.py into Lib/_pygettext.py, then import its main() in both Lib/gettext.py and Tools/i18n/pygettext.py. Then just call that main(). ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 10:32:27 2019 From: report at bugs.python.org (Mario Corchero) Date: Wed, 08 May 2019 14:32:27 +0000 Subject: [issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable In-Reply-To: <1557298633.85.0.260410761482.issue36848@roundup.psfhosted.org> Message-ID: <1557325947.5.0.963285067358.issue36848@roundup.psfhosted.org> Mario Corchero added the comment: Agree, for the general case I think it makes sense that this is fixed in pyside. Hijacking __signature__ python-wide sounds like it can cause other issues, if they need such a hack I would suggest finding a way (in pyside) to allow for mock to work. I wonder though if this change in __signature__ will affect in any way any C extension that might not allow setting __signature__ if not set as a lack of __dict__ (I have not managed to find any issue with small examples though). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 10:37:19 2019 From: report at bugs.python.org (Chris Withers) Date: Wed, 08 May 2019 14:37:19 +0000 Subject: [issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable In-Reply-To: <1557298633.85.0.260410761482.issue36848@roundup.psfhosted.org> Message-ID: <1557326239.92.0.195339625152.issue36848@roundup.psfhosted.org> Chris Withers added the comment: We only attempt to set __signature__ on Mocks, so I don't think extensions will be a problem. I do think there's a bit of code smell on that method: it's called _check_* and then changes some attributes, that might be worth fixing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 10:39:52 2019 From: report at bugs.python.org (Daniel Fortunov) Date: Wed, 08 May 2019 14:39:52 +0000 Subject: [issue25436] argparse.ArgumentError missing error message in __repr__ In-Reply-To: <1445196585.11.0.0454648926496.issue25436@psf.upfronthosting.co.za> Message-ID: <1557326392.53.0.176915925437.issue25436@roundup.psfhosted.org> Daniel Fortunov added the comment: As Paul points out, Python 3 gives a more sensible default repr so this becomes a non-issue. Closing... ---------- stage: patch review -> resolved status: open -> closed versions: +Python 2.7 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 10:45:19 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 08 May 2019 14:45:19 +0000 Subject: [issue36848] autospec fails with AttributeError when mocked class has __signature__ non-writeable In-Reply-To: <1557298633.85.0.260410761482.issue36848@roundup.psfhosted.org> Message-ID: <1557326719.12.0.0333749640882.issue36848@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Okay, I opened a bug in pyside tracker : https://bugreports.qt.io/browse/PYSIDE-1004 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 10:53:25 2019 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 08 May 2019 14:53:25 +0000 Subject: [issue35723] Add "time zone index" cache to datetime objects In-Reply-To: <1547238857.17.0.663234077571.issue35723@roundup.psfhosted.org> Message-ID: <1557327205.43.0.760813132938.issue35723@roundup.psfhosted.org> Paul Ganssle added the comment: > This sounds like a bug. Whether a tzinfo is a constant from a predefined set or something with a smart comparison semantic is none of datetime's business. I'm not sure what you mean, but it was not a "bug" in the sense that it was accidental, it was a deliberate choice. It comes at least partially from the fact that arithmetic operations attach the same timezone object to the new datetimes they create. When I first found out about this behavior, I raised bpo 28601. In any case, it's a side issue here, there are many other reasons pytz's model is incompatible with the preferred time zone model. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 10:57:24 2019 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 08 May 2019 14:57:24 +0000 Subject: [issue36479] Exit threads when interpreter is finalizing rather than runtime. In-Reply-To: <1553896742.19.0.478613119545.issue36479@roundup.psfhosted.org> Message-ID: <1557327444.94.0.521673513435.issue36479@roundup.psfhosted.org> Nick Coghlan added the comment: Pablo pointed out a problem with this change at the PyCon sprints: the thread cleanup code doesn't currently distinguish between "Python created daemon thread" and "thread created by the embedding application". That's already somewhat problematic if an embedding application goes through multiple initialize/finalize cycles, but it's even more critical to make the distinction correctly if we move the daemon thread cleanup to interpreter shutdown. ---------- nosy: +ncoghlan, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 10:57:58 2019 From: report at bugs.python.org (=?utf-8?q?Peter_T=C3=B6nz?=) Date: Wed, 08 May 2019 14:57:58 +0000 Subject: [issue33217] x in enum.Flag member is True when x is not a Flag In-Reply-To: <1522786572.96.0.467229070634.issue33217@psf.upfronthosting.co.za> Message-ID: <1557327478.74.0.621620415389.issue33217@roundup.psfhosted.org> Peter T?nz added the comment: I use python 3.8.0a3 to make our testframework ready for the future. Is it volitional that the Expression "if int in IntEnum:" raise also a TypeError? ---------- nosy: +Peter T?nz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:04:22 2019 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 08 May 2019 15:04:22 +0000 Subject: [issue36479] Exit threads when interpreter is finalizing rather than runtime. In-Reply-To: <1553896742.19.0.478613119545.issue36479@roundup.psfhosted.org> Message-ID: <1557327862.31.0.0324485312295.issue36479@roundup.psfhosted.org> Nick Coghlan added the comment: Another potential issue here is if a thread belonging to another interpreter attempts to access the interpreter being cleaned up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:21:37 2019 From: report at bugs.python.org (Larry Hastings) Date: Wed, 08 May 2019 15:21:37 +0000 Subject: [issue21820] unittest: unhelpful truncating of long strings. In-Reply-To: <1403346886.23.0.538670310002.issue21820@psf.upfronthosting.co.za> Message-ID: <1557328897.08.0.795552984328.issue21820@roundup.psfhosted.org> Larry Hastings added the comment: This bug is marked only for 3.4, and 3.4 is now EOL. Either it should be relocated to an active version, or it should be marked wontfix. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:23:09 2019 From: report at bugs.python.org (Larry Hastings) Date: Wed, 08 May 2019 15:23:09 +0000 Subject: [issue35657] multiprocessing.Process.join() ignores timeout if child process use os.exec*() In-Reply-To: <1546602767.92.0.99491105947.issue35657@roundup.psfhosted.org> Message-ID: <1557328989.01.0.942151217531.issue35657@roundup.psfhosted.org> Larry Hastings added the comment: 3.4 is now EOL, so the 3.4regression tag goes away too. ---------- keywords: -3.4regression nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:23:32 2019 From: report at bugs.python.org (Larry Hastings) Date: Wed, 08 May 2019 15:23:32 +0000 Subject: [issue26375] Python 2.7.10 and 3.4.4 hang on imaplib.IMAP4_SSL() In-Reply-To: <1455716357.67.0.858374272161.issue26375@psf.upfronthosting.co.za> Message-ID: <1557329012.34.0.922468106985.issue26375@roundup.psfhosted.org> Larry Hastings added the comment: 3.4 is now EOL, so the 3.4regression tag goes away too. ---------- keywords: -3.4regression nosy: +larry versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:23:44 2019 From: report at bugs.python.org (Larry Hastings) Date: Wed, 08 May 2019 15:23:44 +0000 Subject: [issue24732] 3.5.0b3 Windows accept() on unready non-blocking socket raises PermissionError [now need unit test] In-Reply-To: <1437963228.18.0.486881534673.issue24732@psf.upfronthosting.co.za> Message-ID: <1557329024.83.0.0565389205247.issue24732@roundup.psfhosted.org> Larry Hastings added the comment: 3.4 is now EOL, so the 3.4regression tag goes away too. ---------- keywords: -3.4regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:26:56 2019 From: report at bugs.python.org (Robert Boehne) Date: Wed, 08 May 2019 15:26:56 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557329216.37.0.209422858374.issue36843@roundup.psfhosted.org> Change by Robert Boehne : Added file: https://bugs.python.org/file48317/config.log.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:30:53 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 08 May 2019 15:30:53 +0000 Subject: [issue33217] x in enum.Flag member is True when x is not a Flag In-Reply-To: <1522786572.96.0.467229070634.issue33217@psf.upfronthosting.co.za> Message-ID: <1557329453.25.0.676940446185.issue33217@roundup.psfhosted.org> R?mi Lapeyre added the comment: A test for this has been added for IntFlag so I think it must have been on purpose : https://github.com/python/cpython/commit/9430652535f88125d8003f342a8884d34885d876#diff-d57e55a3bb4873aec10786e531a88947R2386 ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:31:39 2019 From: report at bugs.python.org (Brian Quinlan) Date: Wed, 08 May 2019 15:31:39 +0000 Subject: [issue36395] Add deferred single-threaded/fake executor to concurrent.futures In-Reply-To: <1553218760.85.0.609828298764.issue36395@roundup.psfhosted.org> Message-ID: <1557329499.05.0.241041906668.issue36395@roundup.psfhosted.org> Brian Quinlan added the comment: Brian, I was looking for an example where the current executor isn't sufficient for testing i.e. a useful test that would be difficult to write with a real executor but would be easier with a fake. Maybe you have such an example from your tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:40:55 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 08 May 2019 15:40:55 +0000 Subject: [issue36851] Frame stack is not cleaned after execution is finished with return Message-ID: <1557330055.15.0.678827851719.issue36851@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : When evaluating a frame object, it is possible to exit the execution with some variables in the stack. The frame deallocator (frame_dealloc) only cleans the stack if f_stacktop is not NULL, but this only happens for generators and when trace functions are set. The eval loop does this cleanup already if an exception is being raised, but not if a RETURN_VALUE is set. In the PyconUS sprints, Dino and I have been working on this and we have decided that the cleanest approach is shared the same goto label with the path for exception handling, effectively cleaning up ---------- components: Interpreter Core messages: 341891 nosy: dino.viehland, pablogsal priority: normal severity: normal status: open title: Frame stack is not cleaned after execution is finished with return versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:41:39 2019 From: report at bugs.python.org (Robert Boehne) Date: Wed, 08 May 2019 15:41:39 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557330099.25.0.50847228164.issue36843@roundup.psfhosted.org> Robert Boehne added the comment: from pyconfig.h: /* Define to 1 if the getrandom() function is available */ /* #undef HAVE_GETRANDOM */ /* Define to 1 if the Linux getrandom() syscall is available */ /* #undef HAVE_GETRANDOM_SYSCALL */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_RANDOM_H */ /* Define to 1 if you have the `getentropy' function. */ /* #undef HAVE_GETENTROPY */ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:43:09 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 08 May 2019 15:43:09 +0000 Subject: [issue36851] Frame stack is not cleaned after execution is finished with return In-Reply-To: <1557330055.15.0.678827851719.issue36851@roundup.psfhosted.org> Message-ID: <1557330189.19.0.982532721284.issue36851@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13103 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:45:48 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 08 May 2019 15:45:48 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557330348.48.0.375636058378.issue36816@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +13104 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:53:50 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 08 May 2019 15:53:50 +0000 Subject: [issue35924] curses segfault resizing window In-Reply-To: <1549497741.38.0.310308715457.issue35924@roundup.psfhosted.org> Message-ID: <1557330830.59.0.310250615257.issue35924@roundup.psfhosted.org> Toshio Kuratomi added the comment: I've diagnosed this a bit further and have a workaround for you. It appears that using addstr() with a string with embedded newlines is a piece of the problem. If I modify your example program so that we add each line as a separate string instead of adding them as a single string with embedded newlines, we get the ncurses ERR on resize instead of a segfault: import curses def main(stdscr): y, x = curses.LINES//3, curses.COLS//3 # size is arbitrary box = '\n'.join('+'*x for _ in range(y)) w = stdscr.subwin(y, x+1, y, x) while True: new_box = box[:] w.clear() for offset, line in enumerate(box.splitlines()): w.addstr(offset, 0, line) w.getch() # not required, just avoids a hot loop curses.wrapper(main) I don't see anything in the curses specification that forbids embedded newlines in the string to addstr(), though, so I am still thinking that this is a bug in ncurses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 11:58:09 2019 From: report at bugs.python.org (Chris Withers) Date: Wed, 08 May 2019 15:58:09 +0000 Subject: [issue21820] unittest: unhelpful truncating of long strings. In-Reply-To: <1403346886.23.0.538670310002.issue21820@psf.upfronthosting.co.za> Message-ID: <1557331089.69.0.915208119638.issue21820@roundup.psfhosted.org> Change by Chris Withers : ---------- versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:01:08 2019 From: report at bugs.python.org (Matthias Schoepfer) Date: Wed, 08 May 2019 16:01:08 +0000 Subject: [issue36852] Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat Message-ID: <1557331268.61.0.662119534756.issue36852@roundup.psfhosted.org> New submission from Matthias Schoepfer : Python 3.7.2 fails to cross compile for yocto / openembedded when target is mips softfloat, because the OS triple is not detected correctly by configure.ac. The configure script magic just catches for __mips__hard_float defines, but I guess, __mips__soft_float also indicates a mips architecture. Added patch ---------- components: Cross-Build files: 0001-fixing-finding-of-triplet-on-softfloat-mips.patch keywords: patch messages: 341894 nosy: Alex.Willmer, mschoepf priority: normal severity: normal status: open title: Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat versions: Python 3.7 Added file: https://bugs.python.org/file48318/0001-fixing-finding-of-triplet-on-softfloat-mips.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:02:06 2019 From: report at bugs.python.org (Mark Shannon) Date: Wed, 08 May 2019 16:02:06 +0000 Subject: [issue25217] Method cache can crash at shutdown in _PyType_Lookup In-Reply-To: <1442948351.56.0.970630575285.issue25217@psf.upfronthosting.co.za> Message-ID: <1557331326.26.0.417385745869.issue25217@roundup.psfhosted.org> Mark Shannon added the comment: Do you have a reproducible way to cause this crash? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:02:41 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 08 May 2019 16:02:41 +0000 Subject: [issue31873] Inconsistent capitalization of proper noun - Unicode. In-Reply-To: <1509023732.92.0.213398074469.issue31873@psf.upfronthosting.co.za> Message-ID: <1557331361.86.0.548165744798.issue31873@roundup.psfhosted.org> Julien Palard added the comment: New changeset 85225b6a58a516c50c055d5114668ed2fcdcda8c by Julien Palard (toonarmycaptain) in branch 'master': bpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125) https://github.com/python/cpython/commit/85225b6a58a516c50c055d5114668ed2fcdcda8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:03:28 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 08 May 2019 16:03:28 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) Message-ID: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> New submission from Jason R. Coombs : In working on some docs contributions, I've run into issues where docs builds are failing in CI differently than they're failing locally. Locally, running `make venv` from `Docs/` results in Sphinx 2, whereas on Azure Pipelines, the docs are built with Sphinx 1.8.2 (https://github.com/python/cpython/blob/1d4b16051f8550fd7dada3670a3e83ae13b99d3b/.azure-pipelines/docs-steps.yml#L15). When running with Sphinx 2, this error emerges when running `make suspicious` when a change is around that triggers suspicious code (such as this commit https://github.com/python/cpython/pull/12547/commits/9bde7faf6f051d4a7306ac8629d915ce069392f7): Exception occurred: File "/Users/jaraco/code/public/cpython/Doc/tools/extensions/suspicious.py", line 154, in report_issue self.warn('[%s:%d] "%s" found in "%-.120s"' % AttributeError: 'CheckSuspiciousMarkupBuilder' object has no attribute 'warn' First, we probably want to make these processes consistent (define the dependencies in exactly one place). Second, we should probably determine why the doc builds are failing on Sphinx 2 and update the `suspicious` code to support Sphinx 2. ---------- assignee: docs at python components: Documentation messages: 341897 nosy: docs at python, jaraco priority: normal severity: normal status: open title: inconsistencies in docs builds (Sphinx 2) type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:03:43 2019 From: report at bugs.python.org (Brian Quinlan) Date: Wed, 08 May 2019 16:03:43 +0000 Subject: [issue30006] Deadlocks in `concurrent.futures.ProcessPoolExecutor` In-Reply-To: <1491482471.73.0.550300132711.issue30006@psf.upfronthosting.co.za> Message-ID: <1557331423.89.0.888276504969.issue30006@roundup.psfhosted.org> Brian Quinlan added the comment: Was this fixed by https://github.com/python/cpython/pull/3895 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:05:07 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 08 May 2019 16:05:07 +0000 Subject: [issue31873] Inconsistent capitalization of proper noun - Unicode. In-Reply-To: <1509023732.92.0.213398074469.issue31873@psf.upfronthosting.co.za> Message-ID: <1557331507.93.0.012087694058.issue31873@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +13105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:07:03 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 08 May 2019 16:07:03 +0000 Subject: [issue31873] Inconsistent capitalization of proper noun - Unicode. In-Reply-To: <1509023732.92.0.213398074469.issue31873@psf.upfronthosting.co.za> Message-ID: <1557331623.96.0.796433243371.issue31873@roundup.psfhosted.org> Julien Palard added the comment: I merged it, it's a small change that is consistent enough for me with the rest of the file and the doc. Marc-Andre is right though, and if anyone have the courage, the whole doc should be proofread to update accordingly, but let's make it a whole other PR. Thanks David for your contribution and sorry for the delay. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:10:23 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 08 May 2019 16:10:23 +0000 Subject: [issue36852] Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat In-Reply-To: <1557331268.61.0.662119534756.issue36852@roundup.psfhosted.org> Message-ID: <1557331823.95.0.965299898355.issue36852@roundup.psfhosted.org> SilentGhost added the comment: Matthias, would you be able to convert the patch into a Github PR? There are guidelines available at https://devguide.python.org/pullrequest/ ---------- nosy: +SilentGhost stage: -> patch review versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:14:50 2019 From: report at bugs.python.org (Christoph Gohlke) Date: Wed, 08 May 2019 16:14:50 +0000 Subject: [issue35195] [Windows] Python 3.7 initializes LC_CTYPE locale at startup, causing performance issue on msvcrt isdigit() In-Reply-To: <1541717781.13.0.788709270274.issue35195@psf.upfronthosting.co.za> Message-ID: <1557332090.69.0.122262521702.issue35195@roundup.psfhosted.org> Christoph Gohlke added the comment: This is still an issue with Python 3.8.0a4 ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:20:46 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 08 May 2019 16:20:46 +0000 Subject: [issue35712] Make NotImplemented unusable in boolean context In-Reply-To: <1547157306.18.0.725390794489.issue35712@roundup.psfhosted.org> Message-ID: <1557332446.36.0.474029203037.issue35712@roundup.psfhosted.org> Change by Josh Rosenberg : ---------- keywords: +patch pull_requests: +13106 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:27:00 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 08 May 2019 16:27:00 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557332820.77.0.928227549062.issue35925@roundup.psfhosted.org> Julien Palard added the comment: I'm still seeing the issue on https://github.com/python/cpython/pull/12255 (freshly rebased to master to have 2cc0223f43a1ffd59c887a73e2b0ce5202f3be90. On this build: https://dev.azure.com/Python/cpython/_build/results?buildId=42065 ====================================================================== ERROR: test_networked_good_cert (test.test_httplib.HTTPSTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vsts/work/1/s/Lib/test/test_httplib.py", line 1632, in test_networked_good_cert h.request('GET', '/') File "/home/vsts/work/1/s/Lib/http/client.py", line 1221, in request self._send_request(method, url, body, headers, encode_chunked) File "/home/vsts/work/1/s/Lib/http/client.py", line 1267, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/home/vsts/work/1/s/Lib/http/client.py", line 1216, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/vsts/work/1/s/Lib/http/client.py", line 1004, in _send_output self.send(msg) File "/home/vsts/work/1/s/Lib/http/client.py", line 944, in send self.connect() File "/home/vsts/work/1/s/Lib/http/client.py", line 1383, in connect self.sock = self._context.wrap_socket(self.sock, File "/home/vsts/work/1/s/Lib/ssl.py", line 405, in wrap_socket return self.sslsocket_class._create( File "/home/vsts/work/1/s/Lib/ssl.py", line 853, in _create self.do_handshake() File "/home/vsts/work/1/s/Lib/ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1055) which does not looks covered by 2cc0223f43a1ffd59c887a73e2b0ce5202f3be90 which only checks for key too weak. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:29:46 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 08 May 2019 16:29:46 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557332986.66.0.889855340673.issue35925@roundup.psfhosted.org> Gregory P. Smith added the comment: thats https://bugs.python.org/issue36816 (separate issue as our infrastructure is fixed to have a modern certificate). PR pending automerge post-CI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:29:49 2019 From: report at bugs.python.org (Wei Lee) Date: Wed, 08 May 2019 16:29:49 +0000 Subject: [issue36841] Supporting customization of float encoding in JSON In-Reply-To: <1557261153.38.0.171143852563.issue36841@roundup.psfhosted.org> Message-ID: <1557332989.51.0.187075346176.issue36841@roundup.psfhosted.org> Wei Lee added the comment: If no one is working on it, I'd like to give it a try. ---------- nosy: +Lee-W _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:31:28 2019 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 08 May 2019 16:31:28 +0000 Subject: [issue24048] remove_module() needs to save/restore exception state In-Reply-To: <1429855118.66.0.488857300303.issue24048@psf.upfronthosting.co.za> Message-ID: <1557333088.27.0.483911729854.issue24048@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 94a64e9cd411a87514b68082c1c437eb3b49dfb9 by Nick Coghlan (Zackery Spytz) in branch 'master': bpo-24048: Save the live exception during import.c's remove_module() (GH-13005) https://github.com/python/cpython/commit/94a64e9cd411a87514b68082c1c437eb3b49dfb9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:33:29 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 08 May 2019 16:33:29 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557333209.12.0.62258167181.issue30458@roundup.psfhosted.org> Ned Deily added the comment: New changeset c50d437e942d4c4c45c8cd76329b05340c02eb31 by Ned Deily (Miro Hron?ok) in branch '3.6': bpo-30458: Disallow control chars in http URLs. (GH-12755) (GH-13155) https://github.com/python/cpython/commit/c50d437e942d4c4c45c8cd76329b05340c02eb31 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:34:15 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 08 May 2019 16:34:15 +0000 Subject: [issue31873] Inconsistent capitalization of proper noun - Unicode. In-Reply-To: <1509023732.92.0.213398074469.issue31873@psf.upfronthosting.co.za> Message-ID: <1557333255.67.0.283490403406.issue31873@roundup.psfhosted.org> miss-islington added the comment: New changeset ed8860c5af87d78d312ae30dd2d6bedc60bd86e5 by Miss Islington (bot) in branch '3.7': bpo-31873: Update unicode.rst - 'unicode' capitalization (GH-4125) https://github.com/python/cpython/commit/ed8860c5af87d78d312ae30dd2d6bedc60bd86e5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:35:13 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 08 May 2019 16:35:13 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557333313.36.0.0977024191246.issue36816@roundup.psfhosted.org> miss-islington added the comment: New changeset 6bd81734de0b73f1431880d6a75fb71bcbc65fa1 by Miss Islington (bot) (Gregory P. Smith) in branch 'master': bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) https://github.com/python/cpython/commit/6bd81734de0b73f1431880d6a75fb71bcbc65fa1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:43:24 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 08 May 2019 16:43:24 +0000 Subject: [issue36852] Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat In-Reply-To: <1557331268.61.0.662119534756.issue36852@roundup.psfhosted.org> Message-ID: <1557333804.96.0.25127744149.issue36852@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:44:03 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 08 May 2019 16:44:03 +0000 Subject: [issue35712] Make NotImplemented unusable in boolean context In-Reply-To: <1547157306.18.0.725390794489.issue35712@roundup.psfhosted.org> Message-ID: <1557333843.54.0.571951446133.issue35712@roundup.psfhosted.org> Josh Rosenberg added the comment: I've submitted a PR for this. I did discover a use case for boolean evaluation while doing this in the functools.total_ordering helpers. While it's legitimate, it *looks* wrong (the code looks like it didn't consider the possibility of NotImplemented even though it did), and really only applies to the case total_ordering handles on behalf of most folks (implementing one comparator in terms of two others). The specific case was: def _le_from_lt(self, other, NotImplemented=NotImplemented): 'Return a <= b. Computed by @total_ordering from (a < b) or (a == b).' op_result = self.__lt__(other) return op_result or self == other (with a similar implementation for _ge_from_gt). It happens to work because the return value of __lt__ is used directly for both True and NotImplemented cases, with only False delegating to equality. It's not at all clear that that's correct at first glance though, and the fix to avoid the warning is simple, matching the other 10 comparator helpers by explicit checking for NotImplemented via: if op_result is NotImplemented: return NotImplemented That's about the strongest case I can find for "legitimate" use of NotImplemented in a boolean context, so I figured I'd point it out explicitly so people knew it existed. If that makes an eventual TypeError a non-starter, I'd still like that usage to emit a warning (e.g. a RuntimeWarning) simply because the utility of that one little shortcut pales in comparison to the damage done by the *many* misuses that occur. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:50:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 May 2019 16:50:47 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557334247.92.0.684466340316.issue36843@roundup.psfhosted.org> STINNER Victor added the comment: Ok, so Python uses /dev/urandom. Can you try to read a few bytes from it? Like 256 bytes. You can try my dd command. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 12:51:36 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 08 May 2019 16:51:36 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557334296.04.0.551173233848.issue36816@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +13108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:00:25 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 08 May 2019 17:00:25 +0000 Subject: [issue36854] GC operates out of global runtime state. Message-ID: <1557334825.47.0.818401533303.issue36854@roundup.psfhosted.org> New submission from Eric Snow : (also see #24554) We need to move GC state from _PyRuntimeState to PyInterpreterState. ---------- assignee: eric.snow components: Interpreter Core messages: 341911 nosy: eric.snow, pablogsal priority: normal severity: normal status: open title: GC operates out of global runtime state. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:01:47 2019 From: report at bugs.python.org (Xi Ruoyao) Date: Wed, 08 May 2019 17:01:47 +0000 Subject: [issue24851] infinite loop in faulthandler._stack_overflow In-Reply-To: <1439412048.1.0.772925582506.issue24851@psf.upfronthosting.co.za> Message-ID: <1557334907.48.0.307110077132.issue24851@roundup.psfhosted.org> Change by Xi Ruoyao : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:01:56 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 08 May 2019 17:01:56 +0000 Subject: [issue36852] Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat In-Reply-To: <1557331268.61.0.662119534756.issue36852@roundup.psfhosted.org> Message-ID: <1557334916.22.0.177788401987.issue36852@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:05:33 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 08 May 2019 17:05:33 +0000 Subject: [issue36855] update tests relying on a copy of a TLS certificate (pem) to support two versions Message-ID: <1557335133.11.0.0798454230834.issue36855@roundup.psfhosted.org> New submission from Gregory P. Smith : We're having pain today due to the Lib/test/selfsigned_pythontestdotnet.pem certificate update sychronization. This wouldn't be painful if our tests relying on a specific certificate matching something elsewhere on the network supported multiple possible certificates. Specifically an old and a new cert. When doing that, we could go ahead and commit the new cert, moving the existing one to old, before flipping the update on the test infrastructure. in all branches. that'd prevent massive PR CI and buildbot failure fallout. ---------- components: Tests messages: 341912 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: update tests relying on a copy of a TLS certificate (pem) to support two versions type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:12:39 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 08 May 2019 17:12:39 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557335559.77.0.649235433598.issue35925@roundup.psfhosted.org> Julien Palard added the comment: ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:13:30 2019 From: report at bugs.python.org (Mitar) Date: Wed, 08 May 2019 17:13:30 +0000 Subject: [issue36841] Supporting customization of float encoding in JSON In-Reply-To: <1557261153.38.0.171143852563.issue36841@roundup.psfhosted.org> Message-ID: <1557335610.11.0.978606126367.issue36841@roundup.psfhosted.org> Mitar added the comment: That would be awesome! BTW, just as an additional example, JavaScrpt's JSON.stringify encodes NaN and Infinity to null. By having a custom function I could for example try to match such implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:20:30 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 08 May 2019 17:20:30 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557336030.68.0.84072263958.issue36816@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +13109 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:23:39 2019 From: report at bugs.python.org (Xi Ruoyao) Date: Wed, 08 May 2019 17:23:39 +0000 Subject: [issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled Message-ID: <1557336219.34.0.364472599022.issue36856@roundup.psfhosted.org> New submission from Xi Ruoyao : In faulthandler.c STACK_OVERFLOW_MAX_SIZE is defined to 100 * 1024 * 1024 (100MB). But recently KPTI has been applied to mitigate Meltdown (CVE-2017-5754) so the userspace stack pointer may be very close to 0xffffffff on Linux systems with 32-bit x86. For example, on my laptop it's sometimes 0xffffcc20. So the expression sp + STACK_OVERFLOW_MAX_SIZE overflows and becomes a very small number. That causes faulthandler._stack_overflow() to bail out after only one recursive call: Traceback (most recent call last): File "", line 1, in RuntimeError: unable to raise a stack overflow (allocated 4124 bytes on the stack, 1 recursive calls) ---------- components: Extension Modules messages: 341915 nosy: xry111 priority: normal severity: normal status: open title: faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:24:26 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 08 May 2019 17:24:26 +0000 Subject: [issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled In-Reply-To: <1557336219.34.0.364472599022.issue36856@roundup.psfhosted.org> Message-ID: <1557336266.51.0.368887270545.issue36856@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:27:59 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 08 May 2019 17:27:59 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557336479.32.0.0727139333194.issue36816@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +13110 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:29:49 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 08 May 2019 17:29:49 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557336589.36.0.0733691151715.issue36816@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +13111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:30:14 2019 From: report at bugs.python.org (Carl Meyer) Date: Wed, 08 May 2019 17:30:14 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1557336614.08.0.91614151213.issue31033@roundup.psfhosted.org> Change by Carl Meyer : ---------- nosy: +carljm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:32:28 2019 From: report at bugs.python.org (Kushal Das) Date: Wed, 08 May 2019 17:32:28 +0000 Subject: [issue24758] unittest.mock.Mock's new "unsafe" feature needs a better error message In-Reply-To: <1438283225.26.0.251368779344.issue24758@psf.upfronthosting.co.za> Message-ID: <1557336748.7.0.565790085974.issue24758@roundup.psfhosted.org> Kushal Das added the comment: New changeset b9b08cd948de97d756a199b60becce8397a8c882 by Kushal Das (Zackery Spytz) in branch 'master': bpo-24758: Improve the error msg for unittest.mock.Mock()'s unsafe mode (#12991) https://github.com/python/cpython/commit/b9b08cd948de97d756a199b60becce8397a8c882 ---------- nosy: +kushal.das _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:33:08 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 08 May 2019 17:33:08 +0000 Subject: [issue36831] ElementTree.find attribute matching with empty namespace In-Reply-To: <1557235199.92.0.526138899784.issue36831@roundup.psfhosted.org> Message-ID: <1557336788.02.0.839211735165.issue36831@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch pull_requests: +13112 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:38:48 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 08 May 2019 17:38:48 +0000 Subject: [issue36540] PEP 570: Python Positional-Only Parameters In-Reply-To: <1554512763.87.0.931597726758.issue36540@roundup.psfhosted.org> Message-ID: <1557337128.43.0.390286100754.issue36540@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:51:06 2019 From: report at bugs.python.org (Michael Blahay) Date: Wed, 08 May 2019 17:51:06 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557337866.11.0.000362398132708.issue27639@roundup.psfhosted.org> Change by Michael Blahay : ---------- pull_requests: +13114 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:52:03 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 08 May 2019 17:52:03 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557337923.17.0.599803328927.issue36783@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13115 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:57:57 2019 From: report at bugs.python.org (Xi Ruoyao) Date: Wed, 08 May 2019 17:57:57 +0000 Subject: [issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled In-Reply-To: <1557336219.34.0.364472599022.issue36856@roundup.psfhosted.org> Message-ID: <1557338277.11.0.795905610479.issue36856@roundup.psfhosted.org> Change by Xi Ruoyao : ---------- keywords: +patch pull_requests: +13116 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 13:58:29 2019 From: report at bugs.python.org (Brian Quinlan) Date: Wed, 08 May 2019 17:58:29 +0000 Subject: [issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers In-Reply-To: <1439823540.4.0.657998470812.issue24882@psf.upfronthosting.co.za> Message-ID: <1557338309.87.0.315116847878.issue24882@roundup.psfhosted.org> Brian Quinlan added the comment: When I first wrote and started using ThreadPoolExecutor, I had a lot of code like this: with ThreadPoolExecutor(max_workers=500) as e: e.map(download, images) I didn't expect that `images` would be a large list but, if it was, I wanted all of the downloads to happen in parallel. I didn't want to have to explicitly take into account the list size when starting the executor (e.g. max_works=min(500, len(images))) but I also didn't want to create 500 threads up front when I only needed a few. My use case involved transient ThreadPoolExecutors so I didn't have to worry about idle threads. In principle, I'd be OK with trying to avoid unnecessary thread creation if the implementation can be simple and efficient enough. https://github.com/python/cpython/pull/6375 seems simple enough but I haven't convinced myself that it works yet ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:04:58 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 May 2019 18:04:58 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1557338698.23.0.166578668741.issue26903@roundup.psfhosted.org> Steve Dower added the comment: New changeset 39889864c09741909da4ec489459d0197ea8f1fc by Steve Dower (Brian Quinlan) in branch 'master': bpo-26903: Limit ProcessPoolExecutor to 61 workers on Windows (GH-13132) https://github.com/python/cpython/commit/39889864c09741909da4ec489459d0197ea8f1fc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:05:04 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 08 May 2019 18:05:04 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1557338704.23.0.743189834162.issue26903@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13117 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:09:54 2019 From: report at bugs.python.org (Michael Blahay) Date: Wed, 08 May 2019 18:09:54 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557338994.03.0.555928325877.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: PR 13150, the recreation of PR 4981, was noticed just after I created PR 13169. It was decided to continue forward with PR 13169 since PR 13150 contained changes that were out of scope for BPO-27639 for which it was suspected might have been the cause of the non-merging of PR 4981. Thank for identifying Dmitry; I did my best to give credit where credit was due. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:11:05 2019 From: report at bugs.python.org (Pam McA'Nulty) Date: Wed, 08 May 2019 18:11:05 +0000 Subject: [issue35813] shared memory construct to avoid need for serialization between processes In-Reply-To: <1548302525.41.0.348784694633.issue35813@roundup.psfhosted.org> Message-ID: <1557339065.5.0.102474185102.issue35813@roundup.psfhosted.org> Pam McA'Nulty added the comment: Reviewing docs and am writing a queue implementation for usability testing. I think ShareableList needs to support `close()` and `unlink()` directly. The `.shm` attribute should be considered an _implementation_ detail, and not be exposed. ---------- nosy: +Pam.McANulty _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:11:15 2019 From: report at bugs.python.org (John Belmonte) Date: Wed, 08 May 2019 18:11:15 +0000 Subject: [issue36857] bisect should support descending order Message-ID: <1557339075.35.0.730492365284.issue36857@roundup.psfhosted.org> New submission from John Belmonte : because "list.pop()" use case: maintain large ordered list and efficiently remove min item list.pop() is O(1) but yields the max item. There is no efficient removal of the min item. list is by far the fastest collection to use with insort(). While deque offers O(1) popleft(), insort() performance with deque is not acceptable. Lack of descending support in bisect necessitates workarounds such as using negative-valued items, which hurts code readability and moreover assumes that values are numbers. ---------- components: Library (Lib) messages: 341921 nosy: John Belmonte priority: normal severity: normal status: open title: bisect should support descending order type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:16:16 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 08 May 2019 18:16:16 +0000 Subject: [issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled In-Reply-To: <1557336219.34.0.364472599022.issue36856@roundup.psfhosted.org> Message-ID: <1557339376.6.0.303737530366.issue36856@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Are uintptr_t overflow/underflow semantics a defined behavior? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:19:13 2019 From: report at bugs.python.org (Xi Ruoyao) Date: Wed, 08 May 2019 18:19:13 +0000 Subject: [issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled In-Reply-To: <1557336219.34.0.364472599022.issue36856@roundup.psfhosted.org> Message-ID: <1557339553.21.0.897254578429.issue36856@roundup.psfhosted.org> Xi Ruoyao added the comment: > Are uintptr_t overflow/underflow semantics a defined behavior? Yes. Unlike signed overflow, unsigned overflow is defined to be 2's complement. The problem is this overflow results a wrong stack pointer limit and breaks _stack_overflow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:27:22 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 08 May 2019 18:27:22 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557340042.35.0.149815885432.issue36778@roundup.psfhosted.org> Paul Monson added the comment: cp65001 is the default codepage on Windows IoT Core and Windows NanoServer. There is also an option in control panel in Windows desktop 1809 (version 17763) and greater which changes the default codepage to cp65001. 1. Run control.exe 2. Click Clock and Region> change date, time or number formats 3. Click administrative tab 4. Click "Change System locale..." button 5. Check "Beta: Use Unicode UTF-8 for worldwide language support" 6. Click OK twice. 7. You will be prompted to reboot. > Code page 65001 handles lone surrogate differently on Windows XP and older. If I read the docs correctly a lone surrogate is an error. I don't think a corner case like handling errors differently makes cp65001 not UTF-8. Am I misunderstanding this point? Also, Why is Windows XP still relevant in this discussion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:28:43 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 08 May 2019 18:28:43 +0000 Subject: [issue36857] bisect should support descending order In-Reply-To: <1557339075.35.0.730492365284.issue36857@roundup.psfhosted.org> Message-ID: <1557340123.66.0.0300703606294.issue36857@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:29:50 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 08 May 2019 18:29:50 +0000 Subject: [issue35924] curses segfault resizing window In-Reply-To: <1549497741.38.0.310308715457.issue35924@roundup.psfhosted.org> Message-ID: <1557340190.08.0.631456386705.issue35924@roundup.psfhosted.org> Toshio Kuratomi added the comment: My upstream (ncurses) bug report: http://lists.gnu.org/archive/html/bug-ncurses/2019-05/msg00010.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:38:36 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 May 2019 18:38:36 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557340716.04.0.147159548182.issue36778@roundup.psfhosted.org> Steve Dower added the comment: The XP/Vista change is just context - we don't have to worry about OS that old any more. If we remove the functools.partial call, does that help? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:41:16 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 08 May 2019 18:41:16 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557340876.48.0.293239977306.issue30458@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- pull_requests: +13118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:49:19 2019 From: report at bugs.python.org (Berker Peksag) Date: Wed, 08 May 2019 18:49:19 +0000 Subject: [issue30271] Make sqlite3 statement cache optional In-Reply-To: <1493924630.07.0.362744800273.issue30271@psf.upfronthosting.co.za> Message-ID: <1557341359.66.0.163501624021.issue30271@roundup.psfhosted.org> Berker Peksag added the comment: I'd prefer disabling statement cache implicitly when set_authorizer() is called. There's no need to expose this to end users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:54:59 2019 From: report at bugs.python.org (Ying Wang) Date: Wed, 08 May 2019 18:54:59 +0000 Subject: [issue36620] Documentation missing parameter for Itertools.zip_longest In-Reply-To: <1555099757.43.0.201440165942.issue36620@roundup.psfhosted.org> Message-ID: <1557341699.93.0.339073644984.issue36620@roundup.psfhosted.org> Ying Wang added the comment: I would like to take a stab at this as a first-time CPython contributor. ---------- nosy: +Ying Wang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 14:55:32 2019 From: report at bugs.python.org (Robert Boehne) Date: Wed, 08 May 2019 18:55:32 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557341732.45.0.752202453264.issue36843@roundup.psfhosted.org> Robert Boehne added the comment: Opening /dev/urandom seems to return -1 (dbx) print buffer 0x09001000a5f49380 (dbx) print size 24 (dbx) print raise 0 (dbx) step stopped in dev_urandom at line 311 in file "/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c" ($t1) 311 if (raise) { (dbx) step stopped in dev_urandom at line 378 in file "/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c" ($t1) 378 fd = _Py_open_noraise("/dev/urandom", O_RDONLY); (dbx) next stopped in dev_urandom at line 379 in file "/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c" ($t1) 379 if (fd < 0) { (dbx) print fd -1 (dbx) step stopped in dev_urandom at line 380 in file "/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c" ($t1) 380 return -1; (dbx) step stopped in dev_urandom at line 401 in file "/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c" ($t1) 401 } (dbx) step stopped in pyurandom at line 519 in file "/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c" ($t1) 519 } (dbx) step stopped in unnamed block in _Py_HashRandomization_Init at line 611 in file "/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c" ($t1) 611 if (res < 0) { (dbx) step stopped in unnamed block in _Py_HashRandomization_Init at line 612 in file "/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/Python/bootstrap_hash.c" ($t1) 612 return _Py_INIT_USER_ERR("failed to get random numbers " (dbx) continue continue ^ unrecognized command (dbx) cont Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 15:09:55 2019 From: report at bugs.python.org (Robert Boehne) Date: Wed, 08 May 2019 19:09:55 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557342595.87.0.579918099913.issue36843@roundup.psfhosted.org> Robert Boehne added the comment: The call to open("/dev/urandom", flags) is returning -1, and errno is set to 22, EINVAL - Invalid argument. could the flags be set incorrectly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 15:17:03 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 08 May 2019 19:17:03 +0000 Subject: [issue29779] New environment variable PYTHONHISTORY In-Reply-To: <1489133424.79.0.6086605998.issue29779@psf.upfronthosting.co.za> Message-ID: <1557343023.33.0.262607085196.issue29779@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13119 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 15:21:04 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 08 May 2019 19:21:04 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557343264.78.0.285168190766.issue36816@roundup.psfhosted.org> Ned Deily added the comment: New changeset 2b9d7abdbd4b41e2c624858f5bc80da59d8a681d by Ned Deily (Gregory P. Smith) in branch '3.6': [3.6] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13198) https://github.com/python/cpython/commit/2b9d7abdbd4b41e2c624858f5bc80da59d8a681d ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 15:25:57 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 08 May 2019 19:25:57 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557343557.41.0.119109141266.issue30458@roundup.psfhosted.org> Charalampos Stratakis added the comment: A small clarification on the differences of those two CVE's. CVE-2019-9740: CLRF sequences are not properly handled in python built-in modules urllib/urllib2 in the query part of the url parameter of urlopen() function CVE-2019-9947: CLRF sequences are not properly handled in python built-in modules urllib/urllib2 in the path part of the url parameter of urlopen() function ---------- nosy: +cstratak -hroncok, koobs, ned.deily versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 15:38:22 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 08 May 2019 19:38:22 +0000 Subject: [issue35924] curses segfault resizing window In-Reply-To: <1549497741.38.0.310308715457.issue35924@roundup.psfhosted.org> Message-ID: <1557344302.89.0.6897926732.issue35924@roundup.psfhosted.org> Change by Toshio Kuratomi : ---------- keywords: +patch pull_requests: +13120 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 15:40:28 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 08 May 2019 19:40:28 +0000 Subject: [issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types. In-Reply-To: <1549377622.96.0.737929222958.issue35900@roundup.psfhosted.org> Message-ID: <1557344428.71.0.418383840929.issue35900@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 65d98d0f53f558d7c799098da0abf376068c15fd by Antoine Pitrou (Pierre Glaser) in branch 'master': bpo-35900: Add a state_setter arg to save_reduce (GH-12588) https://github.com/python/cpython/commit/65d98d0f53f558d7c799098da0abf376068c15fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 15:50:08 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 May 2019 19:50:08 +0000 Subject: [issue36857] bisect should support descending order In-Reply-To: <1557339075.35.0.730492365284.issue36857@roundup.psfhosted.org> Message-ID: <1557345008.32.0.107105326946.issue36857@roundup.psfhosted.org> Raymond Hettinger added the comment: Sorry, I don't think this is a worthwhile API extension. The bisect module is primarily about searching for cut points between ranges. For your use case, consider using blist or one of the many ordered collection recipes on PyPI (for example: http://www.grantjenks.com/docs/sortedcollections/ ). ---------- assignee: -> rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 15:50:37 2019 From: report at bugs.python.org (Brian Quinlan) Date: Wed, 08 May 2019 19:50:37 +0000 Subject: [issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers In-Reply-To: <1439823540.4.0.657998470812.issue24882@psf.upfronthosting.co.za> Message-ID: <1557345037.45.0.768370580572.issue24882@roundup.psfhosted.org> Brian Quinlan added the comment: After playing with it for a while, https://github.com/python/cpython/pull/6375 seems reasonable to me. It needs tests and some documentation. Antoine, are you still -1 because of the complexity increase? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 15:59:10 2019 From: report at bugs.python.org (Robert Boehne) Date: Wed, 08 May 2019 19:59:10 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557345550.32.0.999469181021.issue36843@roundup.psfhosted.org> Robert Boehne added the comment: Reading a few bytes from /dev/urandom via dd: robb at nepal:/raid/checkouts-raid/robb/nepal/build-py37$ dd if=/dev/urandom bs=256 count=1 ??S?(#L???????????~]?B?^??8?f&?_|Vi??@??[joG>St??;?$?1?*??24???RD?"4`??a?#???f??? ?} ??^z????????C?@?"?.^?gn??p?t?R*=??8*?L?? 8??bu?????8???`??y???K?.?~?#5?t??h?e!?G@)B?R???(9kL????X??BUH5=?||??El???a????+????n@??V?c?N?^??y?n??]??$??Mp?,#???K?i8?`?????v??????~`L?1+0 records in. 1+0 records out. robb at nepal:/raid/checkouts-raid/robb/nepal/build-py37$ dd if=/dev/urandom bs=256 count=1 _d?(?n???1bR?{??I??"?"|???E p??^??q#?? ~yZ$u??e}?3?????????qw#?????{*T1+0 records in.nR)?-?B???x??{~h?????+?7??V????W??"?d?n??V??t??R(\YC?3=?p?-??m??P???A?M??68??????9Y?](??xn+?a???????????W 1+0 records out. robb at nepal:/raid/checkouts-raid/robb/nepal/build-py37$ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 16:01:26 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 08 May 2019 20:01:26 +0000 Subject: [issue36620] Documentation missing parameter for Itertools.zip_longest In-Reply-To: <1555099757.43.0.201440165942.issue36620@roundup.psfhosted.org> Message-ID: <1557345686.29.0.453005200244.issue36620@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +13121 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 16:01:49 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 08 May 2019 20:01:49 +0000 Subject: [issue36857] bisect should support descending order In-Reply-To: <1557339075.35.0.730492365284.issue36857@roundup.psfhosted.org> Message-ID: <1557345709.13.0.252206460999.issue36857@roundup.psfhosted.org> R?mi Lapeyre added the comment: If issue4356 is accepted, I think it may be possible to use `key=lambda e: -e`. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 16:08:19 2019 From: report at bugs.python.org (Michael Blahay) Date: Wed, 08 May 2019 20:08:19 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1557346099.3.0.335259508376.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: Okay, so the expected output after running parse.parse_args([]) is Namespace(['nothing']) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 16:15:15 2019 From: report at bugs.python.org (Michael Blahay) Date: Wed, 08 May 2019 20:15:15 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1557346515.75.0.955983412541.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: Ryan, I have reviewed the documentation at https://docs.python.org/3/library/argparse.html#nargs and must admit that there is not a definitive answer that I can see regarding the defined behavior should there be no command line arguments that are in fact remaining. One could certainly argue that the empty list is the expression of the fact that no remaining arguments could be found. One can also argue that when seeking the remaining arguments, a list that may be zero to many elements in size, that by definition there cannot be a default. Can you cite any documentation that would support your claim? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 16:28:54 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 08 May 2019 20:28:54 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557347334.65.0.689071107785.issue36817@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 9a4135e939bc223f592045a38e0f927ba170da32 by Eric V. Smith in branch 'master': bpo-36817: Add f-string debugging using '='. (GH-13123) https://github.com/python/cpython/commit/9a4135e939bc223f592045a38e0f927ba170da32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 16:33:10 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 08 May 2019 20:33:10 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557347590.58.0.169519885442.issue36817@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 16:36:56 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 08 May 2019 20:36:56 +0000 Subject: [issue36858] f-string '=' debugging output needs to be documented Message-ID: <1557347816.05.0.714667733239.issue36858@roundup.psfhosted.org> New submission from Eric V. Smith : There are two problems here: what to call this feature, and where to put it. The current f-string documentation is in Doc/reference/lexical_analysis.rst, which I'm not sure is the best place to add discussion about how this feature works. This feature is run-time behavior, and goes beyond what the lexer documentation should show. ---------- assignee: docs at python components: Documentation messages: 341941 nosy: docs at python, eric.smith priority: normal severity: normal status: open title: f-string '=' debugging output needs to be documented type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 16:45:57 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 08 May 2019 20:45:57 +0000 Subject: [issue6981] locale.getdefaultlocale() envvars default code and documentation mismatch In-Reply-To: <1253734503.58.0.404575668112.issue6981@psf.upfronthosting.co.za> Message-ID: <1557348357.47.0.278364410267.issue6981@roundup.psfhosted.org> Toshio Kuratomi added the comment: Hey doko, I was just looking through the oldest gettext bugs and found this bug open. It was caused by your commits here: https://bugs.python.org/issue1166948 . It feels like we have a few choices: * revert the LANGUAGE ordering change which would take us back to the 2.6 behaviour. * update the documentation to reflect the new ordering [Since the change has been around for so long, I think this is my personal favorite] * Remove LANGUAGE from setting the defaultlocale because the GNU gettext usage of this variable is actually very different than what we're doing here. It seems like it should only affect LC_MESSAGES and should affect those only as a fallback. * Revert the LANGUAGE ordering change to the beginning of the list but remove it from consideration as a source for the *encoding*. what do you think? ---------- nosy: +a.badger, doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 17:02:40 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 08 May 2019 21:02:40 +0000 Subject: [issue14353] Proper gettext support in locale module In-Reply-To: <1332017397.14.0.261241263671.issue14353@psf.upfronthosting.co.za> Message-ID: <1557349360.82.0.655202676516.issue14353@roundup.psfhosted.org> Toshio Kuratomi added the comment: As this problem does not affect Python3 I think it's up to the 2.7 release manager to decide if it should be merged. benjamin, what do you think? If you want it, I'll open a PR on github for it. ---------- nosy: +a.badger, benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 17:08:30 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 08 May 2019 21:08:30 +0000 Subject: [issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types. In-Reply-To: <1549377622.96.0.737929222958.issue35900@roundup.psfhosted.org> Message-ID: <1557349710.96.0.567298856247.issue35900@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 289f1f80ee87a4baf4567a86b3425fb3bf73291d by Antoine Pitrou (Pierre Glaser) in branch 'master': bpo-35900: Enable custom reduction callback registration in _pickle (GH-12499) https://github.com/python/cpython/commit/289f1f80ee87a4baf4567a86b3425fb3bf73291d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 17:08:54 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 08 May 2019 21:08:54 +0000 Subject: [issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types. In-Reply-To: <1549377622.96.0.737929222958.issue35900@roundup.psfhosted.org> Message-ID: <1557349734.72.0.767526768696.issue35900@roundup.psfhosted.org> Antoine Pitrou added the comment: Both PRs are now merged. Thank you Pierre! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 17:13:13 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 08 May 2019 21:13:13 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557349993.01.0.76993149439.issue36816@roundup.psfhosted.org> miss-islington added the comment: New changeset 6daaf3f7de78eec2c80eaa8e94e4cca54f758a30 by Miss Islington (bot) (Gregory P. Smith) in branch '3.7': [3.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13197) https://github.com/python/cpython/commit/6daaf3f7de78eec2c80eaa8e94e4cca54f758a30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 17:13:37 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 08 May 2019 21:13:37 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557350017.92.0.572694724391.issue36778@roundup.psfhosted.org> Change by Paul Monson : ---------- pull_requests: +13122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 17:19:21 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 08 May 2019 21:19:21 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557350361.78.0.817418105962.issue36778@roundup.psfhosted.org> Paul Monson added the comment: Removing import functools from cp65001.py fixes test_startup_imports. Victor proposed this PR: https://github.com/python/cpython/pull/13110 but new test_codecs fails because it's passing self on to the lambda I think. I tried to build on Victor's change but there is still one test failure I haven't tracked down yet: https://github.com/python/cpython/pull/13211 FAIL: test_incremental_surrogatepass (test.test_codecs.CP65001Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\master\pythond\lib\test\test_codecs.py", line 436, in test_incremental_surrogatepass self.assertEqual(dec.decode(data[i:], True), '\uD901') AssertionError: '' != '\ud901' + \ud901 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 17:46:59 2019 From: report at bugs.python.org (mbiggs) Date: Wed, 08 May 2019 21:46:59 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes In-Reply-To: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> Message-ID: <1557352019.23.0.758380405055.issue36789@roundup.psfhosted.org> mbiggs added the comment: Ah sent a pull request but didn't realize that redshiftzero already had. Their PR looks good to me. Thanks for fixing this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 19:08:24 2019 From: report at bugs.python.org (Charles) Date: Wed, 08 May 2019 23:08:24 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs Message-ID: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> New submission from Charles : In statement.c, there is some logic which detects whether or not an incoming statement is a DML-type. The logic, as of 2019-05-08, I am referring to is here: https://github.com/python/cpython/blob/fc662ac332443a316a120fa5287c235dc4f8739b/Modules/_sqlite/statement.c#L78-L93 To demonstrate the bug: import sqlite3 conn = sqlite3.connect(':memory:') conn.execute('create table kv ("key" text primary key, "value" integer)') conn.execute('insert into kv (key, value) values (?, ?), (?, ?)', ('k1', 1, 'k2', 2)) assert conn.in_transaction # Yes we are in a transaction. conn.commit() assert not conn.in_transaction # Not anymore, as expected. rc = conn.execute( 'with c(k, v) as (select key, value + 10 from kv) ' 'update kv set value=(select v from c where k=kv.key)') print(rc.rowcount) # Should be 2, prints "-1". #assert conn.in_transaction # !!! Fails. curs = conn.execute('select * from kv order by key;') print(curs.fetchall()) # [('k1', 11), ('k2', 12)] ---------- components: Library (Lib) messages: 341949 nosy: coleifer priority: normal severity: normal status: open title: sqlite3 dml statement detection does not account for CTEs type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 20:18:50 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 09 May 2019 00:18:50 +0000 Subject: [issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully In-Reply-To: <1435666041.75.0.103684760482.issue24538@psf.upfronthosting.co.za> Message-ID: <1557361130.45.0.769263207184.issue24538@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +13123 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 20:53:25 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 09 May 2019 00:53:25 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1557363205.33.0.301321022612.issue36816@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 7b5dca8345f4a909367836a3a2c3c7ac6e4e2c0c by Gregory P. Smith in branch '2.7': [2.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13199) https://github.com/python/cpython/commit/7b5dca8345f4a909367836a3a2c3c7ac6e4e2c0c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 21:00:39 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 09 May 2019 01:00:39 +0000 Subject: [issue36832] Port zipp to zipfile In-Reply-To: <1557236857.3.0.339513388865.issue36832@roundup.psfhosted.org> Message-ID: <1557363639.04.0.650864160916.issue36832@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +13124 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 21:07:47 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 01:07:47 +0000 Subject: [issue12188] PEP 7 (or guide) add C style policies and explanation In-Reply-To: <1306433972.91.0.882585972593.issue12188@psf.upfronthosting.co.za> Message-ID: <1557364067.63.0.139496896496.issue12188@roundup.psfhosted.org> anthony shaw added the comment: Hi, This discussion came to a stop, but it doesn't seem conclusive. PEP discussions are now in GitHub on https://github.com/python/peps/issues so I'm going to close this BPO issue. There is no additional section in PEP 7 for this level of detail, there is also no tooling in place (afaik) to retroactively apply or inspect these types of issues, so this would need to be discussed in the PEP issue, ---------- nosy: +anthonypjshaw stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 21:14:29 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 01:14:29 +0000 Subject: [issue24263] unittest cannot load module whose name starts with Unicode In-Reply-To: <1435031451.77.0.239152930978.issue24263@psf.upfronthosting.co.za> Message-ID: <1557364469.13.0.0498724370974.issue24263@roundup.psfhosted.org> anthony shaw added the comment: thanks, will wait for a review from Serhiy, Rbcollins or ezio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 22:17:50 2019 From: report at bugs.python.org (Alex) Date: Thu, 09 May 2019 02:17:50 +0000 Subject: [issue36860] Inconsistent/Undocumented behavior with pathlib resolve and absolute on Windows Message-ID: <1557368270.63.0.171172492568.issue36860@roundup.psfhosted.org> New submission from Alex : Maybe I am doing something wrong here but: On Windows 10: > python --version Python 3.7.1 > python >>> from pathlib import Path >>> Path("test.py").resolve() WindowsPath('test.py') >>> Path("test.py").absolute() # this is undocumented in https://docs.python.org/3.7/library/pathlib.html WindowsPath('C:/Users/Name/Desktop/test.py') On Ubuntu 18.04 LTS: $ python3.7 --version Python 3.7.3 $ python3.7 >>> from pathlib import Path >>> Path("test.py").resolve() PosixPath('/home/name/test.py') >>> Path("test.py").absolute() # same as above undocumented PosixPath('/home/name/test.py') Why in Windows does this fail, but not Linux? Why is .absolute() undocumented? I've looked around trying to figure out what the intended behavior is but there is conflicting information. Resolve seems to not work correctly on Windows. Bug? ---------- components: Library (Lib), Windows messages: 341953 nosy: alexjacobson95, eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Inconsistent/Undocumented behavior with pathlib resolve and absolute on Windows type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 22:50:38 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 09 May 2019 02:50:38 +0000 Subject: [issue36861] Update to Unicode 12.1.0 Message-ID: <1557370238.97.0.687491315858.issue36861@roundup.psfhosted.org> New submission from Benjamin Peterson : A minor release of Unicode 12 has been issued to pick up the Reiwa ligature: http://blog.unicode.org/2019/05/unicode-12-1-en.html We're already using Unicode 12.0.0, so this is will be a very minor upgrade. ---------- assignee: benjamin.peterson messages: 341954 nosy: benjamin.peterson priority: normal severity: normal status: open title: Update to Unicode 12.1.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 23:31:49 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 09 May 2019 03:31:49 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557372709.91.0.0173508694847.issue36778@roundup.psfhosted.org> Eryk Sun added the comment: > FYI, I expect cp65001 will be used more widely in near future, [...] > It seems use `SetConsoleOutputCP(65001)` and `SetConsoleCP(65001)`. Unless PYTHONLEGACYWINDOWSSTDIO is defined, Python 3.6+ doesn't use the console's codepage-based interface (except for low-level os.read and os.write). Console files uses the wide-character console API internally, and have a "utf-8" encoding. "cp65001" isn't a factor in this context. This issue probably occurs due to the encoding returned by locale.getpreferredencoding(). This calls _locale._getdefaultlocale, which returns a tuple that mixes the user locale with the system ANSI codepage. For example, with ANSI set to UTF-8 (Windows 10): >>> _locale._getdefaultlocale() ('en_GB', 'cp65001') The Universal CRT special cases CP_UTF8 (codepage 65001) as "utf8" and accepts "utf-8" as an alias. For example, after setting the ANSI codepage to UTF-8: >>> locale.setlocale(locale.LC_CTYPE, '') 'English_United Kingdom.utf8' Python could similarly special case CP_UTF8 as "utf-8" in _locale._getdefaultlocale. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 23:39:01 2019 From: report at bugs.python.org (Charles) Date: Thu, 09 May 2019 03:39:01 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1557373141.8.0.101226707583.issue36859@roundup.psfhosted.org> Charles added the comment: Sqlite since 3.7.11 provides sqlite3_stmt_readonly() API for determining if a prepared statement will affect the database. I made the change, removing the SQL scanning code and replacing it with: self->is_dml = !sqlite3_stmt_readonly(self->st); But then I see a number of test failures, mostly related to the fact that table-creation is now treated as "is_dml" with the above change. I don't know if the above API is going to be a workable path forward, since it seems like DML statements *not* automatically starting a transaction is a behavior a lot of people may have come to depend on (whether or not it is correct). I've attached a patch just-in-case anyone's interested. ---------- keywords: +patch Added file: https://bugs.python.org/file48319/36859.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 23:40:43 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 May 2019 03:40:43 +0000 Subject: [issue36620] Documentation missing parameter for Itertools.zip_longest In-Reply-To: <1555099757.43.0.201440165942.issue36620@roundup.psfhosted.org> Message-ID: <1557373243.02.0.0730663254378.issue36620@roundup.psfhosted.org> Raymond Hettinger added the comment: Sorry, I don't want to do this in the summary table. The goal of the table is to provide a minimal overview to help select the appropriate itertool and to provide a fast link to the details given below. ---------- assignee: Mariatta -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 23:42:54 2019 From: report at bugs.python.org (Charles) Date: Thu, 09 May 2019 03:42:54 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1557373374.65.0.686039514625.issue36859@roundup.psfhosted.org> Charles added the comment: Oh, one more thing that is actually quite important -- since BEGIN IMMEDIATE and BEGIN EXCLUSIVE "modify" the database, these statements (intended to begin a transaction) are treated as "is_dml" when using the sqlite3_stmt_readonly API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 23:44:57 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 09 May 2019 03:44:57 +0000 Subject: [issue36861] Update to Unicode 12.1.0 In-Reply-To: <1557370238.97.0.687491315858.issue36861@roundup.psfhosted.org> Message-ID: <1557373497.1.0.318991606723.issue36861@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +13125 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 23:46:20 2019 From: report at bugs.python.org (Ying Wang) Date: Thu, 09 May 2019 03:46:20 +0000 Subject: [issue36620] Documentation missing parameter for Itertools.zip_longest In-Reply-To: <1555099757.43.0.201440165942.issue36620@roundup.psfhosted.org> Message-ID: <1557373580.25.0.259002912386.issue36620@roundup.psfhosted.org> Ying Wang added the comment: @rhettinger should this issue be closed if no action is to be taken? If so, should I manually close the pull request referencing this issue, or will that be automatically handled by the Python bug tracker? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 8 23:59:38 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 09 May 2019 03:59:38 +0000 Subject: [issue36861] Update to Unicode 12.1.0 In-Reply-To: <1557370238.97.0.687491315858.issue36861@roundup.psfhosted.org> Message-ID: <1557374378.37.0.346269153273.issue36861@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 3aca40d3cb4b9b6741cf3073d71fbfc682cab96d by Benjamin Peterson in branch 'master': closes bpo-36861: Update Unicode database to 12.1.0. (GH-13214) https://github.com/python/cpython/commit/3aca40d3cb4b9b6741cf3073d71fbfc682cab96d ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:12:20 2019 From: report at bugs.python.org (Charles) Date: Thu, 09 May 2019 04:12:20 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1557375140.49.0.613724694003.issue36859@roundup.psfhosted.org> Charles added the comment: I've got a patch working now that: - retains complete backwards-compatibility for DDL (as well as BEGIN EXCLUSIVE/IMMEDIATE) -- tests are passing locally. - retains previous behavior for old sqlite that do not have the sqlite3_stmt_readonly API. I think this should be good-to-go and I've in fact merged a similar patch on my own standalone pysqlite3 package. Also I will add that the little 'test script' I provided is working as-expected with this patch applied. ---------- Added file: https://bugs.python.org/file48320/36859-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:17:35 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 09 May 2019 04:17:35 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1557375455.14.0.165990909281.issue36859@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: CPython now accepts PRs on GitHub. Please try raising a PR as per devuguide : https://devguide.python.org/ ---------- nosy: +berker.peksag, xtreak versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:41:59 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 04:41:59 +0000 Subject: [issue36862] Add Visual Studio 2019 support to PCBuild/env.bat Message-ID: <1557376919.34.0.533849563508.issue36862@roundup.psfhosted.org> New submission from anthony shaw : The PCBuild tool should support VS2019 but default to 2017 as per documentation. PR to follow. ---------- assignee: anthonypjshaw components: Build messages: 341963 nosy: anthonypjshaw priority: normal severity: normal status: open title: Add Visual Studio 2019 support to PCBuild/env.bat type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:42:20 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 04:42:20 +0000 Subject: [issue36862] Add Visual Studio 2019 support to PCBuild/env.bat In-Reply-To: <1557376919.34.0.533849563508.issue36862@roundup.psfhosted.org> Message-ID: <1557376940.55.0.525199901738.issue36862@roundup.psfhosted.org> Change by anthony shaw : ---------- keywords: +patch pull_requests: +13126 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:42:39 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 04:42:39 +0000 Subject: [issue36862] Add Visual Studio 2019 support to PCBuild/env.bat In-Reply-To: <1557376919.34.0.533849563508.issue36862@roundup.psfhosted.org> Message-ID: <1557376959.8.0.220292645536.issue36862@roundup.psfhosted.org> Change by anthony shaw : ---------- nosy: +steve.dower stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:44:31 2019 From: report at bugs.python.org (Charles) Date: Thu, 09 May 2019 04:44:31 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1557377071.6.0.889863887968.issue36859@roundup.psfhosted.org> Change by Charles : ---------- pull_requests: +13127 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:53:31 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 04:53:31 +0000 Subject: [issue36552] Replace OverflowError with ValueError when calculating length of range objects > PY_SIZE_MAX In-Reply-To: <1554698296.6.0.519379747153.issue36552@roundup.psfhosted.org> Message-ID: <1557377611.01.0.159529092204.issue36552@roundup.psfhosted.org> Change by anthony shaw : ---------- assignee: -> anthonypjshaw nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:53:37 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 04:53:37 +0000 Subject: [issue36551] Optimize list comprehensions with preallocate size and protect against overflow In-Reply-To: <1554686901.99.0.0374079193358.issue36551@roundup.psfhosted.org> Message-ID: <1557377617.37.0.201322370944.issue36551@roundup.psfhosted.org> Change by anthony shaw : ---------- assignee: -> anthonypjshaw nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:53:47 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 04:53:47 +0000 Subject: [issue36500] Add "regen-*" equivalent projects for Windows builds In-Reply-To: <1554164014.38.0.603917502843.issue36500@roundup.psfhosted.org> Message-ID: <1557377627.87.0.62450395133.issue36500@roundup.psfhosted.org> Change by anthony shaw : ---------- assignee: -> anthonypjshaw nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:54:19 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 04:54:19 +0000 Subject: [issue35668] Improve test coverage for idlelib In-Reply-To: <1546724660.21.0.411261013357.issue35668@roundup.psfhosted.org> Message-ID: <1557377659.39.0.452311082436.issue35668@roundup.psfhosted.org> Change by anthony shaw : ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 00:59:59 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 May 2019 04:59:59 +0000 Subject: [issue30271] Make sqlite3 statement cache optional In-Reply-To: <1493924630.07.0.362744800273.issue30271@psf.upfronthosting.co.za> Message-ID: <1557377999.97.0.375585437578.issue30271@roundup.psfhosted.org> Raymond Hettinger added the comment: > I do believe we should allow the user to disable the cache. Why? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 01:22:53 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 09 May 2019 05:22:53 +0000 Subject: [issue36831] ElementTree.find attribute matching with empty namespace In-Reply-To: <1557235199.92.0.526138899784.issue36831@roundup.psfhosted.org> Message-ID: <1557379373.34.0.726726773619.issue36831@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 88db8bd0648588c67eeab16d0bc72ec5c206e3ad by Stefan Behnel in branch 'master': bpo-36831: Do not apply default namespace to unprefixed attributes in ElementPath. (#13201) https://github.com/python/cpython/commit/88db8bd0648588c67eeab16d0bc72ec5c206e3ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 01:24:34 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 09 May 2019 05:24:34 +0000 Subject: [issue36831] ElementTree.find attribute matching with empty namespace In-Reply-To: <1557235199.92.0.526138899784.issue36831@roundup.psfhosted.org> Message-ID: <1557379474.35.0.0141221341493.issue36831@roundup.psfhosted.org> Stefan Behnel added the comment: Sorry for the annoyance during the release. ---------- keywords: -patch resolution: -> fixed stage: patch review -> needs patch status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 01:25:16 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 09 May 2019 05:25:16 +0000 Subject: [issue36831] ElementTree.find attribute matching with empty namespace In-Reply-To: <1557235199.92.0.526138899784.issue36831@roundup.psfhosted.org> Message-ID: <1557379516.08.0.25574526083.issue36831@roundup.psfhosted.org> Change by Stefan Behnel : ---------- stage: needs patch -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 01:33:18 2019 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 09 May 2019 05:33:18 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1557379998.48.0.0227508091767.issue31033@roundup.psfhosted.org> Alexander Mohr added the comment: @yselivanov even better :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 01:42:15 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 09 May 2019 05:42:15 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557380535.3.0.177172335429.issue36778@roundup.psfhosted.org> Inada Naoki added the comment: @Eryk I didn't say new Terminal will cause this issue. I know ConsoeIO too. I just meant Microsoft use cp65001 more widely for better UTF-8 support nowadays. So I want to make cp65001 as alias of UTF-8. > Python could similarly special case CP_UTF8 as "utf-8" in _locale._getdefaultlocale. I like this idea too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 01:59:19 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 May 2019 05:59:19 +0000 Subject: [issue36552] Replace OverflowError with ValueError when calculating length of range objects > PY_SIZE_MAX In-Reply-To: <1554698296.6.0.519379747153.issue36552@roundup.psfhosted.org> Message-ID: <1557381559.41.0.29001596581.issue36552@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 02:00:24 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 09 May 2019 06:00:24 +0000 Subject: [issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink In-Reply-To: <1313881060.54.0.449889075101.issue12800@psf.upfronthosting.co.za> Message-ID: <1557381624.47.0.945895738778.issue12800@roundup.psfhosted.org> Jeffrey Kintscher added the comment: The problem is in TarFile.makelink() in Lib/tarfile.py. It calls os.symlink() to create the link, which fails because the link already exists and triggers the exception handler. The exception handler then tries to create the linked file under the assumption (per source code comments) that the link creation failed because the system doesn't support symbolic links. The file creation then fails because it requires seeking backwards in the archive. ---------- nosy: +websurfer5 versions: +Python 3.7, Python 3.8 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 02:56:01 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 06:56:01 +0000 Subject: [issue36551] Optimize list comprehensions with preallocate size and protect against overflow In-Reply-To: <1554686901.99.0.0374079193358.issue36551@roundup.psfhosted.org> Message-ID: <1557384961.44.0.960070983831.issue36551@roundup.psfhosted.org> Change by anthony shaw : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 03:18:30 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 09 May 2019 07:18:30 +0000 Subject: [issue36860] Inconsistent/Undocumented behavior with pathlib resolve and absolute on Windows In-Reply-To: <1557368270.63.0.171172492568.issue36860@roundup.psfhosted.org> Message-ID: <1557386310.09.0.411057841165.issue36860@roundup.psfhosted.org> Eryk Sun added the comment: Windows resolve() is based on ntpath._getfinalpathname, which requires that the file exists and is accessible. resolve() defaults to non-strict behavior, which tries to resolve as much as possible by traversing the path in reverse and trying _getfinalpathname until it succeeds. For this to work reliably, it needs to begin with a fully-qualified path from ntpath._getfullpathname. This is also required in order to correctly resolve paths that have a reserved DOS device name in the final component (e.g. "nul", "nul:", "nul.txt") Additionally, for an empty path, resolve() returns os.getcwd(). I don't know whether this case occurs in practice, but the working directory has to be resolved in Windows the same as any other path. It's not already resolved. Also, the non-strict case should be relaxed like the POSIX version. It should continue resolving the path on any OSError, with possibly one exception. The POSIX version raises RuntimeError for a symlink loop. In Windows this case is ERROR_CANT_RESOLVE_FILENAME (1921). For cross-platform compatibility, this should probably be handled by raising the same RuntimeError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 03:49:58 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 07:49:58 +0000 Subject: [issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets In-Reply-To: <1446549321.99.0.809607214975.issue25541@psf.upfronthosting.co.za> Message-ID: <1557388198.09.0.89715156134.issue25541@roundup.psfhosted.org> anthony shaw added the comment: thanks, your code example zero-pads the socket address, and looking at the socketmodule.c code it does some padding under certain circumstances. https://github.com/python/cpython/blob/master/Modules/socketmodule.c#L1318-L1330 The Unix man page specify the same requirement you've noticed: When binding a socket to a pathname, a few rules should be observed for maximum portability and ease of coding: * The pathname in sun_path should be null-terminated. * The length of the pathname, including the terminating null byte, should not exceed the size of sun_path. * The addrlen argument that describes the enclosing sockaddr_un structure should have a value of at least: offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1 or, more simply, addrlen can be specified as sizeof(struct sock? addr_un). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 04:04:33 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 08:04:33 +0000 Subject: [issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets In-Reply-To: <1446549321.99.0.809607214975.issue25541@psf.upfronthosting.co.za> Message-ID: <1557389073.95.0.478282842806.issue25541@roundup.psfhosted.org> anthony shaw added the comment: The existing tests in place add the null-termination bytes in the test string: def testLinuxAbstractNamespace(self): address = b"\x00python-test-hello\x00\xff" with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s1: s1.bind(address) s1.listen() with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s2: s2.connect(s1.getsockname()) with s1.accept()[0] as s3: self.assertEqual(s1.getsockname(), address) self.assertEqual(s2.getpeername(), address) So that answers your initial question, it does work, but you have to add the null termination bytes in the address string. This isn't documented, so the documentation needs fixing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 04:04:48 2019 From: report at bugs.python.org (anthony shaw) Date: Thu, 09 May 2019 08:04:48 +0000 Subject: [issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets In-Reply-To: <1446549321.99.0.809607214975.issue25541@psf.upfronthosting.co.za> Message-ID: <1557389088.47.0.566192232847.issue25541@roundup.psfhosted.org> Change by anthony shaw : ---------- versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 04:39:22 2019 From: report at bugs.python.org (rhubarbdog x) Date: Thu, 09 May 2019 08:39:22 +0000 Subject: [issue36863] argparse doesn't like options in the middle of arguments Message-ID: <1557391162.39.0.325223416239.issue36863@roundup.psfhosted.org> New submission from rhubarbdog x : I've found a bug with argparse and reported it upstream. `command --option source destination` works `command soucre destination --option` works but `command source --option destination` doesn't outputting the usage text block associated `do_command` method and outputs error message `command: error: unrecognized arguments: destination` ---------- components: Argument Clinic messages: 341973 nosy: larry, rhubarbdog x priority: normal severity: normal status: open title: argparse doesn't like options in the middle of arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 04:40:26 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 09 May 2019 08:40:26 +0000 Subject: [issue36863] argparse doesn't like options in the middle of arguments In-Reply-To: <1557391162.39.0.325223416239.issue36863@roundup.psfhosted.org> Message-ID: <1557391226.92.0.0777722374055.issue36863@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Library (Lib) -Argument Clinic stage: -> test needed type: -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 04:43:27 2019 From: report at bugs.python.org (rhubarbdog x) Date: Thu, 09 May 2019 08:43:27 +0000 Subject: [issue36863] argparse doesn't like options in the middle of arguments In-Reply-To: <1557391162.39.0.325223416239.issue36863@roundup.psfhosted.org> Message-ID: <1557391407.53.0.0390588585922.issue36863@roundup.psfhosted.org> rhubarbdog x added the comment: This is when running is a shell which inherits from cmd.Cmd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 05:06:57 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 May 2019 09:06:57 +0000 Subject: [issue36551] Optimize list comprehensions with preallocate size and protect against overflow In-Reply-To: <1554686901.99.0.0374079193358.issue36551@roundup.psfhosted.org> Message-ID: <1557392817.75.0.158882717791.issue36551@roundup.psfhosted.org> Serhiy Storchaka added the comment: We can return to this issue if make the invocation of __length_hint__ much much faster. For example by adding the tp_length_hint slot. But currently it is too large change and his has negative effects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 05:10:10 2019 From: report at bugs.python.org (Alex Shpilkin) Date: Thu, 09 May 2019 09:10:10 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1557393010.29.0.08335573447.issue12178@roundup.psfhosted.org> Change by Alex Shpilkin : ---------- nosy: +Alex Shpilkin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 05:53:10 2019 From: report at bugs.python.org (Aviv Palivoda) Date: Thu, 09 May 2019 09:53:10 +0000 Subject: [issue30271] Make sqlite3 statement cache optional In-Reply-To: <1493924630.07.0.362744800273.issue30271@psf.upfronthosting.co.za> Message-ID: <1557395590.69.0.0287095190781.issue30271@roundup.psfhosted.org> Aviv Palivoda added the comment: I think we can close this issue and open a different one that will disable the cache implicitly on `set_authorizer()`. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 05:55:14 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 09 May 2019 09:55:14 +0000 Subject: [issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink In-Reply-To: <1313881060.54.0.449889075101.issue12800@psf.upfronthosting.co.za> Message-ID: <1557395714.77.0.928794227926.issue12800@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +13128 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 05:55:24 2019 From: report at bugs.python.org (Berker Peksag) Date: Thu, 09 May 2019 09:55:24 +0000 Subject: [issue30271] Make sqlite3 statement cache optional In-Reply-To: <1493924630.07.0.362744800273.issue30271@psf.upfronthosting.co.za> Message-ID: <1557395724.92.0.0231000773062.issue30271@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 07:54:49 2019 From: report at bugs.python.org (Jules Lasne) Date: Thu, 09 May 2019 11:54:49 +0000 Subject: [issue36864] Double Spaces in the documentation Message-ID: <1557402889.33.0.243843870102.issue36864@roundup.psfhosted.org> New submission from Jules Lasne : Hello, I've come to open this issue today because of the apparent split there is in the documentation about double spaces after a period. Here is a link to an article explaining some of the issue https://www.writing-skills.com/one-space-two-full-stop Anyway, the opinion isn't really important here but, when translating the documentation we waste a lot of time removing the double spaces that are ugly and useless in French. I'd like to propose a PR to remove all double spaces after a period from the documentation as they serve no apparent purpose. I'm open for discussion of course ---------- assignee: docs at python components: Documentation messages: 341977 nosy: docs at python, seluj78 priority: normal severity: normal status: open title: Double Spaces in the documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 07:59:45 2019 From: report at bugs.python.org (Larry Hastings) Date: Thu, 09 May 2019 11:59:45 +0000 Subject: [issue36863] argparse doesn't like options in the middle of arguments In-Reply-To: <1557391162.39.0.325223416239.issue36863@roundup.psfhosted.org> Message-ID: <1557403185.61.0.879580495593.issue36863@roundup.psfhosted.org> Change by Larry Hastings : ---------- nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 08:11:18 2019 From: report at bugs.python.org (Jules Lasne) Date: Thu, 09 May 2019 12:11:18 +0000 Subject: [issue36864] Double Spaces in the documentation In-Reply-To: <1557402889.33.0.243843870102.issue36864@roundup.psfhosted.org> Message-ID: <1557403878.34.0.11984386887.issue36864@roundup.psfhosted.org> Change by Jules Lasne : ---------- nosy: +matrixise, mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 08:35:13 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 09 May 2019 12:35:13 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1557405313.08.0.229300745116.issue36859@roundup.psfhosted.org> Change by Ma Lin : ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 09:22:23 2019 From: report at bugs.python.org (Nathaniel Gaertner) Date: Thu, 09 May 2019 13:22:23 +0000 Subject: [issue36865] FileInput does not allow 'rt' mode, but all its existing delegates do Message-ID: <1557408143.65.0.0603138385641.issue36865@roundup.psfhosted.org> New submission from Nathaniel Gaertner : While looking at https://bugs.python.org/issue5758 I noticed that 'rt' support had been added to gzip and bz2 in 3.3, but FileInput still limited its mode options to 'r', 'rb', 'rU', and 'U'. It seems like 'rt' should be just fine here as well, and would help clarify issue 5758, since 'r' defaults to 'rt' for open(...) but defaults to 'rb' for gzip and bz2. I wrote up the code and modified the mode unit test to try every allowed mode. I'll attach a PR to this once I have it ready. ---------- components: Library (Lib) messages: 341978 nosy: natgaertner priority: normal severity: normal status: open title: FileInput does not allow 'rt' mode, but all its existing delegates do type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 10:15:44 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 09 May 2019 14:15:44 +0000 Subject: [issue36864] Double Spaces in the documentation In-Reply-To: <1557402889.33.0.243843870102.issue36864@roundup.psfhosted.org> Message-ID: <1557411344.74.0.981623371992.issue36864@roundup.psfhosted.org> Julien Palard added the comment: Some people are liking the double space thing. Some are not. It's in the documentation style guide [1] and there's arond 20k use of it. I don't think we want to change it: modifing 18900 lines in the docs will make most opened PRs conflict, we don't want that. Also it'll pollute git blame a lot. Also it'll mark most translations as fuzzy in all languages, nobody want that. You say it costs you time removing them from the translation, just don't remove them, and if you don't like them nobody will complain if you're not typing them both while translating. [1]: https://devguide.python.org/documenting/#use-of-whitespace ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 10:15:48 2019 From: report at bugs.python.org (Michael Blahay) Date: Thu, 09 May 2019 14:15:48 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557411348.3.0.71872355768.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: For those that are wondering what is going on with PR 13181 and PR 13203, those are both for back porting the change to 3.7. The auto generated PR 13181 failed for an unknown reason and then the bot deleted the branch so the PR could not be taken any further. PR 13203 is a manual attempt at the backport which is moving along much for successfully. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 10:22:33 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 09 May 2019 14:22:33 +0000 Subject: [issue36239] gettext: GNUTranslations doesn't parse properly comments in description In-Reply-To: <1552053499.48.0.311631388539.issue36239@roundup.psfhosted.org> Message-ID: <1557411753.25.0.355976050444.issue36239@roundup.psfhosted.org> Julien Palard added the comment: New changeset afd1e6d2f0f5aaf4030d13342809ec0915dedf81 by Julien Palard in branch 'master': bpo-36239: Skip comments in gettext infos (GH-12255) https://github.com/python/cpython/commit/afd1e6d2f0f5aaf4030d13342809ec0915dedf81 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 10:23:00 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 09 May 2019 14:23:00 +0000 Subject: [issue36239] gettext: GNUTranslations doesn't parse properly comments in description In-Reply-To: <1552053499.48.0.311631388539.issue36239@roundup.psfhosted.org> Message-ID: <1557411780.31.0.938812016208.issue36239@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13129 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 10:58:18 2019 From: report at bugs.python.org (Brian Quinlan) Date: Thu, 09 May 2019 14:58:18 +0000 Subject: [issue32679] concurrent.futures should store full sys.exc_info() In-Reply-To: <1516976610.0.0.467229070634.issue32679@psf.upfronthosting.co.za> Message-ID: <1557413898.75.0.115858028166.issue32679@roundup.psfhosted.org> Brian Quinlan added the comment: My understanding is that tracebacks have a pretty large memory profile so I'd rather not keep them alive. Correct me if I'm wrong about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 11:27:36 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 09 May 2019 15:27:36 +0000 Subject: [issue24554] GC should happen when a subinterpreter is destroyed In-Reply-To: <1435884077.54.0.517018915499.issue24554@psf.upfronthosting.co.za> Message-ID: <1557415656.64.0.684438200032.issue24554@roundup.psfhosted.org> Eric Snow added the comment: FYI, issue #36854 is about moving GC runtime state from _PyRuntimeState to PyInterpreterState. However, that doesn't trigger any collection when the interpreter is finalized. So there is more to be done here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 11:31:37 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Thu, 09 May 2019 15:31:37 +0000 Subject: [issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings In-Reply-To: <1552702047.72.0.770409871236.issue36310@roundup.psfhosted.org> Message-ID: <1557415897.39.0.98978181742.issue36310@roundup.psfhosted.org> Toshio Kuratomi added the comment: Eric, I'm CC'ing you on this issue because I'm not sure if you've considered f-strings and gettext and figured out a way to make them work together. If you have, I can look into adding support for extracting the strings to pygettext but at the moment, I'm not sure if it's a style that we want to propogate or not. The heart of the problem is that the gettext function has to run before string interpolation occurs. With .format() and the other formatting methods in Python, this is achievable rather naturally. For instance: from gettext import gettext as _ first = "foo" last = "baz" foo = _("{first}, bar, and {last}").format(**globals()) will lead to the string first being gettext substituted like: "{first}, bar, y {last}" and then interpolated: "foo, bar, y baz" However, trying to do the same with f-strings translates more like this: foo = _(f"{first}, bar, and {last}") foo = _("{first}, bar, and {last}".format(**globals())) # This is the equivalent of the f-string So the interpolation happens first: "foo, bar, and baz" Then, when gettext substitution is tried, it won't be able to find the string it knows to look for ("{first}, bar, and {last}") so no translation will occur. Allie Fitter's code corrects this ordering problem but introduces other issues. Taking the sample string: foo = f'{_("{first}, bar, and {last}")} f-string interpolation runs first, but it sees that it has to invoke the _() function so the f-string machinery itself runs gettext: f'{"{first}, bar, y {last}"}' The machinery then simply returns that string so we end up with: '{first}, bar, y {last}' which is not quite right but can be fixed by nesting f-strings: foo = f'{_(f"{first}, bar, and {last}")} which results in: f'{f"{first}, bar, y {last}"} which results in: f'{"foo, bar, y baz"}' And finally: "foo, bar, y baz" So, that recipe works but is that what we want to tell people to do? It seems quite messy that we have to run the gettext function within the command and use nested f-strings so is there/should there be a different way to make this work? ---------- nosy: +a.badger, eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 11:38:07 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 09 May 2019 15:38:07 +0000 Subject: [issue36854] GC operates out of global runtime state. In-Reply-To: <1557334825.47.0.818401533303.issue36854@roundup.psfhosted.org> Message-ID: <1557416287.66.0.746322700426.issue36854@roundup.psfhosted.org> Change by Eric Snow : ---------- keywords: +patch pull_requests: +13130 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 11:48:32 2019 From: report at bugs.python.org (Matt Martz) Date: Thu, 09 May 2019 15:48:32 +0000 Subject: [issue36866] Certificate verification errors in urllib.request become URLError Message-ID: <1557416912.64.0.674817399159.issue36866@roundup.psfhosted.org> New submission from Matt Martz : The behavior of how SSL certificate validation is handled was changed in https://bugs.python.org/issue31399 This introduced a new exception, ssl.SSLCertVerificationError, which is raised for any certificate validation error, instead of the previous exception ssl.CertificateError. The primary difference here comes into play in urllib.request: https://github.com/python/cpython/blob/da0847048aa7f934573fa449cea8643def056aa5/Lib/urllib/request.py#L1314-L1318 Previously ssl.CertificateError was not derived from OSError, it instead was derived from ValueError. As such, as of Python3.7, ssl.SSLCertVerificationError is caught by the exception handling referenced above, as it is derived from OSError, and raised as a URLError, causing exception handling issues. You must now introspect e.reason to determine if the exception was caused due to certificate verification or any other URLError, instead of simply catching separate exception types. ---------- assignee: christian.heimes components: Library (Lib), SSL messages: 341985 nosy: christian.heimes, sivel, vstinner priority: normal severity: normal status: open title: Certificate verification errors in urllib.request become URLError type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 11:52:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 09 May 2019 15:52:06 +0000 Subject: [issue36851] Frame stack is not cleaned after execution is finished with return In-Reply-To: <1557330055.15.0.678827851719.issue36851@roundup.psfhosted.org> Message-ID: <1557417126.09.0.350422343537.issue36851@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset f00828a742d2e88c910bdfd00f08fcd998554ba5 by Pablo Galindo in branch 'master': bpo-36851: Clean the frame stack if the execution ends with a return and the stack is not empty (GH-13191) https://github.com/python/cpython/commit/f00828a742d2e88c910bdfd00f08fcd998554ba5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 11:52:19 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 09 May 2019 15:52:19 +0000 Subject: [issue36851] Frame stack is not cleaned after execution is finished with return In-Reply-To: <1557330055.15.0.678827851719.issue36851@roundup.psfhosted.org> Message-ID: <1557417139.19.0.316289531305.issue36851@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 13:23:38 2019 From: report at bugs.python.org (Nathaniel Gaertner) Date: Thu, 09 May 2019 17:23:38 +0000 Subject: [issue36865] FileInput does not allow 'rt' mode, but all its existing delegates do In-Reply-To: <1557408143.65.0.0603138385641.issue36865@roundup.psfhosted.org> Message-ID: <1557422618.94.0.623574697331.issue36865@roundup.psfhosted.org> Change by Nathaniel Gaertner : ---------- keywords: +patch pull_requests: +13131 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 13:36:01 2019 From: report at bugs.python.org (Pierre Glaser) Date: Thu, 09 May 2019 17:36:01 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources Message-ID: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> New submission from Pierre Glaser : Hi all, Olivier Grisel, Thomas Moreau and myself are currently working on increasing the range of action of the semaphore_tracker in Python. multiprocessing.semaphore_tracker is a little known module, that launches a server process used to track the life cycle of semaphores created in a python session, and potentially cleanup those semaphores after all python processes of the session terminated. Normally, python processes cleanup semaphores they create. This is however not not guaranteed if the processes get violently interrupted (using for example the bash command "killall python") A note on why the semaphore_tracker was introduced: Cleaning up semaphores after termination is important because the system only supports a limited number of named semaphores, and they will not be automatically removed till the next reboot. Now, Python 3.8 introduces shared memory segments creation. Shared memory is another sensitive global system resource. Currently, unexpected termination of processes that created memory segments will result in leaking those memory segments. This can be problematic for large compute clusters with many users and that are rebooted rarely. For this reason, we expanded the semaphore_tracker to also track shared memory segments, and renamed it resource_tracker. Shared memory segments get automatically tracked by the resource tracker when they are created. This is a first, self-contained fix. (1) Additionally, supporting shared memory tracking led to a more generic design for the resource_tracker. The resource_tracker can be now easily extended to track arbitrary resource types. A public API could potentially be exposed for users willing to track other types. One for example may want to add tracking for temporary folders creating during python sessions. Another use case is the one of joblib, which is a widely-used parallel-computing package, and also the backend of scikit-learn. Joblib relies heavily on memmapping. A public API could extend the resource_tracker to track memmap-ed objects with very little code. Therefore, this issue serves two purposes: - referencing the semaphore_tracker enhancement mentioned in (1) - discussing a potentially public resource_tracker API. ---------- components: Library (Lib) messages: 341987 nosy: pablogsal, pierreglaser, pitrou priority: normal severity: normal status: open title: Make semaphore_tracker track other system resources type: resource usage versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 13:37:35 2019 From: report at bugs.python.org (Brian Quinlan) Date: Thu, 09 May 2019 17:37:35 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1557423455.1.0.582178113586.issue26903@roundup.psfhosted.org> Change by Brian Quinlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 13:44:22 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 09 May 2019 17:44:22 +0000 Subject: [issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings In-Reply-To: <1552702047.72.0.770409871236.issue36310@roundup.psfhosted.org> Message-ID: <1557423862.08.0.757029024832.issue36310@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for adding me, Toshio. foo = f'{_(f"{first}, bar, and {last}")}' Wow, that's extremely creative. I agree that this isn't the best we can do. PEP 501 has some ideas, but it might be too general purpose and powerful for this. Let me think about the nested f-string above and see if I can't think of a better way. As an aside, this code: foo = _("{first}, bar, and {last}").format(**globals()) Is better written with format_map(): foo = _("{first}, bar, and {last}").format_map(globals()) It does not create a new dict like the ** version does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 14:06:11 2019 From: report at bugs.python.org (Berker Peksag) Date: Thu, 09 May 2019 18:06:11 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1557425171.64.0.140713826875.issue30262@roundup.psfhosted.org> Berker Peksag added the comment: New changeset e6576248e5174ca5daa362cfd610c07e7eb3a2ae by Berker Peksag (Aviv Palivoda) in branch 'master': bpo-30262: Don't expose private objects in sqlite3 (GH-1440) https://github.com/python/cpython/commit/e6576248e5174ca5daa362cfd610c07e7eb3a2ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 14:10:30 2019 From: report at bugs.python.org (Berker Peksag) Date: Thu, 09 May 2019 18:10:30 +0000 Subject: [issue30262] Don't expose sqlite3 Cache and Statement In-Reply-To: <1493841130.42.0.625787216583.issue30262@psf.upfronthosting.co.za> Message-ID: <1557425430.27.0.0705261454812.issue30262@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 14:12:28 2019 From: report at bugs.python.org (Pierre Glaser) Date: Thu, 09 May 2019 18:12:28 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557425548.89.0.496620208714.issue36867@roundup.psfhosted.org> Change by Pierre Glaser : ---------- keywords: +patch pull_requests: +13132 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 14:15:47 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 09 May 2019 18:15:47 +0000 Subject: [issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented Message-ID: <1557425747.49.0.948212766878.issue36868@roundup.psfhosted.org> New submission from Josh Rosenberg : The What's New in 3.7 docs mention the change from #31399 to use OpenSSL's built-in hostname verification ( https://docs.python.org/3/whatsnew/3.7.html#ssl ), but aside from that, information about the change is largely undiscoverable and/or wrong. Specific problems: 1. The What's New docs repeatedly mention SSLContext.host_flags as the means of modifying behavior. The actual property is underscore prefixed though, as SSLContext._host_flags. Since SSLContext supports the creation of arbitrary names via __dict__, assigning to context.host_flags silently "works", it just fails to *do* anything (nothing ever reads it). 2. None of the flags are documented anywhere; the only way to discover them is to import _ssl (they're not exposed on ssl itself, just the internal C extension), then scan through the exposed names (they're all prefixed with HOSTFLAG_ AFAICT) 3. All of the flags are raw numeric values, but it seems like they should be IntEnums, like the other flags exposed by SSL (among other things, it would make it much easier to interpret the default _host_flags (currently it's just 4, when it could display as ) 4. Nothing about this change, _host_flags/host_flags, or the values of the flags themselves is mentioned on the ssl docs at all. 5. This unintentionally made a behavioral change (one that bit me, and may bite other folks using docker swarm, NETBIOS hostnames, etc.). Python's match_hostname implementation was fine with host names containing underscores (e.g. if the cert was wildcarded to *.example.com, it would match a_b_c.example.com just fine); they're not technically legal by the strict reading of the specs for host names (they're apparently legal for domain names, but not host names, which differ in ways I don't fully understand), but stuff like docker swarm names their services that way automatically, most (all?) browsers support visiting them, etc. It looks like OpenSSL (at least the 1.1.0g my Python 3.7.2 was built against) treats underscores as unmatchable, so any attempt to connect to such a host name in Python 3.7.2 dies with a SSLCertVerificationError, claiming a "Hostname mismatch, certificate is not valid for 'name_with_underscores.example.com'." I discovered all this because 3.7 broke some scripts I use to connect to docker swarm services. Before I realized the issue was underscores, I was trying to figure out how to tweak the host name checks (assuming maybe something was broken with wildcard matching), and stumbled across all the other issues with the docs, the lack of flag definition exposure, etc. For the record, I think it's reasonable to require legal host names (it was easy enough to fix for my case; I just updated our docker DNS server to provide aliases using only hyphens and changed the script to use the alias host names), but it would be nice if it was explicitly documented, and ideally, that Python itself recognize that underscores won't work and explicitly raise an exception saying why, rather than letting OpenSSL perform the rejection with a (to someone who doesn't know about the underscore issue) confusing error message. ---------- assignee: docs at python components: Documentation, Extension Modules, Library (Lib), SSL keywords: 3.6regression messages: 341990 nosy: christian.heimes, docs at python, josh.r, vstinner priority: normal severity: normal status: open title: New behavior of OpenSSL hostname verification not exposed, incorrectly documented type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 14:23:00 2019 From: report at bugs.python.org (Allie Fitter) Date: Thu, 09 May 2019 18:23:00 +0000 Subject: [issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings In-Reply-To: <1552702047.72.0.770409871236.issue36310@roundup.psfhosted.org> Message-ID: <1557426180.0.0.602891331114.issue36310@roundup.psfhosted.org> Allie Fitter added the comment: Just as context, my use case for this is interpolating translated strings into HTML. html = f'''\

{_("Some Title")}

{_("Some longer text")}

''' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 14:23:01 2019 From: report at bugs.python.org (Brian Quinlan) Date: Thu, 09 May 2019 18:23:01 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1557426181.27.0.979669439009.issue36780@roundup.psfhosted.org> Brian Quinlan added the comment: We can bike shed over the name in the PR ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 14:33:01 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 09 May 2019 18:33:01 +0000 Subject: [issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings In-Reply-To: <1552702047.72.0.770409871236.issue36310@roundup.psfhosted.org> Message-ID: <1557426781.92.0.00707018183679.issue36310@roundup.psfhosted.org> Eric V. Smith added the comment: I was going to say "use eval()", but maybe we need some sort of "eval_fstring()" that basically only understood f-strings and produced a callable that captured all of the variables (like a closure), maybe that would help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 14:40:00 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 09 May 2019 18:40:00 +0000 Subject: [issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented In-Reply-To: <1557425747.49.0.948212766878.issue36868@roundup.psfhosted.org> Message-ID: <1557427200.49.0.836553954675.issue36868@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 14:41:46 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 09 May 2019 18:41:46 +0000 Subject: [issue36866] Certificate verification errors in urllib.request become URLError In-Reply-To: <1557416912.64.0.674817399159.issue36866@roundup.psfhosted.org> Message-ID: <1557427306.27.0.290833731097.issue36866@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 14:45:30 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 09 May 2019 18:45:30 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1557427530.73.0.443737413382.issue36853@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 15:15:03 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 May 2019 19:15:03 +0000 Subject: [issue36802] Revert back StreamWriter awrite/aclose but provide await writer.write() and await writer.close() In-Reply-To: <1557065452.04.0.483828473478.issue36802@roundup.psfhosted.org> Message-ID: <1557429303.59.0.827905889985.issue36802@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset a076e4f5e42b85664693191d04cfb33e2f9acfa5 by Andrew Svetlov in branch 'master': bpo-36802: Drop awrite()/aclose(), support await write() and await close() instead (#13099) https://github.com/python/cpython/commit/a076e4f5e42b85664693191d04cfb33e2f9acfa5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 15:31:19 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 09 May 2019 19:31:19 +0000 Subject: [issue36239] gettext: GNUTranslations doesn't parse properly comments in description In-Reply-To: <1552053499.48.0.311631388539.issue36239@roundup.psfhosted.org> Message-ID: <1557430279.83.0.658425902027.issue36239@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 15:49:55 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 09 May 2019 19:49:55 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1557431395.96.0.749499369571.issue36853@roundup.psfhosted.org> Julien Palard added the comment: Hi Jaraco, We're using sphinx 1.8 in production (docs.python.org) but we're ready for sphinx 2 so we should upgrade, and when we'll upgrade, we'll upgrade it everywhere. You're right, `make venv` does not specify a version, at the sphinx 2 bump we'll have to pin it here too and try to get a single point of truth about which version we're using. I've just locally ran sphinx 2.0.0 on 071cbd4ea1 (the current tip of your PR) and I'm not getting any error, which one are you getting? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 15:52:37 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 09 May 2019 19:52:37 +0000 Subject: [issue32523] inconsistent spacing in changelog.html In-Reply-To: <1515514882.86.0.467229070634.issue32523@psf.upfronthosting.co.za> Message-ID: <1557431557.66.0.736690883798.issue32523@roundup.psfhosted.org> Julien Palard added the comment: New changeset 137be34180a20dba53948d126b961069f299f153 by Julien Palard in branch 'master': bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) https://github.com/python/cpython/commit/137be34180a20dba53948d126b961069f299f153 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 15:59:52 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 09 May 2019 19:59:52 +0000 Subject: [issue36850] shutil.copy2 fails with even with source network filesystem not supporting extended attributes In-Reply-To: <1557301411.76.0.646767757374.issue36850@roundup.psfhosted.org> Message-ID: <1557431992.84.0.643650894719.issue36850@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- keywords: +patch pull_requests: +13133 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 16:15:51 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 09 May 2019 20:15:51 +0000 Subject: [issue10536] Enhancements to gettext docs In-Reply-To: <1290730924.88.0.289473332428.issue10536@psf.upfronthosting.co.za> Message-ID: <1557432951.95.0.0517153264516.issue10536@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13134 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 16:26:05 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 09 May 2019 20:26:05 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1557433565.81.0.437055792301.issue36853@roundup.psfhosted.org> SilentGhost added the comment: > Second, we should probably determine why the doc builds are failing on Sphinx 2 and update the `suspicious` code to support Sphinx 2. They're failing because in sphinx 2 old and deprecated (since 1.6) custom logging API was removed. So all Builder.warn calls will have to be changed to use logging module (this applies to other similar methods, luckily they had the same names as logging methods). ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 16:26:13 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 09 May 2019 20:26:13 +0000 Subject: [issue10536] Enhancements to gettext docs In-Reply-To: <1290730924.88.0.289473332428.issue10536@psf.upfronthosting.co.za> Message-ID: <1557433573.97.0.751028797372.issue10536@roundup.psfhosted.org> miss-islington added the comment: New changeset 98b360e27b0be4646ed24c5a7ac07112ca020982 by Miss Islington (bot) in branch '3.7': [3.7] bpo-10536: Enhancements to gettext docs (GH-10324) (GH-13224) https://github.com/python/cpython/commit/98b360e27b0be4646ed24c5a7ac07112ca020982 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 16:26:53 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 09 May 2019 20:26:53 +0000 Subject: [issue10536] Enhancements to gettext docs In-Reply-To: <1290730924.88.0.289473332428.issue10536@psf.upfronthosting.co.za> Message-ID: <1557433613.24.0.542610922992.issue10536@roundup.psfhosted.org> Change by Julien Palard : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 16:29:51 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 May 2019 20:29:51 +0000 Subject: [issue36802] Revert back StreamWriter awrite/aclose but provide await writer.write() and await writer.close() In-Reply-To: <1557065452.04.0.483828473478.issue36802@roundup.psfhosted.org> Message-ID: <1557433791.64.0.7269039377.issue36802@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 17:10:38 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Thu, 09 May 2019 21:10:38 +0000 Subject: [issue18387] Add 'symbols' link to pydoc's html menu bar. In-Reply-To: <1373131695.63.0.960870867634.issue18387@psf.upfronthosting.co.za> Message-ID: <1557436238.19.0.452138370774.issue18387@roundup.psfhosted.org> Change by Sanyam Khurana : ---------- pull_requests: +13135 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 17:26:07 2019 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 09 May 2019 21:26:07 +0000 Subject: [issue36676] Make ET.XMLParser target aware of namespace prefixes In-Reply-To: <1555758404.88.0.535141671486.issue36676@roundup.psfhosted.org> Message-ID: <1557437167.66.0.904698464147.issue36676@roundup.psfhosted.org> Change by Stefan Behnel : ---------- pull_requests: +13136 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 17:47:11 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Thu, 09 May 2019 21:47:11 +0000 Subject: [issue36837] Make il8n tools available from `python -m` In-Reply-To: <1557246206.07.0.412069516419.issue36837@roundup.psfhosted.org> Message-ID: <1557438431.92.0.945995439706.issue36837@roundup.psfhosted.org> Toshio Kuratomi added the comment: Note, I've been doing some tests of how our gettext module differs from GNU gettext and run into a few bugs and lack of features which make msgfmt unusable and limit pygettext's usefulness. * msgfmt doesn't seem to store the charset from the .po file into the .mo file. I think this might have been okay for the lgettext() and gettext() methods under Python2 as those probably passed the byte strings from the .mo files through verbatim. Under Python3, however, we have to decode the byte strings to text and we can't do that without knowing the charset. This leads to a UnicodeDecodeError on any .mo file which contains non-ascii characters (which is going to be the majority of them) * So far, I have found that pygettext doesn't understand how to extract strings from ngettext(). This means that your code can't use plural forms if you want to use pygettext to extract the strings. These deficiencies are probably things that need to be fixed if we're going to continue to promote these tools in the documentation. ---------- nosy: +a.badger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 17:58:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 21:58:19 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557439099.06.0.80734286972.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: too_late_unraisable.py is an example where PyErr_WriteUnraisable() is called very lated during Python finalization to be handled by user code. A destructor (__del__) fails on print() because the stream has been closed. PyErr_WriteUnraisable() is called by _PyGC_CollectNoFail() at the *end* of PyImport_Cleanup(). At this point, the sys module has already been cleared, as all other modules. A custom sys.unraisablehook cannot be used, because sys has been called. ---------- versions: +Python 3.8 Added file: https://bugs.python.org/file48321/too_late_unraisable.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 18:17:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 22:17:55 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557440275.73.0.961405132564.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: Ok, let me come back to the initial issue: Thomas Grainger: > Currently it's quite easy for these errors to go unnoticed. I'd like a way to easily detect these in CI. nedbat suggested piping the process output to another tool, and looking for 'Exception ignored in:' but this seems a little diff When PyErr_WriteUnraisable() is called before Python finalization, my PR 13187 allows to handle these exceptions: log them in a dedicated file, abort the process, maybe even open a network connection, etc. The hook allows to implement your chosen behavior. The problem is more during Python finalization: see attached too_late_unraisable.py example and my previous comment. If PyErr_WriteUnraisable() is called after sys.stderr is closed or closed to None, the function does nothing: the exception is not logged. The question now becomes: do *all* calls to PyErr_WriteUnraisable() must abort the process? What is the point? Only a very low level debugger like gdb can be used to see the exception. @Thomas Grainger: Do you want to have to use gdb to trace such very level exception? IMHO sadly when PyErr_WriteUnraisable() is called way too late, we should simply ignore such exceptions. And so my PR 13187 is good enough to cover most cases. If someone cares about exceptions raised very late during Python finalization, Python finalization should be enhanced. But this code is very fragile and is not deterministic. It is a work in progress for years to enhance it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 18:19:05 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 09 May 2019 22:19:05 +0000 Subject: [issue33303] ElementTree Comment text isn't escaped In-Reply-To: <1524011592.66.0.682650639539.issue33303@psf.upfronthosting.co.za> Message-ID: <1557440345.46.0.622653919187.issue33303@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +websurfer5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 18:24:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 22:24:38 +0000 Subject: [issue36239] gettext: GNUTranslations doesn't parse properly comments in description In-Reply-To: <1552053499.48.0.311631388539.issue36239@roundup.psfhosted.org> Message-ID: <1557440678.54.0.394322991581.issue36239@roundup.psfhosted.org> STINNER Victor added the comment: Julien: Why not fixing Python 3.7? You approved https://github.com/python/cpython/pull/13218 (Python 3.7 backport) but then you closed it. Only Azure Pipelines PR failed on "ERROR: test_drain_raises (test.test_asyncio.test_streams.StreamTests)" which is unrelated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 18:25:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 22:25:30 +0000 Subject: [issue36866] Certificate verification errors in urllib.request become URLError In-Reply-To: <1557416912.64.0.674817399159.issue36866@roundup.psfhosted.org> Message-ID: <1557440730.24.0.818752023124.issue36866@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 18:25:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 22:25:53 +0000 Subject: [issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented In-Reply-To: <1557425747.49.0.948212766878.issue36868@roundup.psfhosted.org> Message-ID: <1557440753.2.0.370252257349.issue36868@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 18:34:30 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 09 May 2019 22:34:30 +0000 Subject: [issue33303] ElementTree Comment text isn't escaped In-Reply-To: <1524011592.66.0.682650639539.issue33303@psf.upfronthosting.co.za> Message-ID: <1557441270.83.0.0817438350008.issue33303@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +13137 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 18:59:58 2019 From: report at bugs.python.org (Thomas Grainger) Date: Thu, 09 May 2019 22:59:58 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557440275.73.0.961405132564.issue36829@roundup.psfhosted.org> Message-ID: Thomas Grainger added the comment: The point for me is that CI will fail if it happens, then I can use gdb to find out the cause On Thu, 9 May 2019, 23:17 STINNER Victor, wrote: > > STINNER Victor added the comment: > > Ok, let me come back to the initial issue: > > Thomas Grainger: > > Currently it's quite easy for these errors to go unnoticed. I'd like a > way to easily detect these in CI. nedbat suggested piping the process > output to another tool, and looking for 'Exception ignored in:' but this > seems a little diff > > When PyErr_WriteUnraisable() is called before Python finalization, my PR > 13187 allows to handle these exceptions: log them in a dedicated file, > abort the process, maybe even open a network connection, etc. The hook > allows to implement your chosen behavior. > > The problem is more during Python finalization: see attached > too_late_unraisable.py example and my previous comment. If > PyErr_WriteUnraisable() is called after sys.stderr is closed or closed to > None, the function does nothing: the exception is not logged. > > The question now becomes: do *all* calls to PyErr_WriteUnraisable() must > abort the process? What is the point? Only a very low level debugger like > gdb can be used to see the exception. > > @Thomas Grainger: Do you want to have to use gdb to trace such very level > exception? > > IMHO sadly when PyErr_WriteUnraisable() is called way too late, we should > simply ignore such exceptions. And so my PR 13187 is good enough to cover > most cases. > > If someone cares about exceptions raised very late during Python > finalization, Python finalization should be enhanced. But this code is very > fragile and is not deterministic. It is a work in progress for years to > enhance it. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:07:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 23:07:24 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557443244.02.0.605798523324.issue36778@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13138 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:07:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 23:07:54 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557443274.33.0.748488933841.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 13230 to remove Lib/encodings/cp65001.py and simply reuse Lib/encodings/utf_8.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:09:26 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Thu, 09 May 2019 23:09:26 +0000 Subject: [issue36837] Make il8n tools available from `python -m` In-Reply-To: <1557246206.07.0.412069516419.issue36837@roundup.psfhosted.org> Message-ID: <1557443366.27.0.712492015781.issue36837@roundup.psfhosted.org> Toshio Kuratomi added the comment: A note about the msgfmt problem. It looks like GNU gettext's msgfmt has a similar problem but the msgfmt from pybabel does not. This may mean that we need to change the gettext *Translation objects to be more tolerant of non-ascii encodings (perhaps defaulting to utf-8 instead of ascii). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:11:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 23:11:53 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557443513.13.0.438499260178.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: My PR 13110 (avoid functools) makes codecs.lookup('cp65001').encode() made 2.7x slower: https://github.com/python/cpython/pull/13110#issuecomment-491095964 417 ns +- 17 ns My PR 13230 (remove cp65001.py) makes it 1.5x faster :-) https://github.com/python/cpython/pull/13230#issuecomment-491099012 105 ns +- 3 ns The reference is: 156 ns +- 3 ns. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:13:11 2019 From: report at bugs.python.org (Laurie Opperman) Date: Thu, 09 May 2019 23:13:11 +0000 Subject: [issue36602] Recursive directory list with pathlib.Path.iterdir In-Reply-To: <1554980374.32.0.410571505677.issue36602@roundup.psfhosted.org> Message-ID: <1557443591.78.0.764312213293.issue36602@roundup.psfhosted.org> Laurie Opperman added the comment: Would this change also have to copy implemented in the new ZipFile Pathlib API? https://bugs.python.org/issue36832 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:13:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 23:13:41 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557443621.77.0.849033011699.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: > Python could similarly special case CP_UTF8 as "utf-8" in _locale._getdefaultlocale. I dislike lying in the locale module. This change is basically useless with my PR 13230. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:21:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 23:21:24 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557444084.91.0.776066823617.issue36843@roundup.psfhosted.org> STINNER Victor added the comment: Robert Boehne: pyurandom() uses _Py_open_noraise("/dev/urandom", O_RDONLY) which uses O_CLOEXEC if available. If this flag available? Does it work? Please try to build attached urandom.c. Example on my Fedora 29: open O_RDONLY succeeded read(16) -> 16 open O_RDONLY | O_CLOEXEC succeeded read(16) -> 16 ---------- Added file: https://bugs.python.org/file48322/urandom.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:29:44 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 09 May 2019 23:29:44 +0000 Subject: [issue36814] posix_spawn explicit file_actions=None throws error In-Reply-To: <1557155156.27.0.0390065046289.issue36814@roundup.psfhosted.org> Message-ID: <1557444584.64.0.670181151981.issue36814@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:34:07 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 09 May 2019 23:34:07 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557444847.17.0.809507258781.issue36778@roundup.psfhosted.org> Eryk Sun added the comment: > I dislike lying in the locale module. This change is basically useless > with my PR 13230. Yes, functionally it's no different than using 'cp65001' as an alias. That said, the CRT special cases 65001 as "utf8": >>> locale.setlocale(locale.LC_CTYPE, '') 'English_United Kingdom.utf8' >>> crt_locale = ctypes.CDLL('api-ms-win-crt-locale-l1-1-0', use_errno=True) >>> crt_locale.___lc_codepage_func() 65001 So the suggested change makes the locale module internally consistent on Windows and more transparent for anyone who doesn't know off the top of their head that "cp65001" is just UTF-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:42:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 23:42:10 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557445330.16.0.294383981969.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: > The point for me is that CI will fail if it happens, then I can use gdb to find out the cause I'm not comfortable with forcing users to use a low-level debugger to debug "unraisable exceptions". I tried PR 13175 on the test suite by forcing the option to 1: always call Py_FatalError(). Many tests break: 14 tests failed: test_asyncio test_cmd_line test_coroutines test_cprofile test_exceptions test_generators test_import test_io test_raise test_repl test_signal test_ssl test_urllib test_yield_from Examples: test_error_through_destructor (test.test_io.CBufferedReaderTest) ... Fatal Python error: Unraisable exception FAIL: test_warn_on_full_buffer (test.test_signal.WakeupSocketSignalTests) FAIL: test_send_error (test.test_signal.WakeupSocketSignalTests) FAIL: test_wakeup_write_error (test.test_signal.WakeupSignalTests) test_unraisable (test.test_exceptions.ExceptionTests) ... Fatal Python error: Unraisable exception test_generators: Trying: del g Expecting nothing Fatal Python error: Unraisable exception etc. Unraisable exceptions are bad, but it's really hard to fix all of them. They are too many cases where Python is unable to pass exceptions to the parent. If you want to make the situation better, maybe we should investigate where Python cannot raise exceptions and try to make it possible. IMHO my PR 13187 adding sys.unraisablehook() is more usable/reasonable option. -- Thomas Grainger: which code are you running on your CI? Did you try PR 13175 on your CI? Try it with this additional change, to always crash on PyErr_WriteUnraisable(). Does your CI still pass? diff --git a/Include/cpython/coreconfig.h b/Include/cpython/coreconfig.h index 375c0b641d..a775584553 100644 --- a/Include/cpython/coreconfig.h +++ b/Include/cpython/coreconfig.h @@ -426,7 +426,8 @@ typedef struct { .buffered_stdio = -1, \ ._install_importlib = 1, \ .check_hash_pycs_mode = NULL, \ - ._frozen = -1} + ._frozen = -1, \ + .abort_unraisable = 1} /* Note: _PyCoreConfig_INIT sets other fields to 0/NULL */ #ifdef __cplusplus ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:42:39 2019 From: report at bugs.python.org (Ian Good) Date: Thu, 09 May 2019 23:42:39 +0000 Subject: [issue34975] start_tls() difficult when using asyncio.start_server() In-Reply-To: <1539460993.6.0.788709270274.issue34975@psf.upfronthosting.co.za> Message-ID: <1557445359.69.0.664725050026.issue34975@roundup.psfhosted.org> Ian Good added the comment: I added start_tls() to StreamWriter. My implementation returns a new StreamWriter that should be used from then on, but it could be adapted to modify the current writer in-place (let me know). I've added docs, an integration test, and done some additional "real-world" testing with an IMAP server I work on. Specifically, "openssl s_client -connect xxx -starttls imap" works like a charm, and no errors/warnings are logged on disconnect. ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:50:23 2019 From: report at bugs.python.org (Thomas Grainger) Date: Thu, 09 May 2019 23:50:23 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557445330.16.0.294383981969.issue36829@roundup.psfhosted.org> Message-ID: Thomas Grainger added the comment: > I'm not comfortable with forcing users to use a low-level debugger to debug "unraisable exceptions". Defaulting to noop when the hook fails means I'll never notice the failure to be able to debug it On Fri, 10 May 2019, 00:42 STINNER Victor, wrote: > > STINNER Victor added the comment: > > > The point for me is that CI will fail if it happens, then I can use gdb > to find out the cause > > I'm not comfortable with forcing users to use a low-level debugger to > debug "unraisable exceptions". > > I tried PR 13175 on the test suite by forcing the option to 1: always call > Py_FatalError(). Many tests break: > > 14 tests failed: > test_asyncio test_cmd_line test_coroutines test_cprofile > test_exceptions test_generators test_import test_io > test_raise test_repl test_signal test_ssl test_urllib > test_yield_from > > Examples: > > test_error_through_destructor (test.test_io.CBufferedReaderTest) ... Fatal > Python error: Unraisable exception > > FAIL: test_warn_on_full_buffer (test.test_signal.WakeupSocketSignalTests) > FAIL: test_send_error (test.test_signal.WakeupSocketSignalTests) > FAIL: test_wakeup_write_error (test.test_signal.WakeupSignalTests) > > test_unraisable (test.test_exceptions.ExceptionTests) ... Fatal Python > error: Unraisable exception > > test_generators: > > Trying: > del g > Expecting nothing > Fatal Python error: Unraisable exception > > etc. > > Unraisable exceptions are bad, but it's really hard to fix all of them. > They are too many cases where Python is unable to pass exceptions to the > parent. > > If you want to make the situation better, maybe we should investigate > where Python cannot raise exceptions and try to make it possible. > > IMHO my PR 13187 adding sys.unraisablehook() is more usable/reasonable > option. > > -- > > Thomas Grainger: which code are you running on your CI? Did you try PR > 13175 on your CI? Try it with this additional change, to always crash on > PyErr_WriteUnraisable(). Does your CI still pass? > > diff --git a/Include/cpython/coreconfig.h b/Include/cpython/coreconfig.h > index 375c0b641d..a775584553 100644 > --- a/Include/cpython/coreconfig.h > +++ b/Include/cpython/coreconfig.h > @@ -426,7 +426,8 @@ typedef struct { > .buffered_stdio = -1, \ > ._install_importlib = 1, \ > .check_hash_pycs_mode = NULL, \ > - ._frozen = -1} > + ._frozen = -1, \ > + .abort_unraisable = 1} > /* Note: _PyCoreConfig_INIT sets other fields to 0/NULL */ > > #ifdef __cplusplus > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:53:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 23:53:44 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557446024.47.0.135457005695.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: > Defaulting to noop when the hook fails means I'll never notice the failure to be able to debug it I'm not sure that I understood what you mean here. My PR 13187 logs a message into stderr is custom hook fails with a new exception. Well, then you have to fix your hook ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:55:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 23:55:36 +0000 Subject: [issue36725] Reference leak regression with Python3.8a3 In-Reply-To: <1556224107.78.0.397981137362.issue36725@roundup.psfhosted.org> Message-ID: <1557446136.28.0.638792208905.issue36725@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 19:59:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 May 2019 23:59:19 +0000 Subject: [issue36719] regrtest --findleaks should fail if an uncollectable object is found In-Reply-To: <1556203780.64.0.387499693172.issue36719@roundup.psfhosted.org> Message-ID: <1557446359.83.0.290976918372.issue36719@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13140 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 20:04:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 00:04:52 +0000 Subject: [issue24263] unittest cannot load module whose name starts with Unicode In-Reply-To: <1435031451.77.0.239152930978.issue24263@psf.upfronthosting.co.za> Message-ID: <1557446692.71.0.0778891380711.issue24263@roundup.psfhosted.org> STINNER Victor added the comment: What is the current error on test_dir.tar.gz? I'm not sure which problem is trying to be solved here. Why does PR 13149 use str.isidentifier() method? unittest doesn't allow arbitrary Unicode in filenames? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 20:11:13 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Fri, 10 May 2019 00:11:13 +0000 Subject: [issue36869] Avoid warning of unused variables Message-ID: <1557447073.75.0.208623856666.issue36869@roundup.psfhosted.org> New submission from Emmanuel Arias : When run ./configure && make -j4 there are two warnings on Object/dictobject.c file about ix and hash variable are not used. Zachary Ware make me note that when _PyObject_ASSERT is call and NDEBUG is defined that expand to ((void)0). So this PR add a #ifndef check to avoid the warnings. ---------- components: Build messages: 342016 nosy: eamanu priority: normal pull_requests: 13141 severity: normal status: open title: Avoid warning of unused variables type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 20:18:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 00:18:31 +0000 Subject: [issue35723] Add "time zone index" cache to datetime objects In-Reply-To: <1547238857.17.0.663234077571.issue35723@roundup.psfhosted.org> Message-ID: <1557447511.45.0.986054388964.issue35723@roundup.psfhosted.org> STINNER Victor added the comment: Paul started a discussion on python-dev: https://mail.python.org/pipermail/python-dev/2019-May/157337.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 20:22:58 2019 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 10 May 2019 00:22:58 +0000 Subject: [issue36858] f-string '=' debugging output needs to be documented In-Reply-To: <1557347816.05.0.714667733239.issue36858@roundup.psfhosted.org> Message-ID: <1557447778.6.0.763959071731.issue36858@roundup.psfhosted.org> Mariatta Wijaya added the comment: Related issue where the '=' debug mode was implemented: https://bugs.python.org/issue36817 ---------- nosy: +Mariatta stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 20:30:38 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 10 May 2019 00:30:38 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557448238.18.0.719222855811.issue36778@roundup.psfhosted.org> Paul Monson added the comment: I can verify that PR 13110 fixes the issue with test_startup_imports on Windows IoT Core ARM32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 20:31:33 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 10 May 2019 00:31:33 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557448293.49.0.500641953179.issue36778@roundup.psfhosted.org> Paul Monson added the comment: Sorry that was supposed to say: I can verify that PR 13230 fixes the issue with test_startup_imports on Windows IoT Core ARM32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 20:49:13 2019 From: report at bugs.python.org (Olexa Bilaniuk) Date: Fri, 10 May 2019 00:49:13 +0000 Subject: [issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully In-Reply-To: <1435666041.75.0.103684760482.issue24538@psf.upfronthosting.co.za> Message-ID: <1557449353.45.0.0847773753329.issue24538@roundup.psfhosted.org> Olexa Bilaniuk added the comment: This old bug now has a PR on Github authored by myself that may be reviewed. ---------- nosy: +giampaolo.rodola, obilaniu, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 20:57:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 00:57:51 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows Message-ID: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> New submission from STINNER Victor : https://ci.appveyor.com/project/python/cpython/builds/24376676 ERROR: test_drain_raises (test.test_asyncio.test_streams.StreamTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_asyncio\test_streams.py", line 820, in test_drain_raises self.loop.run_until_complete(client(*addr)) File "C:\projects\cpython\lib\asyncio\base_events.py", line 584, in run_until_complete return future.result() File "C:\projects\cpython\lib\test\test_asyncio\test_streams.py", line 810, in client await writer.drain() File "C:\projects\cpython\lib\asyncio\streams.py", line 351, in drain await fut File "C:\projects\cpython\lib\asyncio\selector_events.py", line 860, in write n = self._sock.send(data) ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine ---------- components: Tests messages: 342023 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: test_asyncio: test_drain_raises() fails randomly on Windows versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:09:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 01:09:49 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1557450589.17.0.118255625703.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: It seems like the feature is only supported by a few operating systems and only if required functions are available: #ifdef __APPLE__ volatile uint64_t tid; pthread_threadid_np(NULL, &tid); #elif defined(__linux__) volatile pid_t tid; tid = syscall(__NR_gettid); I understand that it's not available on FreeBSD nor Windows? In that case, I would prefer to only add a threading.get_tid() *function*. Is it different than threading.get_ident() on Linux? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:12:16 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 10 May 2019 01:12:16 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557450736.43.0.591813146796.issue36778@roundup.psfhosted.org> Inada Naoki added the comment: > I dislike lying in the locale module. This change is basically useless with my PR 13230. Note that Python produce "cpNNN" encoding name, not Windows. https://github.com/python/cpython/blob/137be34180a20dba53948d126b961069f299f153/Modules/_localemodule.c#L395 So I don't think it is lie. It is just "what encoding name we should choose when GetACP() returned 65001.". With your PR 13230, cp65001 is truly utf-8. So returning "utf-8" seems right behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:17:02 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 10 May 2019 01:17:02 +0000 Subject: [issue36601] signals can be caught by any thread In-Reply-To: <1554979213.03.0.286656005091.issue36601@roundup.psfhosted.org> Message-ID: <1557451022.87.0.888991329538.issue36601@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:17:21 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 10 May 2019 01:17:21 +0000 Subject: [issue36601] signals can be caught by any thread In-Reply-To: <1554979213.03.0.286656005091.issue36601@roundup.psfhosted.org> Message-ID: <1557451041.81.0.0201473266718.issue36601@roundup.psfhosted.org> Gregory P. Smith added the comment: PR is approved with automerge, just awaiting CI to give it the green light now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:19:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 01:19:56 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557451196.94.0.486891929303.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d267ac20c309e37d85a986b4417aa8ab4d05dabc by Victor Stinner in branch 'master': bpo-36778: cp65001 encoding becomes an alias to utf_8 (GH-13230) https://github.com/python/cpython/commit/d267ac20c309e37d85a986b4417aa8ab4d05dabc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:20:28 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 10 May 2019 01:20:28 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls Message-ID: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> New submission from Gregory P. Smith : Thing: mock_thing.method sig=(a=None, b=0) F ====================================================================== FAIL: test_has_calls_on_thing (__main__.MockCallTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/google/home/gps/mock_call_test.py", line 25, in test_has_calls_on_thing mock_thing.assert_has_calls([ File "/usr/local/google/home/gps/oss/cpython/gpshead/Lib/unittest/mock.py", line 843, in assert_has_calls raise AssertionError( AssertionError: Calls not found. Expected: [call.method(0.5, b=3000), call.method(0.6, b=6000), call.method(0.7, b=9000)] Actual: [call.method(0.5, b=3000), call.method(0.6, b=6000), call.method(0.7, b=9000)]. See the attached mock_call_test.py. ---------- components: Library (Lib) files: mock_call_test.py messages: 342028 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: Misleading error from unittest.mock's assert_has_calls type: behavior versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48323/mock_call_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:23:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 01:23:50 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557451430.64.0.680010594626.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: About the ANSI code page, Lib/encodings/__init__.py calls _winapi.GetACP() to avoid relying on locale.getpreferredencoding() which lies when UTF-8 Mode is enabled: import _winapi ansi_code_page = "cp%s" % _winapi.GetACP() if encoding == ansi_code_page: import encodings.mbcs return encodings.mbcs.getregentry() INADA-san: > So I don't think it is lie. It is just "what encoding name we should choose when GetACP() returned 65001.". > With your PR 13230, cp65001 is truly utf-8. So returning "utf-8" seems right behavior. Well, feel free to propose a PR. I have no strong opinion on this level of detail :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:24:07 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 10 May 2019 01:24:07 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1557451447.6.0.296391075727.issue36871@roundup.psfhosted.org> Gregory P. Smith added the comment: If you use a debugger on this, you'll discover that what is happening inside of mock's assert_has_calls is that it is catching and swallowing an exception around the inspect.Signature instances bind() call complaining about 'b' being an unexpected keyword argument. Diving within the signature object being _used_ at the time, you find it checking against the signature of the class *constructor* rather than the methods. (!) the real error here is that the mock.create_autospec(Thing) has created a mock of the class. but the mock class (mock_thing) was never constructed. Adding a call to the constructor makes this code work: mock_thing = mock.create_autospec(Thing)(constructor_param="spam") But debugging this is insane, the error message is entirely misleading and shows two equal lists yet claiming they are different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:25:22 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 10 May 2019 01:25:22 +0000 Subject: [issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings In-Reply-To: <1552702047.72.0.770409871236.issue36310@roundup.psfhosted.org> Message-ID: <1557451522.63.0.481711760582.issue36310@roundup.psfhosted.org> Eric V. Smith added the comment: Of course, this wouldn't be any safer than eval'ing arbitrary user provided code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:27:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 01:27:05 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557451625.58.0.55693211091.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: Paul Monson: Your initial issue has been fixed in the master branch. I'm not sure what are Windows IoT Core and Windows Nano Server. Do you care of Python 3.7? If someone wants to support running test_site with ANSI code page set to 65001, I suggest to fix test_site directly like PR 13072 in Python 3.7. My attempt to avoid functools made cp65001 codec way slower. Fixing one specific test should not make Python that much slower ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:28:59 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 10 May 2019 01:28:59 +0000 Subject: [issue36601] signals can be caught by any thread In-Reply-To: <1554979213.03.0.286656005091.issue36601@roundup.psfhosted.org> Message-ID: <1557451739.74.0.552813788924.issue36601@roundup.psfhosted.org> miss-islington added the comment: New changeset d237b3f0f61990c972b84c45eb4fe137db51a6a7 by Miss Islington (bot) (Jeroen Demeyer) in branch 'master': bpo-36601: clarify signal handler comment and remove unnecessary pid check. (GH-12784) https://github.com/python/cpython/commit/d237b3f0f61990c972b84c45eb4fe137db51a6a7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:50:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 01:50:14 +0000 Subject: [issue27497] csv module: Add return value to DictWriter.writeheader In-Reply-To: <1468336448.04.0.83850338242.issue27497@psf.upfronthosting.co.za> Message-ID: <1557453014.97.0.108071198802.issue27497@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fce5ff1e18b522cf52379934a6560583d840e7f9 by Victor Stinner (R?mi Lapeyre) in branch 'master': bpo-27497: Add return value to csv.DictWriter.writeheader (GH-12306) https://github.com/python/cpython/commit/fce5ff1e18b522cf52379934a6560583d840e7f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:52:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 01:52:50 +0000 Subject: [issue27497] csv module: Add return value to DictWriter.writeheader In-Reply-To: <1468336448.04.0.83850338242.issue27497@psf.upfronthosting.co.za> Message-ID: <1557453170.17.0.481067297428.issue27497@roundup.psfhosted.org> STINNER Victor added the comment: I merged PR 12306. Thanks Ashish Nitin Patil for the initial patch, thanks R?mi Lapeyre to converting it to a PR, thanks Logan for the initial bug report ;-) Sadly, this change is a new feature and so cannot be backported to 2.7 or 3.7. The workaround is override the method: def writeheader(self): header = dict(zip(self.fieldnames, self.fieldnames)) return self.writerow(header) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:55:50 2019 From: report at bugs.python.org (Wei Lee) Date: Fri, 10 May 2019 01:55:50 +0000 Subject: [issue36841] Supporting customization of float encoding in JSON In-Reply-To: <1557261153.38.0.171143852563.issue36841@roundup.psfhosted.org> Message-ID: <1557453350.45.0.280113624524.issue36841@roundup.psfhosted.org> Change by Wei Lee : ---------- keywords: +patch pull_requests: +13143 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 21:57:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 01:57:24 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1557453444.16.0.247656482986.issue15987@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:00:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 02:00:10 +0000 Subject: [issue36814] posix_spawn explicit file_actions=None throws error In-Reply-To: <1557155156.27.0.0390065046289.issue36814@roundup.psfhosted.org> Message-ID: <1557453610.63.0.898540882329.issue36814@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 948ed8c96b6912541a608591efe3e00fb520429a by Victor Stinner (Anthony Shaw) in branch 'master': bpo-36814: ensure os.posix_spawn() handles None (GH-13144) https://github.com/python/cpython/commit/948ed8c96b6912541a608591efe3e00fb520429a ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:00:17 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 10 May 2019 02:00:17 +0000 Subject: [issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1557453617.36.0.697661066374.issue26317@roundup.psfhosted.org> Jeffrey Kintscher added the comment: This is still an issue with the 3.7 and the master branches. The Objective-C portion of the build still fails with gcc 8.3.0 on OS X Mojave (14.x). Specifying OBJC and OBJC++ on the configure command line does nothing because there is nothing in the script using the options. ---------- nosy: +websurfer5 versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:01:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 02:01:01 +0000 Subject: [issue36814] posix_spawn explicit file_actions=None throws error In-Reply-To: <1557155156.27.0.0390065046289.issue36814@roundup.psfhosted.org> Message-ID: <1557453661.78.0.386382361248.issue36814@roundup.psfhosted.org> STINNER Victor added the comment: Matthew Tanous: Oops, I completely missed this case! Thanks for the bug report. Thanks Anthony Shaw for the fix. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:06:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 02:06:08 +0000 Subject: [issue36479] Exit threads when interpreter is finalizing rather than runtime. In-Reply-To: <1553896742.19.0.478613119545.issue36479@roundup.psfhosted.org> Message-ID: <1557453968.03.0.445473033529.issue36479@roundup.psfhosted.org> STINNER Victor added the comment: IMHO PR 12679 change should wait until Py_EndInterpreter() is reworked to better cleanup its state and its threads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:07:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 02:07:33 +0000 Subject: [issue34408] possible null pointer dereference in pystate.c In-Reply-To: <1534277378.73.0.56676864532.issue34408@psf.upfronthosting.co.za> Message-ID: <1557454053.8.0.831612254337.issue34408@roundup.psfhosted.org> STINNER Victor added the comment: > Any reason not to close this issue? Pablo: Do you want to backport your fix to Python 3.7? Python 3.7 has the same bug, no? (I didn't check.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:11:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 02:11:35 +0000 Subject: [issue32592] Drop support of Windows Vista in Python 3.8 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1557454295.33.0.0713523518585.issue32592@roundup.psfhosted.org> STINNER Victor added the comment: > Before Vista, the code page 65001 behaved differently than official UTF-8 codec. Vista changed that. Maybe it's time to remove Lib/encodings/cp65001.py and make it an alias to utf_8 codec: see https://bugs.python.org/issue36778#msg341531 FYI it's exactly what I did: New changeset d267ac20c309e37d85a986b4417aa8ab4d05dabc by Victor Stinner in branch 'master': bpo-36778: cp65001 encoding becomes an alias to utf_8 (GH-13230) https://github.com/python/cpython/commit/d267ac20c309e37d85a986b4417aa8ab4d05dabc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:15:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 02:15:53 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1557454553.38.0.702310437347.issue33725@roundup.psfhosted.org> STINNER Victor added the comment: I have no preference for the default on Linux, but please fix the default at least on macOS before Python 3.8 beta 1 ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:20:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 02:20:18 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. In-Reply-To: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> Message-ID: <1557454818.27.0.586741861206.issue36818@roundup.psfhosted.org> STINNER Victor added the comment: I don't see the point of PyInterpreterState.runtime: * I understood that we should have and only one _PyRuntimeState instance: _PyRuntime. Why not accessing it directly? * I understood that most _PyRuntimeState fields should be moved to PyInterpreterState. Once this refactoring will be done, we will almost never have to access _PyRuntime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:30:50 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 10 May 2019 02:30:50 +0000 Subject: [issue14353] Proper gettext support in locale module In-Reply-To: <1332017397.14.0.261241263671.issue14353@psf.upfronthosting.co.za> Message-ID: <1557455450.89.0.81382742977.issue14353@roundup.psfhosted.org> Benjamin Peterson added the comment: seems okay ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:31:46 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 10 May 2019 02:31:46 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557455506.96.0.797085284109.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: I've added another test executable (issue36792-2.zip) which should bring some insight into where things are going wrong. Please run and post the results. ---------- Added file: https://bugs.python.org/file48324/issue36792-2.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:36:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 02:36:07 +0000 Subject: [issue36345] Deprecate Tools/scripts/serve.py in favour of python -m http.server -d In-Reply-To: <1552917459.29.0.295748589939.issue36345@roundup.psfhosted.org> Message-ID: <1557455767.38.0.398644983025.issue36345@roundup.psfhosted.org> STINNER Victor added the comment: Berker Peksag: > Please revert 360e1e4c519cfc139de707bcdd1e6c871eec79ee. It's not a good example to put into the documentation. I looked at other examples: they are nice but far from a "real application". I like the last example which combines multiple wsgiref features and is written like a real application: parse command line arguments, handle CTRL+c, etc. > It uses different naming convention. It would only confuse users relatively new to the wsgiref module and WSGI protocol. Would you mind to elaborate? I don't understand what you mean by "naming convention" here, sorry. > FileWrapper was supposed to support __getitem__ and __iter__ protocols for compatibility with older Python versions, but its __getiem__ implementation is buggy and is already deprecated. It has no use case in modern Python code. Do you mean that app() must not return FileWrapper? How do you return file content in that case? Maybe FileWrapper API should be clarified? It's surprising to read Python 3.8 mentioning compatibility with Python 2.1 :-) > It has zero exception handling and will return a cryptic traceback if mimetype cannot detect type of the file. Which kind of exceptions do you expect? The example checks if the file exists for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:38:36 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 10 May 2019 02:38:36 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557455916.9.0.778826424794.issue36778@roundup.psfhosted.org> Paul Monson added the comment: Thanks Victor! Since we aren't backporting ARM32 changes, I don't think it's important to fix this test in 3.7. I am trying to get the buildbot tests for Windows ARM32 to zero errors. Windows IoT Core runs on Raspberry Pi and similar devices: https://developer.microsoft.com/en-us/windows/iot Windows NanoServer is a very small version of Windows Server for running in Docker containers hosted on Windows Server. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 22:57:31 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 10 May 2019 02:57:31 +0000 Subject: [issue36823] shutil.copytree copies directories and files but fails with that same directory with '[Errno 1] Operation not permitted') In-Reply-To: <1557200866.03.0.146601930994.issue36823@roundup.psfhosted.org> Message-ID: <1557457051.96.0.891116579001.issue36823@roundup.psfhosted.org> Giampaolo Rodola' added the comment: You should try to copy those offending files individually via shutil.copy2() instead copytree() in order to get the full exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 23:15:16 2019 From: report at bugs.python.org (David Collins) Date: Fri, 10 May 2019 03:15:16 +0000 Subject: [issue36872] passing negative values through modules Message-ID: <1557458116.02.0.0587666073886.issue36872@roundup.psfhosted.org> New submission from David Collins : program_data.py file contains a list import list_function str_list4 = ['i', 't'] str_list4 = list_function.insert_value(str_list4, 's', -1) print(str_list4) list_function.py file def insert_value(my_list, value, insert_position): counter = 0 print('Question 5') print(my_list, value, insert_position) for index in my_list: counter += 1 when passing the negative number in insert_position between the two modules this causes str_list4 = list_function.insert_value(str_list4, 's', -1) File "D:\part A\list_function.py", line 85, in insert_value for index in my_list: TypeError: 'NoneType' object is not iterable my_list now becomes lost, if the negative value is changed to positive this clears up . if you assign the -1 to a variable or a contstant it does not matter it still causes the same issue. however if you are running this code in the same module it works fine. this only seems to appear when attempting to pass between 2 modules a negative number. ---------- assignee: terry.reedy components: IDLE messages: 342049 nosy: coldy028, terry.reedy priority: normal severity: normal status: open title: passing negative values through modules type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 23:16:40 2019 From: report at bugs.python.org (David Collins) Date: Fri, 10 May 2019 03:16:40 +0000 Subject: [issue36872] passing negative values through modules In-Reply-To: <1557458116.02.0.0587666073886.issue36872@roundup.psfhosted.org> Message-ID: <1557458200.75.0.944893010697.issue36872@roundup.psfhosted.org> David Collins added the comment: I have tested this in the Mac and PC versions of IDLE as well as in Spyder using Ipython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 23:20:02 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 10 May 2019 03:20:02 +0000 Subject: [issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully In-Reply-To: <1435666041.75.0.103684760482.issue24538@psf.upfronthosting.co.za> Message-ID: <1557458402.21.0.915825106263.issue24538@roundup.psfhosted.org> Giampaolo Rodola' added the comment: Patch LGTM. I'd like to point out one thing for posterity. Current shutil code catches EPERM but not EACCES. While reviewing the patch I wondered whether simply catching (and ignoring) both error codes instead, but it turns out they are supposed to have 2 different meanings: https://stackoverflow.com/a/35879961/376587 Especially after _copyxattr is moved before chmod() EACCES (permission denied) should propagate instead of being silenced, and EPERM should be left in place because in this case EPERM acts more like an ENOTSUP (operation not supported) than EACCES (permission denied) and as such should rightly be ignored. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 23:22:24 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 10 May 2019 03:22:24 +0000 Subject: [issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully In-Reply-To: <1435666041.75.0.103684760482.issue24538@psf.upfronthosting.co.za> Message-ID: <1557458544.51.0.149229905609.issue24538@roundup.psfhosted.org> Giampaolo Rodola' added the comment: New changeset 79efbb719383386051c72f2ee932eeca8e033e6b by Giampaolo Rodola (Olexa Bilaniuk) in branch 'master': bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files. (PR-13212) https://github.com/python/cpython/commit/79efbb719383386051c72f2ee932eeca8e033e6b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 23:22:47 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 10 May 2019 03:22:47 +0000 Subject: [issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully In-Reply-To: <1435666041.75.0.103684760482.issue24538@psf.upfronthosting.co.za> Message-ID: <1557458567.75.0.754823701069.issue24538@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13144 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 23:26:24 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 10 May 2019 03:26:24 +0000 Subject: [issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully In-Reply-To: <1435666041.75.0.103684760482.issue24538@psf.upfronthosting.co.za> Message-ID: <1557458784.05.0.445058951392.issue24538@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- versions: +Python 3.7, Python 3.8 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 23:30:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 03:30:36 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557459036.03.0.931632167969.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: > Since we aren't backporting ARM32 changes, I don't think it's important to fix this test in 3.7. I am trying to get the buildbot tests for Windows ARM32 to zero errors. Ok, thanks. I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 9 23:41:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 03:41:31 +0000 Subject: [issue36873] http.server: Document explicitly that symbolic links are followed Message-ID: <1557459691.12.0.556693975132.issue36873@roundup.psfhosted.org> New submission from STINNER Victor : http.server documentation starts with a red warning: "Warning: http.server is not recommended for production. It only implements basic security checks." https://docs.python.org/dev/library/http.server.html It would help to be even more explicit on what it means. For example, document that symbolic links are followed and SimpleHTTPRequestHandler directory can be "escaped" following symbolic links. ---------- assignee: docs at python components: Documentation messages: 342054 nosy: docs at python, vstinner priority: normal severity: normal status: open title: http.server: Document explicitly that symbolic links are followed type: security versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 01:41:39 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 10 May 2019 05:41:39 +0000 Subject: [issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1557466899.98.0.369738464717.issue26317@roundup.psfhosted.org> Jeffrey Kintscher added the comment: Module/_scproxy.c compiles cleanly with clang 10.0.0 and fails with GNU gcc 8.3.0. Below is the relevant compiler error: building '_scproxy' extension gcc-8 -Wno-unused-result -Wsign-compare -g -Og -Wall -pipe -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I../cpython/Include/internal -I../cpython/Include -IObjects -IPython -I. -I/usr/local/opt/zlib/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/ossp-uuid/1.6.2_2/include -I/usr/local/include -I/Users/jeff/sandbox/src/python3.7/cpython/Include -I/Users/jeff/sandbox/src/python3.7/build -c /Users/jeff/sandbox/src/python3.7/cpython/Modules/_scproxy.c -o build/temp.macosx-10.14-x86_64-3.8-pydebug/Users/jeff/sandbox/src/python3.7/cpython/Modules/_scproxy.o In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/AuthSession.h:32, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:42, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/SystemConfiguration.framework/Headers/SCPreferences.h:35, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/SystemConfiguration.framework/Headers/SystemConfiguration.h:126, from /Users/jeff/sandbox/src/python3.7/cpython/Modules/_scproxy.c:6: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Security.framework/Headers/Authorization.h:193:7:error: variably modified 'bytes' at file scope char bytes[kAuthorizationExternalFormLength]; ^~~~~ building 'zlib' extension ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 01:51:48 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 10 May 2019 05:51:48 +0000 Subject: [issue36872] passing negative values through modules In-Reply-To: <1557458116.02.0.0587666073886.issue36872@roundup.psfhosted.org> Message-ID: <1557467508.31.0.630273975596.issue36872@roundup.psfhosted.org> SilentGhost added the comment: This bug tracker is for development of CPython, please ask your question on python-help mailing list, IRC or other similar forums. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 01:52:14 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 10 May 2019 05:52:14 +0000 Subject: [issue36872] passing negative values through modules In-Reply-To: <1557458116.02.0.0587666073886.issue36872@roundup.psfhosted.org> Message-ID: <1557467534.22.0.191398237692.issue36872@roundup.psfhosted.org> Change by SilentGhost : ---------- components: -IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 01:53:22 2019 From: report at bugs.python.org (David Collins) Date: Fri, 10 May 2019 05:53:22 +0000 Subject: [issue36872] passing negative values through modules In-Reply-To: <1557467534.23.0.890496782199.issue36872@roundup.psfhosted.org> Message-ID: David Collins added the comment: This is an issue with python On Fri, 10 May 2019 at 3:52 pm, SilentGhost wrote: > > Change by SilentGhost : > > > ---------- > components: -IDLE > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 01:53:38 2019 From: report at bugs.python.org (David Collins) Date: Fri, 10 May 2019 05:53:38 +0000 Subject: [issue36872] passing negative values through modules In-Reply-To: Message-ID: David Collins added the comment: Not the coding On Fri, 10 May 2019 at 3:53 pm, David Collins wrote: > This is an issue with python > > On Fri, 10 May 2019 at 3:52 pm, SilentGhost > wrote: > >> >> Change by SilentGhost : >> >> >> ---------- >> components: -IDLE >> >> _______________________________________ >> Python tracker >> >> _______________________________________ >> > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 03:17:04 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 10 May 2019 07:17:04 +0000 Subject: [issue36872] passing negative values through modules In-Reply-To: <1557458116.02.0.0587666073886.issue36872@roundup.psfhosted.org> Message-ID: <1557472624.53.0.0255336145796.issue36872@roundup.psfhosted.org> Steven D'Aprano added the comment: David, I'm pretty sure that SilentGhost is correct. You are misreading the error message: it has nothing to do with the negative index. The problem is that your `insert_value` function returns None, not the list. I believe that what you have done is tested the function once, with a positive index and then tried it again with a negative index: # this works fine, the first time str_list4 = list_function.insert_value(str_list4, 's', 1) # but fails the second time str_list4 = list_function.insert_value(str_list4, 's', -1) The reason is that functions returns None by default, so you have replaced str_list4 with None. Then on the second call to the function, this line fails: for index in my_list: because my_list is None. When Python gives you an error message, PLEASE READ IT because the interpreter does not lie, it knows what caused the failure: TypeError: 'NoneType' object is not iterable Python is used by hundreds of thousands of people and they probably would have noticed a severe, fundamental flaw like the inability to pass negative numbers to other modules by now. As a beginner, 99.99% of the "bugs" you find will be in your own code, not the language. (It has been said that the difference between a beginner and an expert is that the beginner assumes every bug is the language's fault, and an expert knows that nearly every bug is his own fault.) As SilentGhost says, this list is not a help-desk. Please don't follow up with extra questions here, I won't answer. If you want help or advice, please subscribe to the tutor mailing list https://mail.python.org/mailman/listinfo/tutor where there will be plenty of people happy to help. If you still believe that your code is correct, and you've found a bug that has escaped thousands of full-time Python programmers (it does happen...) then please take the time to read this: http://www.sscce.org/ and follow the advice given there. It's written for Java, not Python ,but the advice applies to any language. Thank you. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 04:00:27 2019 From: report at bugs.python.org (Berker Peksag) Date: Fri, 10 May 2019 08:00:27 +0000 Subject: [issue36345] Deprecate Tools/scripts/serve.py in favour of python -m http.server -d In-Reply-To: <1552917459.29.0.295748589939.issue36345@roundup.psfhosted.org> Message-ID: <1557475227.77.0.241578615425.issue36345@roundup.psfhosted.org> Berker Peksag added the comment: > I looked at other examples: they are nice but far from a "real application". You can use the same argument for pretty much every example in the stdlib documentation :) wsgiref is a low level module, users should use projects like WebOb instead. Also, a complete example would need to contain basic routing and middleware support (which is not easy to implement correctly) > Would you mind to elaborate? I don't understand what you mean by "naming convention" here, sorry. For example, the response() callable in the example is explicitly documented as start_response() in PEP 3333: https://www.python.org/dev/peps/pep-3333/#the-start-response-callable You can read PEP 3333 for more details. > Do you mean that app() must not return FileWrapper? How do you return file content in that case? > Maybe FileWrapper API should be clarified? It's surprising to read Python 3.8 mentioning compatibility with Python 2.1 :-) The whole point of the API was to support both __getitem__ and __iter__ protocols at the same time without breaking user code. I've already deprecated the support for __getitem__ protocol (84a13fbda0d79789e3c9efcc9f64752261ce1e8d) because it wasn't working as expected (it ignores its 'index' argument) Its only valid use case is to read a file chunk by chunk by using its blksize argument, but there are much better ways to achieve the same thing (use os.sendfile() or nginx :)) > Which kind of exceptions do you expect? The example checks if the file exists for example. I'm talking about exceptions that can be raised by the application code, such as the one that I've mentioned (i.e. mimetypes) in my earlier comment. Sorry, but it's not really a good example to put into documentation and it would be much better if we could save our bikeshedding bandwidth to other issues :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 04:17:38 2019 From: report at bugs.python.org (Jamie Stribling) Date: Fri, 10 May 2019 08:17:38 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1557476258.45.0.111507069643.issue32604@roundup.psfhosted.org> Change by Jamie Stribling : ---------- components: +Documentation -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 04:25:34 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 10 May 2019 08:25:34 +0000 Subject: [issue36676] Make ET.XMLParser target aware of namespace prefixes In-Reply-To: <1555758404.88.0.535141671486.issue36676@roundup.psfhosted.org> Message-ID: <1557476734.36.0.926237655416.issue36676@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset e9a465f3ea22c61e05ffe7b44a69102b25f57db4 by Stefan Behnel in branch 'master': bpo-36676: Update what's new document. (#13226) https://github.com/python/cpython/commit/e9a465f3ea22c61e05ffe7b44a69102b25f57db4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 04:45:23 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 10 May 2019 08:45:23 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1557477923.6.0.41941955309.issue33071@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13145 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 04:45:24 2019 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 10 May 2019 08:45:24 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1557477924.2.0.274512970641.issue33071@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 1b4abcf302ff2c8f4d4881294510d48ba5186b53 by Nick Coghlan (Kojo Idrissa) in branch 'master': bpo-33071: remove outdated PyPI docs (GH-13087) https://github.com/python/cpython/commit/1b4abcf302ff2c8f4d4881294510d48ba5186b53 ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 04:50:58 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 10 May 2019 08:50:58 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1557478258.43.0.75016243156.issue33071@roundup.psfhosted.org> miss-islington added the comment: New changeset 069a5b48334a795d3abe3a512dd41aad7a532a73 by Miss Islington (bot) in branch '3.7': bpo-33071: remove outdated PyPI docs (GH-13087) https://github.com/python/cpython/commit/069a5b48334a795d3abe3a512dd41aad7a532a73 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 05:21:07 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 10 May 2019 09:21:07 +0000 Subject: [issue36872] passing negative values through modules In-Reply-To: <1557458116.02.0.0587666073886.issue36872@roundup.psfhosted.org> Message-ID: <1557480067.05.0.0744136657174.issue36872@roundup.psfhosted.org> Terry J. Reedy added the comment: David, the tracker 'component' is intended to be, for bug reports, the component of Python that you think has a bug. When you run your code with IDLE and you get an exception displayed, that almost certainly means that IDLE is working as intended: it ran your code with python and displayed the error reported by python. The fact that you got the same error when running without IDLE (and this is a good thing to try) demonstrates that the error is not from IDLE. ---------- assignee: terry.reedy -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 05:22:47 2019 From: report at bugs.python.org (David Collins) Date: Fri, 10 May 2019 09:22:47 +0000 Subject: [issue36872] passing negative values through modules In-Reply-To: <1557480067.05.0.0744136657174.issue36872@roundup.psfhosted.org> Message-ID: <5cd542e2.1c69fb81.27981.166b@mx.google.com> David Collins added the comment: So what your saying is that python is unable to pass a negative number between modules and you don?t think that this is an issue . Sent from Mail for Windows 10 From: Terry J. Reedy Sent: Friday, 10 May 2019 7:21 PM To: coldy028 at gmail.com Subject: [issue36872] passing negative values through modules Terry J. Reedy added the comment: David, the tracker 'component' is intended to be, for bug reports, the component of Python that you think has a bug. When you run your code with IDLE and you get an exception displayed, that almost certainly means that IDLE is working as intended: it ran your code with python and displayed the error reported by python. The fact that you got the same error when running without IDLE (and this is a good thing to try) demonstrates that the error is not from IDLE. ---------- assignee: terry.reedy -> _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 05:42:52 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 10 May 2019 09:42:52 +0000 Subject: [issue36872] passing negative values through modules In-Reply-To: <1557458116.02.0.0587666073886.issue36872@roundup.psfhosted.org> Message-ID: <1557481372.32.0.160546126162.issue36872@roundup.psfhosted.org> Terry J. Reedy added the comment: Robert, when posting to this tracker by email, please remove the quote of the previous post. It duplicates the post itself. I said exactly what I said, which explained why marking the issue for IDLE was a mistake. (The same error is a weekly occurrence, by beginners, on stackoverflow.com.) That aside, you are not passing values through or between modules. You are passing arguments to a function, which is an object separate from both modules. I ran your code and got the expected error-free output: Question 5 ['i', 't'] s -1 Steven explained the bug in your code which makes the last print act different from what you probably expect. Reread what he wrote until you understand. If I do what he suggested you must have done, I get the error you got. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 05:51:15 2019 From: report at bugs.python.org (Pierre van de Laar) Date: Fri, 10 May 2019 09:51:15 +0000 Subject: [issue36874] Support CDATA by xml.etree.(c)ElementTree Message-ID: <1557481875.81.0.586413890873.issue36874@roundup.psfhosted.org> New submission from Pierre van de Laar : I would like to add information to CDATA in an Xml Tree. Turns out I am not the only one: https://stackoverflow.com/questions/174890/how-to-output-cdata-using-elementtree Can the library be extended to also support CDATA (similar to Comment)? Saves a lot of hacking... ---------- components: XML messages: 342067 nosy: Pierre van de Laar priority: normal severity: normal status: open title: Support CDATA by xml.etree.(c)ElementTree type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 06:03:53 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 10 May 2019 10:03:53 +0000 Subject: [issue36874] Support CDATA by xml.etree.(c)ElementTree In-Reply-To: <1557481875.81.0.586413890873.issue36874@roundup.psfhosted.org> Message-ID: <1557482633.69.0.686422436586.issue36874@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 06:08:13 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 10 May 2019 10:08:13 +0000 Subject: [issue36869] Avoid warning of unused variables In-Reply-To: <1557447073.75.0.208623856666.issue36869@roundup.psfhosted.org> Message-ID: <1557482893.62.0.385436505459.issue36869@roundup.psfhosted.org> Inada Naoki added the comment: New changeset a2fedd8c910cb5f5b9bd568d6fd44d63f8f5cfa5 by Inada Naoki (Emmanuel Arias) in branch 'master': bpo-36869: fix warning of unused variables (GH-13182) https://github.com/python/cpython/commit/a2fedd8c910cb5f5b9bd568d6fd44d63f8f5cfa5 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 06:17:58 2019 From: report at bugs.python.org (David Collins) Date: Fri, 10 May 2019 10:17:58 +0000 Subject: [issue36872] passing negative values through modules In-Reply-To: <1557481372.32.0.160546126162.issue36872@roundup.psfhosted.org> Message-ID: <000001d50719$a0c32ca0$e24985e0$@gmail.com> David Collins added the comment: Sorry for being so abrupt you are correct . The code I was working from was a university professors and not my own, I understood better thanks steve. I wasn?t passing a return value yet and the professors work was overwriting the list. I do apologise. Thanks for you support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 07:00:10 2019 From: report at bugs.python.org (kev levrone) Date: Fri, 10 May 2019 11:00:10 +0000 Subject: [issue29254] Documentation Error In-Reply-To: <1484239333.41.0.299474192201.issue29254@psf.upfronthosting.co.za> Message-ID: <1557486010.48.0.0259861521982.issue29254@roundup.psfhosted.org> kev levrone added the comment: The nevents argument determines the size of eventlist. When nevents is zero, kevent() will return immediately even if there is a timeout specified unlike select(2). https://goo.gl/KyvnZF ---------- nosy: +kevlevrone _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 07:04:39 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 10 May 2019 11:04:39 +0000 Subject: [issue29254] Documentation Error In-Reply-To: <1484239333.41.0.299474192201.issue29254@psf.upfronthosting.co.za> Message-ID: <1557486279.78.0.128702573637.issue29254@roundup.psfhosted.org> Change by SilentGhost : ---------- Removed message: https://bugs.python.org/msg342070 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 07:07:07 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 10 May 2019 11:07:07 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1557486427.43.0.425785866668.issue33725@roundup.psfhosted.org> Josh Rosenberg added the comment: I've seen far too many cases where Python code targeting Linux intentionally uses the COW benefits of fork for multiprocessing to think it would be a good idea to change the default start method there without *some* sort of deprecation period. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 08:32:09 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 10 May 2019 12:32:09 +0000 Subject: [issue36874] Support CDATA by xml.etree.(c)ElementTree In-Reply-To: <1557481875.81.0.586413890873.issue36874@roundup.psfhosted.org> Message-ID: <1557491529.18.0.311203306756.issue36874@roundup.psfhosted.org> Stefan Behnel added the comment: PR welcome. This is how lxml implements it: https://lxml.de/api.html#cdata Tests are here: https://github.com/lxml/lxml/blob/1a2db33aa8b9619c1caf407167567d5cca0b9019/src/lxml/tests/test_etree.py#L1692-L1749 I guess it won't look perfectly the same in ElementTree in the end, but it might be enough to implement a string wrapper class (or even str subclass?), and then maybe special-case it in the serialiser (probably needed for the escaping). However, anything that relieves the serialiser from doing special work for this exceptional case might be a good idea. ---------- stage: -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 08:34:34 2019 From: report at bugs.python.org (Carmen Bianca Bakker) Date: Fri, 10 May 2019 12:34:34 +0000 Subject: [issue36875] argparse does not ship with translations Message-ID: <1557491674.85.0.800524916833.issue36875@roundup.psfhosted.org> New submission from Carmen Bianca Bakker : Although argparse contains translatable strings, translations for those strings do not ship with Python. This means that any program that uses argparse must separately translate argparse, which is a lot of duplicated work. Moreover, if argparse is translated downstream, it is only translated against a single version of Python. If a user uses a different version of Python, there is no guarantee that the strings (and thus the translations) will be the same. Shipping translations for argparse together with Python would solve this issue. As a caveat, the translations cannot be in `/usr/share/locale` or equivalent. Users may have multiple versions of Python installed, so there would be a namespace conflict. ---------- messages: 342073 nosy: carmenbianca priority: normal severity: normal status: open title: argparse does not ship with translations type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 08:49:47 2019 From: report at bugs.python.org (Carmen Bianca Bakker) Date: Fri, 10 May 2019 12:49:47 +0000 Subject: [issue36875] argparse does not ship with translations In-Reply-To: <1557491674.85.0.800524916833.issue36875@roundup.psfhosted.org> Message-ID: <1557492587.83.0.213124503986.issue36875@roundup.psfhosted.org> Carmen Bianca Bakker added the comment: I have created a prototype for the proposed fix here: https://github.com/carmenbianca/argparse I'm not a regular Python contributor, so I simply copied argparse.py out of Lib and started working on my own copy. The changes are, all things considered, not very big. But it would add a `locale` directory in Lib, which I'm not sure is okay or not. There would also need to be a mechanism in the build process that puts the compiled MO files in Lib/locale/*language*/LC_MESSAGES/argparse.mo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 08:50:04 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 10 May 2019 12:50:04 +0000 Subject: [issue34600] python3 regression ElementTree.iterparse() unable to capture comments In-Reply-To: <1536300616.73.0.56676864532.issue34600@psf.upfronthosting.co.za> Message-ID: <1557492604.95.0.974521263012.issue34600@roundup.psfhosted.org> Stefan Behnel added the comment: I think this is resolved by issue 36673 (Py3.8). Please try it in the just released alpha4. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 12:06:40 2019 From: report at bugs.python.org (Robert Boehne) Date: Fri, 10 May 2019 16:06:40 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557444084.91.0.776066823617.issue36843@roundup.psfhosted.org> Message-ID: Robert Boehne added the comment: It doesn't look good: robb at nepal:/raid/checkouts-raid/robb/nepal$ xlc_r -q64 -O0 -g -qlanglvl=extc1x -o urandom urandom.c robb at nepal:/raid/checkouts-raid/robb/nepal$ ./urandom open O_RDONLY failed open O_RDONLY | O_CLOEXEC failed robb at nepal:/raid/checkouts-raid/robb/nepal$ uname -a AIX nepal 1 7 00FA7FB84C00 robb at nepal:/raid/checkouts-raid/robb/nepal$ On Thu, May 9, 2019 at 6:21 PM STINNER Victor wrote: > > STINNER Victor added the comment: > > Robert Boehne: pyurandom() uses _Py_open_noraise("/dev/urandom", O_RDONLY) > which uses O_CLOEXEC if available. If this flag available? Does it work? > > Please try to build attached urandom.c. > > Example on my Fedora 29: > > open O_RDONLY succeeded > read(16) -> 16 > open O_RDONLY | O_CLOEXEC succeeded > read(16) -> 16 > > ---------- > Added file: https://bugs.python.org/file48322/urandom.c > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 12:15:00 2019 From: report at bugs.python.org (Robert Boehne) Date: Fri, 10 May 2019 16:15:00 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557504900.79.0.173915912605.issue36843@roundup.psfhosted.org> Robert Boehne added the comment: I wonder if there's anyone with AIX 7 who can attempt to reproduce this. We have another AIX machine, but it is down for the moment. I would like to eliminate a problem on this machine as the cause. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 12:34:05 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 10 May 2019 16:34:05 +0000 Subject: [issue36601] signals can be caught by any thread In-Reply-To: <1554979213.03.0.286656005091.issue36601@roundup.psfhosted.org> Message-ID: <1557506045.24.0.990986707367.issue36601@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 12:59:09 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Fri, 10 May 2019 16:59:09 +0000 Subject: [issue24263] unittest cannot load module whose name starts with Unicode In-Reply-To: <1435031451.77.0.239152930978.issue24263@psf.upfronthosting.co.za> Message-ID: <1557507549.32.0.622571126776.issue24263@roundup.psfhosted.org> Toshio Kuratomi added the comment: >From the description, I think the bug is that filenames that *begin* with non-ascii are not searched for tests. Looking at the test_dir.tar.gz contents, this is the test case that I'd use: Broken: $ python3 -m unittest discover -vv -p '*.py' test_? (tests??.Test??.??) ... ok test_? (tests??.test??.??) ... ok ---------------------------------------------------------------------- Ran 2 tests in 0.000s OK Corrected: $ /srv/python/cpython/python -m unittest discover -vv -p '*.py' test_? (tests??.Test??.??) ... ok test_? (tests??.test??.??) ... ok test_? (tests??.??.??) ... ok ---------------------------------------------------------------------- Ran 3 tests in 0.000s OK isidentifier() is used because filenames to be discovered must be importable and thus valid identifiers: https://docs.python.org/3/library/unittest.html#test-discovery ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:14:42 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 10 May 2019 17:14:42 +0000 Subject: [issue36512] future_factory argument for Thread/ProcessPoolExecutor In-Reply-To: <1554234773.66.0.185942114441.issue36512@roundup.psfhosted.org> Message-ID: <1557508482.12.0.104828262139.issue36512@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- nosy: +tomMoral _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:14:59 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 10 May 2019 17:14:59 +0000 Subject: [issue36512] future_factory argument for Thread/ProcessPoolExecutor In-Reply-To: <1554234773.66.0.185942114441.issue36512@roundup.psfhosted.org> Message-ID: <1557508499.25.0.099117470349.issue36512@roundup.psfhosted.org> Antoine Pitrou added the comment: I'd like to know about the use case too :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:21:33 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 10 May 2019 17:21:33 +0000 Subject: [issue35983] tp_dealloc trashcan shouldn't be called for subclasses In-Reply-To: <1550055751.42.0.717332216151.issue35983@roundup.psfhosted.org> Message-ID: <1557508893.82.0.662637271847.issue35983@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 351c67416ba4451eb3928fa0b2e933c2f25df1a3 by Antoine Pitrou (Jeroen Demeyer) in branch 'master': bpo-35983: skip trashcan for subclasses (GH-11841) https://github.com/python/cpython/commit/351c67416ba4451eb3928fa0b2e933c2f25df1a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:23:12 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:23:12 +0000 Subject: [issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1557508992.88.0.292196098073.issue26317@roundup.psfhosted.org> Ned Deily added the comment: THe _scproxy.c compile error is a separate issue. The problem arises in an Apple-supplied include file and there are many reports on the web of clang vs gcc differences like this. I'm not sure what we could or should do about it other than forcing _scproxy to always be compiled with clang or figure out a way to avoid use of that include file hierarchy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:25:51 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:25:51 +0000 Subject: [issue32592] Drop support of Windows Vista in Python 3.8 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1557509151.37.0.156939601596.issue32592@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:26:34 2019 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 10 May 2019 17:26:34 +0000 Subject: [issue36858] f-string '=' debugging output needs to be documented In-Reply-To: <1557347816.05.0.714667733239.issue36858@roundup.psfhosted.org> Message-ID: <1557509194.13.0.282175960461.issue36858@roundup.psfhosted.org> Mariatta Wijaya added the comment: Perhaps it can be added under Tutorial? https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:29:57 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 10 May 2019 17:29:57 +0000 Subject: [issue36737] Warnings operate out of global runtime state. In-Reply-To: <1556317738.23.0.687262373674.issue36737@roundup.psfhosted.org> Message-ID: <1557509397.98.0.895944824279.issue36737@roundup.psfhosted.org> Eric Snow added the comment: New changeset 86ea58149c3e83f402cecd17e6a536865fb06ce1 by Eric Snow in branch 'master': bpo-36737: Use the module state C-API for warnings. (gh-13159) https://github.com/python/cpython/commit/86ea58149c3e83f402cecd17e6a536865fb06ce1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:30:26 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 10 May 2019 17:30:26 +0000 Subject: [issue36737] Warnings operate out of global runtime state. In-Reply-To: <1556317738.23.0.687262373674.issue36737@roundup.psfhosted.org> Message-ID: <1557509426.47.0.561218106822.issue36737@roundup.psfhosted.org> Change by Eric Snow : ---------- assignee: -> eric.snow resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:37 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:37 +0000 Subject: [issue34656] [CVE-2018-20406] memory exhaustion in Modules/_pickle.c:1393 In-Reply-To: <1536813527.13.0.956365154283.issue34656@psf.upfronthosting.co.za> Message-ID: <1557509797.44.0.832204403564.issue34656@roundup.psfhosted.org> Ned Deily added the comment: New changeset 4b42d575bf0fb01192b3ec54b7e224b238691527 by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-34656: Avoid relying on signed overflow in _pickle memos (GH-9261) (#11870) https://github.com/python/cpython/commit/4b42d575bf0fb01192b3ec54b7e224b238691527 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:37 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:37 +0000 Subject: [issue30657] [security] CVE-2017-1000158: Unsafe arithmetic in PyString_DecodeEscape In-Reply-To: <1497368129.36.0.20181989843.issue30657@psf.upfronthosting.co.za> Message-ID: <1557509797.62.0.996919519094.issue30657@roundup.psfhosted.org> Ned Deily added the comment: New changeset 6c004b40f9d51872d848981ef1a18bb08c2dfc42 by larryhastings (Miro Hron?ok) in branch '3.4': bpo-30657: Fix CVE-2017-1000158 (#4758) https://github.com/python/cpython/commit/6c004b40f9d51872d848981ef1a18bb08c2dfc42 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:37 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:37 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1557509797.55.0.600176953442.issue30694@roundup.psfhosted.org> Ned Deily added the comment: New changeset 71572bbe82aa0836c036d44d41c8269ba6a321be by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2203) https://github.com/python/cpython/commit/71572bbe82aa0836c036d44d41c8269ba6a321be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:37 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:37 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1557509797.69.0.629186717984.issue29591@roundup.psfhosted.org> Ned Deily added the comment: New changeset 71572bbe82aa0836c036d44d41c8269ba6a321be by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2203) https://github.com/python/cpython/commit/71572bbe82aa0836c036d44d41c8269ba6a321be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:37 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:37 +0000 Subject: [issue36216] CVE-2019-9636: urlsplit does not handle NFKC normalization In-Reply-To: <1551893840.49.0.433864450493.issue36216@roundup.psfhosted.org> Message-ID: <1557509797.8.0.650239740581.issue36216@roundup.psfhosted.org> Ned Deily added the comment: New changeset 62d36547f97210a26cc6051da78714fd078e158c by larryhastings (Steve Dower) in branch '3.4': bpo-36216: Add check for characters in netloc that normalize to separators (GH-12201) (#12224) https://github.com/python/cpython/commit/62d36547f97210a26cc6051da78714fd078e158c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:38 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:38 +0000 Subject: [issue33329] sigaddset() can fail on some signal numbers In-Reply-To: <1524384471.45.0.682650639539.issue33329@psf.upfronthosting.co.za> Message-ID: <1557509798.22.0.0917708120007.issue33329@roundup.psfhosted.org> Ned Deily added the comment: New changeset 2226139aa2b69047cb54dbcfd79f5c2e36f98653 by larryhastings (Cheryl Sabella) in branch '3.4': [3.4] bpo-33329: Fix multiprocessing regression on newer glibcs (GH-6575) (#12145) https://github.com/python/cpython/commit/2226139aa2b69047cb54dbcfd79f5c2e36f98653 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:37 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:37 +0000 Subject: [issue34791] xml package does not obey sys.flags.ignore_environment In-Reply-To: <1537807650.53.0.956365154283.issue34791@psf.upfronthosting.co.za> Message-ID: <1557509797.93.0.662092132825.issue34791@roundup.psfhosted.org> Ned Deily added the comment: New changeset 765d333512e9b58da4a4431595a0e81517ef0443 by larryhastings (Victor Stinner) in branch '3.4': bpo-34791: xml package obeys ignore env flags (GH-9544) (#11872) https://github.com/python/cpython/commit/765d333512e9b58da4a4431595a0e81517ef0443 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:38 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:38 +0000 Subject: [issue32981] Catastrophic backtracking in poplib (CVE-2018-1060) and difflib (CVE-2018-1061) In-Reply-To: <1519950979.87.0.467229070634.issue32981@psf.upfronthosting.co.za> Message-ID: <1557509798.54.0.265623669234.issue32981@roundup.psfhosted.org> Ned Deily added the comment: New changeset 942cc04ae44825ea120e3a19a80c9b348b8194d0 by larryhastings (Ned Deily) in branch '3.4': [3.4] bpo-32981: Fix catastrophic backtracking vulns (GH-5955) (#6035) https://github.com/python/cpython/commit/942cc04ae44825ea120e3a19a80c9b348b8194d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:38 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:38 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1557509798.99.0.185324258151.issue30730@roundup.psfhosted.org> Ned Deily added the comment: New changeset fe82c46327effc124ff166e1fa1e611579e1176b by larryhastings (Serhiy Storchaka) in branch '3.4': [security][3.4] bpo-30730: Prevent environment variables injection in subprocess on Windows. (GH-2325) (#2362) https://github.com/python/cpython/commit/fe82c46327effc124ff166e1fa1e611579e1176b New changeset b1549175ed30f2931e2bb980a7e3c360ed19e1c9 by larryhastings (Victor Stinner) in branch '3.4': [3.4] Backport CI config from master (#2475) https://github.com/python/cpython/commit/b1549175ed30f2931e2bb980a7e3c360ed19e1c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:38 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:38 +0000 Subject: [issue35647] Cookie path check returns incorrect results In-Reply-To: <1546502396.67.0.243403156352.issue35647@roundup.psfhosted.org> Message-ID: <1557509798.38.0.198324356211.issue35647@roundup.psfhosted.org> Ned Deily added the comment: New changeset e260f092cd0d8975c777e73ca6fb549d59b5d452 by larryhastings (Xtreak) in branch '3.4': bpo-35647: Fix path check in cookiejar (#11436) (#12278) https://github.com/python/cpython/commit/e260f092cd0d8975c777e73ca6fb549d59b5d452 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:38 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:38 +0000 Subject: [issue32072] Issues with binary plists In-Reply-To: <1511031976.48.0.213398074469.issue32072@psf.upfronthosting.co.za> Message-ID: <1557509798.64.0.581825313381.issue32072@roundup.psfhosted.org> Ned Deily added the comment: New changeset c59731d92dc73111d224876f1caa064097aad786 by larryhastings (Serhiy Storchaka) in branch '3.4': [3.4] bpo-32072: Fix issues with binary plists. (GH-4455) (#4658) https://github.com/python/cpython/commit/c59731d92dc73111d224876f1caa064097aad786 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:39 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1557509799.1.0.649866387898.issue30939@roundup.psfhosted.org> Ned Deily added the comment: New changeset 3b3a5a5b70dc468dcfacb17a3d6b342820b480ff by larryhastings (Ned Deily) in branch '3.4': bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721) (#2724) https://github.com/python/cpython/commit/3b3a5a5b70dc468dcfacb17a3d6b342820b480ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:39 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1557509799.21.0.236841531935.issue30119@roundup.psfhosted.org> Ned Deily added the comment: New changeset 2a5a26c87e82c7d9a348792891feccd1b5e9a769 by larryhastings (Dong-hee Na) in branch '3.4': [3.4] bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) (#2893) https://github.com/python/cpython/commit/2a5a26c87e82c7d9a348792891feccd1b5e9a769 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:39 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1557509799.3.0.760138807505.issue30726@roundup.psfhosted.org> Ned Deily added the comment: New changeset 71572bbe82aa0836c036d44d41c8269ba6a321be by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-29591, bpo-30694: Upgrade Modules/expat to libexpat 2.2.1 (#2164) (#2203) https://github.com/python/cpython/commit/71572bbe82aa0836c036d44d41c8269ba6a321be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:39 +0000 Subject: [issue30500] [security] urllib connects to a wrong host In-Reply-To: <1496030652.64.0.90102082916.issue30500@psf.upfronthosting.co.za> Message-ID: <1557509799.37.0.0583608524978.issue30500@roundup.psfhosted.org> Ned Deily added the comment: New changeset cc54c1c0d2d05fe7404ba64c53df4b1352ed2262 by larryhastings (Victor Stinner) in branch '3.4': bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2291) https://github.com/python/cpython/commit/cc54c1c0d2d05fe7404ba64c53df4b1352ed2262 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:39 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1557509799.53.0.62199364834.issue30231@roundup.psfhosted.org> Ned Deily added the comment: New changeset b1549175ed30f2931e2bb980a7e3c360ed19e1c9 by larryhastings (Victor Stinner) in branch '3.4': [3.4] Backport CI config from master (#2475) https://github.com/python/cpython/commit/b1549175ed30f2931e2bb980a7e3c360ed19e1c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:39 +0000 Subject: [issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat) In-Reply-To: <1441472893.95.0.412611892234.issue25008@psf.upfronthosting.co.za> Message-ID: <1557509799.44.0.216993148151.issue25008@roundup.psfhosted.org> Ned Deily added the comment: New changeset f37b0cb230069481609b0bb06891b5dd26320504 by Barry Warsaw in branch '3.4': bpo-25008: Deprecate smtpd and point to aiosmtpd (#274) (#280) https://github.com/python/cpython/commit/f37b0cb230069481609b0bb06891b5dd26320504 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:39 +0000 Subject: [issue34623] _elementtree.c doesn't call XML_SetHashSalt() In-Reply-To: <1536619664.47.0.56676864532.issue34623@psf.upfronthosting.co.za> Message-ID: <1557509799.67.0.972281253973.issue34623@roundup.psfhosted.org> Ned Deily added the comment: New changeset d16eaf36795da48b930b80b20d3805bc27820712 by larryhastings (stratakis) in branch '3.4': [3.4] bpo-34623: Use XML_SetHashSalt in _elementtree (#9953) https://github.com/python/cpython/commit/d16eaf36795da48b930b80b20d3805bc27820712 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:39 +0000 Subject: [issue26657] Directory traversal with http.server and SimpleHTTPServer on windows In-Reply-To: <1459179015.77.0.509336394494.issue26657@psf.upfronthosting.co.za> Message-ID: <1557509799.76.0.698689865415.issue26657@roundup.psfhosted.org> Ned Deily added the comment: New changeset 6f6bc1da8aaae52664e7747e328d26eb59c0e74f by larryhastings (Victor Stinner) in branch '3.4': bpo-26657: Fix Windows directory traversal vulnerability with http.server (#782) https://github.com/python/cpython/commit/6f6bc1da8aaae52664e7747e328d26eb59c0e74f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:40 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:40 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1557509800.07.0.0713388129455.issue27945@roundup.psfhosted.org> Ned Deily added the comment: New changeset f7344798e57da6b9c4ed9372e8eaecde80989c86 by larryhastings (Serhiy Storchaka) in branch '3.4': [3.4] [3.5] bpo-27945: Fixed various segfaults with dict. (GH-1657) (GH-1678) (#2248) https://github.com/python/cpython/commit/f7344798e57da6b9c4ed9372e8eaecde80989c86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:39 +0000 Subject: [issue33001] Buffer overflow vulnerability in os.symlink on Windows (CVE-2018-1000117) In-Reply-To: <1520273082.67.0.467229070634.issue33001@psf.upfronthosting.co.za> Message-ID: <1557509799.96.0.301143994472.issue33001@roundup.psfhosted.org> Ned Deily added the comment: New changeset 77c02cdce2d7b8360771be35b7676a4977e070c1 by larryhastings (Steve Dower) in branch '3.4': [3.4] bpo-33001: Prevent buffer overrun in os.symlink (GH-5989) (#5992) https://github.com/python/cpython/commit/77c02cdce2d7b8360771be35b7676a4977e070c1 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:40 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:40 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1557509800.24.0.207443463645.issue30947@roundup.psfhosted.org> Ned Deily added the comment: New changeset 86a713cb0c110b6798ca7f9e630fc511ee0a4028 by larryhastings (Victor Stinner) in branch '3.4': [3.4][Security] bpo-30947, bpo-31170: Update expat from 2.2.1 to 2.2.4 (#3353) https://github.com/python/cpython/commit/86a713cb0c110b6798ca7f9e630fc511ee0a4028 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:40 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:40 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1557509800.34.0.915504092887.issue29572@roundup.psfhosted.org> Ned Deily added the comment: New changeset 092db6c3cb049052fbfca15efc85ad68093676e7 by larryhastings (Victor Stinner) in branch '3.4': bpo-29572: Update Windows build to OpenSSL 1.0.2k (GH-443) (#3445) https://github.com/python/cpython/commit/092db6c3cb049052fbfca15efc85ad68093676e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:40 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:40 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1557509800.47.0.545950815266.issue26617@roundup.psfhosted.org> Ned Deily added the comment: New changeset 34fae03cd6c9e304e02c571b3bf9e8df0cfe76be by larryhastings (Serhiy Storchaka) in branch '3.4': [3.4] bpo-26617: Ensure gc tracking is off when invoking weakref callbacks. (#2695) https://github.com/python/cpython/commit/34fae03cd6c9e304e02c571b3bf9e8df0cfe76be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:40 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:40 +0000 Subject: [issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer) In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1557509800.78.0.648989469836.issue31170@roundup.psfhosted.org> Ned Deily added the comment: New changeset 86a713cb0c110b6798ca7f9e630fc511ee0a4028 by larryhastings (Victor Stinner) in branch '3.4': [3.4][Security] bpo-30947, bpo-31170: Update expat from 2.2.1 to 2.2.4 (#3353) https://github.com/python/cpython/commit/86a713cb0c110b6798ca7f9e630fc511ee0a4028 New changeset 8b11e8de7aedacfbbcc8c780f3c4097396f1d1a3 by larryhastings (Victor Stinner) in branch '3.4': [3.4] bpo-31170: Fix inclusion of expat in Windows build projects (#3785) https://github.com/python/cpython/commit/8b11e8de7aedacfbbcc8c780f3c4097396f1d1a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:40 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:40 +0000 Subject: [issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed" In-Reply-To: <1516618613.48.0.467229070634.issue32620@psf.upfronthosting.co.za> Message-ID: <1557509800.7.0.103266834611.issue32620@roundup.psfhosted.org> Ned Deily added the comment: New changeset 71b94e30b1d63c789908482b3b808cc613e57267 by larryhastings in branch '3.4': [3.4] [3.5] bpo-32620: Remove failing pyenv call from CI config (GH-5274) (#5533) https://github.com/python/cpython/commit/71b94e30b1d63c789908482b3b808cc613e57267 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:41 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:41 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1557509801.01.0.815902061965.issue35121@roundup.psfhosted.org> Ned Deily added the comment: New changeset 42ad4101d3ba7ca3c371dadf0f8880764c9f15fb by larryhastings (Xtreak) in branch '3.4': [3.4] bpo-35121: prefix dot in domain for proper subdomain validation (GH-10258) (#12279) https://github.com/python/cpython/commit/42ad4101d3ba7ca3c371dadf0f8880764c9f15fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:40 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:40 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1557509800.88.0.486241259491.issue31036@roundup.psfhosted.org> Ned Deily added the comment: New changeset 362e9fb0de4321bf265dbca290f7dc1f383a4a47 by Ned Deily in branch '3.4': [3.5] bpo-31036: use an existing Misc/NEWS rather than trying to use blurb (#2874) (#2926) https://github.com/python/cpython/commit/362e9fb0de4321bf265dbca290f7dc1f383a4a47 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:41 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:41 +0000 Subject: [issue35746] [ssl][CVE-2019-5010] TALOS-2018-0758 Denial of Service In-Reply-To: <1547569468.87.0.514647021744.issue35746@roundup.psfhosted.org> Message-ID: <1557509801.14.0.220395541074.issue35746@roundup.psfhosted.org> Ned Deily added the comment: New changeset 6c655ce34ae54adb8eef22b73108e22cc381cb8d by larryhastings (Victor Stinner) in branch '3.4': bpo-35746: Fix segfault in ssl's cert parser (GH-11569) (#11868) https://github.com/python/cpython/commit/6c655ce34ae54adb8eef22b73108e22cc381cb8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:36:41 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:36:41 +0000 Subject: [issue29169] update zlib to 1.2.11 In-Reply-To: <1483629107.49.0.982374684244.issue29169@psf.upfronthosting.co.za> Message-ID: <1557509801.21.0.885096523363.issue29169@roundup.psfhosted.org> Ned Deily added the comment: New changeset d0e61bded5256e775e470e2c0da22367a1a81970 by larryhastings (Victor Stinner) in branch '3.4': bpo-29169: Update zlib to 1.2.11 (#3107) https://github.com/python/cpython/commit/d0e61bded5256e775e470e2c0da22367a1a81970 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:46:26 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 10 May 2019 17:46:26 +0000 Subject: [issue34128] Release GIL periodically in _pickle module In-Reply-To: <1531767337.85.0.56676864532.issue34128@psf.upfronthosting.co.za> Message-ID: <1557510386.38.0.917250870505.issue34128@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- nosy: +pierreglaser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:54:01 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:54:01 +0000 Subject: [issue30694] Update embedded copy of expat to 2.2.1 In-Reply-To: <1497754887.58.0.724129384272.issue30694@psf.upfronthosting.co.za> Message-ID: <1557510841.78.0.461499322703.issue30694@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342085 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:55:33 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:55:33 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1557510933.98.0.0814397710106.issue26617@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:57:03 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:57:03 +0000 Subject: [issue35746] [ssl][CVE-2019-5010] TALOS-2018-0758 Denial of Service In-Reply-To: <1547569468.87.0.514647021744.issue35746@roundup.psfhosted.org> Message-ID: <1557511023.12.0.827717371321.issue35746@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:57:31 2019 From: report at bugs.python.org (=?utf-8?q?Stefan_H=C3=B6lzl?=) Date: Fri, 10 May 2019 17:57:31 +0000 Subject: [issue36512] future_factory argument for Thread/ProcessPoolExecutor In-Reply-To: <1554234773.66.0.185942114441.issue36512@roundup.psfhosted.org> Message-ID: <1557511051.66.0.867571853968.issue36512@roundup.psfhosted.org> Stefan H?lzl added the comment: It would allow to use Futures with a customized interface for a specific domain. e.g. to not only save the result of a task but also some context informations or provide properties/methods which are result specific. But when subclassing Future the builtin Thread/ProcessExecutor cannot be reused anymore, because the returned class on submit cannot be customized to be the subclassed Future. With my change it would be possible to customize the Future object returned by the Executor. As it is now the Future class has to be wrapped and the Executor subclassed to return a wrapped Future object. The Future object cannot be extended without completely wrapping it. This change would make the Executor class more versatile. It would allow something like this: class CustomExecutor: ... custom_executor = CustomExecutor() custom_future = custom_executor.submit(workload, context=context_information) ... assert custom_future.context_has_some_property() assert custom_future.result_has_some_property() factories are also used in other places in standard library: logging.setLogFactory asyncio.loop.set_task_factory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:57:59 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:57:59 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1557511079.82.0.490086784753.issue35121@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:58:39 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:58:39 +0000 Subject: [issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed" In-Reply-To: <1516618613.48.0.467229070634.issue32620@psf.upfronthosting.co.za> Message-ID: <1557511119.08.0.415163645522.issue32620@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 13:59:50 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 17:59:50 +0000 Subject: [issue30500] [security] urllib connects to a wrong host In-Reply-To: <1496030652.64.0.90102082916.issue30500@psf.upfronthosting.co.za> Message-ID: <1557511190.41.0.329988730046.issue30500@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:00:41 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:00:41 +0000 Subject: [issue29169] update zlib to 1.2.11 In-Reply-To: <1483629107.49.0.982374684244.issue29169@psf.upfronthosting.co.za> Message-ID: <1557511241.8.0.767475137069.issue29169@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:01:33 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:01:33 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1557511293.55.0.346995774801.issue29572@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342106 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:02:34 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:02:34 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1557511354.81.0.654922715498.issue30947@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:03:51 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:03:51 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1557511431.28.0.386861992117.issue31036@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342110 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:04:35 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:04:35 +0000 Subject: [issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer) In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1557511475.83.0.231806008907.issue31170@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342109 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:05:52 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:05:52 +0000 Subject: [issue36216] CVE-2019-9636: urlsplit does not handle NFKC normalization In-Reply-To: <1551893840.49.0.433864450493.issue36216@roundup.psfhosted.org> Message-ID: <1557511552.08.0.963645907866.issue36216@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342088 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:06:59 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:06:59 +0000 Subject: [issue33001] Buffer overflow vulnerability in os.symlink on Windows (CVE-2018-1000117) In-Reply-To: <1520273082.67.0.467229070634.issue33001@psf.upfronthosting.co.za> Message-ID: <1557511619.29.0.350413786401.issue33001@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:07:27 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:07:27 +0000 Subject: [issue27945] Various segfaults with dict In-Reply-To: <1472852008.61.0.354257945943.issue27945@psf.upfronthosting.co.za> Message-ID: <1557511647.52.0.164746483088.issue27945@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342104 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:08:30 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:08:30 +0000 Subject: [issue26657] Directory traversal with http.server and SimpleHTTPServer on windows In-Reply-To: <1459179015.77.0.509336394494.issue26657@psf.upfronthosting.co.za> Message-ID: <1557511710.66.0.163208208528.issue26657@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:09:12 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:09:12 +0000 Subject: [issue32981] Catastrophic backtracking in poplib (CVE-2018-1060) and difflib (CVE-2018-1061) In-Reply-To: <1519950979.87.0.467229070634.issue32981@psf.upfronthosting.co.za> Message-ID: <1557511752.31.0.646250758909.issue32981@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:10:05 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:10:05 +0000 Subject: [issue34623] _elementtree.c doesn't call XML_SetHashSalt() In-Reply-To: <1536619664.47.0.56676864532.issue34623@psf.upfronthosting.co.za> Message-ID: <1557511805.68.0.350743209701.issue34623@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:11:02 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:11:02 +0000 Subject: [issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat) In-Reply-To: <1441472893.95.0.412611892234.issue25008@psf.upfronthosting.co.za> Message-ID: <1557511862.81.0.837490037761.issue25008@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:11:27 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:11:27 +0000 Subject: [issue30231] test_imaplib needs a TLS server accepting self-signed certificates In-Reply-To: <1493736284.13.0.622029485806.issue30231@psf.upfronthosting.co.za> Message-ID: <1557511887.96.0.787275674638.issue30231@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:12:00 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:12:00 +0000 Subject: [issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters In-Reply-To: <1492711040.26.0.220875177269.issue30119@psf.upfronthosting.co.za> Message-ID: <1557511920.15.0.191116634406.issue30119@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:12:37 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:12:37 +0000 Subject: [issue29591] expat 2.2.0: Various security vulnerabilities in bundled expat (CVE-2016-0718 and CVE-2016-4472) In-Reply-To: <1487345979.72.0.358826213221.issue29591@psf.upfronthosting.co.za> Message-ID: <1557511957.64.0.858809950839.issue29591@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:13:34 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:13:34 +0000 Subject: [issue30726] [Windows] Warnings in elementtree due to new expat In-Reply-To: <1498083483.53.0.88013526442.issue30726@psf.upfronthosting.co.za> Message-ID: <1557512014.34.0.137595077894.issue30726@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342097 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:14:59 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:14:59 +0000 Subject: [issue34656] [CVE-2018-20406] memory exhaustion in Modules/_pickle.c:1393 In-Reply-To: <1536813527.13.0.956365154283.issue34656@psf.upfronthosting.co.za> Message-ID: <1557512099.14.0.463156902558.issue34656@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342084 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:16:15 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:16:15 +0000 Subject: [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds In-Reply-To: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> Message-ID: <1557512175.46.0.392628497274.issue30939@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:17:07 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:17:07 +0000 Subject: [issue30730] [security] Injecting environment variable in subprocess on Windows In-Reply-To: <1498118820.13.0.596038385019.issue30730@psf.upfronthosting.co.za> Message-ID: <1557512227.17.0.74655970643.issue30730@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:17:40 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:17:40 +0000 Subject: [issue32072] Issues with binary plists In-Reply-To: <1511031976.48.0.213398074469.issue32072@psf.upfronthosting.co.za> Message-ID: <1557512260.64.0.984543983017.issue32072@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:18:16 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:18:16 +0000 Subject: [issue34791] xml package does not obey sys.flags.ignore_environment In-Reply-To: <1537807650.53.0.956365154283.issue34791@psf.upfronthosting.co.za> Message-ID: <1557512296.38.0.445536513704.issue34791@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:19:26 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:19:26 +0000 Subject: [issue33329] sigaddset() can fail on some signal numbers In-Reply-To: <1524384471.45.0.682650639539.issue33329@psf.upfronthosting.co.za> Message-ID: <1557512366.74.0.51601617036.issue33329@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:19:48 2019 From: report at bugs.python.org (Michael Blahay) Date: Fri, 10 May 2019 18:19:48 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1557512388.2.0.377419954448.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: For the purpose of facilitating continuing conversation, here are two tests that contrast the use of * versus REMAINDER import argparse parser = argparse.ArgumentParser() parser.add_argument('foo', nargs=1,default=['none']) parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing']) parser.add_argument('baz', nargs='*', default=['nada']) parser.parse_args('a b c'.split()) Out[7]: Namespace(bar=['b', 'c'], baz=['nada'], foo=['a']) import argparse parser = argparse.ArgumentParser() parser.add_argument('foo', nargs=1,default=['none']) parser.add_argument('baz', nargs='*', default=['nada']) parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing']) parser.parse_args('a b c'.split()) Out[8]: Namespace(bar=[], baz=['b', 'c'], foo=['a']) You can see that * and REMAINDER do differ in functionality when they are the last defined argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:19:51 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:19:51 +0000 Subject: [issue35647] Cookie path check returns incorrect results In-Reply-To: <1546502396.67.0.243403156352.issue35647@roundup.psfhosted.org> Message-ID: <1557512391.51.0.397074734042.issue35647@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342091 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:20:34 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 May 2019 18:20:34 +0000 Subject: [issue30657] [security] CVE-2017-1000158: Unsafe arithmetic in PyString_DecodeEscape In-Reply-To: <1497368129.36.0.20181989843.issue30657@psf.upfronthosting.co.za> Message-ID: <1557512434.29.0.505840595096.issue30657@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg342086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:25:20 2019 From: report at bugs.python.org (Jake Tesler) Date: Fri, 10 May 2019 18:25:20 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1557512720.86.0.136714667912.issue36084@roundup.psfhosted.org> Jake Tesler added the comment: The feature is supported on Windows: the file supporting Windows threading is `thread_nt.h`, not `thread_pthread.h` since Windows doesn't use POSIX-style threads. Also it is different from threading.get_ident() - ident is a Python-issued unique identifier, TID is issued by the OS and is tracable system-wide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:42:37 2019 From: report at bugs.python.org (Pierre Glaser) Date: Fri, 10 May 2019 18:42:37 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1557513757.54.0.467232645722.issue36338@roundup.psfhosted.org> Change by Pierre Glaser : ---------- pull_requests: +13146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:42:39 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 10 May 2019 18:42:39 +0000 Subject: [issue36368] server process of shared_memory shuts down if KeyboardInterrupt In-Reply-To: <1553013481.49.0.145631506322.issue36368@roundup.psfhosted.org> Message-ID: <1557513759.43.0.445779158225.issue36368@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset d0d64ad1f5f1dc1630004091d7f8209546c1220a by Antoine Pitrou (Pierre Glaser) in branch 'master': bpo-36368: Ignore SIGINT in SharedMemoryManager servers. (GH-12483) https://github.com/python/cpython/commit/d0d64ad1f5f1dc1630004091d7f8209546c1220a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 14:44:54 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 10 May 2019 18:44:54 +0000 Subject: [issue15987] Provide a way to compare AST nodes for equality recursively In-Reply-To: <1348166637.22.0.281544835659.issue15987@psf.upfronthosting.co.za> Message-ID: <1557513894.52.0.621158651333.issue15987@roundup.psfhosted.org> Ivan Levkivskyi added the comment: Btw, I am +1 on this feature (preferably with an option to check line, column, end line, and end column). I always wanted this, but never had time to actually implement this. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 15:01:42 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 10 May 2019 19:01:42 +0000 Subject: [issue36876] Global C variables are a problem. Message-ID: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> New submission from Eric Snow : We still have a bunch of "global" C variables (static globals, static locals, maybe thread-local storage) in our code-base that break the isolation between interpreters. I added Tools/c-globals/check-c-globals.py a while back to help identify such variables, however more have crept in. I also did not take static locals or thread-locals into account. To address the above, we should do the following: 1. update check-c-globals.py to identify static locals (and thread-locals) 2. deal with any identified globals * move them to _PyRuntimeState (or thread-locals to PyThreadState, etc.) * ignore them by adding them to Tools/c-globals/ignored-globals.txt 3. add check-c-globals.py to "make check" 4. (if "make check" isn't already there), ensure check-c-globals.py is run at some point in CI Separately, we should move fields out of _PyRuntimeState into PyInterpreterState wherever possible. That can also be done at step 2 if it's not too much work. ---------- assignee: eric.snow components: Interpreter Core messages: 342119 nosy: eric.snow, vstinner priority: normal severity: normal stage: needs patch status: open title: Global C variables are a problem. type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 15:11:57 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 10 May 2019 19:11:57 +0000 Subject: [issue36877] [meta] Move fields from _PyRuntimeState to PyInterpreterState. Message-ID: <1557515517.79.0.229526383765.issue36877@roundup.psfhosted.org> New submission from Eric Snow : We have quite a bit of global state the runtime that effectively breaks the isolation between interpreters. Some of it exists as "global" C variables (see #36876) and the rest as fields on _PyRuntimeState. The offending state should be moved to PyInterpreterState. See Include/internal/pycore_pystate.h for the _PyRuntimeState and PyInterpreterState structs. ---------- assignee: eric.snow components: Interpreter Core messages: 342120 nosy: eric.snow, vstinner priority: normal severity: normal status: open title: [meta] Move fields from _PyRuntimeState to PyInterpreterState. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 15:16:48 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 10 May 2019 19:16:48 +0000 Subject: [issue36877] [meta] Move fields from _PyRuntimeState to PyInterpreterState. In-Reply-To: <1557515517.79.0.229526383765.issue36877@roundup.psfhosted.org> Message-ID: <1557515808.14.0.0561942240406.issue36877@roundup.psfhosted.org> Eric Snow added the comment: FYI, I've already started some of this work: * #36737 warnings * #36854 gc * #33608 pending calls * #10915 & #15751 gilstate Other bits I'm planning on: * the rest of the global "ceval" state * the memory allocators * the GIL Note that, to make the GIL per-interpreter, we can't have any remaining runtime state shared by interpreters (unless it is protected by its own locks). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 15:21:20 2019 From: report at bugs.python.org (Michael Blahay) Date: Fri, 10 May 2019 19:21:20 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1557516080.62.0.546192763277.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: Here is another take on the issue, this time illustrated through the lens of optional arguments. import argparse parser = argparse.ArgumentParser() parser.add_argument('--foo', nargs=1,default=['none']) parser.add_argument('--baz', nargs='*', default=['nada']) parser.add_argument('--bar', nargs=argparse.REMAINDER,default=['nothing']) parser.parse_args('--foo a --bar b --baz c'.split()) Out[9]: Namespace(bar=['b', '--baz', 'c'], baz=['nada'], foo=['a']) import argparse parser = argparse.ArgumentParser() parser.add_argument('--foo', nargs=1,default=['none']) parser.add_argument('--baz', nargs='*', default=['nada']) parser.add_argument('--bar', nargs=argparse.REMAINDER,default=['nothing']) parser.parse_args('--foo a --baz b --bar c'.split()) Out[10]: Namespace(bar=['c'], baz=['b'], foo=['a']) import argparse parser = argparse.ArgumentParser() parser.add_argument('--foo', nargs=1,default=['none']) parser.add_argument('--baz', nargs='*', default=['nada']) parser.add_argument('--bar', nargs=argparse.REMAINDER,default=['nothing']) parser.parse_args([]) Out[11]: Namespace(bar=['nothing'], baz=['nada'], foo=['none']) It is important to note that when an optional argument is not present then the default is always used, including for one using nargs=argparse.REMAINDER. In all three tests, bar is the argument using REMAIDER. In the first test, one can see that when bar isn't the last argument then anything else, including other arguments, are swept up as being arguments of bar. This greedy behavior for REMAINDER is something that * does not share (test 2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 15:42:10 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 10 May 2019 19:42:10 +0000 Subject: [issue36810] Recursive type annotations do not work in documentation tests In-Reply-To: <1557128091.8.0.92390495342.issue36810@roundup.psfhosted.org> Message-ID: <1557517330.33.0.288333072813.issue36810@roundup.psfhosted.org> Ivan Levkivskyi added the comment: I think this is related to doc tests being executed in a namespace where the class definition is not available. I am not sure what is the best way here, a workaround is to explicitly pass the namespace, for example this passes: import typing def f(clazz, ns): """ >>> class MyClass: ... my_field: 'MyClass' >>> f(MyClass, globals()) """ typing.get_type_hints(clazz, ns) You can maybe make the ns parameter optional, but it still doesn't look like a good solution. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 15:42:56 2019 From: report at bugs.python.org (Glenn Linderman) Date: Fri, 10 May 2019 19:42:56 +0000 Subject: [issue36863] argparse doesn't like options in the middle of arguments In-Reply-To: <1557391162.39.0.325223416239.issue36863@roundup.psfhosted.org> Message-ID: <1557517376.77.0.587503597094.issue36863@roundup.psfhosted.org> Change by Glenn Linderman : ---------- nosy: +v+python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 15:55:08 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 May 2019 19:55:08 +0000 Subject: [issue34408] possible null pointer dereference in pystate.c In-Reply-To: <1534277378.73.0.56676864532.issue34408@psf.upfronthosting.co.za> Message-ID: <1557518108.51.0.484032121803.issue34408@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:12:08 2019 From: report at bugs.python.org (Michael Blahay) Date: Fri, 10 May 2019 20:12:08 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1557519128.38.0.549391852515.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: With the optional arguments, the determination about whether to use the default value is made based on whether the flag is present or not. When positional arguments are involved, the need for the defaults seems to in part be determined based on whether the argument exists. The fact that * and REMAINDER are zero-to-many in nature add some ambiguity into the situation. For the *, it seems that the positional argument only exists if there is at least one actual argument value that it can consume. import argparse parser = argparse.ArgumentParser() parser.add_argument('foo', nargs=1,default=['none']) #parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing']) parser.add_argument('baz', nargs='*', default=['nada']) parser.parse_args('a b'.split()) Out[25]: Namespace(baz=['b'], foo=['a']) import argparse parser = argparse.ArgumentParser() parser.add_argument('foo', nargs=1,default=['none']) #parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing']) parser.add_argument('baz', nargs='*', default=['nada']) parser.parse_args('a'.split()) Out[26]: Namespace(baz=['nada'], foo=['a']) Mean while, the REMAINDER option makes the argument act as if it exists regardless of whether an actual argument value exists. import argparse parser = argparse.ArgumentParser() parser.add_argument('foo', nargs=1,default=['none']) parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing']) #parser.add_argument('baz', nargs='*', default=['nada']) parser.parse_args('a b'.split()) Out[27]: Namespace(bar=['b'], foo=['a']) import argparse parser = argparse.ArgumentParser() parser.add_argument('foo', nargs=1,default=['none']) parser.add_argument('bar', nargs=argparse.REMAINDER,default=['nothing']) #parser.add_argument('baz', nargs='*', default=['nada']) parser.parse_args('a'.split()) Out[28]: Namespace(bar=[], foo=['a']) To conclude, * and REMAINDER perform similar, but different, roles when used with positional arguments. With edge cases like the ones laid out above, it can be hard to conceptualize what the exact behavior should be. I will recommend that the documentation be updated to convey the following message: "When used with positional arguments, REMAINDER will never use the designated default value list. It will instead return an empty list if there are no values for the argument to consume. If the use of default values is desired, then * must be used." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:13:09 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 10 May 2019 20:13:09 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1557519189.49.0.866412082328.issue36876@roundup.psfhosted.org> Eric Snow added the comment: Also, Tools/c-globals/ignored-globals.txt is a bit out of date (some vars have been removed, renamed, or moved to another file). That should get cleaned up. It might also make sense to update check-c-globals.py to verify that all variables in ignored-globals.txt actually exist. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:15:42 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 10 May 2019 20:15:42 +0000 Subject: [issue36877] [meta] Move fields from _PyRuntimeState to PyInterpreterState. In-Reply-To: <1557515517.79.0.229526383765.issue36877@roundup.psfhosted.org> Message-ID: <1557519342.26.0.709575411099.issue36877@roundup.psfhosted.org> Eric Snow added the comment: In conjunction with #36876, there are a bunch of currently ignored globals (in Tools/c-globals/ignored-globals.txt) that should actually be moved to per-interpreter runtime state. This mostly applies to any globals that point to one or more objects, since objects must not be shared by interpreters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:16:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 May 2019 20:16:25 +0000 Subject: [issue34408] possible null pointer dereference in pystate.c In-Reply-To: <1534277378.73.0.56676864532.issue34408@psf.upfronthosting.co.za> Message-ID: <1557519385.77.0.392016164202.issue34408@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 34ed40f2e56703de04241cbacb306113b59a84f9 by Pablo Galindo in branch '3.7': [3.7] bpo-34408: Prevent a null pointer dereference and resource leakage in `PyInterpreterState_New()` (GH-8767) (GH-13237) https://github.com/python/cpython/commit/34ed40f2e56703de04241cbacb306113b59a84f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:16:48 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 May 2019 20:16:48 +0000 Subject: [issue34408] possible null pointer dereference in pystate.c In-Reply-To: <1534277378.73.0.56676864532.issue34408@psf.upfronthosting.co.za> Message-ID: <1557519408.64.0.73926774906.issue34408@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I have backported the fix to 3.7 :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:17:58 2019 From: report at bugs.python.org (Michael Blahay) Date: Fri, 10 May 2019 20:17:58 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1557519478.86.0.783594474625.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: Much detail has been provided regarding why the default is ignored when user the REMAINDER option. The desire to add an exception has not. Is there anyone that can provide guidance on whether the combination of: 1. Positional Argument 2. nargs=REMAINDER 3. default=something should raise an exception upon execution of the add_argument method? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:40:16 2019 From: report at bugs.python.org (Michael Sullivan) Date: Fri, 10 May 2019 20:40:16 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore Message-ID: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> New submission from Michael Sullivan : Per discussion during the typing summit at PyCon, it would be a good idea to allow extra information to be included in `# type: ignore` comments, in order to allow behavior such as suppressing individual errors (for example, with syntax like `# type: ignore[E1000]`, to suppress error 1000). My proposal, then, is to generalize the definition of type: ignore comments to be `# type: ignore followed by a non-alphanumeric character. Then `# type: ignore[E1000]` and `# type: ignore E1000` would be valid type ignore comments while `# type: ignoreE1000` would not be. Now that ast.parse can parse type_comments, this needs to make it into 3.8, basically, if we want to do this and be able to use the ast type_comment feature. Ideally, the text of the type ignore would be actually included in the produced AST. As a bare minimum first step, we need to recognize type ignores with extra information and report them (and, critically, not detect them as regular type comments and produce errors when they appear in unexpected places). I'll put up a PR to do the second part shortly. ---------- components: Interpreter Core messages: 342130 nosy: gvanrossum, levkivskyi, msullivan priority: normal severity: normal status: open title: ast.parse with type_comments=True should allow extra text after # type: ignore type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:50:26 2019 From: report at bugs.python.org (Michael Blahay) Date: Fri, 10 May 2019 20:50:26 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557521426.98.0.223653209516.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: PR 13203 has finally made it through all checks successfully and is now awaiting merging. Please someone pick it up and merge it. Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:50:39 2019 From: report at bugs.python.org (Michael Sullivan) Date: Fri, 10 May 2019 20:50:39 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1557521439.73.0.999417291134.issue36878@roundup.psfhosted.org> Change by Michael Sullivan : ---------- keywords: +patch pull_requests: +13148 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:51:01 2019 From: report at bugs.python.org (Scaler) Date: Fri, 10 May 2019 20:51:01 +0000 Subject: [issue36879] bug with round() and "numpy floats" Message-ID: <1557521461.62.0.231118714409.issue36879@roundup.psfhosted.org> New submission from Scaler : round()'s documentation (https://docs.python.org/3/library/functions.html#round) says that "The return value is an integer if ndigits is omitted or None." Works well with "built-in floats", but not with "numpy floats" (didn't know they were different): >>> import numpy as np >>> round(5.5) 6 >>> round(np.round(5.5)-0.5) 6.0 As a side note, is there any reason why round() does not return value as an integer if ndigits is 0 or negative also? ---------- messages: 342132 nosy: Scaler priority: normal severity: normal status: open title: bug with round() and "numpy floats" type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 16:59:12 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 10 May 2019 20:59:12 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557521952.53.0.645120988902.issue36867@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset f22cc69b012f52882d434a5c44a004bc3aa5c33c by Antoine Pitrou (Pierre Glaser) in branch 'master': bpo-36867: Make semaphore_tracker track other system resources (GH-13222) https://github.com/python/cpython/commit/f22cc69b012f52882d434a5c44a004bc3aa5c33c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 17:22:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 21:22:11 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. In-Reply-To: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> Message-ID: <1557523331.7.0.332351764725.issue36818@roundup.psfhosted.org> STINNER Victor added the comment: Eric is working on a different approach: https://bugs.python.org/issue36854 ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 17:25:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 21:25:10 +0000 Subject: [issue36345] Deprecate Tools/scripts/serve.py in favour of python -m http.server -d In-Reply-To: <1552917459.29.0.295748589939.issue36345@roundup.psfhosted.org> Message-ID: <1557523510.97.0.139468641638.issue36345@roundup.psfhosted.org> STINNER Victor added the comment: Ok, thanks Berker for your longer answer. I have no opinion on this example anymore. St?phane and others: I let you decide how to handle it ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 17:28:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 21:28:45 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1557523725.76.0.986685270555.issue36843@roundup.psfhosted.org> STINNER Victor added the comment: > open O_RDONLY failed Ah. That sounds like an issue on your machine or specific to AIX. I don't see what Python can do to support a platform where /dev/urandom doesn't work. Python really needs /dev/urandom at startup to initialize its "hash secret" to reduce the risk of DoS attack attack against dict. https://python-security.readthedocs.io/vuln/cve-2012-1150_hash_dos.html Maybe it's a permission issue. Maybe a libc issue. I don't know. But I suggest to close the issue and try to find help from AIX instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 17:31:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 21:31:17 +0000 Subject: [issue34408] possible null pointer dereference in pystate.c In-Reply-To: <1534277378.73.0.56676864532.issue34408@psf.upfronthosting.co.za> Message-ID: <1557523877.0.0.352101472893.issue34408@roundup.psfhosted.org> STINNER Victor added the comment: > I have backported the fix to 3.7 :) Ok, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 17:32:03 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 10 May 2019 21:32:03 +0000 Subject: [issue32587] Make REG_MULTI_SZ support PendingFileRenameOperations In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1557523923.76.0.509434312303.issue32587@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13149 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 17:39:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 21:39:12 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1557524352.06.0.0431413563824.issue36710@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 09532feeece39d5ba68a0d47115ce1967bfbd58e by Victor Stinner in branch 'master': bpo-36710: Add 'ceval' local variable to ceval.c (GH-12934) https://github.com/python/cpython/commit/09532feeece39d5ba68a0d47115ce1967bfbd58e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 17:53:03 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 10 May 2019 21:53:03 +0000 Subject: [issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1557525183.27.0.991629171808.issue26317@roundup.psfhosted.org> Jeffrey Kintscher added the comment: My mistake was not adding --enable-framework=${HOME}/sandbox/src/python3.7/inst to the configure script and then running make make install (I know... read the README file) gcc 8.3.0 doesn't like the Xcode system headers included by the .m files. I will dig into this now that I am using the proper build steps. As a side note, I find it counter-intuitive that Mac/Makefile only gets invoked by 'make install' to build the Objective-C source files. IMHO they should be built by "make" and then installed by "make install". Forcing a build and install in one step can be dangerous and accidentally leave the system in an undesirable state when the build process fails with a partial install. Also, --enable-framework should use a subpath of --prefix by default for the framework installation instead of defaulting to /Library/Frameworks regardless of the --prefix setting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 18:11:08 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 10 May 2019 22:11:08 +0000 Subject: [issue32587] Make REG_MULTI_SZ support PendingFileRenameOperations In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1557526268.89.0.0959045388218.issue32587@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 18:12:35 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 May 2019 22:12:35 +0000 Subject: [issue36879] bug with round() and "numpy floats" In-Reply-To: <1557521461.62.0.231118714409.issue36879@roundup.psfhosted.org> Message-ID: <1557526355.9.0.424205584653.issue36879@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: round() delegates to class.__round__, so what's happening here is that numpy's float implements __round__ in a way it returns a float. There is no restriction on what the class can return: >>> class A: ... def __round__(self): ... return "Oh, no!" ... >>> round(A()) 'Oh, no!' Making additional restrictions is backwards incompatible. Maybe we should add something in the docs regarding the no-restriction point. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 18:13:21 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 May 2019 22:13:21 +0000 Subject: [issue36879] bug with round() and "numpy floats" In-Reply-To: <1557521461.62.0.231118714409.issue36879@roundup.psfhosted.org> Message-ID: <1557526401.47.0.34843000347.issue36879@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python resolution: -> not a bug versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 18:19:01 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 May 2019 22:19:01 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1557526741.39.0.464127539276.issue36876@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 18:31:29 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 10 May 2019 22:31:29 +0000 Subject: [issue36810] Recursive type annotations do not work in documentation tests In-Reply-To: <1557128091.8.0.92390495342.issue36810@roundup.psfhosted.org> Message-ID: <1557527489.36.0.2660153854.issue36810@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- nosy: +gvanrossum, lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 18:39:01 2019 From: report at bugs.python.org (dgelessus) Date: Fri, 10 May 2019 22:39:01 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much Message-ID: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> New submission from dgelessus : This occurs when writing a ctypes callback in Python whose restype is ctypes.py_object. If the callback returns None, the refcount of None is decremented once too often. This happens every time the callback is called, and if done often enough, Python attempts to deallocate None and crashes. To reproduce: $ bin/python3 Python 3.8.0a4+ (heads/master:09532feeec, May 10 2019, 23:53:49) [Clang 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> import ctypes >>> FUNTYPE = ctypes.CFUNCTYPE(ctypes.py_object) >>> @FUNTYPE ... def fun(): ... return None ... >>> print(fun()) None >>> sys.getrefcount(None) 4329 >>> print(fun()) None >>> sys.getrefcount(None) 4327 >>> print(fun()) None >>> sys.getrefcount(None) 4326 >>> while True: ... fun() ... Fatal Python error: deallocating None Current thread 0x00007fff7bf80000 (most recent call first): File "", line 2 in Abort trap: 6 # exits with code 134 (SIGABRT) I've attached the crash report generated by OS X. (It's a plain text file, despite the extension.) Interestingly, this only happens with None. Other returned objects are refcounted correctly: >>> thing = object() >>> @FUNTYPE ... def otherfun(): ... return thing ... >>> print(otherfun()) >>> sys.getrefcount(thing) 2 >>> print(otherfun()) >>> sys.getrefcount(thing) 2 >>> print(otherfun()) >>> sys.getrefcount(thing) 2 I could reproduce this on the following configurations: * Python 3.8.0a4 (self-compiled from master branch: 09532feeece39d5ba68a0d47115ce1967bfbd58e) on OS X 10.11 (x86_64) * Python 3.7.3 (python.org installer) on OS X 10.11 (x86_64) * Python 3.6.8 (from package manager) on Kubuntu 18.10 (x86_64) * Python 3.5.3 (from package manager) on Raspbian Stretch (armv6) ---------- components: ctypes files: python3.8_2019-05-11-000251.crash messages: 342141 nosy: dgelessus priority: normal severity: normal status: open title: Returning None from a callback with restype py_object decrements None's refcount too much type: crash versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48325/python3.8_2019-05-11-000251.crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 19:27:54 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 May 2019 23:27:54 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557530874.82.0.619099838661.issue27639@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 19:31:50 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 May 2019 23:31:50 +0000 Subject: [issue36620] Documentation missing parameter for Itertools.zip_longest In-Reply-To: <1555099757.43.0.201440165942.issue36620@roundup.psfhosted.org> Message-ID: <1557531110.98.0.958259294453.issue36620@roundup.psfhosted.org> Raymond Hettinger added the comment: I'll take care of it. Thank you. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 19:35:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 May 2019 23:35:32 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557531332.7.0.159281620051.issue36778@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 20:11:10 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 11 May 2019 00:11:10 +0000 Subject: [issue36810] Recursive type annotations do not work in documentation tests In-Reply-To: <1557128091.8.0.92390495342.issue36810@roundup.psfhosted.org> Message-ID: <1557533470.33.0.545790757633.issue36810@roundup.psfhosted.org> Guido van Rossum added the comment: I don't think there's an actionable bug here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 21:03:29 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 11 May 2019 01:03:29 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1557536609.72.0.00825212248482.issue36878@roundup.psfhosted.org> Ivan Levkivskyi added the comment: I like the idea of separate smaller PRs, the first one looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 21:44:51 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 11 May 2019 01:44:51 +0000 Subject: [issue33303] ElementTree Comment text isn't escaped In-Reply-To: <1524011592.66.0.682650639539.issue33303@psf.upfronthosting.co.za> Message-ID: <1557539091.72.0.880355387228.issue33303@roundup.psfhosted.org> Jeffrey Kintscher added the comment: Which characters would you escape in a processing instruction? The XML spec says not to escape '<' and '&', but doesn't say what should be escaped. It seems to me that escaping '?' when followed by '>' should be sufficient since the character sequence "?>" is the closing delimiter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 21:49:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 May 2019 01:49:33 +0000 Subject: [issue36749] PPC64 AIX 3.x: compilation issue, linker fails to locate symbols In-Reply-To: <1556524540.38.0.725004152071.issue36749@roundup.psfhosted.org> Message-ID: <1557539373.16.0.873114601353.issue36749@roundup.psfhosted.org> STINNER Victor added the comment: PPC64 AIX 3.x buildbot worker is back to green. It seems like my PR 13004 is useless. I close the issue. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 21:57:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 May 2019 01:57:21 +0000 Subject: [issue36728] Remove PyEval_ReInitThreads() from the public C API In-Reply-To: <1556234529.34.0.747871379917.issue36728@roundup.psfhosted.org> Message-ID: <1557539841.25.0.144630858817.issue36728@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13151 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 21:58:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 May 2019 01:58:38 +0000 Subject: [issue36728] Remove PyEval_ReInitThreads() from the public C API In-Reply-To: <1556234529.34.0.747871379917.issue36728@roundup.psfhosted.org> Message-ID: <1557539918.31.0.0783894934705.issue36728@roundup.psfhosted.org> STINNER Victor added the comment: The function was added 19 years ago: commit fee3a2dd8cf984b8261032086fe513bf7327b601 Author: Guido van Rossum Date: Sun Aug 27 17:34:07 2000 +0000 Charles Waldman's patch to reinitialize the interpreter lock after a fork. This solves the test_fork1 problem. (ceval.c, signalmodule.c, intrcheck.c) SourceForge: [ Patch #101226 ] make threading fork-safe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 22:02:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 May 2019 02:02:22 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1557540142.84.0.924919993617.issue21536@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13152 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 22:06:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 May 2019 02:06:09 +0000 Subject: [issue36471] PEP 432, PEP 587: Add _Py_RunMain() In-Reply-To: <1553861624.16.0.982663569767.issue36471@roundup.psfhosted.org> Message-ID: <1557540369.01.0.0794440047316.issue36471@roundup.psfhosted.org> STINNER Victor added the comment: The PEP 587 will decide if this function is made public or not. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 22:10:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 May 2019 02:10:06 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1557540606.65.0.88311044741.issue21536@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4ebcd7e2980d650c711d21b93447af39a8604554 by Victor Stinner in branch 'master': bpo-21536: Update What's New in Python 3.8 entry (GH-13242) https://github.com/python/cpython/commit/4ebcd7e2980d650c711d21b93447af39a8604554 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 22:18:21 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 11 May 2019 02:18:21 +0000 Subject: [issue36788] Add clamp() function to builtins In-Reply-To: <1556920200.45.0.0628062537563.issue36788@roundup.psfhosted.org> Message-ID: <1557541101.46.0.504222796898.issue36788@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 22:24:23 2019 From: report at bugs.python.org (paul j3) Date: Sat, 11 May 2019 02:24:23 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1557541463.94.0.43734904598.issue35495@roundup.psfhosted.org> paul j3 added the comment: At the start of parse_known_args, all defaults (except SUPPRESS ones) are placed in the namespace: # add any action defaults that aren't present for action in self._actions: if action.dest is not SUPPRESS: if not hasattr(namespace, action.dest): if action.default is not SUPPRESS: setattr(namespace, action.dest, action.default) at the end of _parse_known_args there's a conditional expression that cleans up remaining defaults that are strings, by passing them through the 'type` callable: setattr(namespace, action.dest, self._get_value(action, action.default)) Read the comments to see why this default setting is done in two parts. The pattern of defaults in msg342122 with optionals is consistent with that. If the argument is not provided, the default appears. In the first example of that message, the REMAINDER is given all the remaining strings including the '--bar', so there is nothing left to trigger the '--bar' optional argument, and it retains the default. The difference for positionals is due to how the '*' and '...' are handled in _getvalues. Both may be filled with an empty list of values. # when nargs='*' on a positional, if there were no command-line # args, use the default if it is anything other than None elif (not arg_strings and action.nargs == ZERO_OR_MORE and not action.option_strings): if action.default is not None: value = action.default else: value = arg_strings self._check_value(action, value) .... # REMAINDER arguments convert all values, checking none elif action.nargs == REMAINDER: value = [self._get_value(action, v) for v in arg_strings] In the case of '*', the default is, effectively, placed back on the namespace. REMAINDER does not - the empty list is put in the namespace. In _get_positional_kwargs, # mark positional arguments as required if at least one is # always required if kwargs.get('nargs') not in [OPTIONAL, ZERO_OR_MORE]: kwargs['required'] = True if kwargs.get('nargs') == ZERO_OR_MORE and 'default' not in kwargs: kwargs['required'] = True That last conditional is a little puzzling, but I suspect it has to do with mutually_exclusive_groups, A '*' positional can be a member of a group if it has a default. Anyways, we could add a test at this point like: if kwargs.get('nargs') == REMAINDER and 'default' in kwargs: msg = _("'default' is not allowed with a REMAINDER positional") raise TypeError(msg) But reviewing the code I notice another difference. 'choices' are not honored for REMAINDER. That makes a lot of sense. REMAINDER is supposed to be a catch all, documented as something that might be passed on to another parser. This parser shouldn't be doing anything with those values. The documentation reads: argparse.REMAINDER. All the remaining command-line arguments are gathered into a list. This is commonly useful for command line utilities that dispatch to other command line utilities: I think REMAINDER has another quirk. It doesn't work as the first (and only?) argument. There should be a bug/issue to that effect. https://bugs.python.org/issue17050, argparse.REMAINDER doesn't work as first argument In https://bugs.python.org/issue17050#msg315716, I suggest removing REMAINDER from the docs. We can leave the code as is, in case anyone is using still using it. But it is probably too much work to make the code and docs match, both for that issue, and for this. '*' plus '--' gives almost the same behavior. So does parse_known_args. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 22:28:46 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 11 May 2019 02:28:46 +0000 Subject: [issue36875] argparse does not ship with translations In-Reply-To: <1557491674.85.0.800524916833.issue36875@roundup.psfhosted.org> Message-ID: <1557541726.34.0.516574697116.issue36875@roundup.psfhosted.org> Terry J. Reedy added the comment: Many modules contain translatable strings. CPython does not ship with translations of any of them and I believe it is against policy to do so. 1. Core developers, though an international group, are not competent to create or approve translations. 2. Core developers feel that professional Python users must gain basic English proficiency. If you want to discuss this further, please discuss on python-ideas list, possibly after trying to find previous discussions, not here. We only allowed 'official' translations of the docs about a year ago and those are done by a group separate from the core developers. ---------- nosy: +terry.reedy resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 22:29:04 2019 From: report at bugs.python.org (Randy Eckman) Date: Sat, 11 May 2019 02:29:04 +0000 Subject: [issue36881] isinstance raises TypeError for metaclass with metaclass=ABCMeta Message-ID: <1557541744.61.0.162387429511.issue36881@roundup.psfhosted.org> New submission from Randy Eckman : >>> from abc import ABCMeta >>> class AbstractMeta(type, metaclass=ABCMeta): pass ... >>> class Meta1(AbstractMeta): pass ... >>> class Meta2(AbstractMeta): pass ... >>> class ClassA(metaclass=Meta1): pass ... >>> isinstance(ClassA, Meta2) Traceback (most recent call last): File "", line 1, in File "C:\miniconda\miniconda3\lib\abc.py", line 139, in __instancecheck__ return _abc_instancecheck(cls, instance) TypeError: __subclasscheck__() takes exactly one argument (0 given) This is driven by the fact that the metaclass of AbstractMeta is ABCMeta; if I change its metaclass to something else that does not contain ABCMeta in the inheritance chain, isinstance returns False as expected. Possibly related to Issue 2325? ---------- components: Interpreter Core messages: 342152 nosy: emanspeaks priority: normal severity: normal status: open title: isinstance raises TypeError for metaclass with metaclass=ABCMeta versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 23:02:50 2019 From: report at bugs.python.org (paul j3) Date: Sat, 11 May 2019 03:02:50 +0000 Subject: [issue13824] argparse.FileType opens a file and never closes it In-Reply-To: <1326975939.94.0.524131708506.issue13824@psf.upfronthosting.co.za> Message-ID: <1557543770.9.0.547429460172.issue13824@roundup.psfhosted.org> paul j3 added the comment: While I continue to follow argparse issues, I'm not doing development (with my own repository, etc). I haven't revisited the issue since 2013, and don't know that much more about Python file handling. Occasionally 'FileType' issues come up on StackOverflow, and my most common suggestion is accept a string, and open the file yourself. In writing a solution, keep backward compatibility foremost in mind. We don't want to mess things up for existing code. And keep FileType simple, consistent with Steven's original intent - as a tool for simple input/output scripts. As for the idea of 2 - Making the argument namespace itself support context management someone could experiment with a new Namespace class with the proper enter/exit methods. The use of a custom Namespace class is documented https://docs.python.org/3/library/argparse.html#the-namespace-object So the idea can be implemented and thoroughly tested without altering the default Namespace class and its use. (With one caution, subparsers won't use this custom class.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 10 23:39:33 2019 From: report at bugs.python.org (paul j3) Date: Sat, 11 May 2019 03:39:33 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1557545973.36.0.510628701913.issue9351@roundup.psfhosted.org> paul j3 added the comment: A variation on the problem I reported in https://bugs.python.org/issue9351#msg229968 is that a custom Namespace class as documented in https://docs.python.org/3/library/argparse.html#the-namespace-object will not be used by the subparsers. Only the main parser uses that custom Namespace object; the subparsers continue to use the default 'argparse.Namespace()'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 00:24:10 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 May 2019 04:24:10 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557548650.87.0.295166296871.issue36751@roundup.psfhosted.org> Nick Coghlan added the comment: This PR needs to be reverted - we previously deprecated this API, but then undeprecated it again in #27172, as the consequence of deprecating it was projects copying & pasting the getfullargspec() implementation into their own code, not switching to inspect.Signature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 00:24:52 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 May 2019 04:24:52 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557548692.76.0.229957167694.issue36751@roundup.psfhosted.org> Change by Nick Coghlan : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 00:32:18 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 May 2019 04:32:18 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557549138.07.0.630897642453.issue36751@roundup.psfhosted.org> Nick Coghlan added the comment: And no, the undeprecation wasn't because of Python 2 (Py2 doesn't have getfullargspec() - it's a Py3 only API). The undeprecation was because there are a lot of 3rd party projects for whom the getfullargspec() representation is good enough, and switching to inspect.Signature instead requires a significant rewrite vs just wrapping inspect.Signature to produce getfullargspec() style output. So getfullargspec() doesn't need to change at all for PEP 570 and should instead keep handling positional only arguments the same way it has since it was switched over to being based on inspect.Signature: reporting them the same way as positional-or-keyword parameters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 00:32:59 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 May 2019 04:32:59 +0000 Subject: [issue27172] Undeprecate inspect.getfullargspec() In-Reply-To: <1464767888.9.0.788649321892.issue27172@psf.upfronthosting.co.za> Message-ID: <1557549179.8.0.740893358764.issue27172@roundup.psfhosted.org> Change by Nick Coghlan : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 00:35:07 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 May 2019 04:35:07 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557549307.73.0.270579046873.issue36751@roundup.psfhosted.org> Nick Coghlan added the comment: Also note #32190 regarding changing the way these APIs are documented, without introducing any programmatic deprecation warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 00:53:36 2019 From: report at bugs.python.org (Dieter Weber) Date: Sat, 11 May 2019 04:53:36 +0000 Subject: [issue32573] All sys attributes (.argv, ...) should exist in embedded environments In-Reply-To: <1516131988.33.0.467229070634.issue32573@psf.upfronthosting.co.za> Message-ID: <1557550416.49.0.525903227067.issue32573@roundup.psfhosted.org> Change by Dieter Weber : ---------- keywords: +patch pull_requests: +13153 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 01:34:34 2019 From: report at bugs.python.org (Martin Panter) Date: Sat, 11 May 2019 05:34:34 +0000 Subject: [issue36863] argparse doesn't like options in the middle of arguments In-Reply-To: <1557391162.39.0.325223416239.issue36863@roundup.psfhosted.org> Message-ID: <1557552874.85.0.0704916533379.issue36863@roundup.psfhosted.org> Martin Panter added the comment: The ?cmd? module doesn?t use ?argparse? as far as I can see. You might have to provide more information or code for someone to make sense of or reproduce your bug. Also, see Issue 14191 which added new ?parse_[known]_intermixed_args? APIs in 3.7, and have a look at Issue 15112, about intermixing options between particular kinds of positional parameters. ---------- nosy: +martin.panter status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 01:53:17 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 11 May 2019 05:53:17 +0000 Subject: =?utf-8?b?W2lzc3VlMzY4ODNdIOWcqGN0eXBlc+mHjOiwg+eUqEPlupPov5Tlm55jX2No?= =?utf-8?b?YXJfcOexu+Wei+aXtueahOmXrumimA==?= Message-ID: <1557553997.58.0.720103002142.issue36883@roundup.psfhosted.org> anthony shaw added the comment: Closing as duplicate of 36882 ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 01:53:21 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 11 May 2019 05:53:21 +0000 Subject: =?utf-8?b?W2lzc3VlMzY4ODNdIOWcqGN0eXBlc+mHjOiwg+eUqEPlupPov5Tlm55jX2No?= =?utf-8?b?YXJfcOexu+Wei+aXtueahOmXrumimA==?= Message-ID: <1557554001.55.0.730239513629.issue36883@roundup.psfhosted.org> Change by anthony shaw : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 01:55:05 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 11 May 2019 05:55:05 +0000 Subject: =?utf-8?b?W2lzc3VlMzY4ODJdIOWcqGN0eXBlc+mHjOiwg+eUqEPlupPov5Tlm55jX2No?= =?utf-8?b?YXJfcOexu+Wei+aXtueahOmXrumimA==?= Message-ID: <1557554105.05.0.878495760542.issue36882@roundup.psfhosted.org> anthony shaw added the comment: "When the C library is called in ctypes to return the c_char_p type, the problem that only the string before \0 can be obtained when the string contains \\0" This function is specifically for null-terminated strings (\0), please could you be more specific about the expected behaviour and why this is a bug? https://docs.python.org/2/library/ctypes.html#ctypes.c_char_p ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 01:58:39 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 11 May 2019 05:58:39 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1557554319.51.0.0190188875929.issue36880@roundup.psfhosted.org> anthony shaw added the comment: Thanks, I'll check this out ---------- assignee: -> anthonypjshaw nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 02:03:48 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 11 May 2019 06:03:48 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1557554628.77.0.780921202288.issue36880@roundup.psfhosted.org> anthony shaw added the comment: The documentation says: >> Note Make sure you keep references to CFUNCTYPE() objects as long as they are used from C code. ctypes doesn?t, and if you don?t, they may be garbage collected, crashing your program when a callback is made. Also, note that if the callback function is called in a thread created outside of Python?s control (e.g. by the foreign code that calls the callback), ctypes creates a new dummy Python thread on every invocation. This behavior is correct for most purposes, but it means that values stored with threading.local will not survive across different callbacks, even when those calls are made from the same C thread. But that doesn't describe the situation you've shared. I'll continue to look into the ctypes module ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 02:05:17 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 11 May 2019 06:05:17 +0000 Subject: [issue36881] isinstance raises TypeError for metaclass with metaclass=ABCMeta In-Reply-To: <1557541744.61.0.162387429511.issue36881@roundup.psfhosted.org> Message-ID: <1557554717.66.0.805526282603.issue36881@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +rhettinger, stutzbach type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 02:07:07 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 11 May 2019 06:07:07 +0000 Subject: [issue36879] bug with round() and "numpy floats" In-Reply-To: <1557521461.62.0.231118714409.issue36879@roundup.psfhosted.org> Message-ID: <1557554827.69.0.236694763849.issue36879@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: not a bug -> stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 02:10:16 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 11 May 2019 06:10:16 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1557555016.99.0.315426253682.issue36880@roundup.psfhosted.org> anthony shaw added the comment: >From lldb (lldb) run ~/cpython/test_gc_ctypes.py Process 20059 launched: '/Users/anthonyshaw/CLionProjects/cpython/python.exe' (x86_64) Fatal Python error: deallocating None Current thread 0x00000001005c85c0 (most recent call first): File "/Users/anthonyshaw/cpython/test_gc_ctypes.py", line 7 in Objects/typeobject.c:3187: _Py_NegativeRefcount: Assertion failed: object has negative ref count Enable tracemalloc to get the memory block allocation traceback object : type : NoneType refcount: -1 address : 0x10038a2c0 Process 20059 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT frame #0: 0x00007fff5984f2c6 libsystem_kernel.dylib`__pthread_kill + 10 libsystem_kernel.dylib`__pthread_kill: -> 0x7fff5984f2c6 <+10>: jae 0x7fff5984f2d0 ; <+20> 0x7fff5984f2c8 <+12>: movq %rax, %rdi 0x7fff5984f2cb <+15>: jmp 0x7fff59849457 ; cerror_nocancel 0x7fff5984f2d0 <+20>: retq Target 0: (python.exe) stopped. ---------- Added file: https://bugs.python.org/file48326/test_gc_ctypes.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 02:27:02 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 11 May 2019 06:27:02 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1557556022.0.0.756204285073.issue36880@roundup.psfhosted.org> anthony shaw added the comment: Full trace for reference: (lldb) bt all * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT * frame #0: 0x00007fff5984f2c6 libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x00007fff59904bf1 libsystem_pthread.dylib`pthread_kill + 284 frame #2: 0x00007fff597b96a6 libsystem_c.dylib`abort + 127 frame #3: 0x0000000100236c14 python.exe`fatal_error(prefix=0x0000000000000000, msg="_PyObject_AssertFailed", status=-1) at pylifecycle.c:2128:9 frame #4: 0x0000000100236a5e python.exe`Py_FatalError(msg="_PyObject_AssertFailed") at pylifecycle.c:2138:5 frame #5: 0x00000001000b49f4 python.exe`_PyObject_AssertFailed(obj=0x000000010038a2c0, expr=0x0000000000000000, msg="object has negative ref count", file="Objects/typeobject.c", line=3187, function="_Py_NegativeRefcount") at object.c:2163:5 frame #6: 0x00000001000b4a44 python.exe`_Py_NegativeRefcount(filename="Objects/typeobject.c", lineno=3187, op=0x000000010038a2c0) at object.c:208:5 frame #7: 0x00000001000d2bad python.exe`_Py_DECREF(filename="Objects/typeobject.c", lineno=3187, op=0x000000010038a2c0) at object.h:468:13 frame #8: 0x00000001000d5889 python.exe`_PyType_Lookup(type=0x00000001003e4ad0, name=0x000000010064bba0) at typeobject.c:3187:9 frame #9: 0x00000001000b731f python.exe`_PyObject_GenericGetAttrWithDict(obj=0x0000000100645dd0, name=0x000000010064bba0, dict=0x0000000000000000, suppress=0) at object.c:1221:13 frame #10: 0x00000001000b7243 python.exe`PyObject_GenericGetAttr(obj=0x0000000100645dd0, name=0x000000010064bba0) at object.c:1309:12 frame #11: 0x00000001000b69a8 python.exe`PyObject_GetAttr(v=0x0000000100645dd0, name=0x000000010064bba0) at object.c:916:16 frame #12: 0x0000000100301599 python.exe`textiowrapper_closed_get(self=0x00000001006aba50, context=0x0000000000000000) at textio.c:3015:12 frame #13: 0x000000010004eedf python.exe`getset_get(descr=0x000000010122f210, obj=0x00000001006aba50, type=0x00000001003e7280) at descrobject.c:158:16 frame #14: 0x00000001000b738c python.exe`_PyObject_GenericGetAttrWithDict(obj=0x00000001006aba50, name=0x00000001016f00a8, dict=0x0000000000000000, suppress=0) at object.c:1228:19 frame #15: 0x00000001000b7243 python.exe`PyObject_GenericGetAttr(obj=0x00000001006aba50, name=0x00000001016f00a8) at object.c:1309:12 frame #16: 0x00000001000b69a8 python.exe`PyObject_GetAttr(v=0x00000001006aba50, name=0x00000001016f00a8) at object.c:916:16 frame #17: 0x00000001000b68e4 python.exe`PyObject_GetAttrString(v=0x00000001006aba50, name="closed") at object.c:821:11 frame #18: 0x00000001002399cc python.exe`file_is_closed(fobj=0x00000001006aba50) at pylifecycle.c:1074:21 frame #19: 0x0000000100235f64 python.exe`flush_std_files at pylifecycle.c:1094:45 frame #20: 0x0000000100236bfd python.exe`fatal_error(prefix=0x0000000000000000, msg="deallocating None", status=-1) at pylifecycle.c:2116:9 frame #21: 0x0000000100236a5e python.exe`Py_FatalError(msg="deallocating None") at pylifecycle.c:2138:5 frame #22: 0x00000001000b8318 python.exe`none_dealloc(ignore=0x000000010038a2c0) at object.c:1551:5 frame #23: 0x00000001000ba6ba python.exe`_Py_Dealloc(op=0x000000010038a2c0) at object.c:2178:5 frame #24: 0x00000001001dec2b python.exe`_Py_DECREF(filename="Python/ceval.c", lineno=1200, op=0x000000010038a2c0) at object.h:473:9 frame #25: 0x00000001001cd444 python.exe`_PyEval_EvalFrameDefault(f=0x000000010130b860, throwflag=0) at ceval.c:1200:13 frame #26: 0x00000001001cc277 python.exe`PyEval_EvalFrameEx(f=0x000000010130b860, throwflag=0) at ceval.c:625:12 frame #27: 0x00000001001e3347 python.exe`_PyEval_EvalCodeWithName(_co=0x000000010146b880, globals=0x0000000101246e50, locals=0x0000000101246e50, args=0x0000000000000000, argcount=0, kwnames=0x0000000000000000, kwargs=0x0000000000000000, kwcount=0, kwstep=2, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000, name=0x0000000000000000, qualname=0x0000000000000000) at ceval.c:4036:14 frame #28: 0x00000001001cc1f0 python.exe`PyEval_EvalCodeEx(_co=0x000000010146b880, globals=0x0000000101246e50, locals=0x0000000101246e50, args=0x0000000000000000, argcount=0, kws=0x0000000000000000, kwcount=0, defs=0x0000000000000000, defcount=0, kwdefs=0x0000000000000000, closure=0x0000000000000000) at ceval.c:4065:12 frame #29: 0x00000001001cc04e python.exe`PyEval_EvalCode(co=0x000000010146b880, globals=0x0000000101246e50, locals=0x0000000101246e50) at ceval.c:602:12 frame #30: 0x0000000100249f55 python.exe`run_eval_code_obj(co=0x000000010146b880, globals=0x0000000101246e50, locals=0x0000000101246e50) at pythonrun.c:1047:9 frame #31: 0x00000001002483f7 python.exe`run_mod(mod=0x0000000102017438, filename=0x0000000101495d30, globals=0x0000000101246e50, locals=0x0000000101246e50, flags=0x00007ffeefbff690, arena=0x00000001012e2520) at pythonrun.c:1063:9 frame #32: 0x00000001002478b5 python.exe`PyRun_FileExFlags(fp=0x00007fff8c715030, filename_str="/Users/anthonyshaw/cpython/test_gc_ctypes.py", start=257, globals=0x0000000101246e50, locals=0x0000000101246e50, closeit=1, flags=0x00007ffeefbff690) at pythonrun.c:994:11 frame #33: 0x0000000100246c91 python.exe`PyRun_SimpleFileExFlags(fp=0x00007fff8c715030, filename="/Users/anthonyshaw/cpython/test_gc_ctypes.py", closeit=1, flags=0x00007ffeefbff690) at pythonrun.c:429:13 frame #34: 0x00000001002467bc python.exe`PyRun_AnyFileExFlags(fp=0x00007fff8c715030, filename="/Users/anthonyshaw/cpython/test_gc_ctypes.py", closeit=1, flags=0x00007ffeefbff690) at pythonrun.c:85:16 frame #35: 0x0000000100277095 python.exe`pymain_run_file(config=0x0000000101800ca8, cf=0x00007ffeefbff690) at main.c:346:15 frame #36: 0x000000010027641d python.exe`pymain_run_python(exitcode=0x00007ffeefbff75c) at main.c:511:21 frame #37: 0x00000001002760cc python.exe`_Py_RunMain at main.c:583:24 frame #38: 0x0000000100276612 python.exe`pymain_main(args=0x00007ffeefbff7c8) at main.c:612:12 frame #39: 0x0000000100276655 python.exe`_Py_UnixMain(argc=2, argv=0x00007ffeefbff830) at main.c:636:12 frame #40: 0x0000000100000d82 python.exe`main(argc=2, argv=0x00007ffeefbff830) at python.c:16:12 frame #41: 0x00007fff597143d5 libdyld.dylib`start + 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 02:37:20 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 May 2019 06:37:20 +0000 Subject: [issue35398] SQLite incorrect row count for UPDATE In-Reply-To: <1543890465.67.0.788709270274.issue35398@psf.upfronthosting.co.za> Message-ID: <1557556640.56.0.259429353317.issue35398@roundup.psfhosted.org> Change by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 02:39:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 May 2019 06:39:57 +0000 Subject: [issue35947] Update libffi_msvc to current version of libffi In-Reply-To: <1549665646.45.0.12391127948.issue35947@roundup.psfhosted.org> Message-ID: <1557556797.32.0.583381195778.issue35947@roundup.psfhosted.org> STINNER Victor added the comment: Would it be possible to add a What's New in Python 3.8 entry about this change? IMHO it is big and important enough to be mentioned ;-) I also wanted libffi_msvc/ to be removed. Thanks! ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 02:45:56 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 11 May 2019 06:45:56 +0000 Subject: [issue33303] ElementTree Comment text isn't escaped In-Reply-To: <1524011592.66.0.682650639539.issue33303@psf.upfronthosting.co.za> Message-ID: <1557557156.54.0.457238874329.issue33303@roundup.psfhosted.org> Stefan Behnel added the comment: Hmm, sorry, I was wrong here. I looked it up and also checked the behaviour of other libraries: the data content of PIs is application specific and must not be escaped, at all. It's not XML character data. Sorry for the confusion and the extra work on your side. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 02:49:29 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 11 May 2019 06:49:29 +0000 Subject: [issue35947] Update libffi_msvc to current version of libffi In-Reply-To: <1549665646.45.0.12391127948.issue35947@roundup.psfhosted.org> Message-ID: <1557557369.57.0.73865654317.issue35947@roundup.psfhosted.org> SilentGhost added the comment: > I also wanted libffi_msvc/ to be removed. An empty directory is not really tracked by git, you should be able to just remove it manually without any problems, alternatively you could try git clean -fd # on a clean tree add -n for dry run. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 03:02:49 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 11 May 2019 07:02:49 +0000 Subject: =?utf-8?b?W2lzc3VlMzY4ODNdIOWcqGN0eXBlc+mHjOiwg+eUqEPlupPov5Tlm55jX2No?= =?utf-8?b?YXJfcOexu+Wei+aXtueahOmXrumimA==?= Message-ID: <1557558169.0.0.749581365681.issue36883@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> duplicate superseder: -> ?ctypes???C???c_char_p?????? type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 03:05:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 11 May 2019 07:05:13 +0000 Subject: [issue36884] DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline Message-ID: <1557558313.36.0.153269520968.issue36884@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : It seems there was a deprecation warning added in ad4ed872415d00fcdfaa52a08108ec752b115000 that causes error when test_asyncio.test_pep492.StreamReaderTests.test_readline is ran with -Werror. ? cpython git:(master) ./python.exe -Werror -m unittest -v test.test_asyncio.test_pep492.StreamReaderTests.test_readline test_readline (test.test_asyncio.test_pep492.StreamReaderTests) ... ERROR ====================================================================== ERROR: test_readline (test.test_asyncio.test_pep492.StreamReaderTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_asyncio/test_pep492.py", line 97, in test_readline stream = asyncio.StreamReader(loop=self.loop) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/streams.py", line 446, in __init__ warnings.warn(f"{self.__class__} should be instaniated " DeprecationWarning: should be instaniated by asyncio internals only, please avoid its creation from user code ---------------------------------------------------------------------- Ran 1 test in 0.003s FAILED (errors=1) # Before commit ? cpython git:(master) git checkout ad4ed872415d00fcdfaa52a08108ec752b115000~1 Lib/asyncio ? cpython git:(master) ? ./python.exe -Werror -m unittest -v test.test_asyncio.test_pep492.StreamReaderTests.test_readline test_readline (test.test_asyncio.test_pep492.StreamReaderTests) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.004s OK ---------- components: asyncio messages: 342170 nosy: asvetlov, xtreak, yselivanov priority: normal severity: normal status: open title: DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 03:08:11 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 11 May 2019 07:08:11 +0000 Subject: [issue36885] Clean up makeunicode.py script Message-ID: <1557558491.4.0.613612433422.issue36885@roundup.psfhosted.org> New submission from Stefan Behnel : The code generation in the makeunicode.py script is more difficult to read than necessary due to the many use of "print(file=fp)" everywhere. Moving the "file" argument out of the way makes it easier to read through the actual code that is being generated. ---------- components: Demos and Tools messages: 342171 nosy: benjamin.peterson, scoder priority: low severity: normal stage: patch review status: open title: Clean up makeunicode.py script type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 03:08:37 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 11 May 2019 07:08:37 +0000 Subject: [issue36885] Clean up makeunicode.py script In-Reply-To: <1557558491.4.0.613612433422.issue36885@roundup.psfhosted.org> Message-ID: <1557558517.55.0.327643259142.issue36885@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch pull_requests: +13154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 03:10:00 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 11 May 2019 07:10:00 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557558600.86.0.167301627773.issue35925@roundup.psfhosted.org> Gregory P. Smith added the comment: In our 3.6 tree the test_ssl failure is now: ====================================================================== ERROR: test_protocol_sslv23 (test.test_ssl.ThreadedTests) Connecting to an SSLv23 server with various client options ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_ssl.py", line 2633, in test_protocol_sslv23 try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1') File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_ssl.py", line 2323, in try_protocol_combo chatty=False, connectionchatty=False) File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_ssl.py", line 2248, in server_params_test s.connect((HOST, server.port)) File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/ssl.py", line 1109, in connect self._real_connect(addr, False) File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/ssl.py", line 1100, in _real_connect self.do_handshake() File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/ssl.py", line 1077, in do_handshake self._sslobj.do_handshake() File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:852) ====================================================================== ERROR: test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests) Connecting to a TLSv1.1 server with various client options. ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_ssl.py", line 2707, in test_protocol_tlsv1_1 try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1') File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_ssl.py", line 2323, in try_protocol_combo chatty=False, connectionchatty=False) File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_ssl.py", line 2248, in server_params_test s.connect((HOST, server.port)) File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/ssl.py", line 1109, in connect self._real_connect(addr, False) File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/ssl.py", line 1100, in _real_connect self.do_handshake() File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/ssl.py", line 1077, in do_handshake self._sslobj.do_handshake() File "/ssd/buildbot/buildarea/3.6.gps-ubuntu-exynos5-armv7l/build/Lib/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:852) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 03:11:46 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 11 May 2019 07:11:46 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557558706.35.0.69203720767.issue35925@roundup.psfhosted.org> Gregory P. Smith added the comment: (same on 2.7) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 03:28:50 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 11 May 2019 07:28:50 +0000 Subject: [issue36885] Make makeunicode.py script more readable In-Reply-To: <1557558491.4.0.613612433422.issue36885@roundup.psfhosted.org> Message-ID: <1557559730.03.0.172031159497.issue36885@roundup.psfhosted.org> Change by Stefan Behnel : ---------- title: Clean up makeunicode.py script -> Make makeunicode.py script more readable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 03:41:34 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 11 May 2019 07:41:34 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1557560494.26.0.877363363271.issue36880@roundup.psfhosted.org> anthony shaw added the comment: In the stack it's calling none_dealloc() which should never happen. Assume this is being triggered by ctypes PyCFuncPtr_call. The stacktrace I'm getting comes after the double decref so it's not showing the root cause. Someone who knows ctypes better might be able to help ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 03:56:31 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 11 May 2019 07:56:31 +0000 Subject: [issue36884] DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline In-Reply-To: <1557558313.36.0.153269520968.issue36884@roundup.psfhosted.org> Message-ID: <1557561391.46.0.195421581854.issue36884@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13155 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 03:58:19 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 11 May 2019 07:58:19 +0000 Subject: [issue36884] DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline In-Reply-To: <1557558313.36.0.153269520968.issue36884@roundup.psfhosted.org> Message-ID: <1557561499.12.0.817682456656.issue36884@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Looking at the commit where similar tests were fixed I think passing _asyncio_internal=True fixes the issue so I have created a PR with the same. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 04:45:31 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 11 May 2019 08:45:31 +0000 Subject: [issue36884] DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline In-Reply-To: <1557558313.36.0.153269520968.issue36884@roundup.psfhosted.org> Message-ID: <1557564331.72.0.407722254417.issue36884@roundup.psfhosted.org> miss-islington added the comment: New changeset 79972f1fad5247ade34ef98ad987162a9a78401d by Miss Islington (bot) (Xtreak) in branch 'master': bpo-36884: Fix DeprecationWarning in test_asyncio StreamReader instantiation (GH-13243) https://github.com/python/cpython/commit/79972f1fad5247ade34ef98ad987162a9a78401d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 04:46:31 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 May 2019 08:46:31 +0000 Subject: [issue36884] DeprecationWarning in test_asyncio.test_pep492.StreamReaderTests.test_readline In-Reply-To: <1557558313.36.0.153269520968.issue36884@roundup.psfhosted.org> Message-ID: <1557564391.64.0.59167831822.issue36884@roundup.psfhosted.org> Andrew Svetlov added the comment: Nice catch! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 05:24:48 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 May 2019 09:24:48 +0000 Subject: [issue36512] future_factory argument for Thread/ProcessPoolExecutor In-Reply-To: <1554234773.66.0.185942114441.issue36512@roundup.psfhosted.org> Message-ID: <1557566688.68.0.174172079038.issue36512@roundup.psfhosted.org> Andrew Svetlov added the comment: Sorry, but in the provided snippet I see a class with an interface which looks close to executor. There is no clear relationship with standard executors (e.g. is it inherited from ThreadExecutor?). Proposed `future_factory` is also absent. Please, provide a real example if you want to convince us that the requested feature is important and desired. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 05:43:09 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 11 May 2019 09:43:09 +0000 Subject: [issue36759] datetime: astimezone() results in OSError: [Errno 22] Invalid argument In-Reply-To: <1556624186.01.0.847614978011.issue36759@roundup.psfhosted.org> Message-ID: <1557567789.07.0.180027245601.issue36759@roundup.psfhosted.org> Change by SilentGhost : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 06:02:23 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 May 2019 10:02:23 +0000 Subject: [issue36879] bug with round() and "numpy floats" In-Reply-To: <1557521461.62.0.231118714409.issue36879@roundup.psfhosted.org> Message-ID: <1557568943.11.0.936062422298.issue36879@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 06:18:48 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 11 May 2019 10:18:48 +0000 Subject: [issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1557569928.16.0.667198987997.issue26317@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I got it to build PythonLauncher using clang and everything else using gcc 8.3.0 by making a few configure script and makefile changes. Unfortunately, "make install" still fails because a python script that requires the unbuilt _scproxy module crashes. I'll work on fixing that next. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 06:28:53 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 May 2019 10:28:53 +0000 Subject: [issue36879] bug with round() and "numpy floats" In-Reply-To: <1557521461.62.0.231118714409.issue36879@roundup.psfhosted.org> Message-ID: <1557570533.72.0.215381795955.issue36879@roundup.psfhosted.org> Mark Dickinson added the comment: > Maybe we should add something in the docs regarding the no-restriction point. IMO, the docs are clear enough (and also long enough) already here. Just as with most other magic methods, classes from third-party packages can return whatever they like. It doesn't seem worth adding specific disclaimers about this everywhere that a magic method might be used. Otherwise, we should also add corresponding disclaimers about `__floor__`, `__ceil__`, `__trunc__`, `__pow__`, and so on, and I think that would just introduce an increase in documentation size without any overall increase in clarity or usefulness. I'd prefer to stick to documenting that there _is_ a restriction where that's true (e.g., `__index__` or `__hash__`). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 06:30:45 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 May 2019 10:30:45 +0000 Subject: [issue36879] bug with round() and "numpy floats" In-Reply-To: <1557521461.62.0.231118714409.issue36879@roundup.psfhosted.org> Message-ID: <1557570645.41.0.255599373648.issue36879@roundup.psfhosted.org> Mark Dickinson added the comment: BTW, there are various issues already open in the NumPy bug tracker, for example https://github.com/numpy/numpy/issues/11557 I propose closing this as "third party". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 06:35:09 2019 From: report at bugs.python.org (Big Stone) Date: Sat, 11 May 2019 10:35:09 +0000 Subject: [issue36886] problem with Types on Python-3.8.0a4 Message-ID: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> New submission from Big Stone : remark: I get a similar error from two packages, when experimenting with Python-3.8.0a4 on Windows ```` import asyncio await asyncio.sleep(0) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\IPython\core\interactiveshell.py in removed_co_newlocals(function) 139 CO_NEWLOCALS = 0x0002 140 code = function.__code__ --> 141 new_code = CodeType( 142 code.co_argcount, 143 code.co_kwonlyargcount, TypeError: an integer is required (got type bytes) ```` or else: ```` import cloudpickle ```` ```` import cloudpickle 1 0 1 3 19 b'\x87\x00f\x01d\x01d\x02\x84\x08\x01\x00|\x00\x89\x00d\x00S\x00' (None, at 0x000001B36B7D49B0, file "C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\cloudpickle\cloudpickle.py", line 107>, '_make_cell_set_template_code..inner..') () ('value',) C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\cloudpickle\cloudpickle.py inner 106 b'\x00\x01\x0c\x01' ('cell',) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in ----> 1 import cloudpickle C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\cloudpickle\__init__.py in 1 from __future__ import absolute_import 2 ----> 3 from cloudpickle.cloudpickle import * 4 5 __version__ = '1.0.0' C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\cloudpickle\cloudpickle.py in 165 166 --> 167 _cell_set_template_code = _make_cell_set_template_code() 168 169 C:\WinP\bd38\bu\WPy64-3800a4\python-3.8.0a4.amd64\lib\site-packages\cloudpickle\cloudpickle.py in _make_cell_set_template_code() 146 co.co_lnotab, 147 co.co_cellvars) --> 148 return types.CodeType( 149 co.co_argcount, 150 co.co_kwonlyargcount, TypeError: an integer is required (got type bytes) ---------- components: Windows messages: 342182 nosy: Big Stone, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: problem with Types on Python-3.8.0a4 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 06:46:08 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 11 May 2019 10:46:08 +0000 Subject: [issue36886] problem with Types on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557571568.74.0.149065070068.issue36886@roundup.psfhosted.org> SilentGhost added the comment: This is a consequence of PEP 570 that implements positional-only arguments (see issue 36540). Those projects would have to update their code. Good that there are already open bugs for both projects. ---------- components: +Interpreter Core -Windows nosy: +SilentGhost, pablogsal resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 07:26:15 2019 From: report at bugs.python.org (=?utf-8?q?Stefan_H=C3=B6lzl?=) Date: Sat, 11 May 2019 11:26:15 +0000 Subject: [issue36512] future_factory argument for Thread/ProcessPoolExecutor In-Reply-To: <1554234773.66.0.185942114441.issue36512@roundup.psfhosted.org> Message-ID: <1557573975.92.0.818271074081.issue36512@roundup.psfhosted.org> Stefan H?lzl added the comment: Here is a complete example. Please consider this is a very simple example just to demonstrate what would be possible with my proposed changes. In the following example you can see two things: * saving informations about the context in which a workload was submitted to the Executor in the Future * having a custom methods on the Future returned by the Executor from concurrent.futures import Future, ThreadPoolExecutor def workload(n): # does some heavy calculations return n class Context: def __init__(self, name): self.name = name class CustomFactory(Future): def __init__(self): super().__init__() self.context = None def is_from_context(self, ctx): return self.context.name == ctx def processed_result(self): # processes the result return self.result() class ContextExecutor(ThreadPoolExecutor): def __init__(self): super().__init__(future_factory=CustomFactory) def submit(self, workload, arg, context): future = super().submit(workload, arg) future.context = context return future context_executor = ContextExecutor() futures = [ context_executor.submit(workload, 0, context=Context("A")), context_executor.submit(workload, 1, context=Context("B")), context_executor.submit(workload, 2, context=Context("A")), ] futures_from_context_a = [f for f in futures if f.is_from_context("A")] if all(f.done() for f in futures_from_context_a): print("All Futures in context A are done") processed_results = [f.processed_result() for f in futures_from_context_a] print("Results:", processed_results) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 08:37:59 2019 From: report at bugs.python.org (Alexey Muranov) Date: Sat, 11 May 2019 12:37:59 +0000 Subject: [issue36827] Overriding __new__ method with itself changes behaviour of the class In-Reply-To: <1557229328.38.0.306180402683.issue36827@roundup.psfhosted.org> Message-ID: <1557578279.21.0.328035707226.issue36827@roundup.psfhosted.org> Alexey Muranov added the comment: I see that I am not the only one who got bitten by this unexpected behaviour (though the others might have not realised it). There is a question ["Creating a singleton in Python"][1] on StackOverflow which was posted in 2011 and by now has the total of 737 upvotes. Here is a code snippet from the question: class Singleton(object): _instance = None def __new__(class_, *args, **kwargs): if not isinstance(class_._instance, class_): class_._instance = object.__new__(class_, *args, **kwargs) return class_._instance class MyClass(Singleton, BaseClass): pass [1]: https://stackoverflow.com/q/6760685 Currently this does not work as expected, try: class Failed(Singleton): def __init__(self, _): pass Failed(42) # TypeError: object.__new__() takes exactly one argument ... There is a similar code snippet in the accepted [answer][2] with 507 upvotes: class Singleton(object): _instances = {} def __new__(class_, *args, **kwargs): if class_ not in class_._instances: class_._instances[class_] = super(Singleton, class_).__new__( class_, *args, **kwargs ) return class_._instances[class_] class MyClass(Singleton): pass [2]: https://stackoverflow.com/a/6798042 This does not work either, for the same reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 09:31:50 2019 From: report at bugs.python.org (Eryk Sun) Date: Sat, 11 May 2019 13:31:50 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1557581510.7.0.465575087856.issue36880@roundup.psfhosted.org> Eryk Sun added the comment: This is due to an oversight in _CallPythonObject in Modules/_ctypes/callbacks.c. The setfunc protocol is to return None if there's no object to keep alive. This isn't applicable to py_object (i.e. O_set in Modules/_ctypes/cfield.c). So the problem is the unconditional decref of None in the following snippet from _CallPythonObject: if (keep == NULL) /* Could not convert callback result. */ PyErr_WriteUnraisable(callable); else if (keep == Py_None) /* Nothing to keep */ Py_DECREF(keep); else if (setfunc != _ctypes_get_fielddesc("O")->setfunc) { if (-1 == PyErr_WarnEx(PyExc_RuntimeWarning, "memory leak in callback function.", 1)) PyErr_WriteUnraisable(callable); } I'd rewrite it as follows: if (keep == NULL) { /* Could not convert callback result. */ PyErr_WriteUnraisable(callable); } else if (setfunc != _ctypes_get_fielddesc("O")->setfunc) { if (keep == Py_None) { /* Nothing to keep */ Py_DECREF(keep); } else if (PyErr_WarnEx(PyExc_RuntimeWarning, "memory leak " "in callback function.", 1) == -1) { PyErr_WriteUnraisable(callable); } } ---------- keywords: +easy (C) nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 09:46:56 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 May 2019 13:46:56 +0000 Subject: [issue36887] Add integer square root, math.isqrt Message-ID: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> New submission from Mark Dickinson : The integer square root[1] is a common number-theoretic primitive, useful for example in primality testing. This is something I've had to code up myself multiple times, and is also something that's quite easy to get wrong, or implement in a way that's inefficient for large inputs. I propose adding a math module function `math.isqrt` implementing the integer square root. Like `math.gcd`, it should accept any integer-like object `n` (i.e., `int`s and anything implementing `__index__`), and for nonnegative inputs, should return the largest int `a` satisfying `a * a <= n`. Negative inputs should give a ValueError; non-integer inputs (including `float`s) should give a TypeError. I'll create a PR shortly with a basic implementation; optimizations can happen later. [1] https://en.wikipedia.org/wiki/Integer_square_root ---------- assignee: mark.dickinson components: Extension Modules messages: 342187 nosy: mark.dickinson priority: normal severity: normal stage: needs patch status: open title: Add integer square root, math.isqrt type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 09:58:06 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 May 2019 13:58:06 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557583086.35.0.742474937008.issue36887@roundup.psfhosted.org> Change by Mark Dickinson : ---------- keywords: +patch pull_requests: +13156 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 09:59:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 May 2019 13:59:49 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557583189.28.0.0847121051241.issue36887@roundup.psfhosted.org> Serhiy Storchaka added the comment: +1, but I propose to add it to the new imath module and move also factorial() and gcd() to it. New binomial() or comb() function (issue35431) should be added in imath too. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 10:10:26 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 May 2019 14:10:26 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557583826.9.0.435502703298.issue36887@roundup.psfhosted.org> Mark Dickinson added the comment: FTR (not for Serhiy, but for others reading this), here's the previous discussion of the possibility of adding an imath module. https://mail.python.org/pipermail/python-ideas/2018-July/051917.html While I'm happy for this to go in either math or a new imath module, I'm a bit sceptical that at this point we're going to get a useful imath module together in time for 3.8 (and I don't have bandwidth to do the imath work myself). How about we put it in math for now, and if we get around to imath before the 3.8b1, I'm happy to have it move from math to imath? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 10:29:03 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 May 2019 14:29:03 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557584943.83.0.629815706517.issue36887@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am wondering whether int(sqrt(float(n))) can be used as a good initial approximation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 10:33:21 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 May 2019 14:33:21 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557585201.27.0.831229876849.issue36887@roundup.psfhosted.org> Mark Dickinson added the comment: > I am wondering whether int(sqrt(float(n))) can be used as a good initial approximation. It can, but I'd prefer to avoid floating-point arithmetic (we don't have any guarantees about the accuracy of sqrt, so you'd always need a check and a fallback for the case where sqrt isn't accurate enough), and there are other purely-integer-based ways to produce a fast initial approximation. I do have some plans to add optimizations, but wanted to get the basic algorithm in first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 10:35:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 May 2019 14:35:49 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557585349.68.0.883021738867.issue36887@roundup.psfhosted.org> Serhiy Storchaka added the comment: What do you think about adding two integer square root functions -- for the largest int `a` satisfying `a * a <= n` and for the smallest int `a` satisfying `a * a >= n`? The latter case is also often encounter in practice. For example, this is the size of the smallest square table in which we can place n items, not more than one per cell. We could call these functions fllorsqtr() and ceilsqrt() (if there are no better standard names). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 10:40:06 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 May 2019 14:40:06 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557585606.38.0.0750536687024.issue36887@roundup.psfhosted.org> Mark Dickinson added the comment: > for the smallest int `a` satisfying `a * a >= n` I'd spell that as `1 + isqrt(n - 1)`. I'd prefer to keep things simple and just add the one building block, rather than adding multiple variants. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 10:41:19 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 May 2019 14:41:19 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557585679.5.0.310528798824.issue36887@roundup.psfhosted.org> Mark Dickinson added the comment: Some more discussion of possible algorithms and variations here: https://github.com/mdickinson/snippets/blob/master/notebooks/Integer%20square%20roots.ipynb (not sure why the LaTeX isn't all rendering properly at the bottom in the GitHub view; it's fine in my local notebook). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 10:59:05 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Sat, 11 May 2019 14:59:05 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1557586745.75.0.134923767192.issue36794@roundup.psfhosted.org> Hrvoje Nik?i? added the comment: @matrixise I've signed the CLA in the meantime, and it's now confirmed by https://check-python-cla.herokuapp.com/ Thanks for the pointer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 11:02:17 2019 From: report at bugs.python.org (paul j3) Date: Sat, 11 May 2019 15:02:17 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1557586937.73.0.825731599347.issue35495@roundup.psfhosted.org> paul j3 added the comment: Let me back off on that last suggestion. The problems described here and in https://bugs.python.org/issue17050 only apply to a positional. We could just add a note to the documentation to the effect. This nargs is best used as an optional as illustrated, where the user can clearly identify which strings are the remainder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 11:19:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 15:19:25 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557587965.91.0.381130796808.issue36751@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13157 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 11:23:39 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 15:23:39 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557588219.77.0.246183571511.issue36751@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Opened PR 13245 to un-deprecate getfullargspec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 11:26:52 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Sat, 11 May 2019 15:26:52 +0000 Subject: [issue36837] Make il8n tools available from `python -m` In-Reply-To: <1557246206.07.0.412069516419.issue36837@roundup.psfhosted.org> Message-ID: <1557588412.56.0.213895654318.issue36837@roundup.psfhosted.org> Toshio Kuratomi added the comment: Scratch what I said in https://bugs.python.org/issue36837?@ok_message=msg%20342005%20created%0Aissue%2036837%20message_count%2C%20messages%20edited%20ok&@template=item#msg342005 GNU msgfmt does extract the charset correctly. (My previous test failed to write any output so it was using the .mo file I had written out with msgfmt.py. I realized that this morning when I figured out why my C test program wasn't finding any message catalog. For reference the three ways to extract strings with the three tools are: * pygettext.py test.py * pybabel extract -o messages.pot test.py * xgettext test.py -o messages.pot test.py and the three ways to generate catalogs via the three tools are: * msgfmt3.7.py es_MX/LC_MESSAGES/domain.po * msgfmt es_MX/LC_MESSAGES/testc.po -o es_MX/LC_MESSAGES/testc.mo * pybabel compile -D test -d . [--use-fuzzy] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 11:32:22 2019 From: report at bugs.python.org (Russell Keith-Magee) Date: Sat, 11 May 2019 15:32:22 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1557588742.03.0.6150021693.issue36880@roundup.psfhosted.org> Change by Russell Keith-Magee : ---------- nosy: +freakboy3742 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 11:36:32 2019 From: report at bugs.python.org (Thomas Moreau) Date: Sat, 11 May 2019 15:36:32 +0000 Subject: [issue36888] Create a way to check that the parent process is alive for deamonized processes Message-ID: <1557588992.87.0.32954176975.issue36888@roundup.psfhosted.org> New submission from Thomas Moreau : In the std lib, the semaphore_tracker and the Manager rely on daemonized processes that are launched with server like loops. The cleaning of such processes is made complicated by the fact that there is no cannonical way to check that the parent process is alive. I propose to add in context a parent_process function that would give access to a Process object representing the parent process. This way, we could benefit from sentinel to improve the clean up of this process that can be left dangling in case of hard stop from the main interpreter. ---------- components: Library (Lib) messages: 342199 nosy: tomMoral priority: normal severity: normal status: open title: Create a way to check that the parent process is alive for deamonized processes type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 11:37:14 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 11 May 2019 15:37:14 +0000 Subject: [issue36866] Certificate verification errors in urllib.request become URLError In-Reply-To: <1557416912.64.0.674817399159.issue36866@roundup.psfhosted.org> Message-ID: <1557589034.99.0.729700354285.issue36866@roundup.psfhosted.org> Christian Heimes added the comment: Starting with 3.7, all OpenSSL and certificate-related exceptions are derived from SSLError. SSLError is a subclass of OSError. For backwards compatibility, SSLCertVerificationError is both a subclass of SSLError and ValueError. >>> ssl.CertificateError >>> ssl.CertificateError.__mro__ (, , , , , , ) The new behavior is more consistent than the previous. Now all SSL handshake errors are wrapped in URLError. In 3.6 and earlier unsupported TLS version, cipher suite mismatch, and similar were wrapped in URLError. Certificate related issues like untrusted cert, expired cert, hostname verification failure was not wrapped in URLError. You had to check error.reason for SSL-related errors any way. I like to argue that the ssl module in 3.7 handles exceptions more consistently and is an improvement. The URLError behavior change is an unfortunate but reasonable side effect. Ned, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 11:38:44 2019 From: report at bugs.python.org (Thomas Moreau) Date: Sat, 11 May 2019 15:38:44 +0000 Subject: [issue36888] Create a way to check that the parent process is alive for deamonized processes In-Reply-To: <1557588992.87.0.32954176975.issue36888@roundup.psfhosted.org> Message-ID: <1557589124.12.0.0398852904871.issue36888@roundup.psfhosted.org> Change by Thomas Moreau : ---------- keywords: +patch pull_requests: +13158 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 11:46:31 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 11 May 2019 15:46:31 +0000 Subject: [issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented In-Reply-To: <1557425747.49.0.948212766878.issue36868@roundup.psfhosted.org> Message-ID: <1557589591.11.0.200910167683.issue36868@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +13159 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 11:58:49 2019 From: report at bugs.python.org (Pierre Glaser) Date: Sat, 11 May 2019 15:58:49 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557590329.54.0.795308311699.issue36867@roundup.psfhosted.org> Pierre Glaser added the comment: Shared memory segments are now tracked by the brand new resource_tracker! Thanks Antoine for the review. Does anyone have an opinion on introducing a public API for users to make the resource_tracker track resources of their choice? What We have in mind is: - making public the existing resource_tracker.register/unregister - adding a new function, resource_tracker.make_trackable(resource_type, cleanup_func), where: * resource_type is a string (an identifier that will be used each time a resource of the type resource_type needs tracking, via the call resource_tracker.register(resource_name, resource_type) * cleanup_func must be a callable taking a single string as argument (the name of the resource that needs tracking). This function will be called after the end of a process for reach resource of type resource_type the process did not clean properly Under the hood, make_trackable simply populates resource_tracker._CLEANUP_FUNCS with new items. Here is a simple example: import os import resource_tracker import shutil from multiprocessing import util class ClassCreatingAFolder: """Class where each instance creates a temporary folder. Each temporary folder is supposed to exist for the duration of the instance that created it. """ def __init__(self, folder_name): self.folder_name = folder_name os.mkdir(folder_name) # any instance normally garbage-collected should remove its folder, and # notice the resource_tracker that its folder was correctly removed. util.Finalize(self, ClassCreatingAFolder.cleanup, args=(folder_name,)) # If this session quits abruptly, the finalizer will not be called for # the instances of ClassCreatingAFolder that were still alive # before the shutdown. The resource_tracker comes into play, and removes # the folders associated to each of these resources. resource_tracker.register( folder_name, # argument to shutil.rmtree "ClassCreatingAFolder") @staticmethod def cleanup(folder_name): resource_tracker.unregister(folder_name, "ClassCreatingAFolder") shutil.rmtree(folder_name) # Tell the resource_tracker how to cleanup resources created by # ClassCreatingAFolder instances resource_tracker.make_trackable("ClassCreatingAFolder", shutil.rmtree) Typical resources that can be made trackable include memmaped objects, temporary folders. Our use-case is joblib that has its own mmap type that we would like to track using the semaphore_tracker. Any thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 12:03:07 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 11 May 2019 16:03:07 +0000 Subject: [issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented In-Reply-To: <1557425747.49.0.948212766878.issue36868@roundup.psfhosted.org> Message-ID: <1557590587.79.0.515299528982.issue36868@roundup.psfhosted.org> Christian Heimes added the comment: The entry in whatsnew is a documentation bug. Initially I wanted to expose host_flags and wrote the whatnew entry for it. Later we decided against the flag and an only implemented the hostname_checks_common_name switch (https://docs.python.org/3/library/ssl.html#ssl.SSLContext.hostname_checks_common_name). 1) SSLContext.host_flags in whatsnew is a bug. I'm updating the text. 2/3/4) The _host_flags attribute and the HOSTFLAG_* attributes are for internal use only to provide the hostname_checks_common_name flag. 5) Underscore is not a valid character for hostnames in A, AAAA, CNAME, and similar DNS record types. It's used in e.g. SRV record types, but an application will never directly connect to a SRV record address. It looks like OpenSSL interprets RFC 6125 (https://tools.ietf.org/html/rfc6125#section-6.4.3) strictly and requires valid DNS names. I wonder, how did you get your DNS server to accept underscores? In theory you should run into a DNS exception earlier. ---------- keywords: -patch stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 12:05:25 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 May 2019 16:05:25 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557590725.29.0.742990787555.issue36887@roundup.psfhosted.org> Serhiy Storchaka added the comment: > I'd spell that as `1 + isqrt(n - 1)`. Could you please add this in the documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 12:05:41 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 11 May 2019 16:05:41 +0000 Subject: [issue36866] Certificate verification errors in urllib.request become URLError In-Reply-To: <1557416912.64.0.674817399159.issue36866@roundup.psfhosted.org> Message-ID: <1557590741.49.0.568471644595.issue36866@roundup.psfhosted.org> Christian Heimes added the comment: Update: 3.6 and earlier raised SSLError for untrusted or expired certs. Only hostname mismatch was not wrapped into URLError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 12:09:44 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 11 May 2019 16:09:44 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1557590984.16.0.00796584271305.issue36876@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 12:13:36 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 May 2019 16:13:36 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557591216.32.0.264536231408.issue36887@roundup.psfhosted.org> Mark Dickinson added the comment: > Could you please add this in the documentation? Yes, definitely! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 12:34:49 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 May 2019 16:34:49 +0000 Subject: [issue34916] Add create_window_function() to sqlite3.Connection In-Reply-To: <1538846966.09.0.545547206417.issue34916@psf.upfronthosting.co.za> Message-ID: <1557592489.16.0.0723899315335.issue34916@roundup.psfhosted.org> Berker Peksag added the comment: Issue 35360 will cover updating our Windows and macOS installers. I'm retargeting this issue to add a create_window_function() method to the Connection object. I already have a WIP branch and am going to submit a PR later this weekend. ---------- assignee: -> berker.peksag components: +Extension Modules nosy: +berker.peksag stage: -> needs patch title: include sqlite-3.25+ (with window functions) -> Add create_window_function() to sqlite3.Connection type: behavior -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 12:37:08 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 11 May 2019 16:37:08 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1557592628.47.0.0517704933201.issue36794@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi Hrvoje Nik?i?, Thank you for the CLA, now, we need the opinion from Yury and their approval, I am not an expert of the asyncio. Thank you, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 12:55:29 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 16:55:29 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557593729.89.0.492119484897.issue36817@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Commit 9a4135e939bc223f592045a38e0f927ba170da32 introduced a reference leak: https://buildbot.python.org/all/#/builders/80/builds/587/steps/3/logs/stdio Bisect results for test_future: 0:00:00 load avg: 10.04 [1/1] test_future beginning 9 repetitions 123456789 ......... test_future leaked [24, 24, 24, 24] references, sum=96 test_future leaked [24, 24, 24, 24] memory blocks, sum=96 test_future failed == Tests result: FAILURE == 1 test failed: test_future Total duration: 300 ms Tests result: FAILURE 9a4135e939bc223f592045a38e0f927ba170da32 is the first bad commit commit 9a4135e939bc223f592045a38e0f927ba170da32 Author: Eric V. Smith Date: Wed May 8 16:28:48 2019 -0400 bpo-36817: Add f-string debugging using '='. (GH-13123) If a "=" is specified a the end of an f-string expression, the f-string will evaluate to the text of the expression, followed by '=', followed by the repr of the value of the expression. :040000 040000 303c86dc65bb09cade6b8f2a0fa3f97715f1793b 7ddfc1c6c5f86bf6d0a38a64ff1415c7ca55a5fe M Doc :040000 040000 88a8dc9ffb46d652d086168e18e6a1265e0bfb92 847032e70ebd74ad7e828f8013acc7bdc4570779 M Include :040000 040000 119e11a4f2fa3966ca300d06dd44c46dcbae11a8 ed8c093aecd82a6b886d83218681df886f653206 M Lib :040000 040000 9c8d303bc3b468a06c39389520795bd34cfc7534 36b368a8e4ddd3f470c99b68b00a4a3a30c8c2b1 M Misc :040000 040000 ac4c322bf5eb2685c31b375bb8a7d49a7b6a9ed9 8e311dcfcafb1260eb5c617783318088a029b067 M Parser :040000 040000 e9db8405b51b7f72015f70556ce611c371450731 9c3da4ade5f48b3a2e842d845cafa58ba21089a3 M Python bisect run success ---------- nosy: +pablogsal resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 13:00:14 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 11 May 2019 17:00:14 +0000 Subject: [issue36888] Create a way to check that the parent process is alive for deamonized processes In-Reply-To: <1557588992.87.0.32954176975.issue36888@roundup.psfhosted.org> Message-ID: <1557594014.8.0.271834289806.issue36888@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 13:13:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 May 2019 17:13:26 +0000 Subject: [issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled In-Reply-To: <1557336219.34.0.364472599022.issue36856@roundup.psfhosted.org> Message-ID: <1557594806.32.0.518161267468.issue36856@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6236c9823ef3e8e2229b0598d3d8189adf5e00f2 by Victor Stinner (Xi Ruoyao) in branch 'master': bpo-36856: Handle possible overflow in faulthandler_stack_overflow (GH-13205) https://github.com/python/cpython/commit/6236c9823ef3e8e2229b0598d3d8189adf5e00f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 13:17:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 May 2019 17:17:20 +0000 Subject: [issue35947] Update libffi_msvc to current version of libffi In-Reply-To: <1557557369.57.0.73865654317.issue35947@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: I am talking about the commit whixh removed the directory. I am happy that someone succeeded to write it ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 13:18:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 17:18:33 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557595113.88.0.791276805557.issue36817@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13160 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 13:19:17 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 17:19:17 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557595157.16.0.389744315998.issue36817@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Opened PR13249 to fix the leak ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 13:41:14 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Sat, 11 May 2019 17:41:14 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1557596474.86.0.956153269335.issue36780@roundup.psfhosted.org> Change by Hrvoje Nik?i? : ---------- keywords: +patch pull_requests: +13161 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 14:11:28 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 11 May 2019 18:11:28 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1557598288.58.0.453215748036.issue36870@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 14:15:14 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 May 2019 18:15:14 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream Message-ID: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> New submission from Andrew Svetlov : The separation was a bad idea, sorry. Both classes are coupled too much. 1. Writer should know about the reader to make `drain()` work 2. Reader has no .close() method. The idea is: 1. Merge StreamReader and StreamWriter into just a Stream. 2. The Stream should support three modes: readonly, writeonly, readwrite. 3. Keep StreamReader/StreamWriter but deprecate these classes. 4. Replace all asyncio internals to use Stream class. ---------- components: asyncio messages: 342212 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Merge StreamWriter and StreamReader into just asyncio.Stream versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 14:15:46 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 May 2019 18:15:46 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1557598546.09.0.141618884431.issue36889@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13162 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 14:17:27 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 11 May 2019 18:17:27 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1557598647.04.0.535999464428.issue36878@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset d8320ecb86da8df7c13d8bf8582507f736aa2924 by Ivan Levkivskyi (Michael J. Sullivan) in branch 'master': bpo-36878: Allow extra text after `# type: ignore` comments (GH-13238) https://github.com/python/cpython/commit/d8320ecb86da8df7c13d8bf8582507f736aa2924 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 14:19:46 2019 From: report at bugs.python.org (S. J. Cunningham) Date: Sat, 11 May 2019 18:19:46 +0000 Subject: [issue36890] python-3.7.3-macosx10.6.pkg verification error Message-ID: <1557598786.16.0.639636022435.issue36890@roundup.psfhosted.org> New submission from S. J. Cunningham : I can't Install the latest python-3.7.3-macosx10.6.pkg on my 10.6.8 system. Error message says failure to verify. I posted on the forms as suggested (https://python-forum.io/Thread-Cannot-Install-python-3-7-3-macosx10-6-pkg) but have received no response. Would appreciate any help. I cannot instal the latest version of Python (python-3.7.3-macosx10.6.pkg) on Mac OS 10.6.8. The installer throws the following error: The operation couldn?t be completed. (com.apple.installer.pagecontroller error -1.) Couldn't open "python-3.7.3-macosx10.6.pkg". And leaves the following messages in the console log. 5/9/19 4:00:25 PM Installer @(#)PROGRAM:Install PROJECT:Install-596.1 5/9/19 4:00:25 PM Installer @(#)PROGRAM:Installer PROJECT:Installer-430.1 5/9/19 4:00:25 PM Installer Hardware: MacBookPro3,1 @ 2.20 GHz (x 2), 4096 MB RAM 5/9/19 4:00:25 PM Installer Running OS Build: Mac OS X 10.6.8 (10K549) 5/9/19 4:00:25 PM Installer Failed to verify data against certificate. 5/9/19 4:00:25 PM Installer Invalid Distribution File/Package ---------- components: macOS messages: 342214 nosy: ned.deily, ronaldoussoren, steve_314 priority: normal severity: normal status: open title: python-3.7.3-macosx10.6.pkg verification error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 14:42:03 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 11 May 2019 18:42:03 +0000 Subject: [issue36890] python-3.7.3-macosx10.6.pkg verification error In-Reply-To: <1557598786.16.0.639636022435.issue36890@roundup.psfhosted.org> Message-ID: <1557600123.02.0.61847771374.issue36890@roundup.psfhosted.org> Change by Ned Deily : ---------- assignee: -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 14:44:00 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 11 May 2019 18:44:00 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557600240.24.0.0857442218288.issue35925@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +13163 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 14:56:22 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 May 2019 18:56:22 +0000 Subject: [issue34975] start_tls() difficult when using asyncio.start_server() In-Reply-To: <1539460993.6.0.788709270274.issue34975@psf.upfronthosting.co.za> Message-ID: <1557600982.3.0.19137630379.issue34975@roundup.psfhosted.org> Andrew Svetlov added the comment: I believe stream transport should be replaced. If you have time please do this change. Also please take a look at #36889 for merging StreamWriter and StreamReader. It can simplify the replacement strategy. Anyway, please keep your PR open at least. The plan is: either merge your PR before writer/reader merging or land unified streams first and adopt the PR to new API. Another thing that should be done before 3.8 feature freeze is support for sendfile in streams API. Hopefully, it is much simpler: no need for transport changing etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 15:04:14 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 19:04:14 +0000 Subject: [issue36822] Minor grammatical fix in glossary.rst In-Reply-To: <1557186503.72.0.659127462032.issue36822@roundup.psfhosted.org> Message-ID: <1557601454.82.0.303411960515.issue36822@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 90fb04c1e23c0fddd438bd0f73e7c018cacef4bc by Pablo Galindo (Sanyam Khurana) in branch 'master': bpo-36822: Fix minor grammatical error in glossary.rst (GH-13145) https://github.com/python/cpython/commit/90fb04c1e23c0fddd438bd0f73e7c018cacef4bc ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 15:07:15 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 11 May 2019 19:07:15 +0000 Subject: [issue36890] python-3.7.3-macosx10.6.pkg verification error on macOS 10.6 Snow Leopard In-Reply-To: <1557598786.16.0.639636022435.issue36890@roundup.psfhosted.org> Message-ID: <1557601635.43.0.7486823103.issue36890@roundup.psfhosted.org> Ned Deily added the comment: Thank you for the report. It appears that macOS installer packages produced on current versions of macOS can no longer be successfully opened by the macOS 10.6 (Snow Leopard) system installer. This used to work. Perhaps a certificate or something else has changed. I can try repackaging the Python installer package using an older macOS tool chain but I probably will not be able to get to this for a few days because of travel. ---------- priority: normal -> critical title: python-3.7.3-macosx10.6.pkg verification error -> python-3.7.3-macosx10.6.pkg verification error on macOS 10.6 Snow Leopard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 15:32:48 2019 From: report at bugs.python.org (vx1920) Date: Sat, 11 May 2019 19:32:48 +0000 Subject: [issue36891] Additional startup plugin for vendors Message-ID: <1557603168.21.0.544720725277.issue36891@roundup.psfhosted.org> New submission from vx1920 : Proposed modification in site.py allows "sitevendor" customization plugin in addition to existed "sitecustomize" and "usercustomuze". More info displayed when "python.exe -m site" typed from command line. Vendors of Python sites (like Anaconda) can place there their own startup code. Mentioned "sitecustomize" and "usercustomuze" works as before. ---------- components: Library (Lib) messages: 342218 nosy: vx1920 priority: normal pull_requests: 13164 severity: normal status: open title: Additional startup plugin for vendors type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 15:45:07 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 11 May 2019 19:45:07 +0000 Subject: [issue36891] Additional startup plugin for vendors In-Reply-To: <1557603168.21.0.544720725277.issue36891@roundup.psfhosted.org> Message-ID: <1557603907.89.0.569999854194.issue36891@roundup.psfhosted.org> SilentGhost added the comment: This is a larger issue then the PR might lead one to believe. Have you had discussion on python-ideas or in other forums about this? ---------- nosy: +SilentGhost, ncoghlan versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 15:54:39 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 19:54:39 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557604479.91.0.0498431789581.issue36817@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 5833e94d8615ea18b14e4830ecdb868aec81b378 by Pablo Galindo in branch 'master': bpo-36817: Fix reference leak for expr_text in f-string = parsing (GH-13249) https://github.com/python/cpython/commit/5833e94d8615ea18b14e4830ecdb868aec81b378 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 15:54:49 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 19:54:49 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557604489.05.0.761401619016.issue36817@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 16:44:38 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 11 May 2019 20:44:38 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557607478.97.0.851755782021.issue35925@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +13165 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 17:02:28 2019 From: report at bugs.python.org (anthony shaw) Date: Sat, 11 May 2019 21:02:28 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1557608548.48.0.642456905263.issue36880@roundup.psfhosted.org> anthony shaw added the comment: Thanks Eryk that saved a lot of debugging. dgelessus - if you want to write a patch for CPython am happy to take you through this and get it over the line. Else: am Happy to write a test against the gc counter and a patch for this ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 17:11:45 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 11 May 2019 21:11:45 +0000 Subject: [issue36886] problem with Types on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557609105.14.0.667512671564.issue36886@roundup.psfhosted.org> Matthias Bussonnier added the comment: If types is not supposed to be stable, could a warning be added at top of https://docs.python.org/3/library/types.html that it should not be considered stable, and/or to CodeType docs to indicate the signature has changed in 3.8 ? If it is supposed to be stable can the `posonlyargcount` be moved to be the last argument ? ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 17:50:42 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 11 May 2019 21:50:42 +0000 Subject: [issue27805] io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE In-Reply-To: <1471637472.92.0.246311076418.issue27805@psf.upfronthosting.co.za> Message-ID: <1557611442.51.0.601215528858.issue27805@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13166 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 17:51:52 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 11 May 2019 21:51:52 +0000 Subject: [issue27805] io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE In-Reply-To: <1471637472.92.0.246311076418.issue27805@psf.upfronthosting.co.za> Message-ID: <1557611512.15.0.467768526209.issue27805@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 18:28:36 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 22:28:36 +0000 Subject: [issue36886] problem with Types on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557613716.93.0.36239233084.issue36886@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > If it is supposed to be stable can the `posonlyargcount` be moved to be the last argument ? There are other projects that have already added a fix for the new parameter positionally. If we add it to be the last (that still will break the old call) we would break them again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 18:31:56 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 22:31:56 +0000 Subject: [issue36886] problem with Types on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557613916.01.0.712253312274.issue36886@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > and/or to CodeType docs to indicate the signature has changed in 3.8 ? The documentation never documented the arguments for the code type (probably on purpose), so not sure if adding a notice there will help much: https://docs.python.org/3.8/library/types.html#types.CodeType We can maybe add something more clear to the "what's new" section or the changelog. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 18:32:04 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 22:32:04 +0000 Subject: [issue36886] problem with Types on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557613924.91.0.292217739136.issue36886@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 18:40:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 22:40:06 +0000 Subject: [issue36886] problem with Types on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557614406.27.0.223434512297.issue36886@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: As a final note, notice that when keyword-only arguments were implemented, the parameter was not added at the end of the constructor: commit 4f72a78684bbfcdc43ceeabb240ceee54706c4b0 Author: Guido van Rossum Date: Fri Oct 27 23:31:49 2006 +0000 Jiwon Seo's PEP 3102 implementation. See SF#1549670. The compiler package has not yet been updated. --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -41,7 +41,8 @@ intern_strings(PyObject *tuple) PyCodeObject * -PyCode_New(int argcount, int nlocals, int stacksize, int flags, +PyCode_New(int argcount, int kwonlyargcount, + int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 18:41:02 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 22:41:02 +0000 Subject: [issue36886] Failed to construct CodeType on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557614462.45.0.610039315028.issue36886@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- title: problem with Types on Python-3.8.0a4 -> Failed to construct CodeType on Python-3.8.0a4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 18:48:39 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 22:48:39 +0000 Subject: [issue36886] Failed to construct CodeType on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557614919.26.0.127131564253.issue36886@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13167 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 18:49:56 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 11 May 2019 22:49:56 +0000 Subject: [issue36886] Failed to construct CodeType on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557614996.75.0.126848508178.issue36886@roundup.psfhosted.org> Matthias Bussonnier added the comment: > There are other projects that have already added a fix for the new parameter positionally. If we add it to be the last (that still will break the old call) we would break them again. Understandable > The documentation never documented the arguments for the code type (probably on purpose) Understandable as well, just thinking that a CYA sentence in types.rst: "These types are not supposed to be instantiated outside of CPython internals and constructor signatures can vary between python versions. And maybe the docstrings. I rarely open the documentation on python.org and work most of the time by calling `help()` or `?` in IPython, so having some information saying this is non-public in the docstring would make sens to me. I'm happy to do it if it is deemed useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 18:58:20 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 22:58:20 +0000 Subject: [issue36886] Failed to construct CodeType on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557615500.37.0.0332465748325.issue36886@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >Understandable as well, just thinking that a CYA sentence in types.rst: >"These types are not supposed to be instantiated outside of CPython internals and constructor signatures can vary between python versions. >And maybe the docstrings. I rarely open the documentation on python.org and work most of the time by calling `help()` or `?` in IPython, so having some information saying this is non-public in the docstring would make sens to me. >I'm happy to do it if it is deemed useful. I am +1 to such a sentence, but I think this is a decision that more core devs should agree on. Taking into account previous history (like the linked commit) and the fact that promising stability on such internal pieces will prevent us from making critical optimizations I assume that others will agree, but I am still important to know that there is a consensus. I would recommend opening such PR if you have some time and let others review it as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 19:00:01 2019 From: report at bugs.python.org (musou1500) Date: Sat, 11 May 2019 23:00:01 +0000 Subject: [issue36892] "Modules" section in Tutorial contains incorrect description about __init__.py Message-ID: <1557615601.14.0.911128255467.issue36892@roundup.psfhosted.org> New submission from musou1500 : "Modules" section in the tutorial says that https://docs.python.org/3/tutorial/modules.html "The __init__.py files are required to make Python treat directories containing the file as packages. " But, thanks to PEP 420, __init__.py is not required after Python 3.3. https://www.python.org/dev/peps/pep-0420/ ---------- assignee: docs at python components: Documentation messages: 342228 nosy: docs at python, musou1500 priority: normal severity: normal status: open title: "Modules" section in Tutorial contains incorrect description about __init__.py type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 19:05:38 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 11 May 2019 23:05:38 +0000 Subject: [issue36886] Failed to construct CodeType on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557615938.83.0.0521812651935.issue36886@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: After PR 13255 is merged, let's open a new issue for the notice in types.rst to keep the discussion isolated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 20:03:13 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 12 May 2019 00:03:13 +0000 Subject: [issue36892] "Modules" section in Tutorial contains incorrect description about __init__.py In-Reply-To: <1557615601.14.0.911128255467.issue36892@roundup.psfhosted.org> Message-ID: <1557619393.7.0.843105777353.issue36892@roundup.psfhosted.org> Steven D'Aprano added the comment: In my experience, beginners have enough trouble getting packages right without complicating the tutorial with a rarely-used advanced feature like namespace packages. I don't think this needs more than perhaps a footnote, if that. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 20:21:31 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 May 2019 00:21:31 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557620491.28.0.452574442688.issue36817@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 20:43:07 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 May 2019 00:43:07 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1557621787.07.0.722511237202.issue36817@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 26f55c29f2316648939ad12a9d3730a2118da2ea by Pablo Galindo in branch 'master': bpo-36817: Do not decrement reference for expr_text on fstring = parsing failure (GH-13256) https://github.com/python/cpython/commit/26f55c29f2316648939ad12a9d3730a2118da2ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 21:02:14 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 12 May 2019 01:02:14 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1557622934.12.0.547385472148.issue36792@roundup.psfhosted.org> Jeremy Kloth added the comment: I have managed to setup a VM that can reproduce the error. Unfortunately, the error (heap corruption) is coming from within the UCRT. Attempting to work around that, I came across another error in the UCRT. Due to these errors in all available UCRT versions, the only available solution is to re-implement %Z handling in Python's implementation of strftime(). @steve.dower: If you could forward the following information to the interested parties for faster response, it would be great. Everyone else, what follows contains UCRT internal details which is of no interest to Python. In wcsftime() [ucrt\time\wcsftime.cpp, line 1018], the call to _mbstowcs_s_l() doesn't handle the error case of EILSEQ. This error happens when the tzname (originally set by __tzset() from the Unicode name in the registry encoded to the ACP) contains an undecodable character. In the 'de_DE' case, \u00E4. _mbstowcs_s_l returns without changing `wnum` (which is 0). The 'Z' case then blindly subtracts 1 (wnum=-1) and advances the string pointer, now pointing *before* the start when the format is just L"%Z" (like Python has). Now when wcsftime() is returning it stores a '\0' at that current position thus causing a heap corruption. Ok, no deal breaker, we can just update the _tzname array when we call setlocale(). Alas, another error :( If _tzset() is called a second time, it fails when encoding the Unicode name due to an uninitialized variable. In tzset_from_system_nolock() [ucrt\time\tzset.cpp, line 158], the function __acrt_WideCharToMultiByte() [appcrt\locale\widechartomultibyte.cpp] does not set the `lpUsedDefaultChar` flag when FALSE. This is only an issue, it seems, on subsequent calls as `used_default_char` can be non-zero prior to the call. A non-zero value there, causes the tzname to be set to the empty string even if the conversion succeeded. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 21:30:23 2019 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 12 May 2019 01:30:23 +0000 Subject: [issue36892] "Modules" section in Tutorial contains incorrect description about __init__.py In-Reply-To: <1557615601.14.0.911128255467.issue36892@roundup.psfhosted.org> Message-ID: <1557624623.53.0.1292030758.issue36892@roundup.psfhosted.org> Ezio Melotti added the comment: I agree that implicit namespace packages don't deserve more than a footnote in that page. However, since I often have to answer questions about packages, I'm thinking that perhaps it would be better to expand that page and maybe have a page dedicated to modules and one to packages, where PEP 420 and other common issues could be covered in more details. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 21:44:35 2019 From: report at bugs.python.org (rhubarbdog x) Date: Sun, 12 May 2019 01:44:35 +0000 Subject: [issue36863] argparse doesn't like options in the middle of arguments In-Reply-To: <1557391162.39.0.325223416239.issue36863@roundup.psfhosted.org> Message-ID: <1557625475.6.0.261828670031.issue36863@roundup.psfhosted.org> rhubarbdog x added the comment: I've just done a test and from a command shell (bash or whatever) the following python script when ran produces the following $ python3 command.py 0ne thwo three files: ['0ne', 'thwo', 'three'] sensors 1 freq 1200 $ python3 command.py -s 5 0ne thwo three files: ['0ne', 'thwo', 'three'] sensors 5 freq 1200 $ python3 command.py 0ne -s 5 thwo three usage: command.py [-h] [-s SENSORS] [-f FREQ] file [file ...] command.py: error: unrecognized arguments: thwo three i've attached the program command.py ---------- status: pending -> open Added file: https://bugs.python.org/file48327/command.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 21:54:41 2019 From: report at bugs.python.org (Edison Abahurire) Date: Sun, 12 May 2019 01:54:41 +0000 Subject: [issue36833] Add tests for Datetime C API Macros In-Reply-To: <1557238651.7.0.774867491617.issue36833@roundup.psfhosted.org> Message-ID: <1557626081.81.0.351178246981.issue36833@roundup.psfhosted.org> Edison Abahurire added the comment: I'm now working on this as pbo-36782 awaits merging. ---------- nosy: +anthony shaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 22:57:34 2019 From: report at bugs.python.org (Gus Goulart) Date: Sun, 12 May 2019 02:57:34 +0000 Subject: [issue36777] unittest discover throws TypeError on empty packages In-Reply-To: <1556815623.31.0.225997144606.issue36777@roundup.psfhosted.org> Message-ID: <1557629854.9.0.773699743979.issue36777@roundup.psfhosted.org> Change by Gus Goulart : ---------- keywords: +patch pull_requests: +13169 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 23:20:31 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 May 2019 03:20:31 +0000 Subject: [issue34152] performance of some list slice assignment margin cases can be improved In-Reply-To: <1531938369.41.0.56676864532.issue34152@psf.upfronthosting.co.za> Message-ID: <1557631231.51.0.893721005517.issue34152@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I concur with Raymond and Serhiy: this patch covers very exotic cases and complicates the surrounding code. I'm closing this issue. Thanks, @sir-sigurd for the proposal ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 23:31:53 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Sun, 12 May 2019 03:31:53 +0000 Subject: [issue36822] Minor grammatical fix in glossary.rst In-Reply-To: <1557186503.72.0.659127462032.issue36822@roundup.psfhosted.org> Message-ID: <1557631913.02.0.982626624122.issue36822@roundup.psfhosted.org> Change by Sanyam Khurana : ---------- pull_requests: +13170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 23:33:37 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 12 May 2019 03:33:37 +0000 Subject: [issue36684] codecov.io code coverage has not updated since 2019-04-13 In-Reply-To: <1555804519.07.0.0840911433327.issue36684@roundup.psfhosted.org> Message-ID: <1557632017.9.0.987112973011.issue36684@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 87068ed00927bdeaa2ae556e4241c16cf8a845eb by Inada Naoki (Gordon P. Hemsley) in branch 'master': bpo-36684: Split out gcc and test coverage builds (GH-13146) https://github.com/python/cpython/commit/87068ed00927bdeaa2ae556e4241c16cf8a845eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 23:35:04 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 12 May 2019 03:35:04 +0000 Subject: [issue36684] codecov.io code coverage has not updated since 2019-04-13 In-Reply-To: <1555804519.07.0.0840911433327.issue36684@roundup.psfhosted.org> Message-ID: <1557632104.2.0.448860311473.issue36684@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 23:53:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 May 2019 03:53:06 +0000 Subject: [issue36822] Minor grammatical fix in glossary.rst In-Reply-To: <1557186503.72.0.659127462032.issue36822@roundup.psfhosted.org> Message-ID: <1557633186.01.0.610535449292.issue36822@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 4f5febdf955240b6064bb5647dec084feaa98376 by Pablo Galindo (Sanyam Khurana) in branch '3.7': [3.7] bpo-36822: Fix minor grammatical error in glossary.rst (GH-13145). (GH-13260) https://github.com/python/cpython/commit/4f5febdf955240b6064bb5647dec084feaa98376 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 11 23:53:13 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 May 2019 03:53:13 +0000 Subject: [issue36822] Minor grammatical fix in glossary.rst In-Reply-To: <1557186503.72.0.659127462032.issue36822@roundup.psfhosted.org> Message-ID: <1557633193.35.0.173411672104.issue36822@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 00:41:05 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 12 May 2019 04:41:05 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557636065.97.0.63884974058.issue36887@roundup.psfhosted.org> Steven D'Aprano added the comment: Yes please for this! The two usual versions are isqrt and nsqrt: isqrt(n) = largest integer ? ?n nsqrt(n) = closest integer to ?n although to be honest I'm not sure what use cases there are for nsqrt. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 00:52:10 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 12 May 2019 04:52:10 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557636730.02.0.9709390265.issue36887@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 01:21:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 12 May 2019 05:21:13 +0000 Subject: [issue24758] unittest.mock.Mock's new "unsafe" feature needs a better error message In-Reply-To: <1438283225.26.0.251368779344.issue24758@psf.upfronthosting.co.za> Message-ID: <1557638473.51.0.632394813648.issue24758@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Closing this as resolved since PR was merged. Thanks Zackery for the PR. ---------- nosy: +xtreak resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 01:28:55 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 12 May 2019 05:28:55 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1557638935.2.0.506921472167.issue36871@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This is little tricky to fix since the call-matcher needs the signature and also the information over whether to add self or not for some cases. Similar open issues. https://bugs.python.org/issue27715 https://bugs.python.org/issue26752 An approach suggested by Mario : https://bugs.python.org/issue26752#msg337023 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 01:32:41 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 12 May 2019 05:32:41 +0000 Subject: [issue36725] Reference leak regression with Python3.8a3 In-Reply-To: <1556224107.78.0.397981137362.issue36725@roundup.psfhosted.org> Message-ID: <1557639161.93.0.0421565631947.issue36725@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: -13139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 01:33:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 12 May 2019 05:33:13 +0000 Subject: [issue36725] Reference leak regression with Python3.8a3 In-Reply-To: <1556224107.78.0.397981137362.issue36725@roundup.psfhosted.org> Message-ID: <1557639193.61.0.540273969081.issue36725@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 02:07:46 2019 From: report at bugs.python.org (Big Stone) Date: Sun, 12 May 2019 06:07:46 +0000 Subject: [issue36886] Failed to construct CodeType on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557641266.61.0.182942856781.issue36886@roundup.psfhosted.org> Big Stone added the comment: I found a third project that is impacted https://github.com/microsoft/python-language-server/issues/1070. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 03:05:26 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sun, 12 May 2019 07:05:26 +0000 Subject: [issue33303] ElementTree Comment text isn't escaped In-Reply-To: <1524011592.66.0.682650639539.issue33303@psf.upfronthosting.co.za> Message-ID: <1557644726.96.0.0424478711638.issue33303@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I backed-out the Processing Instruction changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 03:30:59 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 12 May 2019 07:30:59 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1557646259.5.0.97938293393.issue36871@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13171 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 03:38:02 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 12 May 2019 07:38:02 +0000 Subject: [issue33303] ElementTree Comment text isn't escaped In-Reply-To: <1524011592.66.0.682650639539.issue33303@psf.upfronthosting.co.za> Message-ID: <1557646682.61.0.877795076881.issue33303@roundup.psfhosted.org> Stefan Behnel added the comment: I'm really sorry again, but I only consulted the XML spec on this now (and also the way libxml2 does it), and I found that XML comment text actually does not get escaped. It's not character data, and, in fact, "--" is not even allowed at all inside of comments. (Funny enough, the HTML serialiser does escaping for both comments and PIs, but, well, that's HTML, I guess?) https://www.w3.org/TR/REC-xml/#sec-comments Sorry, Jeffrey, I should have looked that up in the spec much earlier, before you invested so much time into this. There are two disallowed cases: "--" in the text content, and "-" at the end of the text (which would lead to an "--->"). Now, the thing is, such validation is currently unprecedented in ElementTree, so I don't know if we should start raising exceptions from the serialiser for this case, and if yes, which. Since comments are rare, it won't hurt performance to do that, but once we get started on this, users would probably also want their text and attribute content and their tag and attribute names to be validated, and that would hurt then. So, I will have to reject the PR and this ticket. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 04:16:24 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 12 May 2019 08:16:24 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1557648984.85.0.675121768268.issue36871@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I have created a PR for this. My approach is that when mock_thing.assert_has_calls(mock.call.method1(1, 2)) is made the assert_has_calls is made against mock_thing whose spec_signature (constructor signature) is always used. But there is _mock_children, a dictionary which has signature for the methods. Thus method1 can be used as key for _mock_children to get correct signature. Where it gets tricky is that if there is a nested class whose method is called like Foo.Bar.meth1 as below then the dictionary has only 'Bar' from which the children has to be obtained to get meth1 signature like {'Foo': {'bar1': signature}} and it's not stored with the key 'Foo.Bar.meth1' resulting in iteration. There could be a better way or some edge case not covered so I have opened up PR for review but if someone else has better approach then that would be great too since this is a long standing issue resulting autospec needing to be turned off. class Foo: class Bar: def meth1(self, a): pass This PR also solves the case at https://bugs.python.org/issue26752#msg287728. There is a test failure caught by doctest for nested calls without spec and not by unittest :) I have converted the doctest as a unittest. ---------- nosy: +cjw296, mariocj89, michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 04:27:47 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 12 May 2019 08:27:47 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557649667.89.0.147085356116.issue36867@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Since the commit there is a warning in CI and locally while running tests. Travis CI : * https://travis-ci.org/python/cpython/jobs/531304357#L2099 (test_multiprocessing_forkserver) * https://travis-ci.org/python/cpython/jobs/531304357#L2296 (test_multiprocessing_fork) Before commit : ./python.exe -X tracemalloc -m test --fail-env-changed test_multiprocessing_forkserver Run tests sequentially 0:00:00 load avg: 4.71 [1/1] test_multiprocessing_forkserver test_multiprocessing_forkserver passed in 2 min 21 sec == Tests result: SUCCESS == 1 test OK. Total duration: 2 min 21 sec Tests result: SUCCESS After commit f22cc69b012f52882d434a5c44a004bc3aa5c33c : ./python.exe -X tracemalloc -m test --fail-env-changed test_multiprocessing_forkserver Run tests sequentially 0:00:00 load avg: 4.08 [1/1] test_multiprocessing_forkserver /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/multiprocessing/resource_tracker.py:198: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d ' /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/case.py:683: ResourceWarning: unclosed file <_io.BufferedReader name=7> testMethod() Object allocated at (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/subprocess.py", lineno 819 self.stdout = io.open(c2pread, 'rb', bufsize) test_multiprocessing_forkserver passed in 2 min 20 sec == Tests result: SUCCESS == 1 test OK. Total duration: 2 min 20 sec Tests result: SUCCESS == Tests result: SUCCESS == 1 test OK. Total duration: 2 min 26 sec Tests result: SUCCESS ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 05:10:06 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 12 May 2019 09:10:06 +0000 Subject: [issue30464] gammavariate has a wrong comment In-Reply-To: <1495662433.59.0.0975080513198.issue30464@psf.upfronthosting.co.za> Message-ID: <1557652206.45.0.168845013248.issue30464@roundup.psfhosted.org> Mark Dickinson added the comment: This was fixed in PRs GH-1798 and GH-1934. Closing. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 05:12:33 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 12 May 2019 09:12:33 +0000 Subject: [issue36791] sum() relies on C signed overflow behaviour In-Reply-To: <1556949289.05.0.226850923115.issue36791@roundup.psfhosted.org> Message-ID: <1557652353.88.0.0205881891752.issue36791@roundup.psfhosted.org> Mark Dickinson added the comment: Can this be closed, or does the fix need to be backported? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 05:14:59 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 12 May 2019 09:14:59 +0000 Subject: [issue30464] gammavariate has a wrong comment In-Reply-To: <1495662433.59.0.0975080513198.issue30464@psf.upfronthosting.co.za> Message-ID: <1557652499.08.0.0694027666278.issue30464@roundup.psfhosted.org> SilentGhost added the comment: Does "a difference stream" in PR 1934 (news entry): > It does however produce a difference stream of random variables than it used to. make some sense? Sentence doesn't seem grammatical. ---------- nosy: +SilentGhost resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 05:18:10 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 12 May 2019 09:18:10 +0000 Subject: [issue36791] sum() relies on C signed overflow behaviour In-Reply-To: <1556949289.05.0.226850923115.issue36791@roundup.psfhosted.org> Message-ID: <1557652690.46.0.626812427775.issue36791@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13172 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 05:25:10 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 12 May 2019 09:25:10 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1557653110.96.0.757704197932.issue36871@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +lisroach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 05:37:19 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 12 May 2019 09:37:19 +0000 Subject: [issue36791] sum() relies on C signed overflow behaviour In-Reply-To: <1556949289.05.0.226850923115.issue36791@roundup.psfhosted.org> Message-ID: <1557653839.96.0.166229869042.issue36791@roundup.psfhosted.org> miss-islington added the comment: New changeset b7e483b6d07081d5f81860258e95785975a7cbf8 by Miss Islington (bot) in branch '3.7': bpo-36791: Safer detection of integer overflow in sum(). (GH-13080) https://github.com/python/cpython/commit/b7e483b6d07081d5f81860258e95785975a7cbf8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 05:39:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 May 2019 09:39:22 +0000 Subject: [issue36791] sum() relies on C signed overflow behaviour In-Reply-To: <1556949289.05.0.226850923115.issue36791@roundup.psfhosted.org> Message-ID: <1557653962.58.0.854044535386.issue36791@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 06:22:36 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 12 May 2019 10:22:36 +0000 Subject: [issue30464] gammavariate has a wrong comment In-Reply-To: <1495662433.59.0.0975080513198.issue30464@psf.upfronthosting.co.za> Message-ID: <1557656556.15.0.903017393176.issue30464@roundup.psfhosted.org> Mark Dickinson added the comment: That should clearly have been "different stream" rather than "difference stream". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 06:31:00 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 12 May 2019 10:31:00 +0000 Subject: [issue36865] FileInput does not allow 'rt' mode, but all its existing delegates do In-Reply-To: <1557408143.65.0.0603138385641.issue36865@roundup.psfhosted.org> Message-ID: <1557657060.8.0.848792406898.issue36865@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +berker.peksag versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 06:39:28 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 12 May 2019 10:39:28 +0000 Subject: [issue35996] Optional modulus argument for new math.prod() function In-Reply-To: <1550172876.35.0.867721234262.issue35996@roundup.psfhosted.org> Message-ID: <1557657568.91.0.302194310946.issue35996@roundup.psfhosted.org> Mark Dickinson added the comment: Put me down for a -1, too. > One would also be able to things like prod(range(1, n), n) == n - 1 for Wilson's primality test. That's not the most convincing use-case, since that's a _horribly_ inefficient way to do a primality test in the first place (worse than trial division, even if you take that trial division all the way up to `n - 1` instead of the square root of `n`). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 06:42:03 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 12 May 2019 10:42:03 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1557657723.73.0.938917623497.issue35431@roundup.psfhosted.org> Mark Dickinson added the comment: @kellerfuchs @FR4NKESTI3N We seem to have two open PRs for this feature, both with some review comments. Which is the one true PR? Can we close the other one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 07:06:18 2019 From: report at bugs.python.org (Matthew) Date: Sun, 12 May 2019 11:06:18 +0000 Subject: [issue36893] email.headerregistry.Address blocks Unicode local part addr_spec accepted elsewhere Message-ID: <1557659178.71.0.414757697263.issue36893@roundup.psfhosted.org> New submission from Matthew : The parser for passing an addr_spec to email.headerregistry.Address does not allow non-ASCII local parts, but the rest of the email package handles them fine, either straight (with explicit references to RFC6532 and SMTPUTF8), or encoding as expected. Apologies if I've misunderstood something. >>> from email.message import EmailMessage >>> msg = EmailMessage() >>> msg['To'] = 'Matth?w ' >>> msg.as_string() 'To: =?utf-8?q?Matth=C3=A9w?= <=?utf-8?q?a=C3=A9?=@example.com>\n\n' >>> msg['To'].addresses[0] Address(display_name='Matth?w', username='a?', domain='example.com') >>> msg['To'].addresses[0].addr_spec 'a?@example.com' >>> email.headerregistry.Address(addr_spec=msg['To'].addresses[0].addr_spec) Traceback (most recent call last): File "", line 1, in File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/email/headerregistry.py", line 48, in __init__ raise a_s.all_defects[0] email.errors.NonASCIILocalPartDefect: local-part contains non-ASCII characters) >>> ---------- components: email messages: 342254 nosy: barry, dracos, r.david.murray priority: normal severity: normal status: open title: email.headerregistry.Address blocks Unicode local part addr_spec accepted elsewhere versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 07:40:00 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 12 May 2019 11:40:00 +0000 Subject: [issue36865] FileInput does not allow 'rt' mode, but all its existing delegates do In-Reply-To: <1557408143.65.0.0603138385641.issue36865@roundup.psfhosted.org> Message-ID: <1557661200.34.0.643594993165.issue36865@roundup.psfhosted.org> Berker Peksag added the comment: Thank you for the report and the PR! I think accepting 'rt' mode is a good idea. However, it's a new feature and it can only go into 3.8. It seems to me that the root cause of the issue is that the fileinput module wasn't properly converted to support Python 3. Perhaps we could change 'r' to 'rt' in FileInput.__init__() or hook_compressed() to make it work properly, so the example in issue 5758 would work as expected without changing any user code: # test.py import fileinput for line in fileinput.FileInput(openhook=fileinput.hook_compressed): print(line.rstrip()) $ ./python.exe test.py mike.txt mike.txt.gz Hello from Mike. This is the second line. Why did the robot cross the road? Hello from Mike. This is the second line. Why did the robot cross the road? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 09:10:20 2019 From: report at bugs.python.org (R. David Murray) Date: Sun, 12 May 2019 13:10:20 +0000 Subject: [issue36893] email.headerregistry.Address blocks Unicode local part addr_spec accepted elsewhere In-Reply-To: <1557659178.71.0.414757697263.issue36893@roundup.psfhosted.org> Message-ID: <1557666620.49.0.23923232036.issue36893@roundup.psfhosted.org> R. David Murray added the comment: In order to legitimately have a non-ascii localpart, you *must* be using RFC6532 and RFC6531. In the email package you do this by using policy=SMTPUTF8, or setting utf8=True in your custom Policy. In smtplib you do this by specifying smtputf8 in the mail_options list to sendmail, or passing a message with a policy that has utf8=True to send_message. I notice in answering this report that this is not really documented clearly. The information is there, but only if you already know how the RFCs work. Some variation of the text above should be added to the smtplib documentation, and an example of using SMTPUTF8 should be added to the email examples chapter. However, you are correct, there are couple of bugs here. The rendering done by as_string (and as_bytes) is the best that we can do without raising an error...but we should probably be raising an error if the rendering policy does not have utf8=True and we don't have an "original source line" from parsing a message (which is the case here), rather than using the incorrect RFC2047 encoding. The second bug, the one you are reporting, is that we apparently missed the constructor of Address when we were adding RFC6532 support. If you look at the comment above that code, it is purposefully trying to raise an error if the addr_spec is invalid and it was provided by the *application* (as opposed to email.Parser). But with RFC6532 support, it should be valid to have a local part that has non-ascii in an Address, and the error, as I noted above, should be raised only at serialization time and when we don't have an original source string. So that raise should be modified to explicitly ignore the NonASCIILocalPartDefect. (Really, Address should take a policy argument. That's a bigger change, but it would be the "right way" to fix this.) Raising the error on serialization could cause some breakage if existing programs are "getting away" with specifying non-ascii local parts but not doing it via addr_spec. It is breakage that should happen, I think, but we may want to only do it in a feature release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 09:55:40 2019 From: report at bugs.python.org (Yash Aggarwal) Date: Sun, 12 May 2019 13:55:40 +0000 Subject: [issue35431] Add a function for computing binomial coefficients to the math module In-Reply-To: <1544131082.09.0.788709270274.issue35431@psf.upfronthosting.co.za> Message-ID: <1557669340.48.0.266325888719.issue35431@roundup.psfhosted.org> Yash Aggarwal added the comment: @mark.dickinson both pr's are more or less same. Keller was offline for some time so I made the new issue. They were merged later. Only difference is in unittests. I'd say it's up to you to decide which one to keep. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 10:29:47 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Sun, 12 May 2019 14:29:47 +0000 Subject: [issue20044] gettext.install() ignores previous call to locale.setlocale() In-Reply-To: <1387642520.63.0.386289472626.issue20044@psf.upfronthosting.co.za> Message-ID: <1557671387.19.0.337406446492.issue20044@roundup.psfhosted.org> Toshio Kuratomi added the comment: I tested a small C program and found that setlocale takes precedence for LC_ALL, LC_MESSAGES, and LANG but not for LANGUAGE. int main(int argc, char **argv) { char *message1; //setlocale (LC_ALL, ""); setlocale (LC_ALL, "pt_BR.utf-8"); bindtextdomain ("testc", "/srv/python/cpython/tmp"); textdomain ("testc"); message1 = gettext("lemon"); printf("%s\n", message1); return 0; } $ LC_ALL=es_MX.utf-8 LANGUAGE= LC_MESSAGES=es_MX.utf-8 LANG=es_MX.utf-8 ./test lim?o $ LANGUAGE=es_MX LANG=es_MX.utf-8 ./test lim?n So this could be considered a bug in the stdlib's gettext. If we fix it, we'll need to make sure that we continue to honor LANGUAGE, though. ---------- nosy: +a.badger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 10:40:20 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 12 May 2019 14:40:20 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1557672020.3.0.215134651235.issue36780@roundup.psfhosted.org> Andrew Svetlov added the comment: Should wait_on_exit be True only on application exit? Do application exit means interpreter shutdown (sys.is_finalizing() == True)? ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 10:52:59 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Sun, 12 May 2019 14:52:59 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1557672779.25.0.171066375922.issue36780@roundup.psfhosted.org> Hrvoje Nik?i? added the comment: @asvetlov The idea of the new flag is to disable any subsequent waiting for futures after ThreadPoolExecutor.shutdown(wait=False) returns. Currently the additional waiting is implemented using "atexit", so I assumed it referred to process exit. (The documentation at https://docs.python.org/3/library/atexit.html doesn't seem to specify precisely when the callbacks are executed.) But looking at the implementation of atexit, it seems that the atexit callbacks are actually called from Py_FinalizeEx. I think wait_at_exit is descriptive because in most cases the process exit and interpreter shutdown will correlate, but I can still update the docs to make it clearer what "exit" refers to. We should just avoid the word "shutdown" in the flag name to avoid confusion with executor shutdown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 11:05:12 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 12 May 2019 15:05:12 +0000 Subject: [issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors In-Reply-To: <1556875683.94.0.285155490659.issue36780@roundup.psfhosted.org> Message-ID: <1557673512.24.0.823274692151.issue36780@roundup.psfhosted.org> Andrew Svetlov added the comment: As documentation reader I have a mental problem to figure out when use non-default `wait_at_exit=False` flag and when don't. The rule like: "if you tried to call `executor.shutdown(wait=False)` and it still hangs try `executor.shutdown(wait=False, wait_at_exit=False)`, maybe it can help" doesn't sound too robust. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 13:03:41 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 12 May 2019 17:03:41 +0000 Subject: [issue36894] test_multiprocessing_spawn regression on Windows Message-ID: <1557680621.73.0.0423240629914.issue36894@roundup.psfhosted.org> New submission from Antoine Pitrou : After bpo-36867, test_multiprocessing_spawn fails running any test on Windows (but it isn't noticed as a fail build). https://ci.appveyor.com/project/python/cpython/builds/24485897#L1264 0:04:05 load avg: 5.39 [389/421] test_multiprocessing_spawn run no tests ERROR ====================================================================== ERROR: setUpModule (test.test_multiprocessing_spawn) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\_test_multiprocessing.py", line 5498, in setUpModule multiprocessing.set_forkserver_preload(PRELOAD) File "C:\projects\cpython\lib\multiprocessing\context.py", line 183, in set_forkserver_preload from .forkserver import set_forkserver_preload File "C:\projects\cpython\lib\multiprocessing\forkserver.py", line 14, in from . import resource_tracker File "C:\projects\cpython\lib\multiprocessing\resource_tracker.py", line 24, in import _posixshmem ModuleNotFoundError: No module named '_posixshmem' ---------------------------------------------------------------------- Ran 0 tests in 0.005s FAILED (errors=1) ---------- components: Library (Lib), Tests messages: 342262 nosy: pierreglaser, pitrou priority: deferred blocker severity: normal stage: needs patch status: open title: test_multiprocessing_spawn regression on Windows type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 13:08:27 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 12 May 2019 17:08:27 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1557680907.36.0.567530731187.issue36084@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 4959c33d2555b89b494c678d99be81a65ee864b0 by Antoine Pitrou (Jake Tesler) in branch 'master': bpo-36084: Add native thread ID to threading.Thread objects (GH-11993) https://github.com/python/cpython/commit/4959c33d2555b89b494c678d99be81a65ee864b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 13:09:04 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 12 May 2019 17:09:04 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1557680944.66.0.63789567666.issue36084@roundup.psfhosted.org> Antoine Pitrou added the comment: Thank you Jake for your contribution! ---------- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 13:49:30 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Sun, 12 May 2019 17:49:30 +0000 Subject: [issue14353] Proper gettext support in locale module In-Reply-To: <1332017397.14.0.261241263671.issue14353@psf.upfronthosting.co.za> Message-ID: <1557683370.3.0.970347477448.issue14353@roundup.psfhosted.org> Change by Toshio Kuratomi : ---------- pull_requests: +13173 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 13:57:36 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 12 May 2019 17:57:36 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1557683856.42.0.645818383967.issue36027@roundup.psfhosted.org> Change by Mark Dickinson : ---------- keywords: +patch pull_requests: +13174 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 13:58:32 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 12 May 2019 17:58:32 +0000 Subject: [issue36027] Support negative exponents in pow() where a modulus is specified. In-Reply-To: <1550520659.43.0.126744170658.issue36027@roundup.psfhosted.org> Message-ID: <1557683912.84.0.0537193799573.issue36027@roundup.psfhosted.org> Change by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 16:47:29 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 12 May 2019 20:47:29 +0000 Subject: [issue14353] Proper gettext support in locale module In-Reply-To: <1332017397.14.0.261241263671.issue14353@psf.upfronthosting.co.za> Message-ID: <1557694049.26.0.322135157303.issue14353@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 24ff9a44ac5f0653df4c1d92c2a99fab286fcc15 by Benjamin Peterson (Toshio Kuratomi) in branch '2.7': [2.7] closes bpo-14353: Fix detection of bind_textdomain_codeset in libintl. (GH-13265) https://github.com/python/cpython/commit/24ff9a44ac5f0653df4c1d92c2a99fab286fcc15 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 17:12:02 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Sun, 12 May 2019 21:12:02 +0000 Subject: [issue35924] curses segfault resizing window In-Reply-To: <1549497741.38.0.310308715457.issue35924@roundup.psfhosted.org> Message-ID: <1557695522.44.0.287782566847.issue35924@roundup.psfhosted.org> Toshio Kuratomi added the comment: Hi Josiah, I've tested my sample program and it looks like the segmentation fault is fixed with ncurses-6.1-20190511: http://lists.gnu.org/archive/html/bug-ncurses/2019-05/msg00013.html Are you able to give that a try and see whether it resolves the issue for you as well? For the Core devs; Assuming this is fixed in a newer ncurses, how would you like to proceed with this bug? I have a documentation PR to tell people about the bug in ncurses and the workaround: https://github.com/python/cpython/pull/13209 I can update that to mention the version of ncurses that this is fixed in if you want that. Other than that, I'm not sure what more we can do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 17:21:34 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 12 May 2019 21:21:34 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= Message-ID: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> New submission from Matthias Bussonnier : Deprecation message in `timemodule.c` says: > "time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead" Should be bumped to 3.9 ??or time.clock should be removed. Deprecation was added by Victor Stinner. ---------- components: Library (Lib) messages: 342267 nosy: mbussonn priority: normal severity: normal status: open title: time.clock() marked for removal in 3.8 ??still there. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 17:22:39 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 12 May 2019 21:22:39 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557696159.19.0.365845364573.issue36895@roundup.psfhosted.org> Matthias Bussonnier added the comment: Vstiner, added you as you added the deprecation notice. I'm happy to take care of the removal and/or update the deprecation warning to 3.9. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 17:23:27 2019 From: report at bugs.python.org (Chun-Yu Tseng) Date: Sun, 12 May 2019 21:23:27 +0000 Subject: [issue22135] allow to break into pdb with Ctrl-C for all the commands that resume execution In-Reply-To: <1407185061.52.0.89159247831.issue22135@psf.upfronthosting.co.za> Message-ID: <1557696207.98.0.410740610167.issue22135@roundup.psfhosted.org> Change by Chun-Yu Tseng : ---------- pull_requests: +13175 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 17:45:55 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 May 2019 21:45:55 +0000 Subject: [issue36886] Failed to construct CodeType on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557697555.56.0.342971040127.issue36886@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 5d23e282af69d404a3430bb95aefe371112817b3 by Pablo Galindo in branch 'master': bpo-36886: Document changes in code object in What's new section (GH-13255) https://github.com/python/cpython/commit/5d23e282af69d404a3430bb95aefe371112817b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 17:46:04 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 May 2019 21:46:04 +0000 Subject: [issue36886] Failed to construct CodeType on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557697564.46.0.187580498161.issue36886@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 17:49:51 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 May 2019 21:49:51 +0000 Subject: [issue36894] test_multiprocessing_spawn regression on Windows In-Reply-To: <1557680621.73.0.0423240629914.issue36894@roundup.psfhosted.org> Message-ID: <1557697791.53.0.649284849469.issue36894@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Indeed, this is failing as well in all buildbots but has not been reported because fails in the setUp and therefore is counted as "RUN NO TESTS". Example: https://buildbot.python.org/all/#/builders/58/builds/2368/steps/3/logs/stdio ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 17:50:28 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 12 May 2019 21:50:28 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557697828.52.0.944874740985.issue36895@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +13176 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 18:03:30 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 12 May 2019 22:03:30 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature Message-ID: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> New submission from Matthias Bussonnier : >From bpo-36886, IT is unclear the FunctionTypes, CodeTypes ... etc are not stable between python versions, and the recent addition of `:=` change some of the signatures. This suggest 2 things: - A CYA sentence in types.rst "These types are not supposed to be instantiated outside of CPython internals and constructor signatures will vary between python versions." or alike - As many people don't read online documentation but on the docstring via calling `help()`, to add something similar to all the docstrings of said-objects constructors. ---------- assignee: docs at python components: Documentation messages: 342271 nosy: docs at python, mbussonn priority: normal severity: normal status: open title: clarify in types.rst that FunctionTypes & co constructors don't have stable signature versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 18:04:46 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 12 May 2019 22:04:46 +0000 Subject: [issue36886] Failed to construct CodeType on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1557698686.44.0.415552770728.issue36886@roundup.psfhosted.org> Matthias Bussonnier added the comment: Thanks for the update to the what's new Pablo. > let's open a new issue for the notice in types.rst to keep the discussion isolated. See bpo-36896 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 20:25:44 2019 From: report at bugs.python.org (Windson Yang) Date: Mon, 13 May 2019 00:25:44 +0000 Subject: [issue36689] docs: os.path.commonpath raises ValueError for different drives In-Reply-To: <1555837758.83.0.507858438764.issue36689@roundup.psfhosted.org> Message-ID: <1557707144.74.0.298556375984.issue36689@roundup.psfhosted.org> Windson Yang added the comment: An easy fix would be "Raise ValueError if paths contain (note: use contain instead of contains) both absolute and relative pathnames or the path are on the different drives." ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 20:28:11 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 13 May 2019 00:28:11 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature In-Reply-To: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> Message-ID: <1557707291.87.0.989133389647.issue36896@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +13177 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 20:44:00 2019 From: report at bugs.python.org (Dan Halbert) Date: Mon, 13 May 2019 00:44:00 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557708240.11.0.58688595084.issue36807@roundup.psfhosted.org> Dan Halbert added the comment: Fix tested and works! Comment from PR duplicated here. I tested this fix by editing the 3.7.3 IDLE code by hand, and editing this test program as code.py on a CIRCUITPY drive on Windows 10: import time i = 0 while True: print(i) i += 1 print("""\ 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 """) time.sleep(1) I typically test write flushing by editing a short program like this, and duplicating the print lines so that the size of the program grows by >512 bytes. This forces a rewrite of the FAT12 information because the program has increased in size by one or more filesystem blocks. Then I shrink it back down again. If file flushing doesn't happen immediately, the program will often throw a syntax error (because it's missing some blocks), or CircuitPython will get an I/O error, which is what happened before I patched IDLE. So this looks good! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 20:52:30 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 13 May 2019 00:52:30 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557708750.19.0.112020484162.issue36807@roundup.psfhosted.org> Guido van Rossum added the comment: @Terry please see my comment on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 20:59:51 2019 From: report at bugs.python.org (Matthew Gamble) Date: Mon, 13 May 2019 00:59:51 +0000 Subject: [issue36897] shlex doesn't differentiate escaped characters in output Message-ID: <1557709191.27.0.852663831837.issue36897@roundup.psfhosted.org> New submission from Matthew Gamble : The output of the following invocations are exactly the same: list(shlex.shlex('a ; b', posix=True, punctuation_chars=True)) list(shlex.shlex('a \; b', posix=True, punctuation_chars=True)) They both output the following: ['a', ';', 'b'] This makes it impossible to determine when the user wanted to escape the semi-colon for some reason, such as if they were using find's `-exec` argument. ---------- components: Library (Lib) messages: 342276 nosy: Matthew Gamble priority: normal severity: normal status: open title: shlex doesn't differentiate escaped characters in output type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 21:34:56 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 13 May 2019 01:34:56 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557711296.43.0.901743074832.issue36895@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset e2500610c62673f42371b54fb0e4de83e4b33146 by Gregory P. Smith (Matthias Bussonnier) in branch 'master': bpo-36895: remove time.clock() as per removal notice. (GH-13270) https://github.com/python/cpython/commit/e2500610c62673f42371b54fb0e4de83e4b33146 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 21:36:24 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 13 May 2019 01:36:24 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557711384.28.0.0494468033404.issue36895@roundup.psfhosted.org> Gregory P. Smith added the comment: I saw the PR before the bug comment. merged. if we find a _good_ reason to delay this removal a cycle during the 3.8 betas we can bring it back. thanks for staying on top of the removal plan! ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 22:18:54 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 13 May 2019 02:18:54 +0000 Subject: [issue36728] Remove PyEval_ReInitThreads() from the public C API In-Reply-To: <1556234529.34.0.747871379917.issue36728@roundup.psfhosted.org> Message-ID: <1557713934.71.0.721800025278.issue36728@roundup.psfhosted.org> Gregory P. Smith added the comment: fwiw - i agree that this can be removed. it has no reason to ever be called directly. i double checked in our massive internal codebase at work and found no calls other than python interpreters themselves. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 22:19:38 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 02:19:38 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1557713978.14.0.595315102906.issue22273@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 22:35:25 2019 From: report at bugs.python.org (Batuhan) Date: Mon, 13 May 2019 02:35:25 +0000 Subject: [issue22964] dbm.open(..., "x") In-Reply-To: <1417214551.97.0.349316203885.issue22964@psf.upfronthosting.co.za> Message-ID: <1557714925.73.0.719549426801.issue22964@roundup.psfhosted.org> Batuhan added the comment: Python directly passes flags to gdbm (or whatever the dbm interface is). gdbm_open((char *)file, 0, flags, mode, NULL)) # _gdbmmodule.c:76 I dont think it is good idea to wrap gdbm for just a flag. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 22:51:47 2019 From: report at bugs.python.org (Batuhan) Date: Mon, 13 May 2019 02:51:47 +0000 Subject: [issue23896] lib2to3 doesn't provide a grammar where exec is a function In-Reply-To: <1428587382.51.0.855590572872.issue23896@psf.upfronthosting.co.za> Message-ID: <1557715907.26.0.578664777375.issue23896@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +13178 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 23:14:42 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 03:14:42 +0000 Subject: [issue32832] doctest should support custom ps1/ps2 prompts In-Reply-To: <1518443379.42.0.467229070634.issue32832@psf.upfronthosting.co.za> Message-ID: <1557717282.9.0.169242008524.issue32832@roundup.psfhosted.org> Cheryl Sabella added the comment: Thank you for the suggestion, but per the discussion with Tim, I am closing as rejected. ---------- nosy: +cheryl.sabella resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 23:16:00 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 13 May 2019 03:16:00 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557717360.48.0.549378092282.issue36895@roundup.psfhosted.org> Matthias Bussonnier added the comment: > If we find a _good_ reason to delay this removal a cycle during the 3.8 betas we can bring it back. > thanks for staying on top of the removal plan! Thanks to you for the quick integration; I'm happy if we need to bring it back, but at least having it removed during betas/alphas will nudge people toward updating their code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 23:47:38 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 03:47:38 +0000 Subject: [issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability In-Reply-To: <1542119446.33.0.788709270274.issue35232@psf.upfronthosting.co.za> Message-ID: <1557719258.63.0.174573255629.issue35232@roundup.psfhosted.org> Cheryl Sabella added the comment: @eric.smith Can you take a look at this when you get a chance? Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 12 23:55:23 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 03:55:23 +0000 Subject: [issue13474] Mention of "-m" Flag Missing From Doc on Execution Model In-Reply-To: <1322165458.97.0.989343856998.issue13474@psf.upfronthosting.co.za> Message-ID: <1557719723.46.0.436028551272.issue13474@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 01:33:52 2019 From: report at bugs.python.org (Antony Lee) Date: Mon, 13 May 2019 05:33:52 +0000 Subject: [issue22964] dbm.open(..., "x") In-Reply-To: <1417214551.97.0.349316203885.issue22964@psf.upfronthosting.co.za> Message-ID: <1557725632.66.0.962340627.issue22964@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 03:17:56 2019 From: report at bugs.python.org (Chuang Men) Date: Mon, 13 May 2019 07:17:56 +0000 Subject: [issue36898] Add parameter @case_sensitive to glob and rglob in pathlib Message-ID: <1557731876.23.0.465761944937.issue36898@roundup.psfhosted.org> New submission from Chuang Men : In pathlib, I add a parameter @case_sensitive to glob and rglob. Sometimes the extension would be in upper case but sometimes it would be lower case, for example: *.tif and *.TIF. So the parameter @case_sensitive may be useful in some cases. Usage example: In [1]: from pathlib import Path In [2]: path = Path('.') In [3]: for each_file in path.glob('*.tif'): ...: print(each_file) ...: a.tif b.tif In [4]: for each_file in path.rglob('*.TIF'): ...: print(each_file) ...: c.TIF TEST/d.TIF In [5]: for each_file in path.glob('*.TIF', case_sensitive=False): ...: print(each_file) ...: a.tif c.TIF b.tif In [6]: for each_file in path.rglob('*.TIF', case_sensitive=False): ...: print(each_file) ...: a.tif c.TIF b.tif TEST/d.TIF TEST/e.tif ---------- components: Library (Lib) files: pathlib.py messages: 342284 nosy: Chuang Men priority: normal severity: normal status: open title: Add parameter @case_sensitive to glob and rglob in pathlib type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file48328/pathlib.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 03:21:47 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 13 May 2019 07:21:47 +0000 Subject: [issue36898] Add parameter @case_sensitive to glob and rglob in pathlib In-Reply-To: <1557731876.23.0.465761944937.issue36898@roundup.psfhosted.org> Message-ID: <1557732107.02.0.150836033571.issue36898@roundup.psfhosted.org> Change by SilentGhost : ---------- pull_requests: +13179 stage: -> patch review versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 03:23:43 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 13 May 2019 07:23:43 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557732223.27.0.84406899836.issue36783@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset d28772ab6967fea136c0707f0207673ebad66f61 by St?phane Wirtel (Edison A) in branch 'master': bpo-36783: Add new references for C API Documentation changes (GH-13204) https://github.com/python/cpython/commit/d28772ab6967fea136c0707f0207673ebad66f61 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 03:25:25 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 13 May 2019 07:25:25 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557732325.51.0.599665371637.issue36783@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your PR. @Cherryl, the PR 13204 was not merged and the issue was closed :/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 03:35:59 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 May 2019 07:35:59 +0000 Subject: [issue36898] Add parameter @case_sensitive to glob and rglob in pathlib In-Reply-To: <1557731876.23.0.465761944937.issue36898@roundup.psfhosted.org> Message-ID: <1557732959.47.0.174642658478.issue36898@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can use the pattern '*.[Tt][Ii][Ff]'. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 03:51:01 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 May 2019 07:51:01 +0000 Subject: [issue6584] gzip module has no custom exception In-Reply-To: <1248675050.27.0.747048824781.issue6584@psf.upfronthosting.co.za> Message-ID: <1557733861.76.0.271946303062.issue6584@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset cf599f6f6f1c392d8f12936982a370d533782195 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-6584: Add a BadGzipFile exception to the gzip module. (GH-13022) https://github.com/python/cpython/commit/cf599f6f6f1c392d8f12936982a370d533782195 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 03:53:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 May 2019 07:53:07 +0000 Subject: [issue6584] gzip module has no custom exception In-Reply-To: <1248675050.27.0.747048824781.issue6584@psf.upfronthosting.co.za> Message-ID: <1557733987.84.0.298033843563.issue6584@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 03:58:11 2019 From: report at bugs.python.org (Chuang Men) Date: Mon, 13 May 2019 07:58:11 +0000 Subject: [issue36898] Add parameter @case_sensitive to glob and rglob in pathlib In-Reply-To: <1557731876.23.0.465761944937.issue36898@roundup.psfhosted.org> Message-ID: <1557734291.85.0.213509092332.issue36898@roundup.psfhosted.org> Chuang Men added the comment: It is a good solution but when pattern is long, it might be a little inconvenient. Anyway, just an advice. Thank you for your reply! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 04:42:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 08:42:36 +0000 Subject: [issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 In-Reply-To: <1556829985.34.0.069265948139.issue36778@roundup.psfhosted.org> Message-ID: <1557736956.84.0.265773248166.issue36778@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3aef48e3157f52a8bcdbacf47a35d0016348735e by Victor Stinner in branch 'master': bpo-36778: Update cp65001 codec documentation (GH-13240) https://github.com/python/cpython/commit/3aef48e3157f52a8bcdbacf47a35d0016348735e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:07:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 09:07:38 +0000 Subject: [issue36728] Remove PyEval_ReInitThreads() from the public C API In-Reply-To: <1556234529.34.0.747871379917.issue36728@roundup.psfhosted.org> Message-ID: <1557738458.85.0.551058151678.issue36728@roundup.psfhosted.org> STINNER Victor added the comment: > i double checked in our massive internal codebase at work and found no calls other than python interpreters themselves. Thanks. It confirms what I understood using GitHub code search (see my initial message). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:13:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 09:13:20 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1557738800.81.0.220714109622.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: I dislike adding a function which always return 0 when the feature is not supported: unsigned long PyThread_get_thread_native_id(void) { ... #if ... ... #else unsigned long native_id; native_id = 0; #endif return (unsigned long) native_id; } I would prefer to not define the function if it's not available, so the attribute would be missing. With the commited change, how can I know if native thread identifier is supported or not? ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:17:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 09:17:18 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1557739038.03.0.995322564008.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: > """Native integral thread ID of this thread or 0 if it has not been started. (...) Why not set the attribute to None before a thread starts? It would be more consistent with the the "ident" attribute behavior, no? Extract __repr__(): def __repr__(self): assert self._initialized, "Thread.__init__() was not called" status = "initial" if self._started.is_set(): status = "started" ... if self._ident is not None: status += " %s" % self._ident return "<%s(%s, %s)>" % (self.__class__.__name__, self._name, status) "is None" is a reliable check to decide if the attribute is set or not. With the current implementation, it's hard to guess since PyThread_get_thread_native_id() returns on some platforms... But again, I would prefer to not have the attribute if PyThread_get_thread_native_id() is not available on a platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:20:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 09:20:43 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557739243.44.0.457974189515.issue36895@roundup.psfhosted.org> STINNER Victor added the comment: I would prefer to remove time.clock() documentation if the function is removed. Would you mind to update Python 3.7 documentation to mention that the function is removed from Python 3.8? https://docs.python.org/3.7/library/time.html#time.clock In short, use ".. deprecated-removed:: 3.3 3.8 " in Python 3.7 doc. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:22:39 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 13 May 2019 09:22:39 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557739359.84.0.716831603364.issue36751@roundup.psfhosted.org> Miro Hron?ok added the comment: Just a quick idea: What if a warning happened iff positional only argument are there, but not with functions that don't use those? Might be a different kind of warning. ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:28:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 09:28:26 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557739706.91.0.648506624871.issue36751@roundup.psfhosted.org> STINNER Victor added the comment: > And no, the undeprecation wasn't because of Python 2 (Py2 doesn't have getfullargspec() - it's a Py3 only API). Python 3.8.0 is scheduled for: "3.8.0 final: Monday, 2019-10-21" Something like 2 months before 2.7 end of support: 2019-12-31. Does the "because of Python 2" still stand for Python 3.8? A deprecating warning doesn't hurt: you are still able to run your code. Moreover, deprecating warnings are ignored by default (except in the __main__ module). I don't see what is the *practical* issue of deprecating getfullargspec(). getfullargspec() has to die sometimes, it's good to warn users, no :-) Or is the *long term plan* to keep getfullargspec() forever? -- I basically have no opinion on these questions. I'm more curious about the long term plan ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:29:19 2019 From: report at bugs.python.org (Piotr Kamoda) Date: Mon, 13 May 2019 09:29:19 +0000 Subject: [issue36899] datetime utcfromtimestamp ignores astimezone Message-ID: <1557739759.84.0.347644793793.issue36899@roundup.psfhosted.org> New submission from Piotr Kamoda : See below code: >>> datetime.utcfromtimestamp(1557395250).astimezone(get_localzone()).strftime('%Y-%m-%d %H:%M:%S %z %Z') '2019-05-09 09:47:30 +0200 CEST' >>> datetime.fromtimestamp(1557395250).astimezone(get_localzone()).strftime('%Y-%m-%d %H:%M:%S %z %Z') '2019-05-09 11:47:30 +0200 CEST' As you can see, utcfromtimestamp refuses to be 'timezoned', second one is correct. ---------- messages: 342297 nosy: Piotr Kamoda priority: normal severity: normal status: open title: datetime utcfromtimestamp ignores astimezone versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:32:33 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 13 May 2019 09:32:33 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557739953.68.0.846770129631.issue36895@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Should this section also be updated about time.clock removal? https://docs.python.org/3.8/whatsnew/3.8.html#api-and-feature-removals ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:32:50 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 13 May 2019 09:32:50 +0000 Subject: [issue36899] datetime utcfromtimestamp ignores astimezone In-Reply-To: <1557739759.84.0.347644793793.issue36899@roundup.psfhosted.org> Message-ID: <1557739970.71.0.893342796812.issue36899@roundup.psfhosted.org> SilentGhost added the comment: The utcfromtimestamp returns a na?ve object that is assumed to be in the UTC timezone, you're then effectively turning it into a aware object in CEST timezone. I'm not sure what you think is wrong with utcfromtimestamp here, but it behaves according to documentation. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:35:18 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 13 May 2019 09:35:18 +0000 Subject: [issue36899] datetime utcfromtimestamp ignores astimezone In-Reply-To: <1557739759.84.0.347644793793.issue36899@roundup.psfhosted.org> Message-ID: <1557740118.57.0.0336593342463.issue36899@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:44:46 2019 From: report at bugs.python.org (Piotr Kamoda) Date: Mon, 13 May 2019 09:44:46 +0000 Subject: [issue36899] datetime utcfromtimestamp ignores astimezone In-Reply-To: <1557739759.84.0.347644793793.issue36899@roundup.psfhosted.org> Message-ID: <1557740686.16.0.0247376991028.issue36899@roundup.psfhosted.org> Piotr Kamoda added the comment: Docs state that fromtimestamp returns a naive datetime object (https://docs.python.org/3.7/library/datetime.html#datetime.datetime.fromtimestamp) and not utcfromtimestamp. Perhaps it needs fixing. Additionally, astimezone fails silently, I even tried >>> datetime.utcfromtimestamp(1557395250).astimezone(pytz.utc).astimezone(get_localzone()).strftime('%Y-%m-%d %H:%M:%S %z %Z') '2019-05-09 09:47:30 +0200 CEST' Which looks weird, but why it ignores that function silently is also weird. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:52:34 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 13 May 2019 09:52:34 +0000 Subject: [issue36899] datetime utcfromtimestamp ignores astimezone In-Reply-To: <1557739759.84.0.347644793793.issue36899@roundup.psfhosted.org> Message-ID: <1557741154.95.0.562415520528.issue36899@roundup.psfhosted.org> SilentGhost added the comment: In the same page about utcfromtimestamp https://docs.python.org/3.7/library/datetime.html#datetime.datetime.utcfromtimestamp it says: > with tzinfo None Also below, "To get an aware datetime object". All this means or implies na?ve object. I've no idea what you mean by "fails silently". In what way does astimezone fail silently. You have your na?ve object, then you convert it aware object, then to a different timezone. What is the problem here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 05:58:26 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 13 May 2019 09:58:26 +0000 Subject: [issue36891] Additional startup plugin for vendors In-Reply-To: <1557603168.21.0.544720725277.issue36891@roundup.psfhosted.org> Message-ID: <1557741506.2.0.404900497451.issue36891@roundup.psfhosted.org> Inada Naoki added the comment: Why is sitevendor required in addition to sitecustomize? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 06:01:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 10:01:50 +0000 Subject: [issue36891] Additional startup plugin for vendors In-Reply-To: <1557603168.21.0.544720725277.issue36891@roundup.psfhosted.org> Message-ID: <1557741710.85.0.890553080248.issue36891@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 06:07:26 2019 From: report at bugs.python.org (Piotr Kamoda) Date: Mon, 13 May 2019 10:07:26 +0000 Subject: [issue36899] datetime utcfromtimestamp ignores astimezone In-Reply-To: <1557739759.84.0.347644793793.issue36899@roundup.psfhosted.org> Message-ID: <1557742046.94.0.470142328622.issue36899@roundup.psfhosted.org> Piotr Kamoda added the comment: Ok, now I see that naive object assumes my timezone in some cases. That's still mind-boggling that utcfromtimestamp returns an object that shows utc hour but when astimezone is applied it reverts without converting the hour to local timezone. See below as explanation: >>> datetime.utcfromtimestamp(1557395250).astimezone(pytz.utc).strftime('%Y-%m-%d %H:%M:%S %z %Z') '2019-05-09 07:47:30 +0000 UTC' >>> datetime.utcfromtimestamp(1557395250).astimezone(get_localzone()).strftime('%Y-%m-%d %H:%M:%S %z %Z') '2019-05-09 09:47:30 +0200 CEST' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 06:17:21 2019 From: report at bugs.python.org (dgelessus) Date: Mon, 13 May 2019 10:17:21 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1557742641.11.0.102252426783.issue36880@roundup.psfhosted.org> dgelessus added the comment: Thank you for looking into this! I can confirm that Eryk Sun's change fixes the issue for me locally. I'm up for making the patch for this. Regarding tests, I see there are already some refcount-related ctypes tests in Lib/ctypes/test/test_refcounts.py - should I add another test case there that reproduces this situation and ensures that None's refcount is unaffected? (I imagine testing against None's refcount will be a bit fragile, so it might be best to call the previously-buggy function in a loop and check afterwards that None's refcount hasn't changed significantly.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 06:21:22 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 13 May 2019 10:21:22 +0000 Subject: [issue36899] datetime utcfromtimestamp ignores astimezone In-Reply-To: <1557739759.84.0.347644793793.issue36899@roundup.psfhosted.org> Message-ID: <1557742882.53.0.159973403814.issue36899@roundup.psfhosted.org> SilentGhost added the comment: Na?ve object does not assume anything, na?ve object *lacks* timezone information. It cannot convert anything. It is a mistake to set a wrong timezone to a na?ve object, a mistake that you're making. Piotr, this is a bug tracker for development of CPython, let's not turn it into support forum, there are many of those on the internet. I will not respond any further and I hope you're satisfied that this is not an issue in datetime module as distributed with standard library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 06:35:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 10:35:42 +0000 Subject: [issue36728] Remove PyEval_ReInitThreads() from the public C API In-Reply-To: <1556234529.34.0.747871379917.issue36728@roundup.psfhosted.org> Message-ID: <1557743742.41.0.708791554934.issue36728@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d5d9e81ce9a7efc5bc14a5c21398d1ef6f626884 by Victor Stinner in branch 'master': bpo-36728: Remove PyEval_ReInitThreads() from C API (GH-13241) https://github.com/python/cpython/commit/d5d9e81ce9a7efc5bc14a5c21398d1ef6f626884 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 06:35:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 10:35:55 +0000 Subject: [issue36728] Remove PyEval_ReInitThreads() from the public C API In-Reply-To: <1556234529.34.0.747871379917.issue36728@roundup.psfhosted.org> Message-ID: <1557743755.88.0.686160323202.issue36728@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 06:40:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 10:40:35 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1557744035.89.0.311288640699.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 06:42:26 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 13 May 2019 10:42:26 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557744146.44.0.543055742677.issue36867@roundup.psfhosted.org> Pierre Glaser added the comment: Yes, one test I wrote in an unrelated commit does not unlink a memory segment. Now the ResourceTracker complains. Fixing it now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 06:47:13 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 13 May 2019 10:47:13 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557744433.0.0.690762720297.issue36867@roundup.psfhosted.org> Pierre Glaser added the comment: Actually, I was properly unlinking the shared_memory segments. The warning messages are due to bad interactions between the ResourceTracker and the SharedMemoryManager object. In this particular case, it's easy to change a little bit the problematic test to avoid the warnings. I will focus on solving those bad interactions right after. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 06:58:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 10:58:46 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557745126.08.0.293259897459.issue36867@roundup.psfhosted.org> STINNER Victor added the comment: test_shared_memory_cleaned_after_process_termination() uses time as a weak synchronization primitive: # killing abruptly processes holding reference to a shared memory # segment should not leak the given memory segment. p.terminate() p.wait() time.sleep(1.0) # wait for the OS to collect the segment with self.assertRaises(FileNotFoundError): smm = shared_memory.SharedMemory(name, create=False) Would it be possible to use a more reliable synchronization? Such test usually fail randomly. https://pythondev.readthedocs.io/unstable_tests.html ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 07:07:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 11:07:28 +0000 Subject: [issue36900] Use _PyCoreConfig rather than global configuration variables Message-ID: <1557745648.65.0.648187833126.issue36900@roundup.psfhosted.org> New submission from STINNER Victor : PyInterpreterState.config is now preferred over global configuration variables, so two interpreters can have a different configuration, the "state" of an interpreter is now better defined (especially when and how its configuration is set). Attached PRs fix these isssues. ---------- components: Interpreter Core messages: 342310 nosy: vstinner priority: normal severity: normal status: open title: Use _PyCoreConfig rather than global configuration variables versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 07:27:10 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 13 May 2019 11:27:10 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557746830.98.0.158004618731.issue36867@roundup.psfhosted.org> Change by Pierre Glaser : ---------- pull_requests: +13182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 07:57:47 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 11:57:47 +0000 Subject: [issue36901] Fix leaks in /PC/bdist_wininst/install.c Message-ID: <1557748667.87.0.123726768405.issue36901@roundup.psfhosted.org> New submission from Cheryl Sabella : /PC/bdist_wininst/install.c contains some memory leaks. PR2142 appears to be abandoned, so a new PR needs to be opened with the changes and also with the additional changes requested by Serhiy. ---------- components: Installation messages: 342311 nosy: cheryl.sabella, serhiy.storchaka, vstinner priority: normal severity: normal stage: needs patch status: open title: Fix leaks in /PC/bdist_wininst/install.c type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 07:58:35 2019 From: report at bugs.python.org (Tiago Filipe Silva) Date: Mon, 13 May 2019 11:58:35 +0000 Subject: [issue36901] Fix leaks in /PC/bdist_wininst/install.c In-Reply-To: <1557748667.87.0.123726768405.issue36901@roundup.psfhosted.org> Message-ID: <1557748715.79.0.789693756058.issue36901@roundup.psfhosted.org> Change by Tiago Filipe Silva : ---------- keywords: +patch pull_requests: +13183 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:29:42 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 12:29:42 +0000 Subject: [issue36008] [good first issue] Update documentation for 3.8 In-Reply-To: <1550278435.56.0.94881175235.issue36008@roundup.psfhosted.org> Message-ID: <1557750582.86.0.443827799248.issue36008@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 3e2afd78babe5bd270e7f3b9df8796eeabc79865 by Cheryl Sabella (Utkarsh Gupta) in branch 'master': bpo-36008: Doc update for 3.8 migration (GH-12887) https://github.com/python/cpython/commit/3e2afd78babe5bd270e7f3b9df8796eeabc79865 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:31:08 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 12:31:08 +0000 Subject: [issue36008] [good first issue] Update documentation for 3.8 In-Reply-To: <1550278435.56.0.94881175235.issue36008@roundup.psfhosted.org> Message-ID: <1557750668.48.0.0483982904921.issue36008@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:31:33 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 May 2019 12:31:33 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557750693.36.0.695962329462.issue36807@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4f098b35f58e911639f8e9adc393d5cf5c792e7f by Terry Jan Reedy (Guido van Rossum) in branch 'master': bpo-36807: When saving a file in IDLE, call flush and fsync (#13102) https://github.com/python/cpython/commit/4f098b35f58e911639f8e9adc393d5cf5c792e7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:34:59 2019 From: report at bugs.python.org (rudragavara) Date: Mon, 13 May 2019 12:34:59 +0000 Subject: [issue36902] Wireless Network Engineer Message-ID: <1557750899.2.0.375808424646.issue36902@roundup.psfhosted.org> New submission from rudragavara : A Wireless Network Engineer is responsible for installing, configuring and maintaining wireless network equipment, network management and security including 802.11 b/g/n/ac standards and industry best practices for implementing high-density WIFI solutions. Moreover, to put it concisely, this person needs to assess, plan and develop for several operations capabilities for wireless telecommunications. As more companies continue to embrace Wireless LAN, the demand for wireless network engineers has grown manifold in the recent past. The proliferation of mobile applications, which require testing in a wireless environment, is also one of the other reasons why enterprises need their services more, currently. Read More; https://www.fieldengineer.com/engineers/field-engineer-jobs ---------- messages: 342314 nosy: rudragavara priority: normal severity: normal status: open title: Wireless Network Engineer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:39:13 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 13 May 2019 12:39:13 +0000 Subject: [issue36902] spam In-Reply-To: <1557750899.2.0.375808424646.issue36902@roundup.psfhosted.org> Message-ID: <1557751153.11.0.0644375146032.issue36902@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: -rudragavara title: Wireless Network Engineer -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:39:31 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 13 May 2019 12:39:31 +0000 Subject: [issue36902] spam In-Reply-To: <1557750899.2.0.375808424646.issue36902@roundup.psfhosted.org> Message-ID: <1557751171.06.0.245313789693.issue36902@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:39:49 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 13 May 2019 12:39:49 +0000 Subject: [issue36902] spam Message-ID: <1557751189.36.0.776592549949.issue36902@roundup.psfhosted.org> Change by SilentGhost : ---------- Removed message: https://bugs.python.org/msg342314 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:41:35 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 12:41:35 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1557751295.78.0.613437620838.issue34424@roundup.psfhosted.org> Cheryl Sabella added the comment: This looks like it was just pending final approval after changes. Please let me know if I can help move it along. Thanks! ---------- nosy: +cheryl.sabella versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:44:10 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 13 May 2019 12:44:10 +0000 Subject: [issue10991] trace fails when test imported a temporary file In-Reply-To: <1295825472.67.0.685273364418.issue10991@psf.upfronthosting.co.za> Message-ID: <1557751450.25.0.814699646599.issue10991@roundup.psfhosted.org> SilentGhost added the comment: Brett, is this something that is still relevant for the supported versions or are you OK with closing this issue as out of date or wont fix? ---------- nosy: +SilentGhost, brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:45:45 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 12:45:45 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1557751545.88.0.612677570347.issue22021@roundup.psfhosted.org> Cheryl Sabella added the comment: @giampaolo.rodola, would you be able to provide a review of this doc change? Thanks! ---------- nosy: +cheryl.sabella, giampaolo.rodola versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:49:19 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 13 May 2019 12:49:19 +0000 Subject: [issue36008] [good first issue] Update documentation for 3.8 In-Reply-To: <1550278435.56.0.94881175235.issue36008@roundup.psfhosted.org> Message-ID: <1557751759.64.0.203407755465.issue36008@roundup.psfhosted.org> St?phane Wirtel added the comment: @Cheryl, I was reading the last commits on master and I have seen the merge of that PR, but 3.8.0 is not yet in Beta2. Maybe we should fix that in an other PR for the same issue. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:50:35 2019 From: report at bugs.python.org (Olivier Grisel) Date: Mon, 13 May 2019 12:50:35 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557751835.55.0.780755595425.issue36867@roundup.psfhosted.org> Olivier Grisel added the comment: As Victor said, the `time.sleep(1.0)` might lead to Heisen failures. I am not sure how to write proper strong synchronization in this case but we could instead go for something intermediate such as the following pattern: ... p.terminate() p.wait() for i in range(60): try: shared_memory.SharedMemory(name, create=False) except FileNotFoundError: # the OS successfully collected the segment as expected break time.sleep(1.0) # wait for the OS to collect the segment else: raise AssertionError(f"Failed to collect shared_memory segment {name}") What do you think? ---------- nosy: +Olivier.Grisel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:53:45 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 13 May 2019 12:53:45 +0000 Subject: [issue36008] [good first issue] Update documentation for 3.8 In-Reply-To: <1550278435.56.0.94881175235.issue36008@roundup.psfhosted.org> Message-ID: <1557752025.62.0.0899153825348.issue36008@roundup.psfhosted.org> St?phane Wirtel added the comment: I suggest to remove b2+ and just keep 3.8.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:54:01 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 13 May 2019 12:54:01 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557752041.73.0.395720237947.issue36867@roundup.psfhosted.org> Pierre Glaser added the comment: We can do that, or maybe we can try to wait on the `resource_tracker's` pid? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:55:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 12:55:21 +0000 Subject: [issue36900] Use _PyCoreConfig rather than global configuration variables In-Reply-To: <1557745648.65.0.648187833126.issue36900@roundup.psfhosted.org> Message-ID: <1557752121.87.0.658820286901.issue36900@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13184 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:57:06 2019 From: report at bugs.python.org (Utkarsh Gupta) Date: Mon, 13 May 2019 12:57:06 +0000 Subject: [issue36008] [good first issue] Update documentation for 3.8 In-Reply-To: <1550278435.56.0.94881175235.issue36008@roundup.psfhosted.org> Message-ID: <1557752226.15.0.904446858377.issue36008@roundup.psfhosted.org> Utkarsh Gupta added the comment: Sure, but ultimately (soon enough) it is going to happen, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 08:59:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 12:59:28 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1557752368.18.0.571511492375.issue35907@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Unnecessary URL scheme exists to allow file:// reading file in urllib -> [security][CVE-2019-9948] Unnecessary URL scheme exists to allow file:// reading file in urllib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:00:12 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 13:00:12 +0000 Subject: [issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior In-Reply-To: <1547321617.14.0.566390882886.issue35727@roundup.psfhosted.org> Message-ID: <1557752412.04.0.819957593959.issue35727@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +davin versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:03:13 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 13 May 2019 13:03:13 +0000 Subject: [issue33882] doc Mention breakpoint() in debugger-related FAQ In-Reply-To: <1529192953.25.0.56676864532.issue33882@psf.upfronthosting.co.za> Message-ID: <1557752593.35.0.338266272814.issue33882@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset af5ef3e1077bc2ed177a7c8598f8ecc756ecf6f9 by St?phane Wirtel (Miss Islington (bot)) in branch '3.7': bpo-33882: mention breakpoint() in debugger-related FAQ (GH-7759) (GH-13077) https://github.com/python/cpython/commit/af5ef3e1077bc2ed177a7c8598f8ecc756ecf6f9 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:04:47 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 13 May 2019 13:04:47 +0000 Subject: [issue33882] doc Mention breakpoint() in debugger-related FAQ In-Reply-To: <1529192953.25.0.56676864532.issue33882@psf.upfronthosting.co.za> Message-ID: <1557752687.45.0.144410373796.issue33882@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your PR, ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:05:22 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 13 May 2019 13:05:22 +0000 Subject: [issue34682] Typo reports on docs@ In-Reply-To: <1536943787.72.0.956365154283.issue34682@psf.upfronthosting.co.za> Message-ID: <1557752722.93.0.513899391433.issue34682@roundup.psfhosted.org> miss-islington added the comment: New changeset 778a9107586e29421af3a08209cf0b557c1fe5bc by Miss Islington (bot) (divyag9) in branch 'master': bpo-34682: Wording and grammatical changes to the doc(https://docs.python.org/3) (GH-13120) https://github.com/python/cpython/commit/778a9107586e29421af3a08209cf0b557c1fe5bc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:05:31 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 13 May 2019 13:05:31 +0000 Subject: [issue34682] Typo reports on docs@ In-Reply-To: <1536943787.72.0.956365154283.issue34682@psf.upfronthosting.co.za> Message-ID: <1557752731.0.0.55873777717.issue34682@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13185 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:07:22 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 13 May 2019 13:07:22 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557752842.88.0.629228345648.issue36807@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:09:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 13:09:26 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557752966.56.0.444241882542.issue36867@roundup.psfhosted.org> STINNER Victor added the comment: I like Olivier's pattern. Maybe we can slowly increase the sleep to stop shortly if the resource goes away shortly. deadline = time.monotonic() + 60.0 sleep = 0.010 while ...: if ....: break if time.monotonic() > deadline: ... assert error ... sleep = min(sleep * 2, 5.0) time.sleep(1.0) It's kind of a common pattern. Maybe it should be an helper in test.support module. > We can do that, or maybe we can try to wait on the `resource_tracker's` pid? I prefer to make sure that the resource goes away without inspecting multiprocessing internals. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:17:53 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 13 May 2019 13:17:53 +0000 Subject: [issue34682] Typo reports on docs@ In-Reply-To: <1536943787.72.0.956365154283.issue34682@psf.upfronthosting.co.za> Message-ID: <1557753473.25.0.798245290185.issue34682@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: +13187 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:38:24 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 13 May 2019 13:38:24 +0000 Subject: [issue36890] python-3.7.3-macosx10.6.pkg verification error on macOS 10.6 Snow Leopard In-Reply-To: <1557598786.16.0.639636022435.issue36890@roundup.psfhosted.org> Message-ID: <1557754704.82.0.432115850798.issue36890@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi, In fact, there is another question, MacOS X Snow Leopard is not supported since 2014, do we need to continue to generate the package for this version? https://en.wikipedia.org/wiki/Mac_OS_X_Snow_Leopard ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:48:55 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 13 May 2019 13:48:55 +0000 Subject: [issue34682] Typo reports on docs@ In-Reply-To: <1536943787.72.0.956365154283.issue34682@psf.upfronthosting.co.za> Message-ID: <1557755335.96.0.65499820242.issue34682@roundup.psfhosted.org> Julien Palard added the comment: New changeset 074d7c44a474680122ed869bb6be89c1f4f18f12 by Julien Palard (St?phane Wirtel) in branch '3.7': [3.7] bpo-34682: Wording and grammatical changes to the doc(https://docs.python.org/3) (GH-13120) (GH-13281) https://github.com/python/cpython/commit/074d7c44a474680122ed869bb6be89c1f4f18f12 ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:49:24 2019 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 13 May 2019 13:49:24 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1557755364.24.0.558085027552.issue36783@roundup.psfhosted.org> Paul Ganssle added the comment: @St?phane The reason this issue was closed before PR 13204 was merged is that PR 13147 was merged a bit prematurely due to a miscommunication, which is why Cheryl closed the issue. I was going to re-open it after we realized what happened, but since we were at sprints and I knew 13204 was coming soon, I didn't bother. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:51:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 13:51:31 +0000 Subject: [issue36725] Reference leak regression with Python3.8a3 In-Reply-To: <1556224107.78.0.397981137362.issue36725@roundup.psfhosted.org> Message-ID: <1557755491.17.0.185307540253.issue36725@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13188 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:55:54 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 13 May 2019 13:55:54 +0000 Subject: [issue36903] ResourceWarning in test_logging.HandlerTest.test_post_fork_child_no_deadlock Message-ID: <1557755754.69.0.913565279245.issue36903@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : There was a test added with 64aa6d2000665efb1a2eccae176df9520bf5f5e6. It opens a stream of '/dev/null' in the test and doesn't close it causing ResourceWarning. A fix would be to assign it to a variable and close it as part of test's cleanup process. I will raise a PR for this. ./python.exe -m unittest test.test_logging.HandlerTest.test_post_fork_child_no_deadlock /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_logging.py:142: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='wt' encoding='UTF-8'> loggerDict.clear() ResourceWarning: Enable tracemalloc to get the object allocation traceback . ---------------------------------------------------------------------- Ran 1 test in 0.606s OK ---------- components: Tests messages: 342330 nosy: gregory.p.smith, xtreak priority: normal severity: normal status: open title: ResourceWarning in test_logging.HandlerTest.test_post_fork_child_no_deadlock type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:57:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 13:57:06 +0000 Subject: [issue36903] ResourceWarning in test_logging.HandlerTest.test_post_fork_child_no_deadlock In-Reply-To: <1557755754.69.0.913565279245.issue36903@roundup.psfhosted.org> Message-ID: <1557755826.0.0.0622815923613.issue36903@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:57:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 13:57:14 +0000 Subject: [issue36728] Remove PyEval_ReInitThreads() from the public C API In-Reply-To: <1556234529.34.0.747871379917.issue36728@roundup.psfhosted.org> Message-ID: <1557755834.59.0.600842973384.issue36728@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13189 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:58:17 2019 From: report at bugs.python.org (S. J. Cunningham) Date: Mon, 13 May 2019 13:58:17 +0000 Subject: [issue36890] python-3.7.3-macosx10.6.pkg verification error on macOS 10.6 Snow Leopard In-Reply-To: <1557598786.16.0.639636022435.issue36890@roundup.psfhosted.org> Message-ID: <1557755897.72.0.344737082206.issue36890@roundup.psfhosted.org> S. J. Cunningham added the comment: Apple's decision to support or not support their products is driven by Apple's business considerations and is not binding on anyone else. Many people continue to use earlier versions because of dependence on applications which do not run on later versions and/or because later versions do not offer sufficient benefits to justify the cost of upgrading. I don't know on what basis the Python organization makes these decisions but I hope it is more than simply following Apple's decisions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:58:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 13:58:59 +0000 Subject: [issue36725] Reference leak regression with Python3.8a3 In-Reply-To: <1556224107.78.0.397981137362.issue36725@roundup.psfhosted.org> Message-ID: <1557755939.56.0.699314762076.issue36725@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13188 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:59:05 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 13 May 2019 13:59:05 +0000 Subject: [issue36903] ResourceWarning in test_logging.HandlerTest.test_post_fork_child_no_deadlock In-Reply-To: <1557755754.69.0.913565279245.issue36903@roundup.psfhosted.org> Message-ID: <1557755945.96.0.0384609863697.issue36903@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13190 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 09:59:29 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 13 May 2019 13:59:29 +0000 Subject: [issue36890] python-3.7.3-macosx10.6.pkg verification error on macOS 10.6 Snow Leopard In-Reply-To: <1557598786.16.0.639636022435.issue36890@roundup.psfhosted.org> Message-ID: <1557755969.17.0.495444394529.issue36890@roundup.psfhosted.org> Ronald Oussoren added the comment: We generally don't drop support for OS versions in patch releases for Python. The 3.8 installer will require macOS 10.9, as does the default x86-64 installer for 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 10:13:57 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 13 May 2019 14:13:57 +0000 Subject: [issue36725] Reference leak regression with Python3.8a3 In-Reply-To: <1556224107.78.0.397981137362.issue36725@roundup.psfhosted.org> Message-ID: <1557756837.58.0.299081855326.issue36725@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- assignee: nanjekyejoannah -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 10:22:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 14:22:56 +0000 Subject: [issue36728] Remove PyEval_ReInitThreads() from the public C API In-Reply-To: <1556234529.34.0.747871379917.issue36728@roundup.psfhosted.org> Message-ID: <1557757376.79.0.681633385103.issue36728@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c1f7262f7013074613805347db2276f8b5e0e3a4 by Victor Stinner in branch 'master': bpo-36728: Remove PyEval_ReInitThreads documentation (GH-13282) https://github.com/python/cpython/commit/c1f7262f7013074613805347db2276f8b5e0e3a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 10:38:48 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 13 May 2019 14:38:48 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557758328.63.0.908899129209.issue36807@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +13191 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 10:47:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 14:47:47 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1557758867.72.0.556742965405.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: Christian: > I agree, this looks like an implementation artefact. urllib should not expose the local_file schema. In Python 3 refuses local_file:// (tested with 3.4 to 3.7). I'm not sure that I understand well the issue. urllib accepts various scheme by design: HTTP, HTTPS, FTP, FILE, etc. For example, file:// scheme is legit and works as expected. Python 3 example: --- import urllib.request req = urllib.request.Request('file:///etc/passwd') print(f"URL scheme: {req.type}") fp = urllib.request.urlopen(req) print(fp.read()[:30]) fp.close() --- Output with Python 3: --- URL scheme: file b'root:x:0:0:root:/root:/bin/bas' --- I get a similar output with this Python 2 example: --- import urllib req = urllib.urlopen('file:///etc/passwd') print(req.read()[:30]) req.close() --- Christian: > I agree, this looks like an implementation artefact. urllib should not expose the local_file schema. I understand that Python 2 handles local_file://url as file://url. Ok. But is this a security issue? If you care of security, you ensure that the url scheme is HTTP or HTTPS, not only forbid FILE, no? I'm asking because of: Karthikeyan Singaravelan: > This issue seems to have been assigned CVE-2019-9948 (https://nvd.nist.gov/vuln/detail/CVE-2019-9948) ... ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 10:48:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 14:48:55 +0000 Subject: [issue36903] ResourceWarning in test_logging.HandlerTest.test_post_fork_child_no_deadlock In-Reply-To: <1557755754.69.0.913565279245.issue36903@roundup.psfhosted.org> Message-ID: <1557758935.52.0.42794403486.issue36903@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2c10538d11fa9be9a1a9f21605861e10ec4fa207 by Victor Stinner (Xtreak) in branch 'master': bpo-36903: Fix ResourceWarning in test_logging (GH-13283) https://github.com/python/cpython/commit/2c10538d11fa9be9a1a9f21605861e10ec4fa207 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 10:49:42 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 13 May 2019 14:49:42 +0000 Subject: [issue36903] ResourceWarning in test_logging.HandlerTest.test_post_fork_child_no_deadlock In-Reply-To: <1557755754.69.0.913565279245.issue36903@roundup.psfhosted.org> Message-ID: <1557758982.73.0.905006833046.issue36903@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13192 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 10:53:28 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 13 May 2019 14:53:28 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1557759208.84.0.84753771031.issue35907@roundup.psfhosted.org> Christian Heimes added the comment: The issue is not about whether "file://" schema or not. It's about the fact that urllib on Python 2 has two schemas that allow local file access. There is the well-known "file://" schema and there is the implementation artifact "local_file://". A careful, security-minded developer knows about the file:// schema and also knows how to block it. But the "local_file://" schema is a surprising side-effect of the implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:09:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 15:09:49 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1557760189.83.0.420463812819.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: If you use directly the URLopener class, Python 3 has a similar issue: --- import urllib.request req = urllib.request.URLopener().open('local_file:///etc/passwd') print(req.read()[:30]) req.close() --- ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:12:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 15:12:53 +0000 Subject: [issue36900] Use _PyCoreConfig rather than global configuration variables In-Reply-To: <1557745648.65.0.648187833126.issue36900@roundup.psfhosted.org> Message-ID: <1557760373.01.0.351743357083.issue36900@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 410b85a7f701be280eb15b0ca4fe116e86f1d008 by Victor Stinner in branch 'master': bpo-36900: import.c uses PyInterpreterState.core_config (GH-13278) https://github.com/python/cpython/commit/410b85a7f701be280eb15b0ca4fe116e86f1d008 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:15:56 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 13 May 2019 15:15:56 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1557760556.96.0.261065291713.issue35907@roundup.psfhosted.org> Change by Christian Heimes : ---------- title: [security][CVE-2019-9948] Unnecessary URL scheme exists to allow file:// reading file in urllib -> [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:22:54 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 13 May 2019 15:22:54 +0000 Subject: [issue36904] Implement _PyStack_UnpackDict() with a single allocation Message-ID: <1557760974.34.0.94387480475.issue36904@roundup.psfhosted.org> New submission from Jeroen Demeyer : _PyStack_UnpackDict() is used to convert from the FastCallDict calling convention to FastCallKeywords. It currently needs two allocations: one for the tuple of keyword names and one for the array of arguments (positional and keyword). This can be optimized by using a single allocation, storing everything in a single tuple. That tuple can then be artificially truncated to the required size when done. ---------- components: Library (Lib) messages: 342339 nosy: Mark.Shannon, jdemeyer, petr.viktorin, scoder priority: normal severity: normal status: open title: Implement _PyStack_UnpackDict() with a single allocation type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:23:15 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 13 May 2019 15:23:15 +0000 Subject: [issue36904] Implement _PyStack_UnpackDict() with a single allocation In-Reply-To: <1557760974.34.0.94387480475.issue36904@roundup.psfhosted.org> Message-ID: <1557760995.35.0.241564222756.issue36904@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:30:19 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 13 May 2019 15:30:19 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557761419.29.0.744109713936.issue36895@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13193 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:31:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 15:31:06 +0000 Subject: [issue36725] Reference leak regression with Python3.8a3 In-Reply-To: <1556224107.78.0.397981137362.issue36725@roundup.psfhosted.org> Message-ID: <1557761466.44.0.554469143342.issue36725@roundup.psfhosted.org> STINNER Victor added the comment: This leak has been fixed by: commit f00828a742d2e88c910bdfd00f08fcd998554ba5 (refs/bisect/bad) Author: Pablo Galindo Date: Thu May 9 16:52:02 2019 +0100 bpo-36851: Clean the frame stack if the execution ends with a return and the stack is not empty (GH-13191) ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Frame stack is not cleaned after execution is finished with return _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:31:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 15:31:20 +0000 Subject: [issue36851] Frame stack is not cleaned after execution is finished with return In-Reply-To: <1557330055.15.0.678827851719.issue36851@roundup.psfhosted.org> Message-ID: <1557761480.6.0.697183083388.issue36851@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-36725 as a duplicate of this issue. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:33:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 15:33:57 +0000 Subject: [issue32573] All sys attributes (.argv, ...) should exist in embedded environments In-Reply-To: <1516131988.33.0.467229070634.issue32573@psf.upfronthosting.co.za> Message-ID: <1557761637.19.0.577655215785.issue32573@roundup.psfhosted.org> STINNER Victor added the comment: In Python 3.8, sys.argv is now always created. It's initialized to sys.argv = [""] if (argc, argv) are not set in _PyCoreConfig. So PR 12463 looks useless to me, except if someone wants to change the behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:36:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 15:36:03 +0000 Subject: [issue32573] All sys attributes (.argv, ...) should exist in embedded environments In-Reply-To: <1516131988.33.0.467229070634.issue32573@psf.upfronthosting.co.za> Message-ID: <1557761763.33.0.959711721571.issue32573@roundup.psfhosted.org> STINNER Victor added the comment: See also the PEP 587. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:36:14 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 13 May 2019 15:36:14 +0000 Subject: [issue13286] PEP 3151 breaks backward compatibility: it should be documented In-Reply-To: <1319811530.69.0.689775391155.issue13286@psf.upfronthosting.co.za> Message-ID: <1557761774.64.0.226681434703.issue13286@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13194 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:37:22 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 13 May 2019 15:37:22 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557761842.04.0.737840364459.issue36895@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13195 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:39:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 15:39:15 +0000 Subject: [issue13286] PEP 3151 breaks backward compatibility: it should be documented In-Reply-To: <1319811530.69.0.689775391155.issue13286@psf.upfronthosting.co.za> Message-ID: <1557761955.53.0.989697964908.issue13286@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13194 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:39:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 15:39:53 +0000 Subject: [issue36903] ResourceWarning in test_logging.HandlerTest.test_post_fork_child_no_deadlock In-Reply-To: <1557755754.69.0.913565279245.issue36903@roundup.psfhosted.org> Message-ID: <1557761993.8.0.722452241545.issue36903@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 744129db5d4e7706fd7d46dfc691aa47fabd66fa by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-36903: Fix ResourceWarning in test_logging (GH-13283) (GH-13285) https://github.com/python/cpython/commit/744129db5d4e7706fd7d46dfc691aa47fabd66fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:39:58 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 13 May 2019 15:39:58 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557761998.3.0.861344206717.issue36895@roundup.psfhosted.org> Matthias Bussonnier added the comment: Done: - 1 PR against master to remove the documentation and update api-and-feature-removals - and one against 3.7 to add the deprecated-removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:42:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 15:42:25 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1557762145.82.0.210331379342.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: This change broke the AIX buildbot: https://buildbot.python.org/all/#/builders/132/builds/486 ====================================================================== FAIL: test_various_ops (test.test_threading.ThreadTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_threading.py", line 109, in test_various_ops self.assertEqual(len(native_ids), NUMTASKS + 1) AssertionError: 1 != 11 ====================================================================== FAIL: test_various_ops_large_stack (test.test_threading.ThreadTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_threading.py", line 159, in test_various_ops_large_stack self.test_various_ops() File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_threading.py", line 109, in test_various_ops self.assertEqual(len(native_ids), NUMTASKS + 1) AssertionError: 1 != 11 ====================================================================== FAIL: test_various_ops_small_stack (test.test_threading.ThreadTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_threading.py", line 147, in test_various_ops_small_stack self.test_various_ops() File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_threading.py", line 109, in test_various_ops self.assertEqual(len(native_ids), NUMTASKS + 1) AssertionError: 1 != 11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:43:45 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 13 May 2019 15:43:45 +0000 Subject: [issue36903] ResourceWarning in test_logging.HandlerTest.test_post_fork_child_no_deadlock In-Reply-To: <1557755754.69.0.913565279245.issue36903@roundup.psfhosted.org> Message-ID: <1557762225.67.0.116121118054.issue36903@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:48:50 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 13 May 2019 15:48:50 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1557762530.82.0.885234100457.issue22021@roundup.psfhosted.org> Giampaolo Rodola' added the comment: @cheryl.sabella don't have the bandwidth right now (traveling), sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:49:45 2019 From: report at bugs.python.org (Chris Angelico) Date: Mon, 13 May 2019 15:49:45 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST In-Reply-To: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> Message-ID: <1557762585.35.0.27342393593.issue32893@roundup.psfhosted.org> Change by Chris Angelico : ---------- pull_requests: +13196 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:52:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 13 May 2019 15:52:02 +0000 Subject: [issue36905] test_typing.GetTypeHintTests.test_get_type_hints_modules_forwardref unexpected success while running whole test suite sequentially Message-ID: <1557762722.1.0.805190875774.issue36905@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : This happens only while running the tests sequentially and also with whole test suite. This error is present in optional GCC build consistently as below : https://travis-ci.org/python/cpython/jobs/531845094#L2103 Running whole test suite sequentially in verbose mode brings below message locally : test_get_type_hints_modules_forwardref (test.test_typing.GetTypeHintTests) ... unexpected success I am not sure of the relation in running this sequentially along with the whole test suite. Feel free to close this if this is a false positive. ---------- components: Tests messages: 342348 nosy: levkivskyi, xtreak priority: normal severity: normal status: open title: test_typing.GetTypeHintTests.test_get_type_hints_modules_forwardref unexpected success while running whole test suite sequentially type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:54:04 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 May 2019 15:54:04 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1557762844.59.0.647338289606.issue32587@roundup.psfhosted.org> Steve Dower added the comment: Updating the title to actually reflect the issue - Zackery, could you update your PR and NEWS entry? I just spent way too long looking for a MoveFileEx call that doesn't exist, because this isn't actually about doing things on reboot :) For tests, you should be able to create your own REG_MULTI_SZ key with zero-length strings and read it back. If the winreg module won't let you do it, you may need ctypes (but that's okay in Windows-only tests). Alternatively, if you want to dive deeper into the C API code, you could expose the fixupMultiSz function as a private function (winreg._split_multi_sz) and test it directly. That's my preferred way of unit testing things like this, but it's a decent amount of boilerplate just for a test. ---------- title: Make REG_MULTI_SZ support PendingFileRenameOperations -> Make REG_MULTI_SZ support zero-length strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:57:46 2019 From: report at bugs.python.org (Wei Lee) Date: Mon, 13 May 2019 15:57:46 +0000 Subject: [issue36841] Supporting customization of float encoding in JSON In-Reply-To: <1557261153.38.0.171143852563.issue36841@roundup.psfhosted.org> Message-ID: <1557763066.91.0.387129177438.issue36841@roundup.psfhosted.org> Wei Lee added the comment: I've sent a PR for it. https://github.com/python/cpython/pull/13233 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 11:58:41 2019 From: report at bugs.python.org (vx1920) Date: Mon, 13 May 2019 15:58:41 +0000 Subject: [issue36891] Additional startup plugin for vendors In-Reply-To: <1557741710.86.0.039896739742.issue36891@roundup.psfhosted.org> Message-ID: vx1920 added the comment: "sitevendor" is required because "sitecustomize" already "taken": imagine organization XYZ , they install Python/Anaconda for workers in XYZ. Admin in XYZ places some XYZ-specific code into "sitecustomize". As to "usersite" - each worker of XYS uses it for their own purposes. This is what we have now now (in general, as far as I understand the story). Now we have Anaconda in addition to Python distribution. Where do we suppose to place startup related code, which is different between Python and Anaconda ? Example: sys.path to load python py-modules and os.environ['PATH'] to load DLLs. Anaconda already uses some crazy patch in Python/main.c code and it is controlled by environment variables like CONDA_DLL_SEARCH_MODIFICATION_ENABLE. Somebody like you have to explain Anaconda developers that following sitevendor.py shipped with Anaconda may solve this problem (as alternative to patching C code). Real problem in Anaconda is following: attempt to run "python.exe -m conda update --all" gives error in SSL access to update server. Problem is that OpenSSL.dll was moved into PythonHome\Lib\Bin and can't be loaded from there when I run python.exe without activate.bat. Anaconda already solve this problem using above CONDA_DLL_SEARCH_MODIFICATION_ENABLE and it is totally crazy and it introduce problem how to set this variable. They can solve it by shipping sitevendor.py as of: import os import sys prefix = os.path.split(os.path.abspath(sys.executable))[0] env = os.environ env['CONDA_DLL_SEARCH_MODIFICATION_ENABLE'] = '1' env['CONDA_DEFAULT_ENV'] = 'base' env['CONDA_PREFIX'] = prefix env['CONDA_SHLVL'] = '1' # end of first sitevendor example Next sitevendor.py example presented below: # this sitevendor.py can theoretically be shipped with Anaconde if they want, it works for me even without # any CONDA_DLL_SEARCH_MODIFICATION_ENABLE import os import sys import site from os.path import join, pathsep prefix = os.path.split(os.path.abspath(sys.executable))[0] new_paths = pathsep.join([ prefix, # not required if we start python[w].exe from prefix folder join(prefix, "Library", "mingw-w64", "bin"), join(prefix, "Library", "usr", "bin"), # if not exist: see removeduppath_ex(, True) join(prefix, "Library", "bin"), ##join(prefix, "Scripts") ]) L = [] # empty array for folders from path env = os.environ strpath = new_paths + pathsep + env['PATH']; # string with combined path to array of folders: for dir in strpath.split(';') : L.append(dir); ####print("dir=%s" % (dir)) # remove duplicated and nonexested folders site.removeduppaths_ex(L , True) strpath = pathsep.join(L); ### modify environment variables for current process env['PATH'] = strpath; env['CONDA_PREFIX'] = prefix ###env['CONDA_DLL_SEARCH_MODIFICATION_ENABLE'] = '1' # Python module search path: site.removeduppaths_ex(sys.path , True) # True to remove nonexistent folder/files # eof On Mon, May 13, 2019 at 6:01 AM STINNER Victor wrote: > > Change by STINNER Victor : > > > ---------- > nosy: +vstinner > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:00:39 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 13 May 2019 16:00:39 +0000 Subject: [issue36414] Multiple test failures in GCC and Clang optional builds on Travis CI In-Reply-To: <1553412920.81.0.155092332299.issue36414@roundup.psfhosted.org> Message-ID: <1557763239.97.0.168706430398.issue36414@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The builds are now running since issue36684 changed the build process splitting the coverage and there are now three test failures in test_gc, test_descr and test_typing (issue36905) unrelated to the original report : https://travis-ci.org/python/cpython/jobs/531845094#L1873 test test_gc failed -- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_gc.py", line 817, in test_get_objects_arguments self.assertEqual(len(gc.get_objects()), AssertionError: 103063 != 103064 https://travis-ci.org/python/cpython/jobs/531845094#L1816 test test_descr failed -- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_descr.py", line 1272, in test_slots self.assertEqual(orig_objects, new_objects) AssertionError: 94174 != 94180 This happens in C coverage test suite https://travis-ci.org/python/cpython/jobs/531845095#L2486 ====================================================================== ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/distutils/tests/test_build_ext.py", line 91, in test_build_ext import xx ImportError: /tmp/tmpamh6bkg7/xx.cpython-38-x86_64-linux-gnu.so: undefined symbol: __gcov_merge_add ---------------------------------------------------------------------- I am not sure whether to keep this open for three test failures above or to have separate issues. I opened one for test_typing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:02:33 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 May 2019 16:02:33 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557763353.87.0.813382016321.issue36807@roundup.psfhosted.org> Terry J. Reedy added the comment: When 3.x is done, I will do 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:08:51 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 13 May 2019 16:08:51 +0000 Subject: [issue13286] PEP 3151 breaks backward compatibility: it should be documented In-Reply-To: <1319811530.69.0.689775391155.issue13286@psf.upfronthosting.co.za> Message-ID: <1557763731.53.0.202061726432.issue13286@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13197 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:08:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 16:08:52 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557763732.73.0.526471277839.issue36895@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 24482bd0ae203116fd7e41ec3219fb2857fb3ac7 by Victor Stinner (Matthias Bussonnier) in branch '3.7': [3.7] bpo-36895: document time.clock() has been removed in 3.8 (GH-13287) https://github.com/python/cpython/commit/24482bd0ae203116fd7e41ec3219fb2857fb3ac7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:10:28 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 13 May 2019 16:10:28 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557763828.69.0.724942064898.issue36807@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13198 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:27:07 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 13 May 2019 16:27:07 +0000 Subject: [issue35814] Syntax quirk with variable annotations In-Reply-To: <1548308739.94.0.144807070146.issue35814@roundup.psfhosted.org> Message-ID: <1557764827.48.0.337849164843.issue35814@roundup.psfhosted.org> Guido van Rossum added the comment: I think PEP 526 does not clarify the intention here. Perhaps we could add a specific example? It currently shows: t: Tuple[int, ...] = (1, 2, 3) We could just add this there: t: Tuple[int, ...] = 1, 2, 3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:28:31 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 13 May 2019 16:28:31 +0000 Subject: [issue35814] Syntax quirk with variable annotations In-Reply-To: <1548308739.94.0.144807070146.issue35814@roundup.psfhosted.org> Message-ID: <1557764911.28.0.950875868274.issue35814@roundup.psfhosted.org> Guido van Rossum added the comment: (With a comment indicating that the second is only accepted in Python 3.8 and later.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:37:21 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 May 2019 16:37:21 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1557765441.11.0.837772873469.issue36870@roundup.psfhosted.org> Terry J. Reedy added the comment: I have gotten this too, multiple times, on both Azure Pipelines and Appveyor. The latter is worse since required. There was also a Mac failure for Azure, not sure is same issue. Please disable this test. External resource problems should not be blocking merges of good patches. This is especially obnoxious for backports because it is not possible to rerun by close and reopen, as closing causes the backport branch to be deleted. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:48:22 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 13 May 2019 16:48:22 +0000 Subject: [issue36891] Additional startup plugin for vendors In-Reply-To: Message-ID: Inada Naoki added the comment: > vx1920 added the comment: > > "sitevendor" is required because "sitecustomize" already "taken": imagine > organization XYZ , they install Python/Anaconda for workers in XYZ. Admin > in XYZ places some XYZ-specific code into "sitecustomize". I don't think it's common situation. If distribution want to add such "admin"-customization, distributors can implement such additional customization in sitecustomize.py, or even in site.py. For example, Ubuntu uses customized site.py and sitecustomize.py. Is there some discussion in Anaconda developers about proposing "sitevendor" is upstream (CPython)? Or is it just your idea? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:53:30 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 13 May 2019 16:53:30 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1557766410.05.0.0515838644344.issue22021@roundup.psfhosted.org> Cheryl Sabella added the comment: @giampaolo.rodola, no problem. I intended this more as a general request rather than something for right now. If you do have any availability at some point, please keep this one in mind. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 12:58:48 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 May 2019 16:58:48 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557766728.68.0.849145813296.issue36807@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 68a11b6e6a73cd2e9b49e5df9973877b2fed6277 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': [3.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) (#13288) https://github.com/python/cpython/commit/68a11b6e6a73cd2e9b49e5df9973877b2fed6277 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:05:41 2019 From: report at bugs.python.org (mike bayer) Date: Mon, 13 May 2019 17:05:41 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557767141.63.0.842885714479.issue36751@roundup.psfhosted.org> Change by mike bayer : ---------- nosy: +zzzeek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:07:11 2019 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 13 May 2019 17:07:11 +0000 Subject: [issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator In-Reply-To: <1406670130.27.0.606950005482.issue22102@psf.upfronthosting.co.za> Message-ID: <1557767231.24.0.681674747388.issue22102@roundup.psfhosted.org> A.M. Kuchling added the comment: I also ran across this issue today, where the 'disks' value in a Zip file is 0. I'm trying to find out what software was used to create them, but it's quite plausible that it's Windows as Ramsey Kant suggests. So I think this fix should get applied to 3.8 and 3.7. Would it help if I produced a patch? The PKWare Zip specification that takluyver links above has been updated -- it now has an April 29th updated -- but none of the changes are relevant to this. Interestingly, the 'ditto' command on MacOS X (which can also unpack zip files) doesn't complain about the disk number either. I was unable to figure out where the source code for ditto is; I couldn't find it on opensource.apple.com. ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:07:44 2019 From: report at bugs.python.org (mike bayer) Date: Mon, 13 May 2019 17:07:44 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557767264.13.0.933755749463.issue36751@roundup.psfhosted.org> mike bayer added the comment: if a function continues to work correctly throughout the span of a Python X version, why does it need to be removed? I have a foggy memory but I don't seem to recall functions that were technically redundant being aggressively deprecated in the 2.x series. This warning is causing a lot of downstream pain right now and this is after we already all had to deal with getargspec() going away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:08:42 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 13 May 2019 17:08:42 +0000 Subject: [issue36894] test_multiprocessing_spawn regression on Windows In-Reply-To: <1557680621.73.0.0423240629914.issue36894@roundup.psfhosted.org> Message-ID: <1557767322.12.0.272865589472.issue36894@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- keywords: +patch pull_requests: +13199 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:09:06 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 13 May 2019 17:09:06 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557767346.31.0.191695729855.issue36867@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- pull_requests: +13200 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:10:33 2019 From: report at bugs.python.org (Sihoon Lee) Date: Mon, 13 May 2019 17:10:33 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1557767433.68.0.105053377437.issue35907@roundup.psfhosted.org> Sihoon Lee added the comment: If developers allow only http:// or https:// as whitelist, it has no problem. But, If someone blocks only one file://, attacker can bypass it. This issue may provides attacker with bypassing method as new scheme. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:17:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 17:17:56 +0000 Subject: [issue36725] Reference leak regression with Python3.8a3 In-Reply-To: <1556224107.78.0.397981137362.issue36725@roundup.psfhosted.org> Message-ID: <1557767876.58.0.690157213145.issue36725@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13201 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:17:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 17:17:57 +0000 Subject: [issue36719] regrtest --findleaks should fail if an uncollectable object is found In-Reply-To: <1556203780.64.0.387499693172.issue36719@roundup.psfhosted.org> Message-ID: <1557767877.45.0.38828707121.issue36719@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b0917df329ba14b7bc6fa782c1b61e7a2163af0b by Victor Stinner in branch 'master': bpo-36719: regrtest -jN no longer stops on crash (GH-13231) https://github.com/python/cpython/commit/b0917df329ba14b7bc6fa782c1b61e7a2163af0b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:18:15 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 13 May 2019 17:18:15 +0000 Subject: [issue36719] regrtest --findleaks should fail if an uncollectable object is found In-Reply-To: <1556203780.64.0.387499693172.issue36719@roundup.psfhosted.org> Message-ID: <1557767895.53.0.255469441443.issue36719@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13202 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:20:53 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 13 May 2019 17:20:53 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557768053.63.0.0533505584792.issue36867@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 50466c66509de556a8579172f82d1abb1560d8e4 by Antoine Pitrou (Pierre Glaser) in branch 'master': bpo-36867: DOC update multiprocessing.rst (GH-13289) https://github.com/python/cpython/commit/50466c66509de556a8579172f82d1abb1560d8e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:25:47 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 13 May 2019 17:25:47 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557768347.94.0.903892255903.issue36867@roundup.psfhosted.org> Change by Pierre Glaser : ---------- pull_requests: +13203 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:36:56 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 May 2019 17:36:56 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557769016.63.0.91549132704.issue36807@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +13204 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:38:30 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 May 2019 17:38:30 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557769110.24.0.783186049725.issue36807@roundup.psfhosted.org> Terry J. Reedy added the comment: PR 13102 is original patch for master; it was merged, not closed. PR 13284 fixed blurb for master. PR 13280 backport for 3.7 was closed trying to restart bogus failure; can't do that for backports. PR 13288 is second backport; only optional Azure Pipilines failed. PR 13293 is manual 2.7 backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:48:18 2019 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 13 May 2019 17:48:18 +0000 Subject: [issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator In-Reply-To: <1406670130.27.0.606950005482.issue22102@psf.upfronthosting.co.za> Message-ID: <1557769698.15.0.307729039316.issue22102@roundup.psfhosted.org> A.M. Kuchling added the comment: Oh, I missed that there was already a patch. BTW, I found two dissections of zip files that also show disk numbers of 0: the one at https://rzymek.github.io/post/excel-zip64/ is exploring an Excel Zip issue, and the forensic tutorial at https://users.cs.jmu.edu/buchhofp/forensics/formats/pkzip.html is discussing the format. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:50:03 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 13 May 2019 17:50:03 +0000 Subject: [issue36894] test_multiprocessing_spawn regression on Windows In-Reply-To: <1557680621.73.0.0423240629914.issue36894@roundup.psfhosted.org> Message-ID: <1557769803.5.0.757828973373.issue36894@roundup.psfhosted.org> Pierre Glaser added the comment: Thanks for the fix Antoine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:55:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 13 May 2019 17:55:12 +0000 Subject: [issue36719] regrtest --findleaks should fail if an uncollectable object is found In-Reply-To: <1556203780.64.0.387499693172.issue36719@roundup.psfhosted.org> Message-ID: <1557770112.56.0.741423158844.issue36719@roundup.psfhosted.org> miss-islington added the comment: New changeset 19464bcd97436cd8d5d9e32b70faf3e1e5f2a712 by Miss Islington (bot) in branch '3.7': bpo-36719: regrtest -jN no longer stops on crash (GH-13231) https://github.com/python/cpython/commit/19464bcd97436cd8d5d9e32b70faf3e1e5f2a712 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 13:58:09 2019 From: report at bugs.python.org (Michael Blahay) Date: Mon, 13 May 2019 17:58:09 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1557770289.1.0.310870156742.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: Ryan, What say you? Will you be satisfied with the addition of a note in the documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 14:02:52 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 13 May 2019 18:02:52 +0000 Subject: [issue36894] test_multiprocessing_spawn regression on Windows In-Reply-To: <1557680621.73.0.0423240629914.issue36894@roundup.psfhosted.org> Message-ID: <1557770572.84.0.383755017579.issue36894@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 95da83d9bac698d420cc308e8699ef6e4fae2aca by Antoine Pitrou in branch 'master': bpo-36894: Fix regression in test_multiprocessing_spawn (no tests run on Windows) (GH-13290) https://github.com/python/cpython/commit/95da83d9bac698d420cc308e8699ef6e4fae2aca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 14:22:19 2019 From: report at bugs.python.org (Michael Blahay) Date: Mon, 13 May 2019 18:22:19 +0000 Subject: [issue32509] doctest syntax ambiguity between continuation line and ellipsis In-Reply-To: <1515297917.31.0.467229070634.issue32509@psf.upfronthosting.co.za> Message-ID: <1557771739.5.0.581000272083.issue32509@roundup.psfhosted.org> Michael Blahay added the comment: At the end of msg309603 it was stated that this issue is being changed to an enhancement. Later on, Tim Peters changed it Type back to behavior, but didn't provide any detail about why. Should this issue still be considered an enhancement? ---------- nosy: +mblahay _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 14:40:31 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 13 May 2019 18:40:31 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals Message-ID: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> New submission from Gregory P. Smith : A Python pattern in code is to keep everything indented to look pretty while, yet when the triple quoted multiline string in question needs to not have leading whitespace, calling textwrap.dedent("""long multiline constant""") is a common pattern. rather than doing this computation at runtime, this is something that'd make sense to do at compilation time. A natural suggestion for this would be a new letter prefix for multiline string literals that triggers this. Probably not worth "wasting" a letter on this, so I'll understand if we reject the idea, but it'd be nice to have rather than importing textwrap and calling it all over the place just for this purpose. There are many workarounds but an actual syntax would enable writing code that looked like this: ```python class Castle: def __init__(self, name, lyrics=None): if not lyrics: lyrics = df"""\ We're knights of the round table We dance whene'er we're able We do routines and scenes With footwork impeccable. We dine well here in {name} We eat ham and jam and spam a lot. """ self._name = name self._lyrics = lyrics ``` Without generating a larger temporary always in memory string literal in the code object that gets converted at runtime to the desired dedented form via a textwrap.dedent() call. I chose "d" as the the letter to mean dedent. I don't have a strong preference if we ever do make this a feature. ---------- components: Interpreter Core messages: 342373 nosy: gregory.p.smith priority: low severity: normal status: open title: Compile time textwrap.dedent() equivalent for str or bytes literals type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:15:51 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 13 May 2019 19:15:51 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1557774951.29.0.326316306098.issue36867@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset b1dfcad6f0d3a52c9ac31fb9763fc7962a84b27c by Antoine Pitrou (Pierre Glaser) in branch 'master': bpo-36867: Create the resource_tracker before launching SharedMemoryManagers (GH-13276) https://github.com/python/cpython/commit/b1dfcad6f0d3a52c9ac31fb9763fc7962a84b27c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:23:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 19:23:20 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1557775400.52.0.301481686397.issue36895@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b6a09ae287e253e4146a5a224b75d4dbfd38cb63 by Victor Stinner (Matthias Bussonnier) in branch 'master': bpo-36895: Undocument removed time.clock (GH-13286) https://github.com/python/cpython/commit/b6a09ae287e253e4146a5a224b75d4dbfd38cb63 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:27:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 19:27:23 +0000 Subject: [issue35138] timeit documentation should have example with function arguments In-Reply-To: <1541090734.49.0.788709270274.issue35138@psf.upfronthosting.co.za> Message-ID: <1557775643.44.0.0242501854902.issue35138@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8da5ebe11e0cb6599af682b22f7c2b2b7b9debd8 by Victor Stinner (Anders Hovm?ller) in branch 'master': bpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787) https://github.com/python/cpython/commit/8da5ebe11e0cb6599af682b22f7c2b2b7b9debd8 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:27:40 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 13 May 2019 19:27:40 +0000 Subject: [issue35138] timeit documentation should have example with function arguments In-Reply-To: <1541090734.49.0.788709270274.issue35138@psf.upfronthosting.co.za> Message-ID: <1557775660.57.0.356576646925.issue35138@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:40:04 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 13 May 2019 19:40:04 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() Message-ID: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> New submission from Jeroen Demeyer : class IntWithDict: def __init__(self, **kwargs): self.kwargs = kwargs def __index__(self): self.kwargs.clear() L = [2**i for i in range(10000)] return 0 x = IntWithDict(dont_inherit=float()) compile("", "", "", x, **x.kwargs) The above crashes CPython due to the usage of borrowed references in _PyStack_UnpackDict(): the dict x.kwargs contains the only reference to the float() object stored in x.kwargs When parsing the arguments, x.__int__() is called, which clears the dict, removing the only reference to that float() ---------- components: Interpreter Core messages: 342377 nosy: jdemeyer, vstinner priority: normal severity: normal status: open title: Crash due to borrowed references in _PyStack_UnpackDict() versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:40:22 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 13 May 2019 19:40:22 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1557776422.78.0.881533564682.issue36907@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:41:35 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 13 May 2019 19:41:35 +0000 Subject: [issue35138] timeit documentation should have example with function arguments In-Reply-To: <1541090734.49.0.788709270274.issue35138@psf.upfronthosting.co.za> Message-ID: <1557776495.02.0.331236745213.issue35138@roundup.psfhosted.org> miss-islington added the comment: New changeset 7f485ea4fc17c5afb38cd0478ff15326fb5a47fc by Miss Islington (bot) in branch '3.7': bpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787) https://github.com/python/cpython/commit/7f485ea4fc17c5afb38cd0478ff15326fb5a47fc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:51:37 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 13 May 2019 19:51:37 +0000 Subject: [issue36904] Implement _PyStack_UnpackDict() with a single allocation In-Reply-To: <1557760974.34.0.94387480475.issue36904@roundup.psfhosted.org> Message-ID: <1557777097.59.0.542055734416.issue36904@roundup.psfhosted.org> Jeroen Demeyer added the comment: Ideally, this would be fixed together with #36907. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:51:44 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 13 May 2019 19:51:44 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1557777104.9.0.645616850987.issue36907@roundup.psfhosted.org> Jeroen Demeyer added the comment: Ideally, this would be fixed together with #36904. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:54:28 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 13 May 2019 19:54:28 +0000 Subject: [issue36904] Implement _PyStack_UnpackDict() with a single allocation In-Reply-To: <1557760974.34.0.94387480475.issue36904@roundup.psfhosted.org> Message-ID: <1557777268.58.0.441318939648.issue36904@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- components: +Interpreter Core -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 15:55:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 19:55:29 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1557777329.69.0.865050556288.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13206 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 16:09:21 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 13 May 2019 20:09:21 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1557778161.04.0.234993498971.issue36907@roundup.psfhosted.org> Jeroen Demeyer added the comment: The idea of #36904 could be used here: define a special kind of tuple, which is like an ordinary tuple followed by a C array of PyObject* entries (all refcounted), terminated by a NULL to know where it ends. A special deallocation function would decref all entries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 16:16:46 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 13 May 2019 20:16:46 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557778606.17.0.944154707542.issue35925@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 7346a16ed584fd1e85359154820d286370b68648 by Gregory P. Smith in branch '2.7': [2.7] bpo-35925: Skip SSL tests that fail due to weak external certs or old TLS (GH-13124) (GH-13253) https://github.com/python/cpython/commit/7346a16ed584fd1e85359154820d286370b68648 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 16:21:17 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 13 May 2019 20:21:17 +0000 Subject: [issue36897] shlex doesn't differentiate escaped characters in output In-Reply-To: <1557709191.27.0.852663831837.issue36897@roundup.psfhosted.org> Message-ID: <1557778877.39.0.447091290693.issue36897@roundup.psfhosted.org> Eric V. Smith added the comment: The goal is to match posix shell semantics. Can you provide a concrete example where shlex.shlex does something different from a posix-compliant shell? With all the escaping, it's going to be tough. Note also that your code raises a DeprecationWarning in 3.7, at least, and will be an error in the future. You should probably use r-strings in your examples. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 16:30:37 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 13 May 2019 20:30:37 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1557779437.4.0.683691161145.issue35925@roundup.psfhosted.org> Gregory P. Smith added the comment: 3.6 (and 3.5 if larry wants) are the only remaining trees to apply this to, assigning to the 3.6 RM. ---------- assignee: gregory.p.smith -> ned.deily versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 17:15:18 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 13 May 2019 21:15:18 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1557782118.86.0.862216039113.issue32587@roundup.psfhosted.org> Eryk Sun added the comment: > For tests, you should be able to create your own REG_MULTI_SZ key with > zero-length strings and read it back. If the winreg module won't let > you do it, you may need ctypes (but that's okay in Windows-only > tests). winreg.SetValueEx can create the value. We just need to add a case to test_case in Lib/test/test_winreg.py, such as the following: ("Multi-nul", ["", "", "", ""], REG_MULTI_SZ) > I just spent way too long looking for a MoveFileEx call that doesn't > exist, because this isn't actually about doing things on reboot :) Do you mean a variation of MOVEFILE_DELAY_UNTIL_REBOOT that doesn't require administrator access? That would be useful if it existed. I suppose a MOVEFILE_DELAY_UNTIL_LOGOFF flag could be added to have the logon process (winlogon.exe, instead of smss.exe) perform the delete/rename operation under impersonation at the end of the session, or (given a system crash or power failure) the next time the user logs on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 17:15:22 2019 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 13 May 2019 21:15:22 +0000 Subject: [issue36908] "This module is always available" is confusing Message-ID: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> New submission from Ned Batchelder : The math and cmath modules say this in their docs: "This module is always available." This lead a beginner to believe they didn't need to be imported. Nearly the entire standard library is always available in this sense (they can be imported). This sentence isn't useful. Can we change the first paragraph of the math module to be: "This module provides access to the mathematical functions defined by the C standard." (and similarly for the cmath module.) ---------- assignee: docs at python components: Documentation messages: 342386 nosy: docs at python, nedbat priority: normal severity: normal status: open title: "This module is always available" is confusing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 17:23:43 2019 From: report at bugs.python.org (anthony shaw) Date: Mon, 13 May 2019 21:23:43 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1557782623.73.0.924834683814.issue36880@roundup.psfhosted.org> anthony shaw added the comment: If you can write a test similar to the AnotherLeak.test_callback test case, and commit that first. It will show in the CI/CD log as failed and verify the issue (incase it comes up in PR review) Then add another commit with the patch itself and we should see the CI/CD pass. Please follow the PR guide if this is your first PR to CPython https://devguide.python.org/pullrequest/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 17:24:41 2019 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 13 May 2019 21:24:41 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1557782681.45.0.0798515062097.issue36908@roundup.psfhosted.org> Change by Ned Batchelder : ---------- keywords: +patch pull_requests: +13207 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 17:25:36 2019 From: report at bugs.python.org (Jens Troeger) Date: Mon, 13 May 2019 21:25:36 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1557782736.42.0.137415232275.issue34424@roundup.psfhosted.org> Jens Troeger added the comment: Cheryl, if you can find somebody to approve and merge this fix, that would be greatly appreciated! Anything I can do, please let me know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 17:33:08 2019 From: report at bugs.python.org (wim glenn) Date: Mon, 13 May 2019 21:33:08 +0000 Subject: [issue36761] Extended slice assignment + iterable unpacking In-Reply-To: <1556650082.38.0.163364239874.issue36761@roundup.psfhosted.org> Message-ID: <1557783188.89.0.244266526837.issue36761@roundup.psfhosted.org> wim glenn added the comment: Serhiy, `a, *L[::2] = "abc"` as an alternative is interesting, thanks. The other example `L[:], *rest = 'abcdef'` is less interesting because L[:] can be arbitrary size. When noticing this, I had tried to consume a generator into every other position in a list by using: L[::2], *extra = g Though there are obvious workarounds (e.g. using `itertools.islice`), it surprised me that CPython did not "do what I mean" out of the box. However, since creating the issue, it was brought to my attention that trying to handle this assignment may result in potential ambiguity, for example: L = [0, 1, 2] L[::2], *rest = "ab", "c", "d" There is no obvious choice for result here. So, perhaps this issue should just be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 17:51:40 2019 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 13 May 2019 21:51:40 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1557784300.23.0.276799657393.issue36908@roundup.psfhosted.org> Mariatta Wijaya added the comment: I agree the wording "is always available" is quite ambiguous. It's just that we use this phrase pretty much everywhere... Example: First paragraph of https://docs.python.org/3/library/sys.html "It is always available." https://docs.python.org/3/library/threading.html?highlight=threading#module-threading "This module used to be optional, it is now always available." I wonder if it will be clearer if it says "is available across all platforms"? ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 17:53:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 21:53:18 +0000 Subject: [issue35138] timeit documentation should have example with function arguments In-Reply-To: <1541090734.49.0.788709270274.issue35138@psf.upfronthosting.co.za> Message-ID: <1557784398.9.0.942565072625.issue35138@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Anders Hovm?ller! Example added to Python 3.7 and 3.8 documentation :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 17:56:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 21:56:27 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1557784587.34.0.694512095415.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13206 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 18:03:01 2019 From: report at bugs.python.org (Nicolai Moore) Date: Mon, 13 May 2019 22:03:01 +0000 Subject: [issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen In-Reply-To: <1557269638.8.0.459235898725.issue36845@roundup.psfhosted.org> Message-ID: <1557784981.03.0.178562558337.issue36845@roundup.psfhosted.org> Change by Nicolai Moore : ---------- keywords: +patch pull_requests: +13208 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 18:09:44 2019 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 13 May 2019 22:09:44 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1557785384.36.0.133612814371.issue36908@roundup.psfhosted.org> Ned Batchelder added the comment: If we want to keep it, how about "it can always be imported."? Though I still wonder whether this is worth it. Are we going to annotate all of the always-available modules with this notation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 18:11:19 2019 From: report at bugs.python.org (daniel hahler) Date: Mon, 13 May 2019 22:11:19 +0000 Subject: [issue36474] RecursionError resets trace function set via sys.settrace In-Reply-To: <1553886678.98.0.673623780459.issue36474@roundup.psfhosted.org> Message-ID: <1557785479.42.0.66069315609.issue36474@roundup.psfhosted.org> daniel hahler added the comment: Duplicate of https://bugs.python.org/issue10933. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 18:17:02 2019 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 13 May 2019 22:17:02 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1557785822.22.0.253866195914.issue36908@roundup.psfhosted.org> Ned Batchelder added the comment: Looks like these modules describe themselves as always available: _thread, sys, threading, time. Notice that the built-ins are also described as "always available", which is the meaning we're trying to move math away from (you can use them without importing anything). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 18:21:50 2019 From: report at bugs.python.org (wim glenn) Date: Mon, 13 May 2019 22:21:50 +0000 Subject: [issue36909] LastUpdatedOrderedDict recipe uses super() unnecessarily Message-ID: <1557786110.6.0.397786860144.issue36909@roundup.psfhosted.org> New submission from wim glenn : Section https://docs.python.org/3/library/collections.html#ordereddict-examples-and-recipes class LastUpdatedOrderedDict(OrderedDict): 'Store items in the order the keys were last added' def __setitem__(self, key, value): super().__setitem__(key, value) super().move_to_end(key) Why does it use super().move_to_end(key), isn't self.move_to_end(key) more direct/Pythonic? ---------- assignee: docs at python components: Documentation messages: 342395 nosy: docs at python, rhettinger, wim.glenn priority: normal pull_requests: 13209 severity: normal status: open title: LastUpdatedOrderedDict recipe uses super() unnecessarily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 18:28:32 2019 From: report at bugs.python.org (Jake Tesler) Date: Mon, 13 May 2019 22:28:32 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1557786512.27.0.771630961601.issue36084@roundup.psfhosted.org> Jake Tesler added the comment: So where do we go from here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 18:29:18 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 May 2019 22:29:18 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557786558.54.0.0833806307864.issue36807@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 353f8d2282b1a48376f8813fd1170445a0cda873 by Terry Jan Reedy in branch '2.7': [2.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) (GH-13293) https://github.com/python/cpython/commit/353f8d2282b1a48376f8813fd1170445a0cda873 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 18:38:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 22:38:58 +0000 Subject: [issue36900] Use _PyCoreConfig rather than global configuration variables In-Reply-To: <1557745648.65.0.648187833126.issue36900@roundup.psfhosted.org> Message-ID: <1557787138.28.0.276540629789.issue36900@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13210 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 19:03:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 May 2019 23:03:35 +0000 Subject: [issue36900] Use _PyCoreConfig rather than global configuration variables In-Reply-To: <1557745648.65.0.648187833126.issue36900@roundup.psfhosted.org> Message-ID: <1557788615.26.0.822558939257.issue36900@roundup.psfhosted.org> STINNER Victor added the comment: With PR 13299, most global variable configurables are not directly accessed, outside code to initialize _PyPreConfig and _PyCoreConfig. parser.c: Py_DebugFlag fileutils.c: Py_UTF8Mode, Py_LegacyWindowsFSEncodingFlag frozenmain.c: Py_VerboseFlag Py_FdIsInteractive(): Py_InteractiveFlag PySys_SetArgv(): Py_IsolatedFlag() Py_GETENV(): Py_IsolatedFlag The problem is that these files, functions and macros may be used before Python is initialized: before Python has an interpreter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 19:36:51 2019 From: report at bugs.python.org (Matthew Gamble) Date: Mon, 13 May 2019 23:36:51 +0000 Subject: [issue36897] shlex doesn't differentiate escaped characters in output In-Reply-To: <1557709191.27.0.852663831837.issue36897@roundup.psfhosted.org> Message-ID: <1557790611.88.0.765723766237.issue36897@roundup.psfhosted.org> Matthew Gamble added the comment: The point is that it's not possible to use the output of shlex.shlex to try to match the behaviour of a POSIX-compliant shell by reliably splitting up a user's input into multiple commands. In the first case I presented (no escape character), the user entered two commands. In the second case, the user entered a single command with two arguments. However, there's no way to differentiate the two situations based on the output of shlex. It's also worth noting that the output is the same with this too: list(shlex.shlex('a \\; b', posix=True, punctuation_chars=True)) I tested this code on python 3.6.7 and 3.7.2, and didn't see any deprecation warnings at all. I also checked the history of shlex.py: https://github.com/python/cpython/commits/master/Lib/shlex.py The last commit was from 2017, and I don't see any usages of DeprecationWarning inside that file. I'm also not sure how r-strings are relevant, as I don't see any regular expressions used inside of the shlex class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 19:47:53 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 May 2019 23:47:53 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557791273.68.0.966708033607.issue36807@roundup.psfhosted.org> Terry J. Reedy added the comment: > Do you mean from CircuitPython? No, I was asking about regular Python on Windows. I was not clear to me whether any of the software that Nina ran (other than possibly Adafruit USB drivers) was from Adafruit. I am now guessing that is was all 3rd party stuff and that IDLE will now be an alternative for part of what she used. I was in part wondering whether there were other simple (and allowable) changes to IDLE that might make it more useful for this type of application, but I will leave that sit for now. I answered at least some of my questions about USB and the Adafruit hardware and the rest of what you wrote with my search bar. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 19:52:32 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 13 May 2019 23:52:32 +0000 Subject: [issue36807] IDLE doesn't call os.fsync() In-Reply-To: <1557087746.35.0.383866352803.issue36807@roundup.psfhosted.org> Message-ID: <1557791552.11.0.148821386694.issue36807@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks all! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 20:13:33 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Tue, 14 May 2019 00:13:33 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1557792813.63.0.00386579446166.issue36908@roundup.psfhosted.org> Emmanuel Arias added the comment: I agree. What about create a section (or subsection?) or note with the text: ``` The next modules: sys, math ... are always available. This mean that ... ``` ? ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 20:16:01 2019 From: report at bugs.python.org (Ned Batchelder) Date: Tue, 14 May 2019 00:16:01 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1557792961.9.0.560026095012.issue36908@roundup.psfhosted.org> Ned Batchelder added the comment: There are hundreds of modules that are always importable. The majority of the standard library is always importable. More useful would be to annotate those modules that might not be importable, with a reason why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 20:20:02 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Tue, 14 May 2019 00:20:02 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1557793202.07.0.779472240659.issue36908@roundup.psfhosted.org> Emmanuel Arias added the comment: > More useful would be to annotate those modules that might not be importable, with a reason why. yes, that is more reasonable. :-D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 20:37:47 2019 From: report at bugs.python.org (Windson Yang) Date: Tue, 14 May 2019 00:37:47 +0000 Subject: [issue30535] Explicitly note that meta_path is not empty In-Reply-To: <1496307550.81.0.122215532062.issue30535@psf.upfronthosting.co.za> Message-ID: <1557794267.28.0.402325694003.issue30535@roundup.psfhosted.org> Change by Windson Yang : ---------- keywords: +patch pull_requests: +13211 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 20:37:59 2019 From: report at bugs.python.org (Windson Yang) Date: Tue, 14 May 2019 00:37:59 +0000 Subject: [issue30535] Explicitly note that meta_path is not empty In-Reply-To: <1496307550.81.0.122215532062.issue30535@psf.upfronthosting.co.za> Message-ID: <1557794279.71.0.00938289815223.issue30535@roundup.psfhosted.org> Windson Yang added the comment: I created a PR for it. TBO, meta_path is not a good name since it doesn't contain any *path* at all. ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 20:38:57 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 14 May 2019 00:38:57 +0000 Subject: [issue36897] shlex doesn't differentiate escaped characters in output In-Reply-To: <1557709191.27.0.852663831837.issue36897@roundup.psfhosted.org> Message-ID: <1557794337.0.0.390798247199.issue36897@roundup.psfhosted.org> Eric V. Smith added the comment: Run 3.7 with -Wd: $ python3 -Wd Python 3.7.3 (default, Mar 29 2019, 13:03:53) [GCC 7.4.0] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> 'a \; b' :1: DeprecationWarning: invalid escape sequence \; 'a \\; b' >>> The deprecation is in relation to invalid escape sequences, not shlex. My point is just that you should use r'a \; b' or 'a \\;b', and not rely on invalid escape sequences. For one reason, I can never remember how they're interpreted, and had to look it up. r-strings don't have anything to do with regular expressions per-se, they're a way of changing how python interprets stings, no matter what they're used for. > The point is that it's not possible to use the output of shlex.shlex to try to match the behaviour of a POSIX-compliant shell by reliably splitting up a user's input into multiple commands. In the first case I presented (no escape character), the user entered two commands. In the second case, the user entered a single command with two arguments. However, there's no way to differentiate the two situations based on the output of shlex. My question is: can a posix-compliant shell tell the difference? I don't know, it's an honest question. Can you show some shell code where it can tell the difference? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 20:40:36 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 May 2019 00:40:36 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1557794436.94.0.187433437183.issue36906@roundup.psfhosted.org> Raymond Hettinger added the comment: I agree that this is a recurring need and would be nice to have. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 20:54:55 2019 From: report at bugs.python.org (Windson Yang) Date: Tue, 14 May 2019 00:54:55 +0000 Subject: [issue9267] Update pickle opcode documentation in pickletools for 3.x In-Reply-To: <1279217581.88.0.294098163632.issue9267@psf.upfronthosting.co.za> Message-ID: <1557795295.76.0.178178028422.issue9267@roundup.psfhosted.org> Windson Yang added the comment: Where are the documents actually? ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:07:49 2019 From: report at bugs.python.org (R. David Murray) Date: Tue, 14 May 2019 01:07:49 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1557796069.95.0.664469430144.issue34424@roundup.psfhosted.org> R. David Murray added the comment: New changeset 45b2f8893c1b7ab3b3981a966f82e42beea82106 by R. David Murray (Jens Troeger) in branch 'master': bpo-34424: Handle different policy.linesep lengths correctly. (#8803) https://github.com/python/cpython/commit/45b2f8893c1b7ab3b3981a966f82e42beea82106 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:12:01 2019 From: report at bugs.python.org (Matthew Gamble) Date: Tue, 14 May 2019 01:12:01 +0000 Subject: [issue36897] shlex doesn't differentiate escaped characters in output In-Reply-To: <1557709191.27.0.852663831837.issue36897@roundup.psfhosted.org> Message-ID: <1557796321.95.0.0316830197897.issue36897@roundup.psfhosted.org> Matthew Gamble added the comment: My apologies, I didn't realise you were talking about the invalid escape sequence. Thanks for letting me know about the fact that it's deprecated, I'll definitely be keeping that in mind going forward. In a bash shell with the find command available, run the following command: find . -type f -exec ls {} \; You should see a list of files. If you run this: find . -type f -exec ls {} ; You should see an error message from find: "find: missing argument to `-exec'" If I pass the first example in this message to shlex, I get no indication that the user attempted escaped the semi-colon in their input. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:13:49 2019 From: report at bugs.python.org (R. David Murray) Date: Tue, 14 May 2019 01:13:49 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1557796429.41.0.285579251107.issue34424@roundup.psfhosted.org> R. David Murray added the comment: Approved and merged. Cheryl, can you shepherd this through the backport process, please? I'm contributing infrequently enough that I'm not even sure which version we are on :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:27:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 01:27:31 +0000 Subject: [issue36719] regrtest --findleaks should fail if an uncollectable object is found In-Reply-To: <1556203780.64.0.387499693172.issue36719@roundup.psfhosted.org> Message-ID: <1557797251.21.0.209555844985.issue36719@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:39:45 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 14 May 2019 01:39:45 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1557486427.43.0.425785866668.issue33725@roundup.psfhosted.org> Message-ID: Barry A. Warsaw added the comment: On May 10, 2019, at 04:07, Josh Rosenberg wrote: > > I've seen far too many cases where Python code targeting Linux intentionally uses the COW benefits of fork for multiprocessing to think it would be a good idea to change the default start method there without *some* sort of deprecation period. We need to resolve this for 3.8, and given that I think we have clear consensus to change the default on macOS to spawn to avoid the crashes, let?s do that. We?ll need to update the documentation. Then if we don?t have consensus to change the default on Linux, let?s issue a DeprecationWarning for the default ?fork? method in 3.8 and change it to ?spawn' in 3.9. Do we want to issue a warning on set_start_method(?fork?) on macOS, given that it?s unlikely to be safe? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:45:27 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 01:45:27 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1557798327.52.0.251452658536.issue34424@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13213 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:46:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 01:46:10 +0000 Subject: [issue36829] CLI option to make PyErr_WriteUnraisable abort the current process In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557798370.41.0.0264621625553.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: Another example of hook: hook_file.patch logs unraisable exception into ~/unraisable.txt. Patch written for my latest PR 13187 (with the new 'msg' parameter). Example of output when running the Python test suite (using multiple processes! ./python -m test -j0 -r): ---------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Exception ignored in: .C.__del__ at 0x7f0d5c71eb00> ZeroDivisionError: division by zero Traceback (most recent call last): ... File "/home/vstinner/prog/python/master/Lib/test/test_raise.py", line 463, in test_3611 f() File "/home/vstinner/prog/python/master/Lib/test/test_raise.py", line 456, in f del x XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Exception ignored in: RuntimeError: generator ignored GeneratorExit Traceback (most recent call last): ... File "/home/vstinner/prog/python/master/Lib/test/test_generators.py", line 2207, in test_main support.run_doctest(test_generators, verbose) ... File "", line 1, in del g XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Exception ignored in: ValueError: I/O operation on closed file. Traceback (most recent call last): ... File "/home/vstinner/prog/python/master/Lib/test/test_urllib.py", line 421, in test_invalid_redirect urlopen("http://python.org/") File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 237, in __exit__ traceback.clear_frames(tb) File "/home/vstinner/prog/python/master/Lib/traceback.py", line 220, in clear_frames tb.tb_frame.clear() ---------- IMHO such hook is more convenient than killing the process with SIGABRT ;-) ---------- Added file: https://bugs.python.org/file48329/hook_file.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:47:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 01:47:35 +0000 Subject: [issue36719] regrtest --findleaks should fail if an uncollectable object is found In-Reply-To: <1556203780.64.0.387499693172.issue36719@roundup.psfhosted.org> Message-ID: <1557798455.5.0.448930813293.issue36719@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c923c3449f825021b13521b2380e67ba35a36f55 by Victor Stinner in branch 'master': bpo-36719: Fix regrtest MultiprocessThread (GH-13301) https://github.com/python/cpython/commit/c923c3449f825021b13521b2380e67ba35a36f55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:47:48 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 01:47:48 +0000 Subject: [issue36719] regrtest --findleaks should fail if an uncollectable object is found In-Reply-To: <1556203780.64.0.387499693172.issue36719@roundup.psfhosted.org> Message-ID: <1557798468.35.0.223568116914.issue36719@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13214 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:48:39 2019 From: report at bugs.python.org (Mark Sapiro) Date: Tue, 14 May 2019 01:48:39 +0000 Subject: [issue36910] Certain Malformed email causes email.parser to throw AttributeError Message-ID: <1557798519.08.0.310106320232.issue36910@roundup.psfhosted.org> New submission from Mark Sapiro : The code in the attached parse_bug.py file when run with Python 3.5, 3.6 or 3.7 throws AttributeError with this traceback: ``` Traceback (most recent call last): File "parse_bug.py", line 9, in """) File "/usr/local/lib/python3.7/email/parser.py", line 124, in parsebytes return self.parser.parsestr(text, headersonly) File "/usr/local/lib/python3.7/email/parser.py", line 68, in parsestr return self.parse(StringIO(text), headersonly=headersonly) File "/usr/local/lib/python3.7/email/parser.py", line 58, in parse return feedparser.close() File "/usr/local/lib/python3.7/email/feedparser.py", line 187, in close self._call_parse() File "/usr/local/lib/python3.7/email/feedparser.py", line 180, in _call_parse self._parse() File "/usr/local/lib/python3.7/email/feedparser.py", line 323, in _parsegen if (self._cur.get('content-transfer-encoding', '8bit').lower() AttributeError: 'Header' object has no attribute 'lower' ``` The triggering condition appears to be the Content-Transfer-Encoding: header with a non-ascii character in the headers of a multipart part. The parser should probably throw email.errors.HeaderParseError with a MalformedHeaderDefect in this case rather than AttributeError. While arguably code should defend against unanticipated exceptions, the fact that such an exception can be thrown while parsing an arbitrary message could be considered a security issue. ---------- components: email files: parse_bug.py messages: 342415 nosy: barry, msapiro, r.david.murray priority: normal severity: normal status: open title: Certain Malformed email causes email.parser to throw AttributeError type: behavior versions: Python 3.5, Python 3.6, Python 3.7 Added file: https://bugs.python.org/file48330/parse_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 21:54:19 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 14 May 2019 01:54:19 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1557798859.08.0.535973036499.issue34424@roundup.psfhosted.org> Cheryl Sabella added the comment: David, Thank you for the review and merging into master! I'd be glad to backport this. I believe the only backport would be to 3.7 (master is currently 3.8), but please let me know if it would need to go into a security branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 22:02:23 2019 From: report at bugs.python.org (Amber Brown) Date: Tue, 14 May 2019 02:02:23 +0000 Subject: [issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n") Message-ID: <1557799343.57.0.564179832858.issue36911@roundup.psfhosted.org> New submission from Amber Brown : reproducing case: file.py: ``` """ Hello \n blah. """ ``` And then in a REPL (2.7 or 3+): ``` >>> import ast >>> f = ast.parse(open("test.py", 'rb').read()) >>> f <_ast.Module object at 0x7f609d0a4d68> >>> f.body[0] <_ast.Expr object at 0x7f609d0a4e10> >>> f.body[0].value <_ast.Str object at 0x7f609d02b780> >>> f.body[0].value.s '\nHello \n blah.\n' >>> repr(f.body[0].value.s) "'\\nHello \\n blah.\\n'" ``` Expected behaviour: ``` >>> repr(f.body[0].value.s) "'\\nHello \\\\n blah.\\n'" ``` ---------- components: Library (Lib) messages: 342417 nosy: hawkowl priority: normal severity: normal status: open title: ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n") versions: Python 2.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 22:02:50 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 02:02:50 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1557799370.71.0.940929167963.issue34424@roundup.psfhosted.org> miss-islington added the comment: New changeset c0abd0c8e9b62bc008fc74cfbfbbab36ef7d7617 by Miss Islington (bot) in branch '3.7': bpo-34424: Handle different policy.linesep lengths correctly. (GH-8803) https://github.com/python/cpython/commit/c0abd0c8e9b62bc008fc74cfbfbbab36ef7d7617 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 22:04:55 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 14 May 2019 02:04:55 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1557799495.62.0.307145176591.issue34424@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 22:31:26 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 14 May 2019 02:31:26 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1557801086.65.0.0715415191409.issue36906@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 22:37:14 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 14 May 2019 02:37:14 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1557801434.86.0.228630143238.issue36887@roundup.psfhosted.org> Tim Peters added the comment: +1 from me! I'm tired of re-inventing this too :-) Agree with every point Mark made. Just in passing, noting a triviality: for the ceiling, `1 + isqrt(n - 1)` fails when `n` is zero. But I've never had a use for the ceiling here, or for "nearest" - just the floor. Also for `iroot(n, k)` for k'th root floors with k > 2, but that too can wait. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 22:41:32 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 14 May 2019 02:41:32 +0000 Subject: [issue23378] argparse.add_argument action parameter should allow value extend In-Reply-To: <1422886990.52.0.318776752581.issue23378@psf.upfronthosting.co.za> Message-ID: <1557801692.13.0.326392850106.issue23378@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +13215 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 22:43:00 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 May 2019 02:43:00 +0000 Subject: [issue36909] LastUpdatedOrderedDict recipe uses super() unnecessarily In-Reply-To: <1557786110.6.0.397786860144.issue36909@roundup.psfhosted.org> Message-ID: <1557801780.56.0.124281677627.issue36909@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 22:44:39 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 14 May 2019 02:44:39 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1557801879.56.0.744568062236.issue36906@roundup.psfhosted.org> Steven D'Aprano added the comment: +1 There's a long thread on something similar here: https://mail.python.org/pipermail/python-ideas/2018-March/049564.html Carrying over into the following month: https://mail.python.org/pipermail/python-ideas/2018-April/049582.html Here's an even older thread: https://mail.python.org/pipermail/python-ideas/2010-November/008589.html In the more recent thread, I suggested that we give strings a dedent method. When called on a literal, the keyhole optimizer may do the dedent at compile time. Whether it does or not is a "quality of implementation" factor. The idea is to avoid the combinational explosion of yet another string prefix: urd'...' # unicode raw string dedent while still making string dedents easily discoverable, and with a sufficiently good interpreter, string literals will be dedented at compile time avoiding any runtime cost: https://mail.python.org/pipermail/python-ideas/2018-March/049578.html ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 22:54:04 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 14 May 2019 02:54:04 +0000 Subject: [issue36912] Can't left-align strings using f-strings or format() Message-ID: <1557802444.81.0.632526308066.issue36912@roundup.psfhosted.org> New submission from Guido van Rossum : I sometimes like to use format specs like "%-10s" % foo, which left-aligns the string foo in a field of 10 spaces: >>> '%10s' % foo ' abc' >>> foo = 'abc' >>> '%-10s' % foo 'abc ' This is documented in "Format Specification Mini-Language": https://docs.python.org/3/library/string.html#format-specification-mini-language However it does not work with format() and f-strings: >>> format(foo, '10s') 'abc ' >>> format(foo, '-10s') Traceback (most recent call last): File "", line 1, in ValueError: Sign not allowed in string format specifier >>> f'{foo:10}' 'abc ' >>> f'{foo:-10}' Traceback (most recent call last): File "", line 1, in ValueError: Sign not allowed in string format specifier In each case, without a sign it works, and right-aligns. What am I missing? ---------- messages: 342421 nosy: gvanrossum priority: normal severity: normal status: open title: Can't left-align strings using f-strings or format() type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 22:54:30 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 14 May 2019 02:54:30 +0000 Subject: [issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n") In-Reply-To: <1557799343.57.0.564179832858.issue36911@roundup.psfhosted.org> Message-ID: <1557802470.22.0.231295767489.issue36911@roundup.psfhosted.org> Matthias Bussonnier added the comment: I believe this one is even before the ast, in the tokenizer. Though the AST is also doing some normalisation in identifiers (??? U+03B5 Greek Small Letter Epsilon Unicode Character , and ??? U+03F5 Greek Lunate Epsilon Symbol Unicode Character get normalized to the same for example, which is problematic as the look different, but end up being same identifier). I'd be interested in an opt-in flag to not do this normalisation (I have a prototype with this for the identifier normalisation in ast, but I have not looked at the tokenizer), which might be useful for some linting tools. ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 23:01:18 2019 From: report at bugs.python.org (Eric N. Vander Weele) Date: Tue, 14 May 2019 03:01:18 +0000 Subject: [issue36912] Can't left-align strings using f-strings or format() In-Reply-To: <1557802444.81.0.632526308066.issue36912@roundup.psfhosted.org> Message-ID: <1557802878.84.0.611657499599.issue36912@roundup.psfhosted.org> Change by Eric N. Vander Weele : ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 23:03:02 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 14 May 2019 03:03:02 +0000 Subject: [issue36912] Can't left-align strings using f-strings or format() In-Reply-To: <1557802444.81.0.632526308066.issue36912@roundup.psfhosted.org> Message-ID: <1557802982.62.0.460215242716.issue36912@roundup.psfhosted.org> Matthias Bussonnier added the comment: Aren't > and < the characters to right/left-align ? >>> foo = 'abc' >>> f"{foo:>10}" ' abc' >>> format(foo, '>10') ' abc' ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 23:09:01 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 14 May 2019 03:09:01 +0000 Subject: [issue36912] Can't left-align strings using f-strings or format() In-Reply-To: <1557802444.81.0.632526308066.issue36912@roundup.psfhosted.org> Message-ID: <1557803341.73.0.928735026535.issue36912@roundup.psfhosted.org> Guido van Rossum added the comment: Aha! I thought I was missing something. :-) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 23:21:16 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 14 May 2019 03:21:16 +0000 Subject: [issue36912] Can't left-align strings using f-strings or format() In-Reply-To: <1557802444.81.0.632526308066.issue36912@roundup.psfhosted.org> Message-ID: <1557804076.58.0.0741193019239.issue36912@roundup.psfhosted.org> Matthias Bussonnier added the comment: > I thought I was missing something. Some sleep, probably. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 13 23:55:31 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 14 May 2019 03:55:31 +0000 Subject: [issue36594] Undefined behavior due to incorrect usage of %p in format strings In-Reply-To: <1554941666.55.0.100758767166.issue36594@roundup.psfhosted.org> Message-ID: <1557806131.83.0.455164319281.issue36594@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 00:14:58 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 14 May 2019 04:14:58 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1557807298.34.0.320474077127.issue36751@roundup.psfhosted.org> Brett Cannon added the comment: RE: "if a function continues to work correctly throughout the span of a Python X version, why does it need to be removed?" In this case the argument is whether inspect.getfullargspec() works correctly in the face of positional-only parameters. There's also the usual maintenance burden like any other open source project has. I know for me the thing is that getfullargspec() keeps getting patched up to support any changes we make to function signatures that aren't the smoothest or more accurate way to represent new semantics and so it hasn't been maintenance-free. And in the face of inspect.Signature which feels like a cleaner solution that is easier to improve upon as function signatures change it makes folks not want to keep putting work into the older functions. I personally think we should at least document the deprecation of the functions to strongly encourage people to not use it in new code. I don't find the "Note that signature() and Signature Object provide the recommended API for callable introspection" message "loud" enough to get the message across. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 00:15:47 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 14 May 2019 04:15:47 +0000 Subject: [issue10991] trace fails when test imported a temporary file In-Reply-To: <1295825472.67.0.685273364418.issue10991@psf.upfronthosting.co.za> Message-ID: <1557807347.71.0.905836369685.issue10991@roundup.psfhosted.org> Brett Cannon added the comment: Since I'm not bothered enough to check if this is still an issue I'm fine with closing this. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 00:16:07 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 14 May 2019 04:16:07 +0000 Subject: [issue24048] remove_module() needs to save/restore exception state In-Reply-To: <1429855118.66.0.488857300303.issue24048@psf.upfronthosting.co.za> Message-ID: <1557807367.66.0.510239583116.issue24048@roundup.psfhosted.org> Brett Cannon added the comment: Can this be closed, Nick? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 00:24:18 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 14 May 2019 04:24:18 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1557807858.22.0.575309488665.issue36906@roundup.psfhosted.org> Gregory P. Smith added the comment: Oh good, I thought this had come up before. Your method idea that could be optimized on literals makes a lot of sense, and is notably more readable than yet another letter prefix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 00:34:31 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 14 May 2019 04:34:31 +0000 Subject: [issue24048] remove_module() needs to save/restore exception state In-Reply-To: <1429855118.66.0.488857300303.issue24048@psf.upfronthosting.co.za> Message-ID: <1557808471.86.0.549181052111.issue24048@roundup.psfhosted.org> Zackery Spytz added the comment: I think this change should be backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 00:41:22 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 14 May 2019 04:41:22 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1557808882.63.0.562819885203.issue32587@roundup.psfhosted.org> Zackery Spytz added the comment: Thank you for the comments. I've updated the PR. > winreg.SetValueEx can create the value. We just need to add a case to test_case in Lib/test/test_winreg.py, such as the following: test_case? I think you mean test_data? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 01:24:48 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 14 May 2019 05:24:48 +0000 Subject: [issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1557811488.25.0.61450868619.issue26317@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +13216 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 01:26:57 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 14 May 2019 05:26:57 +0000 Subject: [issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain In-Reply-To: <1454992584.65.0.198275659625.issue26317@psf.upfronthosting.co.za> Message-ID: <1557811617.51.0.901284033251.issue26317@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I submitted a pull request that fixes both the PythonLauncher build issue and the _scproxy module build issue. They are related because _scproxy is required to install PythonLauncher. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 01:30:28 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 14 May 2019 05:30:28 +0000 Subject: [issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully In-Reply-To: <1435666041.75.0.103684760482.issue24538@psf.upfronthosting.co.za> Message-ID: <1557811828.58.0.489320240416.issue24538@roundup.psfhosted.org> Giampaolo Rodola' added the comment: New changeset 0a5b88e7f23b671d63896619b13148b0e4e2b5dd by Giampaolo Rodola (Miss Islington (bot)) in branch '3.7': bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only files. (PR-13212) (#13234) https://github.com/python/cpython/commit/0a5b88e7f23b671d63896619b13148b0e4e2b5dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 03:01:37 2019 From: report at bugs.python.org (Tom Hale) Date: Tue, 14 May 2019 07:01:37 +0000 Subject: [issue36656] Allow os.symlink(src, target, force=True) to prevent race conditions In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1557817297.36.0.737862894025.issue36656@roundup.psfhosted.org> Tom Hale added the comment: Thanks Toshio Kuratomi, I raised it on the mailing list at: https://code.activestate.com/lists/python-ideas/55992/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 03:35:28 2019 From: report at bugs.python.org (Tomer Vromen) Date: Tue, 14 May 2019 07:35:28 +0000 Subject: [issue36913] Missing documentation for decorators Message-ID: <1557819328.64.0.0474936169734.issue36913@roundup.psfhosted.org> New submission from Tomer Vromen : The documentation for decorators (for methods and classes) is pretty lacking. Searching for "decorator" ( https://docs.python.org/3/search.html?q=decorator ) brings up a lot of libraries that use decorators, but no documentation explaining what they are and how they work. The documentation should have a dedicated page for explaining decorators, and this should be the 1st search result. -- In the meantime, then search should give as a 1st result a link to the definition of decorator in the glossary: https://docs.python.org/3.7/glossary.html#glossary Actually, it seems that there is no way to directly link to a paragraph in the glossary - so that should be added as well. In general, it would be nice if a search for some term X would show as a 1st result the definition of X in the glossary (if it exists there). Thanks! ---------- assignee: docs at python components: Documentation messages: 342435 nosy: docs at python, tomerv priority: normal severity: normal status: open title: Missing documentation for decorators type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 04:34:32 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 08:34:32 +0000 Subject: [issue36913] Missing documentation for decorators In-Reply-To: <1557819328.64.0.0474936169734.issue36913@roundup.psfhosted.org> Message-ID: <1557822872.56.0.353667716079.issue36913@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi, Thank you for your feedback. In fact, there is a limitation with the current search engine of Sphinx (because we use it for the documentation). For example, if you try to find the meaning of "for", for us it's a keyword but for the search engine, it will try to find all the sections containing "for" (formatter, platform, argparse.ArgumentParser.format_help, etc...). For that, we could open an issue on the repository of Sphinx. Now, about the decorators. In the definition of a function, we explain the call of a decorator, See the grammar. https://docs.python.org/3/reference/compound_stmts.html#function-definitions """ A function definition may be wrapped by one or more decorator expressions. Decorator expressions are evaluated when the function is defined, in the scope that contains the function definition. The result must be a callable, which is invoked with the function object as the only argument. The returned value is bound to the function name instead of the function object. Multiple decorators are applied in a nested fashion. For example, the following code """ But because it's a specification of the language which has been described with 2 PEPs you can read it on the PEP Index page. Function: https://www.python.org/dev/peps/pep-0318/ -> Introduced in 2.4 https://docs.python.org/3/whatsnew/2.4.html Class: https://www.python.org/dev/peps/pep-3129/ -> Introduced in 3.0 Now, I suggest one thing, add a link to the PEPs in this section https://docs.python.org/3/reference/compound_stmts.html#function-definitions ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 04:35:01 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 08:35:01 +0000 Subject: [issue36913] Missing documentation for decorators In-Reply-To: <1557819328.64.0.0474936169734.issue36913@roundup.psfhosted.org> Message-ID: <1557822901.58.0.715641160588.issue36913@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 04:53:32 2019 From: report at bugs.python.org (Tomer Vromen) Date: Tue, 14 May 2019 08:53:32 +0000 Subject: [issue36913] Missing documentation for decorators In-Reply-To: <1557819328.64.0.0474936169734.issue36913@roundup.psfhosted.org> Message-ID: <1557824012.14.0.590875050256.issue36913@roundup.psfhosted.org> Tomer Vromen added the comment: Thank you for the quick response. Are PEPs considered de-facto documentation for language features? For example, string formatting was described in PEP 3101, but still has sections in the documentation dedicated to it. I believe that decorators should get a similar treatment :-) I also think that describing decorators as part of the grammar definition is lacking. Why is there a whole chapter for Errors and Exceptions and it's not only discussed under the grammar definition for raise? Decorators are a pretty unique (and cool!) feature of Python, and therefore new learners of the language need a better reference for learning about them. I realize that this is a big request, as you would need some expert to write this documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 05:13:40 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 09:13:40 +0000 Subject: [issue36913] Missing documentation for decorators In-Reply-To: <1557824012.14.0.590875050256.issue36913@roundup.psfhosted.org> Message-ID: <20190514091336.jse6mbixebwcjrtf@xps> St?phane Wirtel added the comment: Hi Tomer, >Thank you for the quick response. Welcome > >Are PEPs considered de-facto documentation for language features? For >example, string formatting was described in PEP 3101, but still has >sections in the documentation dedicated to it. I believe that >decorators should get a similar treatment :-) Good catch for the string formatting. For the decorator, it's different because a decorator is mainly a function taking a function and returning a function. Example you can write this decorator: def my_decorator(func): return func def my_awesome_function(*args, **kwargs): print(args) print(kwargs) return 42 my_awesome_function = my_decorator(my_awesome_function) in this case, we don't need to document the decorator. for the '@' syntax, it's described in the doc but it's syntactic sugar for the decorator. I don't think we need to add a big description for that, because everything is described in the PEP. I would like to have the opinion of the other core-dev. @sizeof? > >I also think that describing decorators as part of the grammar >definition is lacking. Why is there a whole chapter for Errors and >Exceptions and it's not only discussed under the grammar definition for >raise? > >Decorators are a pretty unique (and cool!) feature of Python, and >therefore new learners of the language need a better reference for >learning about them. > >I realize that this is a big request, as you would need some expert to >write this documentation. You can open a PR ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 05:13:59 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 09:13:59 +0000 Subject: [issue36913] Missing documentation for decorators In-Reply-To: <1557819328.64.0.0474936169734.issue36913@roundup.psfhosted.org> Message-ID: <1557825239.01.0.347962821704.issue36913@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 05:29:07 2019 From: report at bugs.python.org (Vadim Kantorov) Date: Tue, 14 May 2019 09:29:07 +0000 Subject: [issue36914] zipimport does not load ZIP files produced by GitHub Message-ID: <1557826147.57.0.863332328412.issue36914@roundup.psfhosted.org> New submission from Vadim Kantorov : Python does not like source code zip-files produced by GitHub (zipimporting source from GitHub can be useful in some ad-hoc scripting scenarios e.g. I wanted to use it in Mozilla Iodide context) wget https://github.com/python/black/archive/master.zip python3.7 -m 'import zipimport; zipimport.zipimporter("master.zip")' # zipimport.ZipImportError: not a Zip file: 'master.zip' unzip master.zip zip -r master2.zip black-master python3.7 -m 'import zipimport; zipimport.zipimporter("master2.zip")' # OK ---------- components: Library (Lib) messages: 342439 nosy: Vadim Kantorov priority: normal severity: normal status: open title: zipimport does not load ZIP files produced by GitHub type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 05:44:43 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 14 May 2019 09:44:43 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1557827083.38.0.223503864681.issue36907@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13217 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 05:45:29 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 14 May 2019 09:45:29 +0000 Subject: [issue36904] Implement _PyStack_UnpackDict() with a single allocation In-Reply-To: <1557760974.34.0.94387480475.issue36904@roundup.psfhosted.org> Message-ID: <1557827129.44.0.3352844865.issue36904@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13218 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 05:48:21 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 14 May 2019 09:48:21 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1557827301.0.0.0638665333443.issue27987@roundup.psfhosted.org> Inada Naoki added the comment: $ ./python -m perf compare_to master.json align16.json -G --min-speed=1 Slower (13): - pickle_list: 4.40 us +- 0.03 us -> 4.59 us +- 0.04 us: 1.04x slower (+4%) - xml_etree_iterparse: 129 ms +- 2 ms -> 133 ms +- 2 ms: 1.04x slower (+4%) - regex_dna: 201 ms +- 2 ms -> 207 ms +- 2 ms: 1.03x slower (+3%) - scimark_sparse_mat_mult: 5.75 ms +- 0.01 ms -> 5.90 ms +- 0.05 ms: 1.03x slower (+3%) - float: 147 ms +- 1 ms -> 151 ms +- 1 ms: 1.02x slower (+2%) - unpickle: 19.0 us +- 0.6 us -> 19.4 us +- 0.7 us: 1.02x slower (+2%) - nbody: 173 ms +- 1 ms -> 176 ms +- 1 ms: 1.02x slower (+2%) - pickle: 12.4 us +- 0.1 us -> 12.6 us +- 0.2 us: 1.02x slower (+2%) - html5lib: 121 ms +- 3 ms -> 123 ms +- 4 ms: 1.02x slower (+2%) - unpickle_list: 4.88 us +- 0.04 us -> 4.95 us +- 0.12 us: 1.02x slower (+2%) - xml_etree_process: 107 ms +- 1 ms -> 109 ms +- 1 ms: 1.01x slower (+1%) - regex_effbot: 3.60 ms +- 0.05 ms -> 3.65 ms +- 0.03 ms: 1.01x slower (+1%) - xml_etree_parse: 185 ms +- 1 ms -> 187 ms +- 3 ms: 1.01x slower (+1%) Faster (11): - nqueens: 134 ms +- 1 ms -> 130 ms +- 1 ms: 1.03x faster (-2%) - chameleon: 14.4 ms +- 0.2 ms -> 14.1 ms +- 0.1 ms: 1.02x faster (-2%) - pathlib: 25.7 ms +- 0.3 ms -> 25.3 ms +- 0.2 ms: 1.02x faster (-2%) - django_template: 170 ms +- 2 ms -> 167 ms +- 3 ms: 1.01x faster (-1%) - sympy_expand: 549 ms +- 19 ms -> 542 ms +- 8 ms: 1.01x faster (-1%) - dulwich_log: 90.0 ms +- 0.7 ms -> 88.9 ms +- 0.7 ms: 1.01x faster (-1%) - richards: 111 ms +- 1 ms -> 110 ms +- 1 ms: 1.01x faster (-1%) - json_dumps: 16.7 ms +- 0.3 ms -> 16.6 ms +- 0.2 ms: 1.01x faster (-1%) - fannkuch: 572 ms +- 4 ms -> 566 ms +- 2 ms: 1.01x faster (-1%) - meteor_contest: 130 ms +- 1 ms -> 129 ms +- 1 ms: 1.01x faster (-1%) - logging_format: 14.6 us +- 0.2 us -> 14.4 us +- 0.2 us: 1.01x faster (-1%) Benchmark hidden because not significant (33): 2to3, chaos, crypto_pyaes, deltablue, go, hexiom, json_loads, logging_silent, logging_simple, mako, pickle_dict, pickle_pure_python, pidigits, python_startup, python_startup_no_site, raytrace, regex_compile, regex_v8, scimark_fft, scimark_lu, scimark_monte_carlo, scimark_sor, spectral_norm, sqlalchemy_declarative, sqlalchemy_imperative, sqlite_synth, sympy_integrate, sympy_sum, sympy_str, telco, unpack_sequence, unpickle_pure_python, xml_etree_generate ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 05:49:10 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 14 May 2019 09:49:10 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1557827350.65.0.184761563147.issue27987@roundup.psfhosted.org> Inada Naoki added the comment: $ ./python -m perf compare_to master-mem.json align16-mem.json -G --min-speed=2 Slower (30): - float: 20.6 MB +- 12.6 kB -> 23.8 MB +- 30.3 kB: 1.16x slower (+16%) - mako: 14.3 MB +- 760.5 kB -> 15.1 MB +- 54.1 kB: 1.06x slower (+6%) - xml_etree_iterparse: 11.1 MB +- 11.8 kB -> 11.6 MB +- 22.1 kB: 1.05x slower (+5%) - html5lib: 19.0 MB +- 31.0 kB -> 19.8 MB +- 51.8 kB: 1.04x slower (+4%) - dulwich_log: 10.9 MB +- 133.1 kB -> 11.3 MB +- 29.1 kB: 1.03x slower (+3%) - json_dumps: 7907.6 kB +- 6242 bytes -> 8156.0 kB +- 23.9 kB: 1.03x slower (+3%) - sympy_str: 33.5 MB +- 17.5 kB -> 34.5 MB +- 23.2 kB: 1.03x slower (+3%) - deltablue: 8163.2 kB +- 9220 bytes -> 8391.2 kB +- 15.6 kB: 1.03x slower (+3%) - pathlib: 8296.0 kB +- 15.0 kB -> 8526.4 kB +- 33.4 kB: 1.03x slower (+3%) - xml_etree_generate: 11.8 MB +- 87.2 kB -> 12.2 MB +- 108.2 kB: 1.03x slower (+3%) - sympy_expand: 32.7 MB +- 15.1 kB -> 33.6 MB +- 19.9 kB: 1.03x slower (+3%) - richards: 7081.6 kB +- 16.2 kB -> 7270.8 kB +- 55.2 kB: 1.03x slower (+3%) - pickle: 7244.4 kB +- 12.1 kB -> 7436.4 kB +- 57.1 kB: 1.03x slower (+3%) - pickle_pure_python: 7267.2 kB +- 12.2 kB -> 7455.2 kB +- 48.2 kB: 1.03x slower (+3%) - pickle_dict: 7258.8 kB +- 27.6 kB -> 7446.0 kB +- 36.7 kB: 1.03x slower (+3%) - hexiom: 7168.8 kB +- 25.1 kB -> 7352.8 kB +- 59.8 kB: 1.03x slower (+3%) - raytrace: 7373.6 kB +- 17.0 kB -> 7562.8 kB +- 44.3 kB: 1.03x slower (+3%) - pickle_list: 7246.8 kB +- 9067 bytes -> 7431.2 kB +- 60.2 kB: 1.03x slower (+3%) - spectral_norm: 6913.2 kB +- 5127 bytes -> 7087.2 kB +- 39.8 kB: 1.03x slower (+3%) - sympy_integrate: 32.6 MB +- 24.9 kB -> 33.4 MB +- 36.0 kB: 1.02x slower (+2%) - regex_compile: 8188.4 kB +- 10.9 kB -> 8388.8 kB +- 27.2 kB: 1.02x slower (+2%) - nqueens: 7153.6 kB +- 17.2 kB -> 7328.4 kB +- 38.3 kB: 1.02x slower (+2%) - sqlalchemy_declarative: 18.1 MB +- 40.9 kB -> 18.5 MB +- 50.0 kB: 1.02x slower (+2%) - django_template: 18.4 MB +- 50.2 kB -> 18.8 MB +- 23.7 kB: 1.02x slower (+2%) - sympy_sum: 52.1 MB +- 30.8 kB -> 53.4 MB +- 26.7 kB: 1.02x slower (+2%) - regex_v8: 8208.0 kB +- 11.2 kB -> 8399.2 kB +- 43.2 kB: 1.02x slower (+2%) - sqlalchemy_imperative: 17.4 MB +- 51.0 kB -> 17.8 MB +- 47.9 kB: 1.02x slower (+2%) - json_loads: 7025.6 kB +- 71.0 kB -> 7173.6 kB +- 9098 bytes: 1.02x slower (+2%) - xml_etree_process: 11.6 MB +- 160.1 kB -> 11.8 MB +- 141.1 kB: 1.02x slower (+2%) - logging_silent: 7275.6 kB +- 37.5 kB -> 7425.2 kB +- 41.9 kB: 1.02x slower (+2%) Faster (1): - sqlite_synth: 8469.6 kB +- 44.7 kB -> 8197.6 kB +- 44.7 kB: 1.03x faster (-3%) Benchmark hidden because not significant (26): 2to3, chameleon, chaos, crypto_pyaes, fannkuch, go, logging_format, logging_simple, meteor_contest, nbody, pidigits, python_startup, python_startup_no_site, regex_dna, regex_effbot, scimark_fft, scimark_lu, scimark_monte_carlo, scimark_sor, scimark_sparse_mat_mult, telco, unpack_sequence, unpickle, unpickle_list, unpickle_pure_python, xml_etree_parse ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 05:49:41 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 14 May 2019 09:49:41 +0000 Subject: [issue36914] zipimport does not load ZIP files produced by GitHub In-Reply-To: <1557826147.57.0.863332328412.issue36914@roundup.psfhosted.org> Message-ID: <1557827381.73.0.734107456961.issue36914@roundup.psfhosted.org> SilentGhost added the comment: This is going to be fixed in 3.8 (see #5950). ---------- nosy: +SilentGhost resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Make zipimport work with zipfile containing comments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 05:51:20 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 14 May 2019 09:51:20 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1557827480.7.0.366964635926.issue27987@roundup.psfhosted.org> Inada Naoki added the comment: New changeset f0be4bbb9b3cee876249c23f2ae6f38f43fa7495 by Inada Naoki in branch 'master': bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850) https://github.com/python/cpython/commit/f0be4bbb9b3cee876249c23f2ae6f38f43fa7495 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 05:52:20 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 09:52:20 +0000 Subject: [issue36914] zipimport does not load ZIP files produced by GitHub In-Reply-To: <1557826147.57.0.863332328412.issue36914@roundup.psfhosted.org> Message-ID: <1557827540.17.0.225018384018.issue36914@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Seems to work on master branch though fails on 3.7. ? cpython git:(master) ? ./python.exe Python 3.8.0a4+ (heads/master:410b85a7f7, May 13 2019, 21:40:37) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import zipimport >>> zipimport.zipimporter("master.zip") >>> ^D ? cpython git:(master) ? python3.7 Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import zipimport >>> zipimport.zipimporter("master.zip") Traceback (most recent call last): File "", line 1, in zipimport.ZipImportError: not a Zip file: 'master.zip' ? cpython git:(996859a90d) ? git checkout 5a5ce064b3baadcb79605c5a42ee3d0aee57cdfc Previous HEAD position was 996859a90d bpo-34790: [docs] Passing coroutines to asyncio.wait() can be confusing. (GH-9543) HEAD is now at 5a5ce064b3 bpo-5950: Support reading zips with comments in zipimport (#9548) ? cpython git:(5a5ce064b3) ? make regen-importlib -s && make -s > /dev/null ? cpython git:(5a5ce064b3) ? ./python.exe -c 'import zipimport; zipimport.zipimporter("master.zip")' ? cpython git:(5a5ce064b3) ? git checkout 5a5ce064b3baadcb79605c5a42ee3d0aee57cdfc~1 Previous HEAD position was 5a5ce064b3 bpo-5950: Support reading zips with comments in zipimport (#9548) HEAD is now at 996859a90d bpo-34790: [docs] Passing coroutines to asyncio.wait() can be confusing. (GH-9543) ? cpython git:(996859a90d) ? make regen-importlib -s && make -s > /dev/null ? cpython git:(996859a90d) ? ./python.exe -c 'import zipimport; zipimport.zipimporter("master.zip")' Traceback (most recent call last): File "", line 89, in __init__ KeyError: 'master.zip' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "", line 91, in __init__ File "", line 366, in _read_directory zipimport.ZipImportError: not a Zip file: 'master.zip' Bisecting tells me it could have been fixed with 5a5ce064b3baadcb79605c5a42ee3d0aee57cdfc (issue5950) in 3.8 . Can you please try with a 3.8 release? Download 3.8 alpha 4 : https://www.python.org/downloads/release/python-380a4/ ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 06:04:06 2019 From: report at bugs.python.org (Tom Hale) Date: Tue, 14 May 2019 10:04:06 +0000 Subject: [issue36656] Allow os.symlink(src, target, force=True) to prevent race conditions In-Reply-To: <1555577087.92.0.769196427693.issue36656@roundup.psfhosted.org> Message-ID: <1557828246.78.0.639069683217.issue36656@roundup.psfhosted.org> Change by Tom Hale : ---------- type: security -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 06:04:15 2019 From: report at bugs.python.org (Stefan Krah) Date: Tue, 14 May 2019 10:04:15 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1557828255.36.0.107650416031.issue27987@roundup.psfhosted.org> Stefan Krah added the comment: +16% for float seems pretty high though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 06:07:05 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 10:07:05 +0000 Subject: [issue36910] Certain Malformed email causes email.parser to throw AttributeError In-Reply-To: <1557798519.08.0.310106320232.issue36910@roundup.psfhosted.org> Message-ID: <1557828425.16.0.269676848534.issue36910@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi Mark, Do you want to submit a PR for this issue? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 06:08:16 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 14 May 2019 10:08:16 +0000 Subject: [issue36910] Certain Malformed email causes email.parser to throw AttributeError In-Reply-To: <1557798519.08.0.310106320232.issue36910@roundup.psfhosted.org> Message-ID: <1557828496.72.0.707220718293.issue36910@roundup.psfhosted.org> Change by SilentGhost : ---------- stage: -> needs patch versions: +Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 06:18:48 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 14 May 2019 10:18:48 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1557829128.52.0.968432777641.issue27987@roundup.psfhosted.org> Inada Naoki added the comment: yes. sys.getsizeof(3.14) is 24. And it becomes 32 byte in 16byte aligned pymalloc. (+33%) FYI, jemalloc has 8, 16, 32 size classes, but no 24 too. http://jemalloc.net/jemalloc.3.html#size_classes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 06:33:05 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 14 May 2019 10:33:05 +0000 Subject: [issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen In-Reply-To: <1557269638.8.0.459235898725.issue36845@roundup.psfhosted.org> Message-ID: <1557829985.13.0.739596070297.issue36845@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 5e48e3db6f5a937023e99d89cef8884d22bd8533 by Inada Naoki (Nicolai Moore) in branch 'master': bpo-36845: validate integer network prefix when constructing IP networks (GH-13298) https://github.com/python/cpython/commit/5e48e3db6f5a937023e99d89cef8884d22bd8533 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 06:33:15 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 10:33:15 +0000 Subject: [issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen In-Reply-To: <1557269638.8.0.459235898725.issue36845@roundup.psfhosted.org> Message-ID: <1557829995.36.0.408294721282.issue36845@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13219 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 06:36:02 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 10:36:02 +0000 Subject: [issue23378] argparse.add_argument action parameter should allow value extend In-Reply-To: <1422886990.52.0.318776752581.issue23378@psf.upfronthosting.co.za> Message-ID: <1557830162.13.0.435104207623.issue23378@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 07:00:21 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 14 May 2019 11:00:21 +0000 Subject: [issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen In-Reply-To: <1557269638.8.0.459235898725.issue36845@roundup.psfhosted.org> Message-ID: <1557831621.07.0.0458091867531.issue36845@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 30cccf084d1560d9e3382e69d828b3be8cdb0286 by Inada Naoki (Miss Islington (bot)) in branch '3.7': bpo-36845: validate integer network prefix when constructing IP networks (GH-13298) https://github.com/python/cpython/commit/30cccf084d1560d9e3382e69d828b3be8cdb0286 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 07:00:45 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 14 May 2019 11:00:45 +0000 Subject: [issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen In-Reply-To: <1557269638.8.0.459235898725.issue36845@roundup.psfhosted.org> Message-ID: <1557831645.28.0.0366233176053.issue36845@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 07:10:27 2019 From: report at bugs.python.org (Nicolai Moore) Date: Tue, 14 May 2019 11:10:27 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1557832227.59.0.0689422349159.issue33694@roundup.psfhosted.org> Change by Nicolai Moore : ---------- pull_requests: +13220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:04:44 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 14 May 2019 12:04:44 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1557835484.13.0.321029833643.issue36797@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset dae1229729920e3aa2be015453b7f702dff9b375 by Nick Coghlan in branch 'master': bpo-36797: Prune more legacy distutils documentation (GH-13092) https://github.com/python/cpython/commit/dae1229729920e3aa2be015453b7f702dff9b375 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:05:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 12:05:07 +0000 Subject: [issue36915] regrtest: when interrupted, temporary directory is not removed Message-ID: <1557835507.9.0.901051073741.issue36915@roundup.psfhosted.org> New submission from STINNER Victor : I modified regrtest (Python test runner) to kill worker processes using SIGKILL when the main process is interrupted by CTRL+C. Problem: nothing clears temporary directories created by these worker processes. I'm working on a fix. ---------- components: Tests messages: 342451 nosy: vstinner priority: normal severity: normal status: open title: regrtest: when interrupted, temporary directory is not removed versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:06:55 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 14 May 2019 12:06:55 +0000 Subject: [issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects In-Reply-To: <1495867380.86.0.533205071954.issue30491@psf.upfronthosting.co.za> Message-ID: <1557835615.42.0.10524453815.issue30491@roundup.psfhosted.org> Cheryl Sabella added the comment: Hi Nathaniel, Was this something you were still targeting for 3.8? Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:11:46 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 14 May 2019 12:11:46 +0000 Subject: [issue32995] Add a glossary entry for context variables In-Reply-To: <1520244692.22.0.467229070634.issue32995@psf.upfronthosting.co.za> Message-ID: <1557835906.13.0.914126707893.issue32995@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset c0a1a07c7e9814cad79cce3580c16284b2df7f52 by Cheryl Sabella (Vinodhini Balusamy) in branch 'master': bpo-32995 - Added context variable in glossary (GH-9741) https://github.com/python/cpython/commit/c0a1a07c7e9814cad79cce3580c16284b2df7f52 ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:11:52 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 12:11:52 +0000 Subject: [issue32995] Add a glossary entry for context variables In-Reply-To: <1520244692.22.0.467229070634.issue32995@psf.upfronthosting.co.za> Message-ID: <1557835912.8.0.60546255859.issue32995@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13221 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:12:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 12:12:52 +0000 Subject: [issue36719] regrtest --findleaks should fail if an uncollectable object is found In-Reply-To: <1556203780.64.0.387499693172.issue36719@roundup.psfhosted.org> Message-ID: <1557835972.42.0.771582486538.issue36719@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d8e123a48f1666227abdb90d84c58efe7bb4f3d8 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-36719: Fix regrtest MultiprocessThread (GH-13301) (GH-13303) https://github.com/python/cpython/commit/d8e123a48f1666227abdb90d84c58efe7bb4f3d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:13:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 12:13:32 +0000 Subject: [issue36915] regrtest: when interrupted, temporary directory is not removed In-Reply-To: <1557835507.9.0.901051073741.issue36915@roundup.psfhosted.org> Message-ID: <1557836012.99.0.801948067399.issue36915@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13222 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:14:18 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 14 May 2019 12:14:18 +0000 Subject: [issue32995] Add a glossary entry for context variables In-Reply-To: <1520244692.22.0.467229070634.issue32995@psf.upfronthosting.co.za> Message-ID: <1557836058.88.0.693984567696.issue32995@roundup.psfhosted.org> Cheryl Sabella added the comment: @vinu2003, thank you for the pull request! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:24:50 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 12:24:50 +0000 Subject: [issue32995] Add a glossary entry for context variables In-Reply-To: <1520244692.22.0.467229070634.issue32995@psf.upfronthosting.co.za> Message-ID: <1557836690.43.0.809816266929.issue32995@roundup.psfhosted.org> miss-islington added the comment: New changeset 8b3823ae16d68cf17ad037e46d7e49d26929a13b by Miss Islington (bot) in branch '3.7': bpo-32995 - Added context variable in glossary (GH-9741) https://github.com/python/cpython/commit/8b3823ae16d68cf17ad037e46d7e49d26929a13b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:35:05 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 May 2019 12:35:05 +0000 Subject: [issue36916] Swallow unhandled exception report introduced by 36802 Message-ID: <1557837305.49.0.626105934017.issue36916@roundup.psfhosted.org> New submission from Andrew Svetlov : In #36802 when old-style writer.write() is used without awaiting and an exception is raised from writer.drain() method asyncio reports about the unhandled exception. The proposed fix adds a done callback to task for swallowing the exception in such case. ---------- messages: 342457 nosy: asvetlov priority: normal severity: normal status: open title: Swallow unhandled exception report introduced by 36802 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:35:38 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 May 2019 12:35:38 +0000 Subject: [issue36916] Swallow unhandled exception report introduced by 36802 In-Reply-To: <1557837305.49.0.626105934017.issue36916@roundup.psfhosted.org> Message-ID: <1557837338.93.0.940846366343.issue36916@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- components: +Library (Lib), asyncio nosy: +yselivanov type: -> behavior versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:37:53 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 May 2019 12:37:53 +0000 Subject: [issue36916] Swallow unhandled exception report introduced by 36802 In-Reply-To: <1557837305.49.0.626105934017.issue36916@roundup.psfhosted.org> Message-ID: <1557837473.76.0.428048042204.issue36916@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13223 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 08:56:15 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 14 May 2019 12:56:15 +0000 Subject: [issue9584] fnmatch, glob: Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1557838575.96.0.427316719898.issue9584@roundup.psfhosted.org> Cheryl Sabella added the comment: @Mat?? Valo, thank you for the pull request and for your interest in contributing to CPython. It seems that consensus hadn't been reached during the previous discussion on this issue, which is why msg175217 suggested creating a discussion on python-dev. Most likely, your patch won't be reviewed until some more discussion takes place. Please open a topic on python-dev and then link to that topic once the details are hashed out. Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 09:07:12 2019 From: report at bugs.python.org (sam jonas) Date: Tue, 14 May 2019 13:07:12 +0000 Subject: [issue36790] test_asyncio fails with application verifier! In-Reply-To: <1556928611.19.0.664021052346.issue36790@roundup.psfhosted.org> Message-ID: <1557839232.82.0.790582203508.issue36790@roundup.psfhosted.org> sam jonas added the comment: Thanks for the solution... ---------- nosy: +samjonas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 09:11:13 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 May 2019 13:11:13 +0000 Subject: [issue36790] test_asyncio fails with application verifier! In-Reply-To: <1556928611.19.0.664021052346.issue36790@roundup.psfhosted.org> Message-ID: <1557839473.63.0.56522508412.issue36790@roundup.psfhosted.org> Andrew Svetlov added the comment: What is "Application Verifier"? Could you provide an instruction on how to install and run it to reproduce the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 09:49:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 13:49:23 +0000 Subject: [issue36915] regrtest: when interrupted, temporary directory is not removed In-Reply-To: <1557835507.9.0.901051073741.issue36915@roundup.psfhosted.org> Message-ID: <1557841763.09.0.590566512076.issue36915@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3c93153f7db5dd9b06f229e61978fd9199b3c097 by Victor Stinner in branch 'master': bpo-36915: regrtest always remove tempdir of worker processes (GH-13312) https://github.com/python/cpython/commit/3c93153f7db5dd9b06f229e61978fd9199b3c097 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 09:50:14 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 13:50:14 +0000 Subject: [issue36915] regrtest: when interrupted, temporary directory is not removed In-Reply-To: <1557835507.9.0.901051073741.issue36915@roundup.psfhosted.org> Message-ID: <1557841814.31.0.594382282352.issue36915@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13224 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:01:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 14:01:56 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1557842516.97.0.44353045282.issue36870@roundup.psfhosted.org> STINNER Victor added the comment: Maybe the test started to fail randomly after this change: commit 1cc0ee7d9f6a2817918fafd24c18d8bb093a85d3 Author: Andrew Svetlov Date: Tue May 7 16:53:19 2019 -0400 bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098) The test is quite old, added in bpo-25441: commit c44ecdf687897a20f11d0c5212b51e8d31f6100a Author: Guido van Rossum Date: Mon Oct 19 11:49:30 2015 -0700 Issue #25441: asyncio: Raise error from drain() when socket is closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:21:22 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 14 May 2019 14:21:22 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str Message-ID: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> New submission from Anthony Sottile : More fallout from the Constant change in https://bugs.python.org/issue32892 minimal reproduction: import ast class V(ast.NodeVisitor): def visit_Str(self, node): print(node.s) def main(): V().visit(ast.parse('x = "hi"')) if __name__ == '__main__': exit(main()) $ python3.7 t.py hi $ python3.8 t.py $ python3.8 --version --version Python 3.8.0a4 (default, May 8 2019, 01:43:53) [GCC 7.4.0] ---------- components: Library (Lib) messages: 342463 nosy: Anthony Sottile, serhiy.storchaka priority: normal severity: normal status: open title: ast.NodeVisitor no longer calls visit_Str versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:22:36 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 14:22:36 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1557843756.25.0.536618174334.issue1875@roundup.psfhosted.org> St?phane Wirtel added the comment: With the last 2.7 and 3.7, I can import the x module and the 'hello' is automatically printed. Python 2.7.15 (default, Oct 15 2018, 15:26:09) [GCC 8.2.1 20180801 (Red Hat 8.2.1-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import x hello Python 3.7.3 (default, Apr 2 2019, 06:55:20) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import x hello >>> content = open('x.py').read() >>> import dis >>> dis.dis(content) 1 0 LOAD_NAME 0 (print) 2 LOAD_CONST 0 ('hello') 4 CALL_FUNCTION 1 6 POP_TOP 3 8 LOAD_CONST 1 (None) 10 RETURN_VALUE but because I am not sure about this issue, I prefer to ask Serhiy. Can we close it? Thank you ---------- nosy: +matrixise, serhiy.storchaka versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:25:27 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 14:25:27 +0000 Subject: [issue3020] doctest should have lib2to3 integration In-Reply-To: <1212331047.91.0.677781535819.issue3020@psf.upfronthosting.co.za> Message-ID: <1557843927.18.0.104040595576.issue3020@roundup.psfhosted.org> St?phane Wirtel added the comment: I move this issue to the last stable 3.7 and master. ---------- nosy: +matrixise versions: +Python 3.7, Python 3.8 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:27:16 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 14:27:16 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1557844036.92.0.872711054278.issue2053@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- nosy: +cheryl.sabella versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:34:28 2019 From: report at bugs.python.org (R. David Murray) Date: Tue, 14 May 2019 14:34:28 +0000 Subject: [issue36910] Certain Malformed email causes email.parser to throw AttributeError In-Reply-To: <1557798519.08.0.310106320232.issue36910@roundup.psfhosted.org> Message-ID: <1557844468.91.0.568603737918.issue36910@roundup.psfhosted.org> R. David Murray added the comment: Not a security issue, no. This isn't C where a stack overflow can give an attacker a vector for injecting arbitrary code. Per the Parser contract ("raise no exceptions, only register defects"), this should, as you say, register a defect (email.errors.InvalidMultipartContentTransferEncodingDefect) and assume a CTE of 7bit for the rest of the parsing. The problem here is that the feedparser is running into the "hack" I put in place in python3.2 for dealing with invalid binary data in headers (which is to turn it into a Header with charset unknown-8bit). That works most of the time, but in cases like this it breaks down :( Note that the new API (policy=default and friends) handles this without error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:35:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 14:35:37 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1557844537.49.0.147701019213.issue36870@roundup.psfhosted.org> STINNER Victor added the comment: Another candidate: commit a076e4f5e42b85664693191d04cfb33e2f9acfa5 (refs/bisect/bad) Author: Andrew Svetlov Date: Thu May 9 15:14:58 2019 -0400 bpo-36802: Drop awrite()/aclose(), support await write() and await close() instead (#13099) Before this commit, the test pass. After this commit, the test still pass but logs a warning: vstinner at WIN C:\vstinner\python\master>python -m test test_asyncio -m test_drain_raises -v (...) test_drain_raises (test.test_asyncio.test_streams.StreamTests) ... Task exception was never retrieved future: exception=ConnectionAbor tedError(10053, 'An established connection was aborted by the software in your host machine', None, 10053, None)> Traceback (most recent call last): File "C:\vstinner\python\master\lib\asyncio\streams.py", line 434, in drain await fut File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 370, in _loop_writing self._write_fut = self._loop._proactor.send(self._sock, data) File "C:\vstinner\python\master\lib\asyncio\windows_events.py", line 488, in send ov.WSASend(conn.fileno(), buf, flags) ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine ok (...) Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:35:53 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 14:35:53 +0000 Subject: [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1557844553.95.0.539858466769.issue2897@roundup.psfhosted.org> St?phane Wirtel added the comment: I move this issue to master (3.8) ---------- nosy: +matrixise, vstinner versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:36:45 2019 From: report at bugs.python.org (R. David Murray) Date: Tue, 14 May 2019 14:36:45 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1557844605.99.0.883834536148.issue34424@roundup.psfhosted.org> R. David Murray added the comment: Thank you. I don't believe this is a security issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:40:59 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 14 May 2019 14:40:59 +0000 Subject: [issue32892] Remove specific constant AST types in favor of ast.Constant In-Reply-To: <1519204597.27.0.467229070634.issue32892@psf.upfronthosting.co.za> Message-ID: <1557844859.87.0.97336321805.issue32892@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 10:41:08 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 14 May 2019 14:41:08 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557844868.09.0.0727458667389.issue36917@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:04:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 15:04:51 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557846291.24.0.876414351949.issue30458@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13225 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:09:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 15:09:30 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1557846570.22.0.995458203195.issue30458@roundup.psfhosted.org> STINNER Victor added the comment: I backported the fix from Python 3.7 to Python 2.7: PR 13315. Please review it carefully, I had to make multiple changes to adapt the fix to Python 2: * non-ASCII characters are explicitly rejected * urllib doesn't reject control characters: they are quoted properly, so I addapted test_urllib * urllib2 doesn't quote the URL and so reject control characters, I added tests to test_urllib2 * I replaced http.client with httplib * I replaced urllib.request with urllib or urllib2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:13:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 15:13:45 +0000 Subject: [issue36802] Revert back StreamWriter awrite/aclose but provide await writer.write() and await writer.close() In-Reply-To: <1557065452.04.0.483828473478.issue36802@roundup.psfhosted.org> Message-ID: <1557846825.43.0.811695558049.issue36802@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13226 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:14:16 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 14 May 2019 15:14:16 +0000 Subject: [issue3620] test_smtplib is flaky In-Reply-To: <1219244969.03.0.636728598981.issue3620@psf.upfronthosting.co.za> Message-ID: <1557846856.63.0.80088004707.issue3620@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:22:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 15:22:34 +0000 Subject: [issue36802] Revert back StreamWriter awrite/aclose but provide await writer.write() and await writer.close() In-Reply-To: <1557065452.04.0.483828473478.issue36802@roundup.psfhosted.org> Message-ID: <1557847354.07.0.544652672643.issue36802@roundup.psfhosted.org> STINNER Victor added the comment: It seems like the commit a076e4f5e42b85664693191d04cfb33e2f9acfa5 introduced a regression: bpo-36870, test_drain_raises() of test_asyncio started to fail randomly, mostly on Windows. bpo-36870 is making AppVeyor failing on pull requests and make Windows buildbots fail randomly. I wrote PR 13316 to revert the commit to get more time to find a proper fix. https://pythondev.readthedocs.io/ci.html#revert-on-fail ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:24:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 15:24:07 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1557847447.44.0.779522935928.issue36870@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 13316 to revert the commit a076e4f5e42b85664693191d04cfb33e2f9acfa5 of bpo-36802: https://bugs.python.org/issue36802#msg342471 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:25:11 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 15:25:11 +0000 Subject: [issue36915] regrtest: when interrupted, temporary directory is not removed In-Reply-To: <1557835507.9.0.901051073741.issue36915@roundup.psfhosted.org> Message-ID: <1557847511.74.0.870373232386.issue36915@roundup.psfhosted.org> miss-islington added the comment: New changeset ecd668d6d99ff03166427f02347454cfdf904a6c by Miss Islington (bot) in branch '3.7': bpo-36915: regrtest always remove tempdir of worker processes (GH-13312) https://github.com/python/cpython/commit/ecd668d6d99ff03166427f02347454cfdf904a6c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:26:23 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 14 May 2019 15:26:23 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557847583.67.0.382413711493.issue36917@roundup.psfhosted.org> Anthony Sottile added the comment: wrong bpo, this is the right one: https://bugs.python.org/issue32892 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:27:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 15:27:00 +0000 Subject: [issue36915] regrtest: when interrupted, temporary directory is not removed In-Reply-To: <1557835507.9.0.901051073741.issue36915@roundup.psfhosted.org> Message-ID: <1557847620.3.0.480579807589.issue36915@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:31:09 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 14 May 2019 15:31:09 +0000 Subject: [issue32177] spammers mine emails from bugs.python.org In-Reply-To: <1512028817.25.0.213398074469.issue32177@psf.upfronthosting.co.za> Message-ID: <1557847869.74.0.91529205476.issue32177@roundup.psfhosted.org> SilentGhost added the comment: Meta tracker hasn't been available for a while but the issues can be reported at https://github.com/python/bugs.python.org/issues ---------- nosy: +SilentGhost resolution: -> third party stage: -> resolved status: open -> closed type: security -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:32:40 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 May 2019 15:32:40 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1557847960.69.0.834938459493.issue36870@roundup.psfhosted.org> Andrew Svetlov added the comment: Please postpone the reversion for a while. I think #36916 fixes a message about the never retrieved exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:33:01 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 14 May 2019 15:33:01 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1557847981.04.0.211243375061.issue36906@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi, I have been looking to get more acquainted with the peephole optimizer. Is it okay if I work on this? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:35:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 15:35:11 +0000 Subject: [issue36900] Use _PyCoreConfig rather than global configuration variables In-Reply-To: <1557745648.65.0.648187833126.issue36900@roundup.psfhosted.org> Message-ID: <1557848111.87.0.643292837283.issue36900@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c96be811fa7da8ddcea18cc7abcae94e0f5ff966 by Victor Stinner in branch 'master': bpo-36900: Replace global conf vars with config (GH-13299) https://github.com/python/cpython/commit/c96be811fa7da8ddcea18cc7abcae94e0f5ff966 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:35:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 15:35:57 +0000 Subject: [issue36900] Use _PyCoreConfig rather than global configuration variables In-Reply-To: <1557745648.65.0.648187833126.issue36900@roundup.psfhosted.org> Message-ID: <1557848157.55.0.406967331507.issue36900@roundup.psfhosted.org> STINNER Victor added the comment: There are a few remaining usage of these global configuration variables, but it will be tricky to remove them: https://bugs.python.org/issue36900#msg342398 I consider that I'm done on this topic, so I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 11:59:28 2019 From: report at bugs.python.org (Mark Sapiro) Date: Tue, 14 May 2019 15:59:28 +0000 Subject: [issue36910] Certain Malformed email causes email.parser to throw AttributeError In-Reply-To: <1557798519.08.0.310106320232.issue36910@roundup.psfhosted.org> Message-ID: <1557849568.37.0.862063553075.issue36910@roundup.psfhosted.org> Mark Sapiro added the comment: I do intend to submit a PR. I haven't yet worked it out though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:00:32 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 16:00:32 +0000 Subject: [issue18478] Class bodies: when does a name become local? In-Reply-To: <1374017954.45.0.193690883208.issue18478@psf.upfronthosting.co.za> Message-ID: <1557849632.26.0.730793778693.issue18478@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +13227 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:01:47 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 16:01:47 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1557849707.42.0.401599313928.issue18748@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +13228 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:02:26 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 16:02:26 +0000 Subject: [issue18478] Class bodies: when does a name become local? In-Reply-To: <1374017954.45.0.193690883208.issue18478@psf.upfronthosting.co.za> Message-ID: <1557849746.02.0.325727058265.issue18478@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: -13227 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:09:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 16:09:54 +0000 Subject: [issue36916] Swallow unhandled exception report introduced by 36802 In-Reply-To: <1557837305.49.0.626105934017.issue36916@roundup.psfhosted.org> Message-ID: <1557850194.86.0.741122523146.issue36916@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f12ba7cd0a7370631214ac0b337ab5455ce717b2 by Victor Stinner (Andrew Svetlov) in branch 'master': bpo-36916: asyncio: Swallow unhandled write() exception (GH-13313) https://github.com/python/cpython/commit/f12ba7cd0a7370631214ac0b337ab5455ce717b2 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:20:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 16:20:27 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557850827.22.0.0322649096636.issue36829@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: CLI option to make PyErr_WriteUnraisable abort the current process -> Add sys.unraisablehook() to custom how "unraisable exceptions" are logged _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:22:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 16:22:43 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557850963.13.0.248801888257.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: I'm interested to modify regrtest (test runner of the Python test suite) to use sys.unraisablehook(). It would be nice to add an option to display again *all* unraisable exceptions in the test summary, at the end. I did a similar experimentation for any warnings, so my implementation was fragile because regrtest was hard to extend. That's why I introduced a new TestResult type: to be able to add more fields without breaking all the code. Prevously, a test result was a tuple which was manually unpacked. So adding a new field could break code which wasn't updated to handle new fields. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:23:46 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 16:23:46 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1557851026.99.0.343975134977.issue18748@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I was wrong so removing the close call when io_refs gets to zero causes error on test_urllib2 [0] where close is asserted to be True and I only tested test_urllib initially. One another way would be to check for fp.closed in http.client before flushing but as mentioned before I am not sure of the attribute being always present and also to modify http.client code just for tests. [0] https://github.com/python/cpython/blob/f12ba7cd0a7370631214ac0b337ab5455ce717b2/Lib/test/test_urllib2.py#L1685 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:29:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 16:29:28 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1557851368.77.0.437828547914.issue18748@roundup.psfhosted.org> STINNER Victor added the comment: Karthikeyan Singaravelan: Would you mind to open a separated issue for test_urllib warnings? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:36:23 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 16:36:23 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1557851783.19.0.567505479031.issue27987@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13229 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:39:54 2019 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 14 May 2019 16:39:54 +0000 Subject: [issue3020] doctest should have lib2to3 integration In-Reply-To: <1212331047.91.0.677781535819.issue3020@psf.upfronthosting.co.za> Message-ID: <1557851994.27.0.754486739614.issue3020@roundup.psfhosted.org> Stefan Behnel added the comment: I'm closing this old ticket. Python 2 will be dead by the time someone gets around to do something about it. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:41:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 16:41:09 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1557852069.12.0.658389385315.issue27987@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13230 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:46:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 16:46:51 +0000 Subject: [issue36618] clang expects memory aligned on 16 bytes, but pymalloc aligns to 8 bytes In-Reply-To: <1555090582.18.0.289146441616.issue36618@roundup.psfhosted.org> Message-ID: <1557852411.41.0.0652795585112.issue36618@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13231 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:52:56 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 14 May 2019 16:52:56 +0000 Subject: [issue32892] Remove specific constant AST types in favor of ast.Constant In-Reply-To: <1519204597.27.0.467229070634.issue32892@psf.upfronthosting.co.za> Message-ID: <1557852776.41.0.421716387578.issue32892@roundup.psfhosted.org> Anthony Sottile added the comment: hitting this in https://bugs.python.org/issue36917? Is the simplification here really worth the breaking change to consumers? I now have to write something that's essentially this to work around this which feels more like the complexity has just been pushed to users instead of the stdlib: def visit_Constant(self, node): if isinstance(node.value, str): self.visit_Str(node) elif isinstance(node.value, bytes): self.visit_Bytes(node) elif node.value in {True, False}: self.visit_NameConstant(node) elif node.value is Ellipsis: self.visit_Ellipsis(node) elif isinstance(node.value, (int, float)): self.visit_Num(node) else: # etc... ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:55:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 16:55:27 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1557852927.21.0.363323360238.issue33529@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c1f5667be1e3ec5871560c677402c1252c6018a6 by Victor Stinner (Krzysztof Wojcik) in branch 'master': bpo-33529, email: Fix infinite loop in email header encoding (GH-12020) https://github.com/python/cpython/commit/c1f5667be1e3ec5871560c677402c1252c6018a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 12:55:43 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 16:55:43 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1557852943.44.0.660755201887.issue33529@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13232 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 13:00:11 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 14 May 2019 17:00:11 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1557853211.77.0.556457403866.issue36906@roundup.psfhosted.org> Gregory P. Smith added the comment: I'd say go for it. We can't guarantee we'll accept the feature yet, but I think the .dedent() method with an optimization pass approach is worthwhile making a proof of concept of regardless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 13:15:18 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 14 May 2019 17:15:18 +0000 Subject: [issue35926] Need openssl 1.1.1 support on Windows for ARM and ARM64 In-Reply-To: <1549508003.09.0.398179114845.issue35926@roundup.psfhosted.org> Message-ID: <1557854118.9.0.608047016453.issue35926@roundup.psfhosted.org> Steve Dower added the comment: This PR has stalled because of errors raised by TLS 1.3 It seems that there may be a difference between sockets on Windows being non-blocking by default and other platforms being blocking by default. However, we think that is probably just causes TLS 1.3/OpenSSL 1.1.1b errors to show up in different places. Has anyone figured out the TLS 1.3 issues yet? Also, does anyone know why we default to different sockets on Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 13:29:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 17:29:55 +0000 Subject: [issue36618] clang expects memory aligned on 16 bytes, but pymalloc aligns to 8 bytes In-Reply-To: <1555090582.18.0.289146441616.issue36618@roundup.psfhosted.org> Message-ID: <1557854995.94.0.252008525867.issue36618@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d97adfb409290a1e4ad549e4af58cacea86d3358 by Victor Stinner in branch 'master': bpo-36618: Don't add -fmax-type-align=8 flag for clang (GH-13320) https://github.com/python/cpython/commit/d97adfb409290a1e4ad549e4af58cacea86d3358 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 13:31:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 17:31:20 +0000 Subject: [issue36618] clang expects memory aligned on 16 bytes, but pymalloc aligns to 8 bytes In-Reply-To: <1555090582.18.0.289146441616.issue36618@roundup.psfhosted.org> Message-ID: <1557855080.76.0.4431863006.issue36618@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.8 now respects the x86-64 ABI: https://bugs.python.org/issue27987 I reverted my workaround. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 13:48:01 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 14 May 2019 17:48:01 +0000 Subject: [issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT In-Reply-To: <1556642336.59.0.253389839782.issue36760@roundup.psfhosted.org> Message-ID: <1557856081.51.0.729002848749.issue36760@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +13233 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 13:48:58 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 14 May 2019 17:48:58 +0000 Subject: [issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT In-Reply-To: <1556642336.59.0.253389839782.issue36760@roundup.psfhosted.org> Message-ID: <1557856138.24.0.731895095138.issue36760@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith components: +Documentation -Library (Lib) versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 13:55:07 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 17:55:07 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor Message-ID: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : Issue for https://bugs.python.org/issue18748#msg340059. comment : Is there someone interested to debug remaining "Exception ignored:" logs in test_urllib? test_invalid_redirect (test.test_urllib.urlopen_HttpTests) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. ok test_read_bogus (test.test_urllib.urlopen_HttpTests) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. ok test_redirect_limit_independent (test.test_urllib.urlopen_HttpTests) ... Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/http/client.py", line 402, in close super().close() # set "closed" flag File "/home/vstinner/prog/python/master/Lib/http/client.py", line 415, in flush self.fp.flush() ValueError: I/O operation on closed file. ok It's unclear to be if it's a bug in http.client, a bug in the test... or something else. ---------- components: Tests messages: 342492 nosy: vstinner, xtreak priority: normal severity: normal status: open title: ValueError warning in test_urllib due to io.IOBase destructor type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 13:56:06 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 17:56:06 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1557856566.25.0.125230599105.issue18748@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Okay, opened issue36918 . Raising PR against that issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 13:56:16 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 17:56:16 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1557856576.91.0.277669571949.issue18748@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: -13228 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:04:11 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 18:04:11 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1557857051.2.0.314254713034.issue18748@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +13234 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:04:14 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 18:04:14 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1557857054.72.0.647837531359.issue36918@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13236 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:04:11 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 18:04:11 +0000 Subject: [issue18478] Class bodies: when does a name become local? In-Reply-To: <1374017954.45.0.193690883208.issue18478@psf.upfronthosting.co.za> Message-ID: <1557857051.31.0.634160306263.issue18478@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +13235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:06:10 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 May 2019 18:06:10 +0000 Subject: [issue18478] Class bodies: when does a name become local? In-Reply-To: <1374017954.45.0.193690883208.issue18478@psf.upfronthosting.co.za> Message-ID: <1557857170.24.0.278490744472.issue18478@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: -13235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:12:28 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 14 May 2019 18:12:28 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557857548.05.0.988764949852.issue36917@roundup.psfhosted.org> Matthias Bussonnier added the comment: Would it be useful to add a default implementation of `visit_Constant(self, node)` on NodeVisitor that go through all the isinstance() check and call the appropriate backward compatible method ? We would still have the simplification without having any breakage in backward compatibility. That feels like best of both worlds ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:15:57 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 18:15:57 +0000 Subject: [issue1616] compiler warnings In-Reply-To: <1197577517.45.0.829785777717.issue1616@psf.upfronthosting.co.za> Message-ID: <1557857757.74.0.388523606156.issue1616@roundup.psfhosted.org> St?phane Wirtel added the comment: Because this issue is very long and we stopped to use the version 2.x of Gcc, and migrated to a newer verson, I close this issue. Feel free to re-open it in the future or fill a new issue. ---------- nosy: +matrixise resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:16:28 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 14 May 2019 18:16:28 +0000 Subject: [issue35926] Need openssl 1.1.1 support on Windows for ARM and ARM64 In-Reply-To: <1549508003.09.0.398179114845.issue35926@roundup.psfhosted.org> Message-ID: <1557857788.33.0.148056029604.issue35926@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +13237 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:19:09 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 18:19:09 +0000 Subject: [issue16100] Compiling vim with Python 3.3 support fails In-Reply-To: <1349102758.43.0.280298808198.issue16100@psf.upfronthosting.co.za> Message-ID: <1557857949.94.0.479003509809.issue16100@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi, The used version in this issue is outdated we could close this issue but I prefer to get the feedback from Steve Dower and Zach Ware. If this issue is not relevant to 3.7+, I suggest closing this issue. ---------- nosy: +matrixise, steve.dower, zach.ware versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:30:56 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 14 May 2019 18:30:56 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557858656.5.0.965033059665.issue36917@roundup.psfhosted.org> Anthony Sottile added the comment: There would still be a breakage for that if someone was defining py36+ `visit_Constant` (which would clobber the `ast.NodeVisitor.visit_Constant` if we were to add it) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:33:34 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 18:33:34 +0000 Subject: [issue1465646] test_grp & test_pwd fail Message-ID: <1557858814.24.0.610529153815.issue1465646@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi, Thank you for your contribution, I close this issue, 2.6 and 3.0 are deprecated and I can't reproduce the errors. ---------- nosy: +matrixise resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:36:01 2019 From: report at bugs.python.org (A.M. Kuchling) Date: Tue, 14 May 2019 18:36:01 +0000 Subject: [issue34484] Unicode HOWTO incorrectly refers to Private Use Area for surrogateescape In-Reply-To: <1535058879.5.0.56676864532.issue34484@psf.upfronthosting.co.za> Message-ID: <1557858961.22.0.251991112327.issue34484@roundup.psfhosted.org> A.M. Kuchling added the comment: Yes, I think this issue can now be closed. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:39:05 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 14 May 2019 18:39:05 +0000 Subject: [issue16100] Compiling vim with Python 3.3 support fails In-Reply-To: <1349102758.43.0.280298808198.issue16100@psf.upfronthosting.co.za> Message-ID: <1557859145.85.0.271133771702.issue16100@roundup.psfhosted.org> Zachary Ware added the comment: As this appears to be a bug in Vim on an unsupported configuration with a now-unsupported version of Python, I'm closing the issue. If this is still an issue with a modern version of Python in a supported environment and can be shown to be a bug in Python rather than Vim, a new issue can be opened. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:39:18 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 14 May 2019 18:39:18 +0000 Subject: [issue16100] Compiling vim with Python 3.3 support fails In-Reply-To: <1349102758.43.0.280298808198.issue16100@psf.upfronthosting.co.za> Message-ID: <1557859158.09.0.37023337273.issue16100@roundup.psfhosted.org> Change by Zachary Ware : ---------- versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:41:33 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 14 May 2019 18:41:33 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557859293.01.0.629738165624.issue36917@roundup.psfhosted.org> Matthias Bussonnier added the comment: > There would still be a breakage for that if someone was defining py36+ `visit_Constant` (which would clobber the `ast.NodeVisitor.visit_Constant` if we were to add it) Ok, it would still break in some cases, but that would still be a net improvement for codebase that do not override visit_Constant; right ? We could also push the patch further if we really want and call explicitly NodeVisitor.visit_Constant before the overridden method in NodeVisitor.visit. Not advocating for the second part, but minimal breakage and code repetition in libraries when we can. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:41:50 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 14 May 2019 18:41:50 +0000 Subject: [issue25652] collections.UserString.__rmod__() raises NameError In-Reply-To: <1447823769.89.0.495006915909.issue25652@psf.upfronthosting.co.za> Message-ID: <1557859310.33.0.922814332639.issue25652@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +13238 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:45:54 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 18:45:54 +0000 Subject: [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <1557859554.81.0.51476220164.issue10108@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi Scoder, I am not sure if this issue is relevant for 3.7 and 3.8 but do you want to check this issue? Thank you, ---------- nosy: +matrixise, scoder versions: +Python 3.7, Python 3.8 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:55:03 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 14 May 2019 18:55:03 +0000 Subject: [issue13824] argparse.FileType opens a file and never closes it In-Reply-To: <1326975939.94.0.524131708506.issue13824@psf.upfronthosting.co.za> Message-ID: <1557860103.79.0.618769887753.issue13824@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi, Are you interested to write test cases? They could be useful for the fix. Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 14:55:56 2019 From: report at bugs.python.org (Edward Gow) Date: Tue, 14 May 2019 18:55:56 +0000 Subject: [issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition In-Reply-To: <1471355745.98.0.805545529346.issue27777@psf.upfronthosting.co.za> Message-ID: <1557860156.12.0.587658577063.issue27777@roundup.psfhosted.org> Edward Gow added the comment: This bug is triggered by xml-rpc calls from the xmlrpc.client in the Python 3.5 standard library to a mod_wsgi/Python 3.5 endpoint. ---------- nosy: +elgow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 15:12:25 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 14 May 2019 19:12:25 +0000 Subject: [issue18060] Updating _fields_ of a derived struct type yields a bad cif In-Reply-To: <1369508846.31.0.680698237225.issue18060@psf.upfronthosting.co.za> Message-ID: <1557861145.88.0.89575104492.issue18060@roundup.psfhosted.org> Jeffrey Kintscher added the comment: It still behaves as described in the 3.7 and master branches. The proposed fix works. I will submit a pull request. ---------- nosy: +websurfer5 versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 15:33:38 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 14 May 2019 19:33:38 +0000 Subject: [issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT In-Reply-To: <1556642336.59.0.253389839782.issue36760@roundup.psfhosted.org> Message-ID: <1557862418.88.0.360257412619.issue36760@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset e883091abf7ca84a88e956fe5202e75c53bd4128 by Gregory P. Smith in branch 'master': bpo-36760: Clarify subprocess capture_output docs. (GH-13322) https://github.com/python/cpython/commit/e883091abf7ca84a88e956fe5202e75c53bd4128 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 15:33:39 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 19:33:39 +0000 Subject: [issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT In-Reply-To: <1556642336.59.0.253389839782.issue36760@roundup.psfhosted.org> Message-ID: <1557862419.46.0.356013205956.issue36760@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13239 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 15:34:23 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 14 May 2019 19:34:23 +0000 Subject: [issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT In-Reply-To: <1556642336.59.0.253389839782.issue36760@roundup.psfhosted.org> Message-ID: <1557862463.67.0.538356186599.issue36760@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 15:39:23 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 14 May 2019 19:39:23 +0000 Subject: [issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT In-Reply-To: <1556642336.59.0.253389839782.issue36760@roundup.psfhosted.org> Message-ID: <1557862763.15.0.741722473623.issue36760@roundup.psfhosted.org> miss-islington added the comment: New changeset 822683238c36e15f59d289075917ff7dedb5f4e6 by Miss Islington (bot) in branch '3.7': bpo-36760: Clarify subprocess capture_output docs. (GH-13322) https://github.com/python/cpython/commit/822683238c36e15f59d289075917ff7dedb5f4e6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:02:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 20:02:04 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1557864124.63.0.794493016454.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 91c99873d115b9796377d5056785f2abc987520f by Victor Stinner in branch 'master': bpo-36763: Add test for _PyCoreConfig_SetString() (GH-13275) https://github.com/python/cpython/commit/91c99873d115b9796377d5056785f2abc987520f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:04:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 20:04:23 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557864263.58.0.279557633426.issue36801@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13240 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:08:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 20:08:12 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1557864492.64.0.420290897673.issue36870@roundup.psfhosted.org> STINNER Victor added the comment: PR 13313 has been merged into master. Let's see if it does fix this issue in master. Python 3.7 is different: streams.py doesn't have _fast_drain() which was added by commit a076e4f5e42b85664693191d04cfb33e2f9acfa5 (bpo-36802). So instead, I created PR 13328 to revert the commit 93aa57ac6594d1cc30d147720fc8a7a4e1ca2d3e of bpo-36801, to get more time to find a proper fix to Python 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:11:32 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 May 2019 20:11:32 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1557864692.35.0.452476768335.issue36870@roundup.psfhosted.org> Andrew Svetlov added the comment: Agree with your conclusion ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:11:38 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 14 May 2019 20:11:38 +0000 Subject: [issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n") In-Reply-To: <1557799343.57.0.564179832858.issue36911@roundup.psfhosted.org> Message-ID: <1557864698.55.0.267370403677.issue36911@roundup.psfhosted.org> Eric V. Smith added the comment: The existing behavior is what I'd expect. Using python3: >>> import ast >>> s = open('file.py', 'rb').read() >>> s b'"""\nHello \\n blah.\n"""\n' >>> ast.dump(ast.parse(s)) "Module(body=[Expr(value=Str(s='\\nHello \\n blah.\\n'))])" >>> eval(s) '\nHello \n blah.\n' As always with the AST, some information is lost. It's not designed to be able to round-trip back to the source text. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:12:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 20:12:49 +0000 Subject: [issue33529] [security] Infinite loop on folding email (_fold_as_ew()) if an header has no spaces In-Reply-To: <1526429548.63.0.682650639539.issue33529@psf.upfronthosting.co.za> Message-ID: <1557864769.13.0.513063779345.issue33529@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2fef5b01e36a17e36fd7e65c4b51f5ede8880dda by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-33529, email: Fix infinite loop in email header encoding (GH-12020) (GH-13321) https://github.com/python/cpython/commit/2fef5b01e36a17e36fd7e65c4b51f5ede8880dda ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:13:13 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 May 2019 20:13:13 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557864793.4.0.806528172672.issue36801@roundup.psfhosted.org> Andrew Svetlov added the comment: Looks like the change introduced by the PR is not stable at least on Windows boxes ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:26:39 2019 From: report at bugs.python.org (Amber Brown) Date: Tue, 14 May 2019 20:26:39 +0000 Subject: [issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n") In-Reply-To: <1557799343.57.0.564179832858.issue36911@roundup.psfhosted.org> Message-ID: <1557865599.78.0.829956720381.issue36911@roundup.psfhosted.org> Amber Brown added the comment: There's a difference between round-tripping back to the source text and correctly representing the text in the source, though. Since I'm using this module to perform static analysis of a Python module to retrieve class/function definitions and their docstrings to create API documentation, the string being the same as what it is in the file is important to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:28:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 20:28:23 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557865703.73.0.776893002431.issue36801@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13241 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:28:37 2019 From: report at bugs.python.org (Pavel Koneski) Date: Tue, 14 May 2019 20:28:37 +0000 Subject: [issue36919] Exception form 'compile' reports a newline char not present in input Message-ID: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> New submission from Pavel Koneski : Since Python 3.2, input in 'exec' mode of 'compile' does not have to end in a newline anymore. However, it creates a surprising behavior when a 'SyntaxError' is reported: >>> try: compile('try', '', 'exec') ... except SyntaxError as ex: print(repr(ex)) ... SyntaxError('invalid syntax', ('', 1, 4, 'try\n')) The 'text' field of the exception thrown contains an additional newline character that was not present in the input. Is it: a. Proper Python language behavior? b. CPython implementation artifact? c. A bug? In case of: a. I will submit a patch to IronPython, which does not add an extra newline at the moment. b. I can submit a patch to CPython to make StdLib tests implementation independent. c. This inquiry can serve as a bug report. ---------- components: Interpreter Core messages: 342515 nosy: BCSharp priority: normal severity: normal status: open title: Exception form 'compile' reports a newline char not present in input type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:30:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 20:30:05 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557865805.98.0.957445511931.issue36801@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c647ad9b51c59f71c02cd90c5e67d1b2768323ca by Victor Stinner in branch '3.7': Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" (GH-13328) https://github.com/python/cpython/commit/c647ad9b51c59f71c02cd90c5e67d1b2768323ca ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:37:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 20:37:01 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1557866221.64.0.382625142438.issue36870@roundup.psfhosted.org> STINNER Victor added the comment: """ commit 1cc0ee7d9f6a2817918fafd24c18d8bb093a85d3 Author: Andrew Svetlov Date: Tue May 7 16:53:19 2019 -0400 bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098) """ I reverted this change in 3.7: commit c647ad9b51c59f71c02cd90c5e67d1b2768323ca (HEAD -> 3.7, upstream/3.7) Author: Victor Stinner Date: Tue May 14 22:29:54 2019 +0200 Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" (GH-13328) This reverts commit 93aa57ac6594d1cc30d147720fc8a7a4e1ca2d3e. Without this revert, I was able to easily reproduce the failure. With the revert, I cannot reproduce it anymore: https://github.com/python/cpython/pull/13328#issuecomment-492394753 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 16:40:00 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 14 May 2019 20:40:00 +0000 Subject: [issue27810] Add METH_FASTCALL: new calling convention for C functions In-Reply-To: <1471653166.26.0.257085519078.issue27810@psf.upfronthosting.co.za> Message-ID: <1557866400.37.0.64560182747.issue27810@roundup.psfhosted.org> Jeroen Demeyer added the comment: Breakage due to the usage of borrowed references in _PyStack_UnpackDict(): #36907 ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 17:00:29 2019 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 14 May 2019 21:00:29 +0000 Subject: [issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n") In-Reply-To: <1557799343.57.0.564179832858.issue36911@roundup.psfhosted.org> Message-ID: <1557867629.8.0.559582462193.issue36911@roundup.psfhosted.org> Mark Dickinson added the comment: The AST _does_ correctly represent the Python string object in the source, though. After: >>> s = """ ... Hello \n world ... """ we have a Python object `s` of type `str`, which contains exactly three newlines, zero "n" characters, and zero backslashes. So: >>> s == '\nHello \n world\n' True If the AST Str node value were '\nHello \\\n world\n' as you suggest, that would represent a different string to `s`: one containing two newline characters, one "n" and one backslash. If you need to operate directly on the source as text, then the AST representation probably isn't what you want. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 17:05:46 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 May 2019 21:05:46 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557867946.41.0.253109256.issue36801@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13242 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 17:35:57 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 14 May 2019 21:35:57 +0000 Subject: [issue18060] Updating _fields_ of a derived struct type yields a bad cif In-Reply-To: <1369508846.31.0.680698237225.issue18060@psf.upfronthosting.co.za> Message-ID: <1557869757.35.0.855738087924.issue18060@roundup.psfhosted.org> Jeffrey Kintscher added the comment: While the fix works as advertised, it breaks a similar existing test case: ====================================================================== ERROR: test_positional_args (ctypes.test.test_structures.StructureTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/jeff/sandbox/src/python3.7/cpython/Lib/ctypes/test/test_structures.py", line 390, in test_positional_args z = Z(1, 2, 3, 4, 5, 6) IndexError: list index out of range ---------------------------------------------------------------------- Below is the relevant test code: class W(Structure): _fields_ = [("a", c_int), ("b", c_int)] class X(W): _fields_ = [("c", c_int)] class Y(X): pass class Z(Y): _fields_ = [("d", c_int), ("e", c_int), ("f", c_int)] z = Z(1, 2, 3, 4, 5, 6) It similar but slightly different from the provided test case: libm = CDLL(find_library('m')) class Base(Structure): _fields_ = [('y', c_double), ('x', c_double)] class Mid(Base): pass Mid._fields_ = [] class Vector(Mid): pass libm.atan2.argtypes = [Vector] libm.atan2.restype = c_double arg = Vector(y=0.0, x=-1.0) I will do some more digging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 17:39:18 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 May 2019 21:39:18 +0000 Subject: [issue36801] Wait for connection_lost in StreamWriter.drain In-Reply-To: <1557063872.25.0.865813796999.issue36801@roundup.psfhosted.org> Message-ID: <1557869958.31.0.939628596168.issue36801@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 54b74fe9df89f0e5646736f1f60376b4e37c422c by Andrew Svetlov in branch 'master': bpo-36801: Temporarily fix regression in writer.drain() (#13330) https://github.com/python/cpython/commit/54b74fe9df89f0e5646736f1f60376b4e37c422c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 17:44:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 21:44:37 +0000 Subject: [issue36870] test_asyncio: test_drain_raises() fails randomly on Windows In-Reply-To: <1557449871.52.0.351453555458.issue36870@roundup.psfhosted.org> Message-ID: <1557870277.88.0.493183978358.issue36870@roundup.psfhosted.org> STINNER Victor added the comment: Andrew merged https://github.com/python/cpython/pull/13330 into master, it should fix this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 18:56:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 22:56:57 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1557874617.26.0.627269921492.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13243 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 19:05:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 May 2019 23:05:52 +0000 Subject: [issue35197] graminit.h defines very generic names like 'stmt' or 'test' In-Reply-To: <1541772404.82.0.788709270274.issue35197@psf.upfronthosting.co.za> Message-ID: <1557875152.94.0.779308423796.issue35197@roundup.psfhosted.org> STINNER Victor added the comment: Another common issue with Python-ast.h, I just saw it on Windows: compile.c c:\program files (x86)\windows kits\10\include\10.0.17134.0\um\winbase.h(102): warning C4005: 'Yield': macro redefinition [C:\vstinner\python\master\PCbuild\pythoncore .vcxproj] c:\vstinner\python\master\include\python-ast.h(627): note: see previous definition of 'Yield' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 19:12:53 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 14 May 2019 23:12:53 +0000 Subject: [issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n") In-Reply-To: <1557799343.57.0.564179832858.issue36911@roundup.psfhosted.org> Message-ID: <1557875573.6.0.220917300778.issue36911@roundup.psfhosted.org> Eric V. Smith added the comment: I agree with Mark: the string is being correctly interpreted by the AST parser, per Python's tokenizer rules. You might want to look at lib2to3, which I think is also used by black. It's also possible that mypy or another static analyzer would be using some library you can leverage. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 19:17:12 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 May 2019 23:17:12 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1557875832.81.0.548408995038.issue36906@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 19:27:14 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 May 2019 23:27:14 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1557876434.11.0.0188512560436.issue1875@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The issue is not fixed. The problem is that this still allows invalid syntax because the code is optimized away: def f(): if 0: break print("Hello") f() ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 20:11:50 2019 From: report at bugs.python.org (Alexander Riccio) Date: Wed, 15 May 2019 00:11:50 +0000 Subject: [issue36790] test_asyncio fails with application verifier! In-Reply-To: <1556928611.19.0.664021052346.issue36790@roundup.psfhosted.org> Message-ID: <1557879110.7.0.110641147503.issue36790@roundup.psfhosted.org> Alexander Riccio added the comment: It's part of the Windows SDK, and is installed with it. To enable for this error, add the Python executable in Application Verifier, and check the Handles box. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 20:13:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 00:13:00 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1557879180.03.0.819934907022.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5eb8b07f87c66a9ca54fcb90737753ce76a3054d by Victor Stinner in branch 'master': bpo-36763: InitConfigTests tests all core config (GH-13331) https://github.com/python/cpython/commit/5eb8b07f87c66a9ca54fcb90737753ce76a3054d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 20:27:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 15 May 2019 00:27:25 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1557880045.16.0.160037954399.issue1875@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13244 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 21:34:47 2019 From: report at bugs.python.org (Windson Yang) Date: Wed, 15 May 2019 01:34:47 +0000 Subject: [issue26124] shlex.quote and pipes.quote do not quote shell keywords In-Reply-To: <1452863681.04.0.149848593597.issue26124@psf.upfronthosting.co.za> Message-ID: <1557884087.62.0.501227407735.issue26124@roundup.psfhosted.org> Change by Windson Yang : ---------- keywords: +patch pull_requests: +13245 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:02:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:02:13 +0000 Subject: [issue16961] No regression tests for -E and individual environment vars In-Reply-To: <1358164994.53.0.497203238771.issue16961@psf.upfronthosting.co.za> Message-ID: <1557885733.37.0.0959938790622.issue16961@roundup.psfhosted.org> STINNER Victor added the comment: I added a lot of tests on environment variables and -I/-E options in test_embed. I consider that this issue is now fixed. ---------- nosy: +vstinner resolution: out of date -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:03:29 2019 From: report at bugs.python.org (Udi Meiri) Date: Wed, 15 May 2019 02:03:29 +0000 Subject: [issue36920] inspect.getcallargs sees optional arg to builtin as required Message-ID: <1557885809.35.0.0229737900946.issue36920@roundup.psfhosted.org> New submission from Udi Meiri : $ python3.7 Python 3.7.3rc1 (default, Mar 13 2019, 11:01:15) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import inspect >>> inspect.getfullargspec(str.strip) FullArgSpec(args=['self', 'chars'], varargs=None, varkw=None, defaults=None, kwonlyargs=[], kwonlydefaults=None, annotations={}) >>> inspect.signature(str.strip) >>> inspect.signature(str.strip).bind('a') >>> inspect.getcallargs(str.strip, 'a') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.7/inspect.py", line 1372, in getcallargs _missing_arguments(f_name, req, True, arg2value) File "/usr/lib/python3.7/inspect.py", line 1302, in _missing_arguments "" if missing == 1 else "s", s)) TypeError: strip() missing 1 required positional argument: 'chars' ---------- components: Library (Lib) messages: 342529 nosy: Udi Meiri priority: normal severity: normal status: open title: inspect.getcallargs sees optional arg to builtin as required type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:07:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:07:27 +0000 Subject: [issue33919] Expose _PyCoreConfig structure to Python In-Reply-To: <1529525175.44.0.56676864532.issue33919@psf.upfronthosting.co.za> Message-ID: <1557886047.2.0.702623114719.issue33919@roundup.psfhosted.org> STINNER Victor added the comment: Update. I implemented _testinternalcapi.get_configs() which exports *all* Python configuration used to initialize Python. It contains the hash seed for example. The function is only written for tests. Moreover, I proposed the PEP 587 to expose the new _PyCoreConfig as a public C API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:08:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:08:39 +0000 Subject: [issue22257] PEP 432: Redesign the interpreter startup sequence In-Reply-To: <1408789351.84.0.0171822343712.issue22257@psf.upfronthosting.co.za> Message-ID: <1557886119.01.0.299028898212.issue22257@roundup.psfhosted.org> STINNER Victor added the comment: Update: I proposed the PEP 587 to expose the _PyCoreConfig API in public. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:10:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:10:47 +0000 Subject: [issue32231] -bb option should override -W options In-Reply-To: <1512556995.36.0.213398074469.issue32231@psf.upfronthosting.co.za> Message-ID: <1557886247.87.0.642798557654.issue32231@roundup.psfhosted.org> Change by STINNER Victor : ---------- stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:22:02 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 15 May 2019 02:22:02 +0000 Subject: [issue18060] Updating _fields_ of a derived struct type yields a bad cif In-Reply-To: <1369508846.31.0.680698237225.issue18060@psf.upfronthosting.co.za> Message-ID: <1557886922.32.0.266254756784.issue18060@roundup.psfhosted.org> Jeffrey Kintscher added the comment: The current behavior, stgdict->length = len; sets the number of elements in the class excluding its base classes. The new behavior of stgdict->length = ffi_ofs + len; sets the total number of elements in both the class and its base classes. This works as intended as long as the child classes do not add any more elements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:23:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:23:01 +0000 Subject: [issue26122] Isolated mode doesn't ignore PYTHONHASHSEED In-Reply-To: <1452862094.75.0.964095204421.issue26122@psf.upfronthosting.co.za> Message-ID: <1557886981.84.0.910024691827.issue26122@roundup.psfhosted.org> STINNER Victor added the comment: This issue has been fixed in Python 3.8 with my work on refactoring Py_Main(). -E and -I command line options are now parsed, before reading PYTHONHASHSEED, and -I imply -E as expected. Extract of the code: if (config->isolated > 0) { config->user_site_directory = 0; } if (config->use_environment) { err = config_read_env_vars(config); if (_Py_INIT_FAILED(err)) { return err; } } where config_read_env_vars() indirectly reads PYTHONHASHSEED. I'm not sure if the issue is fixed in Python 3.7 or not. The code in Python 3.7 was in a bad state. It's getting better with Python 3.8 :-) Note: the overall refactoring work is related to PEP 432 and PEP 587. ---------- components: +Interpreter Core resolution: -> fixed stage: test needed -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:32:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:32:22 +0000 Subject: [issue34579] test_embed.InitConfigTests fail on AIX In-Reply-To: <1536073612.09.0.56676864532.issue34579@psf.upfronthosting.co.za> Message-ID: <1557887542.48.0.026599822404.issue34579@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:32:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:32:57 +0000 Subject: [issue26515] Update extending/embedding docs to new way to build modules in C In-Reply-To: <1457491421.2.0.684118231911.issue26515@psf.upfronthosting.co.za> Message-ID: <1557887577.33.0.715920990285.issue26515@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:33:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:33:12 +0000 Subject: [issue34255] test_embed skipped when srcdir != builddir In-Reply-To: <1532769822.63.0.56676864532.issue34255@psf.upfronthosting.co.za> Message-ID: <1557887592.91.0.833665541074.issue34255@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:34:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:34:37 +0000 Subject: [issue30905] Embedding should have public API for interactive mode In-Reply-To: <1499783657.19.0.814858997931.issue30905@psf.upfronthosting.co.za> Message-ID: <1557887677.88.0.590097263453.issue30905@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:39:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:39:04 +0000 Subject: [issue23603] Embedding Python3.4 - PyUnicode_Check fails (MinGW-W64) In-Reply-To: <1425758526.01.0.875818979723.issue23603@psf.upfronthosting.co.za> Message-ID: <1557887944.96.0.0456945537863.issue23603@roundup.psfhosted.org> STINNER Victor added the comment: No activity for 4 years. I close the issue. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:40:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:40:25 +0000 Subject: [issue13320] _remove_visual_c_ref in distutils.msvc9compiler causes DLL load fail with embedded Python and multiple CRT versions In-Reply-To: <1320196634.59.0.302796026714.issue13320@psf.upfronthosting.co.za> Message-ID: <1557888025.56.0.625776890914.issue13320@roundup.psfhosted.org> STINNER Victor added the comment: No activity for 8 years, I close the issue. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:42:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:42:41 +0000 Subject: [issue2921] enable embedding: declare/#define only py* symbols in #includes In-Reply-To: <1211232563.03.0.480695098403.issue2921@psf.upfronthosting.co.za> Message-ID: <1557888161.51.0.992811956834.issue2921@roundup.psfhosted.org> STINNER Victor added the comment: Since this issue has been reported, a lot of work has been done to cleanup Python header files. In Python 3.8, we created Include/cpython/ and Include/internal/ subdirectories to clarify the intent and usage of header files. I close this issue. See bpo-2897 for the specific case of structmember.h. ---------- dependencies: -Deprecate structmember.h resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:45:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:45:20 +0000 Subject: [issue31473] Debug hooks on memory allocators are not thread safe (serialno variable) In-Reply-To: <1505410594.97.0.693915173163.issue31473@psf.upfronthosting.co.za> Message-ID: <1557888320.9.0.693823424454.issue31473@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.8 has been fixed. I disabled serialno field by default: PYMEM_DEBUG_SERIALNO is not defined by default. You have to opt-in to get this bug :-) I don't see any easy fix older Python versions. I close the issue. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:48:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:48:29 +0000 Subject: [issue30633] Python 3.6.1 installation issues on OpenSuse 42.1: ModuleNotFoundError: No module named 'encodings' In-Reply-To: <1497257009.22.0.916205252409.issue30633@psf.upfronthosting.co.za> Message-ID: <1557888509.85.0.393032940738.issue30633@roundup.psfhosted.org> STINNER Victor added the comment: No activity for almost 2 years, I close the issue. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:53:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:53:12 +0000 Subject: [issue29818] Py_SetStandardStreamEncoding leads to a memory error in debug mode In-Reply-To: <1489577259.98.0.691600629889.issue29818@psf.upfronthosting.co.za> Message-ID: <1557888792.38.0.13390479196.issue29818@roundup.psfhosted.org> STINNER Victor added the comment: I fixed this issue in Python 3.7. Py_SetStandardStreamEncoding() now uses: PyMemAllocatorEx old_alloc; _PyMem_SetDefaultAllocator(PYMEM_DOMAIN_RAW, &old_alloc); ... _PyMem_RawStrdup() ... PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc); ---------- components: +Interpreter Core resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:55:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:55:35 +0000 Subject: [issue26891] CPython doesn't work when you disable refcounting In-Reply-To: <1461990997.54.0.540088358275.issue26891@psf.upfronthosting.co.za> Message-ID: <1557888935.78.0.5423176861.issue26891@roundup.psfhosted.org> STINNER Victor added the comment: Well, CPython requires reference counting. This issue looks highly experimental with not activity for 3 years, I close it. ---------- nosy: +vstinner resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:56:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:56:56 +0000 Subject: [issue22747] Interpreter fails in initialize on systems where HAVE_LANGINFO_H is undefined In-Reply-To: <1414445408.19.0.175857050886.issue22747@psf.upfronthosting.co.za> Message-ID: <1557889016.88.0.768420046014.issue22747@roundup.psfhosted.org> STINNER Victor added the comment: Python 3 (I don't recall which version exactly) has been fixed to always use UTF-8 on Android for the filesystem encoding and even for the locale encoding in most places. I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 22:59:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 02:59:59 +0000 Subject: [issue26480] add a flag that will not give the set a sys.stdin In-Reply-To: <1457109973.75.0.047131092344.issue26480@psf.upfronthosting.co.za> Message-ID: <1557889199.2.0.593802384728.issue26480@roundup.psfhosted.org> STINNER Victor added the comment: create_stdio() checks if the file descriptor is valid: if (!is_valid_fd(fd)) Py_RETURN_NONE; This function is_valid_fd() has been fixed recently on FreeBSD. It's unclear to me why and how Python fails to create standard streams. Without more information, we cannot investigate. But since this issue has no activity for 3 years, I close. Reopen it if you still reproduce the issue and you can provide more information. In the meanwhile, I suggest you to test the first alpha releases of Python 3.8. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 23:00:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 03:00:42 +0000 Subject: [issue24871] freeze.py doesn't work on x86_64 Linux out of the box In-Reply-To: <1439608426.85.0.852954620494.issue24871@psf.upfronthosting.co.za> Message-ID: <1557889242.25.0.139045571148.issue24871@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 23:01:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 03:01:23 +0000 Subject: [issue24280] Unable to install Python In-Reply-To: <1432503534.56.0.662288156195.issue24280@psf.upfronthosting.co.za> Message-ID: <1557889283.79.0.298743390347.issue24280@roundup.psfhosted.org> STINNER Victor added the comment: This issue had no activity for 4 years and don't provide enough information to be investigated. I close it. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 23:02:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 03:02:35 +0000 Subject: [issue14228] Don't display traceback when import site is interrupted by CTRL+c In-Reply-To: <1331197536.95.0.87995012042.issue14228@psf.upfronthosting.co.za> Message-ID: <1557889355.0.0.895422799333.issue14228@roundup.psfhosted.org> STINNER Victor added the comment: No activity for 6 years, I close the issue. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 23:03:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 03:03:55 +0000 Subject: [issue21202] Naming a file` io.py` causes cryptic error message In-Reply-To: <1397239551.94.0.578791540537.issue21202@psf.upfronthosting.co.za> Message-ID: <1557889435.88.0.208267037741.issue21202@roundup.psfhosted.org> STINNER Victor added the comment: No activity for 5 years, I close the issue. ---------- nosy: +vstinner resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 23:04:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 03:04:36 +0000 Subject: [issue13493] Import error with embedded python on AIX 6.1 In-Reply-To: <1322479753.88.0.634847584065.issue13493@psf.upfronthosting.co.za> Message-ID: <1557889476.49.0.115749140988.issue13493@roundup.psfhosted.org> STINNER Victor added the comment: No activity since 2011, I close the issue. ---------- nosy: +vstinner resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 23:07:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 03:07:18 +0000 Subject: [issue21563] Segv during call to builtin_execfile in application embedding Python interpreter. In-Reply-To: <1400871636.0.0.265957974694.issue21563@psf.upfronthosting.co.za> Message-ID: <1557889638.3.0.85842501618.issue21563@roundup.psfhosted.org> STINNER Victor added the comment: Python 2.7 is close to it's end of life, Python 3 doesn't have execfile(), and this issue has no activity since 2014. I close the issue. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 23:11:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 03:11:04 +0000 Subject: [issue1257] atexit errors should result in nonzero exit code In-Reply-To: <1192046186.55.0.804669715206.issue1257@psf.upfronthosting.co.za> Message-ID: <1557889864.83.0.896455707669.issue1257@roundup.psfhosted.org> STINNER Victor added the comment: Antoine disagrees with the feature request, so I close it. You can modify your atexit callbacks to catch exceptions and decide how to handle them: write them into a file, into stderr, etc. ---------- nosy: +vstinner resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 14 23:13:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 03:13:54 +0000 Subject: [issue19216] stat cache for import bootstrap In-Reply-To: <1381404050.43.0.806301244574.issue19216@psf.upfronthosting.co.za> Message-ID: <1557890034.27.0.614561041818.issue19216@roundup.psfhosted.org> STINNER Victor added the comment: The benefit of avoiding stat() calls seems to not be obvious to everybody. Moreover, importlib now implements a "path cache". I close the issue. The most efficient solution is to pack all your modules and the Python stdlib into a ZIP file: everything is done in memory, no more filesystem access. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 02:17:29 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 15 May 2019 06:17:29 +0000 Subject: [issue36920] inspect.getcallargs sees optional arg to builtin as required In-Reply-To: <1557885809.35.0.0229737900946.issue36920@roundup.psfhosted.org> Message-ID: <1557901049.24.0.582068548823.issue36920@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 03:09:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 15 May 2019 07:09:34 +0000 Subject: [issue36920] inspect.getcallargs sees optional arg to builtin as required In-Reply-To: <1557885809.35.0.0229737900946.issue36920@roundup.psfhosted.org> Message-ID: <1557904174.2.0.574370030169.issue36920@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This not reproducible on master and seems to fixed as part of PEP 570 related changes. Bisecting gives me d5d2b4546939b98244708e5bb0cfccd55b99d244 . Before d5d2b4546939b98244708e5bb0cfccd55b99d244 it produces an internal index error. I can reproduce the reported TypeError before PEP 570 was merged. I guess it's working perhaps as an unintended effect of the commit and internal error tells me it was not tested. Perhaps it's good to add a test for this? Note the change in fullargspec output between commits. Adding Pablo who will have better context. ? cpython git:(d5d2b45469) ./python.exe -c 'import inspect; print(inspect.getfullargspec(str.strip)); print(inspect.getcallargs(str.strip, "a"))' /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py:1114: DeprecationWarning: Use inspect.signature() instead of inspect.getfullargspec() warnings.warn("Use inspect.signature() instead of inspect.getfullargspec()", FullArgSpec(args=['self', 'chars'], varargs=None, varkw=None, defaults=(None,), kwonlyargs=[], kwonlydefaults=None, annotations={}) {'self': 'a', 'chars': None} d5d2b45469~1 commit ? cpython git:(81c5a90595) ./python.exe -c 'import inspect; print(inspect.getfullargspec(str.strip)); print(inspect.getcallargs(str.strip, "a"))' FullArgSpec(args=[], varargs=None, varkw=None, defaults=(None,), posonlyargs=['self', 'chars'], kwonlyargs=[], kwonlydefaults=None, annotations={}) Traceback (most recent call last): File "", line 1, in File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", line 1365, in getcallargs arg2value[posonlyargs[i]] = positional[i] IndexError: tuple index out of range ---------- nosy: +pablogsal, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 03:47:12 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 15 May 2019 07:47:12 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1557906432.79.0.635340516502.issue36919@roundup.psfhosted.org> SilentGhost added the comment: I don't think a roundtrip is guaranteed by the parser, only producing an equivalent input. ---------- nosy: +SilentGhost, benjamin.peterson, brett.cannon, yselivanov title: Exception form 'compile' reports a newline char not present in input -> Exception from 'compile' reports a newline char not present in input versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 04:06:07 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 15 May 2019 08:06:07 +0000 Subject: [issue36916] Swallow unhandled exception report introduced by 36802 In-Reply-To: <1557837305.49.0.626105934017.issue36916@roundup.psfhosted.org> Message-ID: <1557907567.61.0.937599099109.issue36916@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 04:32:31 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 15 May 2019 08:32:31 +0000 Subject: [issue36921] Deprecate yield from and @coroutine in asyncio Message-ID: <1557909151.77.0.533525553848.issue36921@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- components: asyncio nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Deprecate yield from and @coroutine in asyncio versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 04:34:40 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 15 May 2019 08:34:40 +0000 Subject: [issue36921] Deprecate yield from and @coroutine in asyncio Message-ID: <1557909280.24.0.417858924766.issue36921@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13246 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 04:38:11 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 15 May 2019 08:38:11 +0000 Subject: [issue26122] Isolated mode doesn't ignore PYTHONHASHSEED In-Reply-To: <1452862094.75.0.964095204421.issue26122@psf.upfronthosting.co.za> Message-ID: <1557909491.81.0.943187900001.issue26122@roundup.psfhosted.org> Christian Heimes added the comment: Is there a way to fix the issue in 3.7 and earlier? We might consider it a security issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 04:39:45 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 15 May 2019 08:39:45 +0000 Subject: [issue36922] Implement Py_TPFLAGS_METHOD_DESCRIPTOR Message-ID: <1557909585.08.0.913937443168.issue36922@roundup.psfhosted.org> New submission from Jeroen Demeyer : The new flag Py_TPFLAGS_METHOD_DESCRIPTOR proposed in PEP 590 is meant for classes whose instances behave like unbound methods. In other words, it's meant for objects supporting the LOAD_METHOD optimization. There are two such classes in CPython: function and method_descriptor. But the goal is to enable more such classes. This is independent from the rest of PEP 590 so let's implement it separately. ---------- components: Interpreter Core messages: 342554 nosy: Mark.Shannon, jdemeyer, petr.viktorin priority: normal severity: normal status: open title: Implement Py_TPFLAGS_METHOD_DESCRIPTOR type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 04:43:26 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 15 May 2019 08:43:26 +0000 Subject: [issue36345] Doc: make serve uses http.server instead of Tools/scripts/server.py In-Reply-To: <1552917459.29.0.295748589939.issue36345@roundup.psfhosted.org> Message-ID: <1557909806.81.0.766572423122.issue36345@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- title: Deprecate Tools/scripts/serve.py in favour of python -m http.server -d -> Doc: make serve uses http.server instead of Tools/scripts/server.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 05:02:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 May 2019 09:02:02 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1557910922.5.0.555464183787.issue1875@roundup.psfhosted.org> Serhiy Storchaka added the comment: The drawback of compiling the dead code is adding cells for unneeded constants and local variables. Also it can create less optimal code for jumps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 05:02:38 2019 From: report at bugs.python.org (Augustin PROLONGEAU) Date: Wed, 15 May 2019 09:02:38 +0000 Subject: [issue36923] Implemented __str__ for zip and map objects Message-ID: <1557910958.96.0.205285122739.issue36923@roundup.psfhosted.org> New submission from Augustin PROLONGEAU : I think this would help development a lot. Below an example of how i would see the function written for zip: def __str__(self): return str((*self,)) # And for __repr__ function def __repr__(self): return f'zip{str(self)}' ---------- messages: 342556 nosy: AugPro priority: normal severity: normal status: open title: Implemented __str__ for zip and map objects type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 05:08:51 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 15 May 2019 09:08:51 +0000 Subject: [issue36923] Implemented __str__ for zip and map objects In-Reply-To: <1557910958.96.0.205285122739.issue36923@roundup.psfhosted.org> Message-ID: <1557911331.83.0.083439030087.issue36923@roundup.psfhosted.org> SilentGhost added the comment: This would exhaust the object, seems like a rather unfortunate side effect. I don't think this suggestion has any chance of being accepted, do feel free to take it to python-ideas to demonstrate that benefits outweigh the downsides. ---------- nosy: +SilentGhost resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 05:09:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 May 2019 09:09:21 +0000 Subject: [issue36923] Implemented __str__ for zip and map objects In-Reply-To: <1557910958.96.0.205285122739.issue36923@roundup.psfhosted.org> Message-ID: <1557911361.07.0.184416186749.issue36923@roundup.psfhosted.org> Serhiy Storchaka added the comment: It will fail for infinite and very large iterables. It can cause performing unexpected operations. Examples: zip(itertools.count(), itertools.repeat(None)) zip(file1, file2) In general, the repr of the iterator should not change it state. But your proposition exhausts it. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 05:20:22 2019 From: report at bugs.python.org (Armin Rigo) Date: Wed, 15 May 2019 09:20:22 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1557912022.97.0.0491418048278.issue1875@roundup.psfhosted.org> Change by Armin Rigo : ---------- nosy: -arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 05:30:55 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 15 May 2019 09:30:55 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1557912655.51.0.970115124766.issue27987@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +13247 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 06:00:46 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 15 May 2019 10:00:46 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1557914446.49.0.939613734251.issue1875@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >The drawback of compiling the dead code is adding cells for unneeded constants and local variables. Also it can create less optimal code for jumps. Is unlikely that this situation arises often enough that this is a concern. We would be sacrificing correctness for speed and I think that is an error. If there is a more optimal approach I'm happy to implement it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 06:41:09 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 15 May 2019 10:41:09 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1557916869.49.0.138689189709.issue27987@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +13248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:01:38 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 15 May 2019 11:01:38 +0000 Subject: [issue36826] ast_unparser.c doesn't handle := expressions In-Reply-To: <1557218393.13.0.153160088423.issue36826@roundup.psfhosted.org> Message-ID: <1557918098.44.0.107932274996.issue36826@roundup.psfhosted.org> Batuhan added the comment: I have patch, i'm going to submit it. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:06:00 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 15 May 2019 11:06:00 +0000 Subject: [issue36826] ast_unparser.c doesn't handle := expressions In-Reply-To: <1557218393.13.0.153160088423.issue36826@roundup.psfhosted.org> Message-ID: <1557918360.61.0.865474859899.issue36826@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +13249 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:10:35 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 15 May 2019 11:10:35 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module Message-ID: <1557918635.36.0.512986830888.issue1572968@roundup.psfhosted.org> Batuhan added the comment: Any news? If a patch is not ready, i can work on a patch too. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:12:55 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 15 May 2019 11:12:55 +0000 Subject: [issue36922] Implement Py_TPFLAGS_METHOD_DESCRIPTOR In-Reply-To: <1557909585.08.0.913937443168.issue36922@roundup.psfhosted.org> Message-ID: <1557918775.11.0.102550411625.issue36922@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13250 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:16:07 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 15 May 2019 11:16:07 +0000 Subject: [issue36713] duplicate method definition in Lib/ctypes/test/test_unicode.py In-Reply-To: <1556119147.21.0.373187833971.issue36713@roundup.psfhosted.org> Message-ID: <1557918967.22.0.0521267803912.issue36713@roundup.psfhosted.org> Change by Batuhan : ---------- title: uplicate method definition in Lib/ctypes/test/test_unicode.py -> duplicate method definition in Lib/ctypes/test/test_unicode.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:17:47 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 15 May 2019 11:17:47 +0000 Subject: [issue33135] Define field prefixes for the various config structs In-Reply-To: <1521958223.34.0.467229070634.issue33135@psf.upfronthosting.co.za> Message-ID: <1557919067.79.0.523472467945.issue33135@roundup.psfhosted.org> Batuhan added the comment: +1 from me. But i dont understand why this issue triaged as "needs patch". Isn't it should be discussed first? ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:24:32 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 15 May 2019 11:24:32 +0000 Subject: [issue36567] DOC: manpage directive doesn't create hyperlink In-Reply-To: <1554759647.95.0.266283511597.issue36567@roundup.psfhosted.org> Message-ID: <1557919472.75.0.100175265011.issue36567@roundup.psfhosted.org> Batuhan added the comment: What is going to be our manpage site? Debian? ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:35:47 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 15 May 2019 11:35:47 +0000 Subject: [issue36567] DOC: manpage directive doesn't create hyperlink In-Reply-To: <1554759647.95.0.266283511597.issue36567@roundup.psfhosted.org> Message-ID: <1557920147.78.0.452068989285.issue36567@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +13251 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:48:03 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 15 May 2019 11:48:03 +0000 Subject: [issue36567] DOC: manpage directive doesn't create hyperlink In-Reply-To: <1554759647.95.0.266283511597.issue36567@roundup.psfhosted.org> Message-ID: <1557920883.21.0.844786427203.issue36567@roundup.psfhosted.org> St?phane Wirtel added the comment: Is there another source than Debian? there is this option: http://man7.org/linux/man-pages/index.html Honestly, if you use the Debian source, there is an automatic redirect to the right man page. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:58:15 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 15 May 2019 11:58:15 +0000 Subject: [issue36567] DOC: manpage directive doesn't create hyperlink In-Reply-To: <1554759647.95.0.266283511597.issue36567@roundup.psfhosted.org> Message-ID: <1557921495.42.0.549503829501.issue36567@roundup.psfhosted.org> Batuhan added the comment: I sent a proposal with debian default and can be altered through env variable called MANPAGES_URL ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:58:26 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 15 May 2019 11:58:26 +0000 Subject: [issue36924] Simplify implementation of classmethod_descriptor.__call__ Message-ID: <1557921506.83.0.125634021475.issue36924@roundup.psfhosted.org> New submission from Jeroen Demeyer : The class classmethod_descriptor implements classmethods for builtin functions. Unlike the plain classmethod class (which is used for Python classmethods), instances of classmethod_descriptor are callable. However, calling them is unlikely to happen in practice: the only way to obtain such an object is to extract from the class __dict__. Therefore, the implementation of __call__ does not need to be optimized: we can just call __get__ and then call the result. Doing that allows a simpler implementation of PEP 590. ---------- components: Interpreter Core messages: 342566 nosy: Mark.Shannon, jdemeyer, petr.viktorin priority: normal severity: normal status: open title: Simplify implementation of classmethod_descriptor.__call__ versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:59:23 2019 From: report at bugs.python.org (Batuhan) Date: Wed, 15 May 2019 11:59:23 +0000 Subject: [issue36567] DOC: manpage directive doesn't create hyperlink In-Reply-To: <1554759647.95.0.266283511597.issue36567@roundup.psfhosted.org> Message-ID: <1557921563.96.0.679283048899.issue36567@roundup.psfhosted.org> Batuhan added the comment: *ups propsal = pr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 07:59:42 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 15 May 2019 11:59:42 +0000 Subject: [issue34682] Typo reports on docs@ In-Reply-To: <1536943787.72.0.956365154283.issue34682@psf.upfronthosting.co.za> Message-ID: <1557921582.2.0.665806422878.issue34682@roundup.psfhosted.org> Cheryl Sabella added the comment: Thank you @divyag for the patch and thank you @matrixise for the backport! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 08:01:19 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 15 May 2019 12:01:19 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1557921679.26.0.269429008806.issue36338@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: -13146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 08:08:11 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 15 May 2019 12:08:11 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557853211.77.0.556457403866.issue36906@roundup.psfhosted.org> Message-ID: <20190515120805.GQ5010@ando.pearwood.info> Steven D'Aprano added the comment: For the record, I just came across this proposed feature for Java: https://openjdk.java.net/jeps/8222530 Add text blocks to the Java language. A text block is a multi-line string literal that avoids the need for most escape sequences, automatically formats the string in predictable ways, and gives the developer control over format when desired. It seems to be similar to Python triple-quoted strings except that the compiler automatically dedents the string using a "re-indentation algorithm". (Which sounds to me similar to, if not identical, to that used by textwrap.) The JEP proposal says: A study of Google's large internal repository of Java source code showed that 98% of string literals, once converted to text blocks and formatted appropriately, would require removal of incidental white space. If Java introduced multi-line string solution without support for automatically removing incidental white space, then many developers would write a method to remove it themselves and/or lobby for the String class to include a removal method. which matches my own experience: *most* but not all of my indented triple-quotes strings start with incidental whitespace that I don't care about. But not quite all, so I think backwards compatibility requires that *by default* triple-quoted strings are not dedented. Note that there are a couple of major difference between the JEP proposal and this: - The JEP proposes to automatically dedent triple-quoted strings; this proposal requires an explicit call to .dedent(). - The JEP proposal allows the user to control the dedent by indenting, or not, the trailing end-quote; - however that means that in Java you won't be able to control the dedent if the string doesn't end with a final blank line; - Should the dedent method accept an optional int argument specifying the number of spaces to dedent by? (Defaulting to None, meaning "dedent by the common indent".) If so, that won't affect the compile-time optimization so long as the argument is a literal. - the JEP performs the dedent before backslash escapes are interpreted; in this proposal backslash escapes will occur before the dedent. The JEP also mentions considering multi-line string literals as Swift and Rust do them: https://github.com/apple/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md https://stackoverflow.com/questions/29483365/what-is-the-syntax-for-a-multiline-string-literal I mention these for completeness, not to suggest them as alternatives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 08:17:16 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 15 May 2019 12:17:16 +0000 Subject: [issue36924] Simplify implementation of classmethod_descriptor.__call__ In-Reply-To: <1557921506.83.0.125634021475.issue36924@roundup.psfhosted.org> Message-ID: <1557922636.03.0.682549484142.issue36924@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13252 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 08:42:34 2019 From: report at bugs.python.org (wuwentao) Date: Wed, 15 May 2019 12:42:34 +0000 Subject: [issue36925] python3.7.3 can't work after MacOS upgrade from v10.14.4 to v10.14.5 Message-ID: <1557924154.05.0.857477832316.issue36925@roundup.psfhosted.org> New submission from wuwentao : Hi My python3.7.3 works well in MacOS v10.14.4 yesterday, today I have upgrade my MacOS to v10.14.5, after upgrade,I just found python3 and pip3 can't works, all the command will be run as a background program, but not foreground program. but MacOS builtin python 2.7 works well. so I have reported it to Apply Support for this upgrade bug. in addition, I think I also should report it to python bug tracker. for example: wtwu at wtwu-mbp:~$ ps aux |grep python wtwu 27839 0.0 0.0 4277296 844 s003 S+ 8:41PM 0:00.00 grep python wtwu at wtwu-mbp:~$ python Python 2.7.10 (default, Feb 22 2019, 21:55:15) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print "hello world" hello world >>> exit() wtwu at wtwu-mbp:~$ python3 [1]+ Stopped python3 wtwu at wtwu-mbp:~$ Python 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)] on darwin Type "help", "copyright", "credits" or "license" for more information. [1]+ Stopped python3 wtwu at wtwu-mbp:~$ ps aux |grep python wtwu 27851 0.0 0.0 4268080 820 s003 S+ 8:41PM 0:00.00 grep python wtwu 27847 0.0 0.1 4263232 8576 s003 T 8:41PM 0:00.04 /usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python wtwu at wtwu-mbp:~$ python3 [2]+ Stopped python3 wtwu at wtwu-mbp:~$ Python 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)] on darwin Type "help", "copyright", "credits" or "license" for more information. [2]+ Stopped python3 wtwu at wtwu-mbp:~$ ps aux |grep python wtwu 27857 0.0 0.0 4277296 836 s003 S+ 8:42PM 0:00.00 grep python wtwu 27854 0.0 0.1 4274496 8596 s003 T 8:42PM 0:00.04 /usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python wtwu 27847 0.0 0.1 4263232 8576 s003 T 8:41PM 0:00.04 /usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python wtwu at wtwu-mbp:~$ wtwu at wtwu-mbp:~$ ---------- components: macOS messages: 342570 nosy: ned.deily, ronaldoussoren, wuwentao priority: normal severity: normal status: open title: python3.7.3 can't work after MacOS upgrade from v10.14.4 to v10.14.5 type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 09:24:29 2019 From: report at bugs.python.org (Bernd Meiners) Date: Wed, 15 May 2019 13:24:29 +0000 Subject: [issue36319] Erro 0xC0000374 on windows 10 In-Reply-To: <1552761804.37.0.212876301752.issue36319@roundup.psfhosted.org> Message-ID: <1557926669.24.0.125386363547.issue36319@roundup.psfhosted.org> Bernd Meiners added the comment: Microsoft Windows [Version 10.0.17763.437] (c) 2018 Microsoft Corporation. Alle Rechte vorbehalten. C:\Users\bmx>python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import time,locale >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') >>> time.localtime() ---> python crashes, same with 'de_DE.UTF-8' In contrast Python 3.6 raises an error about an invalid locale ---------- nosy: +bmx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 09:32:48 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 15 May 2019 13:32:48 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557927168.86.0.836994014404.issue36917@roundup.psfhosted.org> Anthony Sottile added the comment: spent some more time thinking about this and I think we should strongly consider reverting. simplification in the core interpreter should not be weighed lightly against complexity and breaking changes for users. the change is also unfortunate because it reduces the expressivity of the ast as we discuss shims, I believe the intention is to remove the `Num` / `Str` / etc. layer eventually so it's really just delaying that. so my vote is to revert, keep the complexity in the compiler and out of user code ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 10:01:21 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 15 May 2019 14:01:21 +0000 Subject: [issue36925] python3.7.3 can't work after MacOS upgrade from v10.14.4 to v10.14.5 In-Reply-To: <1557924154.05.0.857477832316.issue36925@roundup.psfhosted.org> Message-ID: <1557928881.16.0.961951727883.issue36925@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report but I am unable to reproduce the behavior you describe on another v10.14.5 system using any of the current python.org 3.7.3 macOS python binary, a built-from-source 3.7.3+, or a MacPorts 3.7.3 with either libedit or GNU readline. First, I would check to check what the command "python3" really does. In a new terminal window, I would expect something like: $ type python3 python3 is /usr/local/bin/python3 Also check for any Python-related environment variables: $ env | grep PYTHON Since you appear to be using a Homebrew-installed python3.7, I would check the Homebrew forums and issue tracker for similar reports. You could also try reinstalling the Homebrew python3. ---------- resolution: -> works for me status: open -> pending type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 10:19:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 14:19:54 +0000 Subject: [issue33135] Define field prefixes for the various config structs In-Reply-To: <1521958223.34.0.467229070634.issue33135@psf.upfronthosting.co.za> Message-ID: <1557929994.68.0.246592042308.issue33135@roundup.psfhosted.org> STINNER Victor added the comment: In the master branch, the C function config_read_cmdline() uses: * cmdline_warnoptions: -W command line arguments * env_warnoptions: PYTHONWARNINGS environment variable The config_init_warnoptions() uses these 2 list and combine it with other options, dev_mode and bytes_warnings. The warnings options are now specified in my PEP 587: https://www.python.org/dev/peps/pep-0587/#priority-and-rules ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 10:31:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 May 2019 14:31:34 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1557930694.04.0.523007072495.issue27987@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f24a9f3bf42709fb97b954b6dd6f90853967712e by Victor Stinner in branch '2.7': bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850) (GH-13319) https://github.com/python/cpython/commit/f24a9f3bf42709fb97b954b6dd6f90853967712e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 10:34:02 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 15 May 2019 14:34:02 +0000 Subject: [issue35983] tp_dealloc trashcan shouldn't be called for subclasses In-Reply-To: <1550055751.42.0.717332216151.issue35983@roundup.psfhosted.org> Message-ID: <1557930842.7.0.993743414731.issue35983@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: -Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 11:02:30 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 15 May 2019 15:02:30 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1557932550.07.0.648807771686.issue36799@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 133fc89ca02b51b8d5b87556d94f1382c4ed72c1 by St?phane Wirtel (Yavor Konstantinov) in branch 'master': bpo-36799: Fix typo in ctypes.rst (GH-13104) https://github.com/python/cpython/commit/133fc89ca02b51b8d5b87556d94f1382c4ed72c1 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 11:17:57 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 15 May 2019 15:17:57 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1557933477.27.0.68314321958.issue36799@roundup.psfhosted.org> St?phane Wirtel added the comment: If I have no news from miss-islington about the backport of this PR, I will do it manually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 11:36:47 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 15 May 2019 15:36:47 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1557934607.48.0.833887154399.issue36799@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: +13253 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 11:44:15 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 15 May 2019 15:44:15 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557935055.83.0.157822259735.issue36917@roundup.psfhosted.org> Matthias Bussonnier added the comment: > so my vote is to revert, keep the complexity in the compiler and out of user code Playing Devil advocate here, but the complexity depends on what transformations user want to do; with the current state of 3.8, a user that wants to visit all immutable types can do with a single visit_Constant; once 32892 reverted; they would need to implement all of visit_Str,NamedConstant,Num,Bytes, and have it called the same visit_Constant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 11:46:01 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 15 May 2019 15:46:01 +0000 Subject: [issue36926] Implement methoddescr_call without _PyMethodDef_RawFastCallDict Message-ID: <1557935161.99.0.62795791689.issue36926@roundup.psfhosted.org> New submission from Jeroen Demeyer : Once PEP 590 is implemented, it makes sense to focus on using the new "vectorcall" calling convention, which is essentially what is currently FastCallKeywords. To simplify things, it would also be good to use FastCallDict in as few places as possible and actually get rid of that completely. One place where using FastCallKeywords instead of FastCallDict is bad for performance is when using METH_VARARGS|METH_KEYWORDS: the dict would be converted to a tuple and then back to a dict. For builtin_function_or_method instances, there is already special code to deal with METH_VARARGS. But for method_descriptor, there is no such code and this issue fixes that. More precisely, a specialized function is used for implementing calls of method_descriptor with the METH_VARARGS|METH_KEYWORDS signature. Other calls use FastCallKeywords instead, in which case there is no performance loss. ---------- components: Interpreter Core messages: 342579 nosy: Mark.Shannon, jdemeyer, petr.viktorin priority: normal severity: normal status: open title: Implement methoddescr_call without _PyMethodDef_RawFastCallDict versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 11:48:29 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 15 May 2019 15:48:29 +0000 Subject: [issue36926] Implement methoddescr_call without _PyMethodDef_RawFastCallDict In-Reply-To: <1557935161.99.0.62795791689.issue36926@roundup.psfhosted.org> Message-ID: <1557935309.61.0.192549399733.issue36926@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13254 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 11:53:31 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 15 May 2019 15:53:31 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1557935611.05.0.518083884096.issue36799@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 4fd7f56ee78a07ebadf034affc2e36db14c85c00 by St?phane Wirtel in branch '3.7': [3.7] bpo-36799: Fix typo in ctypes.rst (GH-13104) (GH-13341) https://github.com/python/cpython/commit/4fd7f56ee78a07ebadf034affc2e36db14c85c00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 11:53:46 2019 From: report at bugs.python.org (John Harrison) Date: Wed, 15 May 2019 15:53:46 +0000 Subject: [issue34288] Declare sethostname in socketmodule.c for SOLARIS In-Reply-To: <1533022352.12.0.56676864532.issue34288@psf.upfronthosting.co.za> Message-ID: <1557935626.81.0.160876115235.issue34288@roundup.psfhosted.org> John Harrison added the comment: On Solaris 10 i386 I successfully built _socket on 3.7.3 by patching *in* a Solaris test (by cloning the test for the INET_ADDRSTRLEN definition currently on line 268) rather than by patching away the _AIX ifdef $ diff -u ../socketmodule.c Modules/socketmodule.c --- ../socketmodule.c Wed May 15 16:36:32 2019 +++ Modules/socketmodule.c Wed May 15 15:34:50 2019 @@ -5212,6 +5212,10 @@ extern int sethostname(const char *, size_t); #endif +#if (defined(__sun) && defined(__SVR4)) +extern int sethostname(const char *, size_t); +#endif + if (!PyArg_ParseTuple(args, "S:sethostname", &hnobj)) { PyErr_Clear(); if (!PyArg_ParseTuple(args, "O&:sethostname", ---------- nosy: +John Harrison _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 11:56:28 2019 From: report at bugs.python.org (wuwentao) Date: Wed, 15 May 2019 15:56:28 +0000 Subject: [issue36925] python3.7.3 can't work after MacOS upgrade from v10.14.4 to v10.14.5 In-Reply-To: <1557924154.05.0.857477832316.issue36925@roundup.psfhosted.org> Message-ID: <1557935788.6.0.576392790096.issue36925@roundup.psfhosted.org> wuwentao added the comment: 1.my python3 is /usr/local/bin/python3, it's a link to Python3.7.3 2. I have downloaded the Mac OS install pkg file from our website, get the same result 3. my env don'T set PYTHON env , just default value 4. also tried reinstall many times with brew ,got the same result i think maybe some OS related issue caused it, need to confirm tomorrow ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 12:05:28 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 May 2019 16:05:28 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557936328.43.0.25591779802.issue36917@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is not a new case. This is exactly the same problem which has already been fixed in multiple other projects. Could you show your real code Anthony? In all known opensource examples (astroid, pyflakes, genshi, chameleon, mako) the compatibility fix is as simple as def visit_Constant(self, node): if node.value is Ellipsis: self._write('...') else: self._write(repr(node.value)) In return, you can remove several methods, such as visit_Str, visit_Num, etc, once you drop the support of Python versions <3.8. AST is not stable. Virtually in every version the new nodes are added: for asynchronous constructions, for f-strings, etc, and the structure and meaning of existing nodes can be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 12:13:59 2019 From: report at bugs.python.org (Aaron Hall) Date: Wed, 15 May 2019 16:13:59 +0000 Subject: [issue34648] Confirm the types of parameters of traceback.format_list and traceback.StackSummary.from_list post-3.5 In-Reply-To: <1536782604.59.0.956365154283.issue34648@psf.upfronthosting.co.za> Message-ID: <1557936839.7.0.0710457144215.issue34648@roundup.psfhosted.org> Change by Aaron Hall : ---------- nosy: +Aaron Hall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 12:29:19 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 15 May 2019 16:29:19 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557937759.93.0.468607074219.issue36917@roundup.psfhosted.org> Anthony Sottile added the comment: The simplest case is just the addition of an `isinstance` check: https://github.com/asottile/dead/blob/85f5edbb84b5e118beab4be3346a630e41418a02/dead.py#L165-L170 class V(ast.NodeVisitor): def visit_Str(self, node): ... def visit_Constant(self, node): if isinstance(node.value, str): self.visit_Str(node) else: self.generic_visit(node) But I have another case where there's much more complex (sorry this one's private, I'll give the pseudo-code of it though which ends up in a whole mess of slow `isinstance(...)` calls class V(ast.NodeVisitor): def visit_Str(self, node): ... def visit_Bytes(self, node): ... def visit_Num(self, node): ... def visit_Constant(self, node): if isinstance(node.value, str): return self.visit_Str(node) # Annoying special case, bools are ints, before this wouldn't call # `visit_Num` because there was a separate `visit_NameConstant` for `True` / `False` elif isinstance(node.value, int) and not isinstance(node.value, bool): return self.visit_Num(node) elif isinstance(node.value, bytes): return self.visit_Bytes(node) else: return self.generic_visit(node) Whereas the opposite case (where handling all constants the same) is much much easier to simplify the code and not need the `Constant` mess (if required) class V(ast.NodeVisitor): def _visit_constant(self, node): # generic handling of constant _if you want it_ visit_Str = visit_Num = visit_Bytes = visit_NameConstant = visit_Ellipsis = _visit_constant Maybe I haven't been in the community long enough but this is the first *removal* of the ast I've seen, and it makes all my uses of these functions objectively worse, and none of the cases get simpler (whereas there's an existing easy way to simplify constants already, without breaking the ast) github search isn't a great measure of this but it's currently showing 10k+ usages of `visit_{Str,Num,Bytes}` that would presumably be broken by this change: https://github.com/search?q=visit_Num+visit_Str+visit_Bytes&type=Code -- backward compatibility is very valuable, I would hope it isn't squandered for an internal cleanup ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 12:52:29 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 15 May 2019 16:52:29 +0000 Subject: [issue36920] inspect.getcallargs sees optional arg to builtin as required In-Reply-To: <1557885809.35.0.0229737900946.issue36920@roundup.psfhosted.org> Message-ID: <1557939149.44.0.0850273229347.issue36920@roundup.psfhosted.org> Brett Cannon added the comment: Also note that inspect.getcallargs() has been deprecated since Python 3.5: https://docs.python.org/3/library/inspect.html#inspect.getcallargs. Since the function is deprecated I'm closing as "won't fix". ---------- nosy: +brett.cannon resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 12:57:33 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 15 May 2019 16:57:33 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1557939453.67.0.65853244538.issue36919@roundup.psfhosted.org> Brett Cannon added the comment: I don't think it's option C. As for whether A or B I don't know. Wouldn't hurt to ask on python-dev if no one comes forward with a more authoritative answer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 13:03:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 15 May 2019 17:03:18 +0000 Subject: [issue8400] zipimporter find_module fullname mis-documented In-Reply-To: <1271258442.34.0.660774695694.issue8400@psf.upfronthosting.co.za> Message-ID: <1557939798.12.0.14352974058.issue8400@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This still exists after zipimport rewrite in Python with 3.8 . Is this a documentation issue or an enhancement to be made as noted in msg109467 ? ---------- nosy: +serhiy.storchaka, xtreak versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 13:04:45 2019 From: report at bugs.python.org (Aaron Hall) Date: Wed, 15 May 2019 17:04:45 +0000 Subject: [issue36927] traceback docstrings should explicitly state return values instead of referring to other functions Message-ID: <1557939885.98.0.0482711491834.issue36927@roundup.psfhosted.org> New submission from Aaron Hall : I've written three (or more) answers on Stack Overflow about how to use the functions in the traceback module, and I code Python all day long. Embarrassing confession: I just recommended the wrong traceback function in email to fix the incorrect usage of another of these functions after pulling up the docs because. I corrected myself before anyone else could correct me, but I find these docstrings incredibly frustrating and problematic. May I please give them a little more verbiage about their return values? e.g.: def format_tb(tb, limit=None): """A shorthand for 'format_list(extract_tb(tb, limit))'.""" return extract_tb(tb, limit=limit).format() should be: def format_tb(tb, limit=None): """A shorthand for 'format_list(extract_tb(tb, limit))', which returns a list of strings ready for printing'. """ return extract_tb(tb, limit=limit).format() In fact, perhaps the "shorthand" part is an implementation detail that may not even be correct (it doesn't immediately seem to be) and should be removed. ---------- assignee: docs at python components: Documentation messages: 342588 nosy: Aaron Hall, docs at python priority: normal severity: normal status: open title: traceback docstrings should explicitly state return values instead of referring to other functions versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 13:21:10 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 15 May 2019 17:21:10 +0000 Subject: [issue36927] traceback docstrings should explicitly state return values instead of referring to other functions In-Reply-To: <1557939885.98.0.0482711491834.issue36927@roundup.psfhosted.org> Message-ID: <1557940870.34.0.168782813067.issue36927@roundup.psfhosted.org> SilentGhost added the comment: The doc strings were never updated in #17911. Would you like to submit a PR for these changes? (guidelines are available at https://devguide.python.org/pullrequest/) Perhaps, you could include similar changes in Doc/library/traceback.rst ? ---------- nosy: +SilentGhost stage: -> needs patch type: -> behavior versions: +Python 3.7 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 14:06:41 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 15 May 2019 18:06:41 +0000 Subject: [issue36015] streamhandler cannot represent streams with an integer as name In-Reply-To: <1550431224.14.0.504793638163.issue36015@roundup.psfhosted.org> Message-ID: <1557943601.06.0.798781171987.issue36015@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 78dd781ef4d41dfefad53aa3bc52c39b0d443b19 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-36015: Handle StreamHandler representaton of stream with an integer name (GH-11908) (GH-13183) https://github.com/python/cpython/commit/78dd781ef4d41dfefad53aa3bc52c39b0d443b19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 14:11:23 2019 From: report at bugs.python.org (=?utf-8?q?Stefan_H=C3=B6lzl?=) Date: Wed, 15 May 2019 18:11:23 +0000 Subject: [issue36928] linkt threading.settrace to sys.settrace Message-ID: <1557943883.68.0.641257607459.issue36928@roundup.psfhosted.org> New submission from Stefan H?lzl : The documentation of sys.settrace suggest to call it from every created thread to enable tracing within threads. I would suggest to add a link to threading.settrace which automatically sets a trace function for every by threading module created thread. link to docs: https://docs.python.org/3.5/library/sys.html#sys.settrace https://docs.python.org/3.5/library/threading.html#threading.settrace ---------- assignee: docs at python components: Documentation messages: 342591 nosy: docs at python, stefanhoelzl priority: normal severity: normal status: open title: linkt threading.settrace to sys.settrace versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 14:13:48 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 15 May 2019 18:13:48 +0000 Subject: [issue36928] linkt threading.settrace to sys.settrace In-Reply-To: <1557943883.68.0.641257607459.issue36928@roundup.psfhosted.org> Message-ID: <1557944028.09.0.00837383711049.issue36928@roundup.psfhosted.org> SilentGhost added the comment: Would you care to submit a PR implementing this fix? There are some guidelines available at https://devguide.python.org/pullrequest/ ---------- nosy: +SilentGhost stage: -> needs patch type: -> behavior versions: +Python 3.7 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 14:14:16 2019 From: report at bugs.python.org (=?utf-8?q?Stefan_H=C3=B6lzl?=) Date: Wed, 15 May 2019 18:14:16 +0000 Subject: [issue36928] linkt threading.settrace to sys.settrace In-Reply-To: <1557943883.68.0.641257607459.issue36928@roundup.psfhosted.org> Message-ID: <1557944056.19.0.0318966293011.issue36928@roundup.psfhosted.org> Change by Stefan H?lzl : ---------- keywords: +patch pull_requests: +13255 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 14:35:30 2019 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 15 May 2019 18:35:30 +0000 Subject: [issue36929] Other Python _io implementations may not expose _io in their type names Message-ID: <1557945330.73.0.750176002779.issue36929@roundup.psfhosted.org> New submission from Maxwell Bernstein : For a vanishingly small number of internal types, CPython sets the tp_name slot to mod_name.type_name, either in the PyTypeObject or the PyType_Spec. There are a few minor places where this surfaces: * Custom repr functions for those types (some of which ignore the tp_name in favor of using a string literal, such as _io.TextIOWrapper) * Pickling error messages The existing test suite only tests the former. This makes it tricky for other Python implementations to pass the test suite if they do not expose the module name (_io, _ssl, _tkinter, etc) in their type names. ---------- assignee: christian.heimes components: IO, SSL, Tests, Tkinter messages: 342593 nosy: christian.heimes, tekknolagi priority: normal severity: normal status: open title: Other Python _io implementations may not expose _io in their type names type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 14:36:34 2019 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 15 May 2019 18:36:34 +0000 Subject: [issue36929] Other Python _io implementations may not expose _io in their type names In-Reply-To: <1557945330.73.0.750176002779.issue36929@roundup.psfhosted.org> Message-ID: <1557945394.93.0.0496820703024.issue36929@roundup.psfhosted.org> Maxwell Bernstein added the comment: I have the beginnings of a PR to patch the test suite to make the prefix optional, if anybody is interested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 14:36:59 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 15 May 2019 18:36:59 +0000 Subject: [issue36921] Deprecate yield from and @coroutine in asyncio Message-ID: <1557945419.57.0.00146826049619.issue36921@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13257 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 14:38:18 2019 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 15 May 2019 18:38:18 +0000 Subject: [issue36929] Other Python _io implementations may not expose _io in their type names In-Reply-To: <1557945330.73.0.750176002779.issue36929@roundup.psfhosted.org> Message-ID: <1557945498.34.0.986059035542.issue36929@roundup.psfhosted.org> Change by Maxwell Bernstein : ---------- keywords: +patch pull_requests: +13258 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 14:41:32 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 15 May 2019 18:41:32 +0000 Subject: [issue36015] streamhandler cannot represent streams with an integer as name In-Reply-To: <1550431224.14.0.504793638163.issue36015@roundup.psfhosted.org> Message-ID: <1557945692.55.0.525422425808.issue36015@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: not a bug -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 14:42:54 2019 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 15 May 2019 18:42:54 +0000 Subject: [issue36929] Other Python _io implementations may not expose _io in their type names In-Reply-To: <1557945330.73.0.750176002779.issue36929@roundup.psfhosted.org> Message-ID: <1557945774.69.0.524757946483.issue36929@roundup.psfhosted.org> Change by Maxwell Bernstein : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 15:34:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 May 2019 19:34:47 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557948887.74.0.217548727938.issue36917@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can not use the same implementation of the visitor for Num, Str, NameConstant and Ellipsis, because all these classes use different attribute for saving the value (Ellipsis does not have it at all). For the same reasons you can not just pass the argument of visit_Constant() to visit_Str() -- they have different types. No need to call generic_visit() from visit_Constant() -- Constant nodes should not contain AST nodes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 15:34:49 2019 From: report at bugs.python.org (Michael Blahay) Date: Wed, 15 May 2019 19:34:49 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1557948889.32.0.753929474317.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: PR 13203 is still waiting for merge ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 15:38:44 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 15 May 2019 19:38:44 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1557949124.89.0.499438924448.issue36917@roundup.psfhosted.org> Anthony Sottile added the comment: > You can not use the same implementation of the visitor for Num, Str, NameConstant and Ellipsis, because all these classes use different attribute for saving the value ah yes, this is true -- maybe the better change would be to just add `@property value` to each of those instead of collapsing the classes? (If that's the actual convenience we're trying to achieve) > No need to call generic_visit() from visit_Constant() -- Constant nodes should not contain AST nodes. correct there's no need, but it's a best practice to always call `generic_visit` in all `visit_*` methods, I have a linter I haven't finished up yet that checks this. And who knows if that'll be true in the future! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 15:54:12 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 15 May 2019 19:54:12 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1557950052.04.0.520834743787.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: I see the 3.8 feature freeze seem to be end of next-week; do you think that async-exec (gh-13148) has a chance of getting in ? I'm happy to do modification to the PR but would need some more reviews. I'm happy to take some other tasks of your plate is that allow this to squeeze in before feature freeze. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 16:14:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 May 2019 20:14:50 +0000 Subject: [issue26707] plistlib fails to parse bplist with 0x80 UID values In-Reply-To: <1459992841.57.0.391610307965.issue26707@psf.upfronthosting.co.za> Message-ID: <1557951290.15.0.42500351253.issue26707@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset c981ad16b0f9740bd3381c96b4227a1faa1a88d9 by Serhiy Storchaka (Jon Janzen) in branch 'master': bpo-26707: Enable plistlib to read UID keys. (GH-12153) https://github.com/python/cpython/commit/c981ad16b0f9740bd3381c96b4227a1faa1a88d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 16:15:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 May 2019 20:15:41 +0000 Subject: [issue26707] plistlib fails to parse bplist with 0x80 UID values In-Reply-To: <1459992841.57.0.391610307965.issue26707@psf.upfronthosting.co.za> Message-ID: <1557951341.82.0.74262487271.issue26707@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 16:54:25 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 15 May 2019 20:54:25 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1557953665.6.0.937753833991.issue36906@roundup.psfhosted.org> Gregory P. Smith added the comment: Thanks, it's actually good to see this being a feature accepted in other languages. ---------- priority: low -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 16:59:59 2019 From: report at bugs.python.org (Immo Wetzel) Date: Wed, 15 May 2019 20:59:59 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly Message-ID: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> New submission from Immo Wetzel : I do run python 2.7/3.7 on a windows 7 host. This host is AD managed. As part of the group policy the internet settings are set to automatically proxy configuration. The configuration works. cos IE and Chrome can reach external and internal hosts. Some of the internal are excluded from proxy via no proxy rules inside the pac file. But python request and urllib2 are not able to reach the internal addresses which are excluded via the proxy file rules. Python always tries to get the data from the proxy. the only solution was an extra environmental variable NO_PROXY with the ips not to be reached via the proxy. these excluded IPs are common IPs and not private ! (90.0.0.0/8) is part of the pac exclusion ---------- assignee: terry.reedy components: IDLE, IO, Library (Lib), Windows messages: 342601 nosy: iwetzel, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows proxy settings automatically used ... partly versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 17:20:05 2019 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 15 May 2019 21:20:05 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1557955205.56.0.76334308132.issue34616@roundup.psfhosted.org> Yury Selivanov added the comment: I'll be working on CPython on Friday. Will take a look at your PR first thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 17:45:21 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 15 May 2019 21:45:21 +0000 Subject: [issue36786] "make install" should run compileall in parallel In-Reply-To: <1556908628.98.0.810004261153.issue36786@roundup.psfhosted.org> Message-ID: <1557956721.88.0.656080535619.issue36786@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 1a2dd82f56bd813aacc570e172cefe55a8a41504 by Antoine Pitrou in branch 'master': bpo-36786: Run compileall in parallel during "make install" (GH-13078) https://github.com/python/cpython/commit/1a2dd82f56bd813aacc570e172cefe55a8a41504 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 17:55:23 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 15 May 2019 21:55:23 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1557957323.52.0.24941765443.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: > I'll be working on CPython on Friday. Will take a look at your PR first thing. Thanks, let me know if the is anything I can do for you in exchange; also thanks again for sitting with me and stepping me through the things at PyCon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:02:14 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 15 May 2019 22:02:14 +0000 Subject: [issue33123] Path.unlink should have a missing_ok parameter In-Reply-To: <1521741396.21.0.467229070634.issue33123@psf.upfronthosting.co.za> Message-ID: <1557957734.67.0.367543206873.issue33123@roundup.psfhosted.org> miss-islington added the comment: New changeset d9e006bcefe6fac859b1b5d741725b9a91991044 by Miss Islington (bot) (?zlohhcuB treboR) in branch 'master': bpo-33123: pathlib: Add missing_ok parameter to Path.unlink (GH-6191) https://github.com/python/cpython/commit/d9e006bcefe6fac859b1b5d741725b9a91991044 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:06:00 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 15 May 2019 22:06:00 +0000 Subject: [issue33123] Path.unlink should have a missing_ok parameter In-Reply-To: <1521741396.21.0.467229070634.issue33123@psf.upfronthosting.co.za> Message-ID: <1557957960.87.0.491742640396.issue33123@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:08:15 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 15 May 2019 22:08:15 +0000 Subject: [issue34509] Starting to use gcc-8 on CI In-Reply-To: <1535303697.92.0.56676864532.issue34509@psf.upfronthosting.co.za> Message-ID: <1557958095.23.0.782442439812.issue34509@roundup.psfhosted.org> Zachary Ware added the comment: We do now have at least one builder using GCC 8 (ware-gentoo-x86) and one using GCC 9 (cstratak-fedora), so I'm closing the issue. Thanks for bringing this up, and sorry it fell through the cracks for a while! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:24:05 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 15 May 2019 22:24:05 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly In-Reply-To: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> Message-ID: <1557959045.75.0.203046988951.issue36930@roundup.psfhosted.org> Terry J. Reedy added the comment: As far as I can see, this issue has nothing to do with IDLE as such. Someone else should decide if this is a bug report or an enhancement request. ---------- assignee: terry.reedy -> components: -IDLE stage: -> test needed versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:24:44 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 15 May 2019 22:24:44 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly In-Reply-To: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> Message-ID: <1557959084.03.0.359387709098.issue36930@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:38:59 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 May 2019 22:38:59 +0000 Subject: [issue35926] Need openssl 1.1.1 support on Windows for ARM and ARM64 In-Reply-To: <1549508003.09.0.398179114845.issue35926@roundup.psfhosted.org> Message-ID: <1557959939.57.0.3307605724.issue35926@roundup.psfhosted.org> Steve Dower added the comment: New changeset fb7e7505ed1337bf40fa7b8b68317d1e86675a86 by Steve Dower (Paul Monson) in branch 'master': bpo-35926: Add support for OpenSSL 1.1.1b on Windows (GH-11779) https://github.com/python/cpython/commit/fb7e7505ed1337bf40fa7b8b68317d1e86675a86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:40:51 2019 From: report at bugs.python.org (Justin Rose) Date: Wed, 15 May 2019 22:40:51 +0000 Subject: [issue36931] json lib doesnt want to load from file Message-ID: <1557960051.39.0.911245380444.issue36931@roundup.psfhosted.org> New submission from Justin Rose : when I run the included file i get an error that looks like: Traceback (most recent call last): File "/home/justin/Desktop/pkmn/main.py", line 10, in expansion = json.load(expan_list) File "/usr/lib/python3.6/json/__init__.py", line 296, in load return loads(fp.read(), AttributeError: 'str' object has no attribute 'read' dont know what to make of it ---------- components: Extension Modules files: main.py messages: 342609 nosy: Justin Rose priority: normal severity: normal status: open title: json lib doesnt want to load from file type: resource usage versions: Python 3.6 Added file: https://bugs.python.org/file48331/main.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:40:53 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 15 May 2019 22:40:53 +0000 Subject: [issue36932] asyncio-task.rst could use proper deprecated-removed directive Message-ID: <1557960053.75.0.0870422245475.issue36932@roundup.psfhosted.org> New submission from Matthias Bussonnier : SOme place in the documentation do not use the Deprected-remove directive (which is nice as it has a consistent pharing and is easy to search for), and deprecation warnings do not always have the version since deprecation which could be improved. ---------- messages: 342610 nosy: mbussonn priority: normal severity: normal status: open title: asyncio-task.rst could use proper deprecated-removed directive _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:42:32 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 May 2019 22:42:32 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1557960152.58.0.554680182698.issue36511@roundup.psfhosted.org> Steve Dower added the comment: New changeset 67ff6a103a1184b572750c30e231968c963e72f8 by Steve Dower (Paul Monson) in branch 'master': bpo-36511: Windows ARM32 buildbot changes (GH-12917) https://github.com/python/cpython/commit/67ff6a103a1184b572750c30e231968c963e72f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:43:10 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 May 2019 22:43:10 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1557960190.69.0.544121067232.issue36511@roundup.psfhosted.org> Steve Dower added the comment: Going to leave this in commit review for a bit, in case hitting merge suddenly flushes out some reviews :) ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:45:38 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 15 May 2019 22:45:38 +0000 Subject: [issue36932] asyncio-task.rst could use proper deprecated-removed directive In-Reply-To: <1557960053.75.0.0870422245475.issue36932@roundup.psfhosted.org> Message-ID: <1557960338.29.0.400614334745.issue36932@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +13260 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:46:12 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 15 May 2019 22:46:12 +0000 Subject: [issue36932] asyncio-task.rst could use proper deprecated-removed directive In-Reply-To: <1557960053.75.0.0870422245475.issue36932@roundup.psfhosted.org> Message-ID: <1557960372.88.0.610831169404.issue36932@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:47:14 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 May 2019 22:47:14 +0000 Subject: [issue35926] Need openssl 1.1.1 support on Windows for ARM and ARM64 In-Reply-To: <1549508003.09.0.398179114845.issue35926@roundup.psfhosted.org> Message-ID: <1557960434.69.0.715464210719.issue35926@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +13261 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:50:25 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 15 May 2019 22:50:25 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1557960625.14.0.412324302069.issue36511@roundup.psfhosted.org> Change by Paul Monson : ---------- pull_requests: +13262 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 18:51:12 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 15 May 2019 22:51:12 +0000 Subject: [issue36931] json lib doesnt want to load from file In-Reply-To: <1557960051.39.0.911245380444.issue36931@roundup.psfhosted.org> Message-ID: <1557960672.45.0.977810475689.issue36931@roundup.psfhosted.org> Zachary Ware added the comment: You're passing in a filename, not a file-like object (see https://docs.python.org/3/library/json.html#json.load). Instead, you'll want something like: with open(filename) as f: json_data = json.load(f) Please note that this is not a help forum; in future, please submit queries like this to the python-list at python.org mailing list, StackOverflow, or if you're just learning Python, try the tutor at python.org mailing list. Thanks! ---------- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed type: resource usage -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 19:10:45 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 15 May 2019 23:10:45 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1557961845.1.0.186845142295.issue36511@roundup.psfhosted.org> miss-islington added the comment: New changeset 4f820723c86c94f857d8d8de47a3c28f985946bd by Miss Islington (bot) (Paul Monson) in branch 'master': bpo-36511: Windows arm32 buildbot changes (remove extra space) (GH-13351) https://github.com/python/cpython/commit/4f820723c86c94f857d8d8de47a3c28f985946bd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 19:11:17 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 15 May 2019 23:11:17 +0000 Subject: [issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there) Message-ID: <1557961877.88.0.551239006015.issue36933@roundup.psfhosted.org> New submission from Matthias Bussonnier : See issue32591 It was deprecated in 3.7, so maybe removed only in 3.9? ---------- components: Interpreter Core messages: 342615 nosy: mbussonn priority: normal severity: normal status: open title: sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there) versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 19:29:53 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 15 May 2019 23:29:53 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1557962993.3.0.00892249464753.issue32947@roundup.psfhosted.org> Benjamin Peterson added the comment: Was using OpenSSL to verify hostnames intentionally not backported? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 19:58:03 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 15 May 2019 23:58:03 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1557964683.45.0.73624644727.issue32947@roundup.psfhosted.org> Christian Heimes added the comment: Yes, the feature requires OpenSSL 1.0.2 and a more recent version of LibreSSL. 2.7 and 3.6 branches still target platforms with ancient versions of OpenSSL (e.g. Ubuntu 14.04 has 1.0.1f + patches). People were complain A LOT, because there were not able to install Python 3.7 on TravisCI. Like really a lot, alot. I propose to close this bug as fixed in 3.7+ ---------- resolution: -> fixed stage: patch review -> resolved status: open -> pending versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 21:09:38 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 16 May 2019 01:09:38 +0000 Subject: [issue2818] pulldom cannot handle xml file with large external entity properly In-Reply-To: <1210512738.34.0.315015103661.issue2818@psf.upfronthosting.co.za> Message-ID: <1557968978.76.0.223542160335.issue2818@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +scoder versions: +Python 3.8 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 22:04:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 02:04:29 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1557972269.04.0.550646140612.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: I started a thread on python-dev to discuss the issue: https://mail.python.org/pipermail/python-dev/2019-May/157436.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 22:08:13 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 16 May 2019 02:08:13 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1557972493.43.0.00324542880478.issue36564@roundup.psfhosted.org> Change by Paul Ganssle : ---------- nosy: +maxking, msapiro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 22:43:21 2019 From: report at bugs.python.org (Farhan Sajjad) Date: Thu, 16 May 2019 02:43:21 +0000 Subject: [issue36934] C API Function PyLong_AsDouble Returning Wrong Value Message-ID: <1557974601.26.0.0658552402668.issue36934@roundup.psfhosted.org> New submission from Farhan Sajjad : Found this rather obscure behavior where certain 64 bit numbers are changing (probably losing precision somewhere down the call chain) if converted from PyLong to double using the PyLong_AsDouble C API function. TO REPRODUCE: #define __SIZEOF_STRS__ 512 static PyObject* test_pylong(PyObject* self, PyObject* args) { char rBuffer[__SIZEOF_STRS__]; char* strValue; if (!PyArg_ParseTuple(args, "s", &strValue)) return NULL; { printf("%s AS INGRESS\n", strValue); double dblValue = PyLong_AsDouble( PyLong_FromString(strValue, NULL, 10)); snprintf(rBuffer, __SIZEOF_STRS__, "%.0f", PyLong_AsDouble(PyLong_FromString(strValue, NULL, 10))); printf("CONVERT 1: %.0f\nCONVERT 2: %s\n", dblValue, rBuffer); } Py_RETURN_NONE; } Test: >>> test_pylong("1639873214337061279") 1639873214337061279 AS INGRESS CONVERT 1: 1639873214337061376 CONVERT 2: 1639873214337061376 ---------- messages: 342619 nosy: sajjadfx priority: normal severity: normal status: open title: C API Function PyLong_AsDouble Returning Wrong Value type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 22:58:40 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 16 May 2019 02:58:40 +0000 Subject: [issue36934] C API Function PyLong_AsDouble Returning Wrong Value In-Reply-To: <1557974601.26.0.0658552402668.issue36934@roundup.psfhosted.org> Message-ID: <1557975520.82.0.530610690602.issue36934@roundup.psfhosted.org> Tim Peters added the comment: Note that this pure Python gives the same result: >>> "%.0f" % float(1639873214337061279) '1639873214337061376' That's not surprising: int -> float conversion is limited to the precision of a Python float, which is a C double, which is almost certainly just 53 (not 64) significant bits. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 23:11:47 2019 From: report at bugs.python.org (Windson Yang) Date: Thu, 16 May 2019 03:11:47 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml In-Reply-To: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> Message-ID: <1557976307.45.0.742897409019.issue18911@roundup.psfhosted.org> Change by Windson Yang : ---------- keywords: +patch pull_requests: +13263 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 23:12:19 2019 From: report at bugs.python.org (Windson Yang) Date: Thu, 16 May 2019 03:12:19 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml In-Reply-To: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> Message-ID: <1557976339.18.0.545584521598.issue18911@roundup.psfhosted.org> Windson Yang added the comment: I added a PR for like this: .. note:: You should specify the "xmlcharrefreplace" error handler when open a file with specified encoding:: writer = open( filename, "w", encoding="utf-8", errors="xmlcharrefreplace") doc.writexml(writer, "", " ", "utf-8") ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 23:14:57 2019 From: report at bugs.python.org (Farhan Sajjad) Date: Thu, 16 May 2019 03:14:57 +0000 Subject: [issue36934] C API Function PyLong_AsDouble Returning Wrong Value In-Reply-To: <1557974601.26.0.0658552402668.issue36934@roundup.psfhosted.org> Message-ID: <1557976497.23.0.996712079173.issue36934@roundup.psfhosted.org> Farhan Sajjad added the comment: Thanks for your input Tim. Here is what I understand: 1. In Python 3, int can be arbitrarily large. 2. C double data type can hold very large numbers, and the number tested here is quite small compared to the max. It even fits fine in a long long int. 3. Quite interestingly, this function/conversion works in Python 2. >>> sys.float_info sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.220446049250313e-16, radix=2, rounds=1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 15 23:15:00 2019 From: report at bugs.python.org (Hongxu Jia) Date: Thu, 16 May 2019 03:15:00 +0000 Subject: [issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform In-Reply-To: <1502349716.95.0.155037219321.issue31171@psf.upfronthosting.co.za> Message-ID: <1557976500.61.0.521367621867.issue31171@roundup.psfhosted.org> Change by Hongxu Jia : ---------- pull_requests: +13264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 00:02:22 2019 From: report at bugs.python.org (wuwentao) Date: Thu, 16 May 2019 04:02:22 +0000 Subject: [issue36925] python3.7.3 can't work after MacOS upgrade from v10.14.4 to v10.14.5 In-Reply-To: <1557924154.05.0.857477832316.issue36925@roundup.psfhosted.org> Message-ID: <1557979342.94.0.429679854526.issue36925@roundup.psfhosted.org> wuwentao added the comment: Hi we may found the root cause from the McAfee log file, as we have too many computer have the same result in our company, it may caused by McAfee AntiVirus software auto upgrade to new version and new policy , all of our McAfee AntiVirus have ATP feature enabled, after disabled ATP service, python3 works well now. it's really a bug for McAfee, but not Python program or MacOS upgrade issue. I'm sorry for the error bug report. close this issue as it's not python3 program bug. Thanks! Wentao ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 00:03:23 2019 From: report at bugs.python.org (Farhan Sajjad) Date: Thu, 16 May 2019 04:03:23 +0000 Subject: [issue36934] C API Function PyLong_AsDouble Returning Wrong Value In-Reply-To: <1557974601.26.0.0658552402668.issue36934@roundup.psfhosted.org> Message-ID: <1557979403.16.0.563265366542.issue36934@roundup.psfhosted.org> Farhan Sajjad added the comment: Maybe I need to go back and understand why this loss of precision is taking place for the int->float conversion, and why for certain numbers. Also, it does not work in Python 2. Please disregard the previous message. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 00:21:47 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 16 May 2019 04:21:47 +0000 Subject: [issue36934] C API Function PyLong_AsDouble Returning Wrong Value In-Reply-To: <1557974601.26.0.0658552402668.issue36934@roundup.psfhosted.org> Message-ID: <1557980507.49.0.876510548013.issue36934@roundup.psfhosted.org> Tim Peters added the comment: It sounds like you need to read an introduction (any!) to computer floating-point formats. The relevant part in the output you showed is this: mant_dig=53 As on almost other current machines, your platform's floating point format is restricted to 53 bits of precision. Therefore it's impossible to convert any positive integer to float without losing bits if the integer is of the form I * 2**E where I is odd and I.bit_length() > 53. That doesn't mean integers you can convert faithfully must be "small". For example 2**200 can be converted to float exactly. Apart from the power-of-2-exponent, that has only 1 significant bit. You can also convert (2**52 + 1) * 2**200 to float exactly. But NOT (2**53 + 1) * 2**200, because that requires 54 significant bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 01:13:20 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 16 May 2019 05:13:20 +0000 Subject: [issue36935] bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function Message-ID: <1557983600.93.0.891686339403.issue36935@roundup.psfhosted.org> New submission from Zackery Spytz : In e895de3e7f3cc2f7213b87621cfe9812ea4343f0 / bpo-35813, the deprecated function PyErr_SetFromWindowsErrWithUnicodeFilename() was added in two functions in Modules/_winapi.c. This function was deprecated in 3.3 (and all occurrences of it were removed). Also, if bpo-33407 is accepted, usage of this function will cause compiler warnings. See also bpo-19569. ---------- components: Extension Modules messages: 342626 nosy: ZackerySpytz, davin priority: normal severity: normal status: open title: bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 01:17:16 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 16 May 2019 05:17:16 +0000 Subject: [issue36935] bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function In-Reply-To: <1557983600.93.0.891686339403.issue36935@roundup.psfhosted.org> Message-ID: <1557983836.34.0.60432317068.issue36935@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13265 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 02:03:27 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 16 May 2019 06:03:27 +0000 Subject: [issue36748] Optimize textio write buffering In-Reply-To: <1556518358.69.0.33229526654.issue36748@roundup.psfhosted.org> Message-ID: <1557986607.01.0.508577581205.issue36748@roundup.psfhosted.org> Inada Naoki added the comment: New changeset bfba8c373e362d48d4ee0e0cf55b8d9c169344ae by Inada Naoki in branch 'master': bpo-36748: optimize TextIOWrapper.write() for ASCII string (GH-13002) https://github.com/python/cpython/commit/bfba8c373e362d48d4ee0e0cf55b8d9c169344ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 02:20:43 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 16 May 2019 06:20:43 +0000 Subject: [issue36748] Optimize textio write buffering In-Reply-To: <1556518358.69.0.33229526654.issue36748@roundup.psfhosted.org> Message-ID: <1557987643.72.0.280828276408.issue36748@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 04:06:17 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 16 May 2019 08:06:17 +0000 Subject: [issue36935] bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function In-Reply-To: <1557983600.93.0.891686339403.issue36935@roundup.psfhosted.org> Message-ID: <1557993977.17.0.866305000678.issue36935@roundup.psfhosted.org> Eryk Sun added the comment: This was my fault for recommending PyErr_SetFromWindowsErrWithUnicodeFilename without checking the header for deprecation. PyErr_SetFromWindowsErrWithUnicodeFilename is an internal function (added for PEP 277, circa 2.4), which was never documented in the C API. I don't follow why Serhiy deprecated it in 2016, since at the same time he updated it to use PyUnicode_FromWideChar instead of PyUnicode_FromUnicode. I see no fundamental difference in terms of resource usage between it and PyErr_SetExcFromWindowsErrWithFilename, which instead calls PyUnicode_DecodeFSDefault. In this case, the section object (file mapping) name is useful information in the exception. If the deprecation isn't lifted, it puts the onus on us to implement this functionality -- i.e. PyUnicode_FromWideChar, PyErr_SetExcFromWindowsErrWithFilenameObjects, Py_XDECREF. Or maybe add a new PyErr_SetExcFromWindowsErrWithWideCharFilename function that takes a `const wchar_t *` string, and document it in the C API. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 04:37:45 2019 From: report at bugs.python.org (Immo Wetzel) Date: Thu, 16 May 2019 08:37:45 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly In-Reply-To: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> Message-ID: <1557995865.1.0.702391501832.issue36930@roundup.psfhosted.org> Immo Wetzel added the comment: ok where should I place this . IO or Library ? If this is not a bug .... I really have to do some soul-searching ---------- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy versions: +Python 3.6 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 04:44:02 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 16 May 2019 08:44:02 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly In-Reply-To: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> Message-ID: <1557996242.05.0.174014959396.issue36930@roundup.psfhosted.org> SilentGhost added the comment: Immo, please be careful when editing the fields. You've set the values that were explicitly removed by the developer. Library is fine. ---------- assignee: terry.reedy -> components: -IDLE, IO nosy: +SilentGhost, orsenthil -terry.reedy type: -> behavior versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 04:44:18 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 16 May 2019 08:44:18 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly In-Reply-To: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> Message-ID: <1557996258.67.0.341006234424.issue36930@roundup.psfhosted.org> Change by SilentGhost : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 05:21:33 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 16 May 2019 09:21:33 +0000 Subject: [issue36936] CALL_FUNCTION_KW opcode: keyword names must be non-empty Message-ID: <1557998493.78.0.0526035265972.issue36936@roundup.psfhosted.org> New submission from Jeroen Demeyer : Document and add an assertion that the "keyword names" tuple of the CALL_FUNCTION_KW opcode must be non-empty. This is already the case with the current compiler: if there are no keyword arguments in a call, then the CALL_FUNCTION_KW opcode is not used. In light of https://github.com/python/peps/pull/1049 it's good to make this an explicit guarantee. ---------- components: Interpreter Core messages: 342631 nosy: Mark.Shannon, jdemeyer, petr.viktorin, vstinner priority: normal severity: normal status: open title: CALL_FUNCTION_KW opcode: keyword names must be non-empty type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 05:28:04 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 16 May 2019 09:28:04 +0000 Subject: [issue36936] CALL_FUNCTION_KW opcode: keyword names must be non-empty In-Reply-To: <1557998493.78.0.0526035265972.issue36936@roundup.psfhosted.org> Message-ID: <1557998884.86.0.87137769703.issue36936@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13266 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 05:59:07 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 16 May 2019 09:59:07 +0000 Subject: [issue36937] New _PyObject_MakeTpCall() function Message-ID: <1558000747.27.0.378828568729.issue36937@roundup.psfhosted.org> New submission from Jeroen Demeyer : Add a new private function PyObject *_PyObject_MakeTpCall(PyObject *callable, PyObject *const *args, Py_ssize_t nargs, PyObject *keywords) to call "callable" using tp_call, but with arguments given using the FastCallKeywords or FastCallDict convention (both are allowed, see also https://github.com/python/peps/pull/1038). The code is not new, it's essentially moving the tp_call case out of _PyObject_FastCallKeywords() and _PyObject_FastCallDict(). This was first proposed (as public API under the name PyCall_MakeTpCall) for PEP 590 but it makes sense to do this independently. ---------- components: Interpreter Core messages: 342632 nosy: Mark.Shannon, jdemeyer, petr.viktorin, vstinner priority: normal severity: normal status: open title: New _PyObject_MakeTpCall() function type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 06:06:57 2019 From: report at bugs.python.org (Michele Angrisano) Date: Thu, 16 May 2019 10:06:57 +0000 Subject: [issue36927] traceback docstrings should explicitly state return values instead of referring to other functions In-Reply-To: <1557939885.98.0.0482711491834.issue36927@roundup.psfhosted.org> Message-ID: <1558001217.86.0.976904013429.issue36927@roundup.psfhosted.org> Michele Angrisano added the comment: If Aaron can't working on it, I can do it. Just tell me. Thanks. ---------- nosy: +Michele Angrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 06:11:02 2019 From: report at bugs.python.org (daniel hahler) Date: Thu, 16 May 2019 10:11:02 +0000 Subject: [issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput In-Reply-To: <1501362127.96.0.48372316228.issue31078@psf.upfronthosting.co.za> Message-ID: <1558001462.41.0.124903539602.issue31078@roundup.psfhosted.org> daniel hahler added the comment: It was added in 477c8d5e702 (a huge svn merge commit), with this reference: r45955 | georg.brandl | 2006-05-10 19:13:20 +0200 (Wed, 10 May 2006) | 4 lines Patch #721464: pdb.Pdb instances can now be given explicit stdin and stdout arguments, making it possible to redirect input and output for remote debugging. I think a good alternative patch might be: ```diff Lib/pdb.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git i/Lib/pdb.py w/Lib/pdb.py index f5d33c27fc..daf49b3629 100755 --- i/Lib/pdb.py +++ w/Lib/pdb.py @@ -141,7 +141,9 @@ def __init__(self, completekey='tab', stdin=None, stdout=None, skip=None, nosigint=False, readrc=True): bdb.Bdb.__init__(self, skip=skip) cmd.Cmd.__init__(self, completekey, stdin, stdout) - if stdout: + if stdout and stdout is not sys.stdout: + # stdout gets passed with do_debug for example, but should usually + # not disable using raw input then. self.use_rawinput = 0 self.prompt = '(Pdb) ' self.aliases = {} ``` ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 06:12:55 2019 From: report at bugs.python.org (daniel hahler) Date: Thu, 16 May 2019 10:12:55 +0000 Subject: [issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput In-Reply-To: <1501362127.96.0.48372316228.issue31078@psf.upfronthosting.co.za> Message-ID: <1558001575.78.0.507936685171.issue31078@roundup.psfhosted.org> daniel hahler added the comment: Just for reference and searchability: this causes tab completion to not work with `debug foo()` also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 06:22:30 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 May 2019 10:22:30 +0000 Subject: [issue36936] CALL_FUNCTION_KW opcode: keyword names must be non-empty In-Reply-To: <1557998493.78.0.0526035265972.issue36936@roundup.psfhosted.org> Message-ID: <1558002150.06.0.475579078231.issue36936@roundup.psfhosted.org> Serhiy Storchaka added the comment: What happens when pass an empty tuple? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 06:35:56 2019 From: report at bugs.python.org (daniel hahler) Date: Thu, 16 May 2019 10:35:56 +0000 Subject: [issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput In-Reply-To: <1501362127.96.0.48372316228.issue31078@psf.upfronthosting.co.za> Message-ID: <1558002956.08.0.00498810259951.issue31078@roundup.psfhosted.org> daniel hahler added the comment: > I think a good alternative patch might be: This however makes it behave different in tests, where stdout might be mocked/wrapped intentionally. Therefore I think using the parent's `use_rawinput` is the better fix for this (the originally proposed patch). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 06:37:23 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 16 May 2019 10:37:23 +0000 Subject: [issue36936] CALL_FUNCTION_KW opcode: keyword names must be non-empty In-Reply-To: <1557998493.78.0.0526035265972.issue36936@roundup.psfhosted.org> Message-ID: <1558003043.31.0.991597553912.issue36936@roundup.psfhosted.org> Jeroen Demeyer added the comment: > What happens when pass an empty tuple? The way how bytecode is compiled, that doesn't actually happen so it's an entirely hypothetical question. The various XXX_FastCallKeywords functions seem to allow passing an empty tuple to mean "no keyword arguments", so I guess that nothing breaks when you would actually pass an empty tuple ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 06:43:44 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 16 May 2019 10:43:44 +0000 Subject: [issue36937] New _PyObject_MakeTpCall() function In-Reply-To: <1558000747.27.0.378828568729.issue36937@roundup.psfhosted.org> Message-ID: <1558003424.24.0.17536682547.issue36937@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13267 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 06:44:59 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 16 May 2019 10:44:59 +0000 Subject: [issue36937] New _PyObject_MakeTpCall() function In-Reply-To: <1558000747.27.0.378828568729.issue36937@roundup.psfhosted.org> Message-ID: <1558003499.19.0.208121867981.issue36937@roundup.psfhosted.org> Jeroen Demeyer added the comment: I forgot to mention that the idea and first implementation comes from Mark Shannon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 07:28:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 May 2019 11:28:00 +0000 Subject: [issue36936] CALL_FUNCTION_KW opcode: keyword names must be non-empty In-Reply-To: <1557998493.78.0.0526035265972.issue36936@roundup.psfhosted.org> Message-ID: <1558006080.25.0.0124858560564.issue36936@roundup.psfhosted.org> Serhiy Storchaka added the comment: Then I do not see a reason to add an assertion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 07:41:54 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 16 May 2019 11:41:54 +0000 Subject: [issue36936] CALL_FUNCTION_KW opcode: keyword names must be non-empty In-Reply-To: <1557998493.78.0.0526035265972.issue36936@roundup.psfhosted.org> Message-ID: <1558006914.56.0.564648837562.issue36936@roundup.psfhosted.org> Jeroen Demeyer added the comment: Adding that assertion allows future optimizations and simplifications: with the assertion, "keyword arguments are passed" becomes equivalent to kwnames != NULL instead of kwnames != NULL && PyTuple_GET_SIZE(kwnames) > 0 This may not be useful right now, but it will become more useful when implementing PEP 590. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 09:20:46 2019 From: report at bugs.python.org (Khalil) Date: Thu, 16 May 2019 13:20:46 +0000 Subject: [issue36938] Py_XDECREF on PyUnicodeobject raises SIGSEGV signal Message-ID: <1558012846.53.0.774298096399.issue36938@roundup.psfhosted.org> New submission from Khalil : I Have a set of callbacks from a C extension to a Python code and I noticed that when I report a unicode string to the Python code, and use the Py_XDECREF on it then whole application crashes with the SIGSEGV signal.This is a snippet of the codes: /***************************/ .... PyObject *MyString = PyUnicode_FromString("BlaBla"); PyTuple_SetItem(MyTuple, 0, MyString); PyObject_CallObject(callback, PyTuple); Py_XDECREF(MyString); Py_XDECREF(MyTuple); ... /***********************************/ when I create my string within the set item then it works fine, like below: .... PyTuple_SetItem(MyTuple, 0, PyUnicode_FromString("BlaBla")); PyObject_CallObject(callback, PyTuple); Py_XDECREF(MyTuple); ... ---------- components: Extension Modules messages: 342642 nosy: Khalilmtg priority: normal severity: normal status: open title: Py_XDECREF on PyUnicodeobject raises SIGSEGV signal type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 09:30:22 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 16 May 2019 13:30:22 +0000 Subject: [issue35589] BaseSelectorEventLoop.sock_sendall() performance regression: extra copy of data In-Reply-To: <1545818673.36.0.712150888896.issue35589@roundup.psfhosted.org> Message-ID: <1558013422.21.0.275512299693.issue35589@roundup.psfhosted.org> miss-islington added the comment: New changeset 6e7890028213b30939327e7cf885bf097fc14472 by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-35589: Prevent buffer copy in sock_sendall() (GH-11418) https://github.com/python/cpython/commit/6e7890028213b30939327e7cf885bf097fc14472 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 09:32:34 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 16 May 2019 13:32:34 +0000 Subject: [issue35589] BaseSelectorEventLoop.sock_sendall() performance regression: extra copy of data In-Reply-To: <1545818673.36.0.712150888896.issue35589@roundup.psfhosted.org> Message-ID: <1558013554.68.0.841307770575.issue35589@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 09:33:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 May 2019 13:33:40 +0000 Subject: [issue36938] Py_XDECREF on PyUnicodeobject raises SIGSEGV signal In-Reply-To: <1558012846.53.0.774298096399.issue36938@roundup.psfhosted.org> Message-ID: <1558013620.58.0.00606069641547.issue36938@roundup.psfhosted.org> Serhiy Storchaka added the comment: PyTuple_SetItem() steals a reference to the added item. You should not call Py_XDECREF() for it. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 09:36:45 2019 From: report at bugs.python.org (Michele Angrisano) Date: Thu, 16 May 2019 13:36:45 +0000 Subject: [issue36927] traceback docstrings should explicitly state return values instead of referring to other functions In-Reply-To: <1557939885.98.0.0482711491834.issue36927@roundup.psfhosted.org> Message-ID: <1558013805.8.0.509855296226.issue36927@roundup.psfhosted.org> Change by Michele Angrisano : ---------- keywords: +patch pull_requests: +13268 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 10:08:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 14:08:25 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558015705.49.0.693759585301.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13269 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 10:19:44 2019 From: report at bugs.python.org (jack1142) Date: Thu, 16 May 2019 14:19:44 +0000 Subject: [issue36939] Allow to use shutil.copytree for existing destination directory with optional argument Message-ID: <1558016384.86.0.469064114127.issue36939@roundup.psfhosted.org> New submission from jack1142 : Currently shutil.copytree will allow to copy tree only if destination directory doesn't exist. I think there could be added `exist_ok` keyword argument (defaulting to `False`), which when set to `True` would prevent function from raising `FileExistsError`. This is pretty easy to implement as `os.makedirs` command that raises this error already has `exist_ok` kwarg, which prevent function from raising that exception already. ---------- components: Library (Lib) messages: 342645 nosy: jack1142 priority: normal severity: normal status: open title: Allow to use shutil.copytree for existing destination directory with optional argument type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 10:24:18 2019 From: report at bugs.python.org (jack1142) Date: Thu, 16 May 2019 14:24:18 +0000 Subject: [issue36939] Allow to use shutil.copytree for existing destination directory with optional argument In-Reply-To: <1558016384.86.0.469064114127.issue36939@roundup.psfhosted.org> Message-ID: <1558016658.02.0.163285274327.issue36939@roundup.psfhosted.org> jack1142 added the comment: Sorry, it looks like I was looking at 3.7 branch and this is already implemented in master branch. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 10:39:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 14:39:42 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558017582.11.0.17341656288.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset dbacfc227381fbc7b3c886ea0bd7806ab3dc62c2 by Victor Stinner in branch 'master': bpo-36763: _PyInitError always use int for exitcode (GH-13360) https://github.com/python/cpython/commit/dbacfc227381fbc7b3c886ea0bd7806ab3dc62c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 10:42:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 14:42:58 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558017778.12.0.905465071617.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13270 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 10:45:36 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 16 May 2019 14:45:36 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1558017936.19.0.8463855017.issue36675@roundup.psfhosted.org> Jeroen Demeyer added the comment: Isn't it a *feature* that those doctest directives are not shown? Those directives are meant for the doctest module only, not for the reader of the rendered documentation. ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 10:52:18 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 16 May 2019 14:52:18 +0000 Subject: [issue36921] Deprecate yield from and @coroutine in asyncio Message-ID: <1558018338.65.0.625435116263.issue36921@roundup.psfhosted.org> New submission from miss-islington : New changeset 68b34a720485f399e8699235b8f4e08f227dd43b by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-36921: Deprecate @coroutine for sake of async def (GH-13346) https://github.com/python/cpython/commit/68b34a720485f399e8699235b8f4e08f227dd43b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 11:03:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 15:03:09 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558018989.04.0.520178668922.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ae239f6b0626e926613a4a1dbafa323bd41fec32 by Victor Stinner in branch 'master': bpo-36763: Add _PyCoreConfig.parse_argv (GH-13361) https://github.com/python/cpython/commit/ae239f6b0626e926613a4a1dbafa323bd41fec32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 11:05:24 2019 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 16 May 2019 15:05:24 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1558019124.39.0.242923858599.issue36675@roundup.psfhosted.org> ?ric Araujo added the comment: OP is about the documentation page for doctest itself! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 11:17:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 15:17:52 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558019872.19.0.762834965822.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13271 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 11:25:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 16 May 2019 15:25:40 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1558020340.44.0.907247727413.issue36675@roundup.psfhosted.org> Terry J. Reedy added the comment: Doctest directives in code examples should be suppressed everywhere *except* in the doctest.html examples showing how to use directives. The patch only exposes them for doctest.html and not for ctypes or anywhere else. They really should not be in the dir example code that I linked to. https://docs.python.org/3/library/functions.html#dir The problem there are the double comments with both a real comment and a directive. https://devguide.python.org/documenting/#source-code does not say anything about '::' causing suppression of comments and ':' leaving them. It is misleading in implying the '::' is required for a code block. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 11:26:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 15:26:17 +0000 Subject: [issue36940] Update Py_FrozenMain() for _PyCoreConfig (PEP 587) Message-ID: <1558020377.53.0.622883687871.issue36940@roundup.psfhosted.org> New submission from STINNER Victor : Python/frozenmain.c should use pre-initialization and be adapted for _PyCoreConfig. Py_FrozenMain() reimplements some features which are now implemented by _Py_InitializeFromConfig(): * disable C streams (stdin, stdout, stderr) buffering * decode argv using Py_DecodeLocale() * set the program name (call Py_SetProgramName()) * set sys.argv * reimplement the REPL It seems like it could use _Py_RunMain(), but I'm not sure. ---------- components: Interpreter Core messages: 342653 nosy: ncoghlan, steve.dower, twouters, vstinner priority: normal severity: normal status: open title: Update Py_FrozenMain() for _PyCoreConfig (PEP 587) versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 11:38:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 15:38:23 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558021103.58.0.376727271733.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9ef5dcaa0b3c7c7ba28dbb3ec0c9507d9d05e3a9 by Victor Stinner in branch 'master': bpo-36763: Add _Py_InitializeMain() (GH-13362) https://github.com/python/cpython/commit/9ef5dcaa0b3c7c7ba28dbb3ec0c9507d9d05e3a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 11:43:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 15:43:38 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558021418.98.0.894190440479.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13272 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 11:44:03 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 16 May 2019 15:44:03 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1558021443.42.0.301116284986.issue36675@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Doctest directives in code examples should be suppressed everywhere *except* in the doctest.html examples showing how to use directives. Thanks for clarifying. I missed that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 11:58:59 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 May 2019 15:58:59 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly In-Reply-To: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> Message-ID: <1558022339.61.0.480698931851.issue36930@roundup.psfhosted.org> Steve Dower added the comment: Can you clarify how you are setting your proxy configuration and how Python is finding out about it? Also, which libraries are you using? As far as I'm aware, Python itself does nothing special to load proxy settings from normal Windows configuration. Doing so would be a feature request (though it's one I'd like to see happen). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 12:09:13 2019 From: report at bugs.python.org (Immo Wetzel) Date: Thu, 16 May 2019 16:09:13 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly In-Reply-To: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> Message-ID: <1558022953.57.0.787977744071.issue36930@roundup.psfhosted.org> Immo Wetzel added the comment: >Can you clarify how you are setting your proxy configuration and how >Python is finding out about it? The windows host get his proxy configuration via group police from the Active Directory. The group policy points to a specific file wpad.dat formerly known as proxy.pac This is a configuration used for IE and Chrome automatically from the hosts. How Python finds this out and is using this is unclear to me. There is definitely no environment variable setting done. >Also, which libraries are you using? request and urllib2 both are failing >As far as I'm aware, Python itself does nothing special to load proxy settings from normal Windows configuration. Doing so would be a feature request (though it's one I'd like to see happen). I was guessing so too. Especially cos all help site tell me how to specify proxy objects for use with requests lib. But obviously there is something existing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 12:13:36 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 May 2019 16:13:36 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly In-Reply-To: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> Message-ID: <1558023216.25.0.213690043986.issue36930@roundup.psfhosted.org> Steve Dower added the comment: requests is a third-party library, so if they're finding your settings you probably need to report it to them. urllib2 is only part of Python 2.x. Do you have a repro with urllib on Python 3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 12:30:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 16:30:28 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558024228.09.0.757776732755.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 54b43bb3bb88339b63182b3515cda3efa530ed62 by Victor Stinner in branch 'master': bpo-36763: Add _PyCoreConfig.configure_c_stdio (GH-13363) https://github.com/python/cpython/commit/54b43bb3bb88339b63182b3515cda3efa530ed62 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 12:35:06 2019 From: report at bugs.python.org (Immo Wetzel) Date: Thu, 16 May 2019 16:35:06 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly In-Reply-To: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> Message-ID: <1558024506.63.0.77148725636.issue36930@roundup.psfhosted.org> Immo Wetzel added the comment: thanks for pointing this out. I've retested urllib3 with success. requests with no success. so I'll write a new issue on requests. Thanks a lot ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 12:39:57 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 May 2019 16:39:57 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1558024797.92.0.198976699102.issue36511@roundup.psfhosted.org> Steve Dower added the comment: Paul - looks like there's a timeout being hit due to lack of output. Any ideas? https://buildbot.python.org/all/#/builders/203/builds/6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 12:41:40 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 May 2019 16:41:40 +0000 Subject: [issue35926] Need openssl 1.1.1 support on Windows for ARM and ARM64 In-Reply-To: <1549508003.09.0.398179114845.issue35926@roundup.psfhosted.org> Message-ID: <1558024900.23.0.659704287291.issue35926@roundup.psfhosted.org> Steve Dower added the comment: New changeset aa73841a8fdded4a462d045d1eb03899cbeecd65 by Steve Dower in branch '3.7': bpo-35926: Add support for OpenSSL 1.1.1b on Windows (GH-11779) https://github.com/python/cpython/commit/aa73841a8fdded4a462d045d1eb03899cbeecd65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 12:56:11 2019 From: report at bugs.python.org (Immo Wetzel) Date: Thu, 16 May 2019 16:56:11 +0000 Subject: [issue36930] Windows proxy settings automatically used ... partly In-Reply-To: <1557953999.04.0.185273095926.issue36930@roundup.psfhosted.org> Message-ID: <1558025770.99.0.222166399308.issue36930@roundup.psfhosted.org> Immo Wetzel added the comment: issue is only on urllib2 and requests (external lib) ticket opened: https://github.com/kennethreitz/requests/issues/5095 ---------- stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 13:07:58 2019 From: report at bugs.python.org (dgelessus) Date: Thu, 16 May 2019 17:07:58 +0000 Subject: [issue36880] Returning None from a callback with restype py_object decrements None's refcount too much In-Reply-To: <1557527941.1.0.208797159552.issue36880@roundup.psfhosted.org> Message-ID: <1558026478.79.0.205367099715.issue36880@roundup.psfhosted.org> Change by dgelessus : ---------- keywords: +patch pull_requests: +13273 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 13:38:34 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 16 May 2019 17:38:34 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1558020340.44.0.907247727413.issue36675@roundup.psfhosted.org> Message-ID: <20190516173827.GA5163@ando.pearwood.info> Steven D'Aprano added the comment: > Doctest directives in code examples should be suppressed everywhere > *except* in the doctest.html examples showing how to use directives. > The patch only exposes them for doctest.html and not for ctypes or > anywhere else. Thanks for the patch, and the extra information, but I disagree with the decision to suppress the directives. The reason I found this problem in the first case was that I started with the ctypes documentation, where it says: "Since some code samples behave differently under Linux, Windows, or Mac OS X, they contain doctest directives in comments." and I was very keen to see those directives so I could learn the right way to deal with platform-dependent doctests. I was very confused that they weren't visible. https://docs.python.org/3/library/ctypes.html I think that doctest directives are as much a part of documenting correct usage as any other part of the example code, and they are (semi-)human readable and (almost) self-documenting. Consider this example from ctypes: >>> c_wchar_p("Hello, World") c_wchar_p(140018365411392) In the absence of a directive, but knowing that it may have been surpressed, I don't know how to interpret that. Is the output some arbitrarily chosen value that doctest ought to skip? Or is that the actual output that c_wchar_p("Hello, World") will return every single time without fail? If I was a ctypes expert, it might be blindingly obvious to me, but I'm not, so I'm left in the dark. I don't know whether I should expect that precise output each and every time, or something platform and implementation specific. If the directive #doctest:+SKIP was visible, I would know that it was an arbitrarily chosen example. My preference would be: - keep the doctest directives visible, everywhere; - make them a clickable link to the appropriate section in the doctest documentation; - and, if possible, on mouse-over, they should display a tooltip with a message like "The output of this example is arbitrary." Or similar wording. > They really should not be in the dir example code that I linked to. > https://docs.python.org/3/library/functions.html#dir On the contrary: I think that the presence of the +SKIP directive helps demonstrate that the output shown is a made-up example, not normative. (Of course it helps that I know doctest, but even if I didn't, the tooltip message would help.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 13:45:23 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 16 May 2019 17:45:23 +0000 Subject: [issue8400] zipimporter find_module fullname mis-documented In-Reply-To: <1271258442.34.0.660774695694.issue8400@psf.upfronthosting.co.za> Message-ID: <1558028723.82.0.236259340587.issue8400@roundup.psfhosted.org> Brett Cannon added the comment: Actually find_module() should be deprecated and find_spec() should be defined instead (and the same goes for load_module(); see bpo-9699). So I'm personally fine w/ making this a doc problem w/ the plan to eventually deprecate the method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 15:10:59 2019 From: report at bugs.python.org (mike bayer) Date: Thu, 16 May 2019 19:10:59 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558033859.0.0.417142010317.issue36751@roundup.psfhosted.org> mike bayer added the comment: > A deprecating warning doesn't hurt: you are still able to run your code. this is very much untrue in modern testing environments, as it is common that test suites fail on deprecation warnings, especially in libraries, to ensure downstream compatibility. My observation is that as Python 3 has been generally a lot more aggressive about new language features than things used to be in the py2k days, a lot more of these deprecations have been coming through. I've looked at pep 570 and this new syntax does not affect the four libraries for which I have to rewrite getfullargspec, so while I'm looking a bit at things like the "Signature" backport for py2.7 (funcsigs), the pure-Python complexity of Signature is very hard to take on as well as a py2k-only dependency so I'm still leaning towards producing the most minimal getfullargspec() I can use that continues to work for "traditional" Python signatures. i understand that Signature is "future-proof", but it is heavy on the pure Python and object creation and does not provide for any simple py2k/py3k cross-compatibility solution. I'd very much prefer that Signature at least be written in C for a few major versions, as well as the community has had time to move further python-3-only, before getfullargspec is so aggressively deprecated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 15:21:54 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 16 May 2019 19:21:54 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558034514.37.0.924972241222.issue36751@roundup.psfhosted.org> Miro Hron?ok added the comment: As a downstream maintainers of Python in Fedora, this is a great PITA for us. A lot of projects unfortunately treat DeprecationWarnings as errors and we run upstream test suites. It appears that this particular DeprecationWarning is now failing the test suites of the majority of important Python libraries. The warning is there from pluggy (a pytest dependency, already fixed), hypothesis, etc... We mitigate this from the testing framework dependencies, only to realize the tested library itself uses it as well. Current list of problematic packages includes pytest, tornado, sqlalchemy, numpy, dateutil and others. I'm not saying that should be the only reason not to deprecate stuff (nothing could be deprecated if we stretch that argument too far), but clearly "deprecating warning doesn't hurt" is not an argument either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 15:34:02 2019 From: report at bugs.python.org (Michele Angrisano) Date: Thu, 16 May 2019 19:34:02 +0000 Subject: [issue36748] Optimize textio write buffering In-Reply-To: <1556518358.69.0.33229526654.issue36748@roundup.psfhosted.org> Message-ID: <1558035242.85.0.0817777424355.issue36748@roundup.psfhosted.org> Change by Michele Angrisano : ---------- pull_requests: +13274 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 16:05:17 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 16 May 2019 20:05:17 +0000 Subject: [issue26515] Update extending/embedding docs to new way to build modules in C In-Reply-To: <1457491421.2.0.684118231911.issue26515@psf.upfronthosting.co.za> Message-ID: <1558037117.16.0.321379298946.issue26515@roundup.psfhosted.org> Petr Viktorin added the comment: Correct usage of multi-phase init might now get users stuck when they start needing per-module state. See PEP 573 "Module State Access from C Extension Methods" for the (hopefully) last thing that prevents me from generally recommending multi-phase init. That PEP is on my list for after PRP 590 is done. Before it's implemented, I'm happy leaving PyModuleDef_Init to experts -- that is, have it in the reference docs only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 16:07:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 16 May 2019 20:07:33 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558037253.97.0.199335821275.issue36751@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: For now, I am going to proceed to merge PR13245 and un-deprecate getfullargspec(). Being said that I would want to remark that if test suites are broken when deprecation warnings are emitted that is (1) their own choice, (2) precisely to detect when some deprecation is happening. If we apply some version of this reasoning to everything the standard library will not be able to deprecate anything (not even raise deprecation warnings!). We are talking again and again that we have a lot of old things in the standard library but it seems that removing them is also a problem. I want to make clear that I understand the arguments here and this is why I am going to merge PR13245 and I also apologize for any pain this may cause, but I also would ask people for empathy towards the standard library, Python and core developers. Regarding PEP570, getfullargspec() will report positional-only arguments as regular arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 16:08:32 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 16 May 2019 20:08:32 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558037312.05.0.181757689335.issue36751@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset aee19f54f6fe45f6b3c906987941e5a8af4468e9 by Pablo Galindo in branch 'master': bpo-36751: Undeprecate getfullargspec (GH-13245) https://github.com/python/cpython/commit/aee19f54f6fe45f6b3c906987941e5a8af4468e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 16:13:41 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 16 May 2019 20:13:41 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558037621.09.0.900611483915.issue36751@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 16:34:26 2019 From: report at bugs.python.org (Jun Aruga) Date: Thu, 16 May 2019 20:34:26 +0000 Subject: [issue34509] Starting to use gcc-8 on CI In-Reply-To: <1557958095.23.0.782442439812.issue34509@roundup.psfhosted.org> Message-ID: Jun Aruga added the comment: Sure, alright. Thanks for informing me. On Thu, 16 May 2019 at 00:08, Zachary Ware wrote: > > > Zachary Ware added the comment: > > We do now have at least one builder using GCC 8 (ware-gentoo-x86) and one using GCC 9 (cstratak-fedora), so I'm closing the issue. Thanks for bringing this up, and sorry it fell through the cracks for a while! > > ---------- > resolution: -> fixed > stage: patch review -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 17:34:52 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 16 May 2019 21:34:52 +0000 Subject: [issue36941] Windows build changes for Windows ARM64 Message-ID: <1558042492.97.0.749926608424.issue36941@roundup.psfhosted.org> New submission from Paul Monson : Add build file changes for Windows ARM64 ---------- components: Build, Windows messages: 342672 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows build changes for Windows ARM64 type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 17:37:06 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 16 May 2019 21:37:06 +0000 Subject: [issue36942] Windows code changes for Windows ARM64 Message-ID: <1558042626.28.0.817176769827.issue36942@roundup.psfhosted.org> New submission from Paul Monson : Add ifdef changes for Windows ARM64 ---------- components: Windows messages: 342673 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows code changes for Windows ARM64 type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 17:43:11 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 16 May 2019 21:43:11 +0000 Subject: [issue36943] Windows test changes for Windows ARM64 Message-ID: <1558042991.15.0.439006116362.issue36943@roundup.psfhosted.org> New submission from Paul Monson : Add Windows test changes for Windows ARM64 ---------- components: Windows messages: 342674 nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows test changes for Windows ARM64 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 17:50:56 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 16 May 2019 21:50:56 +0000 Subject: [issue36944] W Message-ID: <1558043456.14.0.422986746139.issue36944@roundup.psfhosted.org> Change by Paul Monson : ---------- nosy: Paul Monson priority: normal severity: normal status: open title: W _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 17:52:18 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 16 May 2019 21:52:18 +0000 Subject: [issue36944] Add support for ARM64 to libffi Message-ID: <1558043538.34.0.103396364975.issue36944@roundup.psfhosted.org> New submission from Paul Monson : These changes are also submitted to libffi as https://github.com/libffi/libffi/pull/490 ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware title: W -> Add support for ARM64 to libffi versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 17:53:12 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 16 May 2019 21:53:12 +0000 Subject: [issue36941] Windows build changes for Windows ARM64 In-Reply-To: <1558042492.97.0.749926608424.issue36941@roundup.psfhosted.org> Message-ID: <1558043592.21.0.580894902851.issue36941@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +13275 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 17:56:06 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 16 May 2019 21:56:06 +0000 Subject: [issue36942] Windows code changes for Windows ARM64 In-Reply-To: <1558042626.28.0.817176769827.issue36942@roundup.psfhosted.org> Message-ID: <1558043766.44.0.853679150926.issue36942@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +13276 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 17:59:10 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 16 May 2019 21:59:10 +0000 Subject: [issue36943] Windows test changes for Windows ARM64 In-Reply-To: <1558042991.15.0.439006116362.issue36943@roundup.psfhosted.org> Message-ID: <1558043950.13.0.856040111283.issue36943@roundup.psfhosted.org> Change by Paul Monson : ---------- keywords: +patch pull_requests: +13277 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 18:56:46 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 16 May 2019 22:56:46 +0000 Subject: [issue18060] Updating _fields_ of a derived struct type yields a bad cif In-Reply-To: <1369508846.31.0.680698237225.issue18060@psf.upfronthosting.co.za> Message-ID: <1558047406.57.0.0827104597797.issue18060@roundup.psfhosted.org> Jeffrey Kintscher added the comment: The t1.py test case calls both PyCStructUnionType_update_stgdict() and PyCStgDict_clone(), both of which are broken. The test case in t2.py is simpler than t1.py in that it only calls PyCStructUnionType_update_stgdict(). PyCStructUnionType_update_stgdict() gets called whenever _fields_ gets assigned a new list of element tuples. The function is supposed to copy any inherited element pointers in parent classes and append the new elements. The element pointers array in each child class is supposed to be cumulative (i.e. parent class element pointers plus child class element pointers). _fields_ is represented by a StgDictObject structure, and the relevant member variables are 'ffi_type_pointer.elements', 'len', and 'size'. 'ffi_type_pointer.elements' is an array of ffi_type pointers padded with a NULL pointer at the end. 'size' is the number of bytes in the array excluding the padding. 'len' is the number of elements in the current class (i.e. excluding the elements in parent classes). PyCStructUnionType_update_stgdict() allocates a new 'ffi_type_pointer.elements' array by adding 1 to the sum of 'len' and the 'len' member of the parent class, then multiplying by sizeof(ffi_type *). This works just fine when there is a single parent class, but breaks when there are multiple levels of inheritance. For example: class Base(Structure): _fields_ = [('y', c_double), ('x', c_double)] class Mid(Base): _fields_ = [] class Vector(Mid): _fields_ = [] PyCStructUnionType_update_stgdict() gets called for each of the three _fileds_ assignments. Assuming a pointer size of 8 bytes, Base has these values: ffi_type_pointer.elements = array of 3 pointers (x, y, and NULL padding). len = 2 size = 16 (i.e. 2 * sizeof(ffi_type *)) Mid has these values: ffi_type_pointer.elements = array of 3 pointers (x, y, and NULL padding). len = 0 size = 16 (i.e. 2 * sizeof(ffi_type *)) Vector has these values: ffi_type_pointer.elements = array of 1 pointer (x) len = 0 size = 16 (i.e. 2 * sizeof(ffi_type *)) Vector's 'len' and 'size' are correct, but 'ffi_type_pointer.elements' contains one element instead of three. Vector should have: ffi_type_pointer.elements = array of 3 pointers (x, y, and NULL padding). len = 0 size = 16 (i.e. 2 * sizeof(ffi_type *)) 'ffi_type_pointer.elements' got truncated because PyCStructUnionType_update_stgdict() uses the parent class's 'len' field to determine the size of the new array to allocate. As can be seen, Mid's 'len' is zero, so a new array with one element gets allocated and copied (0 element pointers plus a trailing NULL pointer for padding). Notice that Vector's 'size' is correct because the value is calculated as Mid's 'size' plus zero (for zero elements being added in the child class). Similarly, PyCStgDict_clone() has the same problem because it also uses the similar calculations based on 'len' to determine the new 'ffi_type_pointer.elements' array size that gets allocated and copied. The solution proposed by lauri.alanko effectively redefines the 'len' member variable to be the total number of elements defined in the inheritance chain for _fields_. While this does fix the allocation/copying issue, it breaks other code that expects the 'len' variables in the parent and child classes to be distinct values instead of cumulative. For example (from StructureTestCase.test_positional_args() in Lib/ctypes/test/test_structures.py), class W(Structure): _fields_ = [("a", c_int), ("b", c_int)] class X(W): _fields_ = [("c", c_int)] class Y(X): pass class Z(Y): _fields_ = [("d", c_int), ("e", c_int), ("f", c_int)] z = Z(1, 2, 3, 4, 5, 6) will throw an exception because Z's 'len' will be 6 instead of the expected 3. A better solution is to use 'size' to allocate and copy 'ffi_type_pointer.elements' since its value is already properly calculated and propagated through inheritance. ---------- Added file: https://bugs.python.org/file48332/t2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 19:11:19 2019 From: report at bugs.python.org (Caleb Donovick) Date: Thu, 16 May 2019 23:11:19 +0000 Subject: [issue29282] Fused multiply-add: proposal to add math.fma() In-Reply-To: <1484560897.19.0.0955404368118.issue29282@psf.upfronthosting.co.za> Message-ID: <1558048279.71.0.90009524791.issue29282@roundup.psfhosted.org> Change by Caleb Donovick : ---------- nosy: +donovick _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 19:16:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 23:16:47 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python Message-ID: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> New submission from STINNER Victor : Py_Initiliaze() always call setlocale(LC_CTYPE, "") on all platforms to set the LC_CTYPE locale to the user preferred locale. That's fine when Py_Main() is used: when Python is the only "owner" of a process. I'm not sure that it's fine when Python is embedded into an application. I propose to add _PyPreConfig.configure_locale: when set to 0, it leaves the LC_CTYPE locale unchanged. The caller is responsible to choose its favorite locale. I'm not sure if it's real issue in practice. Maybe users learnt how to workaround this limitation. By the way, I modified Python to always call setlocale(LC_CTYPE, "") on Windows, bpo-34485: commit 177d921c8c03d30daa32994362023f777624b10d Author: Victor Stinner Date: Wed Aug 29 11:25:15 2018 +0200 bpo-34485, Windows: LC_CTYPE set to user preference (GH-8988) On Windows, the LC_CTYPE is now set to the user preferred locale at startup: _Py_SetLocaleFromEnv(LC_CTYPE) is now called during the Python initialization. Previously, the LC_CTYPE locale was "C" at startup, but changed when calling setlocale(LC_CTYPE, "") or setlocale(LC_ALL, ""). pymain_read_conf() now also calls _Py_SetLocaleFromEnv(LC_CTYPE) to behave as _Py_InitializeCore(). Moreover, it doesn't save/restore the LC_ALL anymore. On Windows, standard streams like sys.stdout now always use surrogateescape error handler by default (ignore the locale). This change caused a performance regression: bpo-35195 "[Windows] Python 3.7 initializes LC_CTYPE locale at startup, causing performance issue on msvcrt isdigit()". Attached PR implements proposed change. ---------- components: Interpreter Core messages: 342677 nosy: ncoghlan, steve.dower, twouters, vstinner priority: normal severity: normal status: open title: Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 19:18:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 May 2019 23:18:16 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558048696.67.0.728072210333.issue36945@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13278 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 19:20:50 2019 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 16 May 2019 23:20:50 +0000 Subject: [issue36468] Treeview: wrong color change In-Reply-To: <1553848318.4.0.250762836848.issue36468@roundup.psfhosted.org> Message-ID: <1558048850.03.0.427232203271.issue36468@roundup.psfhosted.org> Matthew Barnett added the comment: I've just come across the same problem. For future reference, adding the following code before using a Treeview widget will fix the problem: def fixed_map(option): # Fix for setting text colour for Tkinter 8.6.9 # From: https://core.tcl.tk/tk/info/509cafafae # # Returns the style map for 'option' with any styles starting with # ('!disabled', '!selected', ...) filtered out. # style.map() returns an empty list for missing options, so this # should be future-safe. return [elm for elm in style.map('Treeview', query_opt=option) if elm[:2] != ('!disabled', '!selected')] style = ttk.Style() style.map('Treeview', foreground=fixed_map('foreground'), background=fixed_map('background')) ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 19:32:55 2019 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 16 May 2019 23:32:55 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558049575.96.0.48192815197.issue36751@roundup.psfhosted.org> Nick Coghlan added the comment: Thanks Pablo. Noting for the record: positional-only arguments aren't new *semantically", since extension modules have always allowed them, and you've long been able to emulate them in Python code by accepting "*args". Prior to the introduction of argument clinic and __text_signature__, the inspect module wouldn't report *anything* particularly useful for affected signatures, so folks have long built argument introspection based systems around the assumption that they will only be passed functions that they can successfully introspect. The introduction of a Python level syntax for positional-only arguments doesn't change that logic, as all a consuming application has to do to be compatible with them is to adopt the principle "if an argument can be supplied positionally, it will be supplied positionally", and then only use keywords for keyword-only arguments. Alternatively, consuming frameworks are also free to make "don't use positional-only arguments" a constraint on the callable inputs they accept. That said, we *may* want to add a "num_position_only" attribute to FullArgSpec that isn't part of the tuple unpacking, for similar reasons to why we undeprecated getfullargspec in the first place: the easiest way to migrate from getfullargspec to Signature is to write a wrapper API, and if the existence of a wrapper API is inevitable (as I now believe it is, after our experience with the first attempted deprecation), we may as well maintain a properly tested one in the standard library, rather than seeing multiple variants of the same code spring up elsewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 19:38:55 2019 From: report at bugs.python.org (Ying Wang) Date: Thu, 16 May 2019 23:38:55 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1558049935.87.0.531193388069.issue24564@roundup.psfhosted.org> Change by Ying Wang : ---------- keywords: +patch pull_requests: +13279 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 19:38:55 2019 From: report at bugs.python.org (Ying Wang) Date: Thu, 16 May 2019 23:38:55 +0000 Subject: [issue36850] shutil.copy2 fails with even with source network filesystem not supporting extended attributes In-Reply-To: <1557301411.76.0.646767757374.issue36850@roundup.psfhosted.org> Message-ID: <1558049935.98.0.725434133229.issue36850@roundup.psfhosted.org> Change by Ying Wang : ---------- pull_requests: +13280 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 19:39:58 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 May 2019 23:39:58 +0000 Subject: [issue36755] [2.7] test_httplib leaked [8, 8, 8] references with OpenSSL 1.1.1 In-Reply-To: <1556585101.72.0.886455290046.issue36755@roundup.psfhosted.org> Message-ID: <1558049998.39.0.888742826612.issue36755@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +13281 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 20:16:33 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 17 May 2019 00:16:33 +0000 Subject: [issue26092] doctest should allow custom sys.displayhook In-Reply-To: <1452622857.37.0.137754453324.issue26092@psf.upfronthosting.co.za> Message-ID: <1558052193.86.0.189823536442.issue26092@roundup.psfhosted.org> Change by Tim Peters : ---------- nosy: +noam, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 20:17:33 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 17 May 2019 00:17:33 +0000 Subject: [issue26092] doctest should allow custom sys.displayhook In-Reply-To: <1452622857.37.0.137754453324.issue26092@psf.upfronthosting.co.za> Message-ID: <1558052253.57.0.0259888019969.issue26092@roundup.psfhosted.org> Tim Peters added the comment: Noam Yorav-Raphael, I tried to add you because this is pushing back against your patch in issue 8408. It's been some years now, and nobody has cared enough to pursue it, so I'll just close this if you still don't care ;-) As doctest's original author, I appreciate why 8408 was done, but don't think it was "a good" solution. In fact doctest can have no idea whether an example was _intended_ to be run with or without a custom shell's displayhook function invoked to massage the output first. So more sensible would have been to add a new doctest directive + optional argument, to make the intent explicit. Which is certainly more work, and hasn't actually come up as "a problem" yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 20:18:59 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 17 May 2019 00:18:59 +0000 Subject: [issue26092] doctest should allow custom sys.displayhook In-Reply-To: <1452622857.37.0.137754453324.issue26092@psf.upfronthosting.co.za> Message-ID: <1558052339.55.0.346054822717.issue26092@roundup.psfhosted.org> Tim Peters added the comment: Oops! Should be issue 8048. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 20:22:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 00:22:39 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558052559.2.0.145534252929.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13282 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 20:46:59 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 17 May 2019 00:46:59 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1558054019.31.0.908130365995.issue36876@roundup.psfhosted.org> Change by Eric Snow : ---------- keywords: +patch pull_requests: +13283 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 21:15:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 01:15:17 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558055717.57.0.0274878017441.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 870b035bc6da96689b59dd6f79782ec6f1873617 by Victor Stinner in branch 'master': bpo-36763: Cleanup precmdline in _PyCoreConfig_Read() (GH-13371) https://github.com/python/cpython/commit/870b035bc6da96689b59dd6f79782ec6f1873617 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 21:17:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 01:17:32 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558055852.09.0.617784621367.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13284 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 21:55:53 2019 From: report at bugs.python.org (mike bayer) Date: Fri, 17 May 2019 01:55:53 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558058153.31.0.508795913724.issue36751@roundup.psfhosted.org> mike bayer added the comment: > We are talking again and again that we have a lot of old things in the standard library but it seems that removing them is also a problem. I agree that the reason we have these deprecation warnings is so that we do get notified and we do fix them. I think Signature is tough here because it is so different from how getfullargspec() worked which makes it difficult to port towards, and its very long and complicated invocation steps, with many loops, function and method calls, object creation overhead, none of which existed in Python 3.3's 20 line getfullargspec() implementation, is making me very hesitant to switch to it and I'm continuing to consider just writing my own thing that keeps the overhead as low as possible; but I will run timing tests on all versions of things before I do anything like that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 22:26:04 2019 From: report at bugs.python.org (Ian Good) Date: Fri, 17 May 2019 02:26:04 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1558059964.7.0.195227888211.issue36889@roundup.psfhosted.org> Change by Ian Good : ---------- nosy: +icgood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 22:29:41 2019 From: report at bugs.python.org (Windson Yang) Date: Fri, 17 May 2019 02:29:41 +0000 Subject: [issue21861] io class name are hardcoded in reprs In-Reply-To: <1403631418.74.0.109096243494.issue21861@psf.upfronthosting.co.za> Message-ID: <1558060181.17.0.0451526045646.issue21861@roundup.psfhosted.org> Windson Yang added the comment: IIUC, in the c code we just hardcode the name "_io.FileIO" for "PyFileIO_Type" in https://github.com/python/cpython/blob/master/Modules/_io/fileio.c#L1180. If we want to get a dynamic name, we should replace the hardcode name with the module name (like "__main__"). I found this also happens on other modules like collections. ---------- nosy: +Windson Yang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 22:31:15 2019 From: report at bugs.python.org (mike bayer) Date: Fri, 17 May 2019 02:31:15 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558060275.39.0.724301798869.issue36751@roundup.psfhosted.org> mike bayer added the comment: Just did some benchmarks, and while Signature has apparently had a big speedup in Python 3.6, it is still much less performant than either the Python 2.7 or Python 3.3 implementations, anywhere from 6-18 times slower approximately depending on the function. For those of us that need a getargspec that is only used on selected, internal functions where we don't need the newer language features, it's likely worth it to vendor the Python 3.3 getfullargspec() implementation which is very simple: https://gist.github.com/zzzeek/0eb0636fa3917f36ffd887d9f765c208 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 22:32:36 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 17 May 2019 02:32:36 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1558060356.01.0.26577339533.issue36564@roundup.psfhosted.org> Abhilash Raj added the comment: Moving the conversation here from https://github.com/python/cpython/pull/12732 for David. I previously suggested HeaderParseError because of the fact that we could fail to parse a value into a Header Object in the above scenario. @r.david.murray Would it be more appropriate to have something like a "PolicyError" in case where the policy's max_line_length isn't long enough to fit the shortest encoded word? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 16 23:44:07 2019 From: report at bugs.python.org (Laurie Opperman) Date: Fri, 17 May 2019 03:44:07 +0000 Subject: [issue36602] Recursive directory list with pathlib.Path.iterdir In-Reply-To: <1554980374.32.0.410571505677.issue36602@roundup.psfhosted.org> Message-ID: <1558064647.38.0.717817147417.issue36602@roundup.psfhosted.org> Laurie Opperman added the comment: I think I may have broken bedevere-bot by request change reviews before the PR was assigned... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 00:20:58 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 17 May 2019 04:20:58 +0000 Subject: [issue18060] Updating _fields_ of a derived struct type yields a bad cif In-Reply-To: <1369508846.31.0.680698237225.issue18060@psf.upfronthosting.co.za> Message-ID: <1558066858.14.0.940962120849.issue18060@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +13285 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 00:40:00 2019 From: report at bugs.python.org (Noam Yorav-Raphael) Date: Fri, 17 May 2019 04:40:00 +0000 Subject: [issue26092] doctest should allow custom sys.displayhook In-Reply-To: <1452622857.37.0.137754453324.issue26092@psf.upfronthosting.co.za> Message-ID: <1558068000.21.0.110617373787.issue26092@roundup.psfhosted.org> Noam Yorav-Raphael added the comment: Tim, thanks for letting me know. I certainly don't mind if you close this bug, since it undoes my old (and still relevant) fix. ---------- nosy: +noamraph _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 01:48:44 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 17 May 2019 05:48:44 +0000 Subject: [issue36946] Possible signed integer overflow in slice handling Message-ID: <1558072124.41.0.0531416904304.issue36946@roundup.psfhosted.org> New submission from Zackery Spytz : Python 3.8.0a4+ (heads/master:870b035bc6, May 16 2019, 20:53:02) [GCC 9.0.1 20190402 (experimental) [trunk revision 270074]] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> 'hi'[1::sys.maxsize] Objects/unicodeobject.c:14038:55: runtime error: signed integer overflow: 1 + 9223372036854775807 cannot be represented in type 'long int' 'i' >>> This is because unicode_subscript() performs an extra addition (cur += step) at the end of the for loop (which can overflow). The result of that final addition is not actually used. A patch to fix this issue was posted on #1621, but it seems that the patch has been abandoned. The bug is also described in detail in that issue. I have tweaked the patch and will open a PR. ---------- components: Extension Modules, Interpreter Core messages: 342689 nosy: ZackerySpytz, martin.panter priority: normal severity: normal status: open title: Possible signed integer overflow in slice handling type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 01:58:50 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 17 May 2019 05:58:50 +0000 Subject: [issue36946] Possible signed integer overflow in slice handling In-Reply-To: <1558072124.41.0.0531416904304.issue36946@roundup.psfhosted.org> Message-ID: <1558072730.22.0.484079765788.issue36946@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13286 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 02:32:12 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 17 May 2019 06:32:12 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1558074732.28.0.721870763612.issue36799@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 03:13:26 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 May 2019 07:13:26 +0000 Subject: [issue36946] Possible signed integer overflow in slice handling In-Reply-To: <1558072124.41.0.0531416904304.issue36946@roundup.psfhosted.org> Message-ID: <1558077206.44.0.469885275088.issue36946@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 14514d9084a40f599c57da853a305aa264562a43 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375) https://github.com/python/cpython/commit/14514d9084a40f599c57da853a305aa264562a43 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 03:14:06 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 07:14:06 +0000 Subject: [issue36946] Possible signed integer overflow in slice handling In-Reply-To: <1558072124.41.0.0531416904304.issue36946@roundup.psfhosted.org> Message-ID: <1558077246.05.0.336331552009.issue36946@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13287 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 03:33:13 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 07:33:13 +0000 Subject: [issue36946] Possible signed integer overflow in slice handling In-Reply-To: <1558072124.41.0.0531416904304.issue36946@roundup.psfhosted.org> Message-ID: <1558078393.37.0.912531520417.issue36946@roundup.psfhosted.org> miss-islington added the comment: New changeset f02d1a43c6be658cd279edb90e8e96c99e1127e7 by Miss Islington (bot) in branch '3.7': bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375) https://github.com/python/cpython/commit/f02d1a43c6be658cd279edb90e8e96c99e1127e7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 03:50:04 2019 From: report at bugs.python.org (JUN-WEI SONG) Date: Fri, 17 May 2019 07:50:04 +0000 Subject: [issue36260] Zip Bomb vulnerability In-Reply-To: <1552288618.75.0.236192047967.issue36260@roundup.psfhosted.org> Message-ID: <1558079404.44.0.275779325479.issue36260@roundup.psfhosted.org> Change by JUN-WEI SONG : ---------- keywords: +patch pull_requests: +13288 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 03:59:20 2019 From: report at bugs.python.org (JUN-WEI SONG) Date: Fri, 17 May 2019 07:59:20 +0000 Subject: [issue36260] Zip Bomb vulnerability In-Reply-To: <1552288618.75.0.236192047967.issue36260@roundup.psfhosted.org> Message-ID: <1558079960.46.0.194676714068.issue36260@roundup.psfhosted.org> JUN-WEI SONG added the comment: Dear friends, We moved a little bit forward to improve the writing. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 04:29:01 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 08:29:01 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1558081741.0.0.832817908979.issue35545@roundup.psfhosted.org> miss-islington added the comment: New changeset ac8eb8f36bf7ca636f8d886eb65a3b532f4725d5 by Miss Islington (bot) (Erwan Le Pape) in branch 'master': bpo-35545: Fix asyncio discarding IPv6 scopes (GH-11271) https://github.com/python/cpython/commit/ac8eb8f36bf7ca636f8d886eb65a3b532f4725d5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 04:46:49 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 08:46:49 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1558082809.82.0.0592894390641.issue35545@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13290 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 04:55:29 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 08:55:29 +0000 Subject: [issue36928] linkt threading.settrace to sys.settrace In-Reply-To: <1557943883.68.0.641257607459.issue36928@roundup.psfhosted.org> Message-ID: <1558083329.28.0.771432699224.issue36928@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13291 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:00:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 09:00:53 +0000 Subject: [issue36260] [security] CVE-2019-9674: Zip Bomb vulnerability In-Reply-To: <1552288618.75.0.236192047967.issue36260@roundup.psfhosted.org> Message-ID: <1558083653.52.0.929315871232.issue36260@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Zip Bomb vulnerability -> [security] CVE-2019-9674: Zip Bomb vulnerability _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:04:20 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 17 May 2019 09:04:20 +0000 Subject: [issue36928] linkt threading.settrace to sys.settrace In-Reply-To: <1557943883.68.0.641257607459.issue36928@roundup.psfhosted.org> Message-ID: <1558083860.22.0.850309902063.issue36928@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:05:15 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 17 May 2019 09:05:15 +0000 Subject: [issue36928] linkt threading.settrace to sys.settrace In-Reply-To: <1557943883.68.0.641257607459.issue36928@roundup.psfhosted.org> Message-ID: <1558083915.58.0.88924270151.issue36928@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your contribution ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:05:26 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 09:05:26 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1558083926.02.0.809325343994.issue35545@roundup.psfhosted.org> miss-islington added the comment: New changeset 94704048e2467dbb4c53ca02d103eab5671e84b3 by Miss Islington (bot) in branch '3.7': bpo-35545: Fix asyncio discarding IPv6 scopes (GH-11271) https://github.com/python/cpython/commit/94704048e2467dbb4c53ca02d103eab5671e84b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:12:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 09:12:15 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558084335.48.0.623389136044.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fed02e15b39b6f1521ea21654be5fc0757a8720a by Victor Stinner in branch 'master': bpo-36763: Remove _PyCoreConfig.program (GH-13373) https://github.com/python/cpython/commit/fed02e15b39b6f1521ea21654be5fc0757a8720a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:15:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 09:15:45 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558084545.24.0.391358872529.issue36751@roundup.psfhosted.org> STINNER Victor added the comment: Can this issue be closed now? This issue was specific to the impact of the PEP 570 on the inspect module. It's now fixed, right? If someone wants to continue the discussion about a specific aspect of the inspect module, I suggest to start a thread on python-dev, or open a more specific issue, for example to discuss inspect performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:43:35 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 17 May 2019 09:43:35 +0000 Subject: [issue36770] stdlib - shutil.make_archive - add support for different ZIP compression method In-Reply-To: <1556721368.48.0.786007999998.issue36770@roundup.psfhosted.org> Message-ID: <1558086215.29.0.473156977039.issue36770@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi @owenchia Thanks for your contribution! The project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). CLA: https://www.python.org/psf/contrib/contrib-form/ Could you create a PR on Github with your patch? In your bpo account, do not forget to assign your github account to your bpo account with the right value Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:50:26 2019 From: report at bugs.python.org (Kushal Das) Date: Fri, 17 May 2019 09:50:26 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1558086626.68.0.140793964965.issue36908@roundup.psfhosted.org> Kushal Das added the comment: In future we should do the similar change for any module. This will be helpful for new beginners. ---------- nosy: +kushal.das _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:51:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 09:51:24 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558086684.21.0.283324582582.issue36945@roundup.psfhosted.org> STINNER Victor added the comment: > I'm not sure if it's real issue in practice. Maybe users learnt how to workaround this limitation. I sent an email to capi-sig to get a feedback on this question :-) https://mail.python.org/archives/list/capi-sig at python.org/thread/KP2QNE4YITGJDZMZW5Y4EGIPZR2L6HRD/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:56:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 09:56:11 +0000 Subject: [issue35195] [Windows] Python 3.7 initializes LC_CTYPE locale at startup, causing performance issue on msvcrt isdigit() In-Reply-To: <1541717781.13.0.788709270274.issue35195@psf.upfronthosting.co.za> Message-ID: <1558086971.32.0.134892734105.issue35195@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-36945: "Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:58:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 09:58:48 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558087128.47.0.499382478921.issue36945@roundup.psfhosted.org> STINNER Victor added the comment: > Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python This parameter is similar the _PyCoreConfig.configure_c_stdio parameter that I just added. It allows to behave more as a "regular Python" or to better "isolate Python". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 05:59:17 2019 From: report at bugs.python.org (Kushal Das) Date: Fri, 17 May 2019 09:59:17 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1558087157.72.0.354987067672.issue36908@roundup.psfhosted.org> Kushal Das added the comment: New changeset 6faad355db6c2bd4a0ade7868f245b42c04f5337 by Kushal Das (Ned Batchelder) in branch 'master': bpo-36908: 'This module is always available' isn't helpful. (#13297) https://github.com/python/cpython/commit/6faad355db6c2bd4a0ade7868f245b42c04f5337 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 06:35:05 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 17 May 2019 10:35:05 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1558089305.6.0.542317058553.issue36907@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13292 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 06:37:13 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 17 May 2019 10:37:13 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1558089433.22.0.63698411778.issue1875@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset af8646c8054d0f4180a2013383039b6a472f9698 by Pablo Galindo in branch 'master': bpo-1875: Raise SyntaxError in invalid blocks that will be optimised away (GH-13332) https://github.com/python/cpython/commit/af8646c8054d0f4180a2013383039b6a472f9698 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 06:37:55 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 10:37:55 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1558089475.12.0.906162702646.issue1875@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13293 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 06:48:34 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 10:48:34 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes In-Reply-To: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> Message-ID: <1558090114.92.0.143914188321.issue36789@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13294 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 06:59:53 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 10:59:53 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1558090793.9.0.502289219107.issue1875@roundup.psfhosted.org> miss-islington added the comment: New changeset 85ed1712e428f93408f56fc684816f9a85b0ebc0 by Miss Islington (bot) in branch '3.7': bpo-1875: Raise SyntaxError in invalid blocks that will be optimised away (GH-13332) https://github.com/python/cpython/commit/85ed1712e428f93408f56fc684816f9a85b0ebc0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 07:03:54 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 11:03:54 +0000 Subject: [issue35252] test_functools dead code after FIXME In-Reply-To: <1542244463.09.0.788709270274.issue35252@psf.upfronthosting.co.za> Message-ID: <1558091034.53.0.87227911134.issue35252@roundup.psfhosted.org> Cheryl Sabella added the comment: @lukasz.langa added this FIXME comment originally, so nosying him for a review. ---------- nosy: +cheryl.sabella, lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 07:05:14 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 11:05:14 +0000 Subject: [issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes In-Reply-To: <1556928017.33.0.648089706151.issue36789@roundup.psfhosted.org> Message-ID: <1558091114.23.0.526930041427.issue36789@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 07:12:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 May 2019 11:12:29 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1558091549.92.0.307293435177.issue36918@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think this is a bug in BasicIO. close() should be idempotent. Calling it on the closed file should have no effect. ---------- components: +IO -Tests nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 07:22:44 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 17 May 2019 11:22:44 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1558092164.43.0.983734347851.issue1875@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 07:23:42 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 17 May 2019 11:23:42 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558092222.95.0.31359070458.issue36751@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 07:35:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 May 2019 11:35:29 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1558092929.59.0.000632195150005.issue36918@roundup.psfhosted.org> Serhiy Storchaka added the comment: No, BasicIO.close() is correct. This is a bug in the garbage collector: the underlying file is closed before closing HTTPResponse. The HTTPResponse instance has a reference to the file object, the file object does not have a reference to the HTTPResponse instance, therefore the HTTPResponse instance should be destroyed first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 07:36:30 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 17 May 2019 11:36:30 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1558092990.73.0.202285685735.issue36918@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: My analysis was that close was called on fakesocket which is internally closed when it's counter resets to zero and the destructor was trying to flush on a closed object during destructor call. Comment from https://bugs.python.org/issue18748#msg341106 The ValueError warnings in test_urllib noted in msg340059 feels like an issue with the test where FakeSocket calls close by itself once it's internal io_refs counter is 0 and during destructor again close is called on an already closed object causing the ValueError. * The test uses fakehttp() creating FakeSocket starting with io_refs as 1 [1] * During the test in urlopen, sock.makefile() (io_refs += 1) is called increasing the io_refs to be 2. * HTTPConnection.close calls sock.close (fakesocket.close) [3] calling io_refs -= 1 and to fakesocket.io_ref to be 1. * This test uses raises status 302 with http_error_302 which calls self.redirect_internal where self.close is again called causing fp.io_refs == 0 and subsequently calling io.BytesIO.close(self) to close the object. [4] * During the end of the test destructor is called on the above closed fakesocket object and trying to flush on a closed object causes the ValueError warnings . Maybe a check could be added during flush to make sure the object is not closed by testing for self.closed but I am not sure if closed attribute is guaranteed to be present. Removing the manual call to close in fakesocket could help since the destructor should be taking care of it and I could see no test failures or warnings removing the close as io_refs gets to 0. [1] https://github.com/python/cpython/blob/be6dbfb43b89989ccc83fbc4c5234f50f44c47ad/Lib/test/test_urllib.py#L61 [2] https://github.com/python/cpython/blob/be6dbfb43b89989ccc83fbc4c5234f50f44c47ad/Lib/test/test_urllib.py#L67 [3] https://github.com/python/cpython/blob/be6dbfb43b89989ccc83fbc4c5234f50f44c47ad/Lib/http/client.py#L919 [4] https://github.com/python/cpython/blob/be6dbfb43b89989ccc83fbc4c5234f50f44c47ad/Lib/urllib/request.py#L2145 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 08:01:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 12:01:04 +0000 Subject: [issue17679] sysconfig generation uses some env variables multiple times In-Reply-To: <1365515508.55.0.936246153534.issue17679@psf.upfronthosting.co.za> Message-ID: <1558094464.84.0.27699874888.issue17679@roundup.psfhosted.org> STINNER Victor added the comment: The patch is wrong. I'm not sure when/how C flags are duplicated. Anyway, it seems like the issue is somehow outdated or even gone, so I close the issue. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 08:30:13 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 12:30:13 +0000 Subject: [issue10669] Document Deprecation Warnings and how to fix In-Reply-To: <1291959647.89.0.597449973256.issue10669@psf.upfronthosting.co.za> Message-ID: <1558096213.52.0.295859135799.issue10669@roundup.psfhosted.org> Cheryl Sabella added the comment: If this is change is still desirable, I think it might be a good issue for someone who had contributed a few patches and is looking for something a little more challenging to work on. ---------- nosy: +cheryl.sabella, mdk, willingc stage: -> needs patch versions: +Python 3.8 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 08:30:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 12:30:46 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558096246.61.0.909918759582.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13295 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 08:44:34 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 12:44:34 +0000 Subject: [issue8425] a -= b should be fast if a is a small set and b is a large set In-Reply-To: <1271438382.18.0.76932438586.issue8425@psf.upfronthosting.co.za> Message-ID: <1558097074.45.0.0826455938215.issue8425@roundup.psfhosted.org> Cheryl Sabella added the comment: @maker, would you be interested in converting your patch to a Github pull request? Thanks! ---------- nosy: +cheryl.sabella versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 08:52:34 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 12:52:34 +0000 Subject: [issue19175] Erroneous reference to "integer" in format string grammar In-Reply-To: <1381032864.93.0.113807397977.issue19175@psf.upfronthosting.co.za> Message-ID: <1558097554.32.0.99336267964.issue19175@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Format mini-language integer definition is incorrect _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 08:53:08 2019 From: report at bugs.python.org (Yury) Date: Fri, 17 May 2019 12:53:08 +0000 Subject: [issue28874] test_logging fails and freezes In-Reply-To: <1480923682.41.0.106352881958.issue28874@psf.upfronthosting.co.za> Message-ID: <1558097588.13.0.110137231379.issue28874@roundup.psfhosted.org> Yury added the comment: I am observing this issue while building 3.6.8 version on CentOS 7.6. Shall we reopen the bug? Thanks, Yury. ---------- nosy: +scrutari _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 09:06:12 2019 From: report at bugs.python.org (R. David Murray) Date: Fri, 17 May 2019 13:06:12 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1558098372.09.0.512114232159.issue36564@roundup.psfhosted.org> R. David Murray added the comment: Can you demonstrate the parsing error? maxlen should have no effect during parsing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 09:08:35 2019 From: report at bugs.python.org (R. David Murray) Date: Fri, 17 May 2019 13:08:35 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1558098515.11.0.125878006703.issue36564@roundup.psfhosted.org> R. David Murray added the comment: As for the other, I don't see the need for a custom error. It's a ValueError in my view. I wouldn't object to it strongly, but note that this error is content dependent. If there's nothing to encode, you can "get away with" a shorter maxlen. Though why you would want to is beyond me, and that's another reason I don't think this warrants a custom error class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 09:11:37 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 17 May 2019 13:11:37 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1558098697.31.0.184160373626.issue36564@roundup.psfhosted.org> Paul Ganssle added the comment: Responding to a comment on the PR: > Now, that said you might want to consider the fact that in _fold_mime_parameters I deal with this issue by bumping maxlen to 78 rather than raising an error. I'm not sure that was the right choice, but whatever we do, it should probably be made consistent between the two cases. So I think in an ideal world this would be consistent between the two, but I *also* think that the right solution is to raise an exception rather than silently coercing, and changing this in _fold_mime_parameters would be a backwards-incompatible change. I think that if you agree that an exception is better, maybe the path forward is to raise an exception in this case and switch the _fold_mime_parameters case over to raising a warning, which will be turned into an exception in a later release (3.10 maybe). > It is so sad that I never came back to fix that XXX comment I left myself :( I'm glad that the XXX comment was at least there! Otherwise I wouldn't have notice that there was anything to fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 09:21:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 13:21:07 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558099267.76.0.0339686974191.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b16b4e45923f4e4dfd8e970ae4e6a934faf73b79 by Victor Stinner in branch 'master': bpo-36763: Add PyMemAllocatorName (GH-13387) https://github.com/python/cpython/commit/b16b4e45923f4e4dfd8e970ae4e6a934faf73b79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 09:24:07 2019 From: report at bugs.python.org (Yury) Date: Fri, 17 May 2019 13:24:07 +0000 Subject: [issue28874] test_logging fails and freezes In-Reply-To: <1480923682.41.0.106352881958.issue28874@psf.upfronthosting.co.za> Message-ID: <1558099447.17.0.60769815371.issue28874@roundup.psfhosted.org> Yury added the comment: And same happens to me when building version 3.7.3. I'm building with gcc (GCC) 4.8.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 09:33:26 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 13:33:26 +0000 Subject: [issue29696] Use namedtuple in string.Formatter.parse iterator response In-Reply-To: <1488468843.51.0.704010418399.issue29696@psf.upfronthosting.co.za> Message-ID: <1558100006.08.0.987886160831.issue29696@roundup.psfhosted.org> Cheryl Sabella added the comment: It looks like Pablo's patch for this was good, but then closed because the idea was rejected. Should this ticket also be closed as rejected? ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 10:03:42 2019 From: report at bugs.python.org (R. David Murray) Date: Fri, 17 May 2019 14:03:42 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1558101822.6.0.292398216267.issue36564@roundup.psfhosted.org> R. David Murray added the comment: Good point about the backward compatibility. Yes I agree, I think raising the error is probably better. A deprecation warning seems like a good path forward...I will be very surprised if anyone encounters it, though :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 10:15:27 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 17 May 2019 14:15:27 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1558102527.13.0.820787839551.issue36564@roundup.psfhosted.org> Abhilash Raj added the comment: I was wrong about the parsing error, it looks like length from the policy isn't used when parsing. >>> from email.policy import default >>> from email import message_from_string >>> p = default.clone(max_line_length=10) >>> msg = message_from_string("""\ ... From: Hello at example.com ... To: Hello at example.com ... Subject: WelcomeToThisLongSubject ... ... Thanks""", policy=p) >>> msg >>> msg['Subject'] 'WelcomeToThisLongSubject' This works just fine. Thanks David. +1 for ValueError then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 10:16:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 14:16:24 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558102584.97.0.0435744366234.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 10:27:51 2019 From: report at bugs.python.org (Nicholas Matthews) Date: Fri, 17 May 2019 14:27:51 +0000 Subject: [issue36947] Fix 3.3.3.1 Metaclasses Documentation Message-ID: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> New submission from Nicholas Matthews : Currently the final sentence of the second paragraph reads: "In the following example, both MyClass and MySubclass are instances of Meta:" It should read something like: "In the following example, both MyClass and MySubclass have the metaclass Meta, and new instances will be created using Meta:" Classes are created by their metaclass, but cannot be said to be instances of their metaclass, correct? ---------- components: Library (Lib) messages: 342723 nosy: Nicholas Matthews priority: normal severity: normal status: open title: Fix 3.3.3.1 Metaclasses Documentation type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 10:31:52 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 17 May 2019 14:31:52 +0000 Subject: [issue36947] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1558103512.51.0.380319825352.issue36947@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your report ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 10:38:56 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 17 May 2019 14:38:56 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1558103936.69.0.298982134015.issue36947@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- keywords: +easy title: Fix 3.3.3.1 Metaclasses Documentation -> [Good first issue] Fix 3.3.3.1 Metaclasses Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 10:48:35 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 17 May 2019 14:48:35 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1558104515.51.0.578004276372.issue36947@roundup.psfhosted.org> St?phane Wirtel added the comment: just one question, I don't find the paragraph with this text in the code. Could you share the link of this paragraph? Thank you ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 10:49:42 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 17 May 2019 14:49:42 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1558104582.1.0.224065256503.issue36947@roundup.psfhosted.org> St?phane Wirtel added the comment: Found here: https://docs.python.org/3/reference/datamodel.html#metaclasses Thank you ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 10:51:04 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 17 May 2019 14:51:04 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1558104664.48.0.206444665133.issue36947@roundup.psfhosted.org> St?phane Wirtel added the comment: If you want to modify the text, please create a PR for this file: https://github.com/python/cpython/blob/master/Doc/reference/datamodel.rst#metaclasses Don't forget to sign the CLA, Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 10:59:21 2019 From: report at bugs.python.org (Nicholas Matthews) Date: Fri, 17 May 2019 14:59:21 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1558105161.31.0.527288470465.issue36947@roundup.psfhosted.org> Nicholas Matthews added the comment: Ok, I will create a PR soon and update the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 11:25:42 2019 From: report at bugs.python.org (R. David Murray) Date: Fri, 17 May 2019 15:25:42 +0000 Subject: [issue36564] Infinite loop with short maximum line lengths in EmailPolicy In-Reply-To: <1554741934.49.0.490765940263.issue36564@roundup.psfhosted.org> Message-ID: <1558106742.81.0.565866869906.issue36564@roundup.psfhosted.org> R. David Murray added the comment: Right, one of the fundamental principles of the email library is that when parsing input we do not ever raise an error. We may note defects, but whatever we get we *must* parse and turn in to *something*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 11:27:24 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 17 May 2019 15:27:24 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1558106844.51.0.682110067093.issue36947@roundup.psfhosted.org> Josh Rosenberg added the comment: Clarification is fine, but "MyClass and MySubclass are instances of Meta:" is 100% true. Declaring a class to have a metaclass (or inheriting from a class with a metaclass) means that the class itself is an instance of the metaclass. New instances of the classes with metaclass Meta are not "created using Meta"; Meta modifies the creation of the classes themselves, not instances of the classes. Point is, your suggested change is half wrong (new instances of MyClass and MySubclass aren't directly created using Meta), and half misunderstanding the current documentation ("MyClass is an instance of Meta" already means "MyClass has the metaclass Meta"). ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 11:35:13 2019 From: report at bugs.python.org (Nicholas Matthews) Date: Fri, 17 May 2019 15:35:13 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1558107313.66.0.151424556922.issue36947@roundup.psfhosted.org> Nicholas Matthews added the comment: Thanks for the clarification. For the first point on the correctness of the original text, that makes sense, could you link me to any relevant documentation for further reading? On the second point "Meta modifies the creation of the classes themselves, not instances of the classes." I think this is not 100% correct. When you create an instance of a class via "instance = MyClass()", the `__call__` method of the metaclass is invoked, so metaclasses can control both class definition and instance creation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 11:45:56 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 May 2019 15:45:56 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558107956.91.0.0691775236391.issue36945@roundup.psfhosted.org> Steve Dower added the comment: I think this should be opt-in, not opt-out. Imagine you're an existing application and you want to embed Python. Why would you ever want it to suddenly change your global settings like this? As a general rule, an embedded Python runtime should deal with all the settings it's been provided and not forcibly change *any* of them (though maybe the embedding application will discover bugs and have to update their entire application to deal with it - or switch to a language that isn't so demanding!). For this specific case, it seems just as easy to opt-in by calling setlocale(LC_CTYPE, "") before initializing Python. We can recommend this in docs and do it ourselves in Py_Main, but I don't see why we'd add a specific option for configuring the user's C runtime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 12:09:52 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 17 May 2019 16:09:52 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve Message-ID: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : In issue27485 the deprecated functions were replaced with underscore prefixed ones due to which imports where modified. Some of the places where not changed causing NameError in using urllib.request.URLopener.retrieve for local files and non-local files which is deprecated. I found these undefined names while running flake8 on Lib folder. I will raise a PR with tests for the same. Sample Error : ./python.exe Python 3.8.0a4+ (heads/master:870b035bc6, May 17 2019, 16:28:23) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from urllib.request import URLopener >>> URLopener().retrieve('file:///tmp/a.txt') sys:1: DeprecationWarning: URLopener style of invoking requests is deprecated. Use newer urlopen functions/methods Traceback (most recent call last): File "", line 1, in File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/urllib/request.py", line 1786, in retrieve return url2pathname(splithost(url1)[1]), hdrs NameError: name 'splithost' is not defined ---------- components: Library (Lib) messages: 342733 nosy: cheryl.sabella, xtreak priority: normal severity: normal status: open title: NameError in urllib.request.URLopener.retrieve type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 12:15:28 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 17 May 2019 16:15:28 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558109728.23.0.866319409988.issue36948@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13297 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 12:46:26 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 May 2019 16:46:26 +0000 Subject: [issue36949] WeakSet.__repr__ and __str__ do not show contents of the set Message-ID: <1558111586.51.0.375151811101.issue36949@roundup.psfhosted.org> New submission from Steve Dower : This spoils the output of our test suite when there are dangling threads, as the basic "print" doesn't show anything useful. ---------- messages: 342734 nosy: steve.dower priority: normal severity: normal stage: needs patch status: open title: WeakSet.__repr__ and __str__ do not show contents of the set type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 12:48:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 16:48:49 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558111729.57.0.999865803491.issue36945@roundup.psfhosted.org> STINNER Victor added the comment: Steve: > Imagine you're an existing application and you want to embed Python. Why would you ever want it to suddenly change your global settings like this? I have a very good news for you :-) Slowly but steadily, we converge on a agreement ;-) The more time I spend on PEP 587, the more I think that the following use cases are too different and "incompatible": * customized Python interpreter: behaves as the "regular Python" * Embedded Python I drafted "Isolate Python" in my PEP 587. With subtle options like configure_c_stdio, parse_argv and now configure_locale, it seems like we really need two *separated* these two configurations. I implemented exactly that in PR 13388, I added 2 functions: * _PyCoreConfig_InitPythonConfig(): provide a default configuration which parses command line arguments, enable UTF-8 Mode depending on the locale, read global configuration variables, read environment variables, etc. * _PyCoreConfig_InitIsolateConfig(): isolated from the system, ignore command line arguments, ignore global configuration variables, leave the LC_CTYPE locale and C streams unchanged, etc. I'm working on an update of my PEP to better describe that. -- So I understand that this option is needed and you should prefer to turn it off by default in _PyCoreConfig_InitIsolateConfig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 13:00:08 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 May 2019 17:00:08 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558112408.76.0.357848118676.issue36945@roundup.psfhosted.org> Steve Dower added the comment: > I have a very good news for you :-) Slowly but steadily, we converge on a agreement ;-) Yay! :) > I added 2 functions ? Nice, these will be helpful. Probably a good thing to try out with some embedders too, to see whether they're intuitive enough. (I promise I will get time to work on some code here soon, but right now I'm trying to get PEP 578 merged.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 13:01:08 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 May 2019 17:01:08 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558112468.48.0.392159915101.issue36945@roundup.psfhosted.org> Steve Dower added the comment: > * customized Python interpreter: behaves as the "regular Python" For this, why wouldn't we say "start by copying all the code in Programs/python.c"? Is there any reason why that file needs to only be one single call into Py_Main? Maybe there's some reason I'm not aware of... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 13:01:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 17:01:22 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558112482.3.0.0563542485154.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cab5d0741ee6adf2ae9ff5aaafe06b75b4b5bca3 by Victor Stinner in branch 'master': bpo-36763: Add _PyCoreConfig_InitPythonConfig() (GH-13388) https://github.com/python/cpython/commit/cab5d0741ee6adf2ae9ff5aaafe06b75b4b5bca3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 13:06:32 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 17 May 2019 17:06:32 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1558112792.09.0.941974412164.issue21315@roundup.psfhosted.org> Abhilash Raj added the comment: According to RFC 2047 5(1) > However, an 'encoded-word' that appears in a header field defined as '*text' MUST be separated from any adjacent 'encoded-word' or 'text' by 'linear-white-space'. So, it seems like splitting on whitespace is the right thing to do (see MUST). While your solution works for your case where the charset and cte are utf-8 and q respectively (not a general case for random chatsets and cte), it seems like a hack to get around the fact the header is non-conformant to RFC. IMO manipulating the original header (value.replace in your patch) isn't something we should do, but @r.david.murray would be the right person to answer how we handle non-conformant messages. ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 13:07:27 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 May 2019 17:07:27 +0000 Subject: [issue36941] Windows build changes for Windows ARM64 In-Reply-To: <1558042492.97.0.749926608424.issue36941@roundup.psfhosted.org> Message-ID: <1558112847.7.0.218803402423.issue36941@roundup.psfhosted.org> Steve Dower added the comment: New changeset f96e7fd9240c1ce13f52bd3ba81f58b2511d89c3 by Steve Dower (Paul Monson) in branch 'master': bpo-36941: Windows build changes for Windows ARM64 (GH-13365) https://github.com/python/cpython/commit/f96e7fd9240c1ce13f52bd3ba81f58b2511d89c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 13:08:58 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 May 2019 17:08:58 +0000 Subject: [issue36942] Windows code changes for Windows ARM64 In-Reply-To: <1558042626.28.0.817176769827.issue36942@roundup.psfhosted.org> Message-ID: <1558112938.93.0.918205317703.issue36942@roundup.psfhosted.org> Steve Dower added the comment: New changeset 3ea702eca17c4ab5209d823fac2463307dde0633 by Steve Dower (Paul Monson) in branch 'master': bpo-36942 Windows build changes for Windows ARM64 (GH-13366) https://github.com/python/cpython/commit/3ea702eca17c4ab5209d823fac2463307dde0633 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 13:12:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 17:12:09 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558113129.23.0.0644617677728.issue36945@roundup.psfhosted.org> STINNER Victor added the comment: > Nice, these will be helpful. Probably a good thing to try out with some embedders too, to see whether they're intuitive enough. I suggest to move this discussion on the WIP PR of 4th version of my PEP: https://github.com/python/peps/pull/1056 I will reply you there :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 13:27:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 17:27:14 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558114034.33.0.128347578745.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13298 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 13:35:37 2019 From: report at bugs.python.org (Paul Monson) Date: Fri, 17 May 2019 17:35:37 +0000 Subject: [issue35947] Update libffi_msvc to current version of libffi In-Reply-To: <1549665646.45.0.12391127948.issue35947@roundup.psfhosted.org> Message-ID: <1558114537.82.0.835644747957.issue35947@roundup.psfhosted.org> Paul Monson added the comment: Would you like me to submit a PR to the What's New doc? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 13:44:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 17:44:45 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558115085.69.0.234767880277.issue36945@roundup.psfhosted.org> STINNER Victor added the comment: I asked on Twitter: "If you embed Python in your application, would you prefer Python to leave your locale unchanged?" Mai Gim?nez replied: "I would like to." https://twitter.com/maidotgimenez/status/1129357352774393856 Steve Dower wrote: "I think this should be opt-in, not opt-out." I count at least two users who would like to get such option, so my idea wasn't stupid :-) I updated my PR and I plan to merge it soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:06:45 2019 From: report at bugs.python.org (R. David Murray) Date: Fri, 17 May 2019 18:06:45 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1558116405.14.0.285282142592.issue21315@roundup.psfhosted.org> R. David Murray added the comment: A cleaner/safer solution here would be: tok, *remainder = _wsp_splitter(value, 1) if _rfc2047_matcher(tok): tok, *remainder = value.partition('=?') where _rfc2047_matcher would be a regex that matches a correctly formatted encoded word. There a regex for that in the header.py module, though for this application we don't need the groups it has. Abhilash, I'm not sure why you say the proposed solution only works for utf-8 and 'q'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:10:19 2019 From: report at bugs.python.org (Tyler Bell) Date: Fri, 17 May 2019 18:10:19 +0000 Subject: [issue34215] streams.py:IncompleteReadError is message is unclear when expected is None In-Reply-To: <1532465024.45.0.56676864532.issue34215@psf.upfronthosting.co.za> Message-ID: <1558116619.02.0.498574618124.issue34215@roundup.psfhosted.org> Tyler Bell added the comment: I've updated my PR to reflect a better message for the IncompleteReadError exception. When expected is None, the error reads, "IncompleteReadError: 1 bytes read on a total of None expected bytes" which is confusing. My PR changes this to "IncompleteReadError: 1 bytes read on a total of unknown expected bytes". Otherwise, it is required that whoever views the exception text(possibly through layers of abstraction), to know that None(a "low level" programmers decision) is equal to unknown. ---------- nosy: +Tyler Bell title: streams.py:readuntil IncompleteReadError is message is incorrect -> streams.py:IncompleteReadError is message is unclear when expected is None _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:13:40 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 May 2019 18:13:40 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558116820.25.0.507564473491.issue36945@roundup.psfhosted.org> Steve Dower added the comment: > I suggest to move this discussion on the WIP PR of 4th version of my PEP I prefer to keep it on the issue tracker where it doesn't disappear when merged and I get proper notifications. (I want to make the most of getting good notifications of new comments before they get taken away :( ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:20:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 18:20:30 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1558117230.43.0.0425037697032.issue36867@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cbe72d842646ded2454784679231e3d1e6252e72 by Victor Stinner (Pierre Glaser) in branch 'master': bpo-36867: _test_multiprocessing: avoid weak sync primitive (GH-13292) https://github.com/python/cpython/commit/cbe72d842646ded2454784679231e3d1e6252e72 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:21:48 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 17 May 2019 18:21:48 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1558117308.05.0.799884997689.issue21315@roundup.psfhosted.org> Abhilash Raj added the comment: The solution replaces RFC 20147 chrome for utf-8 and q to make sure there is a space before ew, it wouldn't replace in case of any other charset/cte pair. value = value.replace("=?UTF-8?Q?=20", " =?UTF-8?Q?") Isn't that correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:21:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 18:21:48 +0000 Subject: [issue36950] test.support: add an helper to wait for an event with a timeout Message-ID: <1558117308.95.0.715352595892.issue36950@roundup.psfhosted.org> New submission from STINNER Victor : The commit cbe72d842646ded2454784679231e3d1e6252e72 is a good example: deadline = time.monotonic() + 60 t = 0.1 while time.monotonic() < deadline: time.sleep(t) t = min(t*2, 5) try: smm = shared_memory.SharedMemory(name, create=False) except FileNotFoundError: break else: raise AssertionError("A SharedMemory segment was leaked after" " a process was abruptly terminated.") It would be nice to convert this code pattern into an helper function in test.support. It's common to have to wait for something in tests. ---------- components: Tests messages: 342751 nosy: vstinner priority: normal severity: normal status: open title: test.support: add an helper to wait for an event with a timeout versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:22:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 18:22:48 +0000 Subject: [issue36867] Make semaphore_tracker track other system resources In-Reply-To: <1557423361.05.0.0948606859067.issue36867@roundup.psfhosted.org> Message-ID: <1558117368.17.0.104466843027.issue36867@roundup.psfhosted.org> STINNER Victor added the comment: It seems like all known bugs are fixed, I close again the issue. Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:29:41 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 17 May 2019 18:29:41 +0000 Subject: [issue36755] [2.7] test_httplib leaked [8, 8, 8] references with OpenSSL 1.1.1 In-Reply-To: <1556585101.72.0.886455290046.issue36755@roundup.psfhosted.org> Message-ID: <1558117781.33.0.567146491093.issue36755@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 951af2d7f140be7beb9cda2bcdd54f820c905e45 by Benjamin Peterson in branch '2.7': closes bpo-36755: Suppress noisy error output in test HTTPS server by default. (GH-13370) https://github.com/python/cpython/commit/951af2d7f140be7beb9cda2bcdd54f820c905e45 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:35:26 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 17 May 2019 18:35:26 +0000 Subject: [issue34881] unnecessary encoded-words usage breaks DKIM signatures In-Reply-To: <1538550388.79.0.545547206417.issue34881@psf.upfronthosting.co.za> Message-ID: <1558118126.87.0.125546755772.issue34881@roundup.psfhosted.org> Abhilash Raj added the comment: Just for reference DKIM-Signature header is defined in RFC 6376 and the BNF description for the header is mentioned here (https://tools.ietf.org/html/rfc6376#section-3.5). It is a bit long so I am not copy-pasting it here. I might take a stab at writing a value_parser for this, but after I can write some simple ones. This seems to be overly complicated with many (optional/required) fields ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:48:06 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 17 May 2019 18:48:06 +0000 Subject: [issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold In-Reply-To: <1526402130.36.0.682650639539.issue33524@psf.upfronthosting.co.za> Message-ID: <1558118886.97.0.501276386251.issue33524@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +13300 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:53:30 2019 From: report at bugs.python.org (R. David Murray) Date: Fri, 17 May 2019 18:53:30 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1558119210.12.0.676869760774.issue21315@roundup.psfhosted.org> R. David Murray added the comment: I don't see that line of code in unstructured_ew_without_whitespace.diff. Oh, you are referring to his monkey patch. Yes, that is not a suitable solution for anyone but him, and I don't think he meant to imply otherwise :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 14:55:50 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 17 May 2019 18:55:50 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1558119350.08.0.914406178535.issue21315@roundup.psfhosted.org> Abhilash Raj added the comment: Ah, I wrongly assumed the patch had the same thing. Sorry about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 15:00:07 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 17 May 2019 19:00:07 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1558119607.23.0.862246769913.issue32972@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13301 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 15:12:13 2019 From: report at bugs.python.org (Maxwell Bernstein) Date: Fri, 17 May 2019 19:12:13 +0000 Subject: [issue36929] Other Python _io implementations may not expose _io in their type names In-Reply-To: <1557945330.73.0.750176002779.issue36929@roundup.psfhosted.org> Message-ID: <1558120333.58.0.676697714925.issue36929@roundup.psfhosted.org> Change by Maxwell Bernstein : ---------- pull_requests: +13302 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 15:21:24 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 17 May 2019 19:21:24 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1558120884.27.0.414537525075.issue32972@roundup.psfhosted.org> Andrew Svetlov added the comment: https://github.com/python/cpython/pull/13386 is a new attempt to solve the feature request ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 15:28:47 2019 From: report at bugs.python.org (R. David Murray) Date: Fri, 17 May 2019 19:28:47 +0000 Subject: [issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold In-Reply-To: <1526402130.36.0.682650639539.issue33524@psf.upfronthosting.co.za> Message-ID: <1558121327.75.0.0104354160382.issue33524@roundup.psfhosted.org> R. David Murray added the comment: New changeset feac6cd7753425fba006e97e2d9b74a0c0c75894 by R. David Murray (Abhilash Raj) in branch 'master': bpo-33524: Fix the folding of email header when max_line_length is 0 or None (#13391) https://github.com/python/cpython/commit/feac6cd7753425fba006e97e2d9b74a0c0c75894 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 15:29:24 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 19:29:24 +0000 Subject: [issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold In-Reply-To: <1526402130.36.0.682650639539.issue33524@psf.upfronthosting.co.za> Message-ID: <1558121364.87.0.340478505256.issue33524@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 15:50:54 2019 From: report at bugs.python.org (Kevin Shweh) Date: Fri, 17 May 2019 19:50:54 +0000 Subject: [issue36951] Wrong types for PyMemberDefs in Objects/typeobject.c Message-ID: <1558122654.3.0.508768199462.issue36951@roundup.psfhosted.org> New submission from Kevin Shweh : In Objects/typeobject.c, the PyMemberDefs for __flags__, __weakrefoffset__, and __dictoffset__ all use T_LONG: {"__flags__", T_LONG, offsetof(PyTypeObject, tp_flags), READONLY}, {"__weakrefoffset__", T_LONG, offsetof(PyTypeObject, tp_weaklistoffset), READONLY}, ... {"__dictoffset__", T_LONG, offsetof(PyTypeObject, tp_dictoffset), READONLY}, {"__weakrefoffset__", T_LONG, offsetof(PyTypeObject, tp_weaklistoffset), READONLY}, but in Include/object.h or Include/cpython/object.h, the corresponding struct members have types unsigned long, Py_ssize_t, and Py_ssize_t respectively: /* Flags to define presence of optional/expanded features */ unsigned long tp_flags; ... /* weak reference enabler */ Py_ssize_t tp_weaklistoffset; ... Py_ssize_t tp_dictoffset; These uses of T_LONG should be changed to T_ULONG and T_PYSSIZE_T. This was checked on 3.7.3 and master. ---------- components: Interpreter Core messages: 342759 nosy: Kevin Shweh priority: normal severity: normal status: open title: Wrong types for PyMemberDefs in Objects/typeobject.c type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 15:54:47 2019 From: report at bugs.python.org (Kevin Shweh) Date: Fri, 17 May 2019 19:54:47 +0000 Subject: [issue36951] Wrong types for PyMemberDefs in Objects/typeobject.c In-Reply-To: <1558122654.3.0.508768199462.issue36951@roundup.psfhosted.org> Message-ID: <1558122887.47.0.324785938325.issue36951@roundup.psfhosted.org> Kevin Shweh added the comment: Looks like I accidentally doubled the PyMemberDef for __weakrefoffset__ while editing. There's no double definition in the actual file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 16:28:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 20:28:48 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1558124928.8.0.0485197102128.issue36782@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 98ff4d5fb6a9d01b0176b7786db61346952e5295 by Victor Stinner (Edison A) in branch 'master': bpo-36782: Created C API wrappers and added missing tests for functions in the PyDateTimeAPI. (#13088) https://github.com/python/cpython/commit/98ff4d5fb6a9d01b0176b7786db61346952e5295 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 16:44:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 20:44:27 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558125867.28.0.827350715022.issue36945@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bcfbbd704646622e919c1306a91fba61d603483d by Victor Stinner in branch 'master': bpo-36945: Add _PyPreConfig.configure_locale (GH-13368) https://github.com/python/cpython/commit/bcfbbd704646622e919c1306a91fba61d603483d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 16:47:16 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 20:47:16 +0000 Subject: [issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold In-Reply-To: <1526402130.36.0.682650639539.issue33524@psf.upfronthosting.co.za> Message-ID: <1558126036.17.0.590529735123.issue33524@roundup.psfhosted.org> miss-islington added the comment: New changeset 5386aaf07835889e90fb33e95b6d37197f8cfea0 by Miss Islington (bot) in branch '3.7': bpo-33524: Fix the folding of email header when max_line_length is 0 or None (GH-13391) https://github.com/python/cpython/commit/5386aaf07835889e90fb33e95b6d37197f8cfea0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 16:47:58 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 17 May 2019 20:47:58 +0000 Subject: [issue36596] tarfile module considers anything starting with 512 bytes of zero bytes to be a valid tar file In-Reply-To: <1554948440.07.0.28828566641.issue36596@roundup.psfhosted.org> Message-ID: <1558126078.81.0.685827335629.issue36596@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I did some testing with BSD and GNU tar to compare with Python's behavior. jfoo:~ jeff$ tar --version bsdtar 2.8.3 - libarchive 2.8.3 jeff at albarino:~$ tar --version tar (GNU tar) 1.28 Both BSD tar and GNU tar can create an empty tar file that consists of all zero bytes. BSD tar creates a 1 KB file: jfoo:~ jeff$ tar -cf tarfilename.tar -T /dev/null jfoo:~ jeff$ hexdump tarfilename.tar 0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0000400 jfoo:~ jeff$ tar -tf tarfilename.tar jfoo:~ jeff$ echo $? 0 while GNU tar creates a 10 KB file: jeff at albarino:~$ tar -cf tarfilename.tar -T /dev/null jeff at albarino:~$ hexdump tarfilename.tar 0000000 0000 0000 0000 0000 0000 0000 0000 0000 * 0002800 jeff at albarino:~$ tar -tf tarfilename.tar jeff at albarino:~$ echo $? 0 GNU tar will also leave a tar file with 10 KB of zeros when all contents have been deleted (BSD tar doesn't support deletion): jeff at albarino:~$ tar cf empty.tar tarfilename.tar jeff at albarino:~$ hexdump empty.tar 0000000 6174 6672 6c69 6e65 6d61 2e65 6174 0072 0000010 0000 0000 0000 0000 0000 0000 0000 0000 * 0000060 0000 0000 3030 3030 3636 0034 3030 3130 0000070 3537 0031 3030 3130 3537 0031 3030 3030 0000080 3030 3432 3030 0030 3331 3634 3637 3430 0000090 3331 0037 3130 3432 3637 2000 0030 0000 00000a0 0000 0000 0000 0000 0000 0000 0000 0000 * 0000100 7500 7473 7261 2020 6a00 6665 0066 0000 0000110 0000 0000 0000 0000 0000 0000 0000 0000 0000120 0000 0000 0000 0000 6a00 6665 0066 0000 0000130 0000 0000 0000 0000 0000 0000 0000 0000 * 0005000 jeff at albarino:~$ tar --delete -f empty.tar tarfilename.tar jeff at albarino:~$ hexdump empty.tar 0000000 0000 0000 0000 0000 0000 0000 0000 0000 * 0002800 jfoo:~ jeff$ tar -tf empty.tar jfoo:~ jeff$ echo $? 0 According to the POSIX.1 standard, "[t]he last physical block shall always be the full size, so logical records after the two zero logical records may contain undefined data." (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#). It looks like any file starting with 1,024 bytes of zeros is a valid tar archive per BSD tar, GNU tar, and the POSIX.1 standard. However, BSD tar and GNU tar disagree about files starting with 512 bytes of zeros followed by 512 bytes of garbage. First, I constructed such a file for testing (zr.tar): jfoo:~ jeff$ dd if=/dev/zero of=zr.tar bs=512 count=1 1+0 records in 1+0 records out 512 bytes transferred in 0.000060 secs (8521761 bytes/sec) jfoo:~ jeff$ dd if=/dev/random of=zr.tar bs=512 count=1 oseek=1 1+0 records in 1+0 records out 512 bytes transferred in 0.000056 secs (9138228 bytes/sec) jfoo:~ jeff$ ls -l zr.tar -rw-r--r-- 1 jeff staff 1024 May 17 13:14 zr.tar jfoo:~ jeff$ hexdump zr.tar 0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0000200 d7 56 a9 8d 26 11 a4 d8 9a 96 15 04 8d 4b 31 5d 0000210 33 2b 20 ae a2 23 09 8c 60 a1 73 12 a1 ab 73 61 0000220 69 eb 88 bf 8a 7d 6b 9a c5 79 b6 c9 9b a9 5a 6d 0000230 4b 4a 81 a7 71 da 90 24 3f 8f 43 a9 95 a0 20 bb 0000240 93 0f b2 be 7e 4d 80 49 aa 61 19 a2 6b b5 5c f4 0000250 e0 34 7f 99 a0 d3 29 08 9a 25 97 96 d4 d0 07 e4 0000260 90 1c 60 97 9a 23 d3 25 38 54 97 8b 71 a0 83 40 0000270 a6 f9 19 1b 3f 6e bc 5b 06 22 20 fc ff fe 7b eb 0000280 35 9b 52 57 14 83 90 7f d3 e8 f4 72 58 96 16 8c 0000290 09 ad 2a 2f ad fd 43 09 96 eb 7c 8f fc a6 14 d9 00002a0 18 34 38 b6 6a 5a ff 66 6d 46 cb 77 7a 5c 1e 72 00002b0 3e 27 05 3a b0 c4 52 7b c8 cc 26 b9 c3 5f 39 27 00002c0 a3 49 9e f1 3f f8 7e 46 98 df 7c 9d e3 86 c3 72 00002d0 e1 ef 98 7d a1 96 4e 4b 82 bb f4 2b f3 71 6f 16 00002e0 fe 38 2d bc 2b 70 b3 e6 db 1b ad 44 13 06 28 e5 00002f0 3d 05 07 3c 5f 09 5b 90 67 09 0b 5a db 79 b7 27 0000300 8a 4b e5 b3 66 f0 7a 9d a5 c4 e3 a8 b4 b2 d2 c8 0000310 5d d1 27 81 03 25 33 f4 fb 6f 77 b1 df 9d fa cf 0000320 01 a7 70 40 b4 7f 6b ac 04 70 5c 29 06 6a 73 64 0000330 4f 15 92 3b 5e a4 34 95 e0 4b 04 be ca 87 e9 73 0000340 1e 63 98 f3 f1 fd be 7a de fe 84 27 b7 e4 db e0 0000350 fb 04 7f 9d f0 ae af a3 8e 0f c2 a7 80 e0 32 38 0000360 17 1e 47 37 48 9b 99 35 58 9d d5 83 1b 67 d4 e8 0000370 15 0d 00 bb 79 f3 37 59 c3 5e e9 1d 87 79 96 de 0000380 6c 89 35 34 0b b1 12 b2 a8 2d 61 dd f5 9a 19 e7 0000390 c1 c5 24 46 fa 23 f0 db 72 7f a5 18 aa e2 db 04 00003a0 1e cc a6 0f 9e 4e 00 d9 2d eb f9 fc c4 d5 8e 46 00003b0 ab c3 ed 53 98 df a8 81 26 f4 b5 0f b4 7f 12 a4 00003c0 4a aa 14 4c f5 aa dd ba 69 e5 a8 d5 b3 68 0b 9f 00003d0 1a aa 34 a4 60 09 c2 30 22 32 72 dd 2e f9 7a 79 00003e0 88 a3 6a 99 13 4f f4 27 db 02 2e cb a0 ec d8 4d 00003f0 fe 68 44 0c 7b 3a 74 8d 8e cd ba 3e d8 ef cb 97 0000400 GNU tar outputs a warning message, but still returns zero: jeff at albarino:~$ tar -tvf zr.tar tar: A lone zero block at 1 jeff at albarino:~$ echo $? 0 while BSD tar silently accepts the file: jfoo:~ jeff$ tar -tvf zr.tar jfoo:~ jeff$ echo $? 0 Python also accepts the file as valid: >>> tarfile.open("zr.tar", "r") Personally, I think that an error should be returned if the file starts with a zero block followed by a non-zero block. However, changing Python to do that would make its behavior inconsistent with two of the most widely used tar utilities. ---------- nosy: +websurfer5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 16:51:33 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 May 2019 20:51:33 +0000 Subject: [issue35926] Need openssl 1.1.1 support on Windows for ARM and ARM64 In-Reply-To: <1549508003.09.0.398179114845.issue35926@roundup.psfhosted.org> Message-ID: <1558126293.65.0.814158439568.issue35926@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 16:51:33 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 20:51:33 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1558126293.11.0.607121865672.issue36908@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13304 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 16:54:32 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 20:54:32 +0000 Subject: [issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold In-Reply-To: <1526402130.36.0.682650639539.issue33524@psf.upfronthosting.co.za> Message-ID: <1558126472.48.0.604461313698.issue33524@roundup.psfhosted.org> Cheryl Sabella added the comment: Thank you, @licht-t for the original patch and @maxking for the rebase. Also, thank you, @r.david.murray for the review and merge. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 16:54:43 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 20:54:43 +0000 Subject: [issue33524] non-ascii characters in headers causes TypeError on email.policy.Policy.fold In-Reply-To: <1526402130.36.0.682650639539.issue33524@psf.upfronthosting.co.za> Message-ID: <1558126483.66.0.0642902919969.issue33524@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 16:56:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 20:56:00 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558126560.23.0.580986892922.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13305 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 17:05:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 21:05:35 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558127135.69.0.777017086351.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 12083284c54be25abadd85781d36b63731dc1f0c by Victor Stinner in branch 'master': bpo-36763: _Py_RunMain() doesn't call Py_Exit() anymore (GH-13390) https://github.com/python/cpython/commit/12083284c54be25abadd85781d36b63731dc1f0c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 17:08:24 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 17 May 2019 21:08:24 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1558127304.65.0.934733723823.issue36908@roundup.psfhosted.org> miss-islington added the comment: New changeset 740a7cde9c0af5a237a7f6525b38d65a83f4fbf1 by Miss Islington (bot) in branch '3.7': bpo-36908: 'This module is always available' isn't helpful. (GH-13297) https://github.com/python/cpython/commit/740a7cde9c0af5a237a7f6525b38d65a83f4fbf1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 17:10:25 2019 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 17 May 2019 21:10:25 +0000 Subject: [issue36908] "This module is always available" is confusing In-Reply-To: <1557782122.73.0.455327263081.issue36908@roundup.psfhosted.org> Message-ID: <1558127425.42.0.384644834739.issue36908@roundup.psfhosted.org> Mariatta Wijaya added the comment: Thanks all. I've backported the change to 3.7. I think this is good to be closed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 17:14:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 21:14:26 +0000 Subject: [issue36945] Add _PyPreConfig.configure_locale: allow to leave LC_CTYPE unchanged when embedding Python In-Reply-To: <1558048606.99.0.609922696574.issue36945@roundup.psfhosted.org> Message-ID: <1558127666.85.0.942858749214.issue36945@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 17:25:16 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 17 May 2019 21:25:16 +0000 Subject: [issue36952] fileinput input's and Fileinput's bufsize=0 marked for removal in 3.8 Message-ID: <1558128316.3.0.00753032861072.issue36952@roundup.psfhosted.org> New submission from Matthias Bussonnier : Can likely thus be removed now. See also https://bugs.python.org/issue33563 that was tracking better deprecation warnings. If not removed documentation should bump removal to 3.9 ---------- components: Library (Lib) messages: 342769 nosy: mbussonn priority: normal severity: normal status: open title: fileinput input's and Fileinput's bufsize=0 marked for removal in 3.8 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 17:54:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 21:54:06 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558130046.1.0.09643806768.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 871ff77c1cd334a141d52b0d003c080a1928731e by Victor Stinner in branch 'master': bpo-36763: Add _PyInitError functions (GH-13395) https://github.com/python/cpython/commit/871ff77c1cd334a141d52b0d003c080a1928731e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:00:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 22:00:35 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558130435.91.0.685037856673.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13306 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:15:17 2019 From: report at bugs.python.org (Jakub Stasiak) Date: Fri, 17 May 2019 22:15:17 +0000 Subject: [issue34700] typing.get_type_hints doesn't know about typeshed In-Reply-To: <1537042200.54.0.956365154283.issue34700@psf.upfronthosting.co.za> Message-ID: <1558131317.47.0.966337649551.issue34700@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:19:41 2019 From: report at bugs.python.org (Jakub Stasiak) Date: Fri, 17 May 2019 22:19:41 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1558131581.67.0.546343335818.issue29847@roundup.psfhosted.org> Change by Jakub Stasiak : ---------- nosy: +jstasiak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:24:57 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 22:24:57 +0000 Subject: [issue30509] Optimize calling type slots In-Reply-To: <1496123800.73.0.877253409287.issue30509@psf.upfronthosting.co.za> Message-ID: <1558131897.95.0.398954646502.issue30509@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:31:45 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 17 May 2019 22:31:45 +0000 Subject: [issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not In-Reply-To: <1548161762.46.0.975813554813.issue35805@roundup.psfhosted.org> Message-ID: <1558132305.48.0.801951465244.issue35805@roundup.psfhosted.org> Change by Abhilash Raj : ---------- keywords: +patch pull_requests: +13307 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:32:50 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 22:32:50 +0000 Subject: [issue27268] Incorrect error message on float('') In-Reply-To: <1465396464.66.0.148764915141.issue27268@psf.upfronthosting.co.za> Message-ID: <1558132370.51.0.613117349695.issue27268@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 4fa7504ee3184cff064e23fe6799e717ed0f9357 by Cheryl Sabella (Pedro Lacerda) in branch 'master': bpo-27268: Fix incorrect error message on float('') (GH-2745) https://github.com/python/cpython/commit/4fa7504ee3184cff064e23fe6799e717ed0f9357 ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:35:40 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 22:35:40 +0000 Subject: [issue27268] Incorrect error message on float('') In-Reply-To: <1465396464.66.0.148764915141.issue27268@psf.upfronthosting.co.za> Message-ID: <1558132540.37.0.627392437847.issue27268@roundup.psfhosted.org> Cheryl Sabella added the comment: @Drekin, thank you for the report, @Pedro Lacerda, thank you for the pull request, and @Nofar Schnider, thank you for the review. ---------- resolution: works for me -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:38:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 22:38:19 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558132699.15.0.740370231737.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b594784272d4907b1c40d3c40d17cb081aa9cf9b by Victor Stinner in branch 'master': bpo-36763: _Py_InitializeFromArgs() argc becomes Py_ssize_t (GH-13396) https://github.com/python/cpython/commit/b594784272d4907b1c40d3c40d17cb081aa9cf9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:38:34 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 17 May 2019 22:38:34 +0000 Subject: [issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not In-Reply-To: <1548161762.46.0.975813554813.issue35805@roundup.psfhosted.org> Message-ID: <1558132714.56.0.281295656486.issue35805@roundup.psfhosted.org> Abhilash Raj added the comment: I have created https://github.com/python/cpython/pull/13397 for this. For now, it only parses Message-ID header. I do plan to add support for other Identification headers soon, perhaps in a 2nd PR. ---------- nosy: +maxking stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:48:26 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 22:48:26 +0000 Subject: [issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile In-Reply-To: <1411623045.52.0.589017779939.issue22490@psf.upfronthosting.co.za> Message-ID: <1558133306.99.0.173129706823.issue22490@roundup.psfhosted.org> Cheryl Sabella added the comment: It looks like @ronaldoussoren's pull request was ready to go pending a test with Brew. The PR itself needs a rebase, but is anyone able to finish the testing on this for it to be merged? Thanks! ---------- nosy: +cheryl.sabella versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 18:54:43 2019 From: report at bugs.python.org (Lisa Roach) Date: Fri, 17 May 2019 22:54:43 +0000 Subject: [issue35924] curses segfault resizing window In-Reply-To: <1549497741.38.0.310308715457.issue35924@roundup.psfhosted.org> Message-ID: <1558133683.24.0.965036526827.issue35924@roundup.psfhosted.org> Lisa Roach added the comment: Thank you for all the work you did on this Toshio! I think we are good to close this issue. ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 19:25:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 May 2019 23:25:46 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558135546.87.0.599987853706.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13308 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 19:54:42 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 17 May 2019 23:54:42 +0000 Subject: [issue33829] C API: provide new object protocol helper In-Reply-To: <1528710870.35.0.592728768989.issue33829@psf.upfronthosting.co.za> Message-ID: <1558137282.87.0.165659740668.issue33829@roundup.psfhosted.org> Cheryl Sabella added the comment: It seems that this issue is languishing without any additional comments from the OP. Should it be closed as rejected? Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 20:11:38 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 18 May 2019 00:11:38 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1558138298.08.0.190521832192.issue31961@roundup.psfhosted.org> Cheryl Sabella added the comment: gregory.p.smith, I believe Serhiy was looking for a review on PR5914. Maybe it's not too late for this to get into 3.8? Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 20:26:03 2019 From: report at bugs.python.org (Jason Saporta) Date: Sat, 18 May 2019 00:26:03 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1558139163.88.0.562215046003.issue29847@roundup.psfhosted.org> Change by Jason Saporta : ---------- keywords: +patch pull_requests: +13309 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 20:46:13 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 18 May 2019 00:46:13 +0000 Subject: [issue36952] fileinput input's and Fileinput's bufsize=0 marked for removal in 3.8 In-Reply-To: <1558128316.3.0.00753032861072.issue36952@roundup.psfhosted.org> Message-ID: <1558140373.41.0.000360876237809.issue36952@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +13310 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 20:52:44 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 18 May 2019 00:52:44 +0000 Subject: [issue36953] Remove collections ABCs? Message-ID: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> New submission from Paul Ganssle : In PR 5640 (https://github.com/python/cpython/pull/5460), a warning was added that importing ABCs from collections directly is deprecated and will be removed in Python 3.8, but they have not yet been removed and the warning is still active. If they are going to be removed, presumably it needs to be done before the feature freeze at the end of May, otherwise, in the meantime, I think the warning needs to be updated to say that it will be removed in Python 3.9. ---------- components: Library (Lib) messages: 342779 nosy: p-ganssle, rhettinger, serhiy.storchaka, stutzbach priority: normal severity: normal status: open title: Remove collections ABCs? versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 20:56:43 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 18 May 2019 00:56:43 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1558141003.08.0.907228394507.issue36947@roundup.psfhosted.org> Josh Rosenberg added the comment: Ah, you're right on __call__; I've never bothered to override it on a metaclass, but yes, since a class using a metaclass is an instance of the metaclass, like all instances, calling it invokes the __call__ of its type (it's just that the default metaclass, type, has a __call__ that turns around and calls the __new__ and __init__ of the "instance", which is a class). The nomenclature is hard here. In any event, yes, overriding __call__ will let you hook into the construction of each individual instance of the classes using the metaclass. That's not generally true of all uses of metaclasses (if __call__ is inherited from type, then while new instances are technically created using the metaclass, the metaclass is just letting the normal __new__/__init__ calls take place without interference). There is very little in the way of Python official documentation on metaclasses; the line you proposed to change is one of the few places it's mentioned (most references to metaclasses are on that Data Model page). There are a couple of mentions in the PEPs, and a lot of off-site tutorials, but it's a poorly documented feature in general. It's pretty easy to demonstrate the current wording is correct though: >>> class Meta(type): ... pass ... >>> class MyMeta(metaclass=Meta): ... pass ... >>> isinstance(MyMeta, Meta) True Note that we're using isinstance, not issubclass, and we're not constructing a MyMeta instance. MyMeta itself is an instance of Meta. I really think the problem here is that the documentation is correct, but so bare it's easy to miss the implications of "MyClass and MySubclass are instances of Meta"; since the classes are instances of another class, the metaclass has the same power over them that normal classes have over their instances. That's why __call__ can hook the creation of instances, __new__ can hook the creation of the class itself, __getitem__ can be used to perform lookups on the child class (in at least of the few iterations of the typing framework, that's how List[int] and the like worked; not sure if it's still that way), and properties defined on the metaclass can be accessed on classes that use it, but not their instances. It's enormously powerful, but so complex that the Python docs tend to encourage simpler, more targeted ways of tweaking classes (e.g. decorators). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 20:58:40 2019 From: report at bugs.python.org (Scott Talbert) Date: Sat, 18 May 2019 00:58:40 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558141120.74.0.0809723702223.issue36721@roundup.psfhosted.org> Change by Scott Talbert : ---------- nosy: +swt2c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 21:19:59 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 18 May 2019 01:19:59 +0000 Subject: [issue17774] unable to disable -r in run_tests.py In-Reply-To: <1366203781.64.0.116345501767.issue17774@psf.upfronthosting.co.za> Message-ID: <1558142399.95.0.688737839632.issue17774@roundup.psfhosted.org> Cheryl Sabella added the comment: Since -r doesn't usually take a value, what would be the best way to implement this? The current implementation always adds -r, so not including '-r' would need to retain the current behavior of randomization. Would something like '--no-random' be a good way to implement this? That would be different than how the program handles the -u or -j because the '--no-random' would have to be removed from regrtest_args. ---------- nosy: +cheryl.sabella versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 21:21:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 18 May 2019 01:21:31 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558142491.47.0.449937120725.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bab0db6076900cd828588be8595b3cdfade7e7e9 by Victor Stinner in branch 'master': bpo-36763: Use _PyCoreConfig_InitPythonConfig() (GH-13398) https://github.com/python/cpython/commit/bab0db6076900cd828588be8595b3cdfade7e7e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 21:23:46 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sat, 18 May 2019 01:23:46 +0000 Subject: [issue36954] test_recursive_repr breaks tracing in test_xml_etree Message-ID: <1558142626.27.0.825093654504.issue36954@roundup.psfhosted.org> New submission from Gordon P. Hemsley : When running test_xml_etree with tracing, e.g. when running test coverage, tracing breaks after the execution of test_recursive_repr. ---------- components: Tests messages: 342783 nosy: blueyed, gphemsley, serhiy.storchaka priority: normal pull_requests: 13311 severity: normal status: open title: test_recursive_repr breaks tracing in test_xml_etree versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 21:23:49 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 18 May 2019 01:23:49 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1558142629.76.0.90954681984.issue36953@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 21:26:48 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sat, 18 May 2019 01:26:48 +0000 Subject: [issue10933] Tracing disabled when a recursion error is triggered (even if properly handled) In-Reply-To: <1295353872.95.0.129870258846.issue10933@psf.upfronthosting.co.za> Message-ID: <1558142808.92.0.275254858251.issue10933@roundup.psfhosted.org> Change by Gordon P. Hemsley : ---------- nosy: +gphemsley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 21:26:54 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sat, 18 May 2019 01:26:54 +0000 Subject: [issue23012] RuntimeError: settrace/setprofile function gets lost In-Reply-To: <1418048778.92.0.0497543506697.issue23012@psf.upfronthosting.co.za> Message-ID: <1558142814.68.0.871425054121.issue23012@roundup.psfhosted.org> Change by Gordon P. Hemsley : ---------- nosy: +gphemsley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 21:27:13 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sat, 18 May 2019 01:27:13 +0000 Subject: [issue36474] RecursionError resets trace function set via sys.settrace In-Reply-To: <1553886678.98.0.673623780459.issue36474@roundup.psfhosted.org> Message-ID: <1558142833.61.0.156352261517.issue36474@roundup.psfhosted.org> Change by Gordon P. Hemsley : ---------- nosy: +gphemsley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 21:39:12 2019 From: report at bugs.python.org (Anthony Sottile) Date: Sat, 18 May 2019 01:39:12 +0000 Subject: [issue2180] tokenize: mishandles line joining In-Reply-To: <1203904758.19.0.84784431119.issue2180@psf.upfronthosting.co.za> Message-ID: <1558143552.76.0.818816011308.issue2180@roundup.psfhosted.org> Change by Anthony Sottile : ---------- keywords: +patch pull_requests: +13312 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 21:45:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 18 May 2019 01:45:54 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558143954.43.0.0189712125088.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13313 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 21:52:04 2019 From: report at bugs.python.org (Haw Loeung) Date: Sat, 18 May 2019 01:52:04 +0000 Subject: [issue31677] email.header uses re.IGNORECASE without re.ASCII In-Reply-To: <1507035482.04.0.213398074469.issue31677@psf.upfronthosting.co.za> Message-ID: <1558144324.01.0.35311771825.issue31677@roundup.psfhosted.org> Change by Haw Loeung : ---------- pull_requests: +13314 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 22:11:57 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 18 May 2019 02:11:57 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1558145517.66.0.135814329008.issue36953@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 22:17:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 18 May 2019 02:17:05 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558145825.66.0.536350618862.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 410759fba80aded5247b693c60745aa16906f3bb by Victor Stinner in branch 'master': bpo-36763: Remove _PyCoreConfig.dll_path (GH-13402) https://github.com/python/cpython/commit/410759fba80aded5247b693c60745aa16906f3bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 22:17:48 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 18 May 2019 02:17:48 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1558145868.36.0.688953391961.issue36953@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Relevant PR and discussion : https://github.com/python/cpython/pull/10596 . pip is incompatible due to the vendored copy of html5lib that needs a new release . ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 22:19:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 18 May 2019 02:19:13 +0000 Subject: [issue36954] test_recursive_repr breaks tracing in test_xml_etree In-Reply-To: <1558142626.27.0.825093654504.issue36954@roundup.psfhosted.org> Message-ID: <1558145953.0.0.725684181708.issue36954@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 17 22:38:00 2019 From: report at bugs.python.org (Josiah Ulfers) Date: Sat, 18 May 2019 02:38:00 +0000 Subject: [issue35924] curses segfault resizing window In-Reply-To: <1549497741.38.0.310308715457.issue35924@roundup.psfhosted.org> Message-ID: <1558147080.34.0.819789870581.issue35924@roundup.psfhosted.org> Josiah Ulfers added the comment: Yes, thanks Toshio and Lisa and sorry for the slow response. I just now built a Python 3.7.3 against ncurses-6.1-20190511 and can confirm it resolved the issue. ---------- status: -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 02:57:37 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 18 May 2019 06:57:37 +0000 Subject: [issue36951] Wrong types for PyMemberDefs in Objects/typeobject.c In-Reply-To: <1558122654.3.0.508768199462.issue36951@roundup.psfhosted.org> Message-ID: <1558162657.66.0.595341299828.issue36951@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13315 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 03:02:01 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 18 May 2019 07:02:01 +0000 Subject: [issue36951] Wrong types for PyMemberDefs in Objects/typeobject.c In-Reply-To: <1558122654.3.0.508768199462.issue36951@roundup.psfhosted.org> Message-ID: <1558162921.81.0.286640889451.issue36951@roundup.psfhosted.org> Zackery Spytz added the comment: I agree that this should be fixed. ---------- nosy: +ZackerySpytz versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 03:16:47 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 18 May 2019 07:16:47 +0000 Subject: [issue2180] tokenize: mishandles line joining In-Reply-To: <1203904758.19.0.84784431119.issue2180@psf.upfronthosting.co.za> Message-ID: <1558163807.51.0.535017361343.issue2180@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 05:53:58 2019 From: report at bugs.python.org (Frode Byrkjeland) Date: Sat, 18 May 2019 09:53:58 +0000 Subject: [issue36955] Python3 - mulltiprocessing Message-ID: <1558173238.6.0.665065022806.issue36955@roundup.psfhosted.org> New submission from Frode Byrkjeland : multiprocessing-2.6.2.1.tar.gz contains setup.py with python2 print statement in stead of python3 print( ). This results in an error when trying to install. Found on Ubuntu 18.04 x86_64 running python3.6.7 error seems to be ok after doing changes on the print statements in that file. install cmd: "python3 -m pip install multiprocessing" ---------- messages: 342789 nosy: fbyrkjeland priority: normal severity: normal status: open title: Python3 - mulltiprocessing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 06:07:34 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 18 May 2019 10:07:34 +0000 Subject: [issue36955] Python3 - mulltiprocessing In-Reply-To: <1558173238.6.0.665065022806.issue36955@roundup.psfhosted.org> Message-ID: <1558174054.85.0.324978389214.issue36955@roundup.psfhosted.org> SilentGhost added the comment: multiprocessing module that is available on PyPi is a backport of stdlib module to python 2.4 and 2.5. multiprocessing module is available in stdlib for all version after that, so you don't need to install it with pip. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 06:19:49 2019 From: report at bugs.python.org (Pavel Kostyuchenko) Date: Sat, 18 May 2019 10:19:49 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1558174789.82.0.425192454364.issue33608@roundup.psfhosted.org> Pavel Kostyuchenko added the comment: I was able to reproduce the error with version f13c5c8b9401a9dc19e95d8b420ee100ac022208 on FreeBSD 12.0 VM. The error seems to be caused not by those changes, but by lack of synchronization in the multiprocessing.managers.Server. The failure happens when running the "test_shared_memory_SharedMemoryManager_basics" with high CPU load and frequent interrupts e.g. moving some window during test. Mostly I used the "python -m test --fail-env-changed test_multiprocessing_spawn -m 'WithProcessesTestS[hu]*' -F" command to reproduce the crash. By analyzing core dumps I deduced that the crash happens during this call from the parent test process: class BaseManager(object): def _finalize_manager(process, address, authkey, state, _Client): ... try: conn = _Client(address, authkey=authkey) try: dispatch(conn, None, 'shutdown') finally: conn.close() except Exception: pass Main thread in the multiprocessing child: class Server(object): def serve_forever(self): ... try: accepter = threading.Thread(target=self.accepter) accepter.daemon = True accepter.start() try: while not self.stop_event.is_set(): self.stop_event.wait(1) except (KeyboardInterrupt, SystemExit): pass finally: ... sys.exit(0) << main thread have finished and destroyed the interpreter Worker thread in the multiprocessing child. Locals: File "/usr/home/user/cpython/Lib/multiprocessing/managers.py", line 214, in handle_request c.send(msg) self = funcname = 'shutdown' result = None request = (None, 'shutdown', (), {}) ignore = None args = () kwds = {} msg = ('#RETURN', None) Listing: class Server(object): def handle_request(self, c): ... try: result = func(c, *args, **kwds) << calls Server.shutdown method except Exception: msg = ('#TRACEBACK', format_exc()) else: msg = ('#RETURN', result) try: c.send(msg) << crashes with SIGBUS in _send_bytes -> write -> take_gil -> SET_GIL_DROP_REQUEST(tstate->interp) except Exception as e: try: c.send(('#TRACEBACK', format_exc())) except Exception: pass ... def shutdown(self, c): ... try: util.debug('manager received shutdown message') c.send(('#RETURN', None)) except: import traceback traceback.print_exc() finally: self.stop_event.set() Worker thread is daemonic and is not terminated during the interpreter finalization, thus it might still be running and is terminated silently when the process exits. The connection (c) has different implementations on several platforms, so we cannot be sure whether the connection is closed during shutdown or not, whether the last "c.send(msg)" blocks until the end of the process, returns instantly, or fails inconsistently. The error was there for a long time, but for two reasons it didn't cause much trouble: - the race condition is hard to trigger; - SET_GIL_DROP_REQUEST used to ignore the errorneous state of interpreter, but introduction of tstate->interp argument by Eric manifested SIGBUS on FreeBSD. I haven't managed to find a nice clean test to reproduce the bug automatically. I suggest the changes for the multiprocessing/managers.py in the attachment. ---------- nosy: +shprotx Added file: https://bugs.python.org/file48333/managers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 06:48:34 2019 From: report at bugs.python.org (Pavel Kostyuchenko) Date: Sat, 18 May 2019 10:48:34 +0000 Subject: [issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed. In-Reply-To: <1527017681.69.0.682650639539.issue33608@psf.upfronthosting.co.za> Message-ID: <1558176514.81.0.0503982949401.issue33608@roundup.psfhosted.org> Pavel Kostyuchenko added the comment: Also it might be viable to add some assertion to verify the take_gil is not called with uninitialized interpreter. I used the changes in the attachment (take_gil.assert.patch), but it produced errors during test_tracemalloc with f13c5c8b9401a9dc19e95d8b420ee100ac022208 . It happens because, during startup with invalid arguments, the interpreter is finalized with pymain_main->pymain_free->_PyRuntime_Finalize before the error is printed. However, the problem seems to be fixed for me in the last revisions of master branch, so I upload the diff against it. ---------- Added file: https://bugs.python.org/file48334/take_gil.assert.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 07:29:55 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 May 2019 11:29:55 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1558178995.0.0.907040410872.issue36887@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset 73934b9da07daefb203e7d26089e7486a1ce4fdf by Mark Dickinson in branch 'master': bpo-36887: add math.isqrt (GH-13244) https://github.com/python/cpython/commit/73934b9da07daefb203e7d26089e7486a1ce4fdf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 07:51:32 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 18 May 2019 11:51:32 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1558180292.82.0.394898650357.issue24564@roundup.psfhosted.org> Cheryl Sabella added the comment: Nosying Hynek and Larry, as they had done the original code. ---------- nosy: +cheryl.sabella, hynek, larry versions: -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 08:19:37 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 18 May 2019 12:19:37 +0000 Subject: [issue35989] ipaddress.IPv4Network allows prefix > 32 In-Reply-To: <1550074435.28.0.00523777369606.issue35989@roundup.psfhosted.org> Message-ID: <1558181977.04.0.784591306956.issue35989@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also issue36845 that seems to have fixed this. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 08:38:22 2019 From: report at bugs.python.org (Pierre Glaser) Date: Sat, 18 May 2019 12:38:22 +0000 Subject: [issue36368] server process of shared_memory shuts down if KeyboardInterrupt In-Reply-To: <1553013481.49.0.145631506322.issue36368@roundup.psfhosted.org> Message-ID: <1558183102.89.0.89991347044.issue36368@roundup.psfhosted.org> Change by Pierre Glaser : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 08:39:24 2019 From: report at bugs.python.org (Pierre Glaser) Date: Sat, 18 May 2019 12:39:24 +0000 Subject: [issue35933] python doc does not say that the state kwarg in Pickler.save_reduce can be a tuple (and not only a dict) In-Reply-To: <1549562122.06.0.315178283617.issue35933@roundup.psfhosted.org> Message-ID: <1558183164.82.0.506377690523.issue35933@roundup.psfhosted.org> Change by Pierre Glaser : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 08:50:35 2019 From: report at bugs.python.org (Thomas) Date: Sat, 18 May 2019 12:50:35 +0000 Subject: [issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers In-Reply-To: <1439823540.4.0.657998470812.issue24882@psf.upfronthosting.co.za> Message-ID: <1558183835.48.0.801212148637.issue24882@roundup.psfhosted.org> Thomas added the comment: We ran into this issue in the context of asyncio which uses an internal ThreadPoolExecutor to provide an asynchronous getaddrinfo / getnameinfo. We observed an async application spawned more and more threads through several reconnects. With a maximum of 5 x CPUs these were dozens of threads which easily looked like a resource leak. At least in this scenario I would strongly prefer to correctly reuse idle threads. Spawning all possible threads on initialization in such a transparent case would be quite bad. Imagine having a process-parallel daemon that running a apparently single-threaded asyncio loop but then getting these executors for doing a single asyncio.getaddrinfo. Now you run 80 instances on an 80 core machine you get 32.000 extra implicit threads. Now you can argue whether the default executor in asyncio is good as is, but if the executors properly reuse threads, it would be quite unlikely to be a practical problem. ---------- nosy: +tilsche _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 09:07:31 2019 From: report at bugs.python.org (Pierre Glaser) Date: Sat, 18 May 2019 13:07:31 +0000 Subject: [issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers In-Reply-To: <1439823540.4.0.657998470812.issue24882@psf.upfronthosting.co.za> Message-ID: <1558184851.99.0.983356572674.issue24882@roundup.psfhosted.org> Change by Pierre Glaser : ---------- nosy: +pierreglaser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 09:08:52 2019 From: report at bugs.python.org (Pierre Glaser) Date: Sat, 18 May 2019 13:08:52 +0000 Subject: [issue36950] test.support: add an helper to wait for an event with a timeout In-Reply-To: <1558117308.95.0.715352595892.issue36950@roundup.psfhosted.org> Message-ID: <1558184932.89.0.00549153213317.issue36950@roundup.psfhosted.org> Change by Pierre Glaser : ---------- nosy: +pierreglaser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 09:23:17 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 May 2019 13:23:17 +0000 Subject: [issue36887] Add integer square root, math.isqrt In-Reply-To: <1557582416.09.0.555439074551.issue36887@roundup.psfhosted.org> Message-ID: <1558185797.55.0.161711750722.issue36887@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 09:53:21 2019 From: report at bugs.python.org (Dan Snider) Date: Sat, 18 May 2019 13:53:21 +0000 Subject: [issue36956] Calling "functions" used to implement generators/comps easily cause crash Message-ID: <1558187601.17.0.878025070628.issue36956@roundup.psfhosted.org> New submission from Dan Snider : As far as I know, generators, set comprehensions, list comprehensions, and dict comprehensions, (along with their asynchronous variants) are implemented by first calling the GET_(A)ITER opcode and then building and calling a function that acepts the resulting iterator as its sole argument. Assigning the code object used to make that function (or using it in the types.FunctionType constructor) and then calling it with a non-iterator argument will obviously cause a crash since the FOR_ITER opcode rightly expects that it will never have to deal with non-iterators and calls tp_iternext without checking if it exists. The 4-liner demonstrates the crash: if 1: fn = lambda: None gi = (i for i in ()) fn.__code__ = gi.gi_code [*fn("abc")] ---------- messages: 342797 nosy: bup priority: normal severity: normal status: open title: Calling "functions" used to implement generators/comps easily cause crash type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 10:36:41 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 18 May 2019 14:36:41 +0000 Subject: [issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers In-Reply-To: <1439823540.4.0.657998470812.issue24882@psf.upfronthosting.co.za> Message-ID: <1558190201.24.0.383342576853.issue24882@roundup.psfhosted.org> Antoine Pitrou added the comment: Thomas, I think that's a good argument, so perhaps we should do this (strive to reuse threads) after all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 11:43:46 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 May 2019 15:43:46 +0000 Subject: [issue36957] Speed up math.isqrt Message-ID: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> New submission from Mark Dickinson : The `math.isqrt` algorithm introduce in GH-36887 currently works entirely with Python long integers. That's unnecessarily inefficient for small inputs. For n < 2**64, `math.isqrt(n)` can be computed, via exactly the same algorithm, using entirely C integer arithmetic. For larger n, the first 5 iterations of the algorithm can similarly be performed entirely in C integer arithmetic, and we can then switch to long integer arithmetic for subsequent iterations. On my machine, these simple changes make a substantial difference (4x faster) for small inputs, and a significant but less substantial difference (70% speedup) for inputs not much larger than 2**64. The speedup for huge integers is likely to be much smaller, percentage-wise. Some timings: Unpatched --------- lovelace:cpython mdickinson$ ./python.exe -m timeit -s "from math import isqrt" "[isqrt(n) for n in range(2, 1000)]" 1000 loops, best of 5: 327 usec per loop lovelace:cpython mdickinson$ ./python.exe -m timeit -s "from math import isqrt; x = range(2**63-1000, 2**63+1000)" "[isqrt(n) for n in x]" 200 loops, best of 5: 1.44 msec per loop lovelace:cpython mdickinson$ ./python.exe -m timeit -s "from math import isqrt; x = range(2**95-1000, 2**95+1000)" "[isqrt(n) for n in x]" 200 loops, best of 5: 1.64 msec per loop Patched (PR imminent) ------- lovelace:cpython mdickinson$ ./python.exe -m timeit -s "from math import isqrt" "[isqrt(n) for n in range(2, 1000)]" 5000 loops, best of 5: 78.1 usec per loop lovelace:cpython mdickinson$ ./python.exe -m timeit -s "from math import isqrt; x = range(2**63-1000, 2**63+1000)" "[isqrt(n) for n in x]" 1000 loops, best of 5: 355 usec per loop lovelace:cpython mdickinson$ ./python.exe -m timeit -s "from math import isqrt; x = range(2**95-1000, 2**95+1000)" "[isqrt(n) for n in x]" 500 loops, best of 5: 954 usec per loop ---------- assignee: mark.dickinson components: Extension Modules messages: 342799 nosy: mark.dickinson priority: normal severity: normal stage: needs patch status: open title: Speed up math.isqrt type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 11:46:48 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 May 2019 15:46:48 +0000 Subject: [issue36957] Speed up math.isqrt In-Reply-To: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> Message-ID: <1558194408.87.0.00224610703577.issue36957@roundup.psfhosted.org> Change by Mark Dickinson : ---------- keywords: +patch pull_requests: +13316 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 11:47:56 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 May 2019 15:47:56 +0000 Subject: [issue36957] Speed up math.isqrt In-Reply-To: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> Message-ID: <1558194476.73.0.980916164869.issue36957@roundup.psfhosted.org> Mark Dickinson added the comment: > introduce in GH-36887 Sorry, that should have been: introduced in GH-13244. #36887 was the corresponding b.p.o. issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 12:06:24 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 May 2019 16:06:24 +0000 Subject: [issue36957] Speed up math.isqrt In-Reply-To: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> Message-ID: <1558195584.24.0.722285213579.issue36957@roundup.psfhosted.org> Serhiy Storchaka added the comment: Did you try the floating point implementation? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 12:55:26 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 May 2019 16:55:26 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1558198526.46.0.73375758101.issue36546@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +13317 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 13:07:57 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 May 2019 17:07:57 +0000 Subject: [issue36957] Speed up math.isqrt In-Reply-To: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> Message-ID: <1558199277.63.0.216554094257.issue36957@roundup.psfhosted.org> Mark Dickinson added the comment: > Did you try the floating point implementation? The aim here was to use exactly the same algorithm, but speed it up by working with C integers where possible; that's a fairly simple change. Using floating-point would require more complex changes. Again, the biggest issue with using a floating-point sqrt as an initial value is that we can't assume either IEEE 754 floating-point format, *or* a correctly rounded libm sqrt, even though both those things are highly likely on a typical modern machine. So any use of floating-point would also have to have an accuracy check and a fallback integer-only implementation for the case where the floating-point fails. It's possible to make those changes, but I think we'd end up crossing the threshold to "too complicated" for the implementation of a simple function. It's a bit of a shame, because if we _are_ allowed to assume IEEE 754, and a correctly-rounded sqrt implementation (using round-ties-to-even), then it turns out that one can prove that for any value `n` smaller than 2**106 and `a := int(math.sqrt(float(n)))` (assuming that the `int` and `float` conversions are *also* correctly rounded), we have (a - 1)**2 < n < (a + 1)**2, which is exactly the loop invariant that the current algorithm needs to maintain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 13:11:30 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 18 May 2019 17:11:30 +0000 Subject: [issue24932] Use proper command line parsing in _testembed In-Reply-To: <1440481888.38.0.825081560944.issue24932@psf.upfronthosting.co.za> Message-ID: <1558199490.02.0.449102275388.issue24932@roundup.psfhosted.org> Change by Eric Snow : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 13:18:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 May 2019 17:18:32 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1558199912.46.0.54376440111.issue36546@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset e917f2ed9af044fe808fc9b4ddc6c5eb99003500 by Raymond Hettinger in branch 'master': bpo-36546: Add more tests and expand docs (#13406) https://github.com/python/cpython/commit/e917f2ed9af044fe808fc9b4ddc6c5eb99003500 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 13:31:52 2019 From: report at bugs.python.org (Pierre Glaser) Date: Sat, 18 May 2019 17:31:52 +0000 Subject: [issue36950] test.support: add an helper to wait for an event with a timeout In-Reply-To: <1558117308.95.0.715352595892.issue36950@roundup.psfhosted.org> Message-ID: <1558200712.2.0.569454302704.issue36950@roundup.psfhosted.org> Pierre Glaser added the comment: Lib/test/test_asyncio/utils.py defines a similar helper: def run_until(loop, pred, timeout=30): deadline = time.monotonic() + timeout while not pred(): if timeout is not None: timeout = deadline - time.monotonic() if timeout <= 0: raise futures.TimeoutError() loop.run_until_complete(tasks.sleep(0.001)) If we trim the ``loop`` usage, we have a rather simple helper can be used to rewrite a decent number of tests, such as: - _test_multiprocessing.py _TestBarrier._test_reset_f - _test_multiprocessing.py _TestPoolWorkerLifetime.test_pool_worker_lifetime - _test_multiprocessing.py TestSyncManagerTypes.test_wait_proc_exit - fork_wait. ForkWait.test_wait - test_concurrent_futures.py FailingInitializerMixin.test_initializer - test_fork1.py ForkTest.waitimpl - test_logging.py HandlerTests.test_post_fork_child_no_deadlock - test_os. Win32KillTests._kill - test_signal.py StressTest.test_stress_delivery_dependent - test_signal.py StressTest.test_stress_delivery_simulatenous - test_wait4.py Wait4Test.wait_impl As well as some top-level commands in: - test_multiprocessing_main_handling.py some top level instructions - subprocessdata/sigchlild_ignore.py - support/__init__.py I also witnessed some slightly more complex patterns that does not easily fit into the asyncio helper: # eintr_tester.py FNTREINTLTest._lock while True: # synchronize the subprocess dt = time.monotonic() - start_time if dt > 60.0: raise Exception("failed to sync child in %.1f sec" % dt) try: lock_func(f, fcntl.LOCK_EX | fcntl.LOCK_NB) lock_func(f, fcntl.LOCK_UN) time.sleep(0.01) except BlockingIOError: break Which is also (IMO) the case for the lines quoted by Victor. However, such more complex structures do not seem to appear that often, so sticking to run_until and moving it to test.support.script_helper may be enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 13:45:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 18 May 2019 17:45:11 +0000 Subject: [issue36950] test.support: add an helper to wait for an event with a timeout In-Reply-To: <1558200712.2.0.569454302704.issue36950@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: Would you be interested to propose a PR? Maybe raise an assertion error by default, but allow to customize it in the API? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 13:51:30 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 18 May 2019 17:51:30 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1558201890.11.0.441365943051.issue36953@roundup.psfhosted.org> Matthias Bussonnier added the comment: Should it still raise an informative error message with ImportError: > ImportError: cannot import name 'XXX' from 'collections', please import it from 'collections.abc'. or just the "cannot import name 'XXXX'" without the "please import it from 'collections.abc'." ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 14:27:30 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 18 May 2019 18:27:30 +0000 Subject: [issue2180] tokenize: mishandles line joining In-Reply-To: <1203904758.19.0.84784431119.issue2180@psf.upfronthosting.co.za> Message-ID: <1558204050.07.0.292404065812.issue2180@roundup.psfhosted.org> miss-islington added the comment: New changeset abea73bf4a320ff658c9a98fef3d948a142e61a9 by Miss Islington (bot) (Anthony Sottile) in branch 'master': bpo-2180: Treat line continuation at EOF as a `SyntaxError` (GH-13401) https://github.com/python/cpython/commit/abea73bf4a320ff658c9a98fef3d948a142e61a9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 14:30:13 2019 From: report at bugs.python.org (Pierre Glaser) Date: Sat, 18 May 2019 18:30:13 +0000 Subject: [issue36950] test.support: add an helper to wait for an event with a timeout In-Reply-To: <1558117308.95.0.715352595892.issue36950@roundup.psfhosted.org> Message-ID: <1558204213.74.0.407339363901.issue36950@roundup.psfhosted.org> Change by Pierre Glaser : ---------- keywords: +patch pull_requests: +13318 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 14:37:05 2019 From: report at bugs.python.org (Pierre Glaser) Date: Sat, 18 May 2019 18:37:05 +0000 Subject: [issue36950] test.support: add an helper to wait for an event with a timeout In-Reply-To: <1558117308.95.0.715352595892.issue36950@roundup.psfhosted.org> Message-ID: <1558204625.42.0.529112408263.issue36950@roundup.psfhosted.org> Pierre Glaser added the comment: Just did so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 15:38:04 2019 From: report at bugs.python.org (Random832) Date: Sat, 18 May 2019 19:38:04 +0000 Subject: [issue36958] IDLE should print exit message or status if one is provided Message-ID: <1558208284.57.0.662861536384.issue36958@roundup.psfhosted.org> New submission from Random832 : IDLE currently just returns to the interactive prompt when a script exits, even if SystemExit has arguments. This can be confusing to new users if they are using sys.exit to print a message. ---------- assignee: terry.reedy components: IDLE files: run.py.patch keywords: patch messages: 342809 nosy: Random832, terry.reedy priority: normal severity: normal status: open title: IDLE should print exit message or status if one is provided versions: Python 3.7 Added file: https://bugs.python.org/file48335/run.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 15:46:43 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sat, 18 May 2019 19:46:43 +0000 Subject: [issue36959] ISO date errors in _strptime are jumbled Message-ID: <1558208803.84.0.442364090777.issue36959@roundup.psfhosted.org> New submission from Gordon P. Hemsley : This has not been apparent because the tests for this code are not testing what they think they're testing. ---------- components: Library (Lib), Tests messages: 342810 nosy: gphemsley priority: normal severity: normal status: open title: ISO date errors in _strptime are jumbled versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 15:48:37 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 18 May 2019 19:48:37 +0000 Subject: [issue36959] ISO date errors in _strptime are jumbled In-Reply-To: <1558208803.84.0.442364090777.issue36959@roundup.psfhosted.org> Message-ID: <1558208917.18.0.493326453417.issue36959@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 15:50:45 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 18 May 2019 19:50:45 +0000 Subject: [issue36959] ISO date errors in _strptime are jumbled In-Reply-To: <1558208803.84.0.442364090777.issue36959@roundup.psfhosted.org> Message-ID: <1558209045.6.0.941438254291.issue36959@roundup.psfhosted.org> Paul Ganssle added the comment: @gphelmsley Can you clarify what you mean by this? Do you have a minimal reproducing example that shows what's happening and what you are expecting? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 15:52:09 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sat, 18 May 2019 19:52:09 +0000 Subject: [issue36959] ISO date errors in _strptime are jumbled In-Reply-To: <1558208803.84.0.442364090777.issue36959@roundup.psfhosted.org> Message-ID: <1558209129.17.0.462732900052.issue36959@roundup.psfhosted.org> Change by Gordon P. Hemsley : ---------- keywords: +patch pull_requests: +13319 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 15:55:24 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sat, 18 May 2019 19:55:24 +0000 Subject: [issue36959] ISO date errors in _strptime are jumbled In-Reply-To: <1558208803.84.0.442364090777.issue36959@roundup.psfhosted.org> Message-ID: <1558209324.19.0.586070811831.issue36959@roundup.psfhosted.org> Gordon P. Hemsley added the comment: I've created a PR that fixes the issue, which I discovered while evaluating the test coverage for _strptime. Certain scenarios of error messages were never being hit because the cascade was out of order, and the tests were not showing that because they were throwing a different ValueError than the one they were expecting to throw. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 16:02:43 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 18 May 2019 20:02:43 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1558209763.22.0.077580547059.issue25988@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13320 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 16:17:58 2019 From: report at bugs.python.org (Brad Solomon) Date: Sat, 18 May 2019 20:17:58 +0000 Subject: [issue36960] Make datetime docs more user-friendly Message-ID: <1558210678.84.0.258939294256.issue36960@roundup.psfhosted.org> New submission from Brad Solomon : The datetime docs are chalk full of detail. This is a positive aspect, and represents a huge amount of work by Tim Peters and A.M. Kuchling. However, it also may function as an obstacle for beginner readers and those simply seeking to answer a basic question or see a straightforward usage example. Rather than seeing an example-based explanation of a common use-case, they are bombarded with technical detail and edge cases. I propose some restructuring of the datetime docs with the goal of making them more reader-friendly. The goal is not to eliminate any of the detail, but to restructure things so as to bring the "everyday" parts into more prominent real estate. The changes here all make an effort to reflect what's espoused by "Documenting Python" at https://devguide.python.org/documenting/. I have some additional changes in mind but wanted to put this here now to gauge receptiveness to the existing changes. ---------- assignee: docs at python components: Documentation messages: 342813 nosy: bsolomon1124, docs at python priority: normal pull_requests: 13321 severity: normal status: open title: Make datetime docs more user-friendly type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 16:24:17 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 18 May 2019 20:24:17 +0000 Subject: [issue35849] Added thousands separators to Lib/pstats.py final report In-Reply-To: <1548766331.46.0.0833286868767.issue35849@roundup.psfhosted.org> Message-ID: <1558211057.75.0.588309289222.issue35849@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13322 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 16:25:30 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 18 May 2019 20:25:30 +0000 Subject: [issue36960] Make datetime docs more user-friendly In-Reply-To: <1558210678.84.0.258939294256.issue36960@roundup.psfhosted.org> Message-ID: <1558211130.21.0.69875733114.issue36960@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 16:27:21 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 18 May 2019 20:27:21 +0000 Subject: [issue36960] Make datetime docs more user-friendly In-Reply-To: <1558210678.84.0.258939294256.issue36960@roundup.psfhosted.org> Message-ID: <1558211241.23.0.741603510787.issue36960@roundup.psfhosted.org> Cheryl Sabella added the comment: See also issue8822. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 16:36:22 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 18 May 2019 20:36:22 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1558211782.67.0.437161636168.issue19376@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 56027ccd6b9dab4a090e4fef8574933fb9a36ff2 by Cheryl Sabella (Abhishek Kumar Singh) in branch 'master': bpo-19376: Added doc mentioning `datetime.strptime()` without a year fails for Feb 29. (GH-10243) https://github.com/python/cpython/commit/56027ccd6b9dab4a090e4fef8574933fb9a36ff2 ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 16:39:32 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 18 May 2019 20:39:32 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1558211972.06.0.229746058949.issue19376@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 17:01:05 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sat, 18 May 2019 21:01:05 +0000 Subject: [issue36959] ISO date errors in _strptime are jumbled In-Reply-To: <1558208803.84.0.442364090777.issue36959@roundup.psfhosted.org> Message-ID: <1558213265.28.0.477805726328.issue36959@roundup.psfhosted.org> Paul Ganssle added the comment: Hm, I was a bit confused by your wording here, because I am able to trigger all the errors just fine even before this PR, but I do think that even though this isn't necessarily fixing inaccurate error messages (all the error messages *are* accurate), you're right that the text of the messages does seem to indicate that the original authors intended a cascade ordering more like the one you've proposed. I'll give this a more thorough review a bit later, thanks for working on this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 17:02:56 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 18 May 2019 21:02:56 +0000 Subject: [issue2180] tokenize: mishandles line joining In-Reply-To: <1203904758.19.0.84784431119.issue2180@psf.upfronthosting.co.za> Message-ID: <1558213376.12.0.250039295008.issue2180@roundup.psfhosted.org> Gregory P. Smith added the comment: Thanks for figuring this one out Anthony! :) ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 17:53:56 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 18 May 2019 21:53:56 +0000 Subject: [issue36567] DOC: manpage directive doesn't create hyperlink In-Reply-To: <1554759647.95.0.266283511597.issue36567@roundup.psfhosted.org> Message-ID: <1558216436.72.0.759838244993.issue36567@roundup.psfhosted.org> Berker Peksag added the comment: New changeset eab99650799699f766c2660f4cfa8ff3f9e8457f by Berker Peksag (Batuhan Ta?kaya) in branch 'master': bpo-36567: Use manpages_url to create links for man pages (GH-13339) https://github.com/python/cpython/commit/eab99650799699f766c2660f4cfa8ff3f9e8457f ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 18:06:09 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 18 May 2019 22:06:09 +0000 Subject: [issue36961] ast_unparser.c doesn't handle PEP570 Message-ID: <1558217169.86.0.894660058597.issue36961@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Any line in test_annotations() containing positional-only markers in Lib/test/test_future.py will fail: eq('lambda x, /: x') Run tests sequentially 0:00:00 load avg: 0.71 [1/1] test_future test test_future failed -- Traceback (most recent call last): File "/home/pablogsal/github/cpython/Lib/test/test_future.py", line 186, in test_annotations eq("lambda a, /, b, c=True, *vararg, d, e='str', **kwargs: a + b") File "/home/pablogsal/github/cpython/Lib/test/test_future.py", line 141, in assertAnnotationEqual self.assertEqual(actual, expected) AssertionError: "lambda b, c=True, *vararg, d, e='str', **kwargs: a + b" != "lambda a, /, b, c=True, *vararg, d, e='str', **kwargs: a + b" - lambda b, c=True, *vararg, d, e='str', **kwargs: a + b + lambda a, /, b, c=True, *vararg, d, e='str', **kwargs: a + b ? ++++++ test_future failed == Tests result: FAILURE == 1 test failed: test_future Total duration: 46 ms Tests result: FAILURE ---------- assignee: pablogsal components: Interpreter Core messages: 342819 nosy: pablogsal priority: normal severity: normal status: open title: ast_unparser.c doesn't handle PEP570 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 18:07:14 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 18 May 2019 22:07:14 +0000 Subject: [issue36961] ast_unparser.c doesn't handle PEP570 In-Reply-To: <1558217169.86.0.894660058597.issue36961@roundup.psfhosted.org> Message-ID: <1558217234.7.0.422860363905.issue36961@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13323 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 18:10:57 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 18 May 2019 22:10:57 +0000 Subject: [issue36826] ast_unparser.c doesn't handle := expressions In-Reply-To: <1557218393.13.0.153160088423.issue36826@roundup.psfhosted.org> Message-ID: <1558217457.39.0.050172951857.issue36826@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks for the patch Batuhan! ---------- nosy: +pablogsal resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 18:34:34 2019 From: report at bugs.python.org (Evandro Coan) Date: Sat, 18 May 2019 22:34:34 +0000 Subject: [issue35893] distutils fails to build extension on windows when it is a package.__init__ In-Reply-To: <1549228211.63.0.529262209714.issue35893@roundup.psfhosted.org> Message-ID: <1558218874.7.0.482964158567.issue35893@roundup.psfhosted.org> Evandro Coan added the comment: It is missing the import on: #START from distutils.command import build_ext def get_export_symbols(self, ext): parts = ext.name.split(".") print('parts', parts) if parts[-1] == "__init__": initfunc_name = "PyInit_" + parts[-2] else: initfunc_name = "PyInit_" + parts[-1] build_ext.build_ext.get_export_symbols = get_export_symbols #END ---------- nosy: +evandrocoan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 18:40:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 18 May 2019 22:40:25 +0000 Subject: [issue36961] ast_unparser.c doesn't handle PEP570 In-Reply-To: <1558217169.86.0.894660058597.issue36961@roundup.psfhosted.org> Message-ID: <1558219225.1.0.163015600589.issue36961@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset da6129e821099c1372d511a11d18af83d6d5d128 by Pablo Galindo in branch 'master': bpo-36961: Handle positional-only arguments in uparse.c (GH-13412) https://github.com/python/cpython/commit/da6129e821099c1372d511a11d18af83d6d5d128 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 18:40:37 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 18 May 2019 22:40:37 +0000 Subject: [issue36961] ast_unparser.c doesn't handle PEP570 In-Reply-To: <1558217169.86.0.894660058597.issue36961@roundup.psfhosted.org> Message-ID: <1558219237.16.0.202142561608.issue36961@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 19:09:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 18 May 2019 23:09:19 +0000 Subject: [issue36958] IDLE should print exit message or status if one is provided In-Reply-To: <1558208284.57.0.662861536384.issue36958@roundup.psfhosted.org> Message-ID: <1558220959.82.0.793159221956.issue36958@roundup.psfhosted.org> Terry J. Reedy added the comment: https://docs.python.org/3/library/exceptions.html#SystemExit says: skip traceback, convert default None to 0, print any other non-int and convert to 1, and pass unprinted int to C exit(). I agree that IDLE should also print non-ints. The IDLE doc should mention its non-exit behavior. [https://docs.python.org/3/library/sys.html#sys.exit adds more about int return codes and that exit() only exits the process in the main thread. Neither is relevant here.] I believe the relevant code is the following, from run.Executive.runcode: except SystemExit: # Scripts that raise SystemExit should just # return to the interactive prompt pass except: self.usr_exc_info = sys.exc_info() if quitting: exit() # even print a user code SystemExit exception, continue print_exception() jit = self.rpchandler.console.getvar("<>") if jit: self.rpchandler.interp.open_remote_stack_viewer() The bare except clause, including the comment, is from 2003. The 'except SystemExit' clause was added 2013 June 11 in #18196, a follow-up of comments in #5492. The obsoleted comment should have been deleted. The behavior suppressed was always printing traceback + message. What should have been retained was printing non-int messages, but I don't think that either Roger or I were aware of that behavior. One could argue that SystemExit in user code should trigger an exit from the user execution process, which would trigger a Shell Restart. This would be closer to the standard behavior. But it does not hurt, and may be better, to keep the process and let the user trigger a restart when wanted. In the case that inspired #18196, the SystemExit came from site.py, not user code, and definitely should not cause a restart. I will try something like the following: except SystemExit as e: ob = e.args[0] if not isinstance(ob, (type(None), int)): print('SystemExit: ' + str(ob), file=sys.stderr) Since the message will be followed by a normal prompt rather than an exit, I want to 'enhance' the message with the prefix and error color. ---------- stage: -> needs patch type: -> behavior versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 19:50:07 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 18 May 2019 23:50:07 +0000 Subject: [issue36691] SystemExit & sys.exit : Allow both exit status and message In-Reply-To: <1555851872.77.0.954312917312.issue36691@roundup.psfhosted.org> Message-ID: <1558223407.17.0.845758308073.issue36691@roundup.psfhosted.org> Eric V. Smith added the comment: You could add a flag in the exception to tell the default handler where to write the message. It would default to stderr. This would make it possible to catch the exception before it was written out, and customize the behavior. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 19:52:03 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 18 May 2019 23:52:03 +0000 Subject: [issue32397] textwrap output may change if you wrap a paragraph twice In-Reply-To: <1513865443.17.0.213398074469.issue32397@psf.upfronthosting.co.za> Message-ID: <1558223523.04.0.0413849292707.issue32397@roundup.psfhosted.org> Cheryl Sabella added the comment: @larry, it looks like this was close to being merged pending some review comments by Serhiy. Although this is considered a bug and not a new feature, it might be nice to try to get this in for 3.8. Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 20:18:08 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 19 May 2019 00:18:08 +0000 Subject: [issue33519] Should MutableSequence provide .copy()? In-Reply-To: <1526396967.72.0.682650639539.issue33519@psf.upfronthosting.co.za> Message-ID: <1558225088.85.0.924764329264.issue33519@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 9892f454d11b7ea9ba394a115b3e6f48ef6f78fe by Cheryl Sabella (Jelle Zijlstra) in branch 'master': bpo-33519: clarify that .copy() is not part of the MutableSequence ABC (GH-6965) https://github.com/python/cpython/commit/9892f454d11b7ea9ba394a115b3e6f48ef6f78fe ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 20:18:57 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 19 May 2019 00:18:57 +0000 Subject: [issue33519] Should MutableSequence provide .copy()? In-Reply-To: <1526396967.72.0.682650639539.issue33519@psf.upfronthosting.co.za> Message-ID: <1558225137.45.0.875230995928.issue33519@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 21:00:44 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 01:00:44 +0000 Subject: [issue36917] ast.NodeVisitor no longer calls visit_Str In-Reply-To: <1557843682.58.0.0807679622364.issue36917@roundup.psfhosted.org> Message-ID: <1558227644.21.0.800284460339.issue36917@roundup.psfhosted.org> Batuhan added the comment: What about adding visit_Constant to NodeVisitor for at least one relase period and call visit_Str, visit_Num etc? ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 21:10:45 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sun, 19 May 2019 01:10:45 +0000 Subject: [issue36959] ISO date errors in _strptime are jumbled In-Reply-To: <1558208803.84.0.442364090777.issue36959@roundup.psfhosted.org> Message-ID: <1558228245.62.0.320028905292.issue36959@roundup.psfhosted.org> Gordon P. Hemsley added the comment: Ah yes, to be clear, I wasn't trying to suggest that the error messages themselves were wrong?just that they weren't triggering when the tests were expecting them to. Some of the existing tests currently trigger the "unconverted data remains" ValueError from earlier in the method, but because the messages are not checked, that is not immediately obvious. I've also added new tests for additional scenarios that would presumably also be considered invalid, based on the existing ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 22:06:20 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 19 May 2019 02:06:20 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1558231580.45.0.876569335509.issue36783@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13324 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 22:12:04 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 19 May 2019 02:12:04 +0000 Subject: [issue36783] No documentation for _FromXandFold C API functions In-Reply-To: <1556891515.33.0.269336043459.issue36783@roundup.psfhosted.org> Message-ID: <1558231924.43.0.868228713111.issue36783@roundup.psfhosted.org> miss-islington added the comment: New changeset 951b161857a840d4d14de0a5a6610e212d78ab68 by Miss Islington (bot) in branch '3.7': bpo-36783: Add new references for C API Documentation changes (GH-13204) https://github.com/python/cpython/commit/951b161857a840d4d14de0a5a6610e212d78ab68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 23:18:37 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 03:18:37 +0000 Subject: [issue36962] Cant sort ModuleInfo instances Message-ID: <1558235917.88.0.227465723782.issue36962@roundup.psfhosted.org> New submission from Batuhan : I can't sort the result of iter_modules; >>> import random, pkgutil >>> modules = list(pkgutil.iter_modules(None)) >>> random.shuffle(modules) >>> sorted(modules) Traceback (most recent call last): File "", line 1, in TypeError: '<' not supported between instances of 'FileFinder' and 'FileFinder' ---------- components: Library (Lib) messages: 342830 nosy: BTaskaya priority: normal severity: normal status: open title: Cant sort ModuleInfo instances versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 23:30:27 2019 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 19 May 2019 03:30:27 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1558236627.07.0.0412328697922.issue36919@roundup.psfhosted.org> Anthony Sottile added the comment: still not able to answer the why, but at least I can answer the what here: https://github.com/python/cpython/blob/f665b96e92a6a6943e312e2c606f348db95939ab/Parser/tokenizer.c#L984-L987 cpython adds a newline during tokenization if the file does not end in a newline ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 23:30:36 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 03:30:36 +0000 Subject: [issue36962] Cant sort ModuleInfo instances In-Reply-To: <1558235917.88.0.227465723782.issue36962@roundup.psfhosted.org> Message-ID: <1558236636.92.0.628403254737.issue36962@roundup.psfhosted.org> Batuhan added the comment: I think dataclasses can be used to do it with order, frozen true parameters. Also a __getitem__ is required for doesnt break anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 23:33:00 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 03:33:00 +0000 Subject: [issue36962] Cant sort ModuleInfo instances In-Reply-To: <1558235917.88.0.227465723782.issue36962@roundup.psfhosted.org> Message-ID: <1558236780.47.0.570500344384.issue36962@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +13325 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 18 23:55:26 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 03:55:26 +0000 Subject: [issue36949] WeakSet.__repr__ and __str__ do not show contents of the set In-Reply-To: <1558111586.51.0.375151811101.issue36949@roundup.psfhosted.org> Message-ID: <1558238126.68.0.891946330161.issue36949@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +13326 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 00:01:37 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 04:01:37 +0000 Subject: [issue20410] Argument Clinic: add 'self' return converter In-Reply-To: <1390847418.07.0.605398644696.issue20410@psf.upfronthosting.co.za> Message-ID: <1558238497.44.0.419688601049.issue20410@roundup.psfhosted.org> Batuhan added the comment: Doesn't clinic have a `self_converter` class? https://github.com/python/cpython/blame/master/Tools/clinic/clinic.py#L3465 ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 00:49:20 2019 From: report at bugs.python.org (Apoorv Reddy) Date: Sun, 19 May 2019 04:49:20 +0000 Subject: [issue36963] PyDict_GetItem SegFaults on simple dictionary lookup when using Ctypes Message-ID: <1558241360.13.0.269765861936.issue36963@roundup.psfhosted.org> New submission from Apoorv Reddy : I'm trying to use ctypes to speed up an internal function in my project. However, I'm getting a segmentation fault on a simple dictionary lookup in my C Code, on PyDict_GetItem(dict, key). I have supplied a minimal version of the code I'm trying in C, which segfaults, with the Makefile and the Python driver code which loads the shared library.I have created a simple conda environment for Python 3.6 for the same. ---------- components: ctypes files: bug.tar.gz messages: 342834 nosy: apoorvreddy priority: normal severity: normal status: open title: PyDict_GetItem SegFaults on simple dictionary lookup when using Ctypes type: crash versions: Python 3.6 Added file: https://bugs.python.org/file48336/bug.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 01:06:05 2019 From: report at bugs.python.org (Apoorv Reddy) Date: Sun, 19 May 2019 05:06:05 +0000 Subject: [issue36963] PyDict_GetItem SegFaults on simple dictionary lookup when using Ctypes In-Reply-To: <1558241360.13.0.269765861936.issue36963@roundup.psfhosted.org> Message-ID: <1558242365.64.0.0267770141736.issue36963@roundup.psfhosted.org> Change by Apoorv Reddy : ---------- nosy: +amaury.forgeotdarc, belopolsky, benjamin.peterson, christian.heimes, duaneg, ebarry, georg.brandl, inada.naoki, larry, meador.inge, ned.deily, rhettinger, serhiy.storchaka, tehybel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 02:13:12 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 06:13:12 +0000 Subject: [issue23012] RuntimeError: settrace/setprofile function gets lost In-Reply-To: <1418048778.92.0.0497543506697.issue23012@psf.upfronthosting.co.za> Message-ID: <1558246392.03.0.100294076512.issue23012@roundup.psfhosted.org> Change by Batuhan : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 02:13:46 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 06:13:46 +0000 Subject: [issue23012] RuntimeError: settrace/setprofile function gets lost In-Reply-To: <1418048778.92.0.0497543506697.issue23012@psf.upfronthosting.co.za> Message-ID: <1558246426.18.0.0799961902965.issue23012@roundup.psfhosted.org> Change by Batuhan : ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 02:40:30 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 06:40:30 +0000 Subject: [issue23012] RuntimeError: settrace/setprofile function gets lost In-Reply-To: <1418048778.92.0.0497543506697.issue23012@psf.upfronthosting.co.za> Message-ID: <1558248030.5.0.70764619163.issue23012@roundup.psfhosted.org> Batuhan added the comment: I try to track down this. sys_settrace calls PyEval_SetTrace with trace_trampoline and the function given to it. The trace_trampoline is important because it checks the result and if result is NULL (for example like f() recursion in your code) it sets c_tracefunc and c_traceobj to NULL. It is why it doesnt work. if (result == NULL) { PyEval_SetTrace(NULL, NULL); Py_CLEAR(frame->f_trace); return -1; } We can create a simple reset function for resetting everything and then setting c_tracefunc, c_traceobj variables back to the thread state. https://github.com/isidentical/cpython/commit/3bafbf3a89e09cc573ddbcd13f9334e164f7dd8b But then a set of tests will fail with raw ValueError produced by tracer. class RaisingTraceFuncTestCase(unittest.TestCase): ... def trace(self, frame, event, arg): """A trace function that raises an exception in response to a specific trace event.""" if event == self.raiseOnEvent: raise ValueError # just something that isn't RuntimeError else: return self.trace This should be catched in def run_test_for_event(self, event): try: for i in range(sys.getrecursionlimit() + 1): sys.settrace(self.trace) try: self.f() except ValueError: pass else: self.fail("exception not raised!") except RuntimeError: self.fail("recursion counter not reset") but after resetting, it doesn't work. I'm missing something but i dont know what i'm missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 03:03:24 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 May 2019 07:03:24 +0000 Subject: [issue36957] Speed up math.isqrt In-Reply-To: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> Message-ID: <1558249404.58.0.190743883577.issue36957@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +13327 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 03:07:01 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 May 2019 07:07:01 +0000 Subject: [issue36957] Speed up math.isqrt In-Reply-To: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> Message-ID: <1558249621.16.0.461330381438.issue36957@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is possible to get yet 10-20% by avoiding to create temporary Python integers for right arguments of shift operations. PR 13416 adds two private functions _PyLong_Rshift() and _PyLong_Lshift() which take the second argument as C size_t instead of Python integer. _PyLong_Lshift() can also be used in factorial() and in float to int comparison. $ ./python -m timeit -s "from math import isqrt; x = range(2**63-1000, 2**63+1000)" "[isqrt(n) for n in x]" Unpatched: 200 loops, best of 5: 1.84 msec per loop Patched: 200 loops, best of 5: 1.51 msec per loop $ ./python -m timeit -s "from math import isqrt; x = range(2**95-1000, 2**95+1000)" "[isqrt(n) for n in x]" Unpatched: 100 loops, best of 5: 2.09 msec per loop Patched: 200 loops, best of 5: 1.75 msec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 03:16:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 May 2019 07:16:22 +0000 Subject: [issue36957] Speed up math.isqrt In-Reply-To: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> Message-ID: <1558250182.76.0.794719861419.issue36957@roundup.psfhosted.org> Serhiy Storchaka added the comment: I have also some ideas about algorithmic optimizations (they need to be tested). In classic formula $a_{i+1} = a_i + (n - a_i^2)/(2*a_i)$ we can calculate $n - a_i^2$ as $(n - a_{i-1}^2) - (a_i^2 - a_{i-1})^2 = (n - a_{i-1}^2) - (a_i^2 - a_{i-1})*(a_i^2 + a_{i-1})$. $n - a_i^2$ usually is much smaller than $n$, so this can speed up subtraction and division. Things become more complicated when use shifts as in your formula, but I think that we can get benefit even in this case. This can also speed up the final check $a_i^2 <= n$. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 04:50:46 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 19 May 2019 08:50:46 +0000 Subject: [issue36810] Recursive type annotations do not work in documentation tests In-Reply-To: <1557128091.8.0.92390495342.issue36810@roundup.psfhosted.org> Message-ID: <1558255846.7.0.94376977166.issue36810@roundup.psfhosted.org> Ivan Levkivskyi added the comment: > I don't think there's an actionable bug here. OK, then taking into account there is a decent workaround, I am closing this. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 05:09:04 2019 From: report at bugs.python.org (Erik Janssens) Date: Sun, 19 May 2019 09:09:04 +0000 Subject: [issue35890] Cleanup some non-consistent API callings In-Reply-To: <1549145315.91.0.561945747798.issue35890@roundup.psfhosted.org> Message-ID: <1558256944.37.0.0928849610189.issue35890@roundup.psfhosted.org> Change by Erik Janssens : ---------- pull_requests: +13328 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 05:11:19 2019 From: report at bugs.python.org (Erik Janssens) Date: Sun, 19 May 2019 09:11:19 +0000 Subject: [issue20596] Support for alternate wcstok syntax for Windows compilers In-Reply-To: <1392123816.37.0.457546149708.issue20596@psf.upfronthosting.co.za> Message-ID: <1558257079.87.0.332593523598.issue20596@roundup.psfhosted.org> Erik Janssens added the comment: The same issue was handled in bpo-35890 ---------- pull_requests: +13329 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 05:20:12 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 19 May 2019 09:20:12 +0000 Subject: [issue36881] isinstance raises TypeError for metaclass with metaclass=ABCMeta In-Reply-To: <1557541744.61.0.162387429511.issue36881@roundup.psfhosted.org> Message-ID: <1558257612.56.0.222130148681.issue36881@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 07:14:48 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 May 2019 11:14:48 +0000 Subject: [issue36957] Speed up math.isqrt In-Reply-To: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> Message-ID: <1558264488.06.0.982711222352.issue36957@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset a5119e7d75c9729fc36c059d05f3d7132e7f6bb4 by Serhiy Storchaka in branch 'master': bpo-36957: Add _PyLong_Rshift() and _PyLong_Lshift(). (GH-13416) https://github.com/python/cpython/commit/a5119e7d75c9729fc36c059d05f3d7132e7f6bb4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 07:37:56 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 19 May 2019 11:37:56 +0000 Subject: [issue36962] Cant sort ModuleInfo instances In-Reply-To: <1558235917.88.0.227465723782.issue36962@roundup.psfhosted.org> Message-ID: <1558265876.67.0.0100252622536.issue36962@roundup.psfhosted.org> Eric V. Smith added the comment: Unfortunately your change isn't backward compatible with the existing (namedtuple) version. I expect this to fail in the dataclass version: >>> finder, name, ispkg = list(pkgutil.iter_modules(None))[0] And since this is an enhancement, it can only go in to 3.8. And the window is closing for that, so it's more likely to be 3.9, if we decide that backward compatibility isn't important here. ---------- nosy: +eric.smith type: -> enhancement versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 08:07:19 2019 From: report at bugs.python.org (Marco Sulla) Date: Sun, 19 May 2019 12:07:19 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable Message-ID: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> New submission from Marco Sulla : I'm telling about python3 -m venv VIRTUALENV_NAME, not about the virtualenv binary. Some remarks: 1. `VIRTUAL_ENV` variable in `activate` script is the absolute path of the virtualenv folder 2. A symlink to the `python3` bin of the machine is created. This makes the virtualenv difficult to export to another machine. The VIRTUAL_ENV variable must be manually changed. Furthermore I do not understand why the simlink is created. I suppose that `python3` is already on the `PATH`, so what's the purpose of simlink? I propose to makes VIRTUAL_ENV eqauls to the parent folder of the directory where `activate` resides. It makes it possible to move the virtualenv and copy it to another machine with the same OS. ---------- components: Library (Lib) messages: 342842 nosy: Marco Sulla priority: normal severity: normal status: open title: `python3 -m venv NAME`: virtualenv is not portable type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 08:25:25 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 12:25:25 +0000 Subject: [issue36962] Cant sort ModuleInfo instances In-Reply-To: <1558265876.67.0.0100252622536.issue36962@roundup.psfhosted.org> Message-ID: Batuhan added the comment: You're right. I am thinking implementing 4 sequence methods (contains/len/iter/getitem) and set a depraction warning for them. We can remove this methods in next relase On Sun, May 19, 2019, 2:37 PM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > Unfortunately your change isn't backward compatible with the existing > (namedtuple) version. > > I expect this to fail in the dataclass version: > >>> finder, name, ispkg = list(pkgutil.iter_modules(None))[0] > > And since this is an enhancement, it can only go in to 3.8. And the window > is closing for that, so it's more likely to be 3.9, if we decide that > backward compatibility isn't important here. > > ---------- > nosy: +eric.smith > type: -> enhancement > versions: -Python 3.6, Python 3.7 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 08:47:57 2019 From: report at bugs.python.org (Batuhan) Date: Sun, 19 May 2019 12:47:57 +0000 Subject: [issue36962] Cant sort ModuleInfo instances In-Reply-To: <1558235917.88.0.227465723782.issue36962@roundup.psfhosted.org> Message-ID: <1558270077.37.0.95086350011.issue36962@roundup.psfhosted.org> Batuhan added the comment: Can you review the PR, i implemented it there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:02:26 2019 From: report at bugs.python.org (Erik Janssens) Date: Sun, 19 May 2019 13:02:26 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers Message-ID: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> New submission from Erik Janssens : in Modules/main.c STATUS_CONTROL_C_EXIT is included conditionally if compiling when _MSC_VER is defined. Later on STATUS_CONTROL_C_EXIT is used if MS_WINDOWS is defined. This breaks compilation of main.c with any non MSC compiler while compiling for MS Windows. This appears to have been introduced in GH-12123 for bpo-36142 ---------- components: Windows messages: 342845 nosy: erikjanss, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:06:27 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 19 May 2019 13:06:27 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558271187.61.0.123441313673.issue36965@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:20:46 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 19 May 2019 13:20:46 +0000 Subject: [issue36962] Cant sort ModuleInfo instances In-Reply-To: <1558235917.88.0.227465723782.issue36962@roundup.psfhosted.org> Message-ID: <1558272046.11.0.0589727202151.issue36962@roundup.psfhosted.org> Eric V. Smith added the comment: I'm not sure all of this churn is worth it for an unusual use case that can be satisfied by: >>> sorted(pkgutil.iter_modules(None), key=lambda x: (x[1], x[2]) or even: >>> sorted(pkgutil.iter_modules(None), key=operator.itemgetter(1)) (assuming that ispkg doesn't really need to be part of the key) Before reviewing the patch, I suggest you raise the issue on python-dev and get some additional input. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:32:12 2019 From: report at bugs.python.org (Erik Janssens) Date: Sun, 19 May 2019 13:32:12 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558272732.88.0.40263669773.issue36965@roundup.psfhosted.org> Change by Erik Janssens : ---------- keywords: +patch pull_requests: +13330 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:36:01 2019 From: report at bugs.python.org (Erik Janssens) Date: Sun, 19 May 2019 13:36:01 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558272961.76.0.483293496668.issue36965@roundup.psfhosted.org> Erik Janssens added the comment: According to the Microsoft documentation at https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/using-ntstatus-values system-supplied status codes are defined in ntstatus.h. and the NTSTATUS type is defined in ntdef.h PR 13421 includes both ntstatus.h and ntdef.h to be able to use STATUS_CONTROL_C_EXIT when compiling for windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:37:57 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 May 2019 13:37:57 +0000 Subject: [issue36962] Cant sort ModuleInfo instances In-Reply-To: <1558235917.88.0.227465723782.issue36962@roundup.psfhosted.org> Message-ID: <1558273077.55.0.897517919961.issue36962@roundup.psfhosted.org> Berker Peksag added the comment: I agree with Eric that this use case can be easily covered by using sorted(..., key=...). I suggest closing this as 'rejected'. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:40:10 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 May 2019 13:40:10 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558273210.25.0.138820693584.issue36948@roundup.psfhosted.org> Berker Peksag added the comment: New changeset c661b30f89ffe7a7995538d3b1649469b184bee4 by Berker Peksag (Xtreak) in branch 'master': bpo-36948: Fix NameError in urllib.request.URLopener.retrieve (GH-13389) https://github.com/python/cpython/commit/c661b30f89ffe7a7995538d3b1649469b184bee4 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:40:23 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 19 May 2019 13:40:23 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558273223.79.0.913868300813.issue36948@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13332 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:43:21 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 May 2019 13:43:21 +0000 Subject: [issue36567] DOC: manpage directive doesn't create hyperlink In-Reply-To: <1554759647.95.0.266283511597.issue36567@roundup.psfhosted.org> Message-ID: <1558273401.49.0.0908034390137.issue36567@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:47:16 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 May 2019 13:47:16 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558273636.09.0.198732147921.issue36948@roundup.psfhosted.org> Berker Peksag added the comment: Thanks! Apparently, backport to 3.7 isn't needed, so I just closed PR 13422. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:50:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 May 2019 13:50:07 +0000 Subject: [issue36962] Cant sort ModuleInfo instances In-Reply-To: <1558235917.88.0.227465723782.issue36962@roundup.psfhosted.org> Message-ID: <1558273807.74.0.433192296817.issue36962@roundup.psfhosted.org> Serhiy Storchaka added the comment: Dataclasses are even more heavyweight than namedtuples. I am not sure that they should be used in the stdlib now. Especially in this case. I think the common use of iter_modules() is immediate unpacking of the yielded tuple: for importer, modname, ispkg in pkgutil.iter_modules(): ... Your change breaks it. I agree with Eric and Berker that this issue should be closed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:57:19 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 May 2019 13:57:19 +0000 Subject: [issue27141] Fix collections.UserList shallow copy In-Reply-To: <1464384542.41.0.303372176211.issue27141@psf.upfronthosting.co.za> Message-ID: <1558274239.19.0.541517483645.issue27141@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f4e1babf44792bdeb0c01da96821ba0800a51fd8 by Serhiy Storchaka (Bar Harel) in branch 'master': bpo-27141: Fix collections.UserList and UserDict shallow copy. (GH-4094) https://github.com/python/cpython/commit/f4e1babf44792bdeb0c01da96821ba0800a51fd8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 09:58:09 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 19 May 2019 13:58:09 +0000 Subject: [issue27141] Fix collections.UserList shallow copy In-Reply-To: <1464384542.41.0.303372176211.issue27141@psf.upfronthosting.co.za> Message-ID: <1558274289.39.0.502054533471.issue27141@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13333 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:03:55 2019 From: report at bugs.python.org (Larry Hastings) Date: Sun, 19 May 2019 14:03:55 +0000 Subject: [issue36963] PyDict_GetItem SegFaults on simple dictionary lookup when using Ctypes In-Reply-To: <1558241360.13.0.269765861936.issue36963@roundup.psfhosted.org> Message-ID: <1558274635.43.0.0361410255125.issue36963@roundup.psfhosted.org> Larry Hastings added the comment: It's not surprising that you crashed the CPython interpreter by using ctypes--it's very easy to do by accident, or via a bug in your own code. That's why we don't accept crash reports involving ctypes. Also, it's rude to "nosy" so many people, particularly on your first bug. Please show some courtesy in the future, rather than trying to involve as many core developers as possible with what is probably a bug in your own code. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:18:39 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 19 May 2019 14:18:39 +0000 Subject: [issue36966] Export __VENV_PROMPT__ as environment variable Message-ID: <1558275519.03.0.191785670676.issue36966@roundup.psfhosted.org> New submission from Lysandros Nikolaou : For those, who use custom tools for their terminals, prepending __VENV_PROMPT__ to PS1 doesn't really help all that much, because it gets overwritten by those tools. Would it make sense to export __VENV_PROMPT__ as an environment variable upon activation, so that these tools can make use of it, in order to edit PS1 accordingly? ---------- components: Library (Lib) messages: 342855 nosy: lys.nikolaou priority: normal severity: normal status: open title: Export __VENV_PROMPT__ as environment variable type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:22:10 2019 From: report at bugs.python.org (Apoorv Reddy) Date: Sun, 19 May 2019 14:22:10 +0000 Subject: [issue36963] PyDict_GetItem SegFaults on simple dictionary lookup when using Ctypes In-Reply-To: <1558241360.13.0.269765861936.issue36963@roundup.psfhosted.org> Message-ID: <1558275730.97.0.480908890607.issue36963@roundup.psfhosted.org> Apoorv Reddy added the comment: Greetings Larry ! I apologize for spamming so many people. I was hoping to get some insight into this ! Could you let me know to whom I could reach out for help ? I've included tehybel as I saw that he has raised/resolved some issues with PyDict in the past. My C code is essentially just this: #include "Python.h" #ifdef __cplusplus extern "C" double test(PyObject* key, PyObject* dict) #else double test(PyObject* key, PyObject* dict) #endif { PyObject* list = PyObject_GetItem(dict, key); return 0.0; } ------------ And my Python Code is this. I'm pretty sure I've got the input and output types correct here. from ctypes import cdll from ctypes import * import json import sys import pickle dll = CDLL('./test2.so') dll.test.restype = c_double dll.test.argtypes = (py_object, py_object) d = {68113113140: [1, 2]} for i in d.keys(): if i == 68113113140: break print(dll.test(i, d)) # this works just fine print(dll.test(68113113140, d) # this segfaults ! GDB shows me that PyObject_RichCompare (called inside PyDict_GetItem) is the function where the segmentation fault happens ! -------- Hoping for some guidance here ! I've been trying to resolve this for 3 days now. I have made sure that I've compiled with the correct version of Python headers and that I'm using the same version of interpreter as well (in this case Python 3.5.6) ---------- nosy: -amaury.forgeotdarc, belopolsky, benjamin.peterson, christian.heimes, duaneg, ebarry, georg.brandl, inada.naoki, meador.inge, ned.deily, rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:22:10 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 19 May 2019 14:22:10 +0000 Subject: [issue36966] Export __VENV_PROMPT__ as environment variable In-Reply-To: <1558275519.03.0.191785670676.issue36966@roundup.psfhosted.org> Message-ID: <1558275730.65.0.137024719515.issue36966@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Is this same as issue35328? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:25:01 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 19 May 2019 14:25:01 +0000 Subject: [issue36966] Export __VENV_PROMPT__ as environment variable In-Reply-To: <1558275519.03.0.191785670676.issue36966@roundup.psfhosted.org> Message-ID: <1558275901.58.0.683970464429.issue36966@roundup.psfhosted.org> Lysandros Nikolaou added the comment: It is. Somehow search failed me big time. I'm closing the issue. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:25:11 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 19 May 2019 14:25:11 +0000 Subject: [issue36966] Export __VENV_PROMPT__ as environment variable In-Reply-To: <1558275519.03.0.191785670676.issue36966@roundup.psfhosted.org> Message-ID: <1558275911.51.0.646649492891.issue36966@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:25:41 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 19 May 2019 14:25:41 +0000 Subject: [issue36966] Export __VENV_PROMPT__ as environment variable In-Reply-To: <1558275519.03.0.191785670676.issue36966@roundup.psfhosted.org> Message-ID: <1558275941.44.0.827838906748.issue36966@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- superseder: -> Set a environment variable for venv prompt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:26:29 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 19 May 2019 14:26:29 +0000 Subject: [issue35328] Set a environment variable for venv prompt In-Reply-To: <1543335149.71.0.788709270274.issue35328@psf.upfronthosting.co.za> Message-ID: <1558275989.22.0.658261877595.issue35328@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:26:40 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 19 May 2019 14:26:40 +0000 Subject: [issue27141] Fix collections.UserList shallow copy In-Reply-To: <1464384542.41.0.303372176211.issue27141@psf.upfronthosting.co.za> Message-ID: <1558276000.94.0.861601748413.issue27141@roundup.psfhosted.org> miss-islington added the comment: New changeset 3645d29a1dc2102fdb0f5f0c0129ff2295bcd768 by Miss Islington (bot) in branch '3.7': bpo-27141: Fix collections.UserList and UserDict shallow copy. (GH-4094) https://github.com/python/cpython/commit/3645d29a1dc2102fdb0f5f0c0129ff2295bcd768 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:27:04 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 19 May 2019 14:27:04 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1558276024.08.0.974905194437.issue36964@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +vinay.sajip versions: +Python 3.8 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 10:28:21 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 19 May 2019 14:28:21 +0000 Subject: [issue35328] Set a environment variable for venv prompt In-Reply-To: <1543335149.71.0.788709270274.issue35328@psf.upfronthosting.co.za> Message-ID: <1558276101.61.0.89797595321.issue35328@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Is anybody still working on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 11:56:27 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 19 May 2019 15:56:27 +0000 Subject: [issue29183] Unintuitive error handling in wsgiref when a crash happens in write() or close() In-Reply-To: <1483731701.21.0.630358100063.issue29183@psf.upfronthosting.co.za> Message-ID: <1558281387.15.0.960193673865.issue29183@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13334 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 11:56:32 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 May 2019 15:56:32 +0000 Subject: [issue29183] Unintuitive error handling in wsgiref when a crash happens in write() or close() In-Reply-To: <1483731701.21.0.630358100063.issue29183@psf.upfronthosting.co.za> Message-ID: <1558281392.08.0.0111417407556.issue29183@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 7c59362a15dfce538512ff1fce4e07d33a925cfb by Berker Peksag in branch 'master': bpo-29183: Fix double exceptions in wsgiref.handlers.BaseHandler (GH-12914) https://github.com/python/cpython/commit/7c59362a15dfce538512ff1fce4e07d33a925cfb ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 11:58:29 2019 From: report at bugs.python.org (Anthony Sottile) Date: Sun, 19 May 2019 15:58:29 +0000 Subject: [issue35894] Apparent regression in 3.8-dev: 'TypeError: required field "type_ignores" missing from Module' In-Reply-To: <1549256747.48.0.424452103214.issue35894@roundup.psfhosted.org> Message-ID: <1558281509.74.0.0524696846419.issue35894@roundup.psfhosted.org> Anthony Sottile added the comment: there's other optional fields in the ast, type ignores don't seem essential to the `Module`, could those be made optional as well? ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 12:23:51 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 19 May 2019 16:23:51 +0000 Subject: [issue36691] SystemExit & sys.exit : Allow both exit status and message In-Reply-To: <1555851872.77.0.954312917312.issue36691@roundup.psfhosted.org> Message-ID: <1558283031.7.0.691329341977.issue36691@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 12:28:41 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 May 2019 16:28:41 +0000 Subject: [issue29183] Unintuitive error handling in wsgiref when a crash happens in write() or close() In-Reply-To: <1483731701.21.0.630358100063.issue29183@psf.upfronthosting.co.za> Message-ID: <1558283321.28.0.410998068865.issue29183@roundup.psfhosted.org> Berker Peksag added the comment: New changeset f393e8eb463d60ce559982613429568c518ab8d9 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-29183: Fix double exceptions in wsgiref.handlers.BaseHandler (GH-12914) https://github.com/python/cpython/commit/f393e8eb463d60ce559982613429568c518ab8d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 12:29:18 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 May 2019 16:29:18 +0000 Subject: [issue29183] Unintuitive error handling in wsgiref when a crash happens in write() or close() In-Reply-To: <1483731701.21.0.630358100063.issue29183@psf.upfronthosting.co.za> Message-ID: <1558283358.83.0.70561790955.issue29183@roundup.psfhosted.org> Change by Berker Peksag : ---------- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 12:49:15 2019 From: report at bugs.python.org (David Lord) Date: Sun, 19 May 2019 16:49:15 +0000 Subject: [issue35894] Apparent regression in 3.8-dev: 'TypeError: required field "type_ignores" missing from Module' In-Reply-To: <1549256747.48.0.424452103214.issue35894@roundup.psfhosted.org> Message-ID: <1558284555.64.0.693564789024.issue35894@roundup.psfhosted.org> Change by David Lord : ---------- nosy: +davidism _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 12:51:59 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 May 2019 16:51:59 +0000 Subject: [issue36957] Speed up math.isqrt In-Reply-To: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> Message-ID: <1558284719.17.0.771177973586.issue36957@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset 5c08ce9bf712acbb3f05a3a57baf51fcb534cdf0 by Mark Dickinson in branch 'master': bpo-36957: Speed up math.isqrt (#13405) https://github.com/python/cpython/commit/5c08ce9bf712acbb3f05a3a57baf51fcb534cdf0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 12:53:34 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 May 2019 16:53:34 +0000 Subject: [issue36957] Speed up math.isqrt In-Reply-To: <1558194226.75.0.887951661142.issue36957@roundup.psfhosted.org> Message-ID: <1558284814.68.0.614785183565.issue36957@roundup.psfhosted.org> Mark Dickinson added the comment: Calling this done for now. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 13:13:23 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 19 May 2019 17:13:23 +0000 Subject: [issue36759] datetime: astimezone() results in OSError: [Errno 22] Invalid argument In-Reply-To: <1556624186.01.0.847614978011.issue36759@roundup.psfhosted.org> Message-ID: <1558286003.36.0.841027873518.issue36759@roundup.psfhosted.org> SilentGhost added the comment: I'm going to close this issue as a duplicate of #29097. If you're still experience this problem on python3.7, please re-open. ---------- resolution: -> duplicate stage: -> resolved status: pending -> closed superseder: -> [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 13:57:39 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sun, 19 May 2019 17:57:39 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1558288659.14.0.0377227665281.issue21315@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +13335 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 14:23:35 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 19 May 2019 18:23:35 +0000 Subject: [issue36962] Cant sort ModuleInfo instances In-Reply-To: <1558235917.88.0.227465723782.issue36962@roundup.psfhosted.org> Message-ID: <1558290215.67.0.0538920277109.issue36962@roundup.psfhosted.org> Eric V. Smith added the comment: I agree. Sorry, BTaskaya, but I just don't think the benefit of this change is worth the disruption. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 15:09:00 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 19 May 2019 19:09:00 +0000 Subject: [issue35121] Cookie domain check returns incorrect results In-Reply-To: <1540968768.96.0.788709270274.issue35121@psf.upfronthosting.co.za> Message-ID: <1558292940.61.0.375375391542.issue35121@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +13336 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 15:22:43 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 19 May 2019 19:22:43 +0000 Subject: [issue35647] Cookie path check returns incorrect results In-Reply-To: <1546502396.67.0.243403156352.issue35647@roundup.psfhosted.org> Message-ID: <1558293763.96.0.342599645764.issue35647@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +13337 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 15:56:02 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 19 May 2019 19:56:02 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558295762.06.0.127352834967.issue36721@roundup.psfhosted.org> Ned Deily added the comment: I don't understand the need for this. AFAICT, the purpose of python-config is to provide configuration info for embedding Python (Issue1161914 and https://docs.python.org/3/extending/embedding.html#compiling-and-linking-under-unix-like-systems). At some point, a pkg-config template was added (in Issue3585) but it seems to duplicate the purpose of python-config and thus is also intended for use in embedding Python (although we don't seem to document it, it is familiar to users of automake). I don't know what other purposes either python-config or the pkg-config template serve other than for embedding. AFAIK, they should not be used for building C extension modules. But admittedly this area is not well-documented. In any case, I think pkg-config and python-config should return the same values for similar parameters. Anyone else have an opinion? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 16:57:31 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 19 May 2019 20:57:31 +0000 Subject: [issue35814] Syntax quirk with variable annotations In-Reply-To: <1548308739.94.0.144807070146.issue35814@roundup.psfhosted.org> Message-ID: <1558299451.36.0.722479358077.issue35814@roundup.psfhosted.org> Ivan Levkivskyi added the comment: Is PEP the best place for such updates? Maybe we can add a `versionchanged` note in https://docs.python.org/3/reference/simple_stmts.html#annotated-assignment-statements instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 17:08:36 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 19 May 2019 21:08:36 +0000 Subject: [issue36881] isinstance raises TypeError for metaclass with metaclass=ABCMeta In-Reply-To: <1557541744.61.0.162387429511.issue36881@roundup.psfhosted.org> Message-ID: <1558300116.68.0.233547706788.issue36881@roundup.psfhosted.org> Ivan Levkivskyi added the comment: I think this is related to how `__subclasscheck__` is implemented in `ABCMeta`. I just checked this also happens in Python 3.6 (i.e. it is not something specific to the C version introduced in Python 3.7). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 17:20:23 2019 From: report at bugs.python.org (Geoff Shannon) Date: Sun, 19 May 2019 21:20:23 +0000 Subject: [issue22865] Document how to make pty.spawn not copy data In-Reply-To: <1415901686.09.0.50650588621.issue22865@psf.upfronthosting.co.za> Message-ID: <1558300823.94.0.850153711812.issue22865@roundup.psfhosted.org> Geoff Shannon added the comment: @martin.panter I removed the mention of inserting null bytes and restricted the documentation updates to more fully documenting the current behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 17:24:06 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sun, 19 May 2019 21:24:06 +0000 Subject: [issue36967] Eliminate unnecessary check in _strptime when determining AM/PM Message-ID: <1558301046.43.0.242836736511.issue36967@roundup.psfhosted.org> New submission from Gordon P. Hemsley : Since __calc_am_pm() explicitly limits self.am_pm to 2 values, there are only ever 3 possible values of %p: AM, PM, or blank. Since blank is treated the same as AM, there is only the need to check whether %p is PM. This eliminates an unnecessary comparison and doubly ensures that there is no unhandled case. ---------- messages: 342872 nosy: gphemsley, p-ganssle priority: normal severity: normal status: open title: Eliminate unnecessary check in _strptime when determining AM/PM versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 17:25:46 2019 From: report at bugs.python.org (Daniel Law) Date: Sun, 19 May 2019 21:25:46 +0000 Subject: [issue36968] Top level transient modal windows stopping deiconify on windows 10 Message-ID: <1558301146.73.0.73309397079.issue36968@roundup.psfhosted.org> New submission from Daniel Law : python 3.6 and also found it in 3.7.3, on windows 10. when a main application window built with Tkinter has a modal top level window (transient, grab_set) if it is minimised (which get blocked unless you click show desktop or shake another application around) any and all atempts to reopen or switch to the application again are blocked and the application has to be closed and reopened. gif attached of this in practice. ---------- components: Windows files: arrow_rotate_clockwise_48x48.png messages: 342873 nosy: Daniel Law, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Top level transient modal windows stopping deiconify on windows 10 type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file48337/arrow_rotate_clockwise_48x48.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 17:28:01 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sun, 19 May 2019 21:28:01 +0000 Subject: [issue36967] Eliminate unnecessary check in _strptime when determining AM/PM In-Reply-To: <1558301046.43.0.242836736511.issue36967@roundup.psfhosted.org> Message-ID: <1558301281.94.0.693747865978.issue36967@roundup.psfhosted.org> Change by Gordon P. Hemsley : ---------- keywords: +patch pull_requests: +13338 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 17:29:50 2019 From: report at bugs.python.org (Gordon P. Hemsley) Date: Sun, 19 May 2019 21:29:50 +0000 Subject: [issue36967] Eliminate unnecessary check in _strptime when determining AM/PM In-Reply-To: <1558301046.43.0.242836736511.issue36967@roundup.psfhosted.org> Message-ID: <1558301390.34.0.26227935182.issue36967@roundup.psfhosted.org> Change by Gordon P. Hemsley : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 17:34:15 2019 From: report at bugs.python.org (Daniel Law) Date: Sun, 19 May 2019 21:34:15 +0000 Subject: [issue36968] Top level transient modal windows stopping deiconify on windows 10 In-Reply-To: <1558301146.73.0.73309397079.issue36968@roundup.psfhosted.org> Message-ID: <1558301655.4.0.8592332443.issue36968@roundup.psfhosted.org> Change by Daniel Law : Removed file: https://bugs.python.org/file48337/arrow_rotate_clockwise_48x48.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 17:52:23 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 May 2019 21:52:23 +0000 Subject: [issue34580] sqlite doc: clarify the scope of the context manager In-Reply-To: <1536074196.75.0.56676864532.issue34580@psf.upfronthosting.co.za> Message-ID: <1558302743.59.0.291029446605.issue34580@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 287b84de939db47aa8c6f30734ceb8aba9d1db29 by Berker Peksag (Xtreak) in branch 'master': bpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079) https://github.com/python/cpython/commit/287b84de939db47aa8c6f30734ceb8aba9d1db29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 17:52:39 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 19 May 2019 21:52:39 +0000 Subject: [issue34580] sqlite doc: clarify the scope of the context manager In-Reply-To: <1536074196.75.0.56676864532.issue34580@psf.upfronthosting.co.za> Message-ID: <1558302759.51.0.163959343475.issue34580@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 17:55:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 19 May 2019 21:55:11 +0000 Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za> Message-ID: <1558302911.39.0.147502990663.issue35134@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13340 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 18:11:24 2019 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 19 May 2019 22:11:24 +0000 Subject: [issue35252] test_functools dead code after FIXME In-Reply-To: <1542244463.09.0.788709270274.issue35252@psf.upfronthosting.co.za> Message-ID: <1558303884.31.0.139721564745.issue35252@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset d673810b9d9df6fbd29f5b7db3973d5adae10fd3 by ?ukasz Langa (Lysandros Nikolaou) in branch 'master': bpo-35252: Remove FIXME from test_functools (GH-10551) https://github.com/python/cpython/commit/d673810b9d9df6fbd29f5b7db3973d5adae10fd3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 18:15:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 19 May 2019 22:15:00 +0000 Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za> Message-ID: <1558304100.83.0.251039924432.issue35134@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ed48866c55b8e4ee14faa8b5ad97819e8e74c98b by Victor Stinner in branch 'master': bpo-35134: Split traceback.h header (GH-13430) https://github.com/python/cpython/commit/ed48866c55b8e4ee14faa8b5ad97819e8e74c98b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 18:24:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 19 May 2019 22:24:17 +0000 Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za> Message-ID: <1558304657.28.0.058393559287.issue35134@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13341 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 18:36:50 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 May 2019 22:36:50 +0000 Subject: [issue34580] sqlite doc: clarify the scope of the context manager In-Reply-To: <1536074196.75.0.56676864532.issue34580@psf.upfronthosting.co.za> Message-ID: <1558305410.64.0.623029774833.issue34580@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 18:36:52 2019 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 May 2019 22:36:52 +0000 Subject: [issue34580] sqlite doc: clarify the scope of the context manager In-Reply-To: <1536074196.75.0.56676864532.issue34580@psf.upfronthosting.co.za> Message-ID: <1558305412.03.0.533323944585.issue34580@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 205c1f0e36e00e6e7cb7fbabaab4f52732859f9e by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079) https://github.com/python/cpython/commit/205c1f0e36e00e6e7cb7fbabaab4f52732859f9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 18:55:08 2019 From: report at bugs.python.org (daniel hahler) Date: Sun, 19 May 2019 22:55:08 +0000 Subject: [issue36969] pdb: do_args: display/handle keyword-only arguments Message-ID: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> New submission from daniel hahler : With a program like the following, `args` will not display the keyword-only argument: ``` def f1(arg=None, *, kwonly=None): __import__('pdb').set_trace() f1() ``` ``` (Pdb) args arg = 'arg' kw = 'kw' ``` Related code: https://github.com/python/cpython/blob/5c08ce9bf712acbb3f05a3a57baf51fcb534cdf0/Lib/pdb.py#L1129-L1144 ---------- components: Library (Lib) messages: 342878 nosy: blueyed priority: normal severity: normal status: open title: pdb: do_args: display/handle keyword-only arguments type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 19:35:34 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 19 May 2019 23:35:34 +0000 Subject: [issue36963] PyDict_GetItem SegFaults on simple dictionary lookup when using Ctypes In-Reply-To: <1558241360.13.0.269765861936.issue36963@roundup.psfhosted.org> Message-ID: <1558308934.99.0.186701980233.issue36963@roundup.psfhosted.org> Inada Naoki added the comment: At first glance, you used ctypes.cdll, which releases GIL. But you called Python/C API in extension module. You shouldn't do it. Try ctypes.pydll, which don't release GIL. If it doesn't help you, please continue it in another communities. I don't want to make Issue Tracker as user support forum. > Could you let me know to whom I could reach out for help ? Communities! * Slack: https://pyslackers.com/ * Mailing list: https://mail.python.org/mailman/listinfo/python-list * Stack Overflow: https://stackoverflow.com/questions/tagged/python ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 19:54:37 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sun, 19 May 2019 23:54:37 +0000 Subject: [issue35252] test_functools dead code after FIXME In-Reply-To: <1542244463.09.0.788709270274.issue35252@psf.upfronthosting.co.za> Message-ID: <1558310077.71.0.161989410407.issue35252@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 20:14:19 2019 From: report at bugs.python.org (Larry Hastings) Date: Mon, 20 May 2019 00:14:19 +0000 Subject: [issue36963] PyDict_GetItem SegFaults on simple dictionary lookup when using Ctypes In-Reply-To: <1558241360.13.0.269765861936.issue36963@roundup.psfhosted.org> Message-ID: <1558311259.01.0.932981761673.issue36963@roundup.psfhosted.org> Larry Hastings added the comment: Inada-san, while it is best to not call PyDict_ functions without holding the GIL, it doesn't matter unless one creates a second thread. The GIL doesn't even exist until Python creates a second thread. But, I too don't want bugs.python.org to become a "help people debug their programs" site. Particularly when using ctypes, which crashes a lot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 20:22:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 00:22:35 +0000 Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za> Message-ID: <1558311755.46.0.778816478131.issue35134@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fd1e0e93b15af018184476ea0b3af0eabef37d89 by Victor Stinner in branch 'master': bpo-35134: Register new traceback.h header files (GH-13431) https://github.com/python/cpython/commit/fd1e0e93b15af018184476ea0b3af0eabef37d89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 20:21:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 00:21:50 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558311710.19.0.144144406964.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13342 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 20:26:46 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 00:26:46 +0000 Subject: [issue36951] Wrong types for PyMemberDefs in Objects/typeobject.c In-Reply-To: <1558122654.3.0.508768199462.issue36951@roundup.psfhosted.org> Message-ID: <1558312006.94.0.364282469814.issue36951@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13343 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 20:26:56 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 00:26:56 +0000 Subject: [issue36951] Wrong types for PyMemberDefs in Objects/typeobject.c In-Reply-To: <1558122654.3.0.508768199462.issue36951@roundup.psfhosted.org> Message-ID: <1558312016.35.0.693385073803.issue36951@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13344 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 20:26:38 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 May 2019 00:26:38 +0000 Subject: [issue36951] Wrong types for PyMemberDefs in Objects/typeobject.c In-Reply-To: <1558122654.3.0.508768199462.issue36951@roundup.psfhosted.org> Message-ID: <1558311998.37.0.568714840492.issue36951@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 53d378c81286644138415cb56da52a7351e1a477 by Benjamin Peterson (Zackery Spytz) in branch 'master': closes bpo-36951: Correct some types in the type_members struct in typeobject.c. (GH-13403) https://github.com/python/cpython/commit/53d378c81286644138415cb56da52a7351e1a477 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 20:49:55 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 00:49:55 +0000 Subject: [issue36951] Wrong types for PyMemberDefs in Objects/typeobject.c In-Reply-To: <1558122654.3.0.508768199462.issue36951@roundup.psfhosted.org> Message-ID: <1558313395.62.0.725560189418.issue36951@roundup.psfhosted.org> miss-islington added the comment: New changeset eda691dd9d076e175c396dc6f85dee2795572f6c by Miss Islington (bot) in branch '2.7': closes bpo-36951: Correct some types in the type_members struct in typeobject.c. (GH-13403) https://github.com/python/cpython/commit/eda691dd9d076e175c396dc6f85dee2795572f6c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 20:54:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 00:54:12 +0000 Subject: [issue36951] Wrong types for PyMemberDefs in Objects/typeobject.c In-Reply-To: <1558122654.3.0.508768199462.issue36951@roundup.psfhosted.org> Message-ID: <1558313652.62.0.00929208129388.issue36951@roundup.psfhosted.org> miss-islington added the comment: New changeset 64b0bdba7ee30ecc5c4c5ad46fb6afd6c0ddd487 by Miss Islington (bot) in branch '3.7': closes bpo-36951: Correct some types in the type_members struct in typeobject.c. (GH-13403) https://github.com/python/cpython/commit/64b0bdba7ee30ecc5c4c5ad46fb6afd6c0ddd487 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 21:07:14 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Mon, 20 May 2019 01:07:14 +0000 Subject: [issue36630] failure of test_colors_funcs in test_curses with ncurses 6.1 In-Reply-To: <1555270378.07.0.766030130411.issue36630@roundup.psfhosted.org> Message-ID: <1558314434.95.0.144229726992.issue36630@roundup.psfhosted.org> Jeffrey Kintscher added the comment: The test fails because curses.pair_content(curses.COLOR_PAIRS-1) validates its parameter against the limits for signed short (max 32767) while curses.COLOR_PAIRS-1 has the value 65535. Unfortunately, re-plumbing curses.pair_content() to use signed integers instead of signed shorts and replacing the underlying ncurses API call from pair_content() to extended_pair_content() doesn't fix the problem because extended_pair_content() still fails when passed 65535. Tracing into the ncurses 6.1 source code, I found that start_color() clamps the maximum number of color pairs at SHRT_MAX (32767) regardless of the number of color pairs supported by the terminal. ---------- nosy: +websurfer5 Added file: https://bugs.python.org/file48338/extended_pair_content.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 22:05:41 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 20 May 2019 02:05:41 +0000 Subject: [issue36958] IDLE should print exit message or status if one is provided In-Reply-To: <1558208284.57.0.662861536384.issue36958@roundup.psfhosted.org> Message-ID: <1558317941.95.0.844092110769.issue36958@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +13345 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 22:52:25 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 20 May 2019 02:52:25 +0000 Subject: [issue36958] IDLE should print exit message or status if one is provided In-Reply-To: <1558208284.57.0.662861536384.issue36958@roundup.psfhosted.org> Message-ID: <1558320745.24.0.201710165804.issue36958@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 6d965b39b7a486dd9e96a60b19ee92382d668299 by Terry Jan Reedy in branch 'master': bpo-36958: In IDLE, print exit message (GH-13435) https://github.com/python/cpython/commit/6d965b39b7a486dd9e96a60b19ee92382d668299 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 23:11:58 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 03:11:58 +0000 Subject: [issue36958] IDLE should print exit message or status if one is provided In-Reply-To: <1558208284.57.0.662861536384.issue36958@roundup.psfhosted.org> Message-ID: <1558321918.64.0.306945738028.issue36958@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13346 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 19 23:36:04 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 20 May 2019 03:36:04 +0000 Subject: [issue24653] Mock.assert_has_calls([]) is surprising for users In-Reply-To: <1437126004.09.0.453747784975.issue24653@psf.upfronthosting.co.za> Message-ID: <1558323364.2.0.141702647197.issue24653@roundup.psfhosted.org> Inada Naoki added the comment: I concur with Serhiy. Current document and example describe clearly that this API is for checking inclusion, not equality. Current example: """ >>> mock = Mock(return_value=None) >>> mock(1) >>> mock(2) >>> mock(3) >>> mock(4) >>> calls = [call(2), call(3)] >>> mock.assert_has_calls(calls) >>> calls = [call(4), call(2), call(3)] >>> mock.assert_has_calls(calls, any_order=True) """ Empty list is allowed by same rule. There are no exception. And when people understand this API checks inclusion, calling with empty list doesn't make sense at all. So I don't think it is worth enough. ---------- nosy: +inada.naoki resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 02:31:33 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 20 May 2019 06:31:33 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1558333893.99.0.572348774476.issue22385@roundup.psfhosted.org> Gregory P. Smith added the comment: FYI - micropython added an optional 'sep' second argument to binascii.hexlify() that is a single character separator to insert between every two hex digits. given the #9951 .hex() methods we have everywhere (and corresponding .fromhex), binascii.hexlify is almost a legacy API. (but micropython doesn't have those methods yet). one key difference? hexlify returns the hex value as a bytes rather than a str. just adding a couple of parameters to the hex() method seems fine. a separator string and a number of bytes to separate. yet another minilanguage would be overkill. and confusing in the face of the existing numeric formatting mini language ability to insert , or _ separators every four spaces ala f'{value:_x}'. ---------- stage: -> needs patch type: -> enhancement versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 03:17:08 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 07:17:08 +0000 Subject: [issue36958] IDLE should print exit message or status if one is provided In-Reply-To: <1558208284.57.0.662861536384.issue36958@roundup.psfhosted.org> Message-ID: <1558336628.18.0.293956678381.issue36958@roundup.psfhosted.org> miss-islington added the comment: New changeset 2d94d4f1a5f54f73450d2982eab54a6301741a32 by Miss Islington (bot) in branch '3.7': bpo-36958: In IDLE, print exit message (GH-13435) https://github.com/python/cpython/commit/2d94d4f1a5f54f73450d2982eab54a6301741a32 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 03:18:14 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 20 May 2019 07:18:14 +0000 Subject: [issue36958] IDLE should print exit message or status if one is provided In-Reply-To: <1558208284.57.0.662861536384.issue36958@roundup.psfhosted.org> Message-ID: <1558336694.01.0.58550867846.issue36958@roundup.psfhosted.org> Terry J. Reedy added the comment: Thanks for the report. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 04:10:19 2019 From: report at bugs.python.org (Laurie Opperman) Date: Mon, 20 May 2019 08:10:19 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1558339819.42.0.205024508385.issue36964@roundup.psfhosted.org> Laurie Opperman added the comment: > Furthermore I do not understand why the simlink is created. I suppose that `python3` is already on the `PATH`, so what's the purpose of simlink? On machines with multiple Python installs (eg Python 3.6 and Python 3.7, or a distributed Python 3.7 and a user-built Python 3.7), `python3` from PATH may refer to the incorrect installed version. Having a symlink to the the Python executable which built the environment (by default; `--copies` overcomes this) forces an executable. This `python3` symlink still makes it distributable to other machines on the same platform anyway: `/usr/bin/python3` should always be available on other distributions with Python installed normally, and Windows copies the Python executable anyway AFAIK. Across-platform is likely not going to work anyway: it's likely that your virtual environment will contain platform-specific installations of the packages, meaning they won't work on other platforms. If you just want Linux/MacOS portability, check out the Pex project. I agree with VIRTUAL_ENV being relative however ---------- nosy: +Epic_Wink _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 04:40:40 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 20 May 2019 08:40:40 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions Message-ID: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> New submission from Jeroen Demeyer : As preparation for PEP 590, rename _PyObject_FastCallKeywords -> _PyObject_Vectorcall _PyObject_FastCallDict -> _PyObject_VectorcallDict ---------- components: Interpreter Core messages: 342892 nosy: Mark.Shannon, jdemeyer, petr.viktorin priority: normal severity: normal status: open title: Rename _PyObject_FastCall functions type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 04:47:48 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 20 May 2019 08:47:48 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558342068.07.0.900725102925.issue36970@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13347 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 04:50:15 2019 From: report at bugs.python.org (Stefan Krah) Date: Mon, 20 May 2019 08:50:15 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558342215.3.0.486946258537.issue36970@roundup.psfhosted.org> Stefan Krah added the comment: Sorry for the bikeshedding here, but I'll read those function names a lot. Is it possible to rename Vectorcall, which looks good on its own but not inside _PyObject_VectorcallDict()? _PyObject_FastCallDict is much easier to read. Has the PEP been accepted? It still says "Draft". ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 04:52:53 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 20 May 2019 08:52:53 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558342373.38.0.982673499212.issue36970@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Is it possible to rename Vectorcall, which looks good on its own but not inside _PyObject_VectorcallDict()? I don't understand what you mean here? > _PyObject_FastCallDict is much easier to read. You think that "_PyObject_FastCallDict" is easier to read than "_PyObject_VectorcallDict"? I don't think that there is much difference. > Has the PEP been accepted? It still says "Draft". It's very close to being accepted, just some details to work out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 04:52:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 08:52:58 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558342378.39.0.8356135661.issue36970@roundup.psfhosted.org> STINNER Victor added the comment: > Has the PEP been accepted? It still says "Draft". I would prefer to wait until the PEP is accepted before starting to push changes ;-) -- Cython uses the FASTCALL calling convention. Please check with Stefan Behnel to see fix it's ok to "remove" _PyObject_FastCallKeywords and _PyObject_FastCallDict. It would be bad to suddently break all extensions compiled with Cython. Maybe we could add new functions and wait for beta2 or later to remove the old ones. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 04:55:03 2019 From: report at bugs.python.org (Stefan Krah) Date: Mon, 20 May 2019 08:55:03 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558342503.92.0.220167563507.issue36970@roundup.psfhosted.org> Stefan Krah added the comment: > You think that "_PyObject_FastCallDict" is easier to read than "_PyObject_VectorcallDict"? I don't think that there is much difference. Marvellous. How much do you work with the C-API? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 04:56:23 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 20 May 2019 08:56:23 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558342583.53.0.273695404644.issue36970@roundup.psfhosted.org> Jeroen Demeyer added the comment: Now to justify the naming: the plan is to keep the name "fast call" for the PyMethodDef flag METH_FASTCALL but to use the name "vectorcall" in the more general API. I think that's a good idea regardless of PEP 590, as it makes it clear that _PyObject_Vectorcall is useful for more than just METH_FASTCALL functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 05:01:20 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 20 May 2019 09:01:20 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558342880.69.0.743670745486.issue36970@roundup.psfhosted.org> Jeroen Demeyer added the comment: > I would prefer to wait until the PEP is accepted before starting to push changes ;-) I don't think it's wrong to propose and discuss changes already now. With the first beta of Python 3.8 getting close, it's better to be prepared already for the moment that PEP 590 is accepted. > Cython uses the FASTCALL calling convention. Please check with Stefan Behnel to see fix it's ok to "remove" _PyObject_FastCallKeywords and _PyObject_FastCallDict. It would be bad to suddently break all extensions compiled with Cython. I checked, Cython does not use those *generic* _PyObject_FastCall functions. It does use more specialized functions like _PyFunction_FastCallDict and _PyMethodDef_RawFastCallKeywords. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 05:02:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 09:02:12 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558342932.62.0.0995520471926.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6d1c46746e17367caf8a24623cb5c9a9c4e3e036 by Victor Stinner in branch 'master': bpo-36763: Fix Python preinitialization (GH-13432) https://github.com/python/cpython/commit/6d1c46746e17367caf8a24623cb5c9a9c4e3e036 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 05:07:52 2019 From: report at bugs.python.org (Stefan Krah) Date: Mon, 20 May 2019 09:07:52 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558343272.44.0.942866019854.issue36970@roundup.psfhosted.org> Stefan Krah added the comment: It is one thing to name something __vectorcall, and quite another to mix camel and normal case. When I'm scanning the code very quickly, I initially parse _PyObject_VectorcallDict as PyObject_VectorallDict or_PyObject_Vector_callDict. >From the perspective of reading, it is one of the most obnoxious names I've seen in the Python code base. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 05:18:31 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 20 May 2019 09:18:31 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558343911.72.0.636601850777.issue36970@roundup.psfhosted.org> Jeroen Demeyer added the comment: > From the perspective of reading, it is one of the most obnoxious names I've seen in the Python code base. PyObject_Vectorcall() is the name in PEP 590, so if you want to change it, better write to python-dev about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 05:21:53 2019 From: report at bugs.python.org (Stefan Krah) Date: Mon, 20 May 2019 09:21:53 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558344113.02.0.860365372575.issue36970@roundup.psfhosted.org> Stefan Krah added the comment: Only people with very much time on their hands have the luxury to discuss changes like this on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 05:22:58 2019 From: report at bugs.python.org (Stefan Krah) Date: Mon, 20 May 2019 09:22:58 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558344178.96.0.0260836930259.issue36970@roundup.psfhosted.org> Change by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 05:23:41 2019 From: report at bugs.python.org (Stefan Krah) Date: Mon, 20 May 2019 09:23:41 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558344221.94.0.99399394089.issue36970@roundup.psfhosted.org> Stefan Krah added the comment: Also, thank you for lecturing a core dev again. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 05:23:58 2019 From: report at bugs.python.org (Stefan Krah) Date: Mon, 20 May 2019 09:23:58 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558344238.33.0.282967476611.issue36970@roundup.psfhosted.org> Change by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 08:02:21 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 12:02:21 +0000 Subject: [issue35721] _UnixSubprocessTransport leaks socket pair if Popen fails In-Reply-To: <1547234691.74.0.652164571217.issue35721@roundup.psfhosted.org> Message-ID: <1558353741.92.0.499923226398.issue35721@roundup.psfhosted.org> miss-islington added the comment: New changeset 9932fd91e878b740704ff599522e945a4bbe2ae1 by Miss Islington (bot) (Niklas Fiekas) in branch 'master': bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails (GH-11553) https://github.com/python/cpython/commit/9932fd91e878b740704ff599522e945a4bbe2ae1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 08:02:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 12:02:32 +0000 Subject: [issue35721] _UnixSubprocessTransport leaks socket pair if Popen fails In-Reply-To: <1547234691.74.0.652164571217.issue35721@roundup.psfhosted.org> Message-ID: <1558353752.93.0.39759188727.issue35721@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13348 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 08:03:03 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 20 May 2019 12:03:03 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558353783.06.0.31714134561.issue36721@roundup.psfhosted.org> Miro Hron?ok added the comment: As a note, waf seems to use python3-config for both embedded and extension modules. Currently, embedded is broken. See for example https://bugzilla.redhat.com/show_bug.cgi?id=1711638 ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 08:08:28 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 20 May 2019 12:08:28 +0000 Subject: [issue29883] asyncio: Windows Proactor Event Loop UDP Support In-Reply-To: <1490210881.18.0.553215827239.issue29883@psf.upfronthosting.co.za> Message-ID: <1558354108.8.0.410133226815.issue29883@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13349 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 08:36:01 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 12:36:01 +0000 Subject: [issue35721] _UnixSubprocessTransport leaks socket pair if Popen fails In-Reply-To: <1547234691.74.0.652164571217.issue35721@roundup.psfhosted.org> Message-ID: <1558355761.6.0.583233447553.issue35721@roundup.psfhosted.org> miss-islington added the comment: New changeset 3887932e1099931801876d53d05e25a43c3473b7 by Miss Islington (bot) in branch '3.7': bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails (GH-11553) https://github.com/python/cpython/commit/3887932e1099931801876d53d05e25a43c3473b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 08:36:41 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 20 May 2019 12:36:41 +0000 Subject: [issue35721] _UnixSubprocessTransport leaks socket pair if Popen fails In-Reply-To: <1547234691.74.0.652164571217.issue35721@roundup.psfhosted.org> Message-ID: <1558355801.38.0.043003679334.issue35721@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 08:49:57 2019 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Schoentgen?=) Date: Mon, 20 May 2019 12:49:57 +0000 Subject: [issue26185] zipfile.ZipInfo slots can raise unexpected AttributeError In-Reply-To: <1453545713.56.0.930101536202.issue26185@psf.upfronthosting.co.za> Message-ID: <1558356597.01.0.520723487006.issue26185@roundup.psfhosted.org> Change by Micka?l Schoentgen : ---------- pull_requests: +13350 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 10:18:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 14:18:48 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558361928.06.0.058743376251.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13351 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 10:38:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 14:38:53 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558363133.73.0.550385186195.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 425717fee1c72df464c9f85b9a8d32b9197d1035 by Victor Stinner in branch 'master': bpo-36763: Fix encoding/locale tests in test_embed (GH-13443) https://github.com/python/cpython/commit/425717fee1c72df464c9f85b9a8d32b9197d1035 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 10:41:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 14:41:12 +0000 Subject: [issue36763] PEP 587: Rework initialization API to prepare second version of the PEP In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558363272.6.0.196717490654.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13352 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 10:45:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 14:45:31 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558363531.97.0.47077732103.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: PEP 587: Rework initialization API to prepare second version of the PEP -> Implementation of the PEP 587 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 10:52:53 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 20 May 2019 14:52:53 +0000 Subject: [issue35814] Syntax quirk with variable annotations In-Reply-To: <1548308739.94.0.144807070146.issue35814@roundup.psfhosted.org> Message-ID: <1558363973.75.0.827687572505.issue35814@roundup.psfhosted.org> Guido van Rossum added the comment: > Is PEP the best place for such updates? Maybe we can add a `versionchanged` note in https://docs.python.org/3/reference/simple_stmts.html#annotated-assignment-statements instead? We should definitely update the docs, with `versionchanged`. But we should also update the PEP, because the reason this was changed was an interpretation issue in the PEP. This is different from simply changing things in a later version because we've come up with a new idea or we've learned that something was a bad idea. Now that the intention of the PEP has been clarified, the PEP itself ought to be updated with words expressing the clearer version; but because previously the intended syntax wasn't supported, it makes sense to also add a note there that this wasn't implemented correctly until 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 10:53:50 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 20 May 2019 14:53:50 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558364030.71.0.675074410982.issue36906@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +13353 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 10:57:55 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 20 May 2019 14:57:55 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558364275.23.0.958989367737.issue36906@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi @steven.daprano, @gregory.p.smith. I added the first version of my PR for review. One issue with it is that in: def f(): return " foo".dedent() f will have both " foo" and "foo" in its constants even if the first is not used anymore. Removing it requires looping over the code once more while marking the constants seen in a set and I was not sure if this was ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:06:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 15:06:32 +0000 Subject: [issue22865] Document how to make pty.spawn not copy data In-Reply-To: <1415901686.09.0.50650588621.issue22865@psf.upfronthosting.co.za> Message-ID: <1558364792.41.0.396678750613.issue22865@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 522ccef8690970fc4f78f51a3adb995f2547871a by Victor Stinner (Geoff Shannon) in branch 'master': bpo-22865: Expand on documentation for the pty.spawn function (GH-11980) https://github.com/python/cpython/commit/522ccef8690970fc4f78f51a3adb995f2547871a ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:14:09 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 20 May 2019 15:14:09 +0000 Subject: [issue36971] Add subsections in C API "Common Object Structures" page Message-ID: <1558365249.02.0.267009483185.issue36971@roundup.psfhosted.org> New submission from Jeroen Demeyer : The page https://docs.python.org/3/c-api/structures.html could be better structured by arranging the content in sub-sections. ---------- assignee: docs at python components: Documentation messages: 342911 nosy: docs at python, jdemeyer priority: normal severity: normal status: open title: Add subsections in C API "Common Object Structures" page versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:16:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 15:16:54 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558365414.4.0.00598474658106.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0f72147ce2b3d65235b41eddc6a57be40237b5c7 by Victor Stinner in branch 'master': bpo-36763: Fix _PyRuntime.preconfig.coerce_c_locale (GH-13444) https://github.com/python/cpython/commit/0f72147ce2b3d65235b41eddc6a57be40237b5c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:18:56 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 20 May 2019 15:18:56 +0000 Subject: [issue35894] Apparent regression in 3.8-dev: 'TypeError: required field "type_ignores" missing from Module' In-Reply-To: <1549256747.48.0.424452103214.issue35894@roundup.psfhosted.org> Message-ID: <1558365536.9.0.636604718348.issue35894@roundup.psfhosted.org> Guido van Rossum added the comment: > [T]here's other optional fields in the ast, type ignores don't seem essential to the `Module`, could those be made optional as well? I think you're referring to the `?` syntax in `Python.asdl`. But the `type_ignores` attribute is already a list (using `*`) and AFAICT you cannot combine `?` and `*`. You have to provide an empty list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:21:12 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 May 2019 15:21:12 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558365672.86.0.826680386768.issue36906@roundup.psfhosted.org> Serhiy Storchaka added the comment: Perform the optimization at the AST level, not in the peepholer. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:26:21 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 20 May 2019 15:26:21 +0000 Subject: [issue36971] Add subsections in C API "Common Object Structures" page In-Reply-To: <1558365249.02.0.267009483185.issue36971@roundup.psfhosted.org> Message-ID: <1558365981.7.0.238870475735.issue36971@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13354 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:26:36 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 20 May 2019 15:26:36 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1558364275.23.0.958989367737.issue36906@roundup.psfhosted.org> Message-ID: <20190520152628.GE4221@ando.pearwood.info> Steven D'Aprano added the comment: > One issue with it is that in: > def f(): > return " foo".dedent() > f will have both " foo" and "foo" in its constants even if the first is not used anymore. That seems to be what happens with other folded constants: py> def f(): ... return 99.0 + 0.9 ... py> f.__code__.co_consts (None, 99.0, 0.9, 99.9) so I guess that this is okay for a first draft. One difference is that strings tend to be much larger than floats, so this will waste more memory. We ought to consider removing unused constants at some point. (But not me, sorry, I don't have enough C.) > Removing it requires looping over the code once more while marking > the constants seen in a set and I was not sure if this was ok. That should probably be a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:28:43 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 20 May 2019 15:28:43 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <20190520152628.GE4221@ando.pearwood.info> Message-ID: <20190520152837.GF4221@ando.pearwood.info> Steven D'Aprano added the comment: Serhiy's message crossed with mine -- you should probably listen to him over me :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:30:51 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 20 May 2019 15:30:51 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558366251.47.0.72598738629.issue36906@roundup.psfhosted.org> R?mi Lapeyre added the comment: > Perform the optimization at the AST level, not in the peepholer. Thanks, this makes more sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:31:39 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 20 May 2019 15:31:39 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558366299.65.0.0729907392163.issue36906@roundup.psfhosted.org> R?mi Lapeyre added the comment: > Serhiy's message crossed with mine. And mine crossed with yours, sorry. I will update my PR shortly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:32:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 15:32:22 +0000 Subject: [issue26122] Isolated mode doesn't ignore PYTHONHASHSEED In-Reply-To: <1452862094.75.0.964095204421.issue26122@psf.upfronthosting.co.za> Message-ID: <1558366342.35.0.424253452367.issue26122@roundup.psfhosted.org> STINNER Victor added the comment: > Is there a way to fix the issue in 3.7 and earlier? We might consider it a security issue. Hum, Python 3.7 is fixed as well. At least, in the 3.7 dev branch. Fixed seed: vstinner at apu$ PYTHONHASHSEED=42 ./python -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} vstinner at apu$ PYTHONHASHSEED=42 ./python -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} vstinner at apu$ PYTHONHASHSEED=42 ./python -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} vstinner at apu$ PYTHONHASHSEED=42 ./python -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} Random seed: vstinner at apu$ PYTHONHASHSEED=42 ./python -I -c 'print(set("abcdefgh"))' {'b', 'e', 'd', 'f', 'g', 'c', 'a', 'h'} vstinner at apu$ PYTHONHASHSEED=42 ./python -I -c 'print(set("abcdefgh"))' {'d', 'g', 'e', 'b', 'h', 'f', 'a', 'c'} vstinner at apu$ PYTHONHASHSEED=42 ./python -I -c 'print(set("abcdefgh"))' {'e', 'b', 'g', 'c', 'a', 'h', 'f', 'd'} vstinner at apu$ PYTHONHASHSEED=42 ./python -I -c 'print(set("abcdefgh"))' {'c', 'd', 'a', 'g', 'f', 'e', 'h', 'b'} -- Python 3.6 has the bug: vstinner at apu$ PYTHONHASHSEED=42 python3.6 -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} vstinner at apu$ PYTHONHASHSEED=42 python3.6 -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} vstinner at apu$ PYTHONHASHSEED=42 python3.6 -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} vstinner at apu$ PYTHONHASHSEED=42 python3.6 -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} vstinner at apu$ PYTHONHASHSEED=42 python3.6 -I -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} vstinner at apu$ PYTHONHASHSEED=42 python3.6 -I -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} vstinner at apu$ PYTHONHASHSEED=42 python3.6 -I -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} vstinner at apu$ PYTHONHASHSEED=42 python3.6 -I -c 'print(set("abcdefgh"))' {'g', 'e', 'a', 'b', 'c', 'f', 'h', 'd'} ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:33:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 20 May 2019 15:33:42 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558366422.08.0.311812098019.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: > So where do we go from here? I propose to only add attribute if it's supported. If nobody comes with a fix, I would prefer to remove the feature to repair the AIX buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:38:16 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 20 May 2019 15:38:16 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1558366696.43.0.573267692546.issue25988@roundup.psfhosted.org> Josh Rosenberg added the comment: mbussonn: Your new PR looks like it's related to #36953 ("Remove collections ABCs?"), not this issue specifically. Can you withdraw/reissue attached to the correct issue? ---------- nosy: +josh.r, mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:40:49 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 20 May 2019 15:40:49 +0000 Subject: [issue34700] typing.get_type_hints doesn't know about typeshed In-Reply-To: <1537042200.54.0.956365154283.issue34700@psf.upfronthosting.co.za> Message-ID: <1558366849.65.0.778578111867.issue34700@roundup.psfhosted.org> Guido van Rossum added the comment: Yeah, the Sphinx use case is somewhat different from the originally envisioned use case for get_type_hints(). Possibly Sphinx could just directly inspect __annotations__ rather than calling get_type_hints()? I'm not sure if there's any situation where it would need the things that get_type_hints() is supposed to take care of. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 11:51:44 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 20 May 2019 15:51:44 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1558367504.48.0.139073291798.issue36792@roundup.psfhosted.org> Steve Dower added the comment: I've received a detailed response from the UCRT team, and there are a few pieces here. * the fact that tzname is cached in ACP is known and will be fixed * the decoding bug is real, but it's due to the experimental UTF-8 support * the experimental UTF-8 support was enabled because "de_DE" is not a known Windows locale name - try with "de-DE" Perhaps it would be easy to do the replacement of underscores with hyphens on Windows in this function? I think that's safe enough, yes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:02:58 2019 From: report at bugs.python.org (Charlie Clark) Date: Mon, 20 May 2019 16:02:58 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1556973198.72.0.765243261905.issue36792@roundup.psfhosted.org> Message-ID: <1558368178.42.0.113219644374.issue36792@roundup.psfhosted.org> Charlie Clark added the comment: I can confirm that using "de-DE" does indeed avoid the crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:09:29 2019 From: report at bugs.python.org (Paul Dagnelie) Date: Mon, 20 May 2019 16:09:29 +0000 Subject: [issue36972] Add SupportsIndex Message-ID: <1558368569.89.0.17531716566.issue36972@roundup.psfhosted.org> New submission from Paul Dagnelie : In order to allow hex() oct() and bin() to be used on user-defined classes, and to check if they can be used on a class at runtime, a SupportsIndex protocol would be useful to integrate. A PR already exists in the backport repo for this issue: https://github.com/python/typing/pull/630 ---------- components: Library (Lib) messages: 342925 nosy: pcd1193182 priority: normal severity: normal status: open title: Add SupportsIndex type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:19:58 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 20 May 2019 16:19:58 +0000 Subject: [issue26467] Add async magic method support to unittest.mock.Mock In-Reply-To: <1456872706.59.0.97059255221.issue26467@psf.upfronthosting.co.za> Message-ID: <1558369198.32.0.708808845959.issue26467@roundup.psfhosted.org> Lisa Roach added the comment: New changeset 77b3b7701a34ecf6316469e05b79bb91de2addfa by Lisa Roach in branch 'master': bpo-26467: Adds AsyncMock for asyncio Mock library support (GH-9296) https://github.com/python/cpython/commit/77b3b7701a34ecf6316469e05b79bb91de2addfa ---------- nosy: +lisroach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:26:40 2019 From: report at bugs.python.org (Roundup Robot) Date: Mon, 20 May 2019 16:26:40 +0000 Subject: [issue36770] stdlib - shutil.make_archive - add support for different ZIP compression method In-Reply-To: <1556721368.48.0.786007999998.issue36770@roundup.psfhosted.org> Message-ID: <1558369600.15.0.75772854369.issue36770@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +13355 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:27:01 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 20 May 2019 16:27:01 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558369621.17.0.731556061649.issue36906@roundup.psfhosted.org> R?mi Lapeyre added the comment: Thanks @serhiy.storchaka, it's far easier to do here. I pushed the patch to the attached PR. Is there a reason the other optimisations in the Peephole optimizer are not done in the AST? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:30:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 May 2019 16:30:04 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558369804.02.0.304130934834.issue36906@roundup.psfhosted.org> Serhiy Storchaka added the comment: The optimization that can be done in the AST is done in the AST. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:31:38 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 20 May 2019 16:31:38 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1558369898.06.0.341358213381.issue36953@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +13356 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:36:26 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 20 May 2019 16:36:26 +0000 Subject: [issue26467] Add async magic method support to unittest.mock.Mock In-Reply-To: <1456872706.59.0.97059255221.issue26467@psf.upfronthosting.co.za> Message-ID: <1558370186.84.0.417176077669.issue26467@roundup.psfhosted.org> Lisa Roach added the comment: Added and AsyncMock class which supports mocking async magic methods. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:38:57 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 20 May 2019 16:38:57 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1558370337.53.0.394740557294.issue25988@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: -13320 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:39:54 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 20 May 2019 16:39:54 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1558370394.66.0.504130040593.issue25988@roundup.psfhosted.org> Matthias Bussonnier added the comment: mbussonn: Your new PR looks like it's related to #36953 ("Remove collections ABCs?"), not this issue specifically. Can you withdraw/reissue attached to the correct issue? Apologies, I've rebased and updated the issue numbers, not sure how I got the wrong one. I've also unlinked from here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:42:51 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 May 2019 16:42:51 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558370571.06.0.805831845594.issue36906@roundup.psfhosted.org> Serhiy Storchaka added the comment: While the string method works pretty well, I do not think this is the best way. If 98% of multiline string will need deindenting, it is better to do it by default. For those 2% that do not need deintentation, it can be prohibited by adding the backslash followed by a newline at first position (except the start of the string). For example: smile = '''\ XX XX X X XXX X X XX X XX \ ''' Yes, this is breaking change. But we have import from __future__ and FutureWarning. The plan may be: 3.9. Implement "from __future__ import deindent". 3.11. Emit a FutureWarning for multiline literals that will be changed by dedending if "from __future__ import deindent" is not specified. 3.13. Make it the default behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 12:52:15 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 20 May 2019 16:52:15 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558371135.98.0.987849561365.issue36965@roundup.psfhosted.org> Steve Dower added the comment: Is including just "winnt.h" sufficient? It's very hard to tell which Windows headers are "public" vs "internal", but winternl.h is certainly one of the internal ones (according to the big warning comment at the top of the file) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 13:01:10 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 20 May 2019 17:01:10 +0000 Subject: [issue36949] WeakSet.__repr__ and __str__ do not show contents of the set In-Reply-To: <1558111586.51.0.375151811101.issue36949@roundup.psfhosted.org> Message-ID: <1558371670.27.0.91031683177.issue36949@roundup.psfhosted.org> Steve Dower added the comment: New changeset 5ae1c84bcd13b766989fc3f1e1c851e7bd4c1faa by Steve Dower (Batuhan Ta?kaya) in branch 'master': bpo-36949: Implement __repr__ on WeakSet (GH-13415) https://github.com/python/cpython/commit/5ae1c84bcd13b766989fc3f1e1c851e7bd4c1faa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 13:01:28 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 20 May 2019 17:01:28 +0000 Subject: [issue36949] WeakSet.__repr__ and __str__ do not show contents of the set In-Reply-To: <1558111586.51.0.375151811101.issue36949@roundup.psfhosted.org> Message-ID: <1558371688.26.0.312811521699.issue36949@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 13:01:33 2019 From: report at bugs.python.org (Erik Janssens) Date: Mon, 20 May 2019 17:01:33 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558371693.82.0.353781100875.issue36965@roundup.psfhosted.org> Erik Janssens added the comment: including "winnt.h" gives me compilation problems with other undefined types. however, simply including "windows.h" instead of both includes compiles just fine. so maybe that is sufficient ?? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 13:06:20 2019 From: report at bugs.python.org (Paul Dagnelie) Date: Mon, 20 May 2019 17:06:20 +0000 Subject: [issue36972] Add SupportsIndex In-Reply-To: <1558368569.89.0.17531716566.issue36972@roundup.psfhosted.org> Message-ID: <1558371980.14.0.61756457222.issue36972@roundup.psfhosted.org> Change by Paul Dagnelie : ---------- keywords: +patch pull_requests: +13358 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 13:11:39 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 20 May 2019 17:11:39 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558372299.87.0.94534452742.issue36965@roundup.psfhosted.org> Steve Dower added the comment: Some people say "windows.h" is the only one you're ever supposed to include, so if that works best, let's go with that :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 13:13:24 2019 From: report at bugs.python.org (Erik Janssens) Date: Mon, 20 May 2019 17:13:24 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558372404.52.0.271451232645.issue36965@roundup.psfhosted.org> Erik Janssens added the comment: ok, thank you for the advice, I'll keep it in mind and adapt the PR ! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 13:45:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 20 May 2019 17:45:36 +0000 Subject: [issue36973] test_json.test_recursion.TestPyRecursion.test_endless_recursion stack overflow in AMD64 Windows8.1 Non-Debug 3.x Message-ID: <1558374336.39.0.468050668046.issue36973@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : test_json results in stack overflow after the commit to implement __repr__ for weakset. This is very much similar to the one consistently occurring on my inspect module PR in Windows tests only for the past two weeks. My change was in changing inspect module and more specifically in importing ast at the top of inspect module. The relevant commit for buildbot failure is in implementing __repr__ for weakset. Buildbot error : https://buildbot.python.org/all/#/builders/12/builds/2497 Error in my PR that is consistent and same : https://ci.appveyor.com/project/python/cpython/builds/24631185#L1547 ---------- components: Tests messages: 342937 nosy: steve.dower, vstinner, xtreak priority: normal severity: normal status: open title: test_json.test_recursion.TestPyRecursion.test_endless_recursion stack overflow in AMD64 Windows8.1 Non-Debug 3.x type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 14:01:27 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 20 May 2019 18:01:27 +0000 Subject: [issue36974] Implement PEP 590 Message-ID: <1558375287.14.0.518510919121.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- components: Interpreter Core nosy: Mark.Shannon, jdemeyer, petr.viktorin priority: normal severity: normal status: open title: Implement PEP 590 type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 14:02:45 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 20 May 2019 18:02:45 +0000 Subject: [issue36974] Implement PEP 590 Message-ID: <1558375365.87.0.355197191793.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13359 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 14:11:23 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 20 May 2019 18:11:23 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1558370571.06.0.805831845594.issue36906@roundup.psfhosted.org> Message-ID: <20190520181116.GG4221@ando.pearwood.info> Steven D'Aprano added the comment: > While the string method works pretty well, I do not think this is the best way. Regardless of what we do for literals, a dedent() method will help for non-literals, so I think that this feature should go in even if we intend to change the default behaviour in the future: > 3.9. Implement "from __future__ import deindent". > 3.11. Emit a FutureWarning for multiline literals that will be changed by dedending if "from __future__ import deindent" is not specified. > 3.13. Make it the default behavior. And that gives us plenty of time to decide whether or not making it the default, rather than an explicit choice, is the right thing to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 14:13:43 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Mon, 20 May 2019 18:13:43 +0000 Subject: [issue36975] csv: undocumented UnicodeDecodeError on malformed file Message-ID: <1558376023.37.0.392859277.issue36975@roundup.psfhosted.org> New submission from alter-bug-tracer : UnicodeDecodeError is thrown instead of csv.Error when parsing malformed inputs. Examples: 1. file0 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 0: invalid continuation byte Traceback (most recent call last): File "csv_parser.py", line 6, in for row in reader: File "/usr/local/lib/python3.8/csv.py", line 111, in __next__ row = next(self.reader) File "/usr/local/lib/python3.8/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) 2. file1 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 51: invalid start byte Traceback (most recent call last): File "csv_parser.py", line 6, in for row in reader: File "/usr/local/lib/python3.8/csv.py", line 110, in __next__ self.fieldnames File "/usr/local/lib/python3.8/csv.py", line 97, in fieldnames self._fieldnames = next(self.reader) File "/usr/local/lib/python3.8/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) (file0, file1 and csv_parser.py attached) ---------- files: csv.zip messages: 342939 nosy: alter-bug-tracer priority: normal severity: normal status: open title: csv: undocumented UnicodeDecodeError on malformed file type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file48339/csv.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 14:19:58 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Mon, 20 May 2019 18:19:58 +0000 Subject: [issue36976] email: AttributeError Message-ID: <1558376398.04.0.740342940317.issue36976@roundup.psfhosted.org> New submission from alter-bug-tracer : The 'lower' method is called on a Header object when trying to parse the attached file. Code: import email import sys with open(sys.argv[1], "rb") as f: msg = email.message_from_binary_file(f) print (len(msg)) Traceback: msg = email.message_from_binary_file(f) File "/usr/lib/python3.5/email/__init__.py", line 62, in message_from_binary_file return BytesParser(*args, **kws).parse(fp) File "/usr/lib/python3.5/email/parser.py", line 110, in parse return self.parser.parse(fp, headersonly) File "/usr/lib/python3.5/email/parser.py", line 57, in parse feedparser.feed(data) File "/usr/lib/python3.5/email/feedparser.py", line 178, in feed self._call_parse() File "/usr/lib/python3.5/email/feedparser.py", line 182, in _call_parse self._parse() File "/usr/lib/python3.5/email/feedparser.py", line 322, in _parsegen if (self._cur.get('content-transfer-encoding', '8bit').lower() AttributeError: 'Header' object has no attribute 'lower' ---------- files: file0.zip messages: 342940 nosy: alter-bug-tracer priority: normal severity: normal status: open title: email: AttributeError type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file48340/file0.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 14:24:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 20 May 2019 18:24:56 +0000 Subject: [issue36976] email: AttributeError In-Reply-To: <1558376398.04.0.740342940317.issue36976@roundup.psfhosted.org> Message-ID: <1558376696.61.0.5809293169.issue36976@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also issue36910 which seems to be similar report on non-ascii Content-Transfer-Encoding which is present in the reported file0 file too. ---------- components: +email nosy: +barry, maxking, msapiro, r.david.murray, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 14:33:56 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Mon, 20 May 2019 18:33:56 +0000 Subject: [issue36976] email: AttributeError In-Reply-To: <1558376398.04.0.740342940317.issue36976@roundup.psfhosted.org> Message-ID: <1558377236.37.0.890141454082.issue36976@roundup.psfhosted.org> alter-bug-tracer added the comment: It is actually the exact same bug. At that time we were not sure if it security related or not, so we disclosed it privately and discussed it with Mark. We were not aware that he has submitted it for us. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 14:49:32 2019 From: report at bugs.python.org (Erik Janssens) Date: Mon, 20 May 2019 18:49:32 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558378172.32.0.627462180995.issue36965@roundup.psfhosted.org> Erik Janssens added the comment: PR has been changed to include "windows.h" ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 15:04:41 2019 From: report at bugs.python.org (Pavel Koneski) Date: Mon, 20 May 2019 19:04:41 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1558379081.9.0.927847851839.issue36919@roundup.psfhosted.org> Pavel Koneski added the comment: If "equivalent input" is acceptable, then it looks like case B: other implementations possibly having different forms of equivalent input. I am going to post this question on python-dev. ---------- versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 15:05:47 2019 From: report at bugs.python.org (Pavel Koneski) Date: Mon, 20 May 2019 19:05:47 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1558379147.15.0.950032610645.issue36919@roundup.psfhosted.org> Change by Pavel Koneski : ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 15:37:10 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 20 May 2019 19:37:10 +0000 Subject: [issue36888] Create a way to check that the parent process is alive for deamonized processes In-Reply-To: <1557588992.87.0.32954176975.issue36888@roundup.psfhosted.org> Message-ID: <1558381030.8.0.631573808819.issue36888@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset c09a9f56c08d80567454cae6f78f738a89e1ae94 by Antoine Pitrou (Thomas Moreau) in branch 'master': bpo-36888: Add multiprocessing.parent_process() (GH-13247) https://github.com/python/cpython/commit/c09a9f56c08d80567454cae6f78f738a89e1ae94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 15:38:32 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 20 May 2019 19:38:32 +0000 Subject: [issue36888] Create a way to check that the parent process is alive for deamonized processes In-Reply-To: <1557588992.87.0.32954176975.issue36888@roundup.psfhosted.org> Message-ID: <1558381112.28.0.82746825018.issue36888@roundup.psfhosted.org> Antoine Pitrou added the comment: Waiting for the next PR now :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 15:45:58 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 20 May 2019 19:45:58 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1558381558.38.0.905969494253.issue36919@roundup.psfhosted.org> Guido van Rossum added the comment: I'm assuming the real issue is wanting to make IronPython pass as much of the CPython test suite as possible. I am okay with interpretation (B) in this case -- I can totally see that other parsing strategies have no use for adding the '\n' character to the end of the string. But I don't want to declare that CPython is wrong to show the '\n' -- it seems a pretty harmless artifact. So fixing the tests to allow it either way sounds good. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 16:00:34 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 20 May 2019 20:00:34 +0000 Subject: [issue36977] SharedMemoryManager should relase its resources when its parent process dies Message-ID: <1558382434.0.0.963288474875.issue36977@roundup.psfhosted.org> New submission from Pierre Glaser : The new multiprocessing.managers.SharedMemoryManager spawns a server that delivers memory segments to a parent Python process. If the parent process terminates unexpectedly, we should now make the manager process notice this termination it using the recent multiprocessing.parent_process object (that comes with a sentinel), and shut it down. ---------- components: Library (Lib) messages: 342948 nosy: pierreglaser, pitrou priority: normal severity: normal status: open title: SharedMemoryManager should relase its resources when its parent process dies _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 16:04:51 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 20 May 2019 20:04:51 +0000 Subject: [issue36977] SharedMemoryManager should relase its resources when its parent process dies In-Reply-To: <1558382434.0.0.963288474875.issue36977@roundup.psfhosted.org> Message-ID: <1558382691.41.0.944122038834.issue36977@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 16:21:56 2019 From: report at bugs.python.org (Pierre Glaser) Date: Mon, 20 May 2019 20:21:56 +0000 Subject: [issue36977] SharedMemoryManager should relase its resources when its parent process dies In-Reply-To: <1558382434.0.0.963288474875.issue36977@roundup.psfhosted.org> Message-ID: <1558383716.88.0.789471013801.issue36977@roundup.psfhosted.org> Change by Pierre Glaser : ---------- keywords: +patch pull_requests: +13360 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 16:27:14 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 20 May 2019 20:27:14 +0000 Subject: [issue23896] lib2to3 doesn't provide a grammar where exec is a function In-Reply-To: <1428587382.51.0.855590572872.issue23896@psf.upfronthosting.co.za> Message-ID: <1558384034.05.0.284990646921.issue23896@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 4011d865d0572a3dd9988f2935cd835cc8fb792a by Guido van Rossum (Batuhan Ta?kaya) in branch 'master': bpo-23896: Add a grammar where exec isn't a stmt (#13272) https://github.com/python/cpython/commit/4011d865d0572a3dd9988f2935cd835cc8fb792a ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 16:27:20 2019 From: report at bugs.python.org (Pavel Koneski) Date: Mon, 20 May 2019 20:27:20 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1558384040.78.0.286073728056.issue36919@roundup.psfhosted.org> Pavel Koneski added the comment: > I'm assuming the real issue is wanting to make IronPython pass as much of the CPython test suite as possible. This is indeed the case. The CPython test suite is invaluable in guiding IronPython development. Most of the time, the tests are pretty good to gloss over implementation artifacts (usually error messages), so that they work for IronPython as well, despite some differences between CPython and IronPython. There are a few cases, however, when the tests expect behavior that is implementation-specific and difficult to match in IronPython, or is proper Python but impossible to match for IronPython. For all such cases I would like to submit patches to the CPython repo, but I am new to this process. Should such case first be reported on bpo, python-dev, or just straight a github PR? Sometimes, by writing additional tests for IronPython we discover what seems as possible bugs in CPython. I was planning to submit reports for them on bpo, assuming this is the proper place to discuss them, but perhaps python-dev is a better place. > So fixing the tests to allow it either way sounds good. A github PR is on its way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 16:27:49 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 20 May 2019 20:27:49 +0000 Subject: [issue23896] lib2to3 doesn't provide a grammar where exec is a function In-Reply-To: <1428587382.51.0.855590572872.issue23896@psf.upfronthosting.co.za> Message-ID: <1558384069.89.0.7244026077.issue23896@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks Batuhan Ta?kaya! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 16:29:04 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 20 May 2019 20:29:04 +0000 Subject: [issue23378] argparse.add_argument action parameter should allow value extend In-Reply-To: <1422886990.52.0.318776752581.issue23378@psf.upfronthosting.co.za> Message-ID: <1558384144.77.0.695824464763.issue23378@roundup.psfhosted.org> Guido van Rossum added the comment: I've felt the need for this myself. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 16:44:15 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 May 2019 20:44:15 +0000 Subject: [issue36952] fileinput input's and Fileinput's bufsize=0 marked for removal in 3.8 In-Reply-To: <1558128316.3.0.00753032861072.issue36952@roundup.psfhosted.org> Message-ID: <1558385055.76.0.637346026628.issue36952@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 1a3faf9d9740a8c7505c61839ef09929a7ff9e35 by Serhiy Storchaka (Matthias Bussonnier) in branch 'master': bpo-36952: Remove the bufsize parameter in fileinput.input(). (GH-13400) https://github.com/python/cpython/commit/1a3faf9d9740a8c7505c61839ef09929a7ff9e35 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 17:01:05 2019 From: report at bugs.python.org (Marco Sulla) Date: Mon, 20 May 2019 21:01:05 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1558386065.39.0.966078453413.issue36964@roundup.psfhosted.org> Marco Sulla added the comment: Well, I didn't know `--copy`. I think I'll use it. :) What about VIRTUAL_ENV="$(dirname "$(dirname "$(readlink -nf "$0")")")"? In `bash` and in `sh` it works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 17:08:17 2019 From: report at bugs.python.org (Marco Sulla) Date: Mon, 20 May 2019 21:08:17 +0000 Subject: [issue36978] `python3 -m pip install` has no `--requirement` option on Windows Message-ID: <1558386497.6.0.534415104881.issue36978@roundup.psfhosted.org> New submission from Marco Sulla : It's really useful and easy to have a requirements.txt. It integrates also with Github, that tells you if you're specifying a version of the library with security issues. I don't understand why this flag is missing in Windows builds. It seems to me not too much difficult to implement. Please? ^^ ---------- components: Library (Lib) messages: 342955 nosy: Marco Sulla priority: normal severity: normal status: open title: `python3 -m pip install` has no `--requirement` option on Windows versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 17:32:36 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 20 May 2019 21:32:36 +0000 Subject: [issue36969] pdb: do_args: display/handle keyword-only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558387956.29.0.574040397585.issue36969@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +13361 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 17:40:34 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Mon, 20 May 2019 21:40:34 +0000 Subject: [issue36630] failure of test_colors_funcs in test_curses with ncurses 6.1 In-Reply-To: <1555270378.07.0.766030130411.issue36630@roundup.psfhosted.org> Message-ID: <1558388434.32.0.998661902738.issue36630@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I posted a bug report to the bug-ncurses mailing list: https://lists.gnu.org/archive/html/bug-ncurses/2019-05/msg00022.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 17:48:43 2019 From: report at bugs.python.org (Chris Hargreaves) Date: Mon, 20 May 2019 21:48:43 +0000 Subject: [issue36979] ncurses extension uses wrong include path Message-ID: <1558388923.16.0.697144008722.issue36979@roundup.psfhosted.org> New submission from Chris Hargreaves : This is similar to: https://bugs.python.org/issue28190 Not cross-compiling, but using a different ncurses version than is provided under /usr/include/ncursesw Specifying CPPFLAGS to have "-I/path/to/ncurses/include" does not override the "/usr/include/ncursesw" in setup.py if curses_library == 'ncursesw': curses_defines.append(('HAVE_NCURSESW', '1')) if not cross_compiling: curses_includes.append('/usr/include/ncursesw') Python 2.7.x does not have this issue, but 3.6.x and 3.7.x do. 2 and 3 have different ways of setting up the include path for curses when building the extension. In my case, removing the curses_include.append from setup.py results in a working extension. It probably makes sense that Extension(include_dirs=) take priority over Python build CPPFLAGS, setup.py may need to be more cautious about adding the ncurses include path. Only tested in 2.7, 3.6, 3.7. ---------- components: Build, Library (Lib) messages: 342957 nosy: chargr priority: normal severity: normal status: open title: ncurses extension uses wrong include path type: compile error versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 18:08:42 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 20 May 2019 22:08:42 +0000 Subject: [issue36969] pdb: do_args: display/handle keyword-only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558390122.79.0.206828422263.issue36969@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Notice that pdb also does not handle correctly PEP570: def f1(x,/,arg=None, *, kwonly=None): breakpoint() f1(3) -> breakpoint() (Pdb) args x = 3 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 18:17:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 20 May 2019 22:17:33 +0000 Subject: [issue36969] pdb: do_args: display/handle keyword-only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558390653.08.0.595479953801.issue36969@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset bf457c7d8224179a023957876e757f2a7ffc3d9d by Pablo Galindo (R?mi Lapeyre) in branch 'master': bpo-36969: Make PDB args command display keyword only arguments (GH-13452) https://github.com/python/cpython/commit/bf457c7d8224179a023957876e757f2a7ffc3d9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 18:18:02 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 22:18:02 +0000 Subject: [issue36969] pdb: do_args: display/handle keyword-only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558390682.12.0.00818723776696.issue36969@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13362 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 18:20:11 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 20 May 2019 22:20:11 +0000 Subject: [issue36969] pdb: do_args: display/handle keyword-only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558390811.71.0.46408349544.issue36969@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: R?mi, could you do a PR addressing co_posonlyargcount? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 18:21:21 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 20 May 2019 22:21:21 +0000 Subject: [issue36969] pdb: do_args: display/handle keyword-only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558390881.0.0.614032869408.issue36969@roundup.psfhosted.org> R?mi Lapeyre added the comment: > R?mi, could you do a PR addressing co_posonlyargcount? Of course, should I open a new PR or post a patch to be added to a current PR? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 18:29:12 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 20 May 2019 22:29:12 +0000 Subject: [issue31779] assertion failures and a crash when using an uninitialized struct.Struct object In-Reply-To: <1507892060.42.0.213398074469.issue31779@psf.upfronthosting.co.za> Message-ID: <1558391352.59.0.440345514485.issue31779@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 18:33:15 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 20 May 2019 22:33:15 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558391595.54.0.762372624412.issue36906@roundup.psfhosted.org> Gregory P. Smith added the comment: Agreed, I'm in favor of going forward with this .dedent() optimization approach today. If we were to attempt a default indented multi-line str and bytes literal behavior change in the future (a much harder decision to make as it is a breaking change), that is its own issue and probably PEP worthy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 18:34:26 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 20 May 2019 22:34:26 +0000 Subject: [issue36969] pdb: do_args: display/handle keyword-only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558391666.91.0.959200586288.issue36969@roundup.psfhosted.org> miss-islington added the comment: New changeset 50b3f205d82d88eec69f18a0ad4bb2440ba73501 by Miss Islington (bot) in branch '3.7': bpo-36969: Make PDB args command display keyword only arguments (GH-13452) https://github.com/python/cpython/commit/50b3f205d82d88eec69f18a0ad4bb2440ba73501 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 18:45:08 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 20 May 2019 22:45:08 +0000 Subject: [issue35563] Doc: warnings.rst - add links to references In-Reply-To: <1545503608.31.0.0770528567349.issue35563@roundup.psfhosted.org> Message-ID: <1558392308.69.0.406171046788.issue35563@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 6220c02e09e9f3a7458d32ad774ada0ba1571cb8 by Cheryl Sabella in branch 'master': bpo-35563: Add reference links to warnings.rst (GH-11289) https://github.com/python/cpython/commit/6220c02e09e9f3a7458d32ad774ada0ba1571cb8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 18:45:38 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 20 May 2019 22:45:38 +0000 Subject: [issue35563] Doc: warnings.rst - add links to references In-Reply-To: <1545503608.31.0.0770528567349.issue35563@roundup.psfhosted.org> Message-ID: <1558392338.81.0.626912687282.issue35563@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 19:09:18 2019 From: report at bugs.python.org (Paul Monson) Date: Mon, 20 May 2019 23:09:18 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1558393758.5.0.600189202497.issue36511@roundup.psfhosted.org> Change by Paul Monson : ---------- pull_requests: +13363 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 19:41:22 2019 From: report at bugs.python.org (Geoff Shannon) Date: Mon, 20 May 2019 23:41:22 +0000 Subject: [issue22865] Document how to make pty.spawn not copy data In-Reply-To: <1415901686.09.0.50650588621.issue22865@psf.upfronthosting.co.za> Message-ID: <1558395682.25.0.772049352247.issue22865@roundup.psfhosted.org> Change by Geoff Shannon : ---------- pull_requests: +13364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 19:55:50 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 20 May 2019 23:55:50 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558396550.01.0.316041746334.issue36906@roundup.psfhosted.org> Matthias Bussonnier added the comment: I've tried a bit PR 13455, I find this way nicer than textwrap.dedent(...), though I wonder if f-string readability (and expected behavior?) might suffer a tiny bit with the order of formatting the f-string vs dedenting. In the following it is clear that dedent is after formatting: >>> dedent(f" {stuff}") It might be unclear for the following especially if `.dedent()` get sold as zero-overhead at compile time. >>> f" {stuff}".dedent() Could it be made clearer with the peephole optimiser (and tested, I don't believe it is now), that dedent applies after-formatting ? Alternative modifications/suggestions/notes: - I can also see how having dedent applied **before** formatting with f-string could be useful or less surprising ( a d"" prefix could do that... just wondering what your actual goal is). - Is this a supposed to deprecating textwrap.dedent ? Duck-typing and stuff, could textwrap.dedent work on non-str things and the current implementation not ( it assumes the `.dedent()` method exists) and thus be backward-incompatible ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 20:19:52 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 21 May 2019 00:19:52 +0000 Subject: [issue36792] [Windows] time: crash on formatting time with de_DE locale In-Reply-To: <1558367504.48.0.139073291798.issue36792@roundup.psfhosted.org> Message-ID: Jeremy Kloth added the comment: > * the experimental UTF-8 support was enabled because "de_DE" is not a > known Windows locale name - try with "de-DE" > > Perhaps it would be easy to do the replacement of underscores with hyphens > on Windows in this function? I think that's safe enough, yes? > Even some well known locale names still use the utf-8 code page. Most seem to uncommon, but at least es-BR (Brazil) does and would still fall victim to these UCRT bugs. > ---------- nosy: +jeremy.kloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 20:31:29 2019 From: report at bugs.python.org (stefan) Date: Tue, 21 May 2019 00:31:29 +0000 Subject: [issue36980] pass-by-reference clues Message-ID: <1558398689.74.0.962126355823.issue36980@roundup.psfhosted.org> New submission from stefan : I often get unexpected results when a called function results in a change in a variable because the function gets a pass by reference. For example, consider this snippet of code that manipulates the first column of a 3x3 matrix that it gets. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import numpy as np def changeValue(kernel): kernel[0,0]=kernel[0,0]+ 2 kernel[1,0]=kernel[1,0]+ 2 kernel[2,0]=kernel[2,0]+ 2 return kernel myKernel = np.array(( [0, -1, 0], [-1, 5, -1], [0, -1, 0]), dtype="int") CVkernel=myKernel print(CVkernel) a=changeValue(myKernel) print(a) print(CVkernel) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I get the following output [[ 0 -1 0] [-1 5 -1] [ 0 -1 0]] [[ 2 -1 0] [ 1 5 -1] [ 2 -1 0]] [[ 2 -1 0] [ 1 5 -1] [ 2 -1 0]] The value of myKernel clobbers CVkernel. I think there is an unintentional call-by-reference (pass-by-reference?) going on but I am not sure why. If I define the function slightly differently def changeValue2(kernel): kernel=kernel + 2 return kernel Then CVkernel is left untouched [[ 0 -1 0] [-1 5 -1] [ 0 -1 0]] [[2 1 2] [1 7 1] [2 1 2]] [[ 0 -1 0] [-1 5 -1] [ 0 -1 0]] What is going on here? EDIT Even when I use a 'safe' function call that does not clobber CVkernel, like kernel=kernel + 2 , the id of myKernel and CVkernel are the same. id of myKernel 139994865303344 myKernel [[ 0 -1 0] [-1 5 -1] [ 0 -1 0]] id of CVKernel 139994865303344 CVKernel [[ 0 -1 0] [-1 5 -1] [ 0 -1 0]] **call made to changeValue2** id of myKernel 139994865303344 myKernel [[ 0 -1 0] [-1 5 -1] [ 0 -1 0]] id of CVKernel 139994865303344 CVKernel [[ 0 -1 0] [-1 5 -1] [ 0 -1 0]] output a [[2 1 2] [1 7 1] [2 1 2]] Shouldn't the id of each variable be different if they are different instances? Would it possible for the python interpreter/compiler to let me know when a function is going to clobber a variable that is not used in the function or passed to the function or returned by the function ---------- messages: 342967 nosy: skypickle priority: normal severity: normal status: open title: pass-by-reference clues type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 21:05:19 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 21 May 2019 01:05:19 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1558396550.01.0.316041746334.issue36906@roundup.psfhosted.org> Message-ID: <20190521010509.GI4221@ando.pearwood.info> Steven D'Aprano added the comment: > It might be unclear for the following especially if `.dedent()` get > sold as zero-overhead at compile time. Oh, please, please, please PLEASE let's not over-sell this! There is no promise that dedent will be zero-overhead: it is a method, like any other method, which is called at runtime. Some implementations *might* *sometimes* be able to optimize that at compile-time, just as some implementations *might* *sometimes* be able to optimize away long complex arithmetic expressions and do them at compile time. Such constant-folding optimizations can only occur with literals, since arbitrary expressions aren't known at compile-time. F-strings aren't string literals, they are executable code and can run thngs like this: f"{'abc' if random.random() > 0.5 else 'xyz'}" So we don't know how many spaces each line begins with until after the f-string is evaluated: f"""{m:5d} {n:5d}""" Unless we over-sell the keyhole optimization part, there shouldn't be anything more confusing about dedent than this: x, X = 'spam', 'eggs' f"{x}".upper() # returns 'SPAM' not 'eggs' > Could it be made clearer with the peephole optimiser (and tested, I > don't believe it is now), that dedent applies after-formatting ? We should certainly make that clear that Personally, I think we should soft-sell on the compile-time optimization until such time that the Steering Council decides it should be a mandatory language feature. > Alternative modifications/suggestions/notes: > > - I can also see how having dedent applied **before** formatting > with f-string could be useful or less surprising ( a d"" prefix > could do that... just wondering what your actual goal is). I don't see how it will make any difference in the common case. And the idea here is to avoid yet another string prefix. > - Is this a supposed to deprecating textwrap.dedent ? I don't think so, but eventually it might. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 21:15:40 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 21 May 2019 01:15:40 +0000 Subject: [issue36980] pass-by-reference clues In-Reply-To: <1558398689.74.0.962126355823.issue36980@roundup.psfhosted.org> Message-ID: <1558401340.01.0.437261890816.issue36980@roundup.psfhosted.org> Steven D'Aprano added the comment: Hi Stefan, and welcome. This is not a help desk, you really should ask elsewhere for explanations of how Python works. There are no bugs here: what you are seeing is standard pass-by-object behaviour. You are misinterpreting what you are seeing. Python is never pass by reference or pass by value. https://en.wikipedia.org/wiki/Evaluation_strategy https://www.effbot.org/zone/call-by-object.htm *All* function objects, whether strings, ints, lists or numpy arrays, are passed as objects. If you want to make a copy, you have to explicitly make a copy. If you don't, and you mutate the object in place, you will see the mutation in both places. > Shouldn't the id of each variable be different if they are different instances? Not necessarily: IDs can be reused. Without seeing the actual running code, I can't tell if the IDs have been used or if they are the same ID because they are the same object. > Would it possible for the python interpreter/compiler to let me know when a function is going to clobber a variable that is not used in the function or passed to the function or returned by the function Python never clobbers a variable not used in the function. It may however mutate an object which is accessible from both inside and outside a function. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 21:16:02 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 21 May 2019 01:16:02 +0000 Subject: [issue31163] Return destination path in Path.rename and Path.replace In-Reply-To: <1502292744.48.0.627996317333.issue31163@psf.upfronthosting.co.za> Message-ID: <1558401362.82.0.262378761478.issue31163@roundup.psfhosted.org> Cheryl Sabella added the comment: I've closed the original pull request as the Github user account that created it no longer exists. ---------- keywords: +easy -patch nosy: +berker.peksag, cheryl.sabella stage: patch review -> needs patch versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 21:16:19 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 21 May 2019 01:16:19 +0000 Subject: [issue36980] pass-by-reference clues In-Reply-To: <1558398689.74.0.962126355823.issue36980@roundup.psfhosted.org> Message-ID: <1558401379.57.0.950724014939.issue36980@roundup.psfhosted.org> Josh Rosenberg added the comment: 1. This is a bug tracker for bugs in the Python language spec and the CPython interpreter, not a general problem solving site. 2. The ids will differ for changeValue2 if you actually call it (kernel = kernel + 2 requires the the old id of kernel differ from the new id, because they both exist simultaneously, and are different objects); I'm guessing you're calling the wrong function or printing the ids of the wrong variables. 3. "Would it possible for the python interpreter/compiler to let me know when a function is going to clobber a variable that is not used in the function or passed to the function or returned by the function" Every bit of clobbering you're seeing involves a variable passed to the function (and sometimes returned by it). CVkernel=myKernel just made two names that bind to the same underlying object, so passing either name as an argument to a function that modifies its arguments will modify what is seen from both names. That's how mutable objects work. This is briefly addressed in the tutorial here: https://docs.python.org/3/tutorial/classes.html#a-word-about-names-and-objects . As a general rule, Python built-ins *either* modify their arguments in place and return nothing (None) *or* return new values leaving the arguments unmodified. It's a matter of programmer discipline to adhere to this practice in your own code (numpy does make it harder, since it uses views extensively, making slicing not an effective way to copy inputs). All that said, this isn't a bug. It's a longstanding feature of Python alias arguments to avoid expensive deep copies by default; the onus is on the function writer to copy if needed, or to document the behavior if mutation of the arguments is to occur. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 21:34:58 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 01:34:58 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1558402498.92.0.537827362716.issue36906@roundup.psfhosted.org> Matthias Bussonnier added the comment: > Oh, please, please, please PLEASE let's not over-sell this! Sorry didn't wanted to give you a heart attack. The optimisation has been mentioned, and you never know what people get excited on. > Such constant-folding ... Well, in here we might get that, but I kind of want to see how this is taught or explain, what I want to avoid is tutorial or examples saying that `.dedent()` is "as if you hadn't put spaces in front". > I don't think so, but eventually it might. Ok, thanks. Again just being cautious, and I see this is targeted 3.9 so plenty of time. I believe this will be a net improvement on many codebases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 22:11:00 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 21 May 2019 02:11:00 +0000 Subject: [issue36952] fileinput input's and Fileinput's bufsize=0 marked for removal in 3.8 In-Reply-To: <1558128316.3.0.00753032861072.issue36952@roundup.psfhosted.org> Message-ID: <1558404660.2.0.165092246559.issue36952@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 22:23:49 2019 From: report at bugs.python.org (viocal) Date: Tue, 21 May 2019 02:23:49 +0000 Subject: [issue36981] asyncio transport.write() memory out Message-ID: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> New submission from viocal : in asyncio when filedata than free memory(hardware) will be memory out Or killed by OS for buf in filedata: transport.write(buf) #to client I try it todo: abort transporting to protect application be killed by OS modified selector_events.py def _write_ready(self): assert self._buffer, 'Data should not be empty' if self._conn_lost: return try: n = self._sock.send(self._buffer) except (BlockingIOError, InterruptedError): pass except Exception as exc: self._loop._remove_writer(self._sock_fd) self._buffer.clear() self._fatal_error(exc, 'Fatal write error on socket transport') if self._empty_waiter is not None: self._empty_waiter.set_exception(exc) return else: try: if n: del self._buffer[:n] self._maybe_resume_protocol() # May append to buffer. if not self._buffer: self._loop._remove_writer(self._sock_fd) if self._empty_waiter is not None: self._empty_waiter.set_result(None) if self._closing: self._call_connection_lost(None) elif self._eof: self._sock.shutdown(socket.SHUT_WR) except Exception as exc: #(MemoryError) self._buffer.clear() self._loop._remove_writer(self._sock_fd) self._fatal_error(exc, 'Fatal write error on Selector SocketTransport write ready') if self._empty_waiter is not None: self._empty_waiter.set_exception(exc) return ---------- components: asyncio messages: 342973 nosy: asvetlov, viocal, yselivanov priority: normal severity: normal status: open title: asyncio transport.write() memory out type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 22:43:51 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 21 May 2019 02:43:51 +0000 Subject: [issue36982] Add support for extended color functions in ncurses 6.1 Message-ID: <1558406631.2.0.0939623901621.issue36982@roundup.psfhosted.org> New submission from Jeffrey Kintscher : ncurses 6.1 adds extended color functions to support terminals with 256 colors (e.g. xterm-256color). The extended functions take color pair values that are signed integers because the existing functions only take signed 16-bit values. My goal with this issue is to transparently use the ncurses extended color functions when compiling with ncurses 6.1 or newer. This should be straightforward and transparent to curses module users because the short int restrictions are in the ncurses library and not in the curses module API. This will fix the problems observed in issue #36630 but is broader, which is why I created a separete issue. I will work on this and post a PR whit it is ready. ---------- components: Library (Lib) messages: 342974 nosy: websurfer5 priority: normal severity: normal status: open title: Add support for extended color functions in ncurses 6.1 versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 23:40:16 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 21 May 2019 03:40:16 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents Message-ID: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> New submission from Anthony Sottile : notably it is missing ForwardRef, OrderedDict, ChainMap in python3.8 it is missing others in other versions I'm going to attempt to write a test which should classify things that should belong there ---------- components: Library (Lib) messages: 342975 nosy: Anthony Sottile priority: normal severity: normal status: open title: typing.__all__ has drifted from actual contents versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 23:41:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 21 May 2019 03:41:57 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents In-Reply-To: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> Message-ID: <1558410117.21.0.145992114927.issue36983@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 20 23:43:00 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 21 May 2019 03:43:00 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents In-Reply-To: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> Message-ID: <1558410180.14.0.363478177729.issue36983@roundup.psfhosted.org> Change by Anthony Sottile : ---------- keywords: +patch pull_requests: +13365 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 00:43:41 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 21 May 2019 04:43:41 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents In-Reply-To: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> Message-ID: <1558413821.94.0.490140565297.issue36983@roundup.psfhosted.org> Anthony Sottile added the comment: using the same heuristic as the test uses, here's what's been missing from __all__ historically (note: I _manually_ skipped `Final` for 3.5.0-3) ===================================(3, 5, 0)=================================== +FrozenSet +SupportsBytes +SupportsComplex ===================================(3, 5, 1)=================================== +FrozenSet +SupportsBytes +SupportsComplex ===================================(3, 5, 2)=================================== +FrozenSet +SupportsBytes +SupportsComplex ===================================(3, 5, 3)=================================== +AsyncIterable +AsyncIterator +Awaitable +Coroutine +SupportsBytes +SupportsComplex ===================================(3, 5, 4)=================================== +AsyncContextManager +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Coroutine +NoReturn ===================================(3, 5, 5)=================================== +AsyncContextManager +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Coroutine +NoReturn ===================================(3, 5, 6)=================================== +AsyncContextManager +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Coroutine +NoReturn ===================================(3, 5, 7)=================================== +AsyncContextManager +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Coroutine +NoReturn ===================================(3, 6, 0)=================================== +AsyncIterable +AsyncIterator +Awaitable +Collection +ContextManager +Coroutine +SupportsBytes +SupportsComplex ===================================(3, 6, 1)=================================== +AsyncGenerator +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Collection +ContextManager +Coroutine +SupportsBytes +SupportsComplex ===================================(3, 6, 2)=================================== +AsyncContextManager +AsyncGenerator +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Collection +Coroutine +NoReturn ===================================(3, 6, 3)=================================== +AsyncContextManager +AsyncGenerator +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Collection +Coroutine +NoReturn ===================================(3, 6, 4)=================================== +AsyncContextManager +AsyncGenerator +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Collection +Coroutine +NoReturn ===================================(3, 6, 5)=================================== +AsyncContextManager +AsyncGenerator +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Collection +Coroutine +NoReturn ===================================(3, 6, 6)=================================== +AsyncContextManager +AsyncGenerator +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Collection +Coroutine +NoReturn ===================================(3, 6, 7)=================================== +AsyncContextManager +AsyncGenerator +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Collection +Coroutine +NoReturn ===================================(3, 6, 8)=================================== +AsyncContextManager +AsyncGenerator +AsyncIterable +AsyncIterator +Awaitable +ChainMap +Collection +Coroutine +NoReturn ===================================(3, 7, 0)=================================== +ChainMap +ForwardRef ===================================(3, 7, 1)=================================== +ChainMap +ForwardRef ===================================(3, 7, 2)=================================== +ChainMap +ForwardRef +OrderedDict ===================================(3, 7, 3)=================================== +ChainMap +ForwardRef +OrderedDict ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 01:08:18 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 21 May 2019 05:08:18 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558415298.15.0.470592288697.issue36965@roundup.psfhosted.org> Eryk Sun added the comment: "crtdbg.h" doesn't provide STATUS_CONTROL_C_EXIT, but it should be fine to remove it anyway. I think it was left behind by accident in 2007. It was added to support a PYTHONNOERRORWINDOW environment variable, but then this idea was dropped in favor of extending the msvcrt module: * https://grokbase.com/t/python/python-3000/078wkax0sd/buildbots * https://github.com/python/cpython/commit/945362cf971fb2e10f8f2a8e71e8ff10516ebe4c#diff-75445bdc3b6b3dd20b005698fa165444 * https://github.com/python/cpython/commit/3dc33d18452de871cff98914dda81ff00b4d00f6#diff-75445bdc3b6b3dd20b005698fa165444 I presume STATUS_CONTROL_C_EXIT gets included from "winnt.h" -> "Windows.h" -> "Include/internal/pycore_condvar.h" -> "Include/internal/pycore_gil.h" -> "Include/internal/pycore_pystate.h". If [STATUS_]CONTROL_C_EXIT isn't defined, I suggest defining WIN32_LEAN_AND_MEAN before including "Windows.h". This reduces the number of included headers from about 350 down to about 200. Also, to stay strictly within the Windows API, we might want to use CONTROL_C_EXIT (from [min]winbase.h) instead of STATUS_CONTROL_C_EXIT (from "winnt.h"). ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 01:20:35 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 21 May 2019 05:20:35 +0000 Subject: [issue36984] typing docs "versionadded" is inaccurate for many attributes Message-ID: <1558416035.31.0.248938950481.issue36984@roundup.psfhosted.org> New submission from Anthony Sottile : expanding on https://bugs.python.org/issue36983 the docs are also a bit out of date in places I'm not sure how to document something that appeared in two versions, but I'll leave that part to review. Using data generated / collected in https://github.com/asottile/flake8-typing-imports via this script: https://github.com/asottile/flake8-typing-imports/blob/master/bin/build-generated and then analyzed with this script: from flake8_typing_imports import SYMBOLS ALL = set().union(*(v for _, v in SYMBOLS)) for k in sorted(ALL): state = False for i, (v, ks) in enumerate(SYMBOLS): if state is False and k in ks: print(f'{k}: new in {v}') state = True elif state is True and k not in ks: print(f'=> {k}: removed in {v}') state = False I've found the following: $ python3 t.py | grep -v 'new in 3\.5\.0' AsyncContextManager: new in 3.5.4 => AsyncContextManager: removed in 3.6.0 AsyncContextManager: new in 3.6.2 AsyncGenerator: new in 3.6.1 AsyncIterable: new in 3.5.2 AsyncIterator: new in 3.5.2 Awaitable: new in 3.5.2 ChainMap: new in 3.5.4 => ChainMap: removed in 3.6.0 ChainMap: new in 3.6.1 ClassVar: new in 3.5.3 Collection: new in 3.6.0 ContextManager: new in 3.5.4 Coroutine: new in 3.5.3 Counter: new in 3.5.4 => Counter: removed in 3.6.0 Counter: new in 3.6.1 DefaultDict: new in 3.5.2 Deque: new in 3.5.4 => Deque: removed in 3.6.0 Deque: new in 3.6.1 ForwardRef: new in 3.7.0 GenericMeta: new in 3.5.4 => GenericMeta: removed in 3.6.0 GenericMeta: new in 3.6.1 => GenericMeta: removed in 3.7.0 NewType: new in 3.5.2 NoReturn: new in 3.5.4 => NoReturn: removed in 3.6.0 NoReturn: new in 3.6.2 OrderedDict: new in 3.7.2 TYPE_CHECKING: new in 3.5.2 Text: new in 3.5.2 Type: new in 3.5.2 ---------- assignee: docs at python components: Documentation messages: 342978 nosy: Anthony Sottile, docs at python priority: normal severity: normal status: open title: typing docs "versionadded" is inaccurate for many attributes versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 01:22:57 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 21 May 2019 05:22:57 +0000 Subject: [issue36984] typing docs "versionadded" is inaccurate for many attributes In-Reply-To: <1558416035.31.0.248938950481.issue36984@roundup.psfhosted.org> Message-ID: <1558416177.75.0.683579077621.issue36984@roundup.psfhosted.org> Change by Anthony Sottile : ---------- keywords: +patch pull_requests: +13366 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 01:35:02 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 21 May 2019 05:35:02 +0000 Subject: [issue36985] typing.ForwardRef is undocumented Message-ID: <1558416902.0.0.868432422236.issue36985@roundup.psfhosted.org> New submission from Anthony Sottile : - New since 3.7.0 - is exposed by some public apis: - the `__doc__` attribute of `typing` mentions `ForwardRef` - `get_type_hints` can expose an instance of it: https://bugs.python.org/issue35834 Should this be documented? including in __all__? ---------- assignee: docs at python components: Documentation messages: 342979 nosy: Anthony Sottile, docs at python priority: normal severity: normal status: open title: typing.ForwardRef is undocumented versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 02:04:52 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 21 May 2019 06:04:52 +0000 Subject: [issue36978] `python3 -m pip install` has no `--requirement` option on Windows In-Reply-To: <1558386497.6.0.534415104881.issue36978@roundup.psfhosted.org> Message-ID: <1558418692.08.0.16413217236.issue36978@roundup.psfhosted.org> Eric V. Smith added the comment: Please show us what command you are running when you try to specify --requirement, and what the result is. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 02:20:25 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 21 May 2019 06:20:25 +0000 Subject: [issue36932] asyncio-task.rst could use proper deprecated-removed directive In-Reply-To: <1557960053.75.0.0870422245475.issue36932@roundup.psfhosted.org> Message-ID: <1558419625.97.0.64304562387.issue36932@roundup.psfhosted.org> miss-islington added the comment: New changeset d0ebf13e50dd736cdb355fa42c23837abbb88127 by Miss Islington (bot) (Matthias Bussonnier) in branch 'master': bpo-36932: use proper deprecation-removed directive (GH-13349) https://github.com/python/cpython/commit/d0ebf13e50dd736cdb355fa42c23837abbb88127 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 02:33:08 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 21 May 2019 06:33:08 +0000 Subject: [issue36932] asyncio-task.rst could use proper deprecated-removed directive In-Reply-To: <1557960053.75.0.0870422245475.issue36932@roundup.psfhosted.org> Message-ID: <1558420388.34.0.635050621896.issue36932@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 02:37:37 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 21 May 2019 06:37:37 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558420657.85.0.551030698365.issue36981@roundup.psfhosted.org> Andrew Svetlov added the comment: The correct approach is using Protocol.pause_writing() / Protocol.resume_writing() callbacks. No trivial, though. See `StreamWriter.drain()` for example of implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 03:13:29 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Tue, 21 May 2019 07:13:29 +0000 Subject: [issue36986] tarfile: unexpected IsADirectoryError on extraction Message-ID: <1558422809.19.0.381089325981.issue36986@roundup.psfhosted.org> New submission from alter-bug-tracer : The following code creates a new directory 'output' and extracts the tar archive given as argv in it. When a malformed archive (attached) is given as argv, a IsADirectoryError is thrown, as opposed to extracting the file contained in the archive to the 'output' directory. Code: import tarfile import sys import os def extract(archive_path, destination_path): if not tarfile.is_tarfile(archive_path): print ('Not a tar file') return tar = tarfile.open(archive_path, 'r') for info in tar.getmembers(): tar.extractall(destination_path, members=[tar.getmember(info.name)]) destination_path = 'output' os.mkdir(destination_path) extract(sys.argv[1], destination_path) Result: Traceback (most recent call last): File "code.py", line 15, in extract(sys.argv[1], destination_path) File "code.py", line 11, in extract tar.extractall(destination_path, members=[tar.getmember(info.name)]) File "/usr/lib/python3.6/tarfile.py", line 2010, in extractall numeric_owner=numeric_owner) File "/usr/lib/python3.6/tarfile.py", line 2052, in extract numeric_owner=numeric_owner) File "/usr/lib/python3.6/tarfile.py", line 2122, in _extract_member self.makefile(tarinfo, targetpath) File "/usr/lib/python3.6/tarfile.py", line 2163, in makefile with bltn_open(targetpath, "wb") as target: IsADirectoryError: [Errno 21] Is a directory: 'output' ---------- files: input0.tar messages: 342983 nosy: alter-bug-tracer priority: normal severity: normal status: open title: tarfile: unexpected IsADirectoryError on extraction type: behavior versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48341/input0.tar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 04:26:26 2019 From: report at bugs.python.org (Aprila Hijriyan) Date: Tue, 21 May 2019 08:26:26 +0000 Subject: [issue36987] Dictionary: why is the value not used up? Message-ID: <1558427186.18.0.280662409984.issue36987@roundup.psfhosted.org> New submission from Aprila Hijriyan : Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> d = {"a": 1, "b": 2} >>> d ["c"] = d >>> d ["c"] {'a': 1, 'c': {...}, 'b': 2} >>> d ["c"] ["c"] {'a': 1, 'c': {...}, 'b': 2} why does the key value 'c' have a 'c' key in it? ---------- messages: 342984 nosy: Aprila Hijriyan priority: normal severity: normal status: open title: Dictionary: why is the value not used up? versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 04:27:23 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 21 May 2019 08:27:23 +0000 Subject: [issue36987] Dictionary: why is the value not used up? In-Reply-To: <1558427186.18.0.280662409984.issue36987@roundup.psfhosted.org> Message-ID: <1558427243.24.0.701640181714.issue36987@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi Aprila, I think you should use the mailing list for the Python users. Have a nice day, ---------- nosy: +matrixise resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 04:28:16 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 21 May 2019 08:28:16 +0000 Subject: [issue36987] Dictionary: why is the value not used up? In-Reply-To: <1558427186.18.0.280662409984.issue36987@roundup.psfhosted.org> Message-ID: <1558427296.38.0.8831173253.issue36987@roundup.psfhosted.org> St?phane Wirtel added the comment: Here is the mailing list for the python users. https://mail.python.org/mailman/listinfo/python-list ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 04:45:02 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 08:45:02 +0000 Subject: [issue36970] Rename _PyObject_FastCall functions In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558428302.96.0.877189565286.issue36970@roundup.psfhosted.org> Jeroen Demeyer added the comment: The consensus on PEP 590 now seems to be to keep the name `_PyObject_FastCallDict` and rename only `_PyObject_FastCallKeywords` -> `_PyObject_Vectorcall`. For the record: I don't agree with this decision but I'll implement it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 05:09:52 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 21 May 2019 09:09:52 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1558429792.69.0.241288602559.issue36816@roundup.psfhosted.org> Michael Felt added the comment: I am not an OpenSSL expert - and I am conscious of OpenSSL changes with regard to 'acceptance' of anything self-signed. And, what it looks like you are trying to do with an updated 'signing" .pem is to remove the 'self-signed' charasteric. On AIX - atm - I get, as did Chih-Hsuan Yen (yan12125), ====================================================================== ERROR: test_networked_good_cert (test.test_httplib.HTTPSTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/python-master/Lib/test/test_httplib.py", line 1632, in test_networked_good_cert h.request('GET', '/') File "/home/buildbot/python-master/Lib/http/client.py", line 1221, in request self._send_request(method, url, body, headers, encode_chunked) File "/home/buildbot/python-master/Lib/http/client.py", line 1267, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/home/buildbot/python-master/Lib/http/client.py", line 1216, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/home/buildbot/python-master/Lib/http/client.py", line 1004, in _send_output self.send(msg) File "/home/buildbot/python-master/Lib/http/client.py", line 944, in send self.connect() File "/home/buildbot/python-master/Lib/http/client.py", line 1383, in connect self.sock = self._context.wrap_socket(self.sock, File "/home/buildbot/python-master/Lib/ssl.py", line 405, in wrap_socket return self.sslsocket_class._create( File "/home/buildbot/python-master/Lib/ssl.py", line 853, in _create self.do_handshake() File "/home/buildbot/python-master/Lib/ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1055) And I see why now: test_networked_good_cert (test.test_httplib.HTTPSTest) ... skipped "Use of the 'network' resource not enabled" Digging a bit: buildbot at x064:[/home/buildbot/python-master]openssl s_client -connect self-signed.pythontest.net:443 CONNECTED(00000003) depth=0 C = XY, ST = Castle Anthrax, L = Argument Clinic, O = Python Software Foundation, CN = self-signed.pythontest.net verify error:num=18:self signed certificate verify return:1 depth=0 C = XY, ST = Castle Anthrax, L = Argument Clinic, O = Python Software Foundation, CN = self-signed.pythontest.net verify return:1 --- Certificate chain 0 s:/C=XY/ST=Castle Anthrax/L=Argument Clinic/O=Python Software Foundation/CN=self-signed.pythontest.net i:/C=XY/ST=Castle Anthrax/L=Argument Clinic/O=Python Software Foundation/CN=self-signed.pythontest.net And while this: How to know if it has been fixed? Monitor the test_networked_good_cert test on any "Debian buster" builtbot(s) such as https://buildbot.python.org/all/#/workers/23 to make sure it is not skipped. (the test _currently_ fails, I am going to have it be _skipped_ on this specific key too small error for the time being to get that stable buildbot green again) is nice for some, it is not nice for all! Perhaps the test should be switched to 'warn' on failure, rather than error on failure, until fixed! ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 05:10:56 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 21 May 2019 09:10:56 +0000 Subject: [issue36937] New _PyObject_MakeTpCall() function In-Reply-To: <1558000747.27.0.378828568729.issue36937@roundup.psfhosted.org> Message-ID: <1558429856.2.0.0962762173203.issue36937@roundup.psfhosted.org> Petr Viktorin added the comment: Avoiding the duplication makes sense, but without the rest of PEP 590 it could just be a static function in call.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 05:15:37 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 21 May 2019 09:15:37 +0000 Subject: [issue36969] pdb: do_args: display/handle keyword-only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558430137.53.0.307861645757.issue36969@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Of course, should I open a new PR or post a patch to be added to a current PR? Make another PR against master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 05:31:17 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 09:31:17 +0000 Subject: [issue36937] New _PyObject_MakeTpCall() function In-Reply-To: <1558000747.27.0.378828568729.issue36937@roundup.psfhosted.org> Message-ID: <1558431077.6.0.727033340963.issue36937@roundup.psfhosted.org> Jeroen Demeyer added the comment: So what are you trying to say? That it *should* be a static function? It most likely won't be a static function after PEP 590 is fully implemented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 05:35:10 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 21 May 2019 09:35:10 +0000 Subject: [issue36937] New _PyObject_MakeTpCall() function In-Reply-To: <1558000747.27.0.378828568729.issue36937@roundup.psfhosted.org> Message-ID: <1558431310.43.0.68586510916.issue36937@roundup.psfhosted.org> Petr Viktorin added the comment: Ah, sorry, I didn't get the message through. I'll merge it with the rest of PEP 590. Adding the symbol doesn't make sense *right* now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 05:37:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 09:37:15 +0000 Subject: [issue22865] Document how to make pty.spawn not copy data In-Reply-To: <1415901686.09.0.50650588621.issue22865@psf.upfronthosting.co.za> Message-ID: <1558431435.21.0.758534858996.issue22865@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cdb2dbfe92b95dcd19ccab1a1e9b8c39263c54b0 by Victor Stinner (Geoff Shannon) in branch '3.7': [3.7] bpo-22865: Expand on documentation for the pty.spawn function (GH-11980) (GH-13455) https://github.com/python/cpython/commit/cdb2dbfe92b95dcd19ccab1a1e9b8c39263c54b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 05:38:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 09:38:34 +0000 Subject: [issue22865] Document how to make pty.spawn not copy data In-Reply-To: <1415901686.09.0.50650588621.issue22865@psf.upfronthosting.co.za> Message-ID: <1558431514.96.0.380003447701.issue22865@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Geoff Shannon for the doc enhancement! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 05:41:09 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 09:41:09 +0000 Subject: [issue36937] New _PyObject_MakeTpCall() function In-Reply-To: <1558000747.27.0.378828568729.issue36937@roundup.psfhosted.org> Message-ID: <1558431669.86.0.833377121004.issue36937@roundup.psfhosted.org> Jeroen Demeyer added the comment: In that case, there is no point a making a separate issue or PR. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 05:42:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 09:42:43 +0000 Subject: [issue33485] autoconf target does not behave correctly In-Reply-To: <1526237518.92.0.682650639539.issue33485@psf.upfronthosting.co.za> Message-ID: <1558431763.3.0.947810380266.issue33485@roundup.psfhosted.org> STINNER Victor added the comment: > it uses autoheader and autoconf instead of autoreconf How is this an issue? Is autoreconf also available when autoheader and autoconf are available? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 05:49:00 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 09:49:00 +0000 Subject: [issue36974] Implement PEP 590 Message-ID: <1558432140.28.0.611607438269.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13367 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:08:30 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 21 May 2019 10:08:30 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1558433310.48.0.124500332625.issue36816@roundup.psfhosted.org> Michael Felt added the comment: p.s. On Centos I could not even get a python3 (at least not easily). On debian (on POWER) I get the same error (message) as on AIX - although the line number did change. ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056) so, not a message about "key too small error" - pure, this is self-signed, so error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:11:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 10:11:15 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558433475.89.0.750362569527.issue36965@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 925af1d99b69bf3e229411022ad840c5a0cfdcf8 by Victor Stinner (Erik Janssens) in branch 'master': bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421) https://github.com/python/cpython/commit/925af1d99b69bf3e229411022ad840c5a0cfdcf8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:15:40 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 21 May 2019 10:15:40 +0000 Subject: [issue36975] csv: undocumented UnicodeDecodeError on malformed file In-Reply-To: <1558376023.37.0.392859277.issue36975@roundup.psfhosted.org> Message-ID: <1558433740.07.0.971546167849.issue36975@roundup.psfhosted.org> Change by R?mi Lapeyre : Added file: https://bugs.python.org/file48342/csv_parser.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:15:50 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 21 May 2019 10:15:50 +0000 Subject: [issue36975] csv: undocumented UnicodeDecodeError on malformed file In-Reply-To: <1558376023.37.0.392859277.issue36975@roundup.psfhosted.org> Message-ID: <1558433750.52.0.646069241337.issue36975@roundup.psfhosted.org> Change by R?mi Lapeyre : Added file: https://bugs.python.org/file48343/file0.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:16:01 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 21 May 2019 10:16:01 +0000 Subject: [issue36975] csv: undocumented UnicodeDecodeError on malformed file In-Reply-To: <1558376023.37.0.392859277.issue36975@roundup.psfhosted.org> Message-ID: <1558433761.8.0.872178392473.issue36975@roundup.psfhosted.org> Change by R?mi Lapeyre : Added file: https://bugs.python.org/file48344/file1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:18:23 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 21 May 2019 10:18:23 +0000 Subject: [issue36975] csv: undocumented UnicodeDecodeError on malformed file In-Reply-To: <1558376023.37.0.392859277.issue36975@roundup.psfhosted.org> Message-ID: <1558433903.42.0.133095172946.issue36975@roundup.psfhosted.org> R?mi Lapeyre added the comment: I don't understand the issue here, csv can raise many errors when an issue happens: >>> import csv >>> csv.reader(None) Traceback (most recent call last): File "", line 1, in TypeError: argument 1 must be an iterator Why would UnicodeDecodeError not be appropriate here? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:24:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 10:24:57 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558434297.64.0.577832383626.issue36084@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13368 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:28:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 10:28:30 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558434510.79.0.0737939256738.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 13458 to revert the change which broke the CI for longer than one week, see the rationale there: https://github.com/python/cpython/pull/13458#issuecomment-494334241 Email thread about the regression: https://mail.python.org/pipermail/python-buildbots/2019-May/000280.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:32:05 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 21 May 2019 10:32:05 +0000 Subject: [issue36969] pdb: do_args: display/handle keyword-only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558434725.94.0.112583175698.issue36969@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- pull_requests: +13369 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:32:30 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 21 May 2019 10:32:30 +0000 Subject: [issue36969] pdb.do_args: display keyword-only and positional only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558434750.69.0.781068030147.issue36969@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- title: pdb: do_args: display/handle keyword-only arguments -> pdb.do_args: display keyword-only and positional only arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:33:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 10:33:37 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558434817.27.0.898959046105.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: Jake Tesler: In the meanwhile, can you please try to rewrite your change to make the attribute optional? C PyThread_get_thread_native_id() function and Python _thread.get_native_id() should not be defined if it's not supported by the platform. I suggest to add the following #define in Include/pythread.h: #if (... list of supported platforms ... # define PY_HAVE_THREAD_NATIVE_ID 1 #endif It would be great if you can come up with a solution before the end of the month, otherwise we will miss Python 3.8 deadline for new feature :-( Tell me if you need help to rework your PR. IMHO it's a nice feature. There is just an issue in your first implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:44:05 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 10:44:05 +0000 Subject: [issue36974] Implement PEP 590 Message-ID: <1558435445.05.0.348493452434.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13370 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:45:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 10:45:00 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558435500.72.0.166036956646.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d12e75734d46ecde588c5de65e6d64146911d20c by Victor Stinner in branch 'master': Revert "bpo-36084: Add native thread ID to threading.Thread objects (GH-11993)" (GH-13458) https://github.com/python/cpython/commit/d12e75734d46ecde588c5de65e6d64146911d20c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:45:55 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 May 2019 10:45:55 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558435555.89.0.026378099782.issue36084@roundup.psfhosted.org> Antoine Pitrou added the comment: Jake, would you like to submit a new PR that implements Victor's suggestion (i.e. only define and test the attribute on supported systems)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:46:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 10:46:40 +0000 Subject: [issue31904] Python should support VxWorks RTOS In-Reply-To: <1509393393.78.0.213398074469.issue31904@psf.upfronthosting.co.za> Message-ID: <1558435600.28.0.853634562203.issue31904@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f2d7ac7e5bd821e29e0fcb78a760a282059ae000 by Victor Stinner (pxinwr) in branch 'master': bpo-31904: Add posix module support for VxWorks (GH-12118) https://github.com/python/cpython/commit/f2d7ac7e5bd821e29e0fcb78a760a282059ae000 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:47:21 2019 From: report at bugs.python.org (Michele Angrisano) Date: Tue, 21 May 2019 10:47:21 +0000 Subject: [issue36986] tarfile: unexpected IsADirectoryError on extraction In-Reply-To: <1558422809.19.0.381089325981.issue36986@roundup.psfhosted.org> Message-ID: <1558435641.96.0.704646522725.issue36986@roundup.psfhosted.org> Michele Angrisano added the comment: It looks like it has the same behavior of issue8958. ---------- nosy: +mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:49:55 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Tue, 21 May 2019 10:49:55 +0000 Subject: [issue36988] zipfile: string IndexError on extract Message-ID: <1558435795.93.0.150119411648.issue36988@roundup.psfhosted.org> New submission from alter-bug-tracer : The following code throws an IndexError when attempting to extract a malformed archive (attached): import zipfile import sys zf = zipfile.ZipFile(sys.argv[1]) for info in zf.infolist(): zf.extract(info.filename) Result: Traceback (most recent call last): File "code.py", line 6, in zf.extract(info.filename) File "/usr/lib/python3.6/zipfile.py", line 1507, in extract return self._extract_member(member, path, pwd) File "/usr/lib/python3.6/zipfile.py", line 1572, in _extract_member if member.is_dir(): File "/usr/lib/python3.6/zipfile.py", line 531, in is_dir return self.filename[-1] == '/' IndexError: string index out of range ---------- files: file0.zip messages: 343006 nosy: alter-bug-tracer priority: normal severity: normal status: open title: zipfile: string IndexError on extract type: behavior versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48345/file0.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:50:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 10:50:17 +0000 Subject: [issue36648] MAP_SHARED isn't proper for anonymous mappings for VxWorks In-Reply-To: <1555516421.89.0.141629661161.issue36648@roundup.psfhosted.org> Message-ID: <1558435817.58.0.839697637456.issue36648@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4fb15021890d327023aefd95f5a84ac33b037d19 by Victor Stinner (Lihua Zhao) in branch 'master': bpo-36648: fix mmap issue for VxWorks (GH-12394) https://github.com/python/cpython/commit/4fb15021890d327023aefd95f5a84ac33b037d19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:50:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 10:50:53 +0000 Subject: [issue31904] Python should support VxWorks RTOS In-Reply-To: <1509393393.78.0.213398074469.issue31904@psf.upfronthosting.co.za> Message-ID: <1558435853.32.0.811004973579.issue31904@roundup.psfhosted.org> STINNER Victor added the comment: Please update PR 12670: see my comment there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 06:57:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 10:57:02 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558436222.47.0.922377940813.issue36965@roundup.psfhosted.org> STINNER Victor added the comment: eryksun commented there, but I prefer to discuss here: https://github.com/python/cpython/commit/925af1d99b69bf3e229411022ad840c5a0cfdcf8#commitcomment-33617265 ""Windows.h" was already being included, as I mentioned on the issue tracker, because we certainly were not getting STATUS_CONTROL_C_EXIT from "crtdbg.h", a header that was left in this file accidentally about 12 years ago. If it's included explicitly here, also define WIN32_LEAN_AND_MEAN to cut the number of included headers by about a half." I prefer to explicitly include windows.h, it doesn't hurt :-) WIN32_LEAN_AND_MEAN is defined by Include/internal/pycore_condvar.h which is indirectly included by pycore_pystate.h: #include "pycore_gil.h" /* _gil_runtime_state */ pycore_gil.h: #include "pycore_condvar.h" By the way, WIN32_LEAN_AND_MEAN caused me issues while working on bpo-36728: https://twitter.com/VictorStinner/status/1127884878027079680 I managed to workaround the issue: commit d5d9e81ce9a7efc5bc14a5c21398d1ef6f626884 Extract of (fixed) posixmodule.c: --- ... #include "Python.h" #ifdef MS_WINDOWS /* include early to avoid conflict with pycore_condvar.h: #define WIN32_LEAN_AND_MEAN #include FSCTL_GET_REPARSE_POINT is not exported with WIN32_LEAN_AND_MEAN. */ # include #endif #include "pycore_ceval.h" /* _PyEval_ReInitThreads() */ #include "pycore_pystate.h" /* _PyRuntime */ ... --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:07:21 2019 From: report at bugs.python.org (viocal) Date: Tue, 21 May 2019 11:07:21 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558436841.73.0.420581321929.issue36981@roundup.psfhosted.org> viocal added the comment: I use rotocol.pause_writing() / Protocol.resume_writing() but results is no change(memory out Or killed by OS) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:12:24 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 21 May 2019 11:12:24 +0000 Subject: [issue36752] test multiprocessing: test_rapid_restart() crash on AIX In-Reply-To: <1556543240.21.0.411629530832.issue36752@roundup.psfhosted.org> Message-ID: <1558437144.04.0.489272037604.issue36752@roundup.psfhosted.org> Michael Felt added the comment: I believe (or hope) this is related to issue35828. This is, as far as I can tell, a compiler issue. It appears "always" in the bot situation (not building as root) when using xlc-v11, but not when using gcc-4.7.4. So, when the test failure "disappears" on the bot - it is because I have switched CC=clr_r to CC=gcc I am quite willing to continue searching (I just removed over three GBytes of core dumps I had collected previously). As to analysis: it appears the "server" side core-dumps, and the the client-side is refused a connection (obviously). ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:14:43 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 21 May 2019 11:14:43 +0000 Subject: [issue36273] test_thread leaks a core dump on PPC64 AIX 3.x In-Reply-To: <1552407244.81.0.665825370239.issue36273@roundup.psfhosted.org> Message-ID: <1558437283.5.0.612844499996.issue36273@roundup.psfhosted.org> Michael Felt added the comment: Again - how can I get the core (dump) mentioned in the error message. When I force this situation I have several core dumps - not "the one". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:17:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 11:17:41 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558437461.25.0.0851819305651.issue36965@roundup.psfhosted.org> STINNER Victor added the comment: > WIN32_LEAN_AND_MEAN is defined by Include/internal/pycore_condvar.h (...) It would be nice to get ride of #include in Python headers. The was introduced by this commit: commit 2ebc5ce42a8a9e047e790aefbf9a94811569b2b6 Author: Eric Snow Date: Thu Sep 7 23:51:28 2017 -0600 bpo-30860: Consolidate stateful runtime globals. (#3397) * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py). The current problem is that we need the HANDLE type which comes from to get the full structure: typedef struct _PyCOND_T { HANDLE sem; int waiting; /* to allow PyCOND_SIGNAL to be a no-op */ } PyCOND_T; I tried to avoid "HANDLE" using: typedef struct _PyCOND_T { void* sem; int waiting; /* to allow PyCOND_SIGNAL to be a no-op */ } PyCOND_T; ... but then pycore_condvar.h compilation fails on "typedef CRITICAL_SECTION PyMUTEX_T;": CRITICAL_SECTION type is not defined :-( By the way, Python still uses _PY_EMULATED_WIN_CV by default, whereas we want to drop Vista support: bpo-32592. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:18:23 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 21 May 2019 11:18:23 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558437503.17.0.906722579536.issue36981@roundup.psfhosted.org> Andrew Svetlov added the comment: I'm sorry but I cannot tell why you are using `pause_writing` incorrectly without looking on the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:33:37 2019 From: report at bugs.python.org (viocal) Date: Tue, 21 May 2019 11:33:37 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558438417.11.0.676091509867.issue36981@roundup.psfhosted.org> viocal added the comment: for buf in filedata: asc.resume_writing() asc.transport.write(buf) asc.pause_writing() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:35:53 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 21 May 2019 11:35:53 +0000 Subject: [issue36989] test_thread fails because symbol is (no longer) exported Message-ID: <1558438553.77.0.394995800321.issue36989@roundup.psfhosted.org> New submission from Michael Felt : On AIX, with commit 4fb15021890d327023aefd95f5a84ac33b037d19 (HEAD -> master, origin/master, origin/HEAD) test_thread is failing. The three sub_tests that exit as ERROR are: ERROR: test_threads_join_2 (test.test_threading.SubinterpThreadingTests) ERROR: test_frame_tstate_tracing (test.test_threading.ThreadTests) These two have in common: Traceback (most recent call last): ... ImportError: 0509-130 Symbol resolution failed for /home/buildbot/python-master/build/lib.aix-7.1-3.8-pydebug/_testcapi.so because: 0509-136 Symbol _PyMem_GetAllocatorsName (number 191) is not exported from dependent module python. 0509-192 Examine .loader section symbols with the 'dump -Tv' command. FAIL: test_daemon_threads_fatal_error (test.test_threading.SubinterpThreadingTests) I am guessing that: ====================================================================== FAIL: test_daemon_threads_fatal_error (test.test_threading.SubinterpThreadingTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/python-master/Lib/test/test_threading.py", line 942, in test_daemon_threads_fatal_error self.assertIn("Fatal Python error: Py_EndInterpreter: " AssertionError: 'Fatal Python error: Py_EndInterpreter: not the last thread' not found in 'Traceback (most recent call last):\n File "", line 2, in \nImportError: \t0509-130 Symbol resolution failed for /home/buildbot/python-master/build/lib.aix-7.1-3.8-pydebug/_testcapi.so because:\n\t0509-136 Symbol _PyMem_GetAllocatorsName (number 191) is not exported from\n\t\t dependent module python.\n\t0509-192 Examine .loader section symbols with the\n\t\t \'dump -Tv\' command.' ---------------------------------------------------------------------- is caused by the earlier failures. ---------- components: Build, Tests messages: 343016 nosy: Michael.Felt priority: normal severity: normal status: open title: test_thread fails because symbol is (no longer) exported versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:42:28 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 21 May 2019 11:42:28 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558438948.0.0.987449947679.issue36981@roundup.psfhosted.org> Andrew Svetlov added the comment: No. It doesn't work this way. pause_writing is a protocol callback called from transport when the internal buffer is full. In reaction to this callback the producer should stop calling transport.write() and resume writing after getting `resume_writing()`. Flow control is hard. As I wrote you can take a look at asyncio streams for example how to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:47:43 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 21 May 2019 11:47:43 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558439263.59.0.320102415411.issue36965@roundup.psfhosted.org> Eryk Sun added the comment: > FSCTL_GET_REPARSE_POINT is not exported with WIN32_LEAN_AND_MEAN You can explicitly include "winioctl.h" after "windows.h". Getting it from "windows.h" is indirect via "winscard.h" (smart card services), which will be skipped if either WIN32_LEAN_AND_MEAN or NOCRYPT is defined. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:56:33 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 21 May 2019 11:56:33 +0000 Subject: [issue36990] test_asyncio.test_create_connection_ipv6_scope fails(in mock test?) Message-ID: <1558439793.15.0.664756328285.issue36990@roundup.psfhosted.org> New submission from Michael Felt : ====================================================================== test_create_connection_ipv6_scope (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/python-master/Lib/unittest/mock.py", line 1226, in patched return func(*args, **keywargs) File "/home/buildbot/python-master/Lib/test/test_asyncio/test_base_events.py", line 1316, in test_create_connection_ipv6_scope sock.connect.assert_called_with(('fe80::1', 80, 0, 1)) File "/home/buildbot/python-master/Lib/unittest/mock.py", line 838, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: expected call not found. Expected: connect(('fe80::1', 80, 0, 1)) Actual: connect(('fe80::1', 80, 0, 0)) More details: buildbot at x064:[/home/buildbot/python-master]nohup ./python -m test -v test_asyncio | egrep -v "ok$" | grep -v " ... skipped " == CPython 3.8.0a4+ (heads/master:4fb1502189, May 21 2019, 11:08:13) [GCC 4.7.4] == AIX-1-00C291F54C00-powerpc-32bit big-endian == cwd: /home/buildbot/python-master/build/test_python_17694732 == CPU count: 4 == encodings: locale=ISO8859-1, FS=iso8859-1 Run tests sequentially 0:00:00 [1/1] test_asyncio test_create_connection_ipv6_scope (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests) ... FAIL test_communicate_ignore_broken_pipe (test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... /home/buildbot/python-master/Lib/inspect.py:2819: RuntimeWarning: coroutine 'AsyncMockMixin._mock_call' was never awaited params = OrderedDict(((param.name, param) RuntimeWarning: Enable tracemalloc to get the object allocation traceback Future exception was never retrieved future: Traceback (most recent call last): File "/home/buildbot/python-master/Lib/asyncio/subprocess.py", line 162, in _feed_stdin await self.stdin.drain() File "/home/buildbot/python-master/Lib/asyncio/streams.py", line 443, in drain await self._protocol._drain_helper() File "/home/buildbot/python-master/Lib/asyncio/streams.py", line 200, in _drain_helper await waiter File "/home/buildbot/python-master/Lib/asyncio/unix_events.py", line 661, in _write_ready n = os.write(self._fileno, self._buffer) BrokenPipeError: [Errno 32] Broken pipe test_communicate_ignore_broken_pipe (test.test_asyncio.test_subprocess.SubprocessSafeWatcherTests) ... Future exception was never retrieved future: Traceback (most recent call last): File "/home/buildbot/python-master/Lib/asyncio/subprocess.py", line 162, in _feed_stdin await self.stdin.drain() File "/home/buildbot/python-master/Lib/asyncio/streams.py", line 443, in drain await self._protocol._drain_helper() File "/home/buildbot/python-master/Lib/asyncio/streams.py", line 200, in _drain_helper await waiter File "/home/buildbot/python-master/Lib/asyncio/unix_events.py", line 661, in _write_ready n = os.write(self._fileno, self._buffer) BrokenPipeError: [Errno 32] Broken pipe test_cancel_at_end (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) test_cancel_gather_1 (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) test_return_coroutine_from_coroutine (test.test_asyncio.test_tasks.CTaskSubclass_PyFuture_Tests) test_cancel_at_end (test.test_asyncio.test_tasks.CTask_CFuture_SubclassTests) test_cancel_gather_1 (test.test_asyncio.test_tasks.CTask_CFuture_SubclassTests) test_return_coroutine_from_coroutine (test.test_asyncio.test_tasks.CTask_CFuture_SubclassTests) test_cancel_at_end (test.test_asyncio.test_tasks.CTask_CFuture_Tests) test_cancel_gather_1 (test.test_asyncio.test_tasks.CTask_CFuture_Tests) test_return_coroutine_from_coroutine (test.test_asyncio.test_tasks.CTask_CFuture_Tests) test_cancel_at_end (test.test_asyncio.test_tasks.CTask_PyFuture_Tests) test_cancel_gather_1 (test.test_asyncio.test_tasks.CTask_PyFuture_Tests) test_return_coroutine_from_coroutine (test.test_asyncio.test_tasks.CTask_PyFuture_Tests) test_cancel_at_end (test.test_asyncio.test_tasks.PyTask_CFutureSubclass_Tests) test_cancel_gather_1 (test.test_asyncio.test_tasks.PyTask_CFutureSubclass_Tests) test_return_coroutine_from_coroutine (test.test_asyncio.test_tasks.PyTask_CFutureSubclass_Tests) test_cancel_at_end (test.test_asyncio.test_tasks.PyTask_CFuture_Tests) test_cancel_gather_1 (test.test_asyncio.test_tasks.PyTask_CFuture_Tests) test_return_coroutine_from_coroutine (test.test_asyncio.test_tasks.PyTask_CFuture_Tests) test_cancel_at_end (test.test_asyncio.test_tasks.PyTask_PyFuture_SubclassTests) test_cancel_gather_1 (test.test_asyncio.test_tasks.PyTask_PyFuture_SubclassTests) test_return_coroutine_from_coroutine (test.test_asyncio.test_tasks.PyTask_PyFuture_SubclassTests) test_cancel_at_end (test.test_asyncio.test_tasks.PyTask_PyFuture_Tests) test_cancel_gather_1 (test.test_asyncio.test_tasks.PyTask_PyFuture_Tests) test_return_coroutine_from_coroutine (test.test_asyncio.test_tasks.PyTask_PyFuture_Tests) test_run_coroutine_threadsafe (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) test_run_coroutine_threadsafe_task_cancelled (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) test_run_coroutine_threadsafe_task_factory_exception (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) test_run_coroutine_threadsafe_with_exception (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) test_run_coroutine_threadsafe_with_timeout (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) test.test_asyncio.test_windows_utils (unittest.loader.ModuleSkipped) ... test test_asyncio failed skipped 'Windows only' ====================================================================== FAIL: test_create_connection_ipv6_scope (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/python-master/Lib/unittest/mock.py", line 1226, in patched return func(*args, **keywargs) File "/home/buildbot/python-master/Lib/test/test_asyncio/test_base_events.py", line 1316, in test_create_connection_ipv6_scope sock.connect.assert_called_with(('fe80::1', 80, 0, 1)) File "/home/buildbot/python-master/Lib/unittest/mock.py", line 838, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: expected call not found. Expected: connect(('fe80::1', 80, 0, 1)) Actual: connect(('fe80::1', 80, 0, 0)) ---------------------------------------------------------------------- Ran 1977 tests in 70.591s FAILED (failures=1, skipped=48) test_asyncio failed in 1 min 10 sec == Tests result: FAILURE == 1 test failed: test_asyncio ---------- components: Tests messages: 343019 nosy: Michael.Felt priority: normal severity: normal status: open title: test_asyncio.test_create_connection_ipv6_scope fails(in mock test?) versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 07:59:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 11:59:28 +0000 Subject: [issue36648] MAP_SHARED isn't proper for anonymous mappings for VxWorks In-Reply-To: <1555516421.89.0.141629661161.issue36648@roundup.psfhosted.org> Message-ID: <1558439968.31.0.166244944933.issue36648@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:00:14 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 21 May 2019 12:00:14 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1558433310.48.0.124500332625.issue36816@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: On 21/05/2019 12:08, Michael Felt wrote: > Michael Felt added the comment: > > p.s. On Centos I could not even get a python3 (at least not easily). > > On debian (on POWER) I get the same error (message) as on AIX - although the line number did change. > > ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056) > > so, not a message about "key too small error" - pure, this is self-signed, so error. > > ---------- p.s. blush: seems I was testing against the wrong fork - seems to be cleared in 'master'. My apologies for the noise. > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:00:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:00:33 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1558440033.93.0.193217954944.issue36511@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:02:32 2019 From: report at bugs.python.org (Matej Cepl) Date: Tue, 21 May 2019 12:02:32 +0000 Subject: [issue31850] test_nntplib failed with "nntplib.NNTPDataError: line too long" In-Reply-To: <1508780715.86.0.213398074469.issue31850@psf.upfronthosting.co.za> Message-ID: <1558440152.75.0.546068355069.issue31850@roundup.psfhosted.org> Matej Cepl added the comment: Was this ever reproduced anywhere? ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:04:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:04:31 +0000 Subject: [issue36973] test_json.test_recursion.TestPyRecursion.test_endless_recursion stack overflow in AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1558374336.39.0.468050668046.issue36973@roundup.psfhosted.org> Message-ID: <1558440271.64.0.98278213503.issue36973@roundup.psfhosted.org> STINNER Victor added the comment: > Buildbot error : https://buildbot.python.org/all/#/builders/12/builds/2497 It's AMD64 Windows8.1 Non-Debug 3.x: test_endless_recursion (test.test_json.test_recursion.TestPyRecursion) ... ok Fatal Python error: Cannot recover from stack overflow. Current thread 0x00000820 (most recent call first): File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\json\decoder.py", line 83 in py_scanstring File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\json\decoder.py", line 167 in JSONObject File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\json\scanner.py", line 37 in _scan_once (...) File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\json\scanner.py", line 37 in _scan_once File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\json\decoder.py", line 186 in JSONObject File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\json\scanner.py", line 37 in _scan_once File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\json\decoder.py", line 186 in JSONObject File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\json\scanner.py", line 37 in _scan_once File "D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\json\decoder.py", line 186 in JSONObject ... test_highly_nested_objects_decoding (test.test_json.test_recursion.TestPyRecursion) ... D:\buildarea\3.x.ware-win81-release.nondebug\build>exit /b 0 command timed out: 1200 seconds without output running [b'Tools\\buildbot\\test.bat', b'-x64', b'-j2', b'+d', b'-j4', b'--timeout', b'900'], attempting to kill SIGKILL failed to kill process > https://ci.appveyor.com/project/python/cpython/builds/24631185#L1547 test_endless_recursion (test.test_json.test_recursion.TestPyRecursion) ... ok test_highly_nested_objects_decoding (test.test_json.test_recursion.TestPyRecursion) ... Fatal Python error: Cannot recover from stack overflow. Current thread 0x00000e2c (most recent call first): File "C:\projects\cpython\lib\json\decoder.py", line 83 in py_scanstring File "C:\projects\cpython\lib\json\decoder.py", line 167 in JSONObject File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject (...) File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject File "C:\projects\cpython\lib\json\scanner.py", line 37 in _scan_once File "C:\projects\cpython\lib\json\decoder.py", line 186 in JSONObject ... C:\projects\cpython>set lastexitcode=-1073740791 C:\projects\cpython>set 1>C:\Users\appveyor\AppData\Local\Temp\1\tmp4CD0.tmp C:\projects\cpython>echo C:\projects\cpython 1>C:\Users\appveyor\AppData\Local\Temp\1\tmp4CD1.tmp C:\projects\cpython>exit /b -1073740791 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:05:22 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Tue, 21 May 2019 12:05:22 +0000 Subject: [issue36975] csv: undocumented UnicodeDecodeError on malformed file In-Reply-To: <1558376023.37.0.392859277.issue36975@roundup.psfhosted.org> Message-ID: <1558440322.77.0.448168070149.issue36975@roundup.psfhosted.org> alter-bug-tracer added the comment: Shouldn't all of them be documented? Either that, or converted to csv.Error? Take, for example, the C++ std. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:07:46 2019 From: report at bugs.python.org (viocal) Date: Tue, 21 May 2019 12:07:46 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558440466.24.0.698381463604.issue36981@roundup.psfhosted.org> viocal added the comment: thanks you but I think protocol.resume_writing() / protocol.pause_writing() is auto called by Protocol because set transport.set_write_buffer_limits(high=65536*2, low=16384*2) #default (high=65536, low=16384) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:11:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:11:35 +0000 Subject: [issue36973] test_json.test_recursion.TestPyRecursion.test_endless_recursion stack overflow in AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1558374336.39.0.468050668046.issue36973@roundup.psfhosted.org> Message-ID: <1558440695.77.0.471291108481.issue36973@roundup.psfhosted.org> STINNER Victor added the comment: The mashal also caused similar issues with stack overflow in the past: commit f6c69e6cc9aac35564a2a2a7ecc43fa8db6da975 Author: Steve Dower Date: Sat Nov 1 15:15:16 2014 -0700 #22734 marshal needs a lower stack depth for debug builds on Windows commit 24e33acf8c422f6b8f84387242ff7874012f7291 Author: Victor Stinner Date: Sun Jul 7 02:49:07 2013 +0200 Issue #17206: On Windows, increase the stack size from 2 MB to 4.2 MB to fix a stack overflow in the marshal module (fix a crash in test_marshal). Patch written by Jeremy Kloth. History of PyOS_CheckStack: commit 5299935be5acefae819bcc08a888a9466747d7cb Author: Kristj?n Valur J?nsson Date: Mon Feb 18 17:40:47 2008 +0000 Perform correct handling of stack overflow for windows: Catch the correct exception code and reset the overflow condition when handled. commit dc61901dd2b1bcb5467ebc36ef35a51106d9b103 Author: Amaury Forgeot d'Arc Date: Sat Nov 22 20:01:18 2008 +0000 #3996: On Windows, PyOS_CheckStack is supposed to protect the interpreter from stack overflow. But doing this, it always crashes when the stack is nearly full. Reviewed by Martin von Loewis. Will backport to 2.6. commit 92e4dd865709f4a4be2b11453ef4de954b8d7b14 Author: Tim Peters Date: Sat Oct 5 01:47:34 2002 +0000 s/_alloca/alloca/g; Windows doesn't need the former, at least not unless __STDC__ is defined (or something like that ...). commit 399739f79f1d6cef6bc8a8ec63f9a81255464f15 Author: Fred Drake Date: Thu Aug 31 05:52:44 2000 +0000 PyOS_CheckStack(): Better ANSI'fy this while we're at it. commit 2f15b25da2060ab723e0bb82a8f4f713d547b2b8 Author: Fredrik Lundh Date: Sun Aug 27 19:15:31 2000 +0000 implements PyOS_CheckStack for Windows and MSVC. this fixes a couple of potential stack overflows, including bug #110615. closes patch #101238 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:12:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:12:17 +0000 Subject: [issue25329] test_json crashes with stack overflow on Windows In-Reply-To: <1444164061.67.0.762118597604.issue25329@psf.upfronthosting.co.za> Message-ID: <1558440737.27.0.49859823331.issue25329@roundup.psfhosted.org> STINNER Victor added the comment: No activity for 4 years. I close the issue. See bpo-36973 for a similar issue in 2019. ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:12:20 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Tue, 21 May 2019 12:12:20 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1558440740.7.0.408377951522.issue36816@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: Hi Michael Felt, > And, what it looks like you are trying to do with an updated 'signing" .pem is to remove the 'self-signed' charasteric. If I understand it correctly, the new certificate is indeed still self-signed. It's updated to match the certificate deployed at https://self-signed.pythontest.net/. Under the hood load_verify_locations() at line 1628 is used to make the test accept any valid certificate signed with the given certificate. As a record, with CPython e7cb23bf2079087068a08502f96fdf20b317d69c and OpenSSL 1.1.1b on Arch Linux x86_64, the test is green: test_networked_good_cert (test.test_httplib.HTTPSTest) ... ok By the way, I believe the "key too weak" workaround can be removed now and then this issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:13:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:13:10 +0000 Subject: [issue36973] test_json.test_recursion.TestPyRecursion.test_endless_recursion stack overflow in AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1558374336.39.0.468050668046.issue36973@roundup.psfhosted.org> Message-ID: <1558440790.93.0.88161302089.issue36973@roundup.psfhosted.org> STINNER Victor added the comment: bpo-25329 was a similar json crash with stack overflow in 2015. The issue gives pointers to: * bpo-25222: 3.5.0 regression - Fatal Python error: Cannot recover from stack overflow * bpo-25342: test_json segfault on OpenBSD ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:13:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:13:15 +0000 Subject: [issue36973] test_json.test_recursion.TestPyRecursion.test_endless_recursion stack overflow in AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1558374336.39.0.468050668046.issue36973@roundup.psfhosted.org> Message-ID: <1558440795.71.0.0160964284134.issue36973@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:14:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:14:23 +0000 Subject: [issue36973] test_json.test_recursion.TestPyRecursion.test_endless_recursion stack overflow in AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1558374336.39.0.468050668046.issue36973@roundup.psfhosted.org> Message-ID: <1558440863.83.0.325431802836.issue36973@roundup.psfhosted.org> STINNER Victor added the comment: See also: * bpo-25240: Stack overflow in reprlib causes a core dump * bpo-28913: "Fatal Python error: Cannot recover from stack overflow." from RecursionError in Python 3.5 * bpo-22583: C stack overflow in the Python 2.7 compiler ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:14:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:14:53 +0000 Subject: [issue31850] test_nntplib failed with "nntplib.NNTPDataError: line too long" In-Reply-To: <1508780715.86.0.213398074469.issue31850@psf.upfronthosting.co.za> Message-ID: <1558440893.85.0.461208927866.issue31850@roundup.psfhosted.org> STINNER Victor added the comment: I didn't see this issue recently, so I just close it. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:15:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:15:55 +0000 Subject: [issue35828] test_multiprocessing_fork: segmentation error in PyDict_GetItem on AIX In-Reply-To: <1548421607.34.0.921297585279.issue35828@roundup.psfhosted.org> Message-ID: <1558440955.04.0.0292604228075.issue35828@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-36752. ---------- nosy: +vstinner title: test_multiprocessing_fork - crashes in PyDict_GetItem - segmentation error -> test_multiprocessing_fork: segmentation error in PyDict_GetItem on AIX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:19:13 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 21 May 2019 12:19:13 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558441153.66.0.372485584743.issue36981@roundup.psfhosted.org> Andrew Svetlov added the comment: No. pause_writing/resume_writing are protocol callbacks called by transport. User code should respond to these callbacks by stopping sending data to transport (transport.write()). The logic is a little complicated but it is ok for very low-level asyncio API. Convenient user-facing wrappers like asyncio streams hide this logic by providing high-level primitives that support flow-control out of the box I'm closing the issue, nothing to do here on asyncio low-level side. ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:21:28 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 21 May 2019 12:21:28 +0000 Subject: [issue36973] test_json.test_recursion.TestPyRecursion.test_endless_recursion stack overflow in AMD64 Windows8.1 Non-Debug 3.x In-Reply-To: <1558374336.39.0.468050668046.issue36973@roundup.psfhosted.org> Message-ID: <1558441288.19.0.675619854651.issue36973@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I have seen it occurring consistently in my PR 10307 in Travis and AppVeyor. It seems to be reproducible by importing ast at the top in inspect module which seems to have an effect as libregrtest is used to run the test_json. Using unittest module to run test_json doesn't seem to crash the last time I have checked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:22:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:22:48 +0000 Subject: [issue35828] test_multiprocessing_fork: segmentation error in PyDict_GetItem on AIX In-Reply-To: <1548421607.34.0.921297585279.issue35828@roundup.psfhosted.org> Message-ID: <1558441368.52.0.654854880211.issue35828@roundup.psfhosted.org> STINNER Victor added the comment: """ ... _PyObject_FastCallDict(callable = (nil), args = 0x2008bf70, nargs = 540036208, kwargs = 0x0000014d), line 100 in "call.c" object_vacall(callable = 0x100de658, vargs = warning: Unable to access address 0xdbdbdbdb from core (invalid char ptr (0xdbdbdbdb))), line 1200 in "call.c" _PyObject_CallMethodIdObjArgs(obj = 0x30061db0, name = 0x20039710, ... = 0x304e9fa8, 0x3003a7a0, 0x0, 0x4deb7, 0xcb, 0x306aee88), line 1250 in "call.c" import_find_and_load(abs_name = 0x3097abf8), line 1652 in "import.c" ... """ Extract of _PyObject_CallMethodIdObjArgs: PyObject * _PyObject_CallMethodIdObjArgs(PyObject *obj, struct _Py_Identifier *name, ...) { va_list vargs; PyObject *callable, *result; if (obj == NULL || name == NULL) { return null_error(); } callable = _PyObject_GetAttrId(obj, name); if (callable == NULL) { return NULL; } va_start(vargs, name); result = object_vacall(callable, vargs); va_end(vargs); Py_DECREF(callable); return result; } I don't know how va_list and va_start are implemented in XLC, but 0xDBDBDBDB looks like the byte pattern for released memory in Python: you can now use _PyMem_IsPtrFreed() function from pycore_pymem.h to check if a pointer looks like "freed": static inline int _PyMem_IsPtrFreed(void *ptr) { uintptr_t value = (uintptr_t)ptr; #if SIZEOF_VOID_P == 8 return (value == (uintptr_t)0xCDCDCDCDCDCDCDCD || value == (uintptr_t)0xDDDDDDDDDDDDDDDD || value == (uintptr_t)0xFDFDFDFDFDFDFDFD); #elif SIZEOF_VOID_P == 4 return (value == (uintptr_t)0xCDCDCDCD || value == (uintptr_t)0xDDDDDDDD || value == (uintptr_t)0xFDFDFDFD); #else # error "unknown pointer size" #endif } Maybe modify object_vacall() to add "assert(!_PyMem_IsPtrFreed(vargs));". You may need #include "pycore_pymem.h". Good luck with debug :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:26:42 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Tue, 21 May 2019 12:26:42 +0000 Subject: [issue36991] zipfile: AttributeError on extract Message-ID: <1558441602.37.0.911226270551.issue36991@roundup.psfhosted.org> New submission from alter-bug-tracer : The following code throws an AttributeError when attempting to extract a malformed archive (attached): import zipfile import sys zf = zipfile.ZipFile(sys.argv[1]) for info in zf.infolist(): zf.extract(info.filename) Result: Traceback (most recent call last): File "code.py", line 6, in zf.extract(info.filename) File "/usr/local/lib/python3.8/zipfile.py", line 1607, in extract return self._extract_member(member, path, pwd) File "/usr/local/lib/python3.8/zipfile.py", line 1677, in _extract_member with self.open(member, pwd=pwd) as source, \ File "/usr/local/lib/python3.8/zipfile.py", line 1548, in open return ZipExtFile(zef_file, mode, zinfo, zd, True) File "/usr/local/lib/python3.8/zipfile.py", line 801, in __init__ self._decompressor = _get_decompressor(self._compress_type) File "/usr/local/lib/python3.8/zipfile.py", line 708, in _get_decompressor return bz2.BZ2Decompressor() AttributeError: 'NoneType' object has no attribute 'BZ2Decompressor' ---------- files: attr0.zip messages: 343035 nosy: alter-bug-tracer priority: normal severity: normal status: open title: zipfile: AttributeError on extract type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file48346/attr0.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:29:31 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Tue, 21 May 2019 12:29:31 +0000 Subject: [issue36992] zipfile: AttributeError on extract (LZMA) Message-ID: <1558441771.7.0.234228276725.issue36992@roundup.psfhosted.org> New submission from alter-bug-tracer : The following code throws an AttributeError when attempting to extract a malformed archive (attached): import zipfile import sys zf = zipfile.ZipFile(sys.argv[1]) for info in zf.infolist(): zf.extract(info.filename) Result: Traceback (most recent call last): File "code.py", line 6, in zf.extract(info.filename) File "/usr/local/lib/python3.8/zipfile.py", line 1607, in extract return self._extract_member(member, path, pwd) File "/usr/local/lib/python3.8/zipfile.py", line 1679, in _extract_member shutil.copyfileobj(source, target) File "/usr/local/lib/python3.8/shutil.py", line 198, in copyfileobj buf = fsrc_read(length) File "/usr/local/lib/python3.8/zipfile.py", line 903, in read data = self._read1(n) File "/usr/local/lib/python3.8/zipfile.py", line 986, in _read1 data = self._decompressor.decompress(data) File "/usr/local/lib/python3.8/zipfile.py", line 635, in decompress self._decomp = lzma.LZMADecompressor(lzma.FORMAT_RAW, filters=[ AttributeError: 'NoneType' object has no attribute 'LZMADecompressor' ---------- files: attr1.zip messages: 343036 nosy: alter-bug-tracer priority: normal severity: normal status: open title: zipfile: AttributeError on extract (LZMA) type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file48347/attr1.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:30:50 2019 From: report at bugs.python.org (Matej Cepl) Date: Tue, 21 May 2019 12:30:50 +0000 Subject: [issue28971] nntplib is broken when responses are longer than _MAXLINE In-Reply-To: <1481716454.12.0.730668429479.issue28971@psf.upfronthosting.co.za> Message-ID: <1558441850.88.0.907955029606.issue28971@roundup.psfhosted.org> Matej Cepl added the comment: Could @xdegaye make a PR for this? ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:32:49 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Tue, 21 May 2019 12:32:49 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract Message-ID: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> New submission from alter-bug-tracer : The following code throws an IndexError when attempting to extract a malformed archive (attached): import zipfile import sys zf = zipfile.ZipFile(sys.argv[1]) for info in zf.infolist(): zf.extract(info.filename) Result: Traceback (most recent call last): File "code.py", line 4, in zf = zipfile.ZipFile(sys.argv[1]) File "/usr/local/lib/python3.8/zipfile.py", line 1230, in __init__ self._RealGetContents() File "/usr/local/lib/python3.8/zipfile.py", line 1353, in _RealGetContents x._decodeExtra() File "/usr/local/lib/python3.8/zipfile.py", line 480, in _decodeExtra self.file_size = counts[idx] IndexError: tuple index out of range ---------- files: index_tuple.zip messages: 343038 nosy: alter-bug-tracer priority: normal severity: normal status: open title: zipfile: tuple IndexError on extract versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48348/index_tuple.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:34:45 2019 From: report at bugs.python.org (Matej Cepl) Date: Tue, 21 May 2019 12:34:45 +0000 Subject: [issue19613] test_nntplib: sporadic failures, test_article_head_body() In-Reply-To: <1384536645.9.0.862907413915.issue19613@psf.upfronthosting.co.za> Message-ID: <1558442085.64.0.454757166532.issue19613@roundup.psfhosted.org> Matej Cepl added the comment: Could anybody make a PR from these patches? @vstinner, would you make me a review if I do it? ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:40:28 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 21 May 2019 12:40:28 +0000 Subject: [issue36975] csv: undocumented UnicodeDecodeError on malformed file In-Reply-To: <1558376023.37.0.392859277.issue36975@roundup.psfhosted.org> Message-ID: <1558442428.29.0.711729507248.issue36975@roundup.psfhosted.org> R?mi Lapeyre added the comment: I don't think all errors can be documented, csv iterate over the object but has no idea what it is. When writing for example, anything could happen, from a socket timing out, permissions errors, the underlying media being removed not properly, the media having no more space, etc... ISTM that catching all those exceptions and hiding them behind csv.Error is bad practice and not recommended. In C++, uncaught exceptions are part of the function signature so it easier to do this but in Python we have no idea what the object you gave can raise when iterating over it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:50:18 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 12:50:18 +0000 Subject: [issue36970] Rename _PyObject_FastCallKeywords In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558443018.05.0.300214517608.issue36970@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- title: Rename _PyObject_FastCall functions -> Rename _PyObject_FastCallKeywords _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:51:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 12:51:43 +0000 Subject: [issue36970] Rename _PyObject_FastCallKeywords In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558443103.05.0.818850084299.issue36970@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:52:19 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 12:52:19 +0000 Subject: [issue36970] Rename _PyObject_FastCallKeywords In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558443139.24.0.108725502818.issue36970@roundup.psfhosted.org> Jeroen Demeyer added the comment: What's your opinion on renaming also _PyCFunction_FastCallKeywords -> _PyCFunction_Vectorcall _PyFunction_FastCallKeywords -> _PyFunction_Vectorcall If you agree, I will add it to the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 08:58:42 2019 From: report at bugs.python.org (viocal) Date: Tue, 21 May 2019 12:58:42 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558443522.85.0.652428657882.issue36981@roundup.psfhosted.org> viocal added the comment: for example the system free memory size is 512m and filedata size is 500m will transport Success but filedata than 512m will be failed ---------- resolution: not a bug -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 09:02:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 21 May 2019 13:02:30 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558443750.36.0.126385031044.issue36981@roundup.psfhosted.org> Andrew Svetlov added the comment: Please re-read my previous comment. If you use asyncio incorrectly -- yes, you can run out of memory. The proper usage of pause_readind()/resume_reading() resolves the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 09:05:13 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 13:05:13 +0000 Subject: [issue36994] Missing tests for CALL_FUNCTION_EX opcode profiling method_descriptor Message-ID: <1558443913.24.0.484084553797.issue36994@roundup.psfhosted.org> New submission from Jeroen Demeyer : The branch for profiling a method_descriptor inside do_call_core is not tested by the test suite. ---------- components: Tests messages: 343044 nosy: jdemeyer priority: normal severity: normal status: open title: Missing tests for CALL_FUNCTION_EX opcode profiling method_descriptor versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 09:12:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 13:12:39 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1558444359.43.0.595828989767.issue30458@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bb8071a4cae5ab3fe321481dd3d73662ffb26052 by Victor Stinner in branch '2.7': bpo-30458: Disallow control chars in http URLs (GH-12755) (GH-13154) (GH-13315) https://github.com/python/cpython/commit/bb8071a4cae5ab3fe321481dd3d73662ffb26052 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 09:16:08 2019 From: report at bugs.python.org (Jake Tesler) Date: Tue, 21 May 2019 13:16:08 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558444568.3.0.0484449564845.issue36084@roundup.psfhosted.org> Jake Tesler added the comment: I will implement these changes - let?s try to hit that end-of-month target! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 09:16:38 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 13:16:38 +0000 Subject: [issue36994] Missing tests for CALL_FUNCTION_EX opcode profiling method_descriptor In-Reply-To: <1558443913.24.0.484084553797.issue36994@roundup.psfhosted.org> Message-ID: <1558444598.86.0.0773187632933.issue36994@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13371 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 09:29:19 2019 From: report at bugs.python.org (JUN-WEI SONG) Date: Tue, 21 May 2019 13:29:19 +0000 Subject: [issue36988] zipfile: string IndexError on extract In-Reply-To: <1558435795.93.0.150119411648.issue36988@roundup.psfhosted.org> Message-ID: <1558445359.8.0.626971076821.issue36988@roundup.psfhosted.org> JUN-WEI SONG added the comment: The following output throws error when using unzip -t $ unzip -t file0.zip Output: Archive: file0.zip : mismatching "local" filename (zipfile_extract.pyUT^I), continuing with "central" filename version testing: error: invalid compressed data to inflate At least one error was detected in file0.zip. It looks like the zip file is corrupted. Maybe we could add some detection mechanisms before extract it like unzip, for example, unsupported characters or file corrupted check. ---------- nosy: +krnick _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 09:53:22 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 21 May 2019 13:53:22 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1558446802.78.0.953518388454.issue36797@roundup.psfhosted.org> Change by Nick Coghlan : ---------- pull_requests: +13372 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 09:55:23 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 21 May 2019 13:55:23 +0000 Subject: [issue36978] `python3 -m pip install` has no `--requirement` option on Windows In-Reply-To: <1558386497.6.0.534415104881.issue36978@roundup.psfhosted.org> Message-ID: <1558446923.64.0.312458296578.issue36978@roundup.psfhosted.org> Change by Eric V. Smith : ---------- stage: -> test needed status: open -> pending type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 09:55:25 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 21 May 2019 13:55:25 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1558446925.36.0.232687771927.issue36797@roundup.psfhosted.org> Nick Coghlan added the comment: While I do have a second PR open with some additional smaller cleanups, the first PR removed the outdated information that seemed most problematic. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 09:59:53 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 21 May 2019 13:59:53 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1558447193.78.0.594444036061.issue33071@roundup.psfhosted.org> Nick Coghlan added the comment: This has been merged for 3.8 and 3.7, but not for 2.7, since the docs have diverged far enough that the automatic backport didn't work: https://github.com/python/cpython/pull/13087#issuecomment-494402704 Given the proximity to the general end of life of the Python 2.7 documentation anyway, I'm inclined to just close this based on the 3.x changes, and not worry about the 2.7 version of the docs. Thoughts? ---------- stage: patch review -> backport needed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:08:11 2019 From: report at bugs.python.org (stefan) Date: Tue, 21 May 2019 14:08:11 +0000 Subject: [issue36980] pass-by-reference clues In-Reply-To: <1558401340.01.0.437261890816.issue36980@roundup.psfhosted.org> Message-ID: <1242840634.3024260.1558447685983@mail.yahoo.com> stefan added the comment: Thank you for your reply and the lucid explanation.? On Monday, May 20, 2019, 9:15:42 PM EDT, Steven D'Aprano wrote: Steven D'Aprano added the comment: Hi Stefan, and welcome. This is not a help desk, you really should ask elsewhere for explanations of how Python works. There are no bugs here: what you are seeing is standard pass-by-object behaviour. You are misinterpreting what you are seeing. Python is never pass by reference or pass by value. https://en.wikipedia.org/wiki/Evaluation_strategy https://www.effbot.org/zone/call-by-object.htm *All* function objects, whether strings, ints, lists or numpy arrays, are passed as objects. If you want to make a copy, you have to explicitly make a copy. If you don't, and you mutate the object in place, you will see the mutation in both places. > Shouldn't the id of each variable be different if they are different instances? Not necessarily: IDs can be reused. Without seeing the actual running code, I can't tell if the IDs have been used or if they are the same ID because they are the same object. > Would it possible for the python interpreter/compiler to let me know when a function is going to clobber a variable that is not used in the function or passed to the function or returned by the function Python never clobbers a variable not used in the function. It may however mutate an object which is accessible from both inside and outside a function. ---------- nosy: +steven.daprano resolution:? -> not a bug stage:? -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:08:19 2019 From: report at bugs.python.org (stefan) Date: Tue, 21 May 2019 14:08:19 +0000 Subject: [issue36980] pass-by-reference clues In-Reply-To: <1558401379.57.0.950724014939.issue36980@roundup.psfhosted.org> Message-ID: <1442874375.3060809.1558447695729@mail.yahoo.com> stefan added the comment: Thank you for your reply and the lucid explanation. On Monday, May 20, 2019, 9:17:34 PM EDT, Josh Rosenberg wrote: Josh Rosenberg added the comment: 1. This is a bug tracker for bugs in the Python language spec and the CPython interpreter, not a general problem solving site. 2. The ids will differ for changeValue2 if you actually call it (kernel = kernel + 2 requires the the old id of kernel differ from the new id, because they both exist simultaneously, and are different objects); I'm guessing you're calling the wrong function or printing the ids of the wrong variables. 3. "Would it possible for the python interpreter/compiler to let me know when a function is going to clobber a variable that is not used in the function or passed to the function or returned by the function" Every bit of clobbering you're seeing involves a variable passed to the function (and sometimes returned by it). CVkernel=myKernel just made two names that bind to the same underlying object, so passing either name as an argument to a function that modifies its arguments will modify what is seen from both names. That's how mutable objects work. This is briefly addressed in the tutorial here: https://docs.python.org/3/tutorial/classes.html#a-word-about-names-and-objects . As a general rule, Python built-ins *either* modify their arguments in place and return nothing (None) *or* return new values leaving the arguments unmodified. It's a matter of programmer discipline to adhere to this practice in your own code (numpy does make it harder, since it uses views extensively, making slicing not an effective way to copy inputs). All that said, this isn't a bug. It's a longstanding feature of Python alias arguments to avoid expensive deep copies by default; the onus is on the function writer to copy if needed, or to document the behavior if mutation of the arguments is to occur. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:17:43 2019 From: report at bugs.python.org (alter-bug-tracer) Date: Tue, 21 May 2019 14:17:43 +0000 Subject: [issue36988] zipfile: string IndexError on extract In-Reply-To: <1558435795.93.0.150119411648.issue36988@roundup.psfhosted.org> Message-ID: <1558448263.8.0.374943781403.issue36988@roundup.psfhosted.org> alter-bug-tracer added the comment: Hi, The zip is corrupted on purpose. I agree, every input should be checked before doing stuff with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:36:37 2019 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 21 May 2019 14:36:37 +0000 Subject: [issue28971] nntplib is broken when responses are longer than _MAXLINE In-Reply-To: <1481716454.12.0.730668429479.issue28971@psf.upfronthosting.co.za> Message-ID: <1558449397.17.0.893632606885.issue28971@roundup.psfhosted.org> Xavier de Gaye added the comment: What do you mean ? What is "this" ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:42:32 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Tue, 21 May 2019 14:42:32 +0000 Subject: [issue36230] Please sort assertSetEqual's output In-Reply-To: <1551996028.77.0.0944355403743.issue36230@roundup.psfhosted.org> Message-ID: <1558449752.77.0.318641281107.issue36230@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Jess, are you still working on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:44:32 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 14:44:32 +0000 Subject: [issue28971] nntplib is broken when responses are longer than _MAXLINE In-Reply-To: <1481716454.12.0.730668429479.issue28971@psf.upfronthosting.co.za> Message-ID: <1558449872.84.0.164213943078.issue28971@roundup.psfhosted.org> Matthias Bussonnier added the comment: Would that be anyway closed by pep 594 (https://www.python.org/dev/peps/pep-0594/#nntplib) which suggest the removal nntp ? ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:49:06 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 21 May 2019 14:49:06 +0000 Subject: [issue28971] nntplib is broken when responses are longer than _MAXLINE In-Reply-To: <1481716454.12.0.730668429479.issue28971@psf.upfronthosting.co.za> Message-ID: <1558450146.56.0.485933406658.issue28971@roundup.psfhosted.org> Christian Heimes added the comment: No, the module is still supported until EOL of Python 3.9. I expect 3.9 to go into security fix-only mode in 2024. ---------- versions: +Python 3.8, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:50:39 2019 From: report at bugs.python.org (Jake Tesler) Date: Tue, 21 May 2019 14:50:39 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558450239.85.0.5751840188.issue36084@roundup.psfhosted.org> Change by Jake Tesler : ---------- pull_requests: +13373 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:50:58 2019 From: report at bugs.python.org (Matej Cepl) Date: Tue, 21 May 2019 14:50:58 +0000 Subject: [issue28971] nntplib is broken when responses are longer than _MAXLINE In-Reply-To: <1481716454.12.0.730668429479.issue28971@psf.upfronthosting.co.za> Message-ID: <1558450258.67.0.199234762248.issue28971@roundup.psfhosted.org> Matej Cepl added the comment: @mbussonn That's exactly the point: I completely disagree with removal of nntplib from the standard library, so I went through all bugs here related to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:51:12 2019 From: report at bugs.python.org (Jake Tesler) Date: Tue, 21 May 2019 14:51:12 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558450272.13.0.116803653781.issue36084@roundup.psfhosted.org> Jake Tesler added the comment: New PR created with requested edits. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:53:02 2019 From: report at bugs.python.org (Jake Tesler) Date: Tue, 21 May 2019 14:53:02 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558450382.79.0.105319382059.issue36084@roundup.psfhosted.org> Jake Tesler added the comment: Victor Stinner: would you mind taking a look at the new PR? Is this more along the lines of what you had in mind? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:53:24 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 14:53:24 +0000 Subject: [issue36995] tp_print -> tp_vectorcall_offset Message-ID: <1558450404.41.0.511752439541.issue36995@roundup.psfhosted.org> New submission from Jeroen Demeyer : If PEP 590 is accepted: in code comments, replace tp_print by tp_vectorcall_offset and (while we're at it) tp_reserved by tp_as_async. ---------- components: Interpreter Core messages: 343061 nosy: Mark.Shannon, jdemeyer, petr.viktorin priority: normal severity: normal status: open title: tp_print -> tp_vectorcall_offset versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:56:23 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 21 May 2019 14:56:23 +0000 Subject: [issue28971] nntplib is broken when responses are longer than _MAXLINE In-Reply-To: <1481716454.12.0.730668429479.issue28971@psf.upfronthosting.co.za> Message-ID: <1558450583.84.0.541927706413.issue28971@roundup.psfhosted.org> Christian Heimes added the comment: Matej, would you be interested to fork nntplib and take over maintenance and responsibility? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:57:12 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 21 May 2019 14:57:12 +0000 Subject: [issue36970] Rename _PyObject_FastCallKeywords In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558450632.72.0.144488452255.issue36970@roundup.psfhosted.org> Petr Viktorin added the comment: If and when a function uses the vectorcall protocol (including the argument offset flag), it makes sense to rename it to vectorcall. Doing it before is misleading, IMO. Splitting fixes to unrelated issues (like bpo-36907) from PEP 590 is great, but this one needs to be merged together with PEP 590. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:58:04 2019 From: report at bugs.python.org (Matej Cepl) Date: Tue, 21 May 2019 14:58:04 +0000 Subject: [issue28971] nntplib is broken when responses are longer than _MAXLINE In-Reply-To: <1481716454.12.0.730668429479.issue28971@psf.upfronthosting.co.za> Message-ID: <1558450684.94.0.243385610338.issue28971@roundup.psfhosted.org> Matej Cepl added the comment: If that was the price of keeping nntplib inside of the Python standard library, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 10:59:49 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 21 May 2019 14:59:49 +0000 Subject: [issue36995] tp_print -> tp_vectorcall_offset In-Reply-To: <1558450404.41.0.511752439541.issue36995@roundup.psfhosted.org> Message-ID: <1558450789.1.0.518230053372.issue36995@roundup.psfhosted.org> Petr Viktorin added the comment: All these issues are quite confusing. If PEP 590 is accepted, all of it will need to be implemented. Why open separate issues for all the parts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 11:07:51 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 15:07:51 +0000 Subject: [issue33563] fileinput input's and Fileinput's bufsize=0 do not remit deprecationWarnings In-Reply-To: <1526593521.99.0.682650639539.issue33563@psf.upfronthosting.co.za> Message-ID: <1558451271.83.0.221302155041.issue33563@roundup.psfhosted.org> Matthias Bussonnier added the comment: bufsize has now been removed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 11:13:39 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 15:13:39 +0000 Subject: [issue36970] Rename _PyObject_FastCallKeywords In-Reply-To: <1558341640.29.0.256678092475.issue36970@roundup.psfhosted.org> Message-ID: <1558451619.69.0.665070771891.issue36970@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 11:16:46 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 21 May 2019 15:16:46 +0000 Subject: [issue36995] tp_print -> tp_vectorcall_offset In-Reply-To: <1558450404.41.0.511752439541.issue36995@roundup.psfhosted.org> Message-ID: <1558451806.82.0.971845542733.issue36995@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- keywords: +patch pull_requests: +13375 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 11:22:08 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 21 May 2019 15:22:08 +0000 Subject: [issue36996] unittest.mock.patch decorator doesn't work with async functions Message-ID: <1558452128.6.0.303675531512.issue36996@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : I came across this while using AsyncMock but it seems to apply to Mock/MagicMock too. When patch decorator is used to wrap an async function to mock sync or async functions it doesn't seem to work. Manually adding patcher or using patch as context manager works. Meanwhile sync_main which is not an async function works fine. Is this an expected behavior with @patch and async def? Does evaluating an async function with asyncio.run has any effect on this? Debugging it tells me the correct object is being replaced with AsyncMock inside patch. import asyncio from unittest.mock import patch, AsyncMock mock = AsyncMock() async def foo(): pass def bar(): pass @patch(f"{__name__}.foo", mock) @patch(f"{__name__}.bar", mock) async def main(): print(f"Inside main {foo=}") patcher1 = patch(f"{__name__}.foo", mock) patcher2 = patch(f"{__name__}.bar", mock) print(f"Inside main before patch start {foo} {bar}") patcher1.start() patcher2.start() print(f"Inside main after patch start {foo} {bar}") await foo() with patch(f"{__name__}.foo", mock): with patch(f"{__name__}.bar", mock): print(f"Inside main with {foo} {bar}") await foo() @patch(f"{__name__}.foo", mock) @patch(f"{__name__}.bar", mock) def sync_main(): print(f"Inside sync_main patch {foo} {bar}") with patch(f"{__name__}.foo", mock): with patch(f"{__name__}.bar", mock): print(f"Inside sync_main with {foo} {bar}") if __name__ == "__main__": asyncio.run(main()) sync_main() ./python.exe foo.py Inside main foo= Inside main before patch start Inside main after patch start Inside main with Inside sync_main patch Inside sync_main with ---------- components: Library (Lib), asyncio messages: 343067 nosy: asvetlov, cjw296, lisroach, michael.foord, xtreak, yselivanov priority: normal severity: normal status: open title: unittest.mock.patch decorator doesn't work with async functions type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 11:23:09 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 21 May 2019 15:23:09 +0000 Subject: [issue34144] venv activate.bat reset codepage fails on windows 10 In-Reply-To: <1531901922.72.0.56676864532.issue34144@psf.upfronthosting.co.za> Message-ID: <1558452189.99.0.539595883038.issue34144@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13376 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 11:41:48 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 21 May 2019 15:41:48 +0000 Subject: [issue34144] venv activate.bat reset codepage fails on windows 10 In-Reply-To: <1531901922.72.0.56676864532.issue34144@psf.upfronthosting.co.za> Message-ID: <1558453308.01.0.696189440976.issue34144@roundup.psfhosted.org> miss-islington added the comment: New changeset 3c9c2dc8dde709a5f27c74aff1614d6ed3456964 by Miss Islington (bot) in branch '3.7': bpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321) https://github.com/python/cpython/commit/3c9c2dc8dde709a5f27c74aff1614d6ed3456964 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 11:43:47 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 21 May 2019 15:43:47 +0000 Subject: [issue28971] nntplib is broken when responses are longer than _MAXLINE In-Reply-To: <1481716454.12.0.730668429479.issue28971@psf.upfronthosting.co.za> Message-ID: <1558453427.86.0.0760772418874.issue28971@roundup.psfhosted.org> Christian Heimes added the comment: I mean fork, as in maintain your own fork on PyPI and outside of Python core. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 12:20:41 2019 From: report at bugs.python.org (Abhilash Raj) Date: Tue, 21 May 2019 16:20:41 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1558455641.14.0.12493387309.issue21315@roundup.psfhosted.org> Abhilash Raj added the comment: Created a Pull Request for this. https://github.com/python/cpython/pull/13425 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 12:32:50 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 21 May 2019 16:32:50 +0000 Subject: [issue36995] tp_print -> tp_vectorcall_offset In-Reply-To: <1558450404.41.0.511752439541.issue36995@roundup.psfhosted.org> Message-ID: <1558456370.02.0.856513077485.issue36995@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I would suggest centralizing all PRs on the same issue as Petr is indicating to reduce the noise, especially before the PEP is accepted. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 13:00:09 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 21 May 2019 17:00:09 +0000 Subject: [issue36997] Document that spwd is considered harmful Message-ID: <1558458009.82.0.580344483538.issue36997@roundup.psfhosted.org> New submission from Christian Heimes : The spwd module has several flaws. Especially the combination of spwd and crypt for password verification is dangerous and in almost all cases technically wrong. # don't do this! pw1 = spwd.getspnam(username).sp_pwd pw2 = crypt.crypt(password, pw1) if pw1 == pw2: ... On BSD, Linux, and macOS, account and credential verification must go through PAM. Also see: https://mail.python.org/pipermail/python-dev/2019-May/157562.html https://mail.python.org/pipermail/python-dev/2019-May/157564.html ---------- assignee: christian.heimes components: Documentation, Extension Modules messages: 343072 nosy: christian.heimes priority: high severity: normal stage: needs patch status: open title: Document that spwd is considered harmful type: security versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 13:09:33 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 21 May 2019 17:09:33 +0000 Subject: [issue36929] Other Python _io implementations may not expose _io in their type names In-Reply-To: <1557945330.73.0.750176002779.issue36929@roundup.psfhosted.org> Message-ID: <1558458573.77.0.0958832030186.issue36929@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13377 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 13:09:46 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 21 May 2019 17:09:46 +0000 Subject: [issue36929] Other Python _io implementations may not expose _io in their type names In-Reply-To: <1557945330.73.0.750176002779.issue36929@roundup.psfhosted.org> Message-ID: <1558458586.05.0.425825107158.issue36929@roundup.psfhosted.org> Dino Viehland added the comment: New changeset ccb7ca728e09b307f9e9fd36ec40353137e68a3b by Dino Viehland (Max Bernstein) in branch 'master': bpo-36929: Modify io/re tests to allow for missing mod name (#13392) https://github.com/python/cpython/commit/ccb7ca728e09b307f9e9fd36ec40353137e68a3b ---------- nosy: +dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 13:33:06 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 21 May 2019 17:33:06 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable Message-ID: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> New submission from Toshio Kuratomi : An sdist may contain files whose names are undecodable in the current locale. For instance, the sdist might include some files for testing whose filenames are undecodable because that's the format of the input for that application. Currently, trying to create the sdist fails with output similar to this: Traceback (most recent call last): File "setup.py", line 330, in main() File "setup.py", line 325, in main setup(**setup_params) File "/home/badger/.local/lib/python3.5/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.5/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "setup.py", line 137, in run SDist.run(self) File "/usr/lib/python3.5/distutils/command/sdist.py", line 158, in run self.get_file_list() File "/usr/lib/python3.5/distutils/command/sdist.py", line 214, in get_file_list self.write_manifest() File "/usr/lib/python3.5/distutils/command/sdist.py", line 362, in write_manifest "writing manifest file '%s'" % self.manifest) File "/usr/lib/python3.5/distutils/cmd.py", line 336, in execute util.execute(func, args, msg, dry_run=self.dry_run) File "/usr/lib/python3.5/distutils/util.py", line 301, in execute func(*args) File "/usr/lib/python3.5/distutils/file_util.py", line 236, in write_file f.write(line + "\n") UnicodeEncodeError: 'ascii' codec can't encode characters in position 45-46: ordinal not in range(128) (I replicated the failure case by setting my locale to POSIX and using a standard utf-8 filename but this also applies to having a filename that is not actually text in any locale... as I said, filenames used for testing can run the gamut of odd choices). This traceback is interesting as it occurs during writing of the MANIFEST. That shows that the undecodable file is read in correctly. It's only when writing the file that it fails. Some further debugging showed me that the filename is read in using the surrogateescape error handler. So we can round trip the filename by using the surrogateescase error handler when writing it out. I tested making the following change: - f = open(filename, "w") + f = open(filename, "w", errors="surrogateescape") and sure enough, the sdist is now created correctly. I'll submit a PR to fix this. ---------- components: Distutils messages: 343074 nosy: a.badger, dstufft, eric.araujo priority: normal severity: normal status: open title: distutils sdist command fails to create MANIFEST if any filenames are undecodable versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 13:41:00 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 21 May 2019 17:41:00 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558460460.93.0.256729481657.issue36998@roundup.psfhosted.org> Change by Toshio Kuratomi : ---------- keywords: +patch pull_requests: +13378 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 13:44:52 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 21 May 2019 17:44:52 +0000 Subject: [issue36035] pathlib.Path().rglob() breaks with broken symlinks In-Reply-To: <1550578197.02.0.381973172531.issue36035@roundup.psfhosted.org> Message-ID: <1558460692.79.0.0138534436729.issue36035@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13379 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 13:44:57 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 May 2019 17:44:57 +0000 Subject: [issue36035] pathlib.Path().rglob() breaks with broken symlinks In-Reply-To: <1550578197.02.0.381973172531.issue36035@roundup.psfhosted.org> Message-ID: <1558460697.0.0.774924571469.issue36035@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset d5c120f7eb6f2a9cdab282a5d588afed307a23df by Antoine Pitrou (J?rg Stucke) in branch 'master': bpo-36035: fix Path.rglob for broken links (GH-11988) https://github.com/python/cpython/commit/d5c120f7eb6f2a9cdab282a5d588afed307a23df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 13:47:45 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 21 May 2019 17:47:45 +0000 Subject: [issue23378] argparse.add_argument action parameter should allow value extend In-Reply-To: <1422886990.52.0.318776752581.issue23378@psf.upfronthosting.co.za> Message-ID: <1558460865.37.0.773530608591.issue23378@roundup.psfhosted.org> miss-islington added the comment: New changeset aa32a7e1116f7aaaef9fec453db910e90ab7b101 by Miss Islington (bot) (Batuhan Ta?kaya) in branch 'master': bpo-23378: Add an extend action to argparse (GH-13305) https://github.com/python/cpython/commit/aa32a7e1116f7aaaef9fec453db910e90ab7b101 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 13:51:59 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 21 May 2019 17:51:59 +0000 Subject: [issue36929] Other Python _io implementations may not expose _io in their type names In-Reply-To: <1557945330.73.0.750176002779.issue36929@roundup.psfhosted.org> Message-ID: <1558461119.77.0.326447254233.issue36929@roundup.psfhosted.org> miss-islington added the comment: New changeset 6b48e658bf80b0e30fddd9dfe80021313e57fb6a by Miss Islington (bot) in branch '3.7': bpo-36929: Modify io/re tests to allow for missing mod name (GH-13392) https://github.com/python/cpython/commit/6b48e658bf80b0e30fddd9dfe80021313e57fb6a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 13:53:34 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 21 May 2019 17:53:34 +0000 Subject: [issue23378] argparse.add_argument action parameter should allow value extend In-Reply-To: <1422886990.52.0.318776752581.issue23378@psf.upfronthosting.co.za> Message-ID: <1558461214.59.0.125794944484.issue23378@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 14:29:17 2019 From: report at bugs.python.org (Matej Cepl) Date: Tue, 21 May 2019 18:29:17 +0000 Subject: [issue28971] nntplib is broken when responses are longer than _MAXLINE In-Reply-To: <1481716454.12.0.730668429479.issue28971@psf.upfronthosting.co.za> Message-ID: <1558463357.23.0.426453684333.issue28971@roundup.psfhosted.org> Matej Cepl added the comment: I understood, and I was saying that if you kick nntplib out of the standard library, than I will just embed it into my program and I won't bother to maintain it publicly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 14:31:20 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 21 May 2019 18:31:20 +0000 Subject: [issue36035] pathlib.Path().rglob() breaks with broken symlinks In-Reply-To: <1550578197.02.0.381973172531.issue36035@roundup.psfhosted.org> Message-ID: <1558463480.83.0.698154279222.issue36035@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 14:55:59 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 21 May 2019 18:55:59 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1558464959.21.0.224589955218.issue19376@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +13381 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 14:59:22 2019 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 21 May 2019 18:59:22 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1558465162.31.0.205546241166.issue33071@roundup.psfhosted.org> ?ric Araujo added the comment: My preference would be to have 2.7 doc accurate. Let?s wait a little bit to see if someone picks this up? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 15:01:59 2019 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 21 May 2019 19:01:59 +0000 Subject: [issue24653] Mock.assert_has_calls([]) is surprising for users In-Reply-To: <1437126004.09.0.453747784975.issue24653@psf.upfronthosting.co.za> Message-ID: <1558465319.28.0.732713490723.issue24653@roundup.psfhosted.org> ?ric Araujo added the comment: > And when people understand this API checks inclusion, calling with empty list doesn't make sense at all. I can see a thought process being ?all my other tests use thing.assert_has_calls([call0, call1]), here let?s check there are no calls with thing2.assert_has_calls([])?. Are the correct methods advertised in the right place? (I don?t use mock so I forgot if there is a method to assert not called or if it?s assertEqual(mock calls count, 0) or some False property) ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 15:04:02 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 21 May 2019 19:04:02 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1558465442.3.0.416261279339.issue19376@roundup.psfhosted.org> Tal Einat added the comment: New changeset 390d88e49c55c15fac7cdf60b649a4b9b15d189b by Tal Einat in branch '3.7': [3.7] bpo-19376: Added doc mentioning `datetime.strptime()` without a year fails for Feb 29. (GH-10243) https://github.com/python/cpython/commit/390d88e49c55c15fac7cdf60b649a4b9b15d189b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 15:05:12 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 21 May 2019 19:05:12 +0000 Subject: [issue36035] pathlib.Path().rglob() breaks with broken symlinks In-Reply-To: <1550578197.02.0.381973172531.issue36035@roundup.psfhosted.org> Message-ID: <1558465512.58.0.240246098457.issue36035@roundup.psfhosted.org> miss-islington added the comment: New changeset aea49b18752880e5d0260f16ca7ff2c6dce78515 by Miss Islington (bot) in branch '3.7': [3.7] bpo-36035: fix Path.rglob for broken links (GH-11988) (GH-13469) https://github.com/python/cpython/commit/aea49b18752880e5d0260f16ca7ff2c6dce78515 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 15:05:33 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 May 2019 19:05:33 +0000 Subject: [issue36035] pathlib.Path().rglob() breaks with broken symlinks In-Reply-To: <1550578197.02.0.381973172531.issue36035@roundup.psfhosted.org> Message-ID: <1558465533.35.0.387284895298.issue36035@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 15:05:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 21 May 2019 19:05:34 +0000 Subject: [issue24653] Mock.assert_has_calls([]) is surprising for users In-Reply-To: <1437126004.09.0.453747784975.issue24653@psf.upfronthosting.co.za> Message-ID: <1558465534.16.0.853196290706.issue24653@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > Are the correct methods advertised in the right place? (I don?t use mock so I forgot if there is a method to assert not called or if it?s assertEqual(mock calls count, 0) or some False property) There is assert_not_called https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_not_called >>> from unittest.mock import Mock >>> m = Mock() >>> m.assert_not_called() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 15:06:31 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 21 May 2019 19:06:31 +0000 Subject: [issue36996] unittest.mock.patch decorator doesn't work with async functions In-Reply-To: <1558452128.6.0.303675531512.issue36996@roundup.psfhosted.org> Message-ID: <1558465591.83.0.459020555027.issue36996@roundup.psfhosted.org> Andrew Svetlov added the comment: Thank you very much for raising the question. @patch(...) creates _patch class instance. For decoration _patch.__call__ is used. def __call__(self, func): if isinstance(func, type): return self.decorate_class(func) return self.decorate_callable(func) The code can be modified to def __call__(self, func): if isinstance(func, type): return self.decorate_class(func) if inspect.iscoroutinefunction(func): return self.decorate_async_func(func) return self.decorate_callable(func) decorate_async_func can do all the same as decorate_callable with the only difference: internal @wraps(func) def patched(*args, **keywargs): should be replaced with @wraps(func) async def patched(*args, **keywargs): and return func(*args, **keywargs) replaced with return await func(*args, **keywargs) Pretty straightforward. I did not check the code though. I'm pretty busy up to 3.8 feature freeze to make the PR for proposed change but I love to review the existing patch. Do want somebody to be a champion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 15:08:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 21 May 2019 19:08:34 +0000 Subject: [issue26460] datetime.strptime without a year fails on Feb 29 In-Reply-To: <1456768955.02.0.995801288981.issue26460@psf.upfronthosting.co.za> Message-ID: <1558465714.97.0.669105893775.issue26460@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also issue19376. This behavior is now documented with https://github.com/python/cpython/commit/56027ccd6b9dab4a090e4fef8574933fb9a36ff2 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 15:29:46 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 21 May 2019 19:29:46 +0000 Subject: [issue36996] unittest.mock.patch decorator doesn't work with async functions In-Reply-To: <1558452128.6.0.303675531512.issue36996@roundup.psfhosted.org> Message-ID: <1558466986.95.0.17824007169.issue36996@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks @asvetlov for the explanation. I tried the patch and it works fine for my example with no test failures for mock. I will try to make a PR. Only func(*args, **keywargs) needs to be changed and await requires an async function which I seem to need duplicating the function. I will try if I can refactor that. I will post a PR where this can be discussed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 15:30:15 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 21 May 2019 19:30:15 +0000 Subject: [issue36996] unittest.mock.patch decorator doesn't work with async functions In-Reply-To: <1558452128.6.0.303675531512.issue36996@roundup.psfhosted.org> Message-ID: <1558467015.34.0.755302028459.issue36996@roundup.psfhosted.org> Lisa Roach added the comment: I quickly threw in Andrew's code to check it and looks like it does fix the problem. I'd be happy to add it in but I'll give @xtreak first dibs. Thanks for finding this :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 15:30:49 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 21 May 2019 19:30:49 +0000 Subject: [issue36996] unittest.mock.patch decorator doesn't work with async functions In-Reply-To: <1558452128.6.0.303675531512.issue36996@roundup.psfhosted.org> Message-ID: <1558467049.98.0.657146787355.issue36996@roundup.psfhosted.org> Lisa Roach added the comment: Oops, didn't see your post. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:12:06 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 21 May 2019 20:12:06 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558469526.96.0.165773283586.issue34616@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 565b4f1ac7304d1e690c404ca8316f383ba60862 by Yury Selivanov (Matthias Bussonnier) in branch 'master': bpo-34616: Add PyCF_ALLOW_TOP_LEVEL_AWAIT to allow top-level await (GH-13148) https://github.com/python/cpython/commit/565b4f1ac7304d1e690c404ca8316f383ba60862 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:13:44 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 21 May 2019 20:13:44 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558469624.38.0.132237811938.issue34616@roundup.psfhosted.org> Change by Yury Selivanov : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:16:32 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 21 May 2019 20:16:32 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558469792.24.0.126320946875.issue34616@roundup.psfhosted.org> Andrew Svetlov added the comment: Great! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:27:42 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 21 May 2019 20:27:42 +0000 Subject: [issue25652] collections.UserString.__rmod__() raises NameError In-Reply-To: <1447823769.89.0.495006915909.issue25652@psf.upfronthosting.co.za> Message-ID: <1558470462.91.0.736371088303.issue25652@roundup.psfhosted.org> miss-islington added the comment: New changeset 7abf8c60819d5749e6225b371df51a9c5f1ea8e9 by Miss Islington (bot) (Batuhan Ta?kaya) in branch 'master': bpo-25652: Fix __rmod__ of UserString (GH-13326) https://github.com/python/cpython/commit/7abf8c60819d5749e6225b371df51a9c5f1ea8e9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:39:08 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 20:39:08 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1558471148.91.0.600443002212.issue33725@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:39:08 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 20:39:08 +0000 Subject: [issue25234] test_eintr.test_os_open hangs under Xcode 7 In-Reply-To: <1443210079.4.0.780575467942.issue25234@psf.upfronthosting.co.za> Message-ID: <1558471149.0.0.263986317868.issue25234@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:39:09 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 20:39:09 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1558471149.06.0.351311211053.issue35363@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:45:37 2019 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Tue, 21 May 2019 20:45:37 +0000 Subject: [issue36999] Expose the coroutine object in asyncio task objects Message-ID: <1558471537.52.0.812163346713.issue36999@roundup.psfhosted.org> New submission from Alex Gr?nholm : Both curio and trio expose the coroutine object belonging to a task as the "coro" attribute. Asyncio exposes this as "_coro" (as does uvloop) but it would be nice to have at least a read-only attribute exposing this as part of the public API. In some of my libraries I need this object, sometimes for debugging and other times for implementing "crazy" schemes like running parts of the the coroutine function code in a worker thread. ---------- components: asyncio messages: 343092 nosy: alex.gronholm, asvetlov, yselivanov priority: normal severity: normal status: open title: Expose the coroutine object in asyncio task objects type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:46:47 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 21 May 2019 20:46:47 +0000 Subject: [issue36999] Expose the coroutine object in asyncio task objects In-Reply-To: <1558471537.52.0.812163346713.issue36999@roundup.psfhosted.org> Message-ID: <1558471607.75.0.801860307723.issue36999@roundup.psfhosted.org> Yury Selivanov added the comment: I've no problem with this. We can add a 'get_coro()' Task method (this is in line with asyncio usually having the "getter" api as opposed to properties). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:50:16 2019 From: report at bugs.python.org (Mathis Hammel) Date: Tue, 21 May 2019 20:50:16 +0000 Subject: [issue37000] _randbelow_with_getrandbits function inefficient with powers of two Message-ID: <1558471816.52.0.343821776026.issue37000@roundup.psfhosted.org> New submission from Mathis Hammel : In case _randbelow_with_getrandbits is called with a power of two as its argument (say 2^k), the function will consume k+1 random bits instead of k. Instead of never being rejected, the sampled number will be rejected on average once per call, causing a computational overhead in addition to wasting k+2 bits on average. This is due to taking n.bit_size() instead of (n-1).bit_size() for the size of the random candidates. Using n instead of n-1 is apparently deliberate in order to save the case where n = 1, but this could be avoided by directly returning 0 if n == 1. ---------- components: Library (Lib) messages: 343094 nosy: Mathis Hammel, mark.dickinson, rhettinger priority: normal severity: normal status: open title: _randbelow_with_getrandbits function inefficient with powers of two type: performance versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 16:54:28 2019 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Tue, 21 May 2019 20:54:28 +0000 Subject: [issue36999] Expose the coroutine object in asyncio task objects In-Reply-To: <1558471537.52.0.812163346713.issue36999@roundup.psfhosted.org> Message-ID: <1558472068.84.0.608561026611.issue36999@roundup.psfhosted.org> Alex Gr?nholm added the comment: I'll look into making a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:01:35 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 21 May 2019 21:01:35 +0000 Subject: [issue37001] symtable.symtable doesn't accept bytes which leads to a mismatch from compile() Message-ID: <1558472495.26.0.119384648617.issue37001@roundup.psfhosted.org> New submission from Dino Viehland : symtable is useful when combined with compile() to AST to understand what the names bind to. But symtable.symtable() doesn't accept a bytes object, while compile does. Ultimately these feed down to the same API, and could easily lead to subtle mismatches due to encodings. The workaround seems to be to use the tokenize.detect_encoding to discover the encoding and then do the encoding from Python, but this seems wasteful. ---------- assignee: dino.viehland components: Library (Lib) messages: 343096 nosy: dino.viehland priority: normal severity: normal status: open title: symtable.symtable doesn't accept bytes which leads to a mismatch from compile() versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:06:43 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 21 May 2019 21:06:43 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558472803.88.0.684066758462.issue34616@roundup.psfhosted.org> Change by Yury Selivanov : ---------- pull_requests: +13385 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:09:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 21:09:57 +0000 Subject: [issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year In-Reply-To: <1382608937.44.0.992947795428.issue19376@psf.upfronthosting.co.za> Message-ID: <1558472997.94.0.836850127551.issue19376@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Abhishek Kumar Singh! more doc is really helpful, handling date and time is hard :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:12:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 21:12:44 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558473164.09.0.134670281774.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b15bde8058e821b383d81fcae68b335a752083ca by Victor Stinner (SH) in branch '2.7': bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-11842) https://github.com/python/cpython/commit/b15bde8058e821b383d81fcae68b335a752083ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:20:24 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 21 May 2019 21:20:24 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558473624.64.0.326876125459.issue34616@roundup.psfhosted.org> Ned Deily added the comment: New changeset eca18aac7b5952d23854d27dc8e502dfb0bb0505 by Ned Deily (Yury Selivanov) in branch 'master': bpo-34616: Fix code style and unbreak buildbots (GH-13473) https://github.com/python/cpython/commit/eca18aac7b5952d23854d27dc8e502dfb0bb0505 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:24:57 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 21 May 2019 21:24:57 +0000 Subject: [issue25234] test_eintr.test_os_open hangs under Xcode 7 In-Reply-To: <1443210079.4.0.780575467942.issue25234@psf.upfronthosting.co.za> Message-ID: <1558473897.82.0.0512622624471.issue25234@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: -13383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:29:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 21:29:51 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558474191.99.0.93948374034.issue35907@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13386 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:30:27 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 21 May 2019 21:30:27 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1558474227.5.0.724725218378.issue33725@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: -13382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:31:10 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 21 May 2019 21:31:10 +0000 Subject: [issue37002] PyType_FromSpec can't create immutable types Message-ID: <1558474270.84.0.958874839775.issue37002@roundup.psfhosted.org> New submission from Dino Viehland : This is another catch of using PyType_FromSpec (similar to https://bugs.python.org/issue26979 but also completely different). Because PyType_FromSpec produces a heap type it gets the Py_TPFLAGS_HEAPTYPE flag set on the newly produced type. To enforce the immutability of built-in types type_setattro checks this flag. Therefore these types end up being mutable, e.g: import _ssl _ssl.SSLError.x = 42 In addition to not providing parity for replacing PyType_Ready in the stable API, it also means that this could presumably bleed across sub-interpreters or just provide surprising and bad results. ---------- components: Interpreter Core messages: 343100 nosy: dino.viehland, eric.snow, vstinner priority: normal severity: normal status: open title: PyType_FromSpec can't create immutable types versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:40:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 21:40:03 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558474803.42.0.20808203669.issue36998@roundup.psfhosted.org> STINNER Victor added the comment: The traceback comes from Python 3.5. Python 3.7 now uses UTF-8 when the LC_CTYPE locale is "C" or "POSIX", thanks to C locale coercion (PEP 538) and UTF-8 Mode (PEP 540): https://vstinner.github.io/posix-locale.html https://vstinner.github.io/python37-new-utf8-mode.html Can you please retry your test using Python 3.7? I would prefer to not start to use errors="surrogateescape" everywhere, especially if the issue is already fixed. errors="surrogateescape" basically means: "I want to produce a file that other people will unable to read... --- def write_file (filename, contents): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ f = open(filename, "w") ... For me, the first obvious bug is that the encoding is not specified. I don't see how an application on a different computer is supposed to read a text file if the encoding is not well defined... ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:41:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 21:41:25 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558474885.68.0.0205059053711.issue36998@roundup.psfhosted.org> STINNER Victor added the comment: IMHO MANIFEST should always be encoded to UTF-8 on all platforms. It means always *decode* it from UTF-8. For backward compatibility, we might first try to decode it from UTF-8, but falls back on the locale encoding if the UTF-8 decoder raises a UnicodeDecodeError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:50:26 2019 From: report at bugs.python.org (David Bolen) Date: Tue, 21 May 2019 21:50:26 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558475426.16.0.289912736361.issue36948@roundup.psfhosted.org> David Bolen added the comment: Since this patch was introduced to the 3.x branch my Windows 7 and 10 buildbots have been failing in test_urlopener_retrieve_file. See https://buildbot.python.org/all/#/builders/3/builds/2661 for the first such failure on the Win10 worker. The problem appears to be related to those workers having an explicit TEMP folder that happens to use a lowercase drive letter, causing the test assertion to fail due to differing case in the drive letter. While I could work around this by changing my builder TEMP definition, the test seems fragile on case-insensitive filesystems, so perhaps it should be comparing a normalized path instead? ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:51:47 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 21 May 2019 21:51:47 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1558475507.1.0.290345055354.issue30458@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:52:07 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 21 May 2019 21:52:07 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1558475527.79.0.387034847121.issue30458@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 17:53:01 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 21 May 2019 21:53:01 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1558475581.39.0.47085723361.issue30458@roundup.psfhosted.org> Gregory P. Smith added the comment: Assigning to Larry to decide if he wants to merge that PR into 3.5 or not. ---------- assignee: -> larry nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:03:08 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 22:03:08 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. Message-ID: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> New submission from Matthias Bussonnier : All in title, f"{x=}" implemented in https://bugs.python.org/issue36817 are not liked by unparse: https://github.com/python/cpython/pull/13473, ---------- components: Library (Lib) messages: 343105 nosy: mbussonn priority: normal severity: normal status: open title: ast unparse does not support f-string new debug format. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:06:38 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 22:06:38 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1558476398.38.0.497765580494.issue37003@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +13387 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:10:23 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 22:10:23 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1558476623.34.0.956405260886.issue36817@roundup.psfhosted.org> Matthias Bussonnier added the comment: I'm not quite sure I completely understand how this is implemented and all the possibilities; ??so I would appreciate reviews on the issue (and patch) to handle this in ast-unparse. See https://bugs.python.org/issue37003 Thanks, ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:11:33 2019 From: report at bugs.python.org (Berker Peksag) Date: Tue, 21 May 2019 22:11:33 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558476693.29.0.580832495975.issue36948@roundup.psfhosted.org> Change by Berker Peksag : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:21:13 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 21 May 2019 22:21:13 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558477273.45.0.670630119809.issue36998@roundup.psfhosted.org> Toshio Kuratomi added the comment: I like the idea of defaulting to UTF-8 (although I think you'll have to build consensus as to whether that's the right thing to do here) but it won't handle the use case here. There's a need to handle files which are undecodable and encoding to utf-8 won't fix that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:23:27 2019 From: report at bugs.python.org (Berker Peksag) Date: Tue, 21 May 2019 22:23:27 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558477407.52.0.904793628811.issue36948@roundup.psfhosted.org> Change by Berker Peksag : ---------- pull_requests: +13388 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:24:43 2019 From: report at bugs.python.org (Berker Peksag) Date: Tue, 21 May 2019 22:24:43 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558477483.76.0.613149023149.issue36948@roundup.psfhosted.org> Berker Peksag added the comment: Thank you for the heads up, David. Could you please take a look at PR 13476? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:24:46 2019 From: report at bugs.python.org (Larry Hastings) Date: Tue, 21 May 2019 22:24:46 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1558477486.45.0.588651694059.issue37003@roundup.psfhosted.org> Change by Larry Hastings : ---------- assignee: -> eric.smith nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:26:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 22:26:54 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558477614.52.0.685237396488.issue34616@roundup.psfhosted.org> STINNER Victor added the comment: Would it be possible to document this change in What's New in Python 3.8? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:30:51 2019 From: report at bugs.python.org (David Bolen) Date: Tue, 21 May 2019 22:30:51 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558477851.39.0.754425393618.issue36948@roundup.psfhosted.org> David Bolen added the comment: Yes, PR 13476 tested locally on the Win10 builder resolves the error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:31:12 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 21 May 2019 22:31:12 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558477872.75.0.489540480616.issue34616@roundup.psfhosted.org> Yury Selivanov added the comment: > Would it be possible to document this change in What's New in Python 3.8? Yes, Elvis and I will take care of that later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:32:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 22:32:36 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558477956.29.0.623240111569.issue34616@roundup.psfhosted.org> STINNER Victor added the comment: Any idea why PR 13148 has been linked to unrelated bugs.python.org issues? I saw 3 of them: bpo-35363, bpo-25234, bpo-33725. https://mail.python.org/pipermail/python-dev/2019-May/157592.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:33:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 22:33:45 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558478025.75.0.545103888019.issue34616@roundup.psfhosted.org> STINNER Victor added the comment: > Yes, Elvis and I will take care of that later. Well, it would be nice to get a first mention before the next release, to see all new shiny Python 3.8 features ;-) The text can be reworded later if needed ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:34:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 22:34:05 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1558478045.64.0.396559086266.issue35363@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:34:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 22:34:15 +0000 Subject: [issue35363] test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot In-Reply-To: <1543593257.05.0.788709270274.issue35363@psf.upfronthosting.co.za> Message-ID: <1558478055.9.0.257445169719.issue35363@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -10550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:37:22 2019 From: report at bugs.python.org (David Bolen) Date: Tue, 21 May 2019 22:37:22 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558478242.81.0.71188988271.issue36948@roundup.psfhosted.org> David Bolen added the comment: Oh, and just for historical purposes, it looks like the root cause was that the nturl2path.pathnametourl forces an uppercase drive letter. So that's where the inconsistency in the test got introduced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:38:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 22:38:13 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558478293.01.0.82860006466.issue36998@roundup.psfhosted.org> STINNER Victor added the comment: > There's a need to handle files which are undecodable and encoding to utf-8 won't fix that. Are you talking about the initial issue, get_file_list() which fails on writing into the MANIFEST file? For me, a package should be "portable": it should work on most if not all platforms, and so use common characters which are encodable by most locale encodings, no? What is your use case? Package something on Linux and then install it on Linux? What is your locale? Did you try Python 3.7 or newer which speaks UTF-8 when the locale is not set? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:40:35 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 22:40:35 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558478435.46.0.568291877995.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: > Any idea why PR 13148 has been linked to unrelated bugs.python.org issues? Could it be due to rebasing and force-pushing ? Cause I did force-push on this branch a couple of times... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:42:49 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 22:42:49 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558478569.08.0.508983360834.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: > Yes, Elvis and I will take care of that later. And I'm guessing you will collect what's in NEWS.d ? Otherwise I'm happy to contribute some text. let me know the best way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:43:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 22:43:23 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558478603.51.0.56886684362.issue34616@roundup.psfhosted.org> STINNER Victor added the comment: > Could it be due to rebasing and force-pushing ? Cause I did force-push on this branch a couple of times... Maybe you used "git merge" and your PR "contained" changes from other issues? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:43:47 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 21 May 2019 22:43:47 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558478627.08.0.168387669625.issue34616@roundup.psfhosted.org> Yury Selivanov added the comment: > And I'm guessing you will collect what's in NEWS.d ? Otherwise I'm happy to contribute some text. let me know the best way. Would be great if you could make a PR to add an entry to whatsnew/3.8.rst (as Victor suggests) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:45:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 22:45:57 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558478757.84.0.225002509761.issue34616@roundup.psfhosted.org> STINNER Victor added the comment: > And I'm guessing you will collect what's in NEWS.d ? Otherwise I'm happy to contribute some text. let me know the best way. One option to document it is to add a new "builtins" section to document the new flag inside "Improved Modules" category: https://docs.python.org/dev/whatsnew/3.8.html#improved-modules ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:47:19 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 21 May 2019 22:47:19 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558478839.18.0.961950278706.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: > Maybe you used "git merge" and your PR "contained" changes from other issues? I quasi-nerver merge, either `rebase interactive` or `reset --hard HEAD`... I even proscribed "git pull" from my CLI.. but you know everybody does mistakes. > Would be great if you could make a PR to add an entry to whatsnew/3.8.rst (as Victor suggests) Ok, i'll do this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:50:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 22:50:39 +0000 Subject: [issue36997] Document that spwd is considered harmful In-Reply-To: <1558458009.82.0.580344483538.issue36997@roundup.psfhosted.org> Message-ID: <1558479039.69.0.741681418342.issue36997@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:51:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 22:51:10 +0000 Subject: [issue36997] Document that spwd is considered harmful In-Reply-To: <1558458009.82.0.580344483538.issue36997@roundup.psfhosted.org> Message-ID: <1558479070.85.0.998430411529.issue36997@roundup.psfhosted.org> STINNER Victor added the comment: "... must go through PAM." Do you have a Python module to recommend to access PAM API? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 18:58:48 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 21 May 2019 22:58:48 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558479528.45.0.916050509396.issue36998@roundup.psfhosted.org> Toshio Kuratomi added the comment: >From my initial description: "An sdist may contain files whose names are undecodable in the current locale. For instance, the sdist might include some files for testing whose filenames are undecodable because that's the format of the input for that application." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:00:38 2019 From: report at bugs.python.org (Berker Peksag) Date: Tue, 21 May 2019 23:00:38 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558479638.33.0.168221345952.issue36948@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 2725cb01d7cbf5caecb51cc20d97ba324b09ce96 by Berker Peksag in branch 'master': bpo-36948: Fix test_urlopener_retrieve_file on Windows (GH-13476) https://github.com/python/cpython/commit/2725cb01d7cbf5caecb51cc20d97ba324b09ce96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:01:02 2019 From: report at bugs.python.org (Berker Peksag) Date: Tue, 21 May 2019 23:01:02 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558479662.53.0.451905854838.issue36948@roundup.psfhosted.org> Berker Peksag added the comment: Thanks! ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:18:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 23:18:16 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558480696.98.0.258470120996.issue36998@roundup.psfhosted.org> STINNER Victor added the comment: ?ric Araujo asked me to review https://github.com/python/cpython/pull/13467. I gave my feedback. I now remove myself from this issue, since I'm not sure that I would like to be involved in a packaging module (distutils) :-) I let others to take a decision on these topics ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:26:52 2019 From: report at bugs.python.org (Paul Monson) Date: Tue, 21 May 2019 23:26:52 +0000 Subject: [issue36941] Windows build changes for Windows ARM64 In-Reply-To: <1558042492.97.0.749926608424.issue36941@roundup.psfhosted.org> Message-ID: <1558481212.06.0.594845399931.issue36941@roundup.psfhosted.org> Change by Paul Monson : ---------- pull_requests: +13389 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:28:19 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 21 May 2019 23:28:19 +0000 Subject: [issue27737] email.header.Header.encode() crashes with IndexError on spaces only value In-Reply-To: <1470923464.88.0.417077764128.issue27737@psf.upfronthosting.co.za> Message-ID: <1558481299.26.0.898663822423.issue27737@roundup.psfhosted.org> Change by Batuhan : ---------- pull_requests: +13390 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:32:03 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 21 May 2019 23:32:03 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558481523.8.0.298587376307.issue36998@roundup.psfhosted.org> Toshio Kuratomi added the comment: Uploading a minimal test case. $ tar -xzvf test-case.tar.gz $ python3.7 setup.py sdist running sdist running check warning: sdist: standard file not found: should have one of README, README.txt, README.rst reading manifest template 'MANIFEST.in' writing manifest file 'MANIFEST' Traceback (most recent call last): File "setup.py", line 27, in packages=['hello'], File "/usr/lib64/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib64/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib64/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib64/python3.7/distutils/command/sdist.py", line 152, in run self.get_file_list() File "/usr/lib64/python3.7/distutils/command/sdist.py", line 208, in get_file_list self.write_manifest() File "/usr/lib64/python3.7/distutils/command/sdist.py", line 390, in write_manifest "writing manifest file '%s'" % self.manifest) File "/usr/lib64/python3.7/distutils/cmd.py", line 335, in execute util.execute(func, args, msg, dry_run=self.dry_run) File "/usr/lib64/python3.7/distutils/util.py", line 291, in execute func(*args) File "/usr/lib64/python3.7/distutils/file_util.py", line 236, in write_file f.write(line + "\n") UnicodeEncodeError: 'utf-8' codec can't encode character '\udcff' in position 11: surrogates not allowed With PR applied: $ ../../python setup.py sdist running sdist running check warning: sdist: standard file not found: should have one of README, README.txt, README.rst reading manifest template 'MANIFEST.in' writing manifest file 'MANIFEST' creating hello-1.0 creating hello-1.0/hello creating hello-1.0/tests creating hello-1.0/tests/data making hard links in hello-1.0... hard linking setup.py -> hello-1.0 hard linking hello/__init__.py -> hello-1.0/hello hard linking tests/test_cases.py -> hello-1.0/tests hard linking tests/data/1.bin -> hello-1.0/tests/data hard linking tests/data/\udcff.bin -> hello-1.0/tests/data Creating tar archive removing 'hello-1.0' (and everything under it) Making this minimal test case, though, I found that there's another error somewhere when MANIFEST has already been created (ie: the patched version works for the initial generation of MANIFEST but it doesn't work to *regenerate* the MANIFEST). Looking into that now. ---------- Added file: https://bugs.python.org/file48349/test-case.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:36:35 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 21 May 2019 23:36:35 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1558481795.83.0.245127206636.issue37003@roundup.psfhosted.org> Eric V. Smith added the comment: I don?t think this is worth changing. I?m planning on removing the expr_text field before beta 1. At which point I don?t think there will be any work to do here. See https://mail.python.org/pipermail/python-dev/2019-May/157493.html Also, can you explain what?s currently broken? I?ll need to see some example code that doesn?t work in order to understand your change and if the ast change will affect it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:39:22 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 21 May 2019 23:39:22 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558481962.09.0.589821583039.issue36998@roundup.psfhosted.org> Toshio Kuratomi added the comment: Okay, pushed a fix for regenerating the MANIFEST as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:42:59 2019 From: report at bugs.python.org (Michael Sullivan) Date: Tue, 21 May 2019 23:42:59 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1558482179.44.0.94738242782.issue36878@roundup.psfhosted.org> Change by Michael Sullivan : ---------- pull_requests: +13391 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:43:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 May 2019 23:43:21 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558482201.88.0.560981129979.issue36998@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:45:05 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 21 May 2019 23:45:05 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1558482305.09.0.799692266232.issue36878@roundup.psfhosted.org> Guido van Rossum added the comment: How many more PRs do you plan? Or is this it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:48:47 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 21 May 2019 23:48:47 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1558482527.34.0.88489417145.issue37003@roundup.psfhosted.org> Eric V. Smith added the comment: Never mind on the failing code. I see your test cases now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 19:54:58 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Tue, 21 May 2019 23:54:58 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558482898.93.0.25256426715.issue36998@roundup.psfhosted.org> Toshio Kuratomi added the comment: Are the distutils unittests disabled? And if so is there a reason? I was looking to add test cases to my PR and found that I couldn't get them (or indeed any distutils unittests) to run when trying to only target the distutils unittests. >From looking at the code my guess is that the Python test suite was ported to use the load_test protocol sometime after Python-3.2 but distutils was missed. I can submit a PR to change that unless there's a reason it is the way it is. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 20:02:56 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 22 May 2019 00:02:56 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558483376.64.0.209138826161.issue27987@roundup.psfhosted.org> Neil Schemenauer added the comment: > sys.getsizeof(3.14) is 24. And it becomes 32 byte in 16byte aligned pymalloc. (+33%) I've been doing some reading and trying to understand this issue. My understanding is that malloc() needs to return pointers that are 16-byte aligned on AMD64 but, in general, pointers don't have the be aligned that way. If you have a structure that contains a "long double" then that member also has to be 16-bit aligned. It seems to me that we don't need to have the PyObject structure containing a Python float to be 16-byte aligned. If so, could we introduce a new obmalloc API that returns memory with 8-byte alignment, for use by objects that know they don't require 16-byte alignment? floatobject.c could use this API to avoid the 33% overhead. The new obmalloc API could initially be internal use only until we can come up with a design we know we can live with long term. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 20:03:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 00:03:03 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558483383.64.0.643963356611.issue36998@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 20:09:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 00:09:17 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558483757.34.0.114918637339.issue27987@roundup.psfhosted.org> STINNER Victor added the comment: > It seems to me that we don't need to have the PyObject structure containing a Python float to be 16-byte aligned. If so, could we introduce a new obmalloc API that returns memory with 8-byte alignment, for use by objects that know they don't require 16-byte alignment? floatobject.c could use this API to avoid the 33% overhead. PyMem_Malloc / PyObject_Malloc only have one parameter: "size". It knows nothing about the allocated structure. bpo-18835 discussed the idea of adding a new API which accept an alignment parameter. The issue was closed because of the lack of concrete usage. In the clang crash bpo-36618 (which decided us to fix this issue), C alignof() function was discussed: https://bugs.python.org/issue36618#msg340279 Copy of serge-sans-paille's comment: "@vstinner: once you have a portable version of alignof, you can deciding to *not* use the pool allocator if the required alignment is greater than 8B, or you could modify the pool allocator to take alignment information as an extra parameter?" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 20:14:24 2019 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 22 May 2019 00:14:24 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1558484064.23.0.0350042712348.issue36998@roundup.psfhosted.org> Toshio Kuratomi added the comment: Figured out the answer to my last question while looking into fixing it. The devguide documents both running tests via regrtest and running them via unittest test discovery. regrtest works: ./python -m test -v distutils.test But unittest doesn't: ./python -m unittest -v test.test_distutils ./python -m unittest -v distutils.test.test_file_utils # etc I'll submit a separate PR to get that working. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 20:42:59 2019 From: report at bugs.python.org (viocal) Date: Wed, 22 May 2019 00:42:59 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558485779.28.0.617590556227.issue36981@roundup.psfhosted.org> viocal added the comment: thanks again the environment: filedata1<512M filedata2>512M filedata3>1G this computer-------------peer computer server(with asyncio)------clien(socket without asyncio) memory<512M -----------memory>512M read filedata1 <--------- success read filedata2 <--------- success read filedata3 <--------- success write filedata1 ---------> success write filedata2 ---------> fail write filedata2 ---------> fail how todo (function set_write_buffer_limits) is work ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 20:52:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 00:52:21 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558486341.37.0.317049980634.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13392 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 21:04:48 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 22 May 2019 01:04:48 +0000 Subject: [issue30790] Can't use proxy to connect internet on windows Message-ID: <1558487088.46.0.0343857348688.issue30790@roundup.psfhosted.org> New submission from Cheryl Sabella : Please provide an example showing a scenario where this change would be needed. Also, a test case needs to be added to the pull request that would fail without the change and pass with the change. Thanks! ---------- nosy: +cheryl.sabella resolution: wont fix -> versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 21:32:31 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 22 May 2019 01:32:31 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1558488751.13.0.489800566662.issue36799@roundup.psfhosted.org> Change by Paul Monson : ---------- pull_requests: +13393 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 22:09:15 2019 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 22 May 2019 02:09:15 +0000 Subject: [issue37004] SequenceMatcher.ratio() noncommutativity not well-documented Message-ID: <1558490955.4.0.899055526874.issue37004@roundup.psfhosted.org> New submission from Dennis Sweeney : I understand that the SequenceMatcher's ratio method does not guarantee that SequenceMatcher(None, a, b).ratio() == SequenceMatcher(None, b, a).ratio(). Below is a counterexample: # Example from https://mail.python.org/pipermail/python-list/2010-November/593063.html >>> SequenceMatcher(None, 'BRADY', 'BYRD').ratio() 0.6666666666666666 >>> SequenceMatcher(None, 'BYRD', 'BRADY').ratio() 0.4444444444444444 I was recently solving a problem that required a textual similarity ratio function and I wrongly assumed that SequenceMatcher treated both input strings symmetrically, which was an extremely difficult bug to find, especially because for many simple tests, the ratio IS symmetric: >>> SequenceMatcher(None, 'apple', 'banana').ratio() 0.18181818181818182 >>> SequenceMatcher(None, 'banana', 'apple').ratio() 0.18181818181818182 I would like to see a clearer warning of this asymmetry in the documentation for the difflib module. Perhaps something like .. note:: Caution: The result of a :meth:`ratio` call is *NOT* symmetric with respect to the order of the arguments. For instance:: >>> SequenceMatcher(None, 'brady', 'byrd').ratio() 0.6666666666666666 >>> SequenceMatcher(None, 'byrd', 'brady').ratio() 0.4444444444444444 Without such a note near the ratio methods' documentations, it is far too easy to google for a Python stdlib functionality for computing text similarity, skip straight to the ratio method, look at the examples given, try some of your own simple examples, and accidentally convince oneself that this symmetry exists. ---------- messages: 343138 nosy: Dennis Sweeney, docs at python priority: normal severity: normal status: open title: SequenceMatcher.ratio() noncommutativity not well-documented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 22:10:54 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 22 May 2019 02:10:54 +0000 Subject: [issue36997] Document that spwd is considered harmful In-Reply-To: <1558458009.82.0.580344483538.issue36997@roundup.psfhosted.org> Message-ID: <1558491054.55.0.120767231966.issue36997@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 22:19:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 22 May 2019 02:19:02 +0000 Subject: [issue36948] NameError in urllib.request.URLopener.retrieve In-Reply-To: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> Message-ID: <1558491542.05.0.184378347258.issue36948@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thank you David and Berker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 22:20:03 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 22 May 2019 02:20:03 +0000 Subject: [issue37004] SequenceMatcher.ratio() noncommutativity not well-documented In-Reply-To: <1558490955.4.0.899055526874.issue37004@roundup.psfhosted.org> Message-ID: <1558491604.0.0.697089234279.issue37004@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 22:21:34 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 22 May 2019 02:21:34 +0000 Subject: [issue37004] SequenceMatcher.ratio() noncommutativity not well-documented In-Reply-To: <1558490955.4.0.899055526874.issue37004@roundup.psfhosted.org> Message-ID: <1558491694.54.0.540476247731.issue37004@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +13394 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 22:55:05 2019 From: report at bugs.python.org (KunYu Chen) Date: Wed, 22 May 2019 02:55:05 +0000 Subject: [issue36988] zipfile: string IndexError on extract In-Reply-To: <1558435795.93.0.150119411648.issue36988@roundup.psfhosted.org> Message-ID: <1558493705.92.0.399518212201.issue36988@roundup.psfhosted.org> KunYu Chen added the comment: Hi alter-bug-tracer, We notice about this pitfall when extracting zipbomb files. and we have discussion here https://bugs.python.org/issue36260 ---------- nosy: +18z _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 23:28:26 2019 From: report at bugs.python.org (viocal) Date: Wed, 22 May 2019 03:28:26 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558495706.42.0.845710067098.issue36981@roundup.psfhosted.org> viocal added the comment: I have fixed it modified selector_events.py def write(self, data): if not isinstance(data, (bytes, bytearray, memoryview)): raise TypeError(f'data argument must be a bytes-like object, ' f'not {type(data).__name__!r}') ... if not self._buffer: # Optimization: try to send now. while True: #########add by viocal try: n = self._sock.send(data) except (BlockingIOError, InterruptedError): pass except Exception as exc: self._fatal_error(exc, 'Fatal write error on socket transport') return else: data = data[n:] if not data: return # Not all was written; register write handler. self._loop._add_writer(self._sock_fd, self._write_ready) # Add it to the buffer. self._buffer.extend(data) self._maybe_pause_protocol() ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 23:34:37 2019 From: report at bugs.python.org (viocal) Date: Wed, 22 May 2019 03:34:37 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558496077.05.0.253417627895.issue36981@roundup.psfhosted.org> viocal added the comment: I have fixed it modified selector_events.py def write(self, data): if not isinstance(data, (bytes, bytearray, memoryview)): raise TypeError(f'data argument must be a bytes-like object, ' f'not {type(data).__name__!r}') ... if not self._buffer: # Optimization: try to send now. while True: #########add by viocal try: n = self._sock.send(data) except (BlockingIOError, InterruptedError): pass except Exception as exc: self._fatal_error(exc, 'Fatal write error on socket transport') return else: data = data[n:] if not data: return # Not all was written; register write handler. if not data self._loop._add_writer(self._sock_fd, self._write_ready) # Add it to the buffer. self._buffer.extend(data) self._maybe_pause_protocol() ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 21 23:36:08 2019 From: report at bugs.python.org (Dobatymo) Date: Wed, 22 May 2019 03:36:08 +0000 Subject: [issue37005] bz2 module doesn't write end-of-stream marker Message-ID: <1558496168.36.0.56962236665.issue37005@roundup.psfhosted.org> New submission from Dobatymo : According to https://en.wikipedia.org/wiki/Bzip2 the reference implementation of bzip2 writes an end-of-stream marker (also called stream footer) with a magic number and a stream checksum to the file. Python does not do so. The files can still be read by all bzip2 compatible software I tried. For completeness and better error detection however, writing this marker (optionally maybe) would be useful. ---------- messages: 343143 nosy: Dobatymo priority: normal severity: normal status: open title: bz2 module doesn't write end-of-stream marker type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 00:04:26 2019 From: report at bugs.python.org (Dino Viehland) Date: Wed, 22 May 2019 04:04:26 +0000 Subject: [issue37001] symtable.symtable doesn't accept bytes which leads to a mismatch from compile() In-Reply-To: <1558472495.26.0.119384648617.issue37001@roundup.psfhosted.org> Message-ID: <1558497866.31.0.964035978181.issue37001@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +13395 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 00:34:07 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 22 May 2019 04:34:07 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1558499647.29.0.946992828258.issue37003@roundup.psfhosted.org> Matthias Bussonnier added the comment: Just for clarification for future readers; I landed a PR that used f"{x=}" in some new functionalities, and that broke the buildbots, the buildbots do test that many of the `Lib/` files can be round-tripped ast->unparse->ast, and as ast-unparse did not understood f-debug, if roundtripped f"{x=}" to f"{x!r}". The PRs CIs did not fail as apparently they don't test this functionality. So currently not having support for f-string-debug in ast-unparse kind of prevent using f-string debug format in the stdlib. I'm happy if `expr_text` get removed, and having unparse round-trip to `x={x!r}` sounds sufficient to me; it may make like of formatters like black a bit harder maybe ? Though I believe black is likely not using ast but lib2to3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 00:36:21 2019 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 22 May 2019 04:36:21 +0000 Subject: [issue36997] Document that spwd is considered harmful In-Reply-To: <1558458009.82.0.580344483538.issue36997@roundup.psfhosted.org> Message-ID: <1558499781.24.0.0227187877585.issue36997@roundup.psfhosted.org> Arfrever Frehtes Taifersar Arahesis added the comment: > On BSD, Linux, and macOS, account and credential verification must go through PAM. At least the part about Linux is not entirely true. If PAM is installed and used, then account and credential verification should probably go through PAM, but system administrator is free to decide to not install PAM at all. Perhaps some Linux distributions like Red Hat and Fedora do not support PAM-free systems, but Gentoo certainly supports PAM-free systems (support for PAM is enabled by default in Gentoo, but is not enforced). ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 01:08:21 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 22 May 2019 05:08:21 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558501701.62.0.783102329316.issue34616@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13396 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 01:13:42 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 22 May 2019 05:13:42 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558502022.17.0.460009466528.issue34616@roundup.psfhosted.org> Matthias Bussonnier added the comment: > section to document the new flag inside "Improved Modules" category Done in https://github.com/python/cpython/pull/13484 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 01:14:28 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 22 May 2019 05:14:28 +0000 Subject: [issue36995] tp_print -> tp_vectorcall_offset In-Reply-To: <1558450404.41.0.511752439541.issue36995@roundup.psfhosted.org> Message-ID: <1558502068.32.0.871749926652.issue36995@roundup.psfhosted.org> Jeroen Demeyer added the comment: I see what you mean now. One bpo issue with many pull requests. I was following the CPython policy that every pull request needed an issue, but it didn't occur to me to put multiple independent PRs on one issue. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 01:41:45 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 22 May 2019 05:41:45 +0000 Subject: [issue36974] Implement PEP 590 Message-ID: <1558503705.87.0.407329691956.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13397 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 02:08:17 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 22 May 2019 06:08:17 +0000 Subject: [issue37000] _randbelow_with_getrandbits function inefficient with powers of two In-Reply-To: <1558471816.52.0.343821776026.issue37000@roundup.psfhosted.org> Message-ID: <1558505297.12.0.523284620064.issue37000@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger priority: normal -> low versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 02:20:17 2019 From: report at bugs.python.org (Mathis Hammel) Date: Wed, 22 May 2019 06:20:17 +0000 Subject: [issue37000] _randbelow_with_getrandbits function inefficient with powers of two In-Reply-To: <1558471816.52.0.343821776026.issue37000@roundup.psfhosted.org> Message-ID: <1558506017.25.0.782151412723.issue37000@roundup.psfhosted.org> Change by Mathis Hammel : ---------- keywords: +patch pull_requests: +13398 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 02:45:29 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 22 May 2019 06:45:29 +0000 Subject: [issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage In-Reply-To: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> Message-ID: <1558507529.05.0.883565504407.issue36779@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +13399 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 02:45:37 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 22 May 2019 06:45:37 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1558507537.81.0.808373828109.issue36799@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: -13393 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 02:45:59 2019 From: report at bugs.python.org (Paul Monson) Date: Wed, 22 May 2019 06:45:59 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1558507559.64.0.277321747469.issue36799@roundup.psfhosted.org> Change by Paul Monson : ---------- pull_requests: +13400 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 02:48:26 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 22 May 2019 06:48:26 +0000 Subject: [issue36779] time.tzname returns empty string on Windows if default codepage is a Unicode codepage In-Reply-To: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> Message-ID: <1558507706.79.0.520504944747.issue36779@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi Paul, I have added your PR at this issue, it was assigned to another bpo issue. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 02:52:08 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 22 May 2019 06:52:08 +0000 Subject: [issue37000] _randbelow_with_getrandbits function inefficient with powers of two In-Reply-To: <1558471816.52.0.343821776026.issue37000@roundup.psfhosted.org> Message-ID: <1558507928.61.0.51998217996.issue37000@roundup.psfhosted.org> Mark Dickinson added the comment: > this could be avoided by directly returning 0 if n == 1 The other solution is to make `getrandbits(0)` valid, always returning `0`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 03:22:06 2019 From: report at bugs.python.org (Erik Janssens) Date: Wed, 22 May 2019 07:22:06 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558509726.57.0.0990123963929.issue36965@roundup.psfhosted.org> Change by Erik Janssens : ---------- pull_requests: +13401 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 03:28:49 2019 From: report at bugs.python.org (Hongchang Liu) Date: Wed, 22 May 2019 07:28:49 +0000 Subject: [issue31904] Python should support VxWorks RTOS In-Reply-To: <1509393393.78.0.213398074469.issue31904@psf.upfronthosting.co.za> Message-ID: <1558510129.25.0.895890603745.issue31904@roundup.psfhosted.org> Change by Hongchang Liu : ---------- pull_requests: +13402 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 03:54:48 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 22 May 2019 07:54:48 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558511688.43.0.466057663332.issue36084@roundup.psfhosted.org> Michael Felt added the comment: Repeating a bot of what I added to PR13463 AIX has native support for thread-id since at least AIX 4.1 (1994-1995) where every process has an initial TID (PID are even numbers and "own" the resources, TID are odd and are the "workers" - very simply put). Hence, by default, an AIX process is "mono-threaded". The key concern - when calling thread related issues, is to ensure that all compiled code uses the same definitions in include files - namely, with _THREAD_SAFE defined. There are couple of ways to accomplish this: a) ensure that #include is first (everywhere!) b) use cc_r, xlc_r, etc_r (with IBM compiler) c) -D_THREAD_SAFE As a) seems unpractical to ensure all the time; b) is also unpractical (no idea how/if gcc, e.g., has a way to 'signal' the need to be thread_safe - so a change in configure.ac, and maybe in setup.py, and thinking further yet - in the CFLAGS that get passed to extrnal modules and extensions - adding -D_THREAD_SAFE seems the most complete (aka safe) approach. And, of course, for this specific function a call to Syntax #include pthread_t pthread_self (void); Description The pthread_self subroutine returns the calling thread's ID. ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 04:07:08 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 22 May 2019 08:07:08 +0000 Subject: [issue36799] Typo in ctypes documentation In-Reply-To: <1557036542.96.0.672219946485.issue36799@roundup.psfhosted.org> Message-ID: <1558512428.2.0.132246039795.issue36799@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: -13400 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 04:13:30 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 22 May 2019 08:13:30 +0000 Subject: [issue36993] zipfile: tuple IndexError on extract In-Reply-To: <1558441969.28.0.928640082083.issue36993@roundup.psfhosted.org> Message-ID: <1558512810.15.0.391823550719.issue36993@roundup.psfhosted.org> St?phane Wirtel added the comment: unzip index_tuple.zip -x Archive: index_tuple.zip caution: zipfile comment truncated error [index_tuple.zip]: missing 3992977728 bytes in zipfile (attempting to process anyway) skipping: zipfile_extract/ unsupported compression method 211 I think the issue is not with Python but with your ZIP file. Did you try to uncompress it with unzip?\ Thank you ---------- nosy: +matrixise resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 04:20:15 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 22 May 2019 08:20:15 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1558513215.49.0.829259808556.issue37003@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for the recap, Matthias. Once I remove expr_text (hopefully this weekend!), we should still at least add tests to make sure nothing fails, even with the ast-expanded version of the = f-strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 04:20:22 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 22 May 2019 08:20:22 +0000 Subject: [issue36991] zipfile: AttributeError on extract In-Reply-To: <1558441602.37.0.911226270551.issue36991@roundup.psfhosted.org> Message-ID: <1558513222.25.0.962261020493.issue36991@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi, Thank you for your report 1. but do you have the bz2 lib on your system, because without that, Python is not compiled with the support of this format. 2. your file seems to have an issue. unzip attr0.zip Archive: attr0.zip inflating: zipfile_extract.py error: invalid compressed data to inflate bad CRC 00000000 (should be 88075377) Please could you check again your compilation step and retry with an other file. I'm closing this issue. Thank you ---------- nosy: +matrixise resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 04:22:27 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 22 May 2019 08:22:27 +0000 Subject: [issue36991] zipfile: AttributeError on extract In-Reply-To: <1558441602.37.0.911226270551.issue36991@roundup.psfhosted.org> Message-ID: <1558513347.96.0.733539033625.issue36991@roundup.psfhosted.org> St?phane Wirtel added the comment: I also recommend that you read this document about the compilation and installation of Python and its dependencies. https://devguide.python.org/setup/#compile-and-build Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 04:29:29 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 22 May 2019 08:29:29 +0000 Subject: [issue36992] zipfile: AttributeError on extract (LZMA) In-Reply-To: <1558441771.7.0.234228276725.issue36992@roundup.psfhosted.org> Message-ID: <1558513769.02.0.446311518638.issue36992@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi, Thank you for your report but do you have the lzma lib on your system, because without that, Python is not compiled with the support of this format. example, with a debian docker image: without all the needed libraries you would get this exception: Python build finished successfully! The necessary bits to build these optional modules were not found: _bz2 _curses _curses_panel _dbm _gdbm _hashlib _lzma _sqlite3 _ssl _tkinter _uuid readline zlib To find the necessary bits, look in setup.py in detect_modules() for the module's name. The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc atexit pwd time Failed to build these modules: _ctypes Please could you check again your compilation step and retry with an other file. I'm closing this issue but you are free to re-open it if you have tested with the right dependencies. Thank you ---------- nosy: +matrixise resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 04:41:15 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 22 May 2019 08:41:15 +0000 Subject: [issue37005] bz2 module doesn't write end-of-stream marker In-Reply-To: <1558496168.36.0.56962236665.issue37005@roundup.psfhosted.org> Message-ID: <1558514475.75.0.809917875546.issue37005@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you, I have added Serhiy and Thomas for this issue but I have removed the versions 3.7, 3.6, 3.5 and 2.7. Maybe it's a new feature for the next versions of Python. ---------- nosy: +matrixise, serhiy.storchaka, twouters versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 04:43:49 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 22 May 2019 08:43:49 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1558514629.54.0.898309235503.issue35545@roundup.psfhosted.org> Michael Felt added the comment: from below: In case of 3.7 first call to _ensure_resolved returns ('fe80::1', 12345, 0, 1) then second call returns ('fe80::1', 12345, 0, 0) Notice that scope is now completely lost and is set to 0, thus actual call to socket.connect is wrong In case of 3.6 both first and second call to _ensure_resolved return ('fe80::1%lo', 12345, 0, 1) because in 3.6 case scope info is preserved in address and second call can derive correct address tuple I'll have to locate the PR I made to resolve the test issue AIX was having - but it seems the address format ::1%lo is not supported everywhere. FYI: I do not believe the PR was backported into 3.6. ** Found it: commit 413118ebf3162418639a5c4af14b02d26571a02c Author: Michael Felt Date: Fri Sep 14 01:35:56 2018 +0200 Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') (#8907) and [3.7] bpo-34490: Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') (GH-8907) #9286 Since in the first call - a scope of 1 is being returned - the initial "open" seems to be working as expected. Some "help" to be sure I do exactly the same tests. **** Reading through the bpo text, my change was only to skip the test because quote: On AIX with AF_UNIX family sockets getsockname() does not provide 'sockname' and, from memory, the information being looked for is the bit after the '%' - aka scope. On the one hand - the test is working - the information being returned does not match: ====================================================================== FAIL: test_create_connection_ipv6_scope (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.aixtools-aix-power6/build/Lib/unittest/mock.py", line 1226, in patched return func(*args, **keywargs) File "/home/buildbot/buildarea/3.x.aixtools-aix-power6/build/Lib/test/test_asyncio/test_base_events.py", line 1316, in test_create_connection_ipv6_scope sock.connect.assert_called_with(('fe80::1', 80, 0, 1)) File "/home/buildbot/buildarea/3.x.aixtools-aix-power6/build/Lib/unittest/mock.py", line 838, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: expected call not found. Expected: connect(('fe80::1', 80, 0, 1)) Actual: connect(('fe80::1', 80, 0, 0)) ---------------------------------------------------------------------- What is not clear from the test is that what "expected" says, is not the same as the first address in the code: coro = self.loop.create_connection(asyncio.Protocol, 'fe80::1%1', 80) t, p = self.loop.run_until_complete(coro) try: sock.connect.assert_called_with(('fe80::1', 80, 0, 1)) _, kwargs = m_socket.socket.call_args self.assertEqual(kwargs['family'], m_socket.AF_INET6) self.assertEqual(kwargs['type'], m_socket.SOCK_STREAM) finally: t.close() test_utils.run_briefly(self.loop) # allow transport to close 'fe80::1%1' <> 'fe80::1' - and maybe, on AIX - the initial connection failed. (or maybe it has to have succeeded, or the failure message would look different). I am not 'experienced' with IPv6 and scope. ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 04:44:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 08:44:17 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1558511688.43.0.466057663332.issue36084@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: The AIX case sounds way more complex. I suggest to start without AIX support, since it is already complex enough, and then open a new issue to discuss/implement AIX support, once this issue is done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 05:05:19 2019 From: report at bugs.python.org (SilentGhost) Date: Wed, 22 May 2019 09:05:19 +0000 Subject: [issue36981] asyncio transport.write() memory out In-Reply-To: <1558405429.22.0.902415488536.issue36981@roundup.psfhosted.org> Message-ID: <1558515919.93.0.0762527075237.issue36981@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: fixed -> not a bug stage: -> resolved status: -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 05:06:12 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 22 May 2019 09:06:12 +0000 Subject: [issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition) In-Reply-To: <1488481944.03.0.0307704051627.issue29699@psf.upfronthosting.co.za> Message-ID: <1558515972.82.0.899261246682.issue29699@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +websurfer5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 05:16:10 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 22 May 2019 09:16:10 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1558516570.21.0.890527867788.issue36520@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +websurfer5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 05:20:50 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 22 May 2019 09:20:50 +0000 Subject: [issue37006] Add top level await statement support for doctest Message-ID: <1558516850.14.0.4225480118.issue37006@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : Since issue34616 is merged that allows using compile flags to support top level await statements I think it would be good to add support for top level await in doctest. This would help in concise examples in docs where await statements need to be wrapped in async def wrapper functions currently. This can be done using a doctest flag like ALLOW_TOP_LEVEL_AWAIT so that places where top level await is needed it can be explicitly marked as such so that when users copy paste code they are aware that it requires top level await statement. I have implemented a simple patch where ALLOW_TOP_LEVEL_AWAIT flag (not to be confused with ast module flag) is added to doctest and if the doctest line has the flag then the ast flag is added th compileflags and then await eval(code_object) is used and then the awaitabe is executed with asyncio.run. Synchronous code has usual exec(code_object). I don't see any doctest failures with this patch against our Doc folder and test_doctest. Few downsides is that it requires ast import for the flag value which could be little heavy but inspect module is already imported and I think it's an okay tradeoff for doctest. I have used asyncio.run and I am not sure if there is an efficient way to run awaitables. Feedback welcome. Patch : https://github.com/python/cpython/compare/master...tirkarthi:asyncio-await-doctest # await_flag_doctest.rst >>> import asyncio >>> await asyncio.sleep(1.0) # doctest: +ALLOW_TOP_LEVEL_AWAIT cpython git:(asyncio-await-doctest) time ./python.exe -m doctest await_flag_doctest.rst ./python.exe -m doctest await_flag_doctest.rst 0.31s user 0.02s system 24% cpu 1.343 total # await_no_flag_doctest.rst that will fail >>> import asyncio >>> await asyncio.sleep(1.0) cpython git:(asyncio-await-doctest) time ./python.exe -m doctest await_no_flag_doctest.rst ********************************************************************** File "await_no_flag_doctest.rst", line 2, in await_no_flag_doctest.rst Failed example: await asyncio.sleep(1.0) Exception raised: Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", line 1338, in __run code = compile(example.source, filename, "single", File "", line 1 SyntaxError: 'await' outside function ********************************************************************** 1 items had failures: 1 of 2 in await_no_flag_doctest.rst ***Test Failed*** 1 failures. ./python.exe -m doctest await_no_flag_doctest.rst 0.35s user 0.03s system 94% cpu 0.393 total ---------- components: asyncio messages: 343160 nosy: asvetlov, mbussonn, xtreak, yselivanov priority: normal severity: normal status: open title: Add top level await statement support for doctest type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 05:28:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 09:28:38 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558517317.99.0.0370022980976.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ef9d9b63129a2f243591db70e9a2dd53fab95d86 by Victor Stinner in branch 'master': bpo-36829: Add sys.unraisablehook() (GH-13187) https://github.com/python/cpython/commit/ef9d9b63129a2f243591db70e9a2dd53fab95d86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 05:37:47 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 22 May 2019 09:37:47 +0000 Subject: [issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point In-Reply-To: <1553512605.72.0.860422023516.issue36422@roundup.psfhosted.org> Message-ID: <1558517867.3.0.891477666228.issue36422@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +websurfer5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 05:40:57 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 22 May 2019 09:40:57 +0000 Subject: [issue34125] Profiling depends on whether **kwargs is given In-Reply-To: <1531761360.51.0.56676864532.issue34125@psf.upfronthosting.co.za> Message-ID: <1558518057.21.0.57473317239.issue34125@roundup.psfhosted.org> Jeroen Demeyer added the comment: This is missing a testcase: PR 13461 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 05:45:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 09:45:08 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558518308.93.0.119443308914.issue36829@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13403 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 05:47:27 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 22 May 2019 09:47:27 +0000 Subject: [issue36372] Flawed handling of URL redirect In-Reply-To: <1553024939.15.0.48602014651.issue36372@roundup.psfhosted.org> Message-ID: <1558518447.68.0.423691827766.issue36372@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +websurfer5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 05:54:07 2019 From: report at bugs.python.org (Robert Collins) Date: Wed, 22 May 2019 09:54:07 +0000 Subject: [issue24653] Mock.assert_has_calls([]) is surprising for users In-Reply-To: <1437126004.09.0.453747784975.issue24653@psf.upfronthosting.co.za> Message-ID: <1558518847.47.0.837942727118.issue24653@roundup.psfhosted.org> Robert Collins added the comment: I'm reopening this because I don't agree. I opened the bug because we have evidence that users find the current documentation confusing. Saying that its not confusing to us doesn't fix the confusion. Why should we mention the special case of an empty set? Because its the only special case. A simple single sentence: "Note: to assert that no calls were made see `assert_not_called`" would probably both cover the special case and direct users to the right place for that use case. ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:00:21 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 22 May 2019 10:00:21 +0000 Subject: [issue24653] Mock.assert_has_calls([]) is surprising for users In-Reply-To: <1437126004.09.0.453747784975.issue24653@psf.upfronthosting.co.za> Message-ID: <1558519221.59.0.612599342535.issue24653@roundup.psfhosted.org> Inada Naoki added the comment: > I opened the bug because we have evidence that users find the current documentation confusing. Saying that its not confusing to us doesn't fix the confusion. Is there evidence people get confused by the document? I suppose people get confused because they guessed behavior from existing assert_has_calls usages, without reading docs. If they guess without reading doc, adding anything in doc doesn't help them. The document describe well it tests inclusion, not equality. There are no confusion about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:05:14 2019 From: report at bugs.python.org (Robert Collins) Date: Wed, 22 May 2019 10:05:14 +0000 Subject: [issue34125] Profiling depends on whether **kwargs is given In-Reply-To: <1531761360.51.0.56676864532.issue34125@psf.upfronthosting.co.za> Message-ID: <1558519514.71.0.558449449372.issue34125@roundup.psfhosted.org> Robert Collins added the comment: New changeset b892d3ea468101d35e2fb081002fa693bd86eca9 by Robert Collins (Jeroen Demeyer) in branch 'master': bpo-36994: add test for profiling method_descriptor with **kwargs (GH-13461) https://github.com/python/cpython/commit/b892d3ea468101d35e2fb081002fa693bd86eca9 ---------- nosy: +rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:05:14 2019 From: report at bugs.python.org (Robert Collins) Date: Wed, 22 May 2019 10:05:14 +0000 Subject: [issue36994] Missing tests for CALL_FUNCTION_EX opcode profiling method_descriptor In-Reply-To: <1558443913.24.0.484084553797.issue36994@roundup.psfhosted.org> Message-ID: <1558519514.77.0.591756745905.issue36994@roundup.psfhosted.org> Robert Collins added the comment: New changeset b892d3ea468101d35e2fb081002fa693bd86eca9 by Robert Collins (Jeroen Demeyer) in branch 'master': bpo-36994: add test for profiling method_descriptor with **kwargs (GH-13461) https://github.com/python/cpython/commit/b892d3ea468101d35e2fb081002fa693bd86eca9 ---------- nosy: +rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:06:09 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 22 May 2019 10:06:09 +0000 Subject: [issue36994] Missing tests for CALL_FUNCTION_EX opcode profiling method_descriptor In-Reply-To: <1558443913.24.0.484084553797.issue36994@roundup.psfhosted.org> Message-ID: <1558519569.46.0.769759620385.issue36994@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:08:13 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 22 May 2019 10:08:13 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1558514629.54.0.898309235503.issue35545@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: On 22/05/2019 10:43, Michael Felt wrote: > 'fe80::1%1' <> 'fe80::1' - ... I am not 'experienced' with IPv6 and scope. >From what I have just read (again) - scope seems to be a way to indicate the interface used (e.g., eth0, or enp0s25) as a "number". Further, getsockname() (and getpeername()) seem to be more for after a fork(), or perhaps after a pthread_create(). What remains unclear is why would I ever care what the scopeid is.? Is it because it is "shiney", does it add security (if so, how)? And, as this has been added - what breaks in Python when "scopeid" is not available? I am thinking, if adding a scopeid is a way to assign an IPv6 address to an interface - what is to prevent abuse? Why would I even want the same (link-local IP address on eth0 and eth1 at the same time? Assuming that it what it is making possible - the same IPv6/64 address on multiple interfaces and use scope ID to be more selective/aware. It this an alternative way to multiplex interfaces - now in the IP layer rather than in the LAN layer? If I understand why this is needed I may be able to come up with a way to "get it working" for the Python model of interfaces - although, probably not "fast". Regards, Michael ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:09:46 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 22 May 2019 10:09:46 +0000 Subject: [issue36979] ncurses extension uses wrong include path In-Reply-To: <1558388923.16.0.697144008722.issue36979@roundup.psfhosted.org> Message-ID: <1558519786.26.0.620931887994.issue36979@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +websurfer5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:10:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 10:10:27 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558519827.51.0.107148191121.issue36829@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13404 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:11:44 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Wed, 22 May 2019 10:11:44 +0000 Subject: [issue36758] configured libdir not correctly passed to Python executable In-Reply-To: <1556622948.14.0.900799269401.issue36758@roundup.psfhosted.org> Message-ID: <1558519904.35.0.115623165621.issue36758@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +websurfer5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:22:26 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 22 May 2019 10:22:26 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558520546.95.0.705976891307.issue36084@roundup.psfhosted.org> Michael Felt added the comment: I do not know if it is that much mode complex. Unless I missed something it seems to be that this bit - needs three lines added after the FREEBSD block - per below: All the other "assurances" are just things that need to be assured. Adding a -D_XXX to CFLAGS is not all that complex either. Perhaps getting the need for the flag documented is 'complex'. #ifdef PY_HAVE_THREAD_NATIVE_ID unsigned long PyThread_get_thread_native_id(void) { if (!initialized) PyThread_init_thread(); #ifdef __APPLE__ uint64_t native_id; (void) pthread_threadid_np(NULL, &native_id); #elif defined(__linux__) pid_t native_id; native_id = syscall(SYS_gettid); #elif defined(__FreeBSD__) int native_id; native_id = pthread_getthreadid_np(); #elif defined(_AIX) pthread_t native_id; native_id = pthread_self() **** More may be needed, but I expect it the include file mentioned is already included - but perhaps without the assurance that AIX says it wants/needs for real thread safe builds. And fixing that is just a bonus! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:30:41 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 22 May 2019 10:30:41 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1558520546.95.0.705976891307.issue36084@roundup.psfhosted.org> Message-ID: <95c03588-31c2-c872-219c-d75a05c967cc@felt.demon.nl> Michael Felt added the comment: On 22/05/2019 12:22, Michael Felt wrote: > All the other "assurances" are just things that need to be assured. Adding a -D_XXX to CFLAGS is not all that complex either. Perhaps getting the need for the flag documented is 'complex'. Now that I think about it, perhaps I should make a separate PR just for the -D_THREAD_SAFE definition. Python does reference the AIX "threading" include files and documentation has always indicated they should be first, or have this define. If it is already there, please excuse the noise; if not, imho - it should be there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:54:29 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 22 May 2019 10:54:29 +0000 Subject: [issue25068] The proxy key's string should ignore case. In-Reply-To: <1441961173.2.0.654001525277.issue25068@psf.upfronthosting.co.za> Message-ID: <1558522469.13.0.316160379083.issue25068@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13405 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 06:58:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 10:58:43 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558522723.93.0.508434769892.issue36829@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13406 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:00:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 11:00:51 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558522851.96.0.459842912603.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: Follow-up: * PR 13487 backports enhancement and bugfix to Python 3.7 * PR 13488 adds _PyErr_WriteUnraisableMsg() and adds 'err_msg' field to sys.unraisablehook * PR 13490 adds test.support.catch_unraisable_exception() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:01:24 2019 From: report at bugs.python.org (Dmitry Tantsur) Date: Wed, 22 May 2019 11:01:24 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows Message-ID: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> New submission from Dmitry Tantsur : These two calls are currently Unix-only in the socket module. However, Windows supports them starting with Vista: https://docs.microsoft.com/en-us/windows/desktop/api/netioapi/nf-netioapi-if_indextoname https://docs.microsoft.com/en-us/windows/desktop/api/netioapi/nf-netioapi-if_nametoindex I checked with ctypes and they do seem to work. Unfortunately, if_nameindex is not implemented. ---------- components: Library (Lib) messages: 343171 nosy: dtantsur priority: normal severity: normal status: open title: Implement socket.if_{nametoindex,indextoname} for Windows type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:04:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 11:04:09 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558523049.31.0.243247423496.issue36965@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 791e5fcbab9e444b62d13d08707cbbbeb9406297 by Victor Stinner (Erik Janssens) in branch '3.7': bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421) (GH-13471) https://github.com/python/cpython/commit/791e5fcbab9e444b62d13d08707cbbbeb9406297 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:05:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 11:05:10 +0000 Subject: [issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers In-Reply-To: <1558270946.43.0.622692216105.issue36965@roundup.psfhosted.org> Message-ID: <1558523110.34.0.388178062553.issue36965@roundup.psfhosted.org> STINNER Victor added the comment: The initial issue is fixed in 3.7 and master branches. If you want to work on related issue like WIN32_LEAN_AND_MEAN, please open a separated issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:09:40 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 11:09:40 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1558523380.22.0.157672283761.issue36907@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 77aa396bb9415428de09112ddf6b34bb843811eb by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-36907: fix refcount bug in _PyStack_UnpackDict() (GH-13381) https://github.com/python/cpython/commit/77aa396bb9415428de09112ddf6b34bb843811eb ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:10:04 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 22 May 2019 11:10:04 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558523404.52.0.100542253036.issue36084@roundup.psfhosted.org> Eryk Sun added the comment: > The pthread_self subroutine returns the calling thread's ID. I don't know much about AIX, but according to the docs [1] the kernel thread ID should be thread_self(), which is not the same as pthread_self(). [1]: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.basetrf2/thread_self.htm ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:15:01 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 22 May 2019 11:15:01 +0000 Subject: [issue25068] The proxy key's string should ignore case. In-Reply-To: <1441961173.2.0.654001525277.issue25068@psf.upfronthosting.co.za> Message-ID: <1558523701.41.0.112882619802.issue25068@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:16:59 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 11:16:59 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1558523819.2.0.914914479805.issue36907@roundup.psfhosted.org> Petr Viktorin added the comment: Jeroen, do you want to also do a backport for 3.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:19:07 2019 From: report at bugs.python.org (=?utf-8?q?Damien_Nad=C3=A9?=) Date: Wed, 22 May 2019 11:19:07 +0000 Subject: [issue37008] make unittest.mock.mock_open honor next() Message-ID: <1558523947.08.0.447794454948.issue37008@roundup.psfhosted.org> New submission from Damien Nad? : While we can iterate on a mock_open handle, it is not actually possible to perform a next() on it. My use case is the following: I have a file with a one-line header that I want to skip. So, roughly, my code is like with open(filename, 'r') as my_file: confirm_header(next(my_file)) for line in my_file: do_something(line) And while writing a unit test on this code, the handle returned by mock_open(read_data=my_read_data) returns a mock instead of the first line of my_read_data. ---------- components: Library (Lib) messages: 343177 nosy: Anvil priority: normal severity: normal status: open title: make unittest.mock.mock_open honor next() type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:23:54 2019 From: report at bugs.python.org (=?utf-8?q?Damien_Nad=C3=A9?=) Date: Wed, 22 May 2019 11:23:54 +0000 Subject: [issue37008] make unittest.mock.mock_open honor next() In-Reply-To: <1558523947.08.0.447794454948.issue37008@roundup.psfhosted.org> Message-ID: <1558524234.07.0.549711575461.issue37008@roundup.psfhosted.org> Change by Damien Nad? : ---------- keywords: +patch pull_requests: +13407 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:31:42 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 22 May 2019 11:31:42 +0000 Subject: [issue37006] Add top level await statement support for doctest In-Reply-To: <1558516850.14.0.4225480118.issue37006@roundup.psfhosted.org> Message-ID: <1558524702.93.0.768041122422.issue37006@roundup.psfhosted.org> Andrew Svetlov added the comment: Please keep in mind: not only asyncio can be used to execute async/await code. For example, trio has completely different implementation but utilizes async functions as well. Probably we need to customize it, maybe by inheriting AsyncioDocTestRunner from DocTestRunner base class. Also, using asyncio.run() for every line is not a good idea. asyncio.run() creates an new loop instance every time. Thus, the following doesn't work: >>> session = aiohttp.ClientSession() >>> async with session.get(url) as resp: ... text = await resp.text() The session is bound to loop, but the loop is changed by the next line. loop.run_until_complete() is not ideal too: it creates a new task every time. In AsyncioTestCase (https://github.com/python/cpython/pull/13386) I'm avoiding this problem by keeping a long-running task for saving the execution context between setup/teardown and test itself. ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:34:10 2019 From: report at bugs.python.org (Steve) Date: Wed, 22 May 2019 11:34:10 +0000 Subject: [issue21822] KeyboardInterrupt during Thread.join hangs that Thread In-Reply-To: <1403365475.16.0.757881205569.issue21822@psf.upfronthosting.co.za> Message-ID: <1558524850.89.0.268232586095.issue21822@roundup.psfhosted.org> Change by Steve : ---------- nosy: -tupl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:35:25 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 22 May 2019 11:35:25 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1558524925.27.0.38191809046.issue36907@roundup.psfhosted.org> Jeroen Demeyer added the comment: > Jeroen, do you want to also do a backport for 3.7? Don't we have a bot for that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:41:44 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 11:41:44 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1558525304.0.0.682670325309.issue36907@roundup.psfhosted.org> Petr Viktorin added the comment: We do, but here the test will need to be changed: Python 3.7.3+ (heads/3.7:791e5fcbab, May 22 2019, 13:37:27) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class IntWithDict: ... def __init__(self, **kwargs): ... self.kwargs = kwargs ... def __index__(self): ... self.kwargs.clear() ... return 0 ... >>> x = IntWithDict(dont_inherit=float()) >>> compile("", "", "", x, **x.kwargs) Traceback (most recent call last): File "", line 1, in TypeError: an integer is required (got type IntWithDict) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:46:56 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 11:46:56 +0000 Subject: [issue36936] CALL_FUNCTION_KW opcode: keyword names must be non-empty In-Reply-To: <1557998493.78.0.0526035265972.issue36936@roundup.psfhosted.org> Message-ID: <1558525616.18.0.781293140592.issue36936@roundup.psfhosted.org> Petr Viktorin added the comment: Closing per discussion in https://github.com/python/cpython/pull/13357 ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:50:41 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 11:50:41 +0000 Subject: [issue35810] Object Initialization does not incref Heap-allocated Types In-Reply-To: <1548275752.94.0.463880453345.issue35810@roundup.psfhosted.org> Message-ID: <1558525841.24.0.134418235187.issue35810@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:51:36 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 11:51:36 +0000 Subject: [issue31862] Port the standard library to PEP 489 multiphase initialization In-Reply-To: <1508857736.11.0.213398074469.issue31862@psf.upfronthosting.co.za> Message-ID: <1558525896.41.0.86433019438.issue31862@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 33e71e01e95506cf8d93fd68251fc56352bc7b39 by Petr Viktorin (Marcel Plch) in branch 'master': bpo-31862: Port binascii to PEP 489 multiphase initialization (GH-4108) https://github.com/python/cpython/commit/33e71e01e95506cf8d93fd68251fc56352bc7b39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 07:56:31 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 22 May 2019 11:56:31 +0000 Subject: [issue37006] Add top level await statement support for doctest In-Reply-To: <1558516850.14.0.4225480118.issue37006@roundup.psfhosted.org> Message-ID: <1558526191.83.0.834354032791.issue37006@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I tried using AsyncioDocTestRunner that inherits from DocTestRunner and most of the current DocTestRunner is synchronous and the execution happens in __run that seems to cause problem due to name mangling inheriting and changing it. Also python -m doctest by default uses testmod/testfile that use DocTestRunner so I thought to change DocTestRunner would be simpler and existing code can use added doctest flag without changing runner. To be little more clear by each line I meant each example. So in below "async with session.get(url) as resp:\n text = await resp.text()" counts as a single example whose code object is evaluated in asyncio.run which I said as per line by mistake. >>> async with session.get(url) as resp: ... text = await resp.text() Your concerns are reasonable about asyncio.run per example seem to be over kill and might not work in few cases. I also didn't think about trio. I will look into those. Thanks for the pointers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:01:09 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 22 May 2019 12:01:09 +0000 Subject: [issue37009] Threading and THREAD_SAFE for AIX Message-ID: <1558526469.21.0.552690908728.issue37009@roundup.psfhosted.org> New submission from Michael Felt : For years Python includes the file /usr/include/pthread.h. The AIX documentation states that this needs to be the first include file included OR the define _THREAD_SAFE needs to be defined. As this may have been true, might still be true, or might have never been true - this patch assures that the define is added to BASECFLAGS for AIX - and will not be forgotten during builds. It may be advisable to include this in backports. This "conditional requirement" has been accurate for over 20 years. ---------- components: Build messages: 343184 nosy: Michael.Felt priority: normal severity: normal status: open title: Threading and THREAD_SAFE for AIX versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:12:26 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 22 May 2019 12:12:26 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1558527146.06.0.464915832822.issue36907@roundup.psfhosted.org> Jeroen Demeyer added the comment: Using __int__ instead of __index__ works. PR coming right away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:14:06 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 22 May 2019 12:14:06 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1558527246.27.0.419712454329.issue36907@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13408 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:16:01 2019 From: report at bugs.python.org (Sanyam Khurana) Date: Wed, 22 May 2019 12:16:01 +0000 Subject: [issue21914] Create unit tests for Turtle guionly In-Reply-To: <1404442037.11.0.611165319303.issue21914@psf.upfronthosting.co.za> Message-ID: <1558527361.75.0.310527392143.issue21914@roundup.psfhosted.org> Change by Sanyam Khurana : ---------- pull_requests: +13409 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:19:41 2019 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 22 May 2019 12:19:41 +0000 Subject: [issue37010] Review performance of inspect.getfullargspec Message-ID: <1558527581.74.0.915249229552.issue37010@roundup.psfhosted.org> New submission from Nick Coghlan : (Splitting out a separate performance issue from https://bugs.python.org/issue36751#msg342683) There can be two quite different reasons for inspecting a function signature: * inspecting arbitrary functions to learn as much about them as possible in order to present good coding hints and other guidance to a developer * inspecting function and method implementations passed to a runtime API in order to call them correctly inspect.signature focuses on the former use case, and as a result ended up being markedly slower than the simpler inspect.getfullargspec implementation that it replaced. At the moment, inspect.getfullargspec is being kept around solely as a backwards compatibility API - it calls inspect.signature internally, but then throws away the rich objects that function creates, replacing them with simple Python builtins. It seems plausible that we could reverse that relationship, and instead have inspect.signature use inspect.getfullargspec as a lower level API that produces less self-descriptive output, but also avoids creating a lot of instances of custom Python objects. (Sample performance data can be seen in https://gist.github.com/zzzeek/0eb0636fa3917f36ffd887d9f765c208) ---------- messages: 343186 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Review performance of inspect.getfullargspec type: performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:21:34 2019 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 22 May 2019 12:21:34 +0000 Subject: [issue36751] Changes in the inspect module for PEP 570 In-Reply-To: <1556539997.22.0.720636636419.issue36751@roundup.psfhosted.org> Message-ID: <1558527694.36.0.826233051596.issue36751@roundup.psfhosted.org> Nick Coghlan added the comment: I split https://bugs.python.org/issue37010 out as a separate performance issue in case anyone is inclined to explore the idea of reversing the relationship between inspect.signature and inspect.getfullargspec, such that the latter becomes a fast building block for the former operation, rather than a relatively inefficient compatibility wrapper the way it is now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:25:27 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 22 May 2019 12:25:27 +0000 Subject: [issue37010] Review performance of inspect.getfullargspec In-Reply-To: <1558527581.74.0.915249229552.issue37010@roundup.psfhosted.org> Message-ID: <1558527927.18.0.028852560076.issue37010@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:34:54 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 22 May 2019 12:34:54 +0000 Subject: [issue37008] make unittest.mock.mock_open honor next() In-Reply-To: <1558523947.08.0.447794454948.issue37008@roundup.psfhosted.org> Message-ID: <1558528494.62.0.57753587164.issue37008@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +cjw296, lisroach, mariocj89, michael.foord versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:44:44 2019 From: report at bugs.python.org (daniel hahler) Date: Wed, 22 May 2019 12:44:44 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) Message-ID: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> New submission from daniel hahler : bdb/pdb currently uses `sys.settrace(None)` when uninstalling its trace function (trace_dispatch), but should rather store the original trace function in the beginning and use this instead of `None`. While typically pdb is not used in tests, it is just good practice, given that there can only be a single trace function. I've done this via monkeypatching for pdbpp's tests, which resulted in an easy 2% coverage gain (https://github.com/antocuni/pdb/pull/253). ---------- components: Library (Lib) messages: 343188 nosy: blueyed priority: normal severity: normal status: open title: pdb: restore original tracing function instead of sys.settrace(None) type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:45:16 2019 From: report at bugs.python.org (daniel hahler) Date: Wed, 22 May 2019 12:45:16 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558529116.41.0.548705184483.issue37011@roundup.psfhosted.org> Change by daniel hahler : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:46:46 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 May 2019 12:46:46 +0000 Subject: [issue24653] Mock.assert_has_calls([]) is surprising for users In-Reply-To: <1437126004.09.0.453747784975.issue24653@psf.upfronthosting.co.za> Message-ID: <1558529206.75.0.659690966321.issue24653@roundup.psfhosted.org> Serhiy Storchaka added the comment: alist.extend([]) is also a special case, but it is not explicitly documented, because it is not exceptional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:52:18 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 12:52:18 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1558529538.7.0.0739682208245.issue36907@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset d092caf096fa48baadfc0900792206bb5aa0192d by Petr Viktorin (Jeroen Demeyer) in branch '3.7': bpo-36907: fix refcount bug in _PyStack_UnpackDict() (GH-13381) (GH-13493) https://github.com/python/cpython/commit/d092caf096fa48baadfc0900792206bb5aa0192d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:52:41 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 12:52:41 +0000 Subject: [issue36907] Crash due to borrowed references in _PyStack_UnpackDict() In-Reply-To: <1557776404.01.0.559706785576.issue36907@roundup.psfhosted.org> Message-ID: <1558529561.86.0.97242559477.issue36907@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 08:57:53 2019 From: report at bugs.python.org (Jake Tesler) Date: Wed, 22 May 2019 12:57:53 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558529873.29.0.856759451716.issue36084@roundup.psfhosted.org> Jake Tesler added the comment: In general, I?ve concluded most ?editions? of pthread_self() are not the same value as this feature aims to implement. I?m not familiar enough with AIX to be certain about that platform, though. If there?s an equivalent function in AIX to capture the actual integral thread ID in the same 3-line way as Linux, FreeBSD, et al., are implemented (the big block in PyThread_get_thread_native_id), then it?s worth including. If the mechanism required is a more complex one than just adding a few lines, then it might be best left for a new PR. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 09:15:43 2019 From: report at bugs.python.org (Jake Tesler) Date: Wed, 22 May 2019 13:15:43 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558530943.16.0.0640979847228.issue36084@roundup.psfhosted.org> Jake Tesler added the comment: I will look into whether adding thread_self() for AIX would be simple enough for this PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 09:43:18 2019 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 22 May 2019 13:43:18 +0000 Subject: [issue30802] datetime.datetime.strptime('200722', '%Y%U') In-Reply-To: <1498726688.6.0.920894490968.issue30802@psf.upfronthosting.co.za> Message-ID: <1558532598.02.0.19199848241.issue30802@roundup.psfhosted.org> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 09:58:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 13:58:06 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558533486.32.0.640054036691.issue36721@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a release blocker: bpo-21536 basically broke the compilation of all applications which embed Python. IMHO this issue is the best solution to fix it. > I don't understand the need for this. Oh. Let me explain this issue differently. There are two use cases for libpython: * Build a C extension and load it in Python: use case called "pyext" by waf * Embed Python into an application: use case called "pyembed" by waf My bpo-21536 broke waf "pyembed" which fails to detect Python. waf "pyembed" creates a C program which calls Py_Initialize(), but the linker fails to locate Py_Initialize() symbol. To embed Python into an application, we really need to link the application to libpython: we need -lpython3.8. In Python 3.7, "pyext" and "pyembed" use cases were covered both by default "python3.7-config --libs" and "pkg-config python3.7 --libs" configuration. In Python 3.8, we now have to distinguish both use cases and provide *different* configuration depending if binary must be linked to libpython or not. More info about waf breakage in my waf bug report: https://gitlab.com/ita1024/waf/issues/2239 FYI the waf breakage was discovered by trying to build libtdb on Fedora Rawhide with Python 3.8a4, it's a dependency of Samba which embeds Python: https://bugzilla.redhat.com/show_bug.cgi?id=1711638 ---------- nosy: +lukasz.langa priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:04:10 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 14:04:10 +0000 Subject: [issue37012] Possible crash due to PyType_FromSpecWithBases() Message-ID: <1558533850.59.0.459054292807.issue37012@roundup.psfhosted.org> New submission from Petr Viktorin : If the PyObject_MALLOC() call failed in PyType_FromSpecWithBases(), PyObject_Free() would be called on a static string in type_dealloc(). Fixed by Zackery Spytz in pull request 10304. I'm opening the issue retroactively. ---------- messages: 343194 nosy: petr.viktorin priority: normal severity: normal status: open title: Possible crash due to PyType_FromSpecWithBases() versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:04:12 2019 From: report at bugs.python.org (Matthias Klose) Date: Wed, 22 May 2019 14:04:12 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558533852.94.0.187840848217.issue36721@roundup.psfhosted.org> Matthias Klose added the comment: "AFAICT, the purpose of python-config is to provide configuration info for embedding Python" If that's the intention, then at least it's not used as such. It's also used to build/configure extensions using automake/cmake based build systems. There is one tool, and two different use cases. I think Victor's suggestion is appropriate ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:04:24 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 22 May 2019 14:04:24 +0000 Subject: [issue37012] Possible crash due to PyType_FromSpecWithBases() In-Reply-To: <1558533850.59.0.459054292807.issue37012@roundup.psfhosted.org> Message-ID: <1558533864.03.0.101728565347.issue37012@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13410 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:09:04 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 14:09:04 +0000 Subject: [issue37012] Possible crash due to PyType_FromSpecWithBases() In-Reply-To: <1558533850.59.0.459054292807.issue37012@roundup.psfhosted.org> Message-ID: <1558534144.94.0.168451117735.issue37012@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +13411 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:09:29 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 22 May 2019 14:09:29 +0000 Subject: [issue37012] Possible crash due to PyType_FromSpecWithBases() In-Reply-To: <1558533850.59.0.459054292807.issue37012@roundup.psfhosted.org> Message-ID: <1558534169.11.0.140751194292.issue37012@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +13412 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:23:12 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 22 May 2019 14:23:12 +0000 Subject: [issue36972] Add SupportsIndex In-Reply-To: <1558368569.89.0.17531716566.issue36972@roundup.psfhosted.org> Message-ID: <1558534992.94.0.529226498109.issue36972@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset 4c7a46eb3c009c85ddf2eb315d94d804745187d4 by Ivan Levkivskyi (Paul Dagnelie) in branch 'master': bpo-36972: Add SupportsIndex (GH-13448) https://github.com/python/cpython/commit/4c7a46eb3c009c85ddf2eb315d94d804745187d4 ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:24:49 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 22 May 2019 14:24:49 +0000 Subject: [issue36972] Add SupportsIndex In-Reply-To: <1558368569.89.0.17531716566.issue36972@roundup.psfhosted.org> Message-ID: <1558535089.79.0.734779416175.issue36972@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:38:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 14:38:16 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558535896.9.0.0974838371372.issue36721@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Add pkg-config python-3.8-embed -> Add pkg-config python-3.8-embed and --embed to python3.8-config _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:46:23 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 22 May 2019 14:46:23 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558536383.42.0.451924849857.issue37011@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +13413 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:47:16 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Wed, 22 May 2019 14:47:16 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558536436.08.0.252985464863.issue37011@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi @blueyed, can you confirm PR 13497 solve your issue ? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:54:33 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 22 May 2019 14:54:33 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1558536873.91.0.576222621017.issue36878@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset 933e1509ec6efa8e6ab8c8c7ce02059ce2b6d9b9 by Ivan Levkivskyi (Michael J. Sullivan) in branch 'master': bpo-36878: Track extra text added to 'type: ignore' in the AST (GH-13479) https://github.com/python/cpython/commit/933e1509ec6efa8e6ab8c8c7ce02059ce2b6d9b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 10:58:28 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 22 May 2019 14:58:28 +0000 Subject: [issue36974] Implement PEP 590 Message-ID: <1558537108.88.0.164663506125.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13414 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:02:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 15:02:05 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558537325.83.0.0889339000167.issue36721@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13415 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:08:54 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 22 May 2019 15:08:54 +0000 Subject: [issue37006] Add top level await statement support for doctest In-Reply-To: <1558516850.14.0.4225480118.issue37006@roundup.psfhosted.org> Message-ID: <1558537734.62.0.668099072785.issue37006@roundup.psfhosted.org> Matthias Bussonnier added the comment: The other thing to think about is `ensure_future` and `create_task`, they may not move forward until a foreground task is running. You can keep a loop running between lines or code-chunks, but then doctest cannot contain `asyncio.run()`. I'm leaning toward conservatisme, and make things better but not perfect for 3.8; potentially improving, in minor release of 3.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:18:31 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 22 May 2019 15:18:31 +0000 Subject: [issue33482] codecs.StreamRecoder.writelines is broken In-Reply-To: <1526222027.51.0.682650639539.issue33482@psf.upfronthosting.co.za> Message-ID: <1558538311.53.0.581356755777.issue33482@roundup.psfhosted.org> miss-islington added the comment: New changeset b3be4072888a4ce054993c2801802721466ea02d by Miss Islington (bot) (Jelle Zijlstra) in branch 'master': bpo-33482: fix codecs.StreamRecoder.writelines (GH-6779) https://github.com/python/cpython/commit/b3be4072888a4ce054993c2801802721466ea02d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:30:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 15:30:01 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558539001.27.0.633396398882.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: I merged my PR #13187, so I reject PR #13175. In the python-dev thread, there is no consensus in favor of -X abortunraisable option. The few people who pronounce them on this option were more against it. https://mail.python.org/pipermail/python-dev/2019-May/157436.html At least, you can now very easily reimplement it in a few line of pure Python using the new sys.unraisablehook! For example, add this code to Lib/site.py: --- if 'abortunraisable' in sys._xoptions: import signal def abort_hook(unraisable, # keep a reference to continue to work # during Python shutdown raise_signal=signal.raise_signal, SIGABRT=signal.SIGABRT): raise_signal(SIGABRT) sys.unraisablehook = abort_hook --- Example with attached gc_callback.py: --- $ ./python -X dev gc_callback.py Exception ignored in: Traceback (most recent call last): File "gc_callback.py", line 7, in wr_callback raise ValueError(42) ValueError: 42 $ ./python -X abortunraisable gc_callback.py Aborted (core dumped) $ ./python -X abortunraisable -X faulthandler gc_callback.py Fatal Python error: Aborted Current thread 0x00007fed6edc7740 (most recent call first): File "/home/vstinner/prog/python/master/Lib/site.py", line 649 in abort_hook File "gc_callback.py", line 11 in Aborted (core dumped) --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:33:17 2019 From: report at bugs.python.org (Jelle Zijlstra) Date: Wed, 22 May 2019 15:33:17 +0000 Subject: [issue33482] codecs.StreamRecoder.writelines is broken In-Reply-To: <1526222027.51.0.682650639539.issue33482@psf.upfronthosting.co.za> Message-ID: <1558539197.21.0.0845508090324.issue33482@roundup.psfhosted.org> Change by Jelle Zijlstra : ---------- pull_requests: +13416 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:35:47 2019 From: report at bugs.python.org (Jelle Zijlstra) Date: Wed, 22 May 2019 15:35:47 +0000 Subject: [issue33482] codecs.StreamRecoder.writelines is broken In-Reply-To: <1526222027.51.0.682650639539.issue33482@psf.upfronthosting.co.za> Message-ID: <1558539347.62.0.356917293231.issue33482@roundup.psfhosted.org> Change by Jelle Zijlstra : ---------- pull_requests: +13417 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:39:07 2019 From: report at bugs.python.org (mike bayer) Date: Wed, 22 May 2019 15:39:07 +0000 Subject: [issue37010] Review performance of inspect.getfullargspec In-Reply-To: <1558527581.74.0.915249229552.issue37010@roundup.psfhosted.org> Message-ID: <1558539547.11.0.918642151054.issue37010@roundup.psfhosted.org> mike bayer added the comment: thanks for creating this issue Nick! ---------- nosy: +zzzeek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:43:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 15:43:21 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558539801.23.0.570961550268.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b121f63155d8e3c7c42ab6122e36eaf7f5e9f7f5 by Victor Stinner (Jake Tesler) in branch 'master': bpo-36084: Add native thread ID (TID) to threading.Thread (GH-13463) https://github.com/python/cpython/commit/b121f63155d8e3c7c42ab6122e36eaf7f5e9f7f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:44:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 15:44:57 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558539897.56.0.440060524758.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: Currently, Threading.start() ignores _start_new_thread() return value which is an identifier. Is it the same value than threading.get_native_id()? It might be good to clarify _thread._start_new_thread() documentation since we now have 2 kinds of "identifier". Later it might be interesting to attempt to support NetBSD, OpenBSD, and more operating systems. Well, that can be done... later :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:50:14 2019 From: report at bugs.python.org (Michael Sullivan) Date: Wed, 22 May 2019 15:50:14 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1558540214.37.0.148091814859.issue36878@roundup.psfhosted.org> Michael Sullivan added the comment: I think there will be one more PR to disallow non-ASCII characters immediately after a `# type: ignore`, but otherwise I think this is done ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:52:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 15:52:11 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558540331.71.0.0931719702018.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: glibc 2.30 scheduled in August 2019 will finally provide a gettid() function! * https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD * http://man7.org/linux/man-pages/man2/gettid.2.html Once it will be released, it would be interesting to use it rather than using a direct syscall. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 11:56:48 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 22 May 2019 15:56:48 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1558530943.16.0.0640979847228.issue36084@roundup.psfhosted.org> Message-ID: <09ff0a4c-d188-cec2-8311-96a44f4a03be@felt.demon.nl> Michael Felt added the comment: On 22/05/2019 15:15, Jake Tesler wrote: > Jake Tesler added the comment: > > I will look into whether adding thread_self() for AIX would be simple enough for this PR. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > Blush. Maybe I should have read further (to chapter T) Here is a bare bones example - showing the pthread_self() is not the right value, but thread_self is. michael at x071:[/data/prj/aixtools/tests/posix]cat thread*.c #include #include #include main() { ??????? pid_t pid; ??????? tid_t tid; ??????? pthread_t ptid; ??????? pid = getpid(); ??????? tid = thread_self(); ??????? ptid = pthread_self(); ??????? fprintf(stderr,"thread_self: pid:%d tid:%d ptid:%d\n", pid, tid, ptid); ??????? sleep(300);???? /* give time to run ps -mo THREAD */ } michael at x071:[/data/prj/aixtools/tests/posix]./thread_self thread_self: pid:*4129010 *tid:*23724099 *ptid:1 michael at x071:[/data/prj/aixtools/tests/posix]ps -mo THREAD ??? USER???? PID??? PPID?????? TID S? CP PRI SC??? WCHAN??????? F???? TT BND COMMAND ?michael 3408006 7012502???????? - A?? 3? 61? 1??????? -?? 200001? pts/0? -1 ps -mo THREAD ?????? -?????? -?????? -? 22282455 R?? 3? 61? 1??????? -?? 400000????? -? -1 - ?michael *4129010 *7012502???????? - A?? 0? 60? 1 f1000a03e16533b0? 8200011? pts/0? -1 ./thread_self ?????? -?????? -?????? -? *23724099 *S?? 0? 60? 1 f1000a03e16533b0?? 410400????? -? -1 - ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:02:14 2019 From: report at bugs.python.org (twisteroid ambassador) Date: Wed, 22 May 2019 16:02:14 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: Message-ID: twisteroid ambassador added the comment: AFAIK the reason why scope id is required for IPv6 is that every IPv6 interfaces has its own link-local address, and all these addresses are in the same subnet, so without an additional scope id there?s no way to tell from which interface an address can be reached. IPv4 does not have this problem because IPv4 interfaces usually don?t use link-local addresses. Michael Felt ?2019?5?22? ??18:08??? > > Michael Felt added the comment: > > On 22/05/2019 10:43, Michael Felt wrote: > > 'fe80::1%1' <> 'fe80::1' - ... I am not 'experienced' with IPv6 and > scope. > > >From what I have just read (again) - scope seems to be a way to indicate > the interface used (e.g., eth0, or enp0s25) as a "number". > > Further, getsockname() (and getpeername()) seem to be more for after a > fork(), or perhaps after a pthread_create(). What remains unclear is why > would I ever care what the scopeid is. Is it because it is "shiney", > does it add security (if so, how)? > > And, as this has been added - what breaks in Python when "scopeid" is > not available? > > I am thinking, if adding a scopeid is a way to assign an IPv6 address to > an interface - what is to prevent abuse? Why would I even want the same > (link-local IP address on eth0 and eth1 at the same time? Assuming that > it what it is making possible - the same IPv6/64 address on multiple > interfaces and use scope ID to be more selective/aware. It this an > alternative way to multiplex interfaces - now in the IP layer rather > than in the LAN layer? > > If I understand why this is needed I may be able to come up with a way > to "get it working" for the Python model of interfaces - although, > probably not "fast". > > Regards, > > Michael > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:08:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 16:08:04 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558541284.68.0.538883317922.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: Michael Felt: it's annoying when you ignore Antoine's comment and my comment. * https://github.com/python/cpython/pull/13463#issuecomment-494797084 * https://bugs.python.org/issue36084#msg343159 The AIX case is very special and required a separated issue. Please open a separated if you want to discuss/implement get_native_id() on AIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:10:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 16:10:01 +0000 Subject: [issue36929] Other Python _io implementations may not expose _io in their type names In-Reply-To: <1557945330.73.0.750176002779.issue36929@roundup.psfhosted.org> Message-ID: <1558541401.76.0.962058205532.issue36929@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:13:47 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 22 May 2019 16:13:47 +0000 Subject: [issue37010] Review performance of inspect.getfullargspec In-Reply-To: <1558527581.74.0.915249229552.issue37010@roundup.psfhosted.org> Message-ID: <1558541627.61.0.0826816593825.issue37010@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:19:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 22 May 2019 16:19:54 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1558541994.36.0.741369080379.issue36817@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The reason the main CI did not catch this is that test_tools is only executed on a (random) subset of all the files if I remember correctly because when executed on all files it massively increases the time of the CI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:20:16 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 22 May 2019 16:20:16 +0000 Subject: [issue36817] Add = to f-strings for easier debugging. In-Reply-To: <1557166256.56.0.583302074071.issue36817@roundup.psfhosted.org> Message-ID: <1558542016.08.0.0132276599412.issue36817@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Anecdotally, this happened as well when in the implementation of PEP572 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:22:31 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 22 May 2019 16:22:31 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1558542151.76.0.166274032308.issue37003@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Notice that test_tools will fail if f'{x=}' becomes f'x={x!r}' when unparsed as it compares the text of the file and the text of the roundtrip of the ast of the file ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:23:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 16:23:33 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558542213.37.0.43046808892.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a58db9628d0c96cc5b863137fed4e432238f8027 by Victor Stinner in branch '3.7': bpo-36829: Enhance PyErr_WriteUnraisable() (GH-13487) https://github.com/python/cpython/commit/a58db9628d0c96cc5b863137fed4e432238f8027 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:24:42 2019 From: report at bugs.python.org (twisteroid ambassador) Date: Wed, 22 May 2019 16:24:42 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1558542282.67.0.666957024178.issue35545@roundup.psfhosted.org> twisteroid ambassador added the comment: With regards to the failing test, it looks like the test basically boils down to testing whether loop.getaddrinfo('fe80::1%1', 80, type=socket.SOCK_STREAM) returns (, , *, *, ('fe80::1', 80, 0, 1)). This feels like a dangerous assumption to make, since it's tied to the operating system's behavior. Maybe AIX's getaddrinfo() in fact does not resolve scoped addresses correctly; maybe it only resolves scope ids correctly for real addresses that actually exist on the network; Maybe AIX assigns scope ids differently and do not use small integers; etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:28:25 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 22 May 2019 16:28:25 +0000 Subject: [issue37013] Fatal Python error in socket.if_indextoname() Message-ID: <1558542505.9.0.778249415018.issue37013@roundup.psfhosted.org> New submission from Zackery Spytz : Python 3.8.0a4+ (heads/master:ef9d9b6312, May 22 2019, 08:35:25) [GCC 9.0.1 20190402 (experimental) [trunk revision 270074]] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.if_indextoname(2**64 - 1) Fatal Python error: a function returned NULL without setting an error SystemError: returned NULL without setting an error Current thread 0x00007f29d708d140 (most recent call first): File "", line 1 in Aborted (core dumped) This is because socket.if_indextoname() does not use PyErr_Occurred() when checking PyLong_AsUnsignedLong() for failure. ---------- components: Extension Modules messages: 343215 nosy: ZackerySpytz, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Fatal Python error in socket.if_indextoname() type: crash versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:28:42 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 22 May 2019 16:28:42 +0000 Subject: [issue33482] codecs.StreamRecoder.writelines is broken In-Reply-To: <1526222027.51.0.682650639539.issue33482@psf.upfronthosting.co.za> Message-ID: <1558542522.89.0.486894247129.issue33482@roundup.psfhosted.org> miss-islington added the comment: New changeset 81c5ec9e417aebfe92945a05771006e4241f4e08 by Miss Islington (bot) (Jelle Zijlstra) in branch '3.7': [3.7] bpo-33482: fix codecs.StreamRecoder.writelines (GH-6779) (GH-13502) https://github.com/python/cpython/commit/81c5ec9e417aebfe92945a05771006e4241f4e08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:30:47 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 22 May 2019 16:30:47 +0000 Subject: [issue37013] Fatal Python error in socket.if_indextoname() In-Reply-To: <1558542505.9.0.778249415018.issue37013@roundup.psfhosted.org> Message-ID: <1558542647.95.0.287071592132.issue37013@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13418 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:42:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 22 May 2019 16:42:57 +0000 Subject: [issue35760] test_asyncio: test_async_gen_asyncio_gc_aclose_09() race condition In-Reply-To: <1547733864.78.0.251061521649.issue35760@roundup.psfhosted.org> Message-ID: <1558543377.41.0.535743637342.issue35760@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This seems to occur rather commonly now such that it fails and then passes on verbose run. Example : https://dev.azure.com/Python/cpython/_build/results?buildId=43325&view=logs&j=c83831cd-3752-5cc7-2f01-8276919eb334&t=5a421c4a-0933-53d5-26b9-04b36ad165eb&l=536 Victor, do you agree on increasing the timeout for sleep to 1 for this test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:43:43 2019 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 22 May 2019 16:43:43 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558543423.54.0.4323183985.issue27987@roundup.psfhosted.org> Neil Schemenauer added the comment: We now have a concrete use case. ;-) My idea was that we can introduce a new, CPython internal API that aligns on 8-byte boundaries (or takes alignment as a parameter). The API would be a stop-gap measure. We can use the API to reduce the overhead for specific types. E.g. for non-subclasses of float, we know the PyObject structure does not need 16-byte alignment. We don't need a version of "alignof" to know this. Inside floatobject.c, we could call the new objmalloc API that gives new memory with 8-byte alignment. That would save the 33% overhead. E.g. in PyFloat_FromDouble, rather than: PyObject_MALLOC(sizeof(PyFloatObject)) we could call something like: _PyObject_MALLOC_ALIGNED(sizeof(PyFloatObject), 8) This internal API would not be a permanent solution. Having to manually fix each place that PyObjects are allocated and hard-coding the required alignment is not the best solution. We can only fix specific types and extension modules would always get the 16-byte alignment. Still, by tweaking some of the most common types, we avoid much of the overhead for the alignment change, at least for the average Python program. In the long term, we would need a better solution. E.g. an API that can take alignment requirements as a parameter. Or, a solution I like better, have types use PyObject_New(). Then, add an alignment specifier to type object (e.g. tp_align to go along with tp_basicsize). Then there does not have to be a new public API that takes alignment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:45:26 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 22 May 2019 16:45:26 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558543526.47.0.188991483913.issue27987@roundup.psfhosted.org> Antoine Pitrou added the comment: Neil, I don't see the point of having this discussion here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:47:13 2019 From: report at bugs.python.org (Matej Cepl) Date: Wed, 22 May 2019 16:47:13 +0000 Subject: [issue36905] test_typing.GetTypeHintTests.test_get_type_hints_modules_forwardref unexpected success while running whole test suite sequentially In-Reply-To: <1557762722.1.0.805190875774.issue36905@roundup.psfhosted.org> Message-ID: <1558543633.74.0.0566345289825.issue36905@roundup.psfhosted.org> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 12:51:23 2019 From: report at bugs.python.org (daniel hahler) Date: Wed, 22 May 2019 16:51:23 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558543883.81.0.567621177846.issue37011@roundup.psfhosted.org> daniel hahler added the comment: Looks great, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 13:26:07 2019 From: report at bugs.python.org (Grant Wu) Date: Wed, 22 May 2019 17:26:07 +0000 Subject: [issue37014] fileinput module should document that openhook and mode are ignored when reading from stdin Message-ID: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> New submission from Grant Wu : https://github.com/python/cpython/blob/master/Lib/fileinput.py#L326 shows that the openhook and mode are ignored when reading from stdin. Since part of fileinput's functionality is to abstract over whether one is reading from stdin or over a file, I think this abstraction leak should be documented. One common use case where this might break is when attempting to set the file encoding using the included fileinput.hook_encoded functionality. ---------- assignee: docs at python components: Documentation messages: 343221 nosy: Grant Wu2, docs at python priority: normal severity: normal status: open title: fileinput module should document that openhook and mode are ignored when reading from stdin versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 13:30:28 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 22 May 2019 17:30:28 +0000 Subject: [issue33482] codecs.StreamRecoder.writelines is broken In-Reply-To: <1526222027.51.0.682650639539.issue33482@psf.upfronthosting.co.za> Message-ID: <1558546228.3.0.693183363737.issue33482@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 13:47:18 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 22 May 2019 17:47:18 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558542151.76.0.166274032308.issue37003@roundup.psfhosted.org> Message-ID: Matthias Bussonnier added the comment: I thought it was comparing the AST of the file to the AST of the unparsed AST. So it's actually checking if parse(unparse(x)) is indempotent and not wether parse(unparse(x)) is indempotent. So x={x!r} should be fine. On Wed, May 22, 2019, 09:22 Pablo Galindo Salgado wrote: > > Pablo Galindo Salgado added the comment: > > Notice that test_tools will fail if f'{x=}' becomes f'x={x!r}' when > unparsed as it compares the text of the file and the text of the roundtrip > of the ast of the file > > ---------- > nosy: +pablogsal > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 13:56:03 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 22 May 2019 17:56:03 +0000 Subject: [issue37015] Fix asyncio mock wranings Message-ID: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> New submission from Andrew Svetlov : After merging https://github.com/python/cpython/pull/9296 asyncio test suite prints a lot of warnings like Exception ignored in: Traceback (most recent call last): File "/home/andrew/projects/cpython/Lib/warnings.py", line 510, in _warn_unawaited_coroutine warn(msg, category=RuntimeWarning, stacklevel=2, source=coro) RuntimeWarning: coroutine 'AsyncMockMixin._mock_call' was never awaited I believe this is not a sign of AsyncMock problem but asyncio tests should be fixed. Need more investigations though. ---------- components: Tests messages: 343223 nosy: asvetlov priority: normal severity: normal status: open title: Fix asyncio mock wranings type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 13:56:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 22 May 2019 17:56:30 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1558547790.2.0.825398286813.issue37015@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- title: Fix asyncio mock wranings -> Fix asyncio mock warnings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 13:59:41 2019 From: report at bugs.python.org (Jake Tesler) Date: Wed, 22 May 2019 17:59:41 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558547981.95.0.474841248936.issue36084@roundup.psfhosted.org> Jake Tesler added the comment: Victor ? the return value of _start_new_thread is the the `ident` parameter, and its not the same as the native id. See here: https://github.com/python/cpython/pull/11993#issuecomment-491544908 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 14:02:06 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 22 May 2019 18:02:06 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1558548126.11.0.351098961712.issue37015@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 14:08:34 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 22 May 2019 18:08:34 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1558541284.68.0.538883317922.issue36084@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: On 22/05/2019 18:08, STINNER Victor wrote: > STINNER Victor added the comment: > > Michael Felt: it's annoying when you ignore Antoine's comment and my comment. > * https://github.com/python/cpython/pull/13463#issuecomment-494797084 > * https://bugs.python.org/issue36084#msg343159 > > The AIX case is very special and required a separated issue. Please open a separated if you want to discuss/implement get_native_id() on AIX. My apologies. I was not ignoring anyone. I am sorry you had that impression. I had already taken it as a given that it would not be in this PR (re: https://bugs.python.org/issue36084#msg343159) And, I had expressed my hope - it would not be too complex in https://bugs.python.org/issue36084#msg343168. Which also made me realize that an 'issue' around the "define" described in the "pthread" documentation (so in hindsight, not applicable to an implementation of "get_native_id()". And, while I am sorry you feel I have ignored you - it is hardly the case. Everyone's comments have given me a reason to look further. And it grieves me that my intentions are misunderstood. Thank you for your honesty! > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 14:13:52 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 22 May 2019 18:13:52 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1558548832.51.0.116488053174.issue37003@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Actually, it checks if the dump is the same: class ASTTestCase(unittest.TestCase): def assertASTEqual(self, ast1, ast2): self.assertEqual(ast.dump(ast1), ast.dump(ast2)) def check_roundtrip(self, code1, filename="internal"): ast1 = compile(code1, filename, "exec", ast.PyCF_ONLY_AST) unparse_buffer = io.StringIO() unparse.Unparser(ast1, unparse_buffer) code2 = unparse_buffer.getvalue() ast2 = compile(code2, filename, "exec", ast.PyCF_ONLY_AST) self.assertASTEqual(ast1, ast2) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 14:17:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 22 May 2019 18:17:25 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1558549045.84.0.616999956759.issue37003@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Notice that test_tools will fail if f'{x=}' becomes f'x={x!r}' I arrived at the wrong conclusion as Matthias points out. >>> import ast >>> ast.dump(compile("f'{x=}'","","exec",ast.PyCF_ONLY_AST)) "Module(body=[Expr(value=JoinedStr(values=[FormattedValue(value=Name(id='x', ctx=Load()), conversion=114, format_spec=None, expr_text='x=')]))], type_ignores=[])" >>> ast.dump(compile("f'{x!r}'","","exec",ast.PyCF_ONLY_AST)) "Module(body=[Expr(value=JoinedStr(values=[FormattedValue(value=Name(id='x', ctx=Load()), conversion=114, format_spec=None, expr_text=None)]))], type_ignores=[])" if expr_text is removed those strings will be the same, so we will be ok. Sorry for the confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 14:36:43 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 22 May 2019 18:36:43 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1558550203.52.0.156964910774.issue37015@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Not sure if it helps. Set backlog in the below test as 1. Add a print statement print(type(_mock_call)) at [0] . I could see some of _mock_call to be AsyncMock . So instead of calling return _mock_self._mock_call(*args, **kwargs) directly if I call them only with they are not instance of AsyncMock (not isinstance(_mock_self, AsyncMock)) then the warning goes away. Guess somewhere an AsyncMock is created as I can see _accept_connection2. When the backlog value is set to 100 it shows lot of warnings. $ ./python.exe -Werror -X tracemalloc -m unittest -vv test.test_asyncio.test_selector_events.BaseSelectorEventLoopTests.test_accept_connection_multiple test_accept_connection_multiple (test.test_asyncio.test_selector_events.BaseSelectorEventLoopTests) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.123s OK Exception ignored in: Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/warnings.py", line 510, in _warn_unawaited_coroutine warn(msg, category=RuntimeWarning, stacklevel=2, source=coro) RuntimeWarning: coroutine 'AsyncMockMixin._mock_call' was never awaited [0] https://github.com/python/cpython/blob/b121f63155d8e3c7c42ab6122e36eaf7f5e9f7f5/Lib/unittest/mock.py#L991 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 14:53:39 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 22 May 2019 18:53:39 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1558551219.71.0.654055269398.issue37015@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: patching _accept_connection2 attribute on loop object seems to return an AsyncMock. ? cpython git:(master) ? cat ../backups/bpo37015.py import asyncio from unittest.mock import patch with patch.object(asyncio.get_event_loop(), '_accept_connection2') as f: print(f) f() ? cpython git:(master) ? ./python.exe ../backups/bpo37015.py ../backups/bpo37015.py:5: RuntimeWarning: coroutine 'AsyncMockMixin._mock_call' was never awaited f() RuntimeWarning: Enable tracemalloc to get the object allocation traceback Relevant test def test_accept_connection_multiple(self): sock = mock.Mock() sock.accept.return_value = (mock.Mock(), mock.Mock()) backlog = 1 # Mock the coroutine generation for a connection to prevent # warnings related to un-awaited coroutines. mock_obj = mock.patch.object with mock_obj(self.loop, '_accept_connection2') as accept2_mock: print(f"{accept2_mock=}") accept2_mock.return_value = None with mock_obj(self.loop, 'create_task') as task_mock: task_mock.return_value = None self.loop._accept_connection( mock.Mock(), sock, backlog=backlog) self.assertEqual(sock.accept.call_count, backlog) When I specify new value which defaults to DEFAULT as Mock() then there is no AsyncMock. Same can be done in test and the warnings go away. My suspicion is that if there is a loop object with _accept_connection2 earlier in Python 3.7 is returned by patch.object but now it returns an instead # use explicit mock import asyncio from unittest.mock import patch, Mock with patch.object(asyncio.get_event_loop(), '_accept_connection2', Mock()) as f: print(f) f() ? cpython git:(master) ? ./python.exe ../backups/bpo37015.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 15:11:59 2019 From: report at bugs.python.org (Michael J. Sullivan) Date: Wed, 22 May 2019 19:11:59 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1558552319.92.0.0116796427033.issue36878@roundup.psfhosted.org> Change by Michael J. Sullivan : ---------- pull_requests: +13419 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 15:16:28 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 22 May 2019 19:16:28 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1558552588.71.0.312582942802.issue37015@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I guess cause is at [0] . When there is no new value specified and with spec being None if mock.patch is used on an async object (original = _accept_connection2). Here original is an async object then AsyncMock is returned. Changing this causes test failures where patching AsyncClass.async_method now expects an AsyncMock but as per older behavior it returns MagicMock. I think it's a behavior that needs to be discussed as it differs from 3.7 and not sure if AsyncMock would always be awaited as seen in test_accept_connection_multiple. [0] https://github.com/python/cpython/blob/b121f63155d8e3c7c42ab6122e36eaf7f5e9f7f5/Lib/unittest/mock.py#L1313 if spec is None and _is_async_obj(original): Klass = AsyncMock else: Klass = MagicMock ---------- nosy: +lisroach, mariocj89 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 15:38:51 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 22 May 2019 19:38:51 +0000 Subject: [issue34616] implement "Async exec" In-Reply-To: <1536530232.25.0.56676864532.issue34616@psf.upfronthosting.co.za> Message-ID: <1558553931.49.0.66400778214.issue34616@roundup.psfhosted.org> miss-islington added the comment: New changeset 2ddbd21aec7f0e2f237a1073d3e0b313e673413f by Miss Islington (bot) (Matthias Bussonnier) in branch 'master': bpo-34616: Document top level async in whatsnew/3.8. (GH-13484) https://github.com/python/cpython/commit/2ddbd21aec7f0e2f237a1073d3e0b313e673413f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 15:47:12 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 22 May 2019 19:47:12 +0000 Subject: [issue31862] Port the standard library to PEP 489 multiphase initialization In-Reply-To: <1508857736.11.0.213398074469.issue31862@psf.upfronthosting.co.za> Message-ID: <1558554432.9.0.717992318931.issue31862@roundup.psfhosted.org> Change by Sergey Fedoseev : ---------- pull_requests: +13420 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 16:09:58 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 22 May 2019 20:09:58 +0000 Subject: [issue37006] Add top level await statement support for doctest In-Reply-To: <1558516850.14.0.4225480118.issue37006@roundup.psfhosted.org> Message-ID: <1558555798.33.0.0352166865355.issue37006@roundup.psfhosted.org> Nathaniel Smith added the comment: As far as things like run/run_until_complete/etc go, I think doctests should have the same semantics as async REPLs, whatever those end up being. Given that we don't actually have mature async REPLs, that the core feature to enable them only landed a few days ago, and the 3.8 freeze is almost here, I think we should defer the doctest discussion for 3.9. Hopefully by then, things will have settled down more in async REPL land, and it'll be more obvious what doctest should do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 16:15:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 20:15:18 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558556118.63.0.85511840765.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0c2b6a3943aa7b022e8eb4bfd9bffcddebf9a587 by Victor Stinner in branch 'master': bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-13474) https://github.com/python/cpython/commit/0c2b6a3943aa7b022e8eb4bfd9bffcddebf9a587 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 16:19:39 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 22 May 2019 20:19:39 +0000 Subject: [issue37006] Add top level await statement support for doctest In-Reply-To: <1558516850.14.0.4225480118.issue37006@roundup.psfhosted.org> Message-ID: <1558556379.43.0.432972881275.issue37006@roundup.psfhosted.org> Andrew Svetlov added the comment: Agree with Nathaniel. There is no need to rush now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 16:24:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 20:24:17 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558556657.9.0.568333750772.issue35907@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13421 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 16:32:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 20:32:22 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558557142.87.0.913596623378.issue35907@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13422 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 16:40:08 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 22 May 2019 20:40:08 +0000 Subject: [issue37000] _randbelow_with_getrandbits function inefficient with powers of two In-Reply-To: <1558471816.52.0.343821776026.issue37000@roundup.psfhosted.org> Message-ID: <1558557608.13.0.463988311766.issue37000@roundup.psfhosted.org> Raymond Hettinger added the comment: Some quick notes: * In issue 33144, we achieved a significant speed-up for _randbelow_with_getrandbits() by removing a single test. The code for that method is thin and almost any additional logic will slow it down. * The attached PR (now closed) causes a performance regression. Shuffling a thousand element list regressed from 505 usec per loop to 576 usec per loop. * We only promise that the output of random() will be reproducible across versions; however, we should have an aversion to changing the output of the other methods unless it is really necessary (because it may change the result of simulations or random selections which will cause some consternation for some end-users). For seed(8675309), the result of "[randrange(1024) for i in range(10)]" changes under the PR from [823, 438, 575, 465, 718, 186, 25, 1015, 654, 988] to [411, 219, 522, 961, 679, 516, 881, 919, 287, 882]. This is allowed but not desireable. When I get a chance, I'll take a closer look at Mark's suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 16:43:42 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 22 May 2019 20:43:42 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1558557822.98.0.34443438176.issue36878@roundup.psfhosted.org> miss-islington added the comment: New changeset d8a82e2897b735e2b7e9e086f1d709365a2ad72c by Miss Islington (bot) (Michael J. Sullivan) in branch 'master': bpo-36878: Only allow text after `# type: ignore` if first character ASCII (GH-13504) https://github.com/python/cpython/commit/d8a82e2897b735e2b7e9e086f1d709365a2ad72c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:00:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 21:00:45 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558558845.9.0.165847118345.issue36829@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13423 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:08:33 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 22 May 2019 21:08:33 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1558559313.77.0.247825919324.issue36878@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:14:22 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Wed, 22 May 2019 21:14:22 +0000 Subject: [issue37006] Add top level await statement support for doctest In-Reply-To: <1558516850.14.0.4225480118.issue37006@roundup.psfhosted.org> Message-ID: <1558559662.93.0.0541597284735.issue37006@roundup.psfhosted.org> Matthias Bussonnier added the comment: As a reference, PR from Yuri for an asyncREPL `python -m asyncio` which I believe he want in 3.8: https://github.com/python/cpython/pull/13472 I'm also likely to align IPython behavior on whatever core python decides. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:28:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 21:28:06 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558560486.28.0.19630809001.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 942c31dffbe886ff02e25a319cc3891220b8c641 by Victor Stinner in branch '2.7': bpo-35907: Complete test_urllib.test_local_file_open() (GH-13506) https://github.com/python/cpython/commit/942c31dffbe886ff02e25a319cc3891220b8c641 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:28:13 2019 From: report at bugs.python.org (Michael J. Sullivan) Date: Wed, 22 May 2019 21:28:13 +0000 Subject: [issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore In-Reply-To: <1557520816.53.0.629625329103.issue36878@roundup.psfhosted.org> Message-ID: <1558560493.44.0.900554121759.issue36878@roundup.psfhosted.org> Michael J. Sullivan added the comment: I think this is done! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:28:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 21:28:30 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558560510.87.0.360183626761.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 34bab215596671d0dec2066ae7d7450cd73f638b by Victor Stinner in branch '3.7': bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-13474) (GH-13505) https://github.com/python/cpython/commit/34bab215596671d0dec2066ae7d7450cd73f638b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:29:05 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 22 May 2019 21:29:05 +0000 Subject: [issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs In-Reply-To: <1521562363.32.0.467229070634.issue33110@psf.upfronthosting.co.za> Message-ID: <1558560545.41.0.232213455693.issue33110@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 2a3a2ece502c05ea33c95dd0db497189e0354bfd by Antoine Pitrou (Sam Martin) in branch 'master': bpo-33110: Catch errors raised when running add_done_callback on already completed futures (GH-13141) https://github.com/python/cpython/commit/2a3a2ece502c05ea33c95dd0db497189e0354bfd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:29:23 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 22 May 2019 21:29:23 +0000 Subject: [issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs In-Reply-To: <1521562363.32.0.467229070634.issue33110@psf.upfronthosting.co.za> Message-ID: <1558560563.35.0.0894750392845.issue33110@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13424 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:29:35 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 22 May 2019 21:29:35 +0000 Subject: [issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs In-Reply-To: <1521562363.32.0.467229070634.issue33110@psf.upfronthosting.co.za> Message-ID: <1558560575.26.0.522264373282.issue33110@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:30:00 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 22 May 2019 21:30:00 +0000 Subject: [issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers In-Reply-To: <1439823540.4.0.657998470812.issue24882@psf.upfronthosting.co.za> Message-ID: <1558560600.8.0.0687696900576.issue24882@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 904e34d4e6b6007986dcc585d5c553ee8ae06f95 by Antoine Pitrou (Sean) in branch 'master': bpo-24882: Let ThreadPoolExecutor reuse idle threads before creating new thread (#6375) https://github.com/python/cpython/commit/904e34d4e6b6007986dcc585d5c553ee8ae06f95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:30:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 21:30:39 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558560639.28.0.348118408816.issue35907@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13426 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:32:17 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 22 May 2019 21:32:17 +0000 Subject: [issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs In-Reply-To: <1521562363.32.0.467229070634.issue33110@psf.upfronthosting.co.za> Message-ID: <1558560737.14.0.122772208919.issue33110@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:34:37 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 22 May 2019 21:34:37 +0000 Subject: [issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers In-Reply-To: <1439823540.4.0.657998470812.issue24882@psf.upfronthosting.co.za> Message-ID: <1558560877.22.0.303839934157.issue24882@roundup.psfhosted.org> Antoine Pitrou added the comment: Thank you for your contribution iunknwn! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:44:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 21:44:05 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558561445.14.0.902269370996.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e4d300e07c33a9a77549c62d8687d8fe130c53d5 by Victor Stinner in branch 'master': bpo-36829: Add test.support.catch_unraisable_exception() (GH-13490) https://github.com/python/cpython/commit/e4d300e07c33a9a77549c62d8687d8fe130c53d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:45:30 2019 From: report at bugs.python.org (Soumya Mohanty) Date: Wed, 22 May 2019 21:45:30 +0000 Subject: [issue37016] Python embedded in C++ cannot open a file Message-ID: <1558561530.97.0.560332207187.issue37016@roundup.psfhosted.org> New submission from Soumya Mohanty : Hello, I am trying to open a pickled file and load it in my python file. This python file will be called from a c++ program. Please find the C++ program attached. Py_Initialize and Py_Finalize are being done in a separate file called pyhelper.hpp Python code : def test(): print("In function test of pyemb.py file \n") import pickle with open('filepath', 'rb') as f_in: C = pickle.load(f_in) I am getting the following error and cant find any way to fix it: Exception ignored in: Traceback (most recent call last): File "C:\Anaconda3\envs\Deep_Learning\lib\threading.py", line 1289, in _shutdown assert tlock.locked() SystemError: returned a result with an error set ---------- files: PYTHON_PROJ.cpp messages: 343246 nosy: mohantys priority: normal severity: normal status: open title: Python embedded in C++ cannot open a file versions: Python 3.6 Added file: https://bugs.python.org/file48350/PYTHON_PROJ.cpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:45:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 21:45:57 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558561557.16.0.219529956893.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: In PR 13490, Thomas Grainger proposed a cool context manager: @contextlib.contextmanager def throw_unraisable_exceptions(): unraisable = None old_hook = sys.unraisablehook def hook(exc): nonlocal unraisable unraisable = exc sys.unraisablehook = hook try: yield if unraisable is not None: raise unraisable finally: unraisable = None sys.unraisablehook = old_hook It allows to raise an unraisable exception :-D Example: try: with support.throw_unraisable_exceptions(): ... except Exception as e: ... # the exception is now here I don't need such context manager right now, but I like the fact that it becomes possible to write such context manager :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 17:59:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 21:59:02 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558562342.71.0.782724484361.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 022be02dcfdfd9011415804bb4553a33fa7ec8f3 by Victor Stinner in branch 'master': bpo-36763: Add _PyPreConfig._config_init (GH-13481) https://github.com/python/cpython/commit/022be02dcfdfd9011415804bb4553a33fa7ec8f3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 18:02:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 22:02:17 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558562537.48.0.465416021091.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13427 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 18:02:27 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 22 May 2019 22:02:27 +0000 Subject: [issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs In-Reply-To: <1521562363.32.0.467229070634.issue33110@psf.upfronthosting.co.za> Message-ID: <1558562547.56.0.182782615326.issue33110@roundup.psfhosted.org> miss-islington added the comment: New changeset b73c21c0be7b42de6a88d67408249c8ec46e28f7 by Miss Islington (bot) in branch '3.7': bpo-33110: Catch errors raised when running add_done_callback on already completed futures (GH-13141) https://github.com/python/cpython/commit/b73c21c0be7b42de6a88d67408249c8ec46e28f7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 18:12:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 22:12:53 +0000 Subject: [issue36918] ValueError warning in test_urllib due to io.IOBase destructor In-Reply-To: <1557856507.99.0.0146189740679.issue36918@roundup.psfhosted.org> Message-ID: <1558563173.34.0.552502019315.issue36918@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13428 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 18:13:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 22:13:35 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1558563215.84.0.897089132194.issue18748@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13429 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 18:15:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 22:15:29 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558563329.44.0.870265877062.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 13512 to use support.catch_unraisable_exception() in test_io.test_error_through_destructor(). But this PR is associated to bpo-18748 since the main change is related to the io module, not sys.unraisablehook ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 18:16:24 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 22 May 2019 22:16:24 +0000 Subject: [issue36941] Windows build changes for Windows ARM64 In-Reply-To: <1558042492.97.0.749926608424.issue36941@roundup.psfhosted.org> Message-ID: <1558563384.07.0.808437382552.issue36941@roundup.psfhosted.org> Steve Dower added the comment: New changeset cfb241bd29a94fd825a317a78322e3cdba0e75a7 by Steve Dower (Paul Monson) in branch 'master': bpo-36941: Project file fixups for Windows ARM64 (GH-13477) https://github.com/python/cpython/commit/cfb241bd29a94fd825a317a78322e3cdba0e75a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 18:19:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 22:19:41 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558563581.57.0.350500415452.issue35907@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13430 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 18:55:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 22:55:57 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558565757.95.0.222681234571.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-36829: I just added sys.unraisablehook(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 18:56:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 22:56:31 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558565791.2.0.909153872031.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-1230540: "sys.excepthook doesn't work in threads". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 18:58:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 22:58:00 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558565880.84.0.222297776701.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5edcf263581c70f6a6c2206db679e51e9418bb38 by Victor Stinner in branch 'master': bpo-36763: Rename private Python initialization functions (GH-13511) https://github.com/python/cpython/commit/5edcf263581c70f6a6c2206db679e51e9418bb38 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 19:01:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 May 2019 23:01:01 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558566061.69.0.353398039302.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: New changeset df22c03b93ea4620fdf4a0b3cbbbfa7c645af783 by Victor Stinner in branch 'master': bpo-36829: PyErr_WriteUnraisable() normalizes exception (GH-13507) https://github.com/python/cpython/commit/df22c03b93ea4620fdf4a0b3cbbbfa7c645af783 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:01:12 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 23 May 2019 00:01:12 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1558569672.67.0.706824523899.issue35091@roundup.psfhosted.org> miss-islington added the comment: New changeset 6bc5917903b722bdd0e5d3020949f26fec5dfe9a by Miss Islington (bot) (Alexey Izbyshev) in branch 'master': bpo-35091: Objects/listobject.c: Replace overflow checks in gallop fu? (GH-10202) https://github.com/python/cpython/commit/6bc5917903b722bdd0e5d3020949f26fec5dfe9a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:01:20 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 23 May 2019 00:01:20 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1558569680.1.0.368892060793.issue35091@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13431 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:02:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 00:02:02 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558569722.04.0.0304462179496.issue1230540@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13432 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:18:59 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 23 May 2019 00:18:59 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1558570739.74.0.180849301387.issue35091@roundup.psfhosted.org> miss-islington added the comment: New changeset 367fe5757a707c4e3602dee807a9315199ed0b5c by Miss Islington (bot) in branch '3.7': bpo-35091: Objects/listobject.c: Replace overflow checks in gallop fu? (GH-10202) https://github.com/python/cpython/commit/367fe5757a707c4e3602dee807a9315199ed0b5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:28:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 00:28:16 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558571296.25.0.630742476366.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 13515 which adds threading.excepthook(). I chose to call threading.excepthook() even when run() raises SystemExit. In this case, threading.excepthook() simply does nothing. The idea is to really give the full control when threading.excepthook() is overriden. For example, log a warning when run() raises SystemExit. By the way, is it really a good idea to call sys.exit() from a thread? It sounds like a bug that should be reported, and not silently ignored, no? Differences between sys.excepthook() and threading.excepthook(): * API: sys.excepthook(exctype, value, traceback, /) vs threading.excepthook(exc_type, exc_value, exc_tb, thread, /) -- addition thread parameter to display the name of the thread which raises an exception * For SystemExit corner case, sys.excepthook() displays the exception, whereas threading.excepthook() silently ignores it * When sys.stderr is None, sys.excepthook() does nothing, whereas threading.excepthook() tries harder: use its own copy of sys.stderr (saved when the thread has been created) from thread._stderr. Thread._stderr was added by bpo-754449: commit cc4e935ea593cede10cb1316e3faeabd708abca7 Author: Brett Cannon Date: Sat Jul 3 03:52:35 2004 +0000 threading.Thread objects will now print a traceback for an exception raised during interpreter shutdown instead of masking it with another traceback about accessing a NoneType when trying to print the exception out in the first place. Closes bug #754449 (using patch #954922). Note: When sys.stderr is None, threading.excepthook() avoids the traceback module and renders the exception itself. Maybe threading.excepthook() should be reimplemented in C to make it even more reliable and more correct, especially during Python shutdown. Only daemon threads are impacted: Python finalization (Py_Finalize() C function) starts by calling threading._shutdown() which joins all non-daemon threads. IMHO the threading.Thread semantics is too different than sys.excepthook() to reuse sys.excepthook() to handle threading.Thread.run() exception. Another explanation is that sadly sys.excepthook() API uses exactly 3 positional-only arguments, and so the API cannot be easily extended to get a thread argument. When I designed sys.unraisablehook(), I chose to pass only one argument which has attributes, to prevent this issue. I'm not comfortable to attempt to modify sys.excepthook() to make it behave differently if it's called from the main thread or from a different thread. It would have to call threading.current_thread().name to get the name of the current thread. Let's say that in Python 3.8 threading.Thread now calls sys.execpthook() to handle uncaught run() exception. All applications which override sys.excepthook() on purpose will behave differently: start to log exceptions from threads. But existing code is unlikely to be prepared to implement black magic to check if we are a "thread" or the main thread, to decide if we should display a thread name, and also the "black magic" to get the current thread name. One of my concern of reusing sys.excepthook to display threading exceptions is that adding more code to handle threads is a risk of raising a new exception while logging a threading exception :-( IMHO threading.excepthook() is safer since it already has access to the thread. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:28:57 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 23 May 2019 00:28:57 +0000 Subject: [issue35091] Objects/listobject.c: gallop functions rely on signed integer overflow In-Reply-To: <1540734023.23.0.788709270274.issue35091@psf.upfronthosting.co.za> Message-ID: <1558571337.31.0.995556166291.issue35091@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:32:24 2019 From: report at bugs.python.org (Michael J. Sullivan) Date: Thu, 23 May 2019 00:32:24 +0000 Subject: [issue37017] Use LOAD_METHOD optimization in CallMethod C API functions Message-ID: <1558571544.48.0.863461247465.issue37017@roundup.psfhosted.org> New submission from Michael J. Sullivan : The different varieties of PyObject_CallMethod* routines all operate by doing a PyObject_GetAttr to fetch an object to call. It seems likely to be worthwhile to take advantage of the LOAD_METHOD optimization that avoids creating a bound method object when calling a method. ---------- components: Extension Modules messages: 343259 nosy: msullivan priority: normal severity: normal status: open title: Use LOAD_METHOD optimization in CallMethod C API functions versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:36:03 2019 From: report at bugs.python.org (Michael J. Sullivan) Date: Thu, 23 May 2019 00:36:03 +0000 Subject: [issue37017] Use LOAD_METHOD optimization in CallMethod C API functions In-Reply-To: <1558571544.48.0.863461247465.issue37017@roundup.psfhosted.org> Message-ID: <1558571763.38.0.734176558817.issue37017@roundup.psfhosted.org> Change by Michael J. Sullivan : ---------- keywords: +patch pull_requests: +13433 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:37:21 2019 From: report at bugs.python.org (Michael J. Sullivan) Date: Thu, 23 May 2019 00:37:21 +0000 Subject: [issue37017] Use LOAD_METHOD optimization in CallMethod C API functions In-Reply-To: <1558571544.48.0.863461247465.issue37017@roundup.psfhosted.org> Message-ID: <1558571841.23.0.231902583725.issue37017@roundup.psfhosted.org> Change by Michael J. Sullivan : ---------- nosy: +brett.cannon, serhiy.storchaka, vstinner, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:43:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 00:43:09 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558572189.79.0.412184260432.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: I dislike PR 8610: threading.Thread doesn't call sys.excepthook to handle run() exception by default, it only calls sys.excepthook if it's overridden. Moreover, when sys.excepthook is called, the hook doesn't get access to the thread object :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 20:45:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 00:45:56 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558572356.46.0.13479497477.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: About threading.excepthook() API, maybe we should not reproduce sys.excepthook() API but instead reuse something closer to sys.unraisablehook() API: use a single parameter which has attributes. It would allow to pass more parameters as new attributes in the future, maybe some new "optional" parameters (None by default). For example, we can imagine calling threading.excepthook() to handle threading.excepthook() failure. We would need an argument to prevent an infine loop :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:13:30 2019 From: report at bugs.python.org (R. David Murray) Date: Thu, 23 May 2019 01:13:30 +0000 Subject: [issue27737] email.header.Header.encode() crashes with IndexError on spaces only value In-Reply-To: <1470923464.88.0.417077764128.issue27737@psf.upfronthosting.co.za> Message-ID: <1558574010.08.0.975817298061.issue27737@roundup.psfhosted.org> R. David Murray added the comment: New changeset ef5bb25e2d6147cd44be9c9b166525fb30485be0 by R. David Murray (Batuhan Ta?kaya) in branch 'master': bpo-27737: Allow whitespace only headers encoding (#13478) https://github.com/python/cpython/commit/ef5bb25e2d6147cd44be9c9b166525fb30485be0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:13:46 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 23 May 2019 01:13:46 +0000 Subject: [issue27737] email.header.Header.encode() crashes with IndexError on spaces only value In-Reply-To: <1470923464.88.0.417077764128.issue27737@psf.upfronthosting.co.za> Message-ID: <1558574026.05.0.709980214425.issue27737@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13434 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:15:09 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 23 May 2019 01:15:09 +0000 Subject: [issue37000] _randbelow_with_getrandbits function inefficient with powers of two In-Reply-To: <1558471816.52.0.343821776026.issue37000@roundup.psfhosted.org> Message-ID: <1558574109.22.0.63477907368.issue37000@roundup.psfhosted.org> Tim Peters added the comment: I believe the thrust of Mark's suggestion was that it would allow using `k = (n-1).bit_length()` even when n == 1, without special-casing n == 1. But you'd still be adding a new "subtract 1" operation, and would still change results in some cases. That said, given that `(0).bit_length() == 0`, it's a bit surprising all on its own that `getrandbits(0)` raises an exception. In any case, I'd leave _randbelow_with_getrandbits alone. Conauming "extra" bits is generally a red herring, since the underlying `getrandbits()` consumes 32 bits at a time from the Twister. That is, we're _typically_ "wasting" more than a dozen bits regardless already (e.g., getrandbits(2), getrandbits(17), and getrandbits(29) all consume 32 bits). It's unfortunate that _randbelow_with_getrandbits(power_of_2) may invoke getrandbits() more than once. But there's also a bright side: because there's always the possibility that _randbelow_with_getrandbits() may invoke getrandbits() more than once, we can't guess how many times getrandbits() _was_ called. So, in turn, we can't know how much of the Twister's state space was consumed. Which, in turn, makes it much harder to deduce the Twister's' internal state from the visible outputs (but this can be done with certainty from a long enough string of, say, random.choice([0, 1]) outputs if we knew getrandbits was called exactly once for each, despite that we're only seeing 1 bit of each 32-bit Twister output). That last point shouldn't drive anything, but it is kinda pleasant that people inappropriately using the Twister in contexts where keeping secrets is important are partially protected by under-the-covers accept/reject methods. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:17:21 2019 From: report at bugs.python.org (R. David Murray) Date: Thu, 23 May 2019 01:17:21 +0000 Subject: [issue27737] email.header.Header.encode() crashes with IndexError on spaces only value In-Reply-To: <1470923464.88.0.417077764128.issue27737@psf.upfronthosting.co.za> Message-ID: <1558574241.61.0.740884861877.issue27737@roundup.psfhosted.org> R. David Murray added the comment: Thanks. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:25:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 01:25:10 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558574710.69.0.39556075164.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13435 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:30:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 01:30:29 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558575029.08.0.123789317233.issue36721@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0a8e57248b913851640c64375600f05157c997df by Victor Stinner in branch 'master': bpo-36721: Add --embed option to python-config (GH-13500) https://github.com/python/cpython/commit/0a8e57248b913851640c64375600f05157c997df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:33:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 01:33:50 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558575230.77.0.579926774971.issue36721@roundup.psfhosted.org> STINNER Victor added the comment: Even if I'm not confident in my change (add --embed option), I chose to merge it anyway since at least "waf" build system is broken by my other changes (no longer link C extensions to libpython). I would like to get this change into Python 3.8 beta1 to attempt to fix most applications embedding Python. Anyway, if something goes wrong, we still have plenty of time to decide what to do before 3.8.0 final, scheduled for 2019-10-21: https://www.python.org/dev/peps/pep-0569/ -- Since I merged my change, I reset the priority from Release Blocker to normal. ---------- priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:34:59 2019 From: report at bugs.python.org (R. David Murray) Date: Thu, 23 May 2019 01:34:59 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1558575299.11.0.0921654701489.issue36520@roundup.psfhosted.org> R. David Murray added the comment: Can you demonstrate the problem with an actual email object? header_store_parse is not meant to be called directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:39:57 2019 From: report at bugs.python.org (R. David Murray) Date: Thu, 23 May 2019 01:39:57 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1558575597.87.0.653236359562.issue36520@roundup.psfhosted.org> R. David Murray added the comment: Nevermind, I was testing with the wrong version of python. This bug was introduced somewhere after 3.4 :( >>> from email.message import EmailMessage >>> m = EmailMessage() >>> m['Subject'] = 'Hello W?rld! Hello W?rld! Hello W?rld! Hello W?rld!Hello W?rld!' >>> bytes(m) b'Subject: Hello =?utf-8?q?W=C3=B6rld!_Hello_W=C3=B6rld!_Hello_W=C3=B6rld!?=\n Hello =?utf-8?=?utf-8?q?q=3FW=3DC3=3DB6rld!Hello=3F=3D_W=C3=B6rld!?=\n\n' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:41:47 2019 From: report at bugs.python.org (R. David Murray) Date: Thu, 23 May 2019 01:41:47 +0000 Subject: [issue27737] email.header.Header.encode() crashes with IndexError on spaces only value In-Reply-To: <1470923464.88.0.417077764128.issue27737@psf.upfronthosting.co.za> Message-ID: <1558575707.67.0.540470005118.issue27737@roundup.psfhosted.org> R. David Murray added the comment: New changeset 0416d6f05a96e0f1b3751aa97abfffe6d3323976 by R. David Murray (Miss Islington (bot)) in branch '3.7': bpo-27737: Allow whitespace only headers encoding (GH-13478) (#13517) https://github.com/python/cpython/commit/0416d6f05a96e0f1b3751aa97abfffe6d3323976 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 21:45:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 01:45:11 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1558575911.99.0.139939348571.issue18748@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bc2aa816620c5e02ad8e94d8514b7e8f3f551ca1 by Victor Stinner in branch 'master': bpo-18748: _pyio.IOBase emits unraisable exception (GH-13512) https://github.com/python/cpython/commit/bc2aa816620c5e02ad8e94d8514b7e8f3f551ca1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 22:07:41 2019 From: report at bugs.python.org (Abhilash Raj) Date: Thu, 23 May 2019 02:07:41 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1558577261.55.0.422604355931.issue21315@roundup.psfhosted.org> Abhilash Raj added the comment: I have made the requested changes on PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 22:08:30 2019 From: report at bugs.python.org (Abhilash Raj) Date: Thu, 23 May 2019 02:08:30 +0000 Subject: [issue35805] email package folds msg-id identifiers using RFC2047 encoded words where it must not In-Reply-To: <1548161762.46.0.975813554813.issue35805@roundup.psfhosted.org> Message-ID: <1558577310.66.0.942893917625.issue35805@roundup.psfhosted.org> Abhilash Raj added the comment: I have made the requested changes on PR. David, can you please review again? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 22 22:12:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 02:12:30 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558577550.19.0.578121795642.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 20e1e2582e5e69e43af88ff58699c8883d146acb by Victor Stinner in branch 'master': bpo-36763: Fix _PyPreConfig_InitCompatConfig() utf8_mode (GH-13518) https://github.com/python/cpython/commit/20e1e2582e5e69e43af88ff58699c8883d146acb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 00:32:50 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 23 May 2019 04:32:50 +0000 Subject: [issue33164] Blake 2 module update Message-ID: <1558585970.68.0.308420136648.issue33164@roundup.psfhosted.org> New submission from Inada Naoki : New changeset 51aa35e9e17eef60d04add9619fe2a7eb938358c by Inada Naoki (David Carlier) in branch 'master': bpo-33164: update blake2 implementation (GH-6286) https://github.com/python/cpython/commit/51aa35e9e17eef60d04add9619fe2a7eb938358c ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 00:33:42 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 23 May 2019 04:33:42 +0000 Subject: [issue33164] Blake 2 module update In-Reply-To: <1558585970.68.0.308420136648.issue33164@roundup.psfhosted.org> Message-ID: <1558586022.36.0.160356002309.issue33164@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: -7043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 00:33:52 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 23 May 2019 04:33:52 +0000 Subject: [issue33164] Blake 2 module update In-Reply-To: <1558585970.68.0.308420136648.issue33164@roundup.psfhosted.org> Message-ID: <1558586032.8.0.459547392472.issue33164@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 01:22:46 2019 From: report at bugs.python.org (Glenn Linderman) Date: Thu, 23 May 2019 05:22:46 +0000 Subject: [issue37018] put http.server on a diet Message-ID: <1558588966.15.0.498187197609.issue37018@roundup.psfhosted.org> New submission from Glenn Linderman : The idea inspired by the email exchange below is basically in three parts: 1. investigate the various popular web server frameworks, to determine what parts of http.server they depend on. For example, bottle.py depends only on BaseHTTPRequestHandler and HTTPServer, which is less than half the code in http.server. Because of the deficiencies in the remaining parts, it seems unlikely that other frameworks use much more. 2. Trim http.server to those useful parts, removing the the rest from stdlib. Many of the "enhanced features" of http.server are such minimal enhancements that they are feature-poor and out-of-date with respect to current web server standards. The novice user is likely to be enticed into a swamp of missing capability when attempting to use them, as I was. It would take significant work to implement true CGI together with SSL on forking OSes; it took me significant work to implement true CGI together with SSL on Windows (non-forking). I gave up trying to do it on Linux, and switched to bottle. 3. Enhance what is left of http.server to support SSL and threading, so that the web frameworks that use http.server as a test server can at least offer those capabilities as well. It isn't too hard to add those things for bottle.py, but it would be nicer if users didn't have to google for the blog posts that show how, and reimplement it (most of the blog posts are somewhat dated). On 5/22/2019 4:09 AM, Christian Heimes wrote: > On 22/05/2019 01.11, Glenn Linderman wrote: >> On 5/21/2019 2:00 PM, Nathaniel Smith wrote: >>> On Tue, May 21, 2019 at 10:43 AM Glenn Linderman wrote: >>>> After maintaining my own version of http.server to fix or workaround some of its deficiencies for some years, I discovered bottle.py. It has far more capability, is far better documented, and is just as quick to deploy. While I haven't yet converted all past projects to use bottle.py, it will likely happen in time, unless something even simpler to use is discovered, although I can hardly imagine that happening. >>> bottle.py uses http.server for its local development mode (the one you >>> see in their quickstart example at the top of their README). Same with >>> flask, django, and probably a bunch of other frameworks. It's *very* >>> widely used. >>> >>> -n >>> >> The source for bottle.py version 0.13-dev has an import for http.client, but not http.server. I hadn't tracked down every indirect dependency in the bottle.py source code, but it seems that if one uses the "default server" for bottle, that it is "wsgiref", imported from wsgiref.simple_server, and that in turn does import BaseHTTPRequestHandler and HTTPServer from http.server. >> >> It is the higher-level code in http.server that has significant deficiencies that have caused me problems over the years... a "SimpleHTTPRequestHandler" that is so simple it doesn't do POST, PUT or PASTE, a "CGIHTTPRequestHandler" that only implements part of the CGI protocol, only CGI support in POST, no support for PUT or PASTE, and no support for https, and not much bug fix activity in those areas. >> >> Maybe http.server should be split into the "basic parts" (used by bottle.py, and other frameworks), and the "higher-level parts", which could then be discarded by this PEP! At this point, though, I'd have to agree that the whole should not be discarded. Thanks for making me dig deeper. > > The idea has merrit. However I feel its out of scope for the PEP [594]. The http.server module and socketserver module are still widely used for debug and toy examples. > > Could you please open a bug to track your proposal? We may pursue it in a couple of years from now. ---------- messages: 343275 nosy: v+python priority: normal severity: normal status: open title: put http.server on a diet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 01:44:13 2019 From: report at bugs.python.org (Christoph Reiter) Date: Thu, 23 May 2019 05:44:13 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558590253.65.0.608166034289.issue1230540@roundup.psfhosted.org> Christoph Reiter added the comment: > Let's say that in Python 3.8 threading.Thread now calls sys.execpthook() to handle uncaught run() exception. All applications which override sys.excepthook() on purpose will behave differently: start to log exceptions from threads. But existing code is unlikely to be prepared to implement black magic to check if we are a "thread" or the main thread, to decide if we should display a thread name, and also the "black magic" to get the current thread name. Note that PyErr_Print() and PyErr_PrintEx() can be called in threads, and CPython itself uses it in some places which can be called in threads and I also use it in thread callbacks in C extensions I work on (PyGObject and pycairo for example). Nothing states currently that it's not allowed to call it in such cases :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 03:09:02 2019 From: report at bugs.python.org (Shannon) Date: Thu, 23 May 2019 07:09:02 +0000 Subject: [issue37019] using pathlib objects to create symlinks produces broken links Message-ID: <1558595342.46.0.940919584419.issue37019@roundup.psfhosted.org> New submission from Shannon : when using pathlib objects to define src and dst for os.symlink (also relevant for Path(dst).symlink_to(src)), if the src path is not absolute, or relative to the directory the link is being created in, a broken link will be created. example/ src = pathlib.Path('dir1/file') dst = pathlib.Path('dir2/file') os.symlink(src, dst) # or dst.symlink_to(src) this will create a broken link in dir2, attempting to link to dir1/file, relative to dir2. It seems to me, if src given is a pathlib object (relative to cwd), the linking process should be smart enough to point the link the created symlink to the right place. os.symlink(src.absolute(), dst) works, but creates an absolute symlink which may not be desired behaviour. My current workaround is: os.symlink(os.path.relpath(src, dst.parent), dst) which creates a working relative symlink as desired. I would suggest this should be the default behaviour of both os.symlink and pathlib.Path().symlink_to when a non-absolute path object is given as src. Interestingly, src.relative_to(dst.parent) will raise a ValueError while os.path.relpath(src, dst.parent) correctly returns '../dir1/file'. I also think Path().relative_to should be changed to match the behaviour of os.path.relpath here, but perhaps that is a separate issue. ---------- components: Library (Lib) messages: 343277 nosy: skeo priority: normal severity: normal status: open title: using pathlib objects to create symlinks produces broken links type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 03:35:01 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 23 May 2019 07:35:01 +0000 Subject: [issue37019] Create symlinks relative to cwd In-Reply-To: <1558595342.46.0.940919584419.issue37019@roundup.psfhosted.org> Message-ID: <1558596901.94.0.723877153718.issue37019@roundup.psfhosted.org> SilentGhost added the comment: This would be backward incompatible change. I just wanted to point out that the symlink was only broken because the file did not exist, and one might want to legitimately create a link relative to the target's location. I'd imagine creating a link in the same directory is one such example. I think the issue you're raising can be addressed in documentation, by making clear that the relative link will be relative to target. This is already done in the given example for symlink_to, but could be improved using a target in subdirectory and a clarifying note. The relative_to issue does indeed deserve a separate issue (if there isn't one already). ---------- assignee: -> docs at python components: +Documentation nosy: +SilentGhost, docs at python, serhiy.storchaka title: using pathlib objects to create symlinks produces broken links -> Create symlinks relative to cwd versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 03:40:04 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 23 May 2019 07:40:04 +0000 Subject: [issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs In-Reply-To: <1521562363.32.0.467229070634.issue33110@psf.upfronthosting.co.za> Message-ID: <1558597204.59.0.577736240653.issue33110@roundup.psfhosted.org> Antoine Pitrou added the comment: Thank you Sam for your contribution! ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 03:45:35 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 23 May 2019 07:45:35 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558597535.19.0.700587309012.issue1230540@roundup.psfhosted.org> Antoine Pitrou added the comment: > Moreover, when sys.excepthook is called, the hook doesn't get access to the thread object You can get it with threading.current_thread(), no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 03:48:48 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 23 May 2019 07:48:48 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1558597728.2.0.834479434747.issue37007@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- components: +Windows -Library (Lib) nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 03:57:18 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 23 May 2019 07:57:18 +0000 Subject: [issue37016] Python embedded in C++ cannot open a file In-Reply-To: <1558561530.97.0.560332207187.issue37016@roundup.psfhosted.org> Message-ID: <1558598238.94.0.429477633564.issue37016@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi Soumya, But Py_Initialize and Py_Finalize are not called in this case, and it's not a bug of CPython. I suggest you read this link: https://docs.python.org/3/extending/embedding.html#very-high-level-embedding Thank you ---------- nosy: +matrixise resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 04:01:14 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 23 May 2019 08:01:14 +0000 Subject: [issue37014] [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin In-Reply-To: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> Message-ID: <1558598474.71.0.520503103331.issue37014@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi Grant, Thank you for your bug report, Would you interested to propose a Pull Request for a fix? You can read the devguide for more info https://devguide.python.org/ Thank you ---------- nosy: +matrixise title: fileinput module should document that openhook and mode are ignored when reading from stdin -> [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 04:01:26 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 23 May 2019 08:01:26 +0000 Subject: [issue37014] [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin In-Reply-To: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> Message-ID: <1558598486.9.0.883868467903.issue37014@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 06:03:37 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 23 May 2019 10:03:37 +0000 Subject: [issue37008] make unittest.mock.mock_open honor next() In-Reply-To: <1558523947.08.0.447794454948.issue37008@roundup.psfhosted.org> Message-ID: <1558605817.06.0.316506183052.issue37008@roundup.psfhosted.org> miss-islington added the comment: New changeset 394119afc6611f17bac96f5ec6fefa00000ae795 by Miss Islington (bot) (Damien Nad?) in branch 'master': bpo-37008: make mock_open handle able to honor next() (GH-13492) https://github.com/python/cpython/commit/394119afc6611f17bac96f5ec6fefa00000ae795 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 06:04:04 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 23 May 2019 10:04:04 +0000 Subject: [issue37008] make unittest.mock.mock_open honor next() In-Reply-To: <1558523947.08.0.447794454948.issue37008@roundup.psfhosted.org> Message-ID: <1558605844.58.0.813092047534.issue37008@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13436 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 06:21:14 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 23 May 2019 10:21:14 +0000 Subject: [issue37008] make unittest.mock.mock_open honor next() In-Reply-To: <1558523947.08.0.447794454948.issue37008@roundup.psfhosted.org> Message-ID: <1558606874.33.0.381393886102.issue37008@roundup.psfhosted.org> miss-islington added the comment: New changeset 7cc47e9c19b7d67c8f08df15a413d14cf69f45da by Miss Islington (bot) in branch '3.7': bpo-37008: make mock_open handle able to honor next() (GH-13492) https://github.com/python/cpython/commit/7cc47e9c19b7d67c8f08df15a413d14cf69f45da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 06:24:17 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 23 May 2019 10:24:17 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1558607057.96.0.0774104621137.issue37007@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13437 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 06:26:55 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 23 May 2019 10:26:55 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1558607215.21.0.800119646515.issue37007@roundup.psfhosted.org> Zackery Spytz added the comment: I've created a PR for this issue. Few changes are needed to implement these functions on Windows. ---------- nosy: +ZackerySpytz, eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 06:45:35 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 23 May 2019 10:45:35 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558608335.15.0.572650578113.issue36829@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Could test.support.catch_unraisable_exception also be documented at https://docs.python.org/3/library/test.html#module-test.support ? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 06:51:58 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 23 May 2019 10:51:58 +0000 Subject: [issue37008] make unittest.mock.mock_open honor next() In-Reply-To: <1558523947.08.0.447794454948.issue37008@roundup.psfhosted.org> Message-ID: <1558608718.2.0.380644882154.issue37008@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 06:52:12 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 23 May 2019 10:52:12 +0000 Subject: [issue37008] make unittest.mock.mock_open honor next() In-Reply-To: <1558523947.08.0.447794454948.issue37008@roundup.psfhosted.org> Message-ID: <1558608732.05.0.638208372126.issue37008@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 07:39:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 11:39:29 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558611569.75.0.976617450755.issue35907@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 07:55:29 2019 From: report at bugs.python.org (Antony) Date: Thu, 23 May 2019 11:55:29 +0000 Subject: [issue37020] Invalid floating point multiplication result Message-ID: <1558612529.93.0.512106362254.issue37020@roundup.psfhosted.org> New submission from Antony : Incorrect Multiplication result of number 40.95 >>> 40.94 * 100 4094.0 >>> 40.96 * 100 4096.0 but: >>> 40.95 * 100 4095.0000000000005 checked with: Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) and Python 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] on linux ---------- messages: 343287 nosy: Tonimore priority: normal severity: normal status: open title: Invalid floating point multiplication result type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 07:59:40 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 23 May 2019 11:59:40 +0000 Subject: [issue37020] Invalid floating point multiplication result In-Reply-To: <1558612529.93.0.512106362254.issue37020@roundup.psfhosted.org> Message-ID: <1558612780.95.0.875073488072.issue37020@roundup.psfhosted.org> SilentGhost added the comment: This is a limitation of floating points representation. If you need objects representing decimal numeral, you could use decimal module. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 08:01:28 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 23 May 2019 12:01:28 +0000 Subject: [issue37020] Invalid floating point multiplication result In-Reply-To: <1558612529.93.0.512106362254.issue37020@roundup.psfhosted.org> Message-ID: <1558612888.57.0.000353671412732.issue37020@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Relevant doc : https://docs.python.org/3/tutorial/floatingpoint.html ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 08:16:31 2019 From: report at bugs.python.org (Dan Snider) Date: Thu, 23 May 2019 12:16:31 +0000 Subject: [issue35331] Incorrect __module__ attribute for _struct.Struct and perhaps a few others In-Reply-To: <1543342945.38.0.788709270274.issue35331@psf.upfronthosting.co.za> Message-ID: <1558613791.55.0.146104689457.issue35331@roundup.psfhosted.org> Change by Dan Snider : ---------- nosy: -bup _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 08:16:40 2019 From: report at bugs.python.org (Dan Snider) Date: Thu, 23 May 2019 12:16:40 +0000 Subject: [issue35331] Incorrect __module__ attribute for _struct.Struct and perhaps a few others In-Reply-To: <1543342945.38.0.788709270274.issue35331@psf.upfronthosting.co.za> Message-ID: <1558613800.76.0.435058088012.issue35331@roundup.psfhosted.org> Change by Dan Snider : ---------- nosy: +bup _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 08:16:56 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 23 May 2019 12:16:56 +0000 Subject: [issue37017] Use LOAD_METHOD optimization in CallMethod C API functions In-Reply-To: <1558571544.48.0.863461247465.issue37017@roundup.psfhosted.org> Message-ID: <1558613816.96.0.682451258854.issue37017@roundup.psfhosted.org> Inada Naoki added the comment: I want to wait this until PEP 590 is implemented. Unlike CALL_METHOD, we can not avoid prepending self. New method signature may be like this: PyObject_VectorCallMethod(PyObject *name, PyObject **args, Py_ssize_t nargs, PyObject *kwds); And args[0] is self. With API like this, we can avoid prepending self. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 08:30:44 2019 From: report at bugs.python.org (Michele Angrisano) Date: Thu, 23 May 2019 12:30:44 +0000 Subject: [issue36713] duplicate method definition in Lib/ctypes/test/test_unicode.py In-Reply-To: <1556119147.21.0.373187833971.issue36713@roundup.psfhosted.org> Message-ID: <1558614644.23.0.539226449267.issue36713@roundup.psfhosted.org> Michele Angrisano added the comment: That method was already removed in cf44883. ---------- nosy: +mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 08:42:28 2019 From: report at bugs.python.org (Michele Angrisano) Date: Thu, 23 May 2019 12:42:28 +0000 Subject: [issue36713] duplicate method definition in Lib/ctypes/test/test_unicode.py In-Reply-To: <1556119147.21.0.373187833971.issue36713@roundup.psfhosted.org> Message-ID: <1558615348.24.0.880062437889.issue36713@roundup.psfhosted.org> Michele Angrisano added the comment: The proper link is this: cf448832ebca7ed34809168660fa96c3c61f8abb. Sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 08:46:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 12:46:26 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558615586.11.0.259149014417.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: There is a special case. If a thread calls os.fork() and Thread.run() raises an exception, the thread name is still logged even if there is only 1 thread after fork. Try attached fork_thread.py. Output on Python 3.7: --- main thread: spawn fork thread thread: before fork [<_MainThread(MainThread, started 140623217481536)>, ] thread: after fork [] thread: after fork: raise Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "fork_thread.py", line 17, in run raise Exception("what happens here?") Exception: what happens here? main thread: done --- Moreover, threading.Thread silently ignores SystemExit in run() even if it's the only remaining thread (main thread is gone after fork). I don't think that we *have to* change the current behavior. It's just that we have to take it in account if we modify how exceptions are handled. ---------- Added file: https://bugs.python.org/file48351/fork_thread.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 09:02:25 2019 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 23 May 2019 13:02:25 +0000 Subject: [issue36713] duplicate method definition in Lib/ctypes/test/test_unicode.py In-Reply-To: <1556119147.21.0.373187833971.issue36713@roundup.psfhosted.org> Message-ID: <1558616545.59.0.596145264144.issue36713@roundup.psfhosted.org> Ezio Melotti added the comment: The duplicate method is gone from 3.5+, but it is still present on 2.7: 2.7/Lib/ctypes/test/test_unicode.py:96 2.7/Lib/ctypes/test/test_unicode.py:110 The one at line 96 should be renamed "test_ascii_strict". Michele, do you want to work on a PR to fix it? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 09:13:24 2019 From: report at bugs.python.org (Michele Angrisano) Date: Thu, 23 May 2019 13:13:24 +0000 Subject: [issue36713] duplicate method definition in Lib/ctypes/test/test_unicode.py In-Reply-To: <1556119147.21.0.373187833971.issue36713@roundup.psfhosted.org> Message-ID: <1558617204.63.0.321280668748.issue36713@roundup.psfhosted.org> Michele Angrisano added the comment: I'm on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 09:47:17 2019 From: report at bugs.python.org (Soumya Mohanty) Date: Thu, 23 May 2019 13:47:17 +0000 Subject: [issue37016] Python embedded in C++ cannot open a file In-Reply-To: <1558561530.97.0.560332207187.issue37016@roundup.psfhosted.org> Message-ID: <1558619237.38.0.131573313184.issue37016@roundup.psfhosted.org> Soumya Mohanty added the comment: Hello St?phane, I appreciate the reply, but read the docs and they did not resolve my problem. I solved it by adding full paths to the file instead of just there names, even though the file being loaded was in the present working directory and when working in pure python it works. I would like to know what exactly is causing this issue, but we can close the issue (As it is not a bug) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 10:06:54 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 23 May 2019 14:06:54 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1558620414.08.0.430796687874.issue36797@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13439 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 10:07:01 2019 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 23 May 2019 14:07:01 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1558620421.23.0.663017652512.issue36797@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset e788057a9188ff37e232729815dfda2529079420 by Nick Coghlan in branch 'master': bpo-36797: Reduce levels of indirection in outdated distutils docs (#13462) https://github.com/python/cpython/commit/e788057a9188ff37e232729815dfda2529079420 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 10:19:45 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 23 May 2019 14:19:45 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1558621185.71.0.875023877405.issue36797@roundup.psfhosted.org> miss-islington added the comment: New changeset a3488e5902f5c26e5cc289aec2518e7b5058e5d1 by Miss Islington (bot) in branch '3.7': bpo-36797: Reduce levels of indirection in outdated distutils docs (GH-13462) https://github.com/python/cpython/commit/a3488e5902f5c26e5cc289aec2518e7b5058e5d1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 10:23:22 2019 From: report at bugs.python.org (Michele Angrisano) Date: Thu, 23 May 2019 14:23:22 +0000 Subject: [issue36713] duplicate method definition in Lib/ctypes/test/test_unicode.py In-Reply-To: <1556119147.21.0.373187833971.issue36713@roundup.psfhosted.org> Message-ID: <1558621402.8.0.626654541782.issue36713@roundup.psfhosted.org> Change by Michele Angrisano : ---------- keywords: +patch pull_requests: +13440 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 10:28:05 2019 From: report at bugs.python.org (Marco Sulla) Date: Thu, 23 May 2019 14:28:05 +0000 Subject: [issue36978] `python3 -m pip install` has no `--requirement` option on Windows In-Reply-To: <1558386497.6.0.534415104881.issue36978@roundup.psfhosted.org> Message-ID: <1558621685.7.0.555913810047.issue36978@roundup.psfhosted.org> Marco Sulla added the comment: Excuse me, after a python -m pip install --upgrade setuptools python -m pip install --upgrade pip it works like a charme. ---------- resolution: -> works for me stage: test needed -> resolved status: pending -> closed versions: +Python 3.6 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 10:42:54 2019 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 23 May 2019 14:42:54 +0000 Subject: [issue36713] duplicate method definition in Lib/ctypes/test/test_unicode.py In-Reply-To: <1556119147.21.0.373187833971.issue36713@roundup.psfhosted.org> Message-ID: <1558622574.86.0.466657125369.issue36713@roundup.psfhosted.org> Ezio Melotti added the comment: New changeset 25d8404c358f3b1cc8321cdc74049d45dcb8d014 by Ezio Melotti (Michele Angrisano) in branch '2.7': bpo-36713: Rename duplicated method in test_unicode. (#13525) https://github.com/python/cpython/commit/25d8404c358f3b1cc8321cdc74049d45dcb8d014 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 10:45:06 2019 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 23 May 2019 14:45:06 +0000 Subject: [issue36713] duplicate method definition in Lib/ctypes/test/test_unicode.py In-Reply-To: <1556119147.21.0.373187833971.issue36713@roundup.psfhosted.org> Message-ID: <1558622706.42.0.482114150035.issue36713@roundup.psfhosted.org> Ezio Melotti added the comment: Fixed, thanks for the PR! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 11:16:58 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 23 May 2019 15:16:58 +0000 Subject: [issue37021] Can _random.getrandbits() be converted to METH_FASTCALL? Message-ID: <1558624618.0.0.375945744552.issue37021@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- components: Extension Modules nosy: rhettinger, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Can _random.getrandbits() be converted to METH_FASTCALL? type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 11:22:36 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 23 May 2019 15:22:36 +0000 Subject: [issue37000] _randbelow_with_getrandbits function inefficient with powers of two In-Reply-To: <1558471816.52.0.343821776026.issue37000@roundup.psfhosted.org> Message-ID: <1558624956.31.0.156161822007.issue37000@roundup.psfhosted.org> Raymond Hettinger added the comment: > it's a bit surprising all on its own that `getrandbits(0)` > raises an exception. Given that there would be no randomness in the result, it makes sense to me that getrandbits(0) is documented to raise an exception. Related: `randrange(0)` raises an exception `choice([])` raises an exception > In any case, I'd leave _randbelow_with_getrandbits alone. That makes sense to me as well. I'll mark this as closed. There's one other bright side. If someone really cares about the speed of the power-of-two case, they can already call `getrandbits(10)` instead of `randrange(1024)`. The former is about 7x faster. Mathis, thank you for taking the time to look at this code. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 11:38:54 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 23 May 2019 15:38:54 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1558625934.19.0.174120835599.issue37007@roundup.psfhosted.org> Steve Dower added the comment: Is it worth also implementing if_nameindex() using (I assume) GetIfTable2Ex [1]? Or maybe just the simpler GetIfTable is sufficient - I'm not sure exactly what semantics Unix if_nameindex() has, whether it includes all logical adapters. [1]: https://docs.microsoft.com/en-us/windows/desktop/api/netioapi/nf-netioapi-getiftable2ex ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 11:45:44 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 23 May 2019 15:45:44 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1558626344.6.0.788796122673.issue36842@roundup.psfhosted.org> Steve Dower added the comment: New changeset b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184 by Steve Dower in branch 'master': bpo-36842: Implement PEP 578 (GH-12613) https://github.com/python/cpython/commit/b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 11:47:29 2019 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 23 May 2019 15:47:29 +0000 Subject: [issue37000] _randbelow_with_getrandbits function inefficient with powers of two In-Reply-To: <1558471816.52.0.343821776026.issue37000@roundup.psfhosted.org> Message-ID: <1558626449.4.0.757565923506.issue37000@roundup.psfhosted.org> Mark Dickinson added the comment: Related: `randrange(0)` raises an exception `choice([])` raises an exception Those are very different from `getrandbits(0)`: in both cases there's no reasonable value that can be returned: for the first case, there's no integer `x` with `0 <= x < 0`; for the second, there's no element of `[]`, period. In contrast, there's an obvious, valid, return value for `getrandbits(0)`. The `getrandbits(0)` example is much more similar to `randrange(1)` (in fact, it's pretty much the same thing: apart from `n = 0`, `getrandbits(n)` is equivalent at some level to `randrange(2**n)`. So if `getrandbits(0)` should be an exception on the basis of not having any randomness in the result, then `randrange(1)` should be an exception on the same basis, as should `random.uniform(2.0, 2.0)`, etc. So to me, it makes no sense at all that `getrandbits(0)` raises: I can't see any good reason for it to do so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 12:00:10 2019 From: report at bugs.python.org (Grant Wu) Date: Thu, 23 May 2019 16:00:10 +0000 Subject: [issue37014] [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin In-Reply-To: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> Message-ID: <1558627210.76.0.385946271482.issue37014@roundup.psfhosted.org> Change by Grant Wu : ---------- nosy: +grantwu -Grant Wu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 12:02:14 2019 From: report at bugs.python.org (daniel hahler) Date: Thu, 23 May 2019 16:02:14 +0000 Subject: [issue37022] pdb: do_p and do_pp swallow exceptions from __repr__ Message-ID: <1558627334.31.0.41290624509.issue37022@roundup.psfhosted.org> New submission from daniel hahler : Given: ``` class BadRepr: def __repr__(self): raise Exception('repr_exc') obj = BadRepr() __import__('pdb').set_trace() ``` ``` (Pdb) p obj (Pdb) pp obj (Pdb) ``` Possible patch - clumsy due to `self._getval` both printing any error already, and raising the exception: ``` diff --git i/Lib/pdb.py w/Lib/pdb.py index f5d33c27fc..59a419d961 100755 --- i/Lib/pdb.py +++ w/Lib/pdb.py @@ -1177,18 +1177,28 @@ def do_p(self, arg): Print the value of the expression. """ try: - self.message(repr(self._getval(arg))) + val = self._getval(arg) except: - pass + return + try: + self.message(repr(val)) + except: + exc_info = sys.exc_info()[:2] + self.error(traceback.format_exception_only(*exc_info)[-1].strip()) def do_pp(self, arg): """pp expression Pretty-print the value of the expression. """ try: - self.message(pprint.pformat(self._getval(arg))) + val = self._getval(arg) except: - pass + return + try: + self.message(pprint.pformat(val)) + except: + exc_info = sys.exc_info()[:2] + self.error(traceback.format_exception_only(*exc_info)[-1].strip()) complete_print = _complete_expression complete_p = _complete_expression ``` ---------- components: Library (Lib) messages: 343306 nosy: blueyed priority: normal severity: normal status: open title: pdb: do_p and do_pp swallow exceptions from __repr__ type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 12:16:16 2019 From: report at bugs.python.org (Jake Tesler) Date: Thu, 23 May 2019 16:16:16 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558628176.01.0.203411555837.issue36084@roundup.psfhosted.org> Jake Tesler added the comment: Michael Felt - If you would like some help with adding/building AIX support for this functionality, tag me, I'd be glad to help out! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 12:29:38 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 May 2019 16:29:38 +0000 Subject: [issue37021] Can _random.getrandbits() be converted to METH_FASTCALL? Message-ID: <1558628978.37.0.828538752056.issue37021@roundup.psfhosted.org> New submission from Serhiy Storchaka : Sure. The simlest way is to use Argument Clinic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 12:37:29 2019 From: report at bugs.python.org (Henry Chen) Date: Thu, 23 May 2019 16:37:29 +0000 Subject: [issue22577] local variable changes lost after pdb jump command In-Reply-To: <1412763709.52.0.382735862315.issue22577@psf.upfronthosting.co.za> Message-ID: <1558629449.18.0.817328639348.issue22577@roundup.psfhosted.org> Henry Chen added the comment: PEP 558 will fix this issue, which I've verified with the proposed implementation (https://github.com/python/cpython/pull/3640/files). Perhaps this issue can be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 12:45:19 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 May 2019 16:45:19 +0000 Subject: [issue37021] Can _random.getrandbits() be converted to METH_FASTCALL? In-Reply-To: <1558628978.37.0.828538752056.issue37021@roundup.psfhosted.org> Message-ID: <1558629919.15.0.595820659802.issue37021@roundup.psfhosted.org> Serhiy Storchaka added the comment: If you hate Argument Clinic you can use METH_O and _PyLong_AsInt(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 12:48:57 2019 From: report at bugs.python.org (Michael J. Sullivan) Date: Thu, 23 May 2019 16:48:57 +0000 Subject: [issue37017] Use LOAD_METHOD optimization in CallMethod C API functions In-Reply-To: <1558571544.48.0.863461247465.issue37017@roundup.psfhosted.org> Message-ID: <1558630137.23.0.998419686098.issue37017@roundup.psfhosted.org> Michael J. Sullivan added the comment: I believe that this is orthogonal to PEP 590. PyObject_CallMethodObjArgs and friends take varargs which need to be copied into an array one way or another. It is easy (and efficient) to prepend the base while copying the function arguments into the array (see the attached PR). I don't think that vector call will change anything about this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 12:52:08 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 23 May 2019 16:52:08 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1558630328.93.0.573754071056.issue36842@roundup.psfhosted.org> Steve Dower added the comment: test_gdb failed on the Debian PGO buildbot https://buildbot.python.org/all/#builders/47/builds/2854 I'm going to do what I can to investigate, but I may be out of my depth here! ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 13:14:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 17:14:10 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1558631650.11.0.345259154203.issue36084@roundup.psfhosted.org> STINNER Victor added the comment: If someone wants to document that _start_new_thread() return value is similar to threading.get_ident() but not threading.get_native_id(): please go ahead and propose a PR :-) Adding support for AIX to get_native_id() should be done in a separated issue since AIX seems to come with specific challenges :-) The initial feature request is now implemented. Well done! I know that many people were awaiting to expose "gettid()" in Python. Now it's there! Thanks everyone who was involved in this issue. Sorry for the CI hiccup which required to revert the change temporarily. At least, it didn't miss Python 3.8 feature freeze! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 13:16:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 17:16:38 +0000 Subject: [issue37023] test_gdb failed on AMD64 Debian PGO 3.x Message-ID: <1558631798.29.0.597769613412.issue37023@roundup.psfhosted.org> New submission from STINNER Victor : It's likely a regression caused by bpo-36842. https://buildbot.python.org/all/#/builders/47/builds/2854 Example of failure: ====================================================================== FAIL: test_NULL_ob_type (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with NULL ob_type is handled gracefully ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_gdb.py", line 533, in test_NULL_ob_type self.assertSane('id(42)', File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_gdb.py", line 504, in assertSane self.get_gdb_repr(source, File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_gdb.py", line 278, in get_gdb_repr self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output)) AssertionError: Unexpected gdb output: 'Breakpoint 1 at 0x201df0: file Python/bltinmodule.c, line 1217.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".\n\nBreakpoint 1, builtin_id () at Python/bltinmodule.c:1217\n1217\t{\n#0 builtin_id () at Python/bltinmodule.c:1217\n#1 _PyMethodDef_RawFastCallKeywords () at Objects/call.c:650\n#2 _PyCFunction_FastCallKeywords (func=, args=, nargs=, kwnames=) at Objects/call.c:736\n#3 call_function (kwnames=0x0, oparg=1, pp_stack=, tstate=) at Python/ceval.c:4831\n#4 _PyEval_EvalFrameDefault () at Python/ceval.c:3347\n#5 PyEval_EvalFrameEx (throwflag=0, f=Frame 0x7ffff6e94800, for file , line 1, in ()) at Python/ceval.c:685\n#6 _PyEval_EvalCodeWithName () at Python/ceval.c:4173\n#7 PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=, kwcount=0, kws=, argcount=0, args=, locals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, globals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, _co=) at Python/ceval.c:4202\n#8 PyEval_EvalCode (co=, globals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, locals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }) at Python/ceval.c:662\n#9 run_eval_code_obj () at Python/pythonrun.c:1078\n#10 run_mod () at Python/pythonrun.c:1100\n#11 PyRun_StringFlags () at Python/pythonrun.c:987\n#12 PyRun_SimpleStringFlags () at Python/pythonrun.c:461\n#13 pymain_run_command (cf=, command=) at Modules/main.c:241\n#14 pymain_run_python (exitcode=) at Modules/main.c:522\n#15 _Py_RunMain () at Modules/main.c:610\n#16 pymain_main () at Modules/main.c:640\n#17 _Py_UnixMain (argc=, argv=) at Modules/main.c:664\n#18 __libc_start_main (main=
, argc=7, argv=, init=, fini=, rtld_fini=, stack_end=) at ../csu/libc-start.c:291\n#19 _start ()\n' Breakpoint 1 at 0x201df0: file Python/bltinmodule.c, line 1217. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, builtin_id () at Python/bltinmodule.c:1217 1217 { #0 builtin_id () at Python/bltinmodule.c:1217 #1 _PyMethodDef_RawFastCallKeywords () at Objects/call.c:650 #2 _PyCFunction_FastCallKeywords (func=, args=, nargs=, kwnames=) at Objects/call.c:736 #3 call_function (kwnames=0x0, oparg=1, pp_stack=, tstate=) at Python/ceval.c:4831 #4 _PyEval_EvalFrameDefault () at Python/ceval.c:3347 #5 PyEval_EvalFrameEx (throwflag=0, f=Frame 0x7ffff6e94800, for file , line 1, in ()) at Python/ceval.c:685 #6 _PyEval_EvalCodeWithName () at Python/ceval.c:4173 #7 PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=, kwcount=0, kws=, argcount=0, args=, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, _co=) at Python/ceval.c:4202 #8 PyEval_EvalCode (co=, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }) at Python/ceval.c:662 #9 run_eval_code_obj () at Python/pythonrun.c:1078 #10 run_mod () at Python/pythonrun.c:1100 #11 PyRun_StringFlags () at Python/pythonrun.c:987 #12 PyRun_SimpleStringFlags () at Python/pythonrun.c:461 #13 pymain_run_command (cf=, command=) at Modules/main.c:241 #14 pymain_run_python (exitcode=) at Modules/main.c:522 #15 _Py_RunMain () at Modules/main.c:610 #16 pymain_main () at Modules/main.c:640 #17 _Py_UnixMain (argc=, argv=) at Modules/main.c:664 #18 __libc_start_main (main=
, argc=7, argv=, init=, fini=, rtld_fini=, stack_end=) at ../csu/libc-start.c:291 #19 _start () ---------- components: Tests messages: 343314 nosy: vstinner priority: normal severity: normal status: open title: test_gdb failed on AMD64 Debian PGO 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 13:17:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 May 2019 17:17:12 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1558631832.18.0.184491187539.issue36842@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-37023 to track the test_gdb failure: "test_gdb failed on AMD64 Debian PGO 3.x". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 13:23:21 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 23 May 2019 17:23:21 +0000 Subject: [issue37023] test_gdb failed on AMD64 Debian PGO 3.x In-Reply-To: <1558631798.29.0.597769613412.issue37023@roundup.psfhosted.org> Message-ID: <1558632201.23.0.740345226764.issue37023@roundup.psfhosted.org> Steve Dower added the comment: Is it just expecting builtin_id() to have been inlined? That seems risky. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 13:26:21 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 23 May 2019 17:26:21 +0000 Subject: [issue37024] SQLite flag in configure due to homebrew not linking sqlite Message-ID: <1558632381.76.0.984637995348.issue37024@roundup.psfhosted.org> New submission from Lysandros Nikolaou : Since recently, Homebrew refuses to link sqlite. Upon researching the whole thing, I found out that this is now considered a feature of Homebrew and not a bug. Thus homebrew users on macOS do not get the SQLite module installed by default, because it is not found and have to overwrite CPPFLAGS. Would it make sense to include a --with-sqlite flag, like we do for openssl? ---------- components: Build messages: 343317 nosy: lys.nikolaou priority: normal severity: normal status: open title: SQLite flag in configure due to homebrew not linking sqlite type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 13:32:21 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 23 May 2019 17:32:21 +0000 Subject: [issue37023] test_gdb failed on AMD64 Debian PGO 3.x In-Reply-To: <1558631798.29.0.597769613412.issue37023@roundup.psfhosted.org> Message-ID: <1558632741.64.0.391597368997.issue37023@roundup.psfhosted.org> Steve Dower added the comment: Ah no, it's expecting `builtin_id (self=..., v=...)` but getting `builtin_id ()` instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 14:29:42 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 23 May 2019 18:29:42 +0000 Subject: [issue37023] test_gdb failed on AMD64 Debian PGO 3.x In-Reply-To: <1558631798.29.0.597769613412.issue37023@roundup.psfhosted.org> Message-ID: <1558636182.44.0.955625989799.issue37023@roundup.psfhosted.org> Steve Dower added the comment: Well, the good news is I can repro it on a PGO build in WSL. So now I just need to go learn all about gcc's PGO build, debug info, and how gdb renders it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 15:19:40 2019 From: report at bugs.python.org (David Bolen) Date: Thu, 23 May 2019 19:19:40 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1558639180.8.0.995528951105.issue36511@roundup.psfhosted.org> David Bolen added the comment: I've been investigating issues with test failures on my Windows buildbots seemingly not showing up in the master's web interface (but just showing warnings), and it appears likely due to this change. For example, test_urllib (a test problem from issue 36948) was failing but only appeared as a warning (the first such case on my Win10 builder for example is https://buildbot.python.org/all/#/builders/3/builds/2661). This change appears to force the exit code of test.bat to be successful (0) regardless of the results of the test run, thus obscuring any test failures from a parent process such as the buildbot. As an aside, it also looks like any failures along the new arm32ssh branch would be obscured, assuming that the ssh operation would otherwise have propagated the remote exit code. I think just leaving off the exit code (so just "exit /b") should propagate the rt.bat result properly. Or, a goto to a label at the end of the file and letting it exit naturally would mimic the prior behavior. ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 15:20:53 2019 From: report at bugs.python.org (Batuhan) Date: Thu, 23 May 2019 19:20:53 +0000 Subject: [issue20443] __code__. co_filename should always be an absolute path In-Reply-To: <1391048115.83.0.412883752117.issue20443@psf.upfronthosting.co.za> Message-ID: <1558639253.27.0.737962299068.issue20443@roundup.psfhosted.org> Change by Batuhan : ---------- keywords: +patch pull_requests: +13441 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 15:57:35 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 23 May 2019 19:57:35 +0000 Subject: [issue37024] SQLite flag in configure due to homebrew not linking sqlite In-Reply-To: <1558632381.76.0.984637995348.issue37024@roundup.psfhosted.org> Message-ID: <1558641455.23.0.158183136268.issue37024@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 15:57:45 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 23 May 2019 19:57:45 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1558641465.14.0.855247458882.issue36511@roundup.psfhosted.org> Paul Monson added the comment: I did a quick test and it looks like exit /b %ERRORLEVEL% will propagate the exit code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 16:15:44 2019 From: report at bugs.python.org (David Bolen) Date: Thu, 23 May 2019 20:15:44 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1558642544.86.0.682688386202.issue36511@roundup.psfhosted.org> David Bolen added the comment: Yeah, I think you're right. It looks like without an explicit code, it won't propagate the result as the exit code of cmd itself for those cases where cmd does exit (which would include the buildbots). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 16:30:05 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 23 May 2019 20:30:05 +0000 Subject: [issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN In-Reply-To: <1423093850.42.0.241477195496.issue23395@psf.upfronthosting.co.za> Message-ID: <1558643405.48.0.344143070145.issue23395@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 608876b6b1eb59538e6c29671a733033fb8b5be7 by Antoine Pitrou (Mat?j Cepl) in branch 'master': bpo-23395: Fix PyErr_SetInterrupt if the SIGINT signal is ignored or not handled (GH-7778) https://github.com/python/cpython/commit/608876b6b1eb59538e6c29671a733033fb8b5be7 ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 16:41:11 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 23 May 2019 20:41:11 +0000 Subject: [issue36975] csv: undocumented UnicodeDecodeError on malformed file In-Reply-To: <1558376023.37.0.392859277.issue36975@roundup.psfhosted.org> Message-ID: <1558644071.13.0.639325543388.issue36975@roundup.psfhosted.org> Brett Cannon added the comment: This isn't a bug because the CSV format isn't malformed (which would be appropriate for csv.Error), but the file itself isn't appropriate encoded (or the proper encoding wasn't specified (hence UnicodeDecodeError). So the exception is appropriate. And we do not document indirect exceptions that get raised by code, only those that are explicitly raised. So everything is as it's expected. ---------- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 16:49:07 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 23 May 2019 20:49:07 +0000 Subject: [issue35328] Set a environment variable for venv prompt In-Reply-To: <1543335149.71.0.788709270274.issue35328@psf.upfronthosting.co.za> Message-ID: <1558644547.48.0.0506368485956.issue35328@roundup.psfhosted.org> Brett Cannon added the comment: @lys.nikolaou it looks like there was an initial PR, but it only updated things for Bash and not for all the other shells that we support for virtual environments. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 16:52:06 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 23 May 2019 20:52:06 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1558644726.72.0.587873777759.issue36964@roundup.psfhosted.org> Brett Cannon added the comment: Virtual environments are not designed to be portable. For instance, if you have entry points installed then moving them to another machine would break their shebang lines. And even if you do it on your local machine there's no guarantee something else wasn't structured to be directory-specific. So thanks for opening the issue, but I'm closing as not a bug. ---------- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 16:55:25 2019 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 23 May 2019 20:55:25 +0000 Subject: [issue35328] Set a environment variable for venv prompt In-Reply-To: <1543335149.71.0.788709270274.issue35328@psf.upfronthosting.co.za> Message-ID: <1558644925.15.0.157081931723.issue35328@roundup.psfhosted.org> Lysandros Nikolaou added the comment: @brettcannon, yeah I saw that, but there hasn't been any progress since November. I'm still interested in this though. What would the correct workflow be? Pushing commits to the same PR or opening a new one with a co-author? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 17:00:26 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 23 May 2019 21:00:26 +0000 Subject: [issue35328] Set a environment variable for venv prompt In-Reply-To: <1543335149.71.0.788709270274.issue35328@psf.upfronthosting.co.za> Message-ID: <1558645226.35.0.641817225007.issue35328@roundup.psfhosted.org> Brett Cannon added the comment: You can open a new PR with co-author or basing off of their fork if it's still around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 17:13:39 2019 From: report at bugs.python.org (Ralf Habacker) Date: Thu, 23 May 2019 21:13:39 +0000 Subject: [issue37025] Misleading error message "Python failed to load the default activation context" Message-ID: <1558646019.4.0.18611977167.issue37025@roundup.psfhosted.org> New submission from Ralf Habacker : When I started Kicad under Windows I got the following error message in dbgview: "Python could not load the default activation context". This message is issued by the Python runtime environment when checking the return value of the Windows API function AddRefActCtx() if the return value is zero (see https://github.com/python/cpython/blob/a3488e5902f5c26e5cc289aec2518e7b5058e5d1/PC/dl_nt.c#L107). According to https://docs.microsoft.com/de-de/windows/desktop/api/winbase/nf-winbase-AddRefActCtx, this function does not return a value, which makes the check result dependent on temporary internal register/stack values and does not indicate a real problem. This check should be completely removed so as not to waste the precious time of developers and users searching for the reason for this misleading message. The corresponding definitions https://github.com/python/cpython/blob/2.7/PC/dl_nt.c#L36 (and line 37) should also be adjusted. The issue is also present in version 2.7. ---------- components: Windows messages: 343329 nosy: paul.moore, rhabacker, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Misleading error message "Python failed to load the default activation context" type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 17:38:08 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 23 May 2019 21:38:08 +0000 Subject: [issue32528] Change base class for futures.CancelledError In-Reply-To: <1515601875.1.0.467229070634.issue32528@psf.upfronthosting.co.za> Message-ID: <1558647488.48.0.730748508661.issue32528@roundup.psfhosted.org> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +13442 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 17:38:39 2019 From: report at bugs.python.org (Paul Monson) Date: Thu, 23 May 2019 21:38:39 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1558647519.97.0.756962938357.issue36511@roundup.psfhosted.org> Change by Paul Monson : ---------- pull_requests: +13443 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 18:06:55 2019 From: report at bugs.python.org (jmberg) Date: Thu, 23 May 2019 22:06:55 +0000 Subject: [issue37026] socketserver: BaseServer.handle_request() infinite loop Message-ID: <1558649215.56.0.199533115703.issue37026@roundup.psfhosted.org> New submission from jmberg : Hi, Alright - you may very well consider this to be a stupid idea and everything, but I figured I'd report it anyway, just so it's there even if you decide to ignore it. For context, I'm running python in a ARCH=um Linux system that has completely virtual time, using basically this patch: https://patchwork.ozlabs.org/patch/1095055/ Now, as I replied there myself, you would in fact think that this can lead to infinite loops, but not really in a select/poll loop in the socket server, hence this report. We have the following code: [...] if timeout is not None: deadline = time() + timeout # Wait until a request arrives or the timeout expires - the loop is # necessary to accommodate early wakeups due to EINTR. with _ServerSelector() as selector: selector.register(self, selectors.EVENT_READ) while True: ready = selector.select(timeout) if ready: return self._handle_request_noblock() else: if timeout is not None: timeout = deadline - time() if timeout < 0: return self.handle_timeout() Assume that a timeout is given, so deadline is set to time() + timeout. Now, if selector.select(timeout) returns [] because nothing was ready for reading, you'd expect us to treat this as a timeout, right? However, in my case of virtual time with infinite processing power, it doesn't. Let's say that timeout is 1 (second) and that the call to time() returned 10000 (clearly not realistic, but doesn't matter). Now, in a virtual time implementation with infinite processing power, select(timeout) will sleep for *exactly* 1 second, and return nothing is ready. Then, in the else: branch, we set "timeout = deadline - time()" - but now time will return 10001 (remember we slept for exactly 1 second), and timeout will be 0. We will thus not handle a timeout, instead, we'll go into select() again with a timeout of 0. Due to the "infinite processing power" aspect of this system, this will happen over and over again. The trivial fix here is to handle it as a timeout "if timeout <= 0" rather than just "if timeout < 0". Obviously, I can also fix my virtual time system, for example, I can give it less processing power by actually interrupting the process after some real time (which I implemented in https://patchwork.ozlabs.org/patch/1095814/). An alternative is to make every "what time is it now" request actually take some virtual time, thus the time() calls cannot return the same value over and over again. This also fixes the issue I saw. But it stands to reason that if it should happen that the new timeout is actually 0, we should really treat it as a timeout here in this code and make it <=0 rather than just <0. ---------- components: Library (Lib) messages: 343330 nosy: jmberg priority: normal severity: normal status: open title: socketserver: BaseServer.handle_request() infinite loop type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 18:31:47 2019 From: report at bugs.python.org (Jack) Date: Thu, 23 May 2019 22:31:47 +0000 Subject: [issue35990] ipaddress.IPv4Interface won't accept 2-tuple (address, mask) In-Reply-To: <1550086128.37.0.0760252061885.issue35990@roundup.psfhosted.org> Message-ID: <1558650707.63.0.358627868526.issue35990@roundup.psfhosted.org> Jack added the comment: confirmed in 3.7.3 ---------- nosy: +Jacktose _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 18:46:13 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 23 May 2019 22:46:13 +0000 Subject: [issue37027] Return a safe proxy over a socket from get_extra_info('socket') Message-ID: <1558651573.81.0.166270912079.issue37027@roundup.psfhosted.org> New submission from Yury Selivanov : Currently asyncio exposes the underlying transport socket directly, providing a way to modify (in a potentially disruptive way) the underlying transport connection. ---------- messages: 343332 nosy: yselivanov priority: normal severity: normal status: open title: Return a safe proxy over a socket from get_extra_info('socket') _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 18:47:46 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 23 May 2019 22:47:46 +0000 Subject: [issue37027] Return a safe proxy over a socket from get_extra_info('socket') In-Reply-To: <1558651573.81.0.166270912079.issue37027@roundup.psfhosted.org> Message-ID: <1558651666.43.0.952896586233.issue37027@roundup.psfhosted.org> Change by Yury Selivanov : ---------- components: +asyncio nosy: +asvetlov versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 18:47:36 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 23 May 2019 22:47:36 +0000 Subject: [issue34541] pathlib.Path.iterdir doesn't throw an exception until you start iterating In-Reply-To: <1535530821.14.0.56676864532.issue34541@psf.upfronthosting.co.za> Message-ID: <1558651656.29.0.99934196532.issue34541@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +pitrou type: behavior -> enhancement versions: +Python 3.8 -Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 18:48:14 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 23 May 2019 22:48:14 +0000 Subject: [issue37027] Return a safe proxy over a socket from get_extra_info('socket') In-Reply-To: <1558651573.81.0.166270912079.issue37027@roundup.psfhosted.org> Message-ID: <1558651694.09.0.361133403103.issue37027@roundup.psfhosted.org> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +13444 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 18:54:06 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 23 May 2019 22:54:06 +0000 Subject: =?utf-8?q?=5Bissue34963=5D_String_representation_for_types_created_with_t?= =?utf-8?q?yping=2ENewType=28=E2=80=A6=29_are_opaque_and_unappealing?= In-Reply-To: <1539313395.67.0.788709270274.issue34963@psf.upfronthosting.co.za> Message-ID: <1558652046.63.0.113090957302.issue34963@roundup.psfhosted.org> Cheryl Sabella added the comment: Serhiy, It looks like Ivan approved your PR and was ready to merge it, but left it up to you for the final decision about incorporating changes from the competing PR. This is just a friendly ping in case you want to get it in for 3.8. Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 18:55:58 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 23 May 2019 22:55:58 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1558652158.95.0.213675289172.issue36876@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +13445 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 18:57:13 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 23 May 2019 22:57:13 +0000 Subject: [issue37028] Implement asyncio repl Message-ID: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> New submission from Yury Selivanov : Having an asyncio enabled repr where a top-level "await" possible would be a huge productivity boost. Using asyncio.run() in a REPL is hard, and besides it spawns a new event loop on every call. The big idea: we want users to be able to do this: $ python -m asyncio >>> await asyncio.sleep(10, return='hello') # after 10 seconds hello ---------- components: asyncio messages: 343334 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Implement asyncio repl versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 18:58:01 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 23 May 2019 22:58:01 +0000 Subject: [issue37028] Implement asyncio repl In-Reply-To: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> Message-ID: <1558652281.5.0.89426485319.issue37028@roundup.psfhosted.org> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +13446 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 19:04:47 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 23 May 2019 23:04:47 +0000 Subject: [issue37021] Can _random.getrandbits() be converted to METH_FASTCALL? In-Reply-To: <1558628978.37.0.828538752056.issue37021@roundup.psfhosted.org> Message-ID: <1558652687.35.0.0520127645723.issue37021@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13447 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 19:05:43 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Thu, 23 May 2019 23:05:43 +0000 Subject: [issue37028] Implement asyncio repl In-Reply-To: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> Message-ID: <1558652743.12.0.245315996828.issue37028@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 21:12:07 2019 From: report at bugs.python.org (Thomas Hisch) Date: Fri, 24 May 2019 01:12:07 +0000 Subject: [issue35753] Importing call from unittest.mock directly causes ValueError In-Reply-To: <1547669844.88.0.953853980523.issue35753@roundup.psfhosted.org> Message-ID: <1558660327.55.0.285169520736.issue35753@roundup.psfhosted.org> Thomas Hisch added the comment: I think this tickt needs to be reopened, because > The actual bug appears to be "doctest can't run on a module that contains un-unwrappable objects" @ppperry Or do you already know where this issue is tracked? ---------- nosy: +Thomas Hisch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 21:17:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 24 May 2019 01:17:18 +0000 Subject: [issue37028] Implement asyncio repl In-Reply-To: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> Message-ID: <1558660638.32.0.0301600226247.issue37028@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 22:17:55 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 24 May 2019 02:17:55 +0000 Subject: [issue36982] Add support for extended color functions in ncurses 6.1 In-Reply-To: <1558406631.2.0.0939623901621.issue36982@roundup.psfhosted.org> Message-ID: <1558664275.97.0.0277464788177.issue36982@roundup.psfhosted.org> Jeffrey Kintscher added the comment: A new function called curses.has_extended_color_support() will indicate whether the linked ncurses library provides extended color support. It returns true if curses.h defines NCURSES_EXT_COLORS and NCURSES_EXT_FUNCS, indicating that the extended color functions are available. This seems more useful to developers than using an indirect method like trying to set a color-pair greater than 0x7fff and checking for an exception to indicate lack of support. At first glance, has_extended_color() seems like a better name because it is similar to has_colors(), but the two functions have very different semantics that could confuse developers. has_extended_color_support() indicates available functionality in the underlying ncurses library that is set when the interpreter is compiled and linked, while has_curses() indicates available functionality of the current terminal at run-time. ---------- versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 22:32:15 2019 From: report at bugs.python.org (Shannon) Date: Fri, 24 May 2019 02:32:15 +0000 Subject: [issue37019] Create symlinks relative to cwd In-Reply-To: <1558595342.46.0.940919584419.issue37019@roundup.psfhosted.org> Message-ID: <1558665135.89.0.587115865605.issue37019@roundup.psfhosted.org> Shannon added the comment: I can see how this change would be backward incompatible, however the current behaviour seems inconsistent with the way pathlib functions otherwise. Within two lines of code, the same path object can be pointing to two completely different locations simply because it's being used as the src argument to create a symlimk. That's counter to my understanding of the whole point of pathlib. With regard to relative_to, I've found this issue, which doesn't seem to have been touched since 2016. https://bugs.python.org/issue20012 I'm new here, what's the best way to bump an issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 22:36:12 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 24 May 2019 02:36:12 +0000 Subject: [issue36982] Add support for extended color functions in ncurses 6.1 In-Reply-To: <1558406631.2.0.0939623901621.issue36982@roundup.psfhosted.org> Message-ID: <1558665372.48.0.396605618187.issue36982@roundup.psfhosted.org> Jeffrey Kintscher added the comment: Corrected typos in msg343336 for clarity: At first glance, has_extended_colors() seems like a better name because it is similar to has_colors(), but the two functions have very different semantics that could confuse developers. has_extended_color_support() indicates available functionality in the underlying ncurses library that is set when the interpreter is compiled and linked, while has_colors() indicates available functionality of the current terminal at run-time. The name has_extended_colors() would imply that it indicates run-time terminal functionality and not static library functionality. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 23:09:23 2019 From: report at bugs.python.org (ppperry) Date: Fri, 24 May 2019 03:09:23 +0000 Subject: [issue35753] Importing call from unittest.mock directly causes ValueError In-Reply-To: <1547669844.88.0.953853980523.issue35753@roundup.psfhosted.org> Message-ID: <1558667363.03.0.628643398816.issue35753@roundup.psfhosted.org> ppperry added the comment: Indeed, you are right that this should be reopened. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 23:10:20 2019 From: report at bugs.python.org (Windson Yang) Date: Fri, 24 May 2019 03:10:20 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1558667420.16.0.834457676858.issue36411@roundup.psfhosted.org> Windson Yang added the comment: I'm not sure it's a bug. When you write binary data to file (use BufferedIOBase by default). It actually writes the data to a buffer. That is why tell() gets out of sync. You can follow the instrument belolw. For instance, call flush() after writing to get the `correct answer.` > When writing to this object, data is normally placed into an internal buffer. The buffer will be written out to the underlying RawIOBase object under various conditions, including: > when the buffer gets too small for all pending data; > when flush() is called; > when a seek() is requested (for BufferedRandom objects); > when the BufferedWriter object is closed or destroyed. 1. https://docs.python.org/3/library/io.html#io.BufferedWriter ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 23:12:07 2019 From: report at bugs.python.org (Windson Yang) Date: Fri, 24 May 2019 03:12:07 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1558667527.06.0.100566396624.issue36411@roundup.psfhosted.org> Windson Yang added the comment: I think we should mention it at the document, like in the tell() function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 23:17:43 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 24 May 2019 03:17:43 +0000 Subject: [issue36630] failure of test_colors_funcs in test_curses with ncurses 6.1 In-Reply-To: <1555270378.07.0.766030130411.issue36630@roundup.psfhosted.org> Message-ID: <1558667863.13.0.125656378192.issue36630@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I created issue #36982 to track the extended color changes since they broader than this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 23:28:35 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 24 May 2019 03:28:35 +0000 Subject: [issue35753] Importing call from unittest.mock directly causes ValueError In-Reply-To: <1547669844.88.0.953853980523.issue35753@roundup.psfhosted.org> Message-ID: <1558668515.84.0.533438484307.issue35753@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 23 23:31:16 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Fri, 24 May 2019 03:31:16 +0000 Subject: [issue36982] Add support for extended color functions in ncurses 6.1 In-Reply-To: <1558406631.2.0.0939623901621.issue36982@roundup.psfhosted.org> Message-ID: <1558668676.89.0.649799067342.issue36982@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 00:32:15 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 May 2019 04:32:15 +0000 Subject: [issue37023] test_gdb failed on AMD64 Debian PGO 3.x In-Reply-To: <1558631798.29.0.597769613412.issue37023@roundup.psfhosted.org> Message-ID: <1558672335.26.0.0993099171307.issue37023@roundup.psfhosted.org> Steve Dower added the comment: I confirmed earlier that removing the new code from builtins_id fixes this issue, which I suspect means that PGO is deciding to make different optimizations and produce different output. Other functions in the same stack also do not show their arguments, so I think the best thing to do here is fix the test to not care about arguments being in the display. The result of gcc's PGO on debug symbols should not affect how we make Python work. I'll update the regex in the test tomorrow. ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 01:30:41 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 24 May 2019 05:30:41 +0000 Subject: [issue36982] Add support for extended color functions in ncurses 6.1 In-Reply-To: <1558406631.2.0.0939623901621.issue36982@roundup.psfhosted.org> Message-ID: <1558675841.15.0.573594221176.issue36982@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +13448 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 01:32:21 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 24 May 2019 05:32:21 +0000 Subject: [issue36982] Add support for extended color functions in ncurses 6.1 In-Reply-To: <1558406631.2.0.0939623901621.issue36982@roundup.psfhosted.org> Message-ID: <1558675941.5.0.929395459215.issue36982@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 01:33:57 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 24 May 2019 05:33:57 +0000 Subject: [issue37029] PyObject_Free is O(N^2) where N = # of arenas Message-ID: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> New submission from Inada Naoki : Reported here: * https://stackoverflow.com/questions/56228799/python-hangs-indefinitely-trying-to-delete-deeply-recursive-object * https://mail.python.org/pipermail/python-dev/2019-May/157635.html ---------- components: Interpreter Core messages: 343344 nosy: inada.naoki, tim.peters priority: normal severity: normal status: open title: PyObject_Free is O(N^2) where N = # of arenas type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 01:58:59 2019 From: report at bugs.python.org (Hongchang Liu) Date: Fri, 24 May 2019 05:58:59 +0000 Subject: [issue31904] Python should support VxWorks RTOS In-Reply-To: <1509393393.78.0.213398074469.issue31904@psf.upfronthosting.co.za> Message-ID: <1558677539.44.0.204468441522.issue31904@roundup.psfhosted.org> Change by Hongchang Liu : ---------- pull_requests: +13449 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 02:06:41 2019 From: report at bugs.python.org (PEW's Corner) Date: Fri, 24 May 2019 06:06:41 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1558678001.7.0.622273868235.issue36411@roundup.psfhosted.org> PEW's Corner added the comment: But buffers are used - and update tell() correctly - in all other cases than binary append+read mode (and even this case works in Python 2). Also, the implementation clearly tries to keep tell() updated irrespective of the buffer, so isn't it just a matter of reminding it to move the pointer to the end of the file when doing an append? If that isn't feasible, then of course it would be good to document the problem in the description of tell(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 03:25:53 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 24 May 2019 07:25:53 +0000 Subject: [issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames Message-ID: <1558682753.85.0.407660629596.issue37030@roundup.psfhosted.org> New submission from Aldwin Pollefeyt : A flag, defaulting to false. If true, :meth:`do_help` and :meth:`completenames` won't include undocumented commands (that is, there are do_*() methods without corresponding help_*() methods). ---------- components: Library (Lib) messages: 343346 nosy: aldwinaldwin priority: normal severity: normal status: open title: Lib/cmd.py: Hide undocumented commands in help and completenames type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 03:35:53 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Fri, 24 May 2019 07:35:53 +0000 Subject: [issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames In-Reply-To: <1558682753.85.0.407660629596.issue37030@roundup.psfhosted.org> Message-ID: <1558683353.24.0.401683040381.issue37030@roundup.psfhosted.org> Change by Aldwin Pollefeyt : ---------- keywords: +patch pull_requests: +13450 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 03:48:17 2019 From: report at bugs.python.org (Dmitry Tantsur) Date: Fri, 24 May 2019 07:48:17 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1558684097.16.0.848940745758.issue37007@roundup.psfhosted.org> Dmitry Tantsur added the comment: That would be fantastic, but I did not dare asking for it :) This is how the output of if_nameindex looks on my Fedora 29: [(1, 'lo'), (2, 'enp0s31f6'), (3, 'wlp4s0'), (4, 'virbr0'), (5, 'virbr0-nic'), (12, 'tun0')] It includes the loopback, two real adapters (ethernet and wifi) and devices apparently created by libvirt. This is how it looks on my OpenStack testing environment: [(1, 'lo'), (2, 'eth0'), (3, 'virbr0'), (4, 'virbr0-nic'), (5, 'ovs-system'), (6, 'br-int'), (7, 'br-ex'), (8, 'brbm'), (9, 'br-tun'), (14, 'ovs-node-0i1'), (15, 'tap-node-0i1'), (16, 'ovs-node-0i2'), (17, 'tap-node-0i2'), (18, 'ovs-node-1i1'), (19, 'tap-node-1i1'), (20, 'ovs-node-1i2'), (21, 'tap-node-1i2'), (22, 'ovs-node-2i1'), (23, 'tap-node-2i1'), (24, 'ovs-node-2i2'), (25, 'tap-node-2i2'), (26, 'ovs-tap'), (27, 'brbm-tap'), (34, 'br-inspector'), (35, 'brbm-inspector'), (55, 'macvtap2'), (56, 'macvtap3'), (79, 'macvtap0'), (80, 'macvtap1')] It seems to actually include everything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:00:30 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 24 May 2019 08:00:30 +0000 Subject: [issue35990] ipaddress.IPv4Interface won't accept 2-tuple (address, mask) In-Reply-To: <1550086128.37.0.0760252061885.issue35990@roundup.psfhosted.org> Message-ID: <1558684830.84.0.269572615794.issue35990@roundup.psfhosted.org> SilentGhost added the comment: This seems to have been fixed in #27860 (in master) particularly 6fa84bd12c4b83bee6a41b989363230d5c03b96c. I'm not sure why it was decided against backporting to 3.7 as no new features were introduced, but it's perhaps better to raise this question in that issue. I'm going to close this as a duplicate. ---------- nosy: +SilentGhost resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Improvements to ipaddress module type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:06:10 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 24 May 2019 08:06:10 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1558685170.48.0.586633667161.issue27860@roundup.psfhosted.org> SilentGhost added the comment: I was wondering why it was decided against backporting to 3.7? 6fa84bd12c4b83bee6a41b989363230d5c03b96c fixes an actual bug #35990 (string mask in tuple argument for IPv4Interfaces). Incidentally, there are also no tests for this behaviour. Just to note: both merged PRs lacked news entry. ---------- nosy: +SilentGhost versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:08:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 08:08:57 +0000 Subject: [issue37031] signalmodule.c: reuse runtime->main_thread Message-ID: <1558685337.89.0.451873883908.issue37031@roundup.psfhosted.org> New submission from STINNER Victor : Currently, signalmodule.c tracks the "main thread" and the "main interpreter": main_thread = PyThread_get_thread_ident(); main_interp = _PyInterpreterState_Get(); This information is already tracked in the global _PyRuntime variable which is updated at fork by _PyRuntimeState_ReInitThreads() (called by PyOS_AfterFork_Child). Attached PR removes main_thread and main_interp from signalmodule.c, to reuse _PyRuntime. It should help to ensure that Python remains consistent (less risk of inconsistency if one variable is updated, but not the other). By the way, _PyInterpreterState_DeleteExceptMain() is called before _PyRuntimeState_ReInitThreads(). _PyInterpreterState_DeleteExceptMain() acquires runtime->interpreters.mutex, whereas this lock is reset by _PyRuntimeState_ReInitThreads(). Maybe I introduced this bug recently when I refactored code, I don't know. But it sounds like a bug as well. Note: PyOS_AfterFork_Child() doesn't update runtime->interpreters->main, but os.fork() raises a RuntimeError if it's not called from the main interpreter. So it's fine. ---------- components: Interpreter Core messages: 343350 nosy: vstinner priority: normal severity: normal status: open title: signalmodule.c: reuse runtime->main_thread versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:10:39 2019 From: report at bugs.python.org (Michael Felt) Date: Fri, 24 May 2019 08:10:39 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1558685439.16.0.274596060761.issue35545@roundup.psfhosted.org> Michael Felt added the comment: In hindsight, maybe the message could have been better, BUT - is it relevant? commit 413118ebf3162418639a5c4af14b02d26571a02c Author: Michael Felt Date: Fri Sep 14 01:35:56 2018 +0200 Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') (#8907) FYI: I have a server where "netstat -in" (aka ip a) does show an address with a scope component. Not figured out how to query that in C or python yet. (not my favorite thing - messing with socket() :p at me) Re: the example below - I would have thought the scopeid would be showing on en1, not en2 - and I am also wondering, if the scopeid is "%1" AIX ignores it. (also, I masked my global ipv6 address). Maybe en0 has a scopeid BECAUSE there is a global address (where en1 does not). michael at x071:[/home/michael]netstat -ni Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll en0 1500 link#2 fa.d1.8c.f7.62.4 3103849 0 1085261 0 0 en0 1500 192.168.129 192.168.129.71 3103849 0 1085261 0 0 en0 1500 192.168.90 192.168.90.71 3103849 0 1085261 0 0 en0 1500 MASK::1:f8d1:8cff:fef7:6204 3103849 0 1085261 0 0 en0 1500 fe80::f8d1:8cff:fef7:6204%2 3103849 0 1085261 0 0 en1 1500 link#3 fa.d1.8c.f7.62.5 12704 0 9323 0 0 en1 1500 192.168.2 192.168.2.1 12704 0 9323 0 0 en1 1500 fe80::f8d1:8cff:fef7:6205 12704 0 9323 0 0 lo0 16896 link#1 3908 0 3908 0 0 lo0 16896 127 127.0.0.1 3908 0 3908 0 0 lo0 16896 ::1%1 3908 0 3908 0 0 So, I looked at another server with two interfaces - here only one has a IPv6 address root at x064:[/home/root]netstat -in Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll en0 1500 link#2 0.21.5e.a3.c7.44 119801 0 84874 0 0 en0 1500 192.168.129 192.168.129.64 119801 0 84874 0 0 en0 1500 fe80::221:5eff:fea3:c744 119801 0 84874 0 0 en1 1500 link#3 fa.d1.81.81.ac.5 89362 0 48409 0 0 en1 1500 192.168.2 192.168.2.64 89362 0 48409 0 0 lo0 16896 link#1 139882 0 139881 0 0 lo0 16896 127 127.0.0.1 139882 0 139881 0 0 lo0 16896 ::1%1 139882 0 139881 0 0 root at x064:[/home/root] And, after I activate IPv6 on the second interface - I see a scopeid-like representation: Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll en0 1500 link#2 0.21.5e.a3.c7.44 120043 0 85045 0 0 en0 1500 192.168.129 192.168.129.64 120043 0 85045 0 0 en0 1500 fe80::221:5eff:fea3:c744 120043 0 85045 0 0 en1 1500 link#3 fa.d1.81.81.ac.5 89370 0 48420 0 0 en1 1500 192.168.2 192.168.2.64 89370 0 48420 0 0 en1 1500 fe80::f8d1:81ff:fe81:ac05%2 89370 0 48420 0 0 lo0 16896 link#1 139923 0 139922 0 0 lo0 16896 127 127.0.0.1 139923 0 139922 0 0 lo0 16896 ::1%1 139923 0 139922 0 0 I would have to guess at this point, but to simplify, it seems that AIX resolves addresses differently (rather than say 'not correctly') and maybe requires specific conditions. If relevant - I can provide the output from Debian on POWER. But it seems AIX is only using a "ADDRv6%scopeid" when there at least two interfaces defined. +++++++++ What the bot is not showing is this re: the "mock" connections 'failing': root at x066:[/data/prj/python/python3-3.8]./python -m test test_asyncio Run tests sequentially 0:00:00 [1/1] test_asyncio /data/prj/python/git/python3-3.8/Lib/test/support/__init__.py:1627: RuntimeWarning: coroutine 'AsyncMockMixin._mock_call' was never awaited gc.collect() RuntimeWarning: Enable tracemalloc to get the object allocation traceback Future exception was never retrieved future: Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/asyncio/subprocess.py", line 162, in _feed_stdin await self.stdin.drain() File "/data/prj/python/git/python3-3.8/Lib/asyncio/streams.py", line 443, in drain await self._protocol._drain_helper() File "/data/prj/python/git/python3-3.8/Lib/asyncio/streams.py", line 200, in _drain_helper await waiter File "/data/prj/python/git/python3-3.8/Lib/asyncio/unix_events.py", line 661, in _write_ready n = os.write(self._fileno, self._buffer) BrokenPipeError: [Errno 32] Broken pipe Future exception was never retrieved future: Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/asyncio/subprocess.py", line 162, in _feed_stdin await self.stdin.drain() File "/data/prj/python/git/python3-3.8/Lib/asyncio/streams.py", line 443, in drain await self._protocol._drain_helper() File "/data/prj/python/git/python3-3.8/Lib/asyncio/streams.py", line 200, in _drain_helper await waiter File "/data/prj/python/git/python3-3.8/Lib/asyncio/unix_events.py", line 661, in _write_ready n = os.write(self._fileno, self._buffer) BrokenPipeError: [Errno 32] Broken pipe test test_asyncio failed -- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/unittest/mock.py", line 1226, in patched return func(*args, **keywargs) File "/data/prj/python/git/python3-3.8/Lib/test/test_asyncio/test_base_events.py", line 1316, in test_create_connection_ipv6_scope sock.connect.assert_called_with(('fe80::1', 80, 0, 1)) File "/data/prj/python/git/python3-3.8/Lib/unittest/mock.py", line 838, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: expected call not found. Expected: connect(('fe80::1', 80, 0, 1)) Actual: connect(('fe80::1', 80, 0, 0)) FYI: I have IPv6 interfaces defined on this server (x066) - but only one. And I tried changing fe80::1%1 to fe80::1%2, etc, but the end result is similar: AssertionError: expected call not found. Expected: connect(('fe80::1', 80, 0, 2)) Actual: connect(('fe80::1', 80, 0, 0)) Hope this helps! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:10:43 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 24 May 2019 08:10:43 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1558685443.46.0.840828504017.issue37015@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This logic is present in create_autospec too at [0]. The behavior for patch seems to be documented at [1] which also needs to be updated to reflect that an AsyncMock by default is created instead of MagicMock if the target is an async function unlike 3.7. Probably also a versionchanged directive to note this if the current behavior is okay. Since it generates a RuntimeWarning I think it will be good if the behavior is decided before 3.8 beta 1. > If new is omitted, then the target is replaced with a MagicMock. If patch() is used as a decorator and new is omitted, the created mock is passed in as an extra argument to the decorated function. If patch() is used as a context manager the created mock is returned by the context manager. $ python3.7 -q >>> import asyncio >>> from unittest.mock import create_autospec >>> loop = asyncio.get_event_loop() >>> loop_mock = create_autospec(loop) >>> loop_mock._accept_connection2 $ ./python.exe -q >>> import asyncio >>> from unittest.mock import create_autospec >>> loop = asyncio.get_event_loop() >>> loop_mock = create_autospec(loop) >>> loop_mock._accept_connection2 [0] https://github.com/python/cpython/blob/cccc11b38e5409861f4db345a4dd45dcc9ba470c/Lib/unittest/mock.py#L2564 [1] https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:12:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 08:12:44 +0000 Subject: [issue37031] signalmodule.c: reuse runtime->main_thread In-Reply-To: <1558685337.89.0.451873883908.issue37031@roundup.psfhosted.org> Message-ID: <1558685564.63.0.983033526354.issue37031@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13452 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:17:25 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 24 May 2019 08:17:25 +0000 Subject: [issue37019] Create symlinks relative to cwd In-Reply-To: <1558595342.46.0.940919584419.issue37019@roundup.psfhosted.org> Message-ID: <1558685845.82.0.140152319602.issue37019@roundup.psfhosted.org> SilentGhost added the comment: Shannon, what you're suggesting is prone to the same issue (creating a broken symlink) if a given destination does not exist relative to cwd. I think your current solution is better as it explicitly provides the paths, but it's not generalised enough to warrant a change in behaviour. If you have anything new to add or would like to add a PR, just post on that issue. As you note, the core developer stated that the current behaviour is by design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:19:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 08:19:55 +0000 Subject: [issue37031] signalmodule.c: reuse runtime->main_thread In-Reply-To: <1558685337.89.0.451873883908.issue37031@roundup.psfhosted.org> Message-ID: <1558685995.04.0.0237465476188.issue37031@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:21:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 08:21:22 +0000 Subject: [issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN In-Reply-To: <1423093850.42.0.241477195496.issue23395@psf.upfronthosting.co.za> Message-ID: <1558686082.11.0.0148675716302.issue23395@roundup.psfhosted.org> STINNER Victor added the comment: The interrupt_main() documentation needs a "versionchanged:: 3.8" to document that the behavior changed in Python 3.8, no? (do nothing if the signal is not handled by Python). I'm not comfortable to backport this change. I suggest to only change Python 3.8 (master branch). While reviewing this change, I found code which should be refactored: see bpo-37031. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:41:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 May 2019 08:41:42 +0000 Subject: [issue37019] Create symlinks relative to cwd In-Reply-To: <1558595342.46.0.940919584419.issue37019@roundup.psfhosted.org> Message-ID: <1558687302.16.0.588188142763.issue37019@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, the current behavior is by design. It is consistent with the os.symlink(), the "ln -s" command, and with any other way of creating symbolic links in other programming languages. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 04:57:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 08:57:37 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1558688257.04.0.819252799519.issue36710@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13454 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:05:56 2019 From: report at bugs.python.org (Michele Angrisano) Date: Fri, 24 May 2019 09:05:56 +0000 Subject: [issue37014] [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin In-Reply-To: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> Message-ID: <1558688756.49.0.416892031741.issue37014@roundup.psfhosted.org> Michele Angrisano added the comment: The Python's version chosen for this issue is 3.7. I think the suggest can be useful for 3.8 as well. Am I right? ---------- nosy: +mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:06:36 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 May 2019 09:06:36 +0000 Subject: [issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN In-Reply-To: <1423093850.42.0.241477195496.issue23395@psf.upfronthosting.co.za> Message-ID: <1558688796.06.0.453726774699.issue23395@roundup.psfhosted.org> Antoine Pitrou added the comment: It's just a bugfix to avoid a rogue exception. It sounds gratuitous to add markers for bug fixes in the documentation. ---------- versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:06:45 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 24 May 2019 09:06:45 +0000 Subject: [issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN In-Reply-To: <1423093850.42.0.241477195496.issue23395@psf.upfronthosting.co.za> Message-ID: <1558688805.62.0.436091488763.issue23395@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13455 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:19:47 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 24 May 2019 09:19:47 +0000 Subject: [issue34626] PEP 384's PyType_Spec and PyType_Slot are not documented In-Reply-To: <1536629597.33.0.0269046726804.issue34626@psf.upfronthosting.co.za> Message-ID: <1558689587.67.0.229848695633.issue34626@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset f1e17e9f97d9a4e97a5d99574775ee343a3a74fb by Petr Viktorin in branch 'master': bpo-34626: Document creating heap types from the C-API (GH-9154) https://github.com/python/cpython/commit/f1e17e9f97d9a4e97a5d99574775ee343a3a74fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:22:41 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 24 May 2019 09:22:41 +0000 Subject: [issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN In-Reply-To: <1423093850.42.0.241477195496.issue23395@psf.upfronthosting.co.za> Message-ID: <1558689761.87.0.515240897463.issue23395@roundup.psfhosted.org> miss-islington added the comment: New changeset 310f414bbd4d6ed1d8813f724c91ce9b4129c0ba by Miss Islington (bot) in branch '3.7': bpo-23395: Fix PyErr_SetInterrupt if the SIGINT signal is ignored or not handled (GH-7778) https://github.com/python/cpython/commit/310f414bbd4d6ed1d8813f724c91ce9b4129c0ba ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:25:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 09:25:55 +0000 Subject: [issue37032] Add CodeType.replace() method Message-ID: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> New submission from STINNER Victor : Each type types.CodeType constructor changes, a lot of applications break. Python 3.8 added a new parameter which broke for example the Genshi project, just to name one. I propose to add a new CodeType.replace() method, similar to datetime.datetime.replace and namedtuple._replace() for example: $ python3 Python 3.7.3 (default, Mar 27 2019, 13:41:07) >>> import datetime >>> d=datetime.datetime.now() >>> d2=d.replace(year=2010) >>> d, d2 (datetime.datetime(2019, 5, 24, 11, 25, 3, 839966), datetime.datetime(2010, 5, 24, 11, 25, 3, 839966)) >>> import collections >>> Point = collections.namedtuple("Point", "x y") >>> p=Point(1, 2) >>> p2=p._replace(y=3) >>> p, p2 (Point(x=1, y=2), Point(x=1, y=3)) ---------- components: Interpreter Core messages: 343360 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: Add CodeType.replace() method versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:27:23 2019 From: report at bugs.python.org (Matej Cepl) Date: Fri, 24 May 2019 09:27:23 +0000 Subject: [issue37031] signalmodule.c: reuse runtime->main_thread In-Reply-To: <1558685337.89.0.451873883908.issue37031@roundup.psfhosted.org> Message-ID: <1558690043.0.0.535450613127.issue37031@roundup.psfhosted.org> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:28:55 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 May 2019 09:28:55 +0000 Subject: [issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN In-Reply-To: <1423093850.42.0.241477195496.issue23395@psf.upfronthosting.co.za> Message-ID: <1558690135.0.0.638915725693.issue23395@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:29:43 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 24 May 2019 09:29:43 +0000 Subject: [issue36982] Add support for extended color functions in ncurses 6.1 In-Reply-To: <1558406631.2.0.0939623901621.issue36982@roundup.psfhosted.org> Message-ID: <1558690183.02.0.420386118953.issue36982@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- components: +Extension Modules -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:29:53 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 24 May 2019 09:29:53 +0000 Subject: [issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames In-Reply-To: <1558682753.85.0.407660629596.issue37030@roundup.psfhosted.org> Message-ID: <1558690193.16.0.587744807338.issue37030@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I believe this PR at least addresses the concern raised at [0] to provide a way where internal and undocumented commands can be hidden from the user. [0] https://bugs.python.org/issue13214#msg309788 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:38:42 2019 From: report at bugs.python.org (Vykouk) Date: Fri, 24 May 2019 09:38:42 +0000 Subject: [issue37033] Dictionary defaults .get(), .pop(), .setdefault() Message-ID: <1558690722.29.0.185013402146.issue37033@roundup.psfhosted.org> New submission from Vykouk : The methods .get(), .pop(), .setdefault() evaluate defaults even though the key already exists in the dictionary: # -*- coding: utf-8 -*- def deflt(x): print('\nKey', x, 'is not in the dictionary') return 'Default' dicti = {1:'one', 2:'two', 3:'three'} key = 2 print('\ndicti \t\t', dicti) print('\t\t key =',key) print('get \t\t', dicti.get(key, deflt(key))) print('setdefault \t',dicti.setdefault(key, deflt(key))) print('dicti \t\t', dicti) print('pop \t\t', dicti.pop(key, deflt(key))) print('dicti \t\t', dicti) print('setdefault \t',dicti.setdefault(key, deflt(key))) print('dicti \t\t', dicti) ''' Printed outputs: Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] Type "copyright", "credits" or "license" for more information. IPython 7.1.1 -- An enhanced Interactive Python. runfile('C:/Temp/Smazat/Dictionary_Defaults.py', wdir='C:/Temp/Smazat') dicti {1: 'one', 2: 'two', 3: 'three'} key = 2 Key 2 is not in the dictionary # ??? get two Key 2 is not in the dictionary # ??? setdefault two dicti {1: 'one', 2: 'two', 3: 'three'} Key 2 is not in the dictionary # ??? pop two dicti {1: 'one', 3: 'three'} Key 2 is not in the dictionary setdefault Default dicti {1: 'one', 3: 'three', 2: 'Default'} ''' ---------- files: Dictionary_Defaults.py messages: 343362 nosy: vykouk priority: normal severity: normal status: open title: Dictionary defaults .get(), .pop(), .setdefault() type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48352/Dictionary_Defaults.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:45:20 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 24 May 2019 09:45:20 +0000 Subject: [issue37033] Dictionary defaults .get(), .pop(), .setdefault() In-Reply-To: <1558690722.29.0.185013402146.issue37033@roundup.psfhosted.org> Message-ID: <1558691120.39.0.318095054621.issue37033@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi @vykouk, Python evaluates arguments before calling functions so >>> dicti.get(key, dflt(key)) is equivalent to: >>> arg = dflt(key) >>> dicti.get(key, arg) Notive how dflt() is called before .get() This is how all functions work in Python, not just dict methods. You can change your code like so to make it work: >>> if key in dicti: >>> x = dicti[key] >>> else: >>> x = dflt(key) or use defaultdict instead of setdefault which will take a callable to generate the default value. I don't think there is a bug and we can close this issue. Have a nice day. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 05:47:43 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 24 May 2019 09:47:43 +0000 Subject: [issue37033] Dictionary defaults .get(), .pop(), .setdefault() In-Reply-To: <1558690722.29.0.185013402146.issue37033@roundup.psfhosted.org> Message-ID: <1558691263.93.0.0440719388965.issue37033@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 06:28:45 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Fri, 24 May 2019 10:28:45 +0000 Subject: [issue34651] Disallow fork in a subinterpreter. In-Reply-To: <1536786263.28.0.956365154283.issue34651@psf.upfronthosting.co.za> Message-ID: <1558693725.84.0.776995307071.issue34651@roundup.psfhosted.org> Miro Hron?ok added the comment: It appears that as a result of this, subprocess.Popen cannot be called from within a subinterpreter either. Is that an obvious and desired limitation? ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 06:29:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 10:29:45 +0000 Subject: [issue37034] Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call Message-ID: <1558693785.23.0.512986851321.issue37034@roundup.psfhosted.org> New submission from STINNER Victor : Example of generated code: if (!PyBytes_Check(args[15])) { _PyArg_BadArgument("replace", 16, "bytes", args[15]); goto exit; } Error message: TypeError: replace() argument 16 must be bytes, not tuple It is the 'lnotab' parameter which is a keywoard-only parameter. I expect the parameter name in the error message. Note: I got this error while implementing bpo-37032. ---------- components: Interpreter Core messages: 343365 nosy: serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 06:31:06 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 24 May 2019 10:31:06 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1558693866.65.0.488039795116.issue37015@roundup.psfhosted.org> Andrew Svetlov added the comment: xtreak thanks for investigation. I have no time to work on it now, sorry. Maybe the next week. Anyway, the problem can be fixed even in python beta stage if we don't do it earlier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 06:41:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 10:41:42 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558694502.44.0.0946831450814.issue37032@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13456 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 06:43:34 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 24 May 2019 10:43:34 +0000 Subject: [issue20285] Improve object.__doc__ and help(object) output In-Reply-To: <1389920351.63.0.12805701843.issue20285@psf.upfronthosting.co.za> Message-ID: <1558694614.65.0.269114033405.issue20285@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset c95c93d4eb0519beaa06e6b6e0ecca7c2a58f69c by Cheryl Sabella in branch 'master': bpo-20285: Improve help docs for object (GH-4759) https://github.com/python/cpython/commit/c95c93d4eb0519beaa06e6b6e0ecca7c2a58f69c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 06:44:12 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 24 May 2019 10:44:12 +0000 Subject: [issue20285] Improve object.__doc__ and help(object) output In-Reply-To: <1389920351.63.0.12805701843.issue20285@psf.upfronthosting.co.za> Message-ID: <1558694652.36.0.164547401074.issue20285@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 06:44:31 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 24 May 2019 10:44:31 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1558694671.43.0.167156341124.issue37015@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: @asvetlov No problem then if it can be fixed after beta. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 06:52:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 10:52:31 +0000 Subject: [issue34651] Disallow fork in a subinterpreter. In-Reply-To: <1536786263.28.0.956365154283.issue34651@psf.upfronthosting.co.za> Message-ID: <1558695151.19.0.344278709502.issue34651@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue to let Eric answer ;-) If the behavior is deliberate, maybe it should just be documented somewhere? ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 06:56:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 10:56:41 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558695401.01.0.422307956348.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: > Python 3.8 added a new parameter which broke for example the Genshi project Pablo fixed it in Genshi: https://github.com/edgewall/genshi/pull/19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 06:59:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 10:59:14 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558695554.64.0.101645379206.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-37034: "Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:10:08 2019 From: report at bugs.python.org (Erik Bray) Date: Fri, 24 May 2019 11:10:08 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1558696208.6.0.749454638358.issue21536@roundup.psfhosted.org> Erik Bray added the comment: I vaguely recall seeing some discussion about this on python-dev or elsewhere and wish I had chimed in sooner, as I didn't realize action was going to be taken on this so soon. This completely breaks building extension modules on Windows-based platforms like Cygwin and MinGW, where it is necessary when building even shared libraries for all global symbols to resolvable at link time. I'm not actually sure this use case can even be achieved on these platforms. I tried several hacks but nothing works. I'll open a follow-up issue... ---------- nosy: +erik.bray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:11:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 11:11:28 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558696288.1.0.704397323601.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: Fix in Hypothesis: https://github.com/HypothesisWorks/hypothesis/commit/8f47297fa2e19c426a42b06bb5f8bf1406b8f0f3#diff-a097452b8ffe8323641ccccac335fbf9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:14:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 11:14:59 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558696499.44.0.648385229799.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: ipython fix: https://github.com/ipython/ipython/commit/248128dfaabb33e922b1e36a298fd7ec0c730069 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:34:21 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 24 May 2019 11:34:21 +0000 Subject: [issue29779] New environment variable PYTHONHISTORY In-Reply-To: <1489133424.79.0.6086605998.issue29779@psf.upfronthosting.co.za> Message-ID: <1558697661.57.0.943901311632.issue29779@roundup.psfhosted.org> Zackery Spytz added the comment: PR 473 was closed by its author. I have created a new pull request (PR 13208) that addresses all of Berker Peksag's comments on the old PR. Please have a look. ---------- nosy: +ZackerySpytz versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:38:14 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 24 May 2019 11:38:14 +0000 Subject: [issue36045] builtins.help function is not much help with async functions In-Reply-To: <1550619387.23.0.907293710235.issue36045@roundup.psfhosted.org> Message-ID: <1558697894.8.0.288211252342.issue36045@roundup.psfhosted.org> miss-islington added the comment: New changeset 2a37f8f55b543589cc77a67b5cd17cbd9d0311c9 by Miss Islington (bot) (Dan Rose) in branch 'master': bpo-36045: builtins.help() now prefixes `async` for async functions (GH-12010) https://github.com/python/cpython/commit/2a37f8f55b543589cc77a67b5cd17cbd9d0311c9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:38:46 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 24 May 2019 11:38:46 +0000 Subject: [issue36045] builtins.help function is not much help with async functions In-Reply-To: <1550619387.23.0.907293710235.issue36045@roundup.psfhosted.org> Message-ID: <1558697926.19.0.120922310368.issue36045@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:39:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 11:39:29 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558697969.66.0.778402556538.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: It's not like Python 3.8 is the first type in Python history that code constructor changed. The PyCode_New() function slowly growed from 3 parameters in 1990 to 16 paramters in 2019 :-) History of PyCode_New(). New "posonlyargcount" parameter: commit 8c77b8cb9188165a123f2512026e3629bf03dc9b Author: Pablo Galindo Date: Mon Apr 29 13:36:57 2019 +0100 bpo-36540: PEP 570 -- Implementation (GH-12701) New "kwonlyargcount" parameter, bpo-1549670: commit 4f72a78684bbfcdc43ceeabb240ceee54706c4b0 Author: Guido van Rossum Date: Fri Oct 27 23:31:49 2006 +0000 Jiwon Seo's PEP 3102 implementation. See SF#1549670. The compiler package has not yet been updated. New "freevars" and "cellvars" parameters, PEP 227: commit 64949cb753f206c0ca1d83f55d07afd3c179b81a Author: Jeremy Hylton Date: Thu Jan 25 20:06:59 2001 +0000 PEP 227 implementation ... Include/compile.h Add co_freevars and co_cellvars slots to code objects. Update PyCode_New() to take freevars and cellvars as arguments New "firstlineno" and "lnotab" parameters: commit da4eb5c3b55df9b7d6957ddd0458313102f0a92e Author: Guido van Rossum Date: Fri Jan 24 03:43:35 1997 +0000 Instead of emitting SET_LINENO instructions, generate a line number table which is incorporated in the code object. This way, the runtime overhead to keep track of line numbers is only incurred when an exception has to be reported. New "stacksize" parameter: commit 8b993a98db507cc3a75067af4c865ffc8afbada1 Author: Guido van Rossum Date: Fri Jan 17 21:04:03 1997 +0000 Add co_stacksize field to codeobject structure, and stacksize argument to PyCode_New() argument list. Move MAXBLOCKS constant to conpile.h. Added accurate calculation of the actual stack size needed by the generated code. Also commented out all fprintf statements (except for a new one to diagnose stack underflow, and one in #ifdef'ed out code), and added some new TO DO suggestions (now that the stacksize is taken of the TO DO list). New "argcount", "nlocals", "flags" and "varnames" parameters: commit 681d79aaf397850778608f35585d091fa7fe370a Author: Guido van Rossum Date: Tue Jul 18 14:51:37 1995 +0000 keyword arguments and faster calls New "name" parameter: commit 9bfef44d97d1ae24e03717e3d59024b44626a9de Author: Guido van Rossum Date: Mon Mar 29 10:43:31 1993 +0000 ... * Added function name to code object. Print it for code and function objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version number has changed accordingly) ... New "filename" parameter: commit 3f5da24ea304e674a9abbdcffc4d671e32aa70f1 Author: Guido van Rossum Date: Thu Dec 20 15:06:42 1990 +0000 "Compiling" version The very first version of the function was: static codeobject * newcodeobject(code, consts, names) object *code; object *consts; object *names; >From this commit: commit 10dc2e8097e7a431367e72f46ddba91be93aa159 Author: Guido van Rossum Date: Sun Nov 18 17:27:39 1990 +0000 Initial revision ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:40:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 11:40:05 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558698005.89.0.804024407334.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: > It's not like Python 3.8 is the first type in Python history that code constructor changed. Oops, typo: It's not like Python 3.8 is the first *time* in Python history that the code constructor changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:43:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 11:43:59 +0000 Subject: [issue37031] signalmodule.c: reuse runtime->main_thread In-Reply-To: <1558685337.89.0.451873883908.issue37031@roundup.psfhosted.org> Message-ID: <1558698239.63.0.344360788706.issue37031@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d8613dc86f4c7acd3e2598095c466fe9dc0ad27c by Victor Stinner in branch 'master': bpo-37031: Reuse _PyRuntime.main_thread in signalmodule.c (GH-13538) https://github.com/python/cpython/commit/d8613dc86f4c7acd3e2598095c466fe9dc0ad27c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:44:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 11:44:26 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1558698266.92.0.303558366653.issue36710@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b4bdecd0fc9112b60a81fec171bc78bc13f2f59c by Victor Stinner in branch 'master': bpo-36710: Add tstate parameter in errors.c (GH-13540) https://github.com/python/cpython/commit/b4bdecd0fc9112b60a81fec171bc78bc13f2f59c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 07:46:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 11:46:05 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558698365.66.0.740909279197.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: Fix in Cloud Pickle: https://github.com/cloudpipe/cloudpickle/commit/b9dc17fc5f723ffbfc665295fafdd076907c0a93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 08:19:09 2019 From: report at bugs.python.org (Michele Angrisano) Date: Fri, 24 May 2019 12:19:09 +0000 Subject: [issue37014] [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin In-Reply-To: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> Message-ID: <1558700349.26.0.476634346122.issue37014@roundup.psfhosted.org> Change by Michele Angrisano : ---------- keywords: +patch pull_requests: +13457 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 08:19:56 2019 From: report at bugs.python.org (Michele Angrisano) Date: Fri, 24 May 2019 12:19:56 +0000 Subject: [issue37014] [First easy issue] fileinput module should document that openhook and mode are ignored when reading from stdin In-Reply-To: <1558545967.04.0.906137299955.issue37014@roundup.psfhosted.org> Message-ID: <1558700396.96.0.276099563345.issue37014@roundup.psfhosted.org> Michele Angrisano added the comment: I've just made a PR for this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 08:24:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 12:24:17 +0000 Subject: [issue36886] Failed to construct CodeType on Python-3.8.0a4 In-Reply-To: <1557570909.72.0.695431824181.issue36886@roundup.psfhosted.org> Message-ID: <1558700657.6.0.597785074045.issue36886@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-37032 to add a new CodeType.replace() helper which help projects to be more future-proof (no longer break if CodeType gets yet another parameter). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 08:25:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 12:25:04 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558700704.82.0.750936568488.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: See bpo-36886 "Failed to construct CodeType on Python-3.8.0a4" for other failures caused by the addition of the "posonlyargcount" parameter to code constructor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 08:40:43 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 24 May 2019 12:40:43 +0000 Subject: [issue37029] PyObject_Free is O(N) where N = # of arenas In-Reply-To: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> Message-ID: <1558701643.22.0.0744824924405.issue37029@roundup.psfhosted.org> Change by Inada Naoki : ---------- title: PyObject_Free is O(N^2) where N = # of arenas -> PyObject_Free is O(N) where N = # of arenas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 09:14:08 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 24 May 2019 13:14:08 +0000 Subject: [issue36379] nb_inplace_pow is always called with an invalid argument In-Reply-To: <1553083293.5.0.811205671176.issue36379@roundup.psfhosted.org> Message-ID: <1558703648.16.0.89740684839.issue36379@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13458 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 09:16:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 13:16:28 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1558703788.1.0.838423403622.issue36710@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13459 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 09:20:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 13:20:27 +0000 Subject: [issue37031] signalmodule.c: reuse runtime->main_thread In-Reply-To: <1558685337.89.0.451873883908.issue37031@roundup.psfhosted.org> Message-ID: <1558704027.44.0.364517522592.issue37031@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b49858b4b7b4c9d85ef6946ad020f83e4fa1caa7 by Victor Stinner in branch 'master': bpo-37031: Fix PyOS_AfterFork_Child() (GH-13537) https://github.com/python/cpython/commit/b49858b4b7b4c9d85ef6946ad020f83e4fa1caa7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 09:20:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 13:20:42 +0000 Subject: [issue37031] signalmodule.c: reuse runtime->main_thread In-Reply-To: <1558685337.89.0.451873883908.issue37031@roundup.psfhosted.org> Message-ID: <1558704042.79.0.139323320103.issue37031@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 09:24:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 13:24:29 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1558704269.21.0.293934635113.issue21536@roundup.psfhosted.org> STINNER Victor added the comment: > This completely breaks building extension modules on Windows-based platforms like Cygwin and MinGW, where it is necessary when building even shared libraries for all global symbols to resolvable at link time. C extensions are always linked to libpython on Android. I'm open to do something similar for Cygwin and/or MinGW if you can come up with a PR :-) See LIBPYTHON variable in configure.ac. You can use Xavier's change as an example: commit 254b309c801f82509597e3d7d4be56885ef94c11, PR 12989. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 09:44:29 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 24 May 2019 13:44:29 +0000 Subject: [issue36379] nb_inplace_pow is always called with an invalid argument In-Reply-To: <1553083293.5.0.811205671176.issue36379@roundup.psfhosted.org> Message-ID: <1558705469.43.0.604809389709.issue36379@roundup.psfhosted.org> Zackery Spytz added the comment: I've created a PR for this issue (with tests). ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 10:17:40 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 24 May 2019 14:17:40 +0000 Subject: [issue36921] Deprecate yield from and @coroutine in asyncio In-Reply-To: <1558018338.65.0.625435116263.issue36921@roundup.psfhosted.org> Message-ID: <1558707460.06.0.678246262414.issue36921@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 10:18:08 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 24 May 2019 14:18:08 +0000 Subject: [issue36802] Revert back StreamWriter awrite/aclose but provide await writer.write() and await writer.close() In-Reply-To: <1557065452.04.0.483828473478.issue36802@roundup.psfhosted.org> Message-ID: <1558707488.45.0.193346088442.issue36802@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 10:29:24 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 24 May 2019 14:29:24 +0000 Subject: [issue36461] timeit: Additional changes for autorange In-Reply-To: <1553766568.14.0.657766350537.issue36461@roundup.psfhosted.org> Message-ID: <1558708164.25.0.935457317792.issue36461@roundup.psfhosted.org> Cheryl Sabella added the comment: @steven.daprano, would you be able to review the pull requests based on your original concept for this change? Thank you! ---------- assignee: Mariatta -> nosy: -Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 10:32:57 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 24 May 2019 14:32:57 +0000 Subject: [issue37035] Don't log OSError exceptions in asyncio transports Message-ID: <1558708377.15.0.222546736903.issue37035@roundup.psfhosted.org> New submission from Andrew Svetlov : Currently asyncio uses `loop.call_exception_handler()` for logging *fatal* exceptions from underlying sockets before calling protocol.connection_lost(). There is a list of exceptions that are not logged: BrokenPipeError, ConnectionResetError, ConnectionAbortedError Later ssl.SSLCertVerificationError was added. There is a request to skip TimeoutError as well: #34148 aiohttp has a bug report about logging SSLError: https://github.com/aio-libs/aiohttp/issues/3535 I am pretty sure that the network subsystem can raise other exceptions that users don't want to see in logs. I suggest changing suppression logic to skip logging of *all* OSError exceptions and eliminate _FATAL_ERROR_IGNORE list. OSError is a sign of communication over network to peer, these problems cannot be avoided by fixing a program logic. All other exceptions are indicators for programming errors, the user's source code should be fixed to get rid of such problems (e.g. AttributeError raised by protocol callback etc). Logging non-OSErrors is pretty nice and desired feature. Note, the list now contains OSError derived exceptions only, both TimeoutError and SSLError falls into this category too. Not-logged exceptions are not skipped but reported to the user by protocol.connection_lost(exc) callback. User code can (and should) handle them properly. The fix is very simple, and don't change application logic. It can be backported to 3.7 as well. ---------- components: asyncio messages: 343389 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Don't log OSError exceptions in asyncio transports versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 10:35:41 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 24 May 2019 14:35:41 +0000 Subject: [issue37035] Don't log OSError exceptions in asyncio transports In-Reply-To: <1558708377.15.0.222546736903.issue37035@roundup.psfhosted.org> Message-ID: <1558708541.16.0.273899846348.issue37035@roundup.psfhosted.org> Andrew Svetlov added the comment: Update. Currently, exceptions from the ignore list are still logged in debug mode. The proposal doesn't change this behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 10:42:14 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 24 May 2019 14:42:14 +0000 Subject: [issue37022] pdb: do_p and do_pp swallow exceptions from __repr__ In-Reply-To: <1558627334.31.0.41290624509.issue37022@roundup.psfhosted.org> Message-ID: <1558708934.21.0.472153070203.issue37022@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Daniel, this is indeed unexpected, I don't see how to have a better patch since the fact that _getval() raise an exception is used in do_source() and do_whatis(). Could you convert your patch as a PR and add a test? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 10:58:58 2019 From: report at bugs.python.org (daniel hahler) Date: Fri, 24 May 2019 14:58:58 +0000 Subject: [issue37022] pdb: do_p and do_pp swallow exceptions from __repr__ In-Reply-To: <1558627334.31.0.41290624509.issue37022@roundup.psfhosted.org> Message-ID: <1558709938.19.0.822471705401.issue37022@roundup.psfhosted.org> daniel hahler added the comment: Thanks for the feedback. What do you think of refactoring the common block (also used in other places) into a method? + except: + exc_info = sys.exc_info()[:2] + self.error(traceback.format_exception_only(*exc_info)[-1].strip()) This could/should be done separately probably then, just want your opinion on it. This would also allow to customize/override it in a single place then (e.g. with pdbpp I am displaying tracebacks for errors, which is done via error() currently then). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:02:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 15:02:03 +0000 Subject: [issue36710] Pass _PyRuntimeState as an argument rather than using the _PyRuntime global variable In-Reply-To: <1556110680.79.0.127639989845.issue36710@roundup.psfhosted.org> Message-ID: <1558710123.12.0.41839892662.issue36710@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 438a12dd9d85f463c0bb7bf1505cd87b98b98170 by Victor Stinner in branch 'master': bpo-36710: Add tstate parameter in ceval.c (GH-13547) https://github.com/python/cpython/commit/438a12dd9d85f463c0bb7bf1505cd87b98b98170 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:09:32 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 24 May 2019 15:09:32 +0000 Subject: [issue36461] timeit: Additional changes for autorange In-Reply-To: <1558708164.25.0.935457317792.issue36461@roundup.psfhosted.org> Message-ID: <20190524150925.GW4221@ando.pearwood.info> Steven D'Aprano added the comment: > @steven.daprano, would you be able to review the pull requests based > on your original concept for this change? Thank you! With difficulty... for technology/financial reasons, I don't have a browser that works properly with github. But I'll do what I can. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:10:12 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 24 May 2019 15:10:12 +0000 Subject: [issue37022] pdb: do_p and do_pp swallow exceptions from __repr__ In-Reply-To: <1558627334.31.0.41290624509.issue37022@roundup.psfhosted.org> Message-ID: <1558710612.63.0.89224240138.issue37022@roundup.psfhosted.org> R?mi Lapeyre added the comment: This part of the code is already used in three places and your patch would add two occurrences of of it, I think it would be great to put the part that print the exception in a private method, to avoid duplicating it all over the place. Doing this seems small enough to me that I think it could be done in the same PR to avoid the overhead of having two separates PRs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:11:49 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 24 May 2019 15:11:49 +0000 Subject: [issue37035] Don't log OSError exceptions in asyncio transports In-Reply-To: <1558708377.15.0.222546736903.issue37035@roundup.psfhosted.org> Message-ID: <1558710709.76.0.507353914296.issue37035@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13460 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:13:48 2019 From: report at bugs.python.org (Erik Bray) Date: Fri, 24 May 2019 15:13:48 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1558710828.55.0.975693116949.issue21536@roundup.psfhosted.org> Change by Erik Bray : ---------- pull_requests: +13461 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:33:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 15:33:54 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1558712034.15.0.580958140295.issue21536@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c994c8fc196a167c57c8850e8abdee170d366eec by Victor Stinner (E. M. Bray) in branch 'master': bpo-21536: On Cygwin, C extensions must be linked with libpython (GH-13549) https://github.com/python/cpython/commit/c994c8fc196a167c57c8850e8abdee170d366eec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:34:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 15:34:39 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1558712079.71.0.895047069965.issue21536@roundup.psfhosted.org> STINNER Victor added the comment: I merged E. M. Bray's PR to get in Python 3.8 beta 1. If anything goes wrong, we can fix it later ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:35:28 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 24 May 2019 15:35:28 +0000 Subject: [issue35775] Add a general selection function to statistics In-Reply-To: <1547820289.72.0.450290663887.issue35775@roundup.psfhosted.org> Message-ID: <1558712128.33.0.512889885052.issue35775@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi Steven, thanks for taking the time to reviewing my patch. Regarding the relevance of add select(), I was looking for work to do in the bug tracker and found some references to it (https://bugs.python.org/issue21592#msg219934 for example). I knew that there is multiples definition of the percentiles but got sloppy in my previous response by wanting to answer quickly. I will try not to do this again. Regarding the use of sorting, I thought that sorting would be quicker than doing the other linear-time algorithm in Python given the general performance of Tim sort, some tests in https://bugs.python.org/issue21592 agreed with that. For the iterator, I was thinking about how to implement percentiles when writing select() and thought that by writing: def _select(data, i, key=None): if not len(data): raise StatisticsError("select requires at least one data point") if not (1 <= i <= len(data)): raise StatisticsError(f"The index looked for must be between 1 and {len(data)}") data = sorted(data, key=key) return islice(data, i-1, None) def select(data, i, key=None): return next(_select(data, y, key=key)) and then doing some variant of: it = _select(data, i, key=key) left, right = next(it), next(it) # compute percentile with left and right to implement the quantiles without sorting multiple time the list. Now that quantiles() has been implement by Raymond Hettinger, this is moot anyway. Since its probably not useful, feel free to disregard my PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:50:05 2019 From: report at bugs.python.org (markmcclain) Date: Fri, 24 May 2019 15:50:05 +0000 Subject: [issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel >= 3.10 In-Reply-To: <1396430238.51.0.283909097168.issue21131@psf.upfronthosting.co.za> Message-ID: <1558713005.46.0.837182539896.issue21131@roundup.psfhosted.org> Change by markmcclain : ---------- nosy: +markmcclain _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:54:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 15:54:37 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558713277.13.0.579543042414.issue36721@roundup.psfhosted.org> STINNER Victor added the comment: Miro commented my PR: https://github.com/python/cpython/pull/13500#issuecomment-495510268 """ This is what it gave me in Fedora, feels a bit inconsistent: /usr/lib64/pkgconfig/python-3.8-embed.pc /usr/lib64/pkgconfig/python-embed-3.8d.pc /usr/lib64/pkgconfig/python3-embed.pc """ I installed Python in release mode: $ ./configure --enable-shared --prefix=/opt/py38 CFLAGS="-O0" && make && make install It gives me: vstinner at apu$ ls -l /opt/py38/lib/pkgconfig/ -rw-r--r--. 1 vstinner vstinner 312 24 mai 17:39 python-3.8-embed.pc -rw-r--r--. 1 vstinner vstinner 286 24 mai 17:39 python-3.8.pc lrwxrwxrwx. 1 vstinner vstinner 19 24 mai 17:39 python3-embed.pc -> python-3.8-embed.pc lrwxrwxrwx. 1 vstinner vstinner 13 24 mai 17:39 python3.pc -> python-3.8.pc Debug build: $ ./configure --enable-shared --prefix=/opt/py38dbg --with-pydebug CFLAGS="-O0" && make && make install It gives me: vstinner at apu$ ls -l /opt/py38dbg/lib/pkgconfig/ lrwxrwxrwx. 1 vstinner vstinner 13 24 mai 17:43 python-3.8d.pc -> python-3.8.pc -rw-r--r--. 1 vstinner vstinner 317 24 mai 17:43 python-3.8-embed.pc -rw-r--r--. 1 vstinner vstinner 290 24 mai 17:43 python-3.8.pc lrwxrwxrwx. 1 vstinner vstinner 19 24 mai 17:43 python3-embed.pc -> python-3.8-embed.pc lrwxrwxrwx. 1 vstinner vstinner 13 24 mai 17:43 python3.pc -> python-3.8.pc lrwxrwxrwx. 1 vstinner vstinner 19 24 mai 17:43 python-embed-3.8d.pc -> python-embed-3.8.pc Oh! "python-embed-3.8d.pc" is a broken symbolic link to "python-embed-3.8.pc" (which doesn't exist). Ok, now I get it: I messed up in names of symbolic links :-) I wrote PR 13551 which gives me the following files for a debug build: vstinner at apu$ ls -l /opt/py38dbg/lib/pkgconfig/*.pc lrwxrwxrwx. 1 vstinner vstinner 19 24 mai 17:51 /opt/py38dbg/lib/pkgconfig/python-3.8d-embed.pc -> python-3.8-embed.pc lrwxrwxrwx. 1 vstinner vstinner 13 24 mai 17:51 /opt/py38dbg/lib/pkgconfig/python-3.8d.pc -> python-3.8.pc -rw-r--r--. 1 vstinner vstinner 317 24 mai 17:51 /opt/py38dbg/lib/pkgconfig/python-3.8-embed.pc -rw-r--r--. 1 vstinner vstinner 290 24 mai 17:51 /opt/py38dbg/lib/pkgconfig/python-3.8.pc lrwxrwxrwx. 1 vstinner vstinner 19 24 mai 17:51 /opt/py38dbg/lib/pkgconfig/python3-embed.pc -> python-3.8-embed.pc lrwxrwxrwx. 1 vstinner vstinner 13 24 mai 17:51 /opt/py38dbg/lib/pkgconfig/python3.pc -> python-3.8.pc The format is now: "python" "version" "embed suffix". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:54:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 15:54:25 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558713265.54.0.367080256213.issue36721@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13462 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 11:57:31 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 24 May 2019 15:57:31 +0000 Subject: [issue36461] timeit: Additional changes for autorange In-Reply-To: <1553766568.14.0.657766350537.issue36461@roundup.psfhosted.org> Message-ID: <1558713451.24.0.940626457256.issue36461@roundup.psfhosted.org> Steven D'Aprano added the comment: (Sorry, I can't comment on Github.) Looking at PR 12954: I'm not sure about the API for making the time used by autorange configurable. The time taken is only used when autoranging, but the API takes it as an argument to the constructor even if it won't be used. I haven't thought deeply about this for a few years, so now I'm wondering if this is the best API. Let me think some more. However, the parameter name "max_time_taken" is certainly wrong: it can be wrongly read as meaning the maximum time the sample code will run, which is not the case. Also, it is not a maximum time, it is a *minimum* time: the autoranger increases the number of loops until it takes *at least* ``max_time_taken`` seconds, not at most. So I think a better name might be something like ``target_time``. It suggests a time we are targeting, not one we promise to hit precisely, it doesn't mislead into thinking it will be the total time. And it is a bit shorter without being cryptically short. Anyone have any better suggestions for the parameter name? Likewise I suggest ``default_target_time`` for the global (line 62). With the longer parameter list, there's a couple of places that the line length seems to exceed 79 columns, e.g. lines 244, 272. Line 176: I think that should be ``if number == 0:`` since we don't want to accept any arbitrary falsey value, just zero. NEWS line 4: take out the reference to None. (I haven't reviewed the tests at this stage.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:02:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 16:02:01 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558713721.77.0.291684149874.issue36721@roundup.psfhosted.org> STINNER Victor added the comment: By the way, I'm not sure that the current layout of .pc files. The name "module" give a different configuration. Is that correct? $ grep ^Libs: /opt/py38/lib/pkgconfig/python-3.8-embed.pc Libs: -L${libdir} -lpython3.8 $ grep ^Libs: /opt/py38dbg/lib/pkgconfig/python-3.8-embed.pc Libs: -L${libdir} -lpython3.8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:08:32 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 24 May 2019 16:08:32 +0000 Subject: [issue37036] Iterating a text file by line should not implicitly disable tell Message-ID: <1558714112.82.0.415931508082.issue37036@roundup.psfhosted.org> New submission from Josh Rosenberg : TextIOWrapper explicitly sets the `telling` flag to 0 when .__next__ ( textiowrapper_iternext ) is called ( https://github.com/python/cpython/blob/3.7/Modules/_io/textio.c#L2974 ), e.g. during standard for loops over the file of this form, trying to call tell raises an exception: with open(filename) as myfile: for line in myfile: myfile.tell() which raises: OSError: telling position disabled by next() call while the effectively equivalent: with open(filename) as myfile: for line in iter(myfile.readline, ''): myfile.tell() works fine. The implementation of __next__ and readline is almost identical (__next__ is calling readline and handling the EOF sentinel per the iterator protocol, that's all). Given they're implemented identically, I see no reason aside from nannying (discouraging slow operations like seek/tell during iteration by forbidding them on the most convenient means of iterating) to forbid tell after beginning iteration, but not after readline. Given the general Python philosophy of "we're all adults here", I don't see nannying as a good reason, which leaves the performance benefit of avoiding snapshotting as the only compelling reason to do this. But the performance benefit is trivial; in local tests, the savings from avoiding that work is barely noticeable, per ipython microbenchmarks (on 3.7.2 Linux x86-64): >>> %%timeit -r5 from collections import deque; f = open('American-english.txt'); consume = deque(maxlen=0).extend ... f.seek(0) ... consume(iter(f.readline, '')) ... ... 15.8 ms ? 38.4 ?s per loop (mean ? std. dev. of 5 runs, 100 loops each) >>> %%timeit -r5 from collections import deque; f = open('American-english.txt'); consume = deque(maxlen=0).extend ... f.seek(0) ... next(f) # Triggers optimization for all future read_chunk calls ... consume(iter(f.readline, '')) # Otherwise iterated identically ... ... 15.7 ms ? 98.5 ?s per loop (mean ? std. dev. of 5 runs, 100 loops each) The two blocks are identical except that the second one explicitly advances the file one line at the beginning with next(f) to flip `telling` to 0 so future calls to readline don't involve the snapshotting code in textiowrapper_read_chunk. Calling consume(f) would drop the time to 9.86 ms, but that's saying more about the optimization of the raw iterator protocol over method calls than it is about the `telling` optimization; I used two arg iter in both cases to keep the code paths as similar as possible so the `telling`. For reference, the input file was 931708 bytes (931467 characters thanks to a few scattered non-ASCII UTF-8 characters), 98569 lines long. Presumably, the speed difference of 0.1 ms can be chalked up to the telling optimization, so removing it would increase the cost of normal iteration from 9.86 ms to 9.96 ms. That seems de minimis to my mind, in the context of text oriented I/O. Given that, it seems like triggering this optimization via __next__ should be dropped; it's a microoptimization at best, that's mostly irrelevant compared to the overhead of text-oriented I/O, and it introduces undocumented limitations on the use of TextIOWrapper. The changes would be to remove all use of the `telling` variable, and (if we want to keep the optimization for unseekable files, where at least no functionality is lost by having it), change the two tests in textiowrapper_read_chunk to test `seekable` in its place. Or we drop the optimization entirely and save 50+ lines of code that provide a fairly tiny benefit in any event. ---------- components: IO, Library (Lib) messages: 343402 nosy: josh.r priority: normal severity: normal status: open title: Iterating a text file by line should not implicitly disable tell versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:12:34 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 24 May 2019 16:12:34 +0000 Subject: [issue36461] timeit: Additional changes for autorange In-Reply-To: <1553766568.14.0.657766350537.issue36461@roundup.psfhosted.org> Message-ID: <1558714354.43.0.837323855165.issue36461@roundup.psfhosted.org> Steven D'Aprano added the comment: Looking at PR 12953: The only API for setting the target time is by passing it to the autorange method directly. So I think that there's no way for the caller of ``Timer.timeit()`` or ``Timer.repeat()`` to specify a custom target time, is that right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:13:33 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 24 May 2019 16:13:33 +0000 Subject: [issue37036] Iterating a text file by line should not implicitly disable tell In-Reply-To: <1558714112.82.0.415931508082.issue37036@roundup.psfhosted.org> Message-ID: <1558714413.32.0.415397907301.issue37036@roundup.psfhosted.org> Josh Rosenberg added the comment: Left a dangling sentence in there: "I used two arg iter in both cases to keep the code paths as similar as possible so the `telling`." should read: "I used iter(f.readline, '') in both cases to keep the code paths as similar as possible so the `telling` optimization was tested in isolation." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:15:24 2019 From: report at bugs.python.org (Erik Bray) Date: Fri, 24 May 2019 16:15:24 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1558714524.7.0.962148876329.issue21536@roundup.psfhosted.org> Change by Erik Bray : ---------- pull_requests: +13463 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:15:27 2019 From: report at bugs.python.org (Peter Edwards) Date: Fri, 24 May 2019 16:15:27 +0000 Subject: [issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel >= 3.10 In-Reply-To: <1396430238.51.0.283909097168.issue21131@psf.upfronthosting.co.za> Message-ID: <1558714527.85.0.131061792966.issue21131@roundup.psfhosted.org> Peter Edwards added the comment: Hi - we ran into what looks like exactly this issue on an x86_64 sporadically, and tracked down the root cause. When faulthandler.c uses sigaltstack(2), the stack size is set up with a buffer of size SIGSTKSZ. That is, sadly, only 8k. When a signal is raised, before the handler is called, the kernel stores the machine state on the user's (possibly "alternate") stack. The size of that state is very much variable, depending on the CPU. When we chain the signal handler in the sigaction variant of the code in faulthandler, we raise the signal with the existing handler still on the stack, and save a second copy of the CPU state. Finally, when any part of that signal handler has to invoke a function that requires the dynamic linker's intervention to resolve, it will call some form of _dl_runtime_resolve* - likely _dl_runtime_resolve_xsave or _dl_runtime_resolve_xsavec. These functions will also have to save machine state. So, how big is the machine state? Well, it depends on the CPU. On one machine I have access to, /proc/cpuinfo shows "Intel(R) Xeon(R) CPU E5-2640 v4", I have: > (gdb) p _rtld_local_ro._dl_x86_cpu_features.xsave_state_size > $1 = 896 On another machine, reporting as "Intel(R) Xeon(R) Gold 5118 CPU", I have: > (gdb) p _rtld_local_ro._dl_x86_cpu_features.xsave_state_size > $1 = 2560 This means that the required stack space to hold 3 sets of CPU state is over 7.5k. And, for the signal handlers, it's actually worse: more like 3.25k per frame. A chained signal handler that needs to invoke dynamic linking will therefore consume more than the default stack space allocated in faulthandler.c, just in machine-state saves alone. So, the failing test is failing because its scribbling on random memory before the allocated stack space. My guess is that the previous architectures this manifested in have larger stack demands for signal handling than x86_64, but clearly newer x86_64 processors are starting to get tickled by this. Fix is pretty simple - just allocate more stack space. The attached patch uses pthread_attr_getstacksize to find the system's default stack size, and then uses that as the default, and also defines an absolute minimum stack size of 1M. This fixes the issue on our machine with the big xsave state size. (I'm sure I'm getting the feature test macros wrong for testing for pthreads availability) Also, I think in the case of a threaded environment, using the altstack might not be the best choice - I think multiple threads handling signals that run on that stack will wind up stomping on the same memory - is there a strong reason to maintain this altstack behaviour? ---------- keywords: +patch nosy: +peadar Added file: https://bugs.python.org/file48353/sigaltstack-stacksize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:15:42 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 May 2019 16:15:42 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1558714542.5.0.371952246578.issue36511@roundup.psfhosted.org> Steve Dower added the comment: New changeset 51394b8c3d42e6e6d368251ff6f0612495724fc0 by Steve Dower (Paul Monson) in branch 'master': bpo-36511: Ensure error code propagates out of batch files (GH-13529) https://github.com/python/cpython/commit/51394b8c3d42e6e6d368251ff6f0612495724fc0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:20:39 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 24 May 2019 16:20:39 +0000 Subject: [issue33361] readline() + seek() on codecs.EncodedFile breaks next readline() In-Reply-To: <1524704763.78.0.682650639539.issue33361@psf.upfronthosting.co.za> Message-ID: <1558714839.3.0.333350337527.issue33361@roundup.psfhosted.org> Josh Rosenberg added the comment: Possibly related to #8260 ("When I use codecs.open(...) and f.readline() follow up by f.read() return bad result"), which was never fully fixed in that issue, though #32110 ("Make codecs.StreamReader.read() more compatible with read() of other files") may have fixed more (all?) of it. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:25:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 16:25:28 +0000 Subject: [issue32573] All sys attributes (.argv, ...) should exist in embedded environments In-Reply-To: <1516131988.33.0.467229070634.issue32573@psf.upfronthosting.co.za> Message-ID: <1558715128.56.0.3465878127.issue32573@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13464 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:27:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 16:27:16 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558715236.53.0.0748582095725.issue36721@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bc66faccb8a6140e7e07b5e67843b7f21152c144 by Victor Stinner in branch 'master': bpo-36721: Fix pkg-config symbolic links on "make install" (GH-13551) https://github.com/python/cpython/commit/bc66faccb8a6140e7e07b5e67843b7f21152c144 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:35:56 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 24 May 2019 16:35:56 +0000 Subject: [issue36461] timeit: Additional changes for autorange In-Reply-To: <1553766568.14.0.657766350537.issue36461@roundup.psfhosted.org> Message-ID: <1558715756.94.0.557849233099.issue36461@roundup.psfhosted.org> Steven D'Aprano added the comment: Michele, Alessandro, thank you both for your work! And thank you Cheryl for managing this ticket. I like mangrisano's design where the target time is passed as an argument to the ``autorange`` method, although I prefer the name "target_time". (But I'm open to alternatives.) So I think a good approach might be a hybrid between mangrisano's design, and the design by Alessandro: 1. the constructor takes the target time and records it as an attribute; def __init__(self, ..., target_time=default_target_time): self.target_time = target_time 2. when the ``timeit`` method is used, if number=0 the target time is taken from self.target_time and passed to ``autorange``; - if the ``autorange`` method is called directly, the caller can override the target time by passing it as argument; otherwise the default value is looked up from the instance attribute. So something like def autorange(self, callback=None, target_time=None): if target_time is None: target_time = self.target_time ... Please suggest alternatives or point out anything I may have missed, and thank you all again! (I'm now going to be away from the keyboard for at least the next 18 hours so if I don't reply quickly, that's why.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:39:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 16:39:42 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1558715982.78.0.0751869583795.issue21536@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b1fc41784136a2eb9737a7f0c821db52ab8d4dee by Victor Stinner (E. M. Bray) in branch 'master': bpo-21536: Fix configure.ac for LIBPYTHON on Android/Cygwin (GH-13552) https://github.com/python/cpython/commit/b1fc41784136a2eb9737a7f0c821db52ab8d4dee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:48:42 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 May 2019 16:48:42 +0000 Subject: [issue37037] Enable rpath remapping in makefile Message-ID: <1558716522.41.0.382663630669.issue37037@roundup.psfhosted.org> New submission from Steve Dower : I'd like to be able to build libpython and have it already have the install path stripped out so I can use rpath instead. This libpython is going to be distributed with other applications. Right now, I'm running `install_name_tool -id "@rpath/libpython3.7m.dylib" libpython3.7m.dylib` as a post-build step, (and will then have to figure out what breaks next ;) ) It's probably a simple makefile/autoconf update to add an option to run the necessary commands as part of build, but I can't figure it out myself. So I'm hoping someone can help or has already done it and wants to share. ---------- components: Build messages: 343411 nosy: ned.deily, ronaldoussoren, steve.dower, twouters priority: normal severity: normal stage: needs patch status: open title: Enable rpath remapping in makefile type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:49:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 16:49:30 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558716570.09.0.0101334872677.issue36829@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13465 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 12:49:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 16:49:57 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558716597.04.0.657803132217.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: > Could test.support.catch_unraisable_exception also be documented at https://docs.python.org/3/library/test.html#module-test.support ? I wrote PR 13554 to document it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 13:24:46 2019 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 May 2019 17:24:46 +0000 Subject: [issue8138] wsgiref.simple_server.SimpleServer claims to be multithreaded In-Reply-To: <1268590136.32.0.519225445448.issue8138@psf.upfronthosting.co.za> Message-ID: <1558718686.33.0.627038271491.issue8138@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 14738ff83d852c95a0cf33e5c90a85860a9c5620 by Berker Peksag in branch 'master': bpo-8138: Initialize wsgiref's SimpleServer as single-threaded (GH-12977) https://github.com/python/cpython/commit/14738ff83d852c95a0cf33e5c90a85860a9c5620 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 13:25:12 2019 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 May 2019 17:25:12 +0000 Subject: [issue8138] wsgiref.simple_server.SimpleServer claims to be multithreaded In-Reply-To: <1268590136.32.0.519225445448.issue8138@psf.upfronthosting.co.za> Message-ID: <1558718712.68.0.313996870308.issue8138@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 13:27:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 17:27:00 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1558718820.73.0.371108780903.issue36842@roundup.psfhosted.org> STINNER Victor added the comment: It seems like there are reference leaks: https://buildbot.python.org/all/#/builders/1/builds/593 test_audit leaked [310, 310, 310] references, sum=930 test_audit leaked [189, 189, 189] memory blocks, sum=567 You may try test.bisect_cmd to debug this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 13:29:52 2019 From: report at bugs.python.org (Jack) Date: Fri, 24 May 2019 17:29:52 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1558718992.91.0.64118483187.issue27860@roundup.psfhosted.org> Change by Jack : ---------- nosy: +Jacktose _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 13:48:04 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 24 May 2019 17:48:04 +0000 Subject: [issue34651] Disallow fork in a subinterpreter. In-Reply-To: <1536786263.28.0.956365154283.issue34651@psf.upfronthosting.co.za> Message-ID: <1558720084.18.0.90027621663.issue34651@roundup.psfhosted.org> Gregory P. Smith added the comment: I'd start by documenting the limitation and keeping a future feature request of "Allow subprocess to work from subinterpreters". That is doable. Supporting os.fork() is not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 13:53:13 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 May 2019 17:53:13 +0000 Subject: [issue37023] test_gdb failed on AMD64 Debian PGO 3.x In-Reply-To: <1558631798.29.0.597769613412.issue37023@roundup.psfhosted.org> Message-ID: <1558720393.39.0.560683475765.issue37023@roundup.psfhosted.org> Steve Dower added the comment: Okay, fixing the regex isn't an option, as most of the tests (just not the one copy-pasted above) rely on verifying the parameter value. I'll figure out how to skip the test on PGO build instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 13:53:40 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 May 2019 17:53:40 +0000 Subject: [issue37023] test_gdb failed on AMD64 Debian PGO 3.x In-Reply-To: <1558631798.29.0.597769613412.issue37023@roundup.psfhosted.org> Message-ID: <1558720420.25.0.162881390409.issue37023@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +13466 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 13:59:50 2019 From: report at bugs.python.org (Erwan Le Pape) Date: Fri, 24 May 2019 17:59:50 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1558720790.99.0.0906595351193.issue35545@roundup.psfhosted.org> Erwan Le Pape added the comment: I don't have an AIX lying around to test so would you mind just running the test on `getaddrinfo` for AIX. A simple `python3 -c 'import socket; print(socket.getaddrinfo("fe80::1%1", 80))'` should fairly rapidly determine if there is a legitimate reason for the test to fail (ie. this is internal to `asyncio`) or if this is tied to the underlying AIX `getaddrinfo`. The IPv6 Scoped Address Architecture RFC clearly indicates that `%` should be supported although it isn't a must. Hopefully there's a subtlety to `getaddrinfo` on AIX (maybe in the way the zone should be specified, I already had to fallback to numeric interfaces so the test would work on both Linux & Windows, I wouldn't be surprised if AIX had yet another syntax for it). Also, it would be worthwhile to ensure that the patches mentioned by IBM https://www-01.ibm.com/support/docview.wss?uid=isg1IV52116 are applied on the machine running the test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 14:27:57 2019 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 24 May 2019 18:27:57 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1558722477.24.0.824343247159.issue21536@roundup.psfhosted.org> Xavier de Gaye added the comment: FWIW I checked the Android build after those last changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 14:34:23 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 May 2019 18:34:23 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1558722863.85.0.221788761084.issue36842@roundup.psfhosted.org> Steve Dower added the comment: Since hooks can't be removed, it probably looks like a leak when some are added for the tests. I'll update all the tests to run in new processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 15:09:56 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 May 2019 19:09:56 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1558724996.6.0.908281581671.issue36842@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +13467 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 15:23:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 19:23:49 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1558725829.66.0.985965119478.issue21536@roundup.psfhosted.org> STINNER Victor added the comment: > FWIW I checked the Android build after those last changes. Thank you! I was overconfident when I merged the Cygwin which looked good to me, whereas it broke Android :-( Hopefully it was quickly fixed. I hope that everything will be alright for the the beta1 to start from a good milestone! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 15:25:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 19:25:25 +0000 Subject: [issue34651] Disallow fork in a subinterpreter. In-Reply-To: <1536786263.28.0.956365154283.issue34651@psf.upfronthosting.co.za> Message-ID: <1558725925.2.0.650949625634.issue34651@roundup.psfhosted.org> STINNER Victor added the comment: > I'd start by documenting the limitation and keeping a future feature request of "Allow subprocess to work from subinterpreters". That is doable. Supporting os.fork() is not. subprocess is able to use os.posix_spawn() in Python 3.8. In that case, it's not limited by os.fork() check ;-) Windows isn't limited neither, CreateProcess() isn't limited in subinterpreters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:00:11 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 May 2019 20:00:11 +0000 Subject: [issue37023] test_gdb failed on AMD64 Debian PGO 3.x In-Reply-To: <1558631798.29.0.597769613412.issue37023@roundup.psfhosted.org> Message-ID: <1558728011.24.0.766719822689.issue37023@roundup.psfhosted.org> Steve Dower added the comment: New changeset 6de4574c6393b9cf8d7dfb0dc6ce53ee5b9ea841 by Steve Dower in branch 'master': bpo-37023: Skip test_gdb under PGO (GH-13555) https://github.com/python/cpython/commit/6de4574c6393b9cf8d7dfb0dc6ce53ee5b9ea841 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:00:46 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 May 2019 20:00:46 +0000 Subject: [issue37023] test_gdb failed on AMD64 Debian PGO 3.x In-Reply-To: <1558631798.29.0.597769613412.issue37023@roundup.psfhosted.org> Message-ID: <1558728046.24.0.227526692487.issue37023@roundup.psfhosted.org> Steve Dower added the comment: Test is now skipped if PGO was used. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:06:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 20:06:37 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558728397.21.0.394976035089.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: New changeset deffee57749cf29ba17f50f11fb2a8cbc3e3752d by Victor Stinner in branch 'master': bpo-35907: Clarify the NEWS entry (GH-13523) https://github.com/python/cpython/commit/deffee57749cf29ba17f50f11fb2a8cbc3e3752d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:10:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 20:10:41 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558728641.9.0.303001186358.issue35907@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13468 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:15:03 2019 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 24 May 2019 20:15:03 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1558728903.51.0.971379105777.issue2771@roundup.psfhosted.org> Change by Ezio Melotti : ---------- components: +Tests keywords: +easy (C) priority: -> low versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:16:09 2019 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 24 May 2019 20:16:09 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1558728969.89.0.704719353917.issue2771@roundup.psfhosted.org> Change by Ezio Melotti : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:27:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 20:27:15 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558729635.23.0.715208135796.issue35907@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_request: https://github.com/python/cpython/pull/13558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:27:33 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 24 May 2019 20:27:33 +0000 Subject: [issue36985] typing.ForwardRef is undocumented In-Reply-To: <1558416902.0.0.868432422236.issue36985@roundup.psfhosted.org> Message-ID: <1558729653.24.0.868612862878.issue36985@roundup.psfhosted.org> Change by Ivan Levkivskyi : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:31:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 20:31:37 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558729897.0.0.184687852675.issue35907@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_request: https://github.com/python/cpython/pull/13559 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:44:34 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 24 May 2019 20:44:34 +0000 Subject: [issue36969] pdb.do_args: display keyword-only and positional only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558730674.34.0.736263137313.issue36969@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 458560347f5c28e162bb288adfa0cfe5aad79557 by Pablo Galindo (R?mi Lapeyre) in branch 'master': bpo-36969: Make PDB args command display positional only arguments (GH-13459) https://github.com/python/cpython/commit/458560347f5c28e162bb288adfa0cfe5aad79557 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 16:44:57 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 24 May 2019 20:44:57 +0000 Subject: [issue36969] pdb.do_args: display keyword-only and positional only arguments In-Reply-To: <1558306508.25.0.885142931529.issue36969@roundup.psfhosted.org> Message-ID: <1558730697.02.0.584025610872.issue36969@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks R?mi for the PRs! :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 17:06:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 21:06:28 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558731988.54.0.805377588154.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1c9debd2366a21525769aaa99ce334092033a963 by Victor Stinner in branch 'master': bpo-35907: Fix typo in the NEWS entry (GH-13559) https://github.com/python/cpython/commit/1c9debd2366a21525769aaa99ce334092033a963 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 17:09:26 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 24 May 2019 21:09:26 +0000 Subject: [issue37021] Can _random.getrandbits() be converted to METH_FASTCALL? In-Reply-To: <1558628978.37.0.828538752056.issue37021@roundup.psfhosted.org> Message-ID: <1558732166.56.0.590282278036.issue37021@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 561612d8456cfab5672c9b445521113b847bd6b3 by Pablo Galindo in branch 'master': bpo-37021: Port _randommodule to the argument clinic (GH-13532) https://github.com/python/cpython/commit/561612d8456cfab5672c9b445521113b847bd6b3 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 17:09:43 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 24 May 2019 21:09:43 +0000 Subject: [issue37021] Can _random.getrandbits() be converted to METH_FASTCALL? In-Reply-To: <1558628978.37.0.828538752056.issue37021@roundup.psfhosted.org> Message-ID: <1558732183.42.0.439379458556.issue37021@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 17:22:43 2019 From: report at bugs.python.org (Michael Felt) Date: Fri, 24 May 2019 21:22:43 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1558720790.99.0.0906595351193.issue35545@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: On 24/05/2019 19:59, Erwan Le Pape wrote: > python3 -c 'import socket; print(socket.getaddrinfo("fe80::1%1", 80))'` root at x067:[/home/root]python3 -c 'import socket; print(socket.getaddrinfo("fe80::1%1", 80))' [(, , 17, '', ('fe80::1', 80, 0, 0))] I have not yet checked if the patches mentioned are installed. This is a system I am testing PyInstaller, and the python3 version is 3.6.8. OS-Level is: 7100-03-05-1524, but it was built on a different version of AIX. +++++++ This is the system I have the buildbot on: buildbot at x064:[/home/buildbot/aixtools-master]./python Python 3.8.0a4+ (heads/bpo-37009-thread-safe-dirty:b489efab81, May 22 2019, 15:13:31) [GCC 4.7.4] on aix Type "help", "copyright", "credits" or "license" for more information. >>> buildbot at x064:[/home/buildbot/aixtools-master]oslevel -s 7100-04-06-1806 buildbot at x064:[/home/buildbot/aixtools-master] buildbot at x064:[/home/buildbot/aixtools-master]./python -c 'import socket; print(socket.getaddrinfo("fe80::1%1", 80))' [(, , 17, '', ('fe80::1', 80, 0, 0))] +++++ re the patches mentioned. a) not applicable for the systems above - both are AIX 7.1. b) the AIX 6.1 TL7 I build with says: root at x066:[/]instfix -i | grep IV52116 ??? All filesets for IV52116 were found. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 17:25:04 2019 From: report at bugs.python.org (Michael Felt) Date: Fri, 24 May 2019 21:25:04 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1558720790.99.0.0906595351193.issue35545@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: On 24/05/2019 19:59, Erwan Le Pape wrote: > python3 -c 'import socket; print(socket.getaddrinfo("fe80::1%1", 80))'` p.s. I used an actual address: buildbot at x064:[/home/buildbot/aixtools-master]netstat -ni Name? Mtu?? Network???? Address??????????? Ipkts Ierrs??? Opkts Oerrs? Coll en0?? 1500? link#2????? 0.21.5e.a3.c7.44?? 191897???? 0?? 171570???? 0???? 0 en0?? 1500? 192.168.129 192.168.129.64???? 191897???? 0?? 171570???? 0???? 0 en0?? 1500? fe80::221:5eff:fea3:c744?????? 191897???? 0?? 171570???? 0???? 0 en1?? 1500? link#3????? fa.d1.81.81.ac.5?? 147474???? 0??? 80440???? 0???? 0 en1?? 1500? 192.168.2?? 192.168.2.64?????? 147474???? 0??? 80440???? 0???? 0 en1?? 1500? fe80::f8d1:81ff:fe81:ac05%2??? 147474???? 0??? 80440???? 0???? 0 lo0?? 16896 link#1???????????????????????? 184523???? 0?? 184521???? 0???? 0 lo0?? 16896 127???????? 127.0.0.1????????? 184523???? 0?? 184521???? 0???? 0 lo0?? 16896 ::1%1????????????????????????? 184523???? 0?? 184521???? 0???? 0 buildbot at x064:[/home/buildbot/aixtools-master]./python -c 'import socket; print(socket.getaddrinfo("fe80::f8d1:81ff:fe81:ac05%2", 80))' [(, , 17, '', ('fe80::f8d1:81ff:fe81:ac05', 80, 0, 0))] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 17:28:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 21:28:59 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558733339.13.0.583601626688.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d9d1045837e5356331b6d5e24cbd1286acb62b5d by Victor Stinner in branch '2.7': bpo-35907: Clarify the NEWS entry (GH-13557) https://github.com/python/cpython/commit/d9d1045837e5356331b6d5e24cbd1286acb62b5d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 17:29:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 21:29:13 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1558733353.28.0.611307947587.issue35907@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cee4ac8135fe9cf99de4ceca52d1f53e14b69dba by Victor Stinner in branch '3.7': bpo-35907: Clarify the NEWS entry (GH-13558) https://github.com/python/cpython/commit/cee4ac8135fe9cf99de4ceca52d1f53e14b69dba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 17:56:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 May 2019 21:56:19 +0000 Subject: [issue37038] Make idlelib/run.py runnable. Message-ID: <1558734979.99.0.70787522165.issue37038@roundup.psfhosted.org> New submission from Terry J. Reedy : Slightly simplified, pyshell.ModifiedInterpreter.built_subprocess runs f'{sys.executable} -c "__import__('idlelib.run').run.main()"'. "__import__('idlelib.run')" creates sys.modules['idlelib'] from idlelib/__init__.py, creates sys.modules['idlelib.run'] from idlelib/run.py, binds 'run' to the idlelib.run module in the idlelib module, and returns the idlelib module. It does not bind any names in the main module of the new process. '.run' gets the idlelib.run module and '.main()' executes its main function. This eventually executes user code in the so-far untouched main module. During the creation of the idlelib.run module, various other idlelib module are imported. Some of these import both tkinter and its submodules, such as tkinter.font, adding names such as 'font' to the tkinter modules. To prevent user code running when it should not, these added names are deleted. #25507. Once the deletion code is run, it will fail with AttributeError if run again, such as from an IDLE editor. The patch solves this by adding a flag that indicates that the file has already be imported into the process. ---------- assignee: terry.reedy components: IDLE messages: 343433 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Make idlelib/run.py runnable. type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 17:57:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 21:57:26 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558735046.48.0.473568983219.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a9f05d69ccbf3c75cdd604c25094282697789a62 by Victor Stinner in branch 'master': bpo-37032: Add CodeType.replace() method (GH-13542) https://github.com/python/cpython/commit/a9f05d69ccbf3c75cdd604c25094282697789a62 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 18:02:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 22:02:59 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558735379.91.0.891589566099.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: Once Python 3.8 beta1 will be released, it would be interesting to patch all projects that I had to be fixed to handle the new "posonlyargcount" to use the new "replace()" method is available. Maybe even remove the fix for Python 3.8 alpha 4 and only use use replace() on Python 3.8 and newer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 18:09:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 May 2019 22:09:43 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558735783.51.0.0890460454044.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6dbbe748e101a173b4cff8aada41e9313e287e0f by Victor Stinner in branch 'master': bpo-36829: Document test.support.catch_unraisable_exception() (GH-13554) https://github.com/python/cpython/commit/6dbbe748e101a173b4cff8aada41e9313e287e0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 18:16:18 2019 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 24 May 2019 22:16:18 +0000 Subject: [issue36954] test_recursive_repr breaks tracing in test_xml_etree In-Reply-To: <1558142626.27.0.825093654504.issue36954@roundup.psfhosted.org> Message-ID: <1558736178.0.0.19360831656.issue36954@roundup.psfhosted.org> Xavier de Gaye added the comment: @gphemsley Can you please provide the output of running test_xml_etree with tracing. ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 18:19:52 2019 From: report at bugs.python.org (Erwan Le Pape) Date: Fri, 24 May 2019 22:19:52 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1558736392.74.0.828369698293.issue35545@roundup.psfhosted.org> Erwan Le Pape added the comment: Thanks for testing that. It's good that you used an actual address because that eliminates the possibility that AIX doesn't handle addresses it doesn't really know about. On the other hand, even when properly specified to a real scoped IPv6 address, `getaddrinfo` doesn't seem to get the necessary scope ID from the underlying C call which socket.getaddrinfo > _socket.getaddrinfo is pretty much mapped to. I'm looking at cpython/master for the socketmodule implementation: https://github.com/python/cpython/blob/6dbbe748e101a173b4cff8aada41e9313e287e0f/Modules/socketmodule.c#L6400 is `getaddrinfo` https://github.com/python/cpython/blob/master/Modules/socketmodule.c#L1294 is `makesockaddr` which actually creates the 4-tuple returned as the last element of the `getaddrinfo` tuples. The fourth element (ie. the scope ID) is clearly `a->sin6_scope_id` which should contain the scope ID. At this stage, I don't know if this is a bug from the socketmodule which I doubt or if the AIX `getaddrinfo` simply just doesn't handle scoped IP addresses properly. If you're still okay to proxy tests for AIX, I'll try and come up with either a simple C snippet to see what's in the returned structure or ctype the AIX `libc` `getaddrinfo`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 18:33:51 2019 From: report at bugs.python.org (Tim Smith) Date: Fri, 24 May 2019 22:33:51 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1558737231.5.0.326927623819.issue33725@roundup.psfhosted.org> Change by Tim Smith : ---------- nosy: +tdsmith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 19:03:11 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 May 2019 23:03:11 +0000 Subject: [issue37038] Make idlelib/run.py runnable. In-Reply-To: <1558734979.99.0.70787522165.issue37038@roundup.psfhosted.org> Message-ID: <1558738991.63.0.793537744439.issue37038@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +13471 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13560 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 19:56:51 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 May 2019 23:56:51 +0000 Subject: [issue37037] Enable rpath remapping in makefile In-Reply-To: <1558716522.41.0.382663630669.issue37037@roundup.psfhosted.org> Message-ID: <1558742211.7.0.0477002314289.issue37037@roundup.psfhosted.org> Ned Deily added the comment: For macOS, if I understand correctly what you want to do, the way to avoid using "install_name_tool" to modify the id name of the libpython* dynamic shared library is to pass the desired name to the link step when building the shared library using ld's "-install_name" option. For macOS, the Makefile rule that builds the shared lib is the one labeled libpython$(LDVERSION).dylib. If you also need to build a working python executable that uses that shared library, you will want to pass the proper rpath command into the link step of python itself which happens in the $(BUILDPYTHON) Makefile rule. On macOS there are three main variants when building core python: 1. static library, 2. shared library, 3. framework (macOS-only). The most common variant for a full Python installation is a framework build. When building bits intended for embedding, in theory either the "shared library" or the "framework" variants should work but, to keep things simpler, let's just stick to "shared library". If so, it looks like it is possible to configure the build properly by just using existing configuration variables. The keys are: - use LDFLAGS_NODIST to pass in the library install name (note that the option here will also get passed to the link step for the python executable but the value is ignored if the output of the link is not a shared library) - use LINKFORSHARED to pass in the desired runtime rpath value to the build of the executable. Putting it all together, a simplified build might be: LDFLAGS_NODIST='-Wl,-install_name, at rpath/libpython3.8.dylib' \ LINKFORSHARED="-framework CoreFoundation -Wl,-rpath, at loader_path/../lib" \ ./configure --enable-shared --prefix=/path/to/installed/location make -j3 make install Note "-framework CoreFoundation" is a default value for "LINKFORSHARED" on macOS and should be included in the overridden value. You can verify that the expected shared libraries are being used at run time by enabling some debugging info in the dynamic loader: DYLD_PRINT_LIBRARIES= /path/to/installed/location/python3 Obviously, this is a simplified configuration. The macOS dynamic loader has a number of options for specifying library paths; some of the options differ from those available in other unix-y systems. The following macOS man pages have more details: dyld (in particular, the DYNAMIC LIBRARY LOADING section which explains @executable_path, @loader_path, and @rpath options), install_name_tool, ld, cc. Let me know if the above is what you were looking for. P.S. One gotcha that may show up during development building and testing with "--enable-shared" is that when trying to run the interpreter from the build directory you will need to use runtime env variables to give the path to the (uninstalled) shared python library. If you don't, you will either get a segfault or, worse, the newly-built executable may run with a previously installed library. $ ./python # or ./python.exe depending on file system type dyld: Library not loaded: /tmp/l/lib/libpython3.8.dylib Referenced from: /Users/nad/Projects/PyDev/active/dev/3x/source/./python Reason: image not found Abort trap: 6 $ DYLD_LIBRARY_PATH=$(pwd) ./python Python 3.8.0a4+ (heads/master:6de4574c63, May 24 2019, 19:45:27) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin [...] That's one reason I recommend avoiding --enable-shared when possible, especially on macOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 19:59:09 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 24 May 2019 23:59:09 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558742349.7.0.357429104032.issue34632@roundup.psfhosted.org> Barry A. Warsaw added the comment: New changeset 1bbf7b661f0ac8aac12d5531928d9a85c98ec1a9 by Barry Warsaw (Jason R. Coombs) in branch 'master': bpo-34632: Add importlib.metadata (GH-12547) https://github.com/python/cpython/commit/1bbf7b661f0ac8aac12d5531928d9a85c98ec1a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 19:59:46 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 24 May 2019 23:59:46 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558742386.01.0.831461078125.issue34632@roundup.psfhosted.org> Barry A. Warsaw added the comment: Thanks @jaraco! This is now merged into 3.8. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 20:00:16 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 25 May 2019 00:00:16 +0000 Subject: [issue37037] Enable rpath remapping in makefile In-Reply-To: <1558716522.41.0.382663630669.issue37037@roundup.psfhosted.org> Message-ID: <1558742416.12.0.876084346201.issue37037@roundup.psfhosted.org> Ned Deily added the comment: Correction: DYLD_PRINT_LIBRARIES= /path/to/installed/location/python3 should be DYLD_PRINT_LIBRARIES= /path/to/installed/location/bin/python3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 20:28:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 May 2019 00:28:19 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558744099.8.0.678228937481.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: I rewrote my PR 13515: * threading.excepthook() now gets a single argument which has multiple attributes: (exc_type, exc_value, exc_traceback, thread) * The default threading.excepthook() implementation in written in C which reduces the risk of missing symbol during Python shutdown. There is also a simple implementation in Python, for other Python implementations which don't want to implement _thread._excepthook() in C. * New _make_invoke_excepthook() function which handles the gory details for daemon threads. It creates a "local namespace" with references to all required functons and creates a _invoke_excepthook() function. * _invoke_excepthook() packs arguments as a C structseq / Python namedtuple (depending on the implementation), calls threading.excepthook(). If threading.excepthook() raises an exception, sys.excepthook() is called to handle it. -- First I also added a "stderr" argument to the arguments passed to threading.excepthook(): sys.stderr, or an old copy of sys.stderr if sys.stderr no longer exists or is set to None. But I decided to keep this as an implementation detail instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 20:30:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 May 2019 00:30:51 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558744251.38.0.847904499005.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: If you want to reuse sys.excepthook to handle uncaught Thread.run() exception, you can now write: --- def hook(args): if args.exc_type == SystemExit: return sys.excepthook(args.exc_type, args.exc_value, args.exc_traceback) threading.excepthook = hook --- Try attached sys_threading_excepthook.py for a full example. ---------- Added file: https://bugs.python.org/file48354/sys_threading_excepthook.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 20:35:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 May 2019 00:35:21 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558744521.01.0.41234756665.issue34632@roundup.psfhosted.org> STINNER Victor added the comment: Unhappy buildbot: AMD64 Fedora Rawhide Clang Installed 3.x https://buildbot.python.org/all/#/builders/188/builds/302 Example: 0:00:28 load avg: 4.02 [182/422/1] test_importlib failed Failed to import test module: test.test_importlib.test_main Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.8/unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.8/test/test_importlib/test_main.py", line 6, in import importlib.metadata ModuleNotFoundError: No module named 'importlib.metadata' ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 20:39:37 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 25 May 2019 00:39:37 +0000 Subject: [issue37037] Enable rpath remapping in makefile In-Reply-To: <1558716522.41.0.382663630669.issue37037@roundup.psfhosted.org> Message-ID: <1558744777.51.0.343726970159.issue37037@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg343442 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 20:39:45 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 25 May 2019 00:39:45 +0000 Subject: [issue37037] Enable rpath remapping in makefile In-Reply-To: <1558716522.41.0.382663630669.issue37037@roundup.psfhosted.org> Message-ID: <1558744785.98.0.864660780687.issue37037@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg343439 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 20:41:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 May 2019 00:41:10 +0000 Subject: [issue36940] Update Py_FrozenMain() for _PyCoreConfig (PEP 587) In-Reply-To: <1558020377.53.0.622883687871.issue36940@roundup.psfhosted.org> Message-ID: <1558744870.99.0.704861704665.issue36940@roundup.psfhosted.org> STINNER Victor added the comment: Another file which should maybe also be updated to PEP 587, PC/bdist_wininst/install.c: static int compile_filelist(HINSTANCE hPython, BOOL optimize_flag) { DECLPROC(hPython, void, Py_Initialize, (void)); DECLPROC(hPython, void, Py_SetProgramName, (wchar_t *)); DECLPROC(hPython, void, Py_Finalize, (void)); DECLPROC(hPython, int, PyRun_SimpleString, (char *)); DECLPROC(hPython, PyObject *, PySys_GetObject, (char *)); DECLVAR(hPython, int, Py_OptimizeFlag); int errors = 0; struct tagFile *p = file_list; if (!p) return 0; if (!Py_Initialize || !Py_SetProgramName || !Py_Finalize) return -1; if (!PyRun_SimpleString || !PySys_GetObject || !Py_OptimizeFlag) return -1; *Py_OptimizeFlag = optimize_flag ? 1 : 0; Py_SetProgramName(wmodulename); Py_Initialize(); errors += do_compile_files(PyRun_SimpleString, optimize_flag); Py_Finalize(); return errors; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 20:49:35 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 25 May 2019 00:49:35 +0000 Subject: [issue37037] Enable rpath remapping in makefile In-Reply-To: <1558716522.41.0.382663630669.issue37037@roundup.psfhosted.org> Message-ID: <1558745375.84.0.964700619106.issue37037@roundup.psfhosted.org> Ned Deily added the comment: (Sorry, my original answer was great except it didn't actually work. Revisiting.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 21:15:52 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 25 May 2019 01:15:52 +0000 Subject: [issue37039] IDLE: Zoomheight restores to default, not previous size Message-ID: <1558746952.08.0.659874103441.issue37039@roundup.psfhosted.org> New submission from Terry J. Reedy : On both Windows and Mac ---------- messages: 343448 nosy: cheryl.sabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Zoomheight restores to default, not previous size type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 21:16:24 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 25 May 2019 01:16:24 +0000 Subject: [issue37039] IDLE: Zoomheight restores to default, not previous size Message-ID: <1558746984.04.0.605978254424.issue37039@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg343448 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 21:59:57 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 25 May 2019 01:59:57 +0000 Subject: [issue37038] Make idlelib/run.py runnable. In-Reply-To: <1558734979.99.0.70787522165.issue37038@roundup.psfhosted.org> Message-ID: <1558749597.56.0.0435234122495.issue37038@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 81bb97df6138c755e229dcdac9bed747e31b61b3 by Terry Jan Reedy in branch 'master': bpo-37038: Make idlelib.run runnable; add test clause (GH-13560) https://github.com/python/cpython/commit/81bb97df6138c755e229dcdac9bed747e31b61b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 22:04:46 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 25 May 2019 02:04:46 +0000 Subject: [issue37039] IDLE: Zoom Height Restore restores to default, not previous size Message-ID: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> New submission from Terry J. Reedy : Restore Height restores to default, not previous size. This is a bit surprising, but is documented. "Toggles the window between normal size and maximum height. The initial size defaults to 40 lines by 80 chars unless changed on the General tab of the Configure IDLE dialog." AFAIK, this has always been the case. The switch from 'normal size' to 'initial size' might make this a little less clear than sticking to 'normal'. Also, only height, not width is relevant. It could be noted that 'normal' != 'previous'. This entry is above the code context entry in the doc, but the changed menu entry is below the code context menu entry (at my request, I believe). Both were moved from the Window menu in #22703. The doc entry needs to be moved down. Side note: this is an example of where a popup menu hint would be helpful. I will make a PR. ---------- assignee: -> terry.reedy components: +IDLE stage: -> needs patch title: IDLE: Zoomheight restores to default, not previous size -> IDLE: Zoom Height Restore restores to default, not previous size versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 22:18:32 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 25 May 2019 02:18:32 +0000 Subject: [issue37038] Make idlelib/run.py runnable. In-Reply-To: <1558734979.99.0.70787522165.issue37038@roundup.psfhosted.org> Message-ID: <1558750712.84.0.0348492896828.issue37038@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13472 pull_request: https://github.com/python/cpython/pull/13561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 24 23:03:39 2019 From: report at bugs.python.org (Michael Blahay) Date: Sat, 25 May 2019 03:03:39 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1558753419.74.0.928017172121.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: PR 13203 is still waiting for merge ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 00:22:05 2019 From: report at bugs.python.org (Dan Rose) Date: Sat, 25 May 2019 04:22:05 +0000 Subject: [issue37040] checking for membership in itertools.count enters infinite loop with no way to exit Message-ID: <1558758125.27.0.730728069526.issue37040@roundup.psfhosted.org> New submission from Dan Rose : Checking membership in `itertools.count()` will either return True in linear time or enter an infinite loop that cannot be terminated with Ctrl-c. This ``` import itertools 1 in itertools.count(0,2) ``` It is expected that the above code will use an efficient (O(1)) membership algorithm like range objects. ---------- components: Library (Lib) messages: 343452 nosy: Dan Rose priority: normal severity: normal status: open title: checking for membership in itertools.count enters infinite loop with no way to exit versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 01:10:14 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 25 May 2019 05:10:14 +0000 Subject: [issue37038] Make idlelib/run.py runnable. In-Reply-To: <1558734979.99.0.70787522165.issue37038@roundup.psfhosted.org> Message-ID: <1558761014.0.0.142006263382.issue37038@roundup.psfhosted.org> miss-islington added the comment: New changeset c70ab1cca0f43dbf3bad4acacd06a792cdbe03c8 by Miss Islington (bot) in branch '3.7': bpo-37038: Make idlelib.run runnable; add test clause (GH-13560) https://github.com/python/cpython/commit/c70ab1cca0f43dbf3bad4acacd06a792cdbe03c8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 01:40:53 2019 From: report at bugs.python.org (Alessandro Cucci) Date: Sat, 25 May 2019 05:40:53 +0000 Subject: [issue36461] timeit: Additional changes for autorange In-Reply-To: <1553766568.14.0.657766350537.issue36461@roundup.psfhosted.org> Message-ID: <1558762853.33.0.966475323893.issue36461@roundup.psfhosted.org> Alessandro Cucci added the comment: Thanks Steven, I like the new name "target_time". Just a question: why we need to check ``if number == 0:``? In the proposal you asked for None too. What changed? Even if the function is called with False, will it hurts to keep the default value? I'll try to implement your ideas during this weekend. ---------- nosy: +acucci -Alessandro Cucci _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 02:31:24 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 25 May 2019 06:31:24 +0000 Subject: [issue36996] unittest.mock.patch decorator doesn't work with async functions In-Reply-To: <1558452128.6.0.303675531512.issue36996@roundup.psfhosted.org> Message-ID: <1558765884.75.0.0518319732836.issue36996@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13473 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 02:33:08 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 25 May 2019 06:33:08 +0000 Subject: [issue37040] checking for membership in itertools.count enters infinite loop with no way to exit In-Reply-To: <1558758125.27.0.730728069526.issue37040@roundup.psfhosted.org> Message-ID: <1558765988.82.0.779203804403.issue37040@roundup.psfhosted.org> SilentGhost added the comment: This seem like a misdirected expectation. count returns a regular iterator and the purpose behind it is not to enable membership checks, this only works because it's a regular iterators and normal rules for checking membership are applied. In any case, it is possible to write an infinite loop in Python either by accident or intentionally, this doesn't seem like a reasonable rationale for making this sort changes. ---------- nosy: +SilentGhost, rhettinger resolution: -> rejected stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 03:22:27 2019 From: report at bugs.python.org (Big Stone) Date: Sat, 25 May 2019 07:22:27 +0000 Subject: [issue35360] Update SQLite to 3.26 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1558768947.19.0.84710594627.issue35360@roundup.psfhosted.org> Big Stone added the comment: any hope to have a SQLite refresh in Python-3.8.0b1 for Windows/Mac ? It's generally the ideal / less annoying moment to do so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 03:51:34 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 25 May 2019 07:51:34 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558770694.36.0.211327561852.issue34632@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- pull_requests: +13474 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/13563 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 03:53:21 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 25 May 2019 07:53:21 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558770801.94.0.815184386181.issue34632@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: I got the same ModuleNotFoundError on Arch Linux and https://github.com/python/cpython/pull/13563 fixes it. I believe it can fix the issue on Fedora buildbots, too. ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 04:07:37 2019 From: report at bugs.python.org (Martin Panter) Date: Sat, 25 May 2019 08:07:37 +0000 Subject: [issue37040] checking for membership in itertools.count enters infinite loop with no way to exit In-Reply-To: <1558758125.27.0.730728069526.issue37040@roundup.psfhosted.org> Message-ID: <1558771657.15.0.555987771689.issue37040@roundup.psfhosted.org> Martin Panter added the comment: Problems with long-running iterators are already discussed in: Issue 31815: rejected proposal to check for interrupts Issue 33939: proposal to flag iterators as being infinite ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 04:08:47 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 25 May 2019 08:08:47 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558771727.45.0.247217609641.issue34632@roundup.psfhosted.org> Jason R. Coombs added the comment: I started trying to replicate the failure. I got as far as this Dockerfile: ``` FROM fedora:rawhide RUN yum install -y clang make git RUN git clone https://github.com/python/cpython WORKDIR cpython RUN ./configure RUN make ``` And then running `./python Tools/scripts/run_tests.py test_importlib`, but the tests fail due to zlib not being installed. Sounds like yan12125 has the fix, so I'm shelving my investigation. ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 04:09:43 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 25 May 2019 08:09:43 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558771783.98.0.179906299245.issue34632@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset c3738cfe63b1f2c1dc4a28d0ff9adb4e9e3aae1f by Jason R. Coombs (Chih-Hsuan Yen) in branch 'master': bpo-34632: fix installation of importlib.metadata (#13563) https://github.com/python/cpython/commit/c3738cfe63b1f2c1dc4a28d0ff9adb4e9e3aae1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 04:25:08 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 25 May 2019 08:25:08 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558772708.63.0.880285337446.issue34632@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: Oops apparently my fix is incomplete. From the builder "AMD64 Fedora Rawhide Clang Installed 3.x" [1]: ModuleNotFoundError: No module named 'test.test_importlib.data' [1] https://buildbot.python.org/all/api/v2/logs/824407/raw ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 04:27:55 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 25 May 2019 08:27:55 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558772875.14.0.230356397398.issue34632@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: By the way, I think Python.framework is not needed? https://github.com/python/cpython/commit/1bbf7b661f0ac8aac12d5531928d9a85c98ec1a9#diff-206dc381e448d5121da9a6040a2b13c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 05:35:57 2019 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 25 May 2019 09:35:57 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558776957.01.0.603040755959.issue37011@roundup.psfhosted.org> Xavier de Gaye added the comment: > While typically pdb is not used in tests, it is just good practice, given that there can only be a single trace function. IMO invoking "good practice" is not sufficient to motivate such a change. The proposed change is not backward compatible. A common use case for pdb is to insert a so-called hard breakpoint (import pdb; pdb.set_trace()) line in existing code. In that case the proposed change builds an implicit stack of trace functions that is increased each time the interpreter executes this hard breakpoint (when set in a loop or in a function invoked multiple times for example). When the user hits the 'continue' pdb command, then pdb stops at the next function call if the hard breakpoint has been hit more than once instead of leaving the pdb session for good as it does currently. ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 06:01:50 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 25 May 2019 10:01:50 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558778510.93.0.0228857316287.issue34632@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- pull_requests: +13475 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/13565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 06:07:52 2019 From: report at bugs.python.org (Michael Felt) Date: Sat, 25 May 2019 10:07:52 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1558736392.74.0.828369698293.issue35545@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: No problem with trying out your tests. Sent from my iPhone > On 25 May 2019, at 00:19, Erwan Le Pape wrote: > > > Erwan Le Pape added the comment: > > Thanks for testing that. It's good that you used an actual address because that eliminates the possibility that AIX doesn't handle addresses it doesn't really know about. > > On the other hand, even when properly specified to a real scoped IPv6 address, `getaddrinfo` doesn't seem to get the necessary scope ID from the underlying C call which socket.getaddrinfo > _socket.getaddrinfo is pretty much mapped to. > > I'm looking at cpython/master for the socketmodule implementation: > https://github.com/python/cpython/blob/6dbbe748e101a173b4cff8aada41e9313e287e0f/Modules/socketmodule.c#L6400 is `getaddrinfo` > https://github.com/python/cpython/blob/master/Modules/socketmodule.c#L1294 is `makesockaddr` which actually creates the 4-tuple returned as the last element of the `getaddrinfo` tuples. > The fourth element (ie. the scope ID) is clearly `a->sin6_scope_id` which should contain the scope ID. > > At this stage, I don't know if this is a bug from the socketmodule which I doubt or if the AIX `getaddrinfo` simply just doesn't handle scoped IP addresses properly. > > If you're still okay to proxy tests for AIX, I'll try and come up with either a simple C snippet to see what's in the returned structure or ctype the AIX `libc` `getaddrinfo`. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 06:24:58 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 25 May 2019 10:24:58 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558779898.31.0.895166635078.issue34632@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: I managed to create a setup similar to the buildbot builder "AMD64 Fedora Rawhide Clang Installed 3.x" [1] on Arch Linux. Running test_importlib on an installed CPython copy is fine now: $ /usr/bin/python3.8 -m test.regrtest test_importlib Run tests sequentially 0:00:00 load avg: 0.14 [1/1] test_importlib == Tests result: SUCCESS == 1 test OK. Total duration: 1 sec 288 ms Tests result: SUCCESS I apologize for not checking things carefully and misunderstanding the issue on "AMD64 Fedora Rawhide Clang Installed 3.x". [1] https://github.com/python/buildmaster-config/blob/master/master/custom/factories.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 06:26:20 2019 From: report at bugs.python.org (Andre Roberge) Date: Sat, 25 May 2019 10:26:20 +0000 Subject: [issue37041] IDLE: path browser unusable on some displays Message-ID: <1558779980.36.0.709549198107.issue37041@roundup.psfhosted.org> New submission from Andre Roberge : On my computer (Windows 10, screen resolution 3000 x 2000, scaling of text and other elements set at 200% as the recommended value), the path browser is essentially unusable as the items overlap each other. See the attached image. I found that changing the following: def draw(self, x, y): # XXX This hard-codes too many geometry constants! dy = 40 # changed from 20 in tree.py solved the problem. ---------- files: path_browser_problem.png messages: 343466 nosy: aroberge, terry.reedy priority: normal severity: normal status: open title: IDLE: path browser unusable on some displays Added file: https://bugs.python.org/file48355/path_browser_problem.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 06:33:32 2019 From: report at bugs.python.org (daniel hahler) Date: Sat, 25 May 2019 10:33:32 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558780412.18.0.855874669943.issue37011@roundup.psfhosted.org> daniel hahler added the comment: > In that case the proposed change builds an implicit stack of trace functions that is increased each time the interpreter executes this hard breakpoint Very valid and good point. Would it work to store it on the class then (once)? FWIW: pdbpp uses a global Pdb instance - mainly to support the use case of hard breakpoints like this (to remember/re-use its configuration then). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 07:08:30 2019 From: report at bugs.python.org (Andre Roberge) Date: Sat, 25 May 2019 11:08:30 +0000 Subject: [issue37039] IDLE: Zoom Height Restore restores to default, not previous size In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558782510.36.0.386381163987.issue37039@roundup.psfhosted.org> Andre Roberge added the comment: As reported on the idle-dev list, on my system (Windows 10, display resolution 3200 x 200, scaling of text at 200% as recommended), the Zoom Height changes the height of the window and Idle's status bar is no longer visible. Clicking on Restore Height does nothing: Idle's window does not return to the default (the size it had when it was open); it stays the same with the status bar either hidden behind the task bar. ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 07:27:44 2019 From: report at bugs.python.org (Andre Roberge) Date: Sat, 25 May 2019 11:27:44 +0000 Subject: [issue37039] IDLE: Zoom Height Restore restores to default, not previous size In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558783664.2.0.963710898427.issue37039@roundup.psfhosted.org> Andre Roberge added the comment: I have tried on another computer (Windows 10, screen resolution 1920 x 1080, text scaling 100%) and it works as expected: clicking on Restore Height restores the window's height to its original value. Back to the computer where I reported the problem: changing the scaling from 200% to 100% (which makes everything nearly unreadable) does not solve the problem. Both tests were done with Python 3.7.3 (32 bit). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 08:09:54 2019 From: report at bugs.python.org (ixje) Date: Sat, 25 May 2019 12:09:54 +0000 Subject: [issue37042] wait_for(coro, timeout=0) memleak Message-ID: <1558786194.92.0.150909296511.issue37042@roundup.psfhosted.org> New submission from ixje : I have a networked process that looks somewhat like this in its most basic form ``` import asyncio shutting_down = False async def read_message(reader, timeout=30): async def _read(reader: asyncio.StreamReader): try: d = await reader.readexactly(24) # do something with the data print("I'm never called") except: return None try: return await asyncio.wait_for(_read(reader), timeout) except Exception: return None async def my_service(): reader, writer = await asyncio.open_connection('127.0.0.1', 20333) while not shutting_down: m = await read_message(reader, timeout=0) if m is None: continue # else process message if __name__ == "__main__": loop = asyncio.get_event_loop() loop.create_task(my_service()) loop.run_forever() ``` read_message() has a default timeout of 30, but I thought setting it to 0 (instead of None) would be equal to blocking. This bleeds 16GB of memory in ~3 minutes. A minimal example is provided. I manually applied the patch of https://bugs.python.org/issue36613 to a self compiled build of 3.7.3 (https://github.com/python/cpython/commit/ef4ec6ed12d6c6200a85068f60483723298b6ff4) on Ubuntu 18.04 and that did not solve the problem. ---------- components: asyncio files: test_leak_minimal.py messages: 343470 nosy: asvetlov, ixje, yselivanov priority: normal severity: normal status: open title: wait_for(coro, timeout=0) memleak type: resource usage versions: Python 3.7 Added file: https://bugs.python.org/file48356/test_leak_minimal.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 08:13:36 2019 From: report at bugs.python.org (Inada Naoki) Date: Sat, 25 May 2019 12:13:36 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558786416.11.0.634613164703.issue27987@roundup.psfhosted.org> Inada Naoki added the comment: New changeset ea2b76bdc5f97f49701213d105b8ec2387ea2fa5 by Inada Naoki in branch '3.7': bpo-27987: align PyGC_Head to alignof(long double) (GH-13335) https://github.com/python/cpython/commit/ea2b76bdc5f97f49701213d105b8ec2387ea2fa5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 08:13:59 2019 From: report at bugs.python.org (Inada Naoki) Date: Sat, 25 May 2019 12:13:59 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558786439.21.0.915131319407.issue27987@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 08:19:50 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 25 May 2019 12:19:50 +0000 Subject: [issue37042] wait_for(coro, timeout=0) memleak In-Reply-To: <1558786194.92.0.150909296511.issue37042@roundup.psfhosted.org> Message-ID: <1558786790.31.0.489536161312.issue37042@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks for the report. If the problem is in asyncio.wait_for() function the real network code can be stripped for the leakage example and replaced with `await asyncio.sleep()`. Would you try to boil down the snippet by converting it into a code that I can execute on my laptop to reproduce the problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 08:22:12 2019 From: report at bugs.python.org (ixje) Date: Sat, 25 May 2019 12:22:12 +0000 Subject: [issue37042] wait_for(coro, timeout=0) memleak In-Reply-To: <1558786194.92.0.150909296511.issue37042@roundup.psfhosted.org> Message-ID: <1558786932.24.0.508409097397.issue37042@roundup.psfhosted.org> ixje added the comment: Hi Andrew, There is an attached minimal example (that differs from the code given in the first comment). I couldn't attach 2 files. So I pasted the code of one file to showcase how we could run into the issue, then a minimal reproducible example without network code in the attachment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 08:25:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 May 2019 12:25:21 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558787121.93.0.780454433791.issue1230540@roundup.psfhosted.org> Serhiy Storchaka added the comment: I propose to add the Thead.excepthook() method with the signature compatible with sys.excepthook(). This will allow to set easily per-thread hooks and a global hook. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 08:25:31 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 25 May 2019 12:25:31 +0000 Subject: [issue37042] wait_for(coro, timeout=0) memleak In-Reply-To: <1558786194.92.0.150909296511.issue37042@roundup.psfhosted.org> Message-ID: <1558787131.75.0.733314287262.issue37042@roundup.psfhosted.org> Andrew Svetlov added the comment: Nice, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 08:26:15 2019 From: report at bugs.python.org (ixje) Date: Sat, 25 May 2019 12:26:15 +0000 Subject: [issue37042] wait_for(coro, timeout=0) memleak In-Reply-To: <1558786194.92.0.150909296511.issue37042@roundup.psfhosted.org> Message-ID: <1558787175.63.0.636390822307.issue37042@roundup.psfhosted.org> ixje added the comment: This is the consumption I'm seeing. ---------- Added file: https://bugs.python.org/file48357/test_leak_minimal_mem_consumption.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 08:34:53 2019 From: report at bugs.python.org (ixje) Date: Sat, 25 May 2019 12:34:53 +0000 Subject: [issue37042] wait_for(coro, timeout=0) memleak In-Reply-To: <1558786194.92.0.150909296511.issue37042@roundup.psfhosted.org> Message-ID: <1558787693.13.0.948925207423.issue37042@roundup.psfhosted.org> ixje added the comment: Perhaps also worth mentioning is that when we supply None as timeout value in the `wait_for()` in the minimal sample, then it still reports 60MB memory usage. Seems pretty steep for doing basically nothing but looping around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 09:14:10 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 25 May 2019 13:14:10 +0000 Subject: [issue37043] Buildbots fail when new files are added Message-ID: <1558790050.59.0.505947951024.issue37043@roundup.psfhosted.org> New submission from Jason R. Coombs : As [reported here](https://bugs.python.org/issue34632#msg343445), I submitted a pull request that passed all tests locally and in CI, but when accepted, build bots started to fail as a result of new files having been added to the project. It seems it's necessary in Makefile.pre.in to duplicate the git manifest to declare those directories... but only for buildbot builds. I don't fully understand why that is the case, but it would be nicer if there were protections from this footgun, especially since this issue may manifest several times in the same PR. I can think of some ways to prevent this undesirable behavior: - Include buildbot builds in the GitHub merge request checks. - Add a GitHub bot that checks merge requests that create directories and alert the review of directories created if Makefile.pre.in doesn't include changes reflecting those directories. - Remove the reliance on a separate directory listing in Makefile.pre.in. ---------- components: Tests messages: 343478 nosy: jaraco priority: normal severity: normal status: open title: Buildbots fail when new files are added versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 09:42:01 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 25 May 2019 13:42:01 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558791721.53.0.591383474536.issue34632@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +13476 pull_request: https://github.com/python/cpython/pull/13566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 09:58:32 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 25 May 2019 13:58:32 +0000 Subject: [issue37044] Build/test artifacts not ignored for framework build Message-ID: <1558792712.2.0.796235844945.issue37044@roundup.psfhosted.org> New submission from Jason R. Coombs : When developing on macOS, after some build/test operations (I'm not sure exactly which, but seemingly relating to a framework build), artifacts are generated which aren't ignored. As a result, it's easy for them to leak into a merge request as they did with GH-12547 (issue34632). For example: ``` cpython master $ ./configure --enable-framework=/Users/jaraco/Library/Frameworks && make ... cpython master $ git status On branch master Your branch is up to date with 'origin/master'. Untracked files: (use "git add ..." to include in what will be committed) Mac/Resources/app/Info.plist Mac/Resources/framework/Info.plist Python.framework/Python Python.framework/Versions/ nothing added to commit but untracked files present (use "git add" to track) ``` (also Python.framework/Resources/, except that's in the repo at the moment, the reason for reporting this issue) Is there not a reason to ignore these artifacts so they don't risk being added to the commit? ---------- components: macOS messages: 343479 nosy: jaraco, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Build/test artifacts not ignored for framework build type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 09:59:46 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 25 May 2019 13:59:46 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558792786.42.0.983532645244.issue34632@roundup.psfhosted.org> Jason R. Coombs added the comment: > By the way, I think Python.framework is not needed? Correct. That was an artifact that I unintentionally added. I've submitted https://github.com/python/cpython/pull/13566 to address the two concerns. I've also opened issue37043 and issue37044 to address the causes of these emergent failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 10:00:29 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 25 May 2019 14:00:29 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558792829.04.0.678038949323.issue34632@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset f7fba6cfb62edfc22e9b2e12a00ebaf5f348398e by Jason R. Coombs in branch 'master': bpo-34632 fix buildbots and remove artifact (GH-13566) https://github.com/python/cpython/commit/f7fba6cfb62edfc22e9b2e12a00ebaf5f348398e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 10:08:41 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 25 May 2019 14:08:41 +0000 Subject: [issue37043] Buildbots fail when new files are added In-Reply-To: <1558790050.59.0.505947951024.issue37043@roundup.psfhosted.org> Message-ID: <1558793321.61.0.103353229511.issue37043@roundup.psfhosted.org> Jason R. Coombs added the comment: In GH-13565, @yan12125 provides [this reference](https://github.com/python/buildmaster-config/blob/master/master/custom/factories.py) to the buildbot code that copies the code and thus imposes the requirement to declare source directories. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 10:10:49 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 25 May 2019 14:10:49 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1558793449.61.0.561671642661.issue34632@roundup.psfhosted.org> Jason R. Coombs added the comment: I believe buildbots are fixed. Please re-open if you find otherwise. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 10:20:05 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 25 May 2019 14:20:05 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1558794005.27.0.177682271898.issue26836@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +13477 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13567 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 10:23:25 2019 From: report at bugs.python.org (Michele Angrisano) Date: Sat, 25 May 2019 14:23:25 +0000 Subject: [issue36461] timeit: Additional changes for autorange In-Reply-To: <1553766568.14.0.657766350537.issue36461@roundup.psfhosted.org> Message-ID: <1558794205.6.0.228736829006.issue36461@roundup.psfhosted.org> Michele Angrisano added the comment: I agree with *target_time*. I'm working on it and soon I'm going to update the pr. ---------- nosy: +mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 10:32:32 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 25 May 2019 14:32:32 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1558794752.67.0.981642609627.issue26836@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 10:53:00 2019 From: report at bugs.python.org (daniel hahler) Date: Sat, 25 May 2019 14:53:00 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558795980.52.0.359580183744.issue37011@roundup.psfhosted.org> daniel hahler added the comment: I've just found that I've created an issue with regard to `do_debug` for this already (https://bugs.python.org/issue36388), and a PR: https://github.com/python/cpython/pull/12479. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 11:20:23 2019 From: report at bugs.python.org (Dan Rose) Date: Sat, 25 May 2019 15:20:23 +0000 Subject: [issue37040] checking for membership in itertools.count enters infinite loop with no way to exit In-Reply-To: <1558758125.27.0.730728069526.issue37040@roundup.psfhosted.org> Message-ID: <1558797623.2.0.90467226814.issue37040@roundup.psfhosted.org> Dan Rose added the comment: Reopening. While my behavioral expectation may be wrong, the current behavior is inappropriate. It would make more sense for count to have a `__contains__` method which raises a TypeError. ---------- resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 11:34:09 2019 From: report at bugs.python.org (Zachary Ware) Date: Sat, 25 May 2019 15:34:09 +0000 Subject: [issue37043] Buildbots fail when new files are added In-Reply-To: <1558790050.59.0.505947951024.issue37043@roundup.psfhosted.org> Message-ID: <1558798449.22.0.982545921149.issue37043@roundup.psfhosted.org> Zachary Ware added the comment: The issue here is not with buildbots, but with installation on POSIX platforms. We do now have a couple of buildbots that install Python to a local location before running the tests, which is what flushes this out (see https://github.com/python/buildmaster-config/blob/master/master/custom/factories.py#L134-L147; they simply run `make install` before running the tests). Adding these buildbots as pre-merge CI is not currently an option due to security implications (I don't want unreviewed code running on my home network). I have plans to eventually allow certain builders to be run pre-merge iff the `awaiting merge` label is present on the PR, but I haven't had time to work on that yet. It might be possible to adjust one of the Travis builds to install before running tests, but that leaves some other tests un-run, which just relocates the problem. Removing reliance on an explicit listing of directories sounds nice, but does open up the possibility of installing more than expected if run from a dirty checkout. What about adding a "new directories added to Makefile.pre.in" check to Tools/scripts/patchcheck.py? ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 11:35:10 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 25 May 2019 15:35:10 +0000 Subject: [issue37040] checking for membership in itertools.count enters infinite loop with no way to exit In-Reply-To: <1558758125.27.0.730728069526.issue37040@roundup.psfhosted.org> Message-ID: <1558798510.68.0.95141413904.issue37040@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: -SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 11:42:49 2019 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 25 May 2019 15:42:49 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558798969.04.0.545611284254.issue37011@roundup.psfhosted.org> Xavier de Gaye added the comment: > Would it work to store it on the class then (once)? A motivation for this change should be provided first: the incorrect behavior it is trying to fix or the enhancement it is providing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 11:57:23 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 25 May 2019 15:57:23 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558799843.75.0.459217820731.issue27987@roundup.psfhosted.org> Gregory P. Smith added the comment: long double was changed to double seven years ago to avoid a different kind of undefined behavior... https://github.com/python/cpython/commit/e348c8d154cf6342c79d627ebfe89dfe9de23817#diff-fb41bdaf12f733cf6ab8a82677d03adc We are going in circles here. Submitting that PR to 3.7 caused the undefined behavior sanitizer buildbot to go back to reporting a ton more damage. build before: https://buildbot.python.org/all/#/builders/137/builds/878 52k lines of test stdio build after: https://buildbot.python.org/all/#/builders/137/builds/879 4900k lines of test stdio ---------- resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 12:18:59 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 25 May 2019 16:18:59 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558801139.66.0.0236789688262.issue27987@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +13478 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:09:01 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 25 May 2019 17:09:01 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558804141.62.0.659706610186.issue27987@roundup.psfhosted.org> Gregory P. Smith added the comment: commit reverted in https://github.com/python/cpython/commit/2156fec1f7a8f9972e90cdbaf404e3fd9eaccb35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:29:57 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 25 May 2019 17:29:57 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558805397.26.0.0939462038976.issue27987@roundup.psfhosted.org> Gregory P. Smith added the comment: I'm not marking this bug as "Fixed" as the original complaint about obmalloc'd structs with a long double not being aligned is still going to be true on 32-bit platforms for 2.7 - 3.7. We've merely increased the obmalloc alignment to 16-bytes on 64-bit platforms. So the problem should only remain for 32-bit users which at this point are likely only arm (rpi and similar low end friends not using a 64-bit OS). ---------- stage: patch review -> needs patch versions: +Python 2.7, Python 3.6, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:41:46 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 25 May 2019 17:41:46 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558806106.42.0.966566031682.issue27987@roundup.psfhosted.org> Antoine Pitrou added the comment: And of course, someone who has this issue can at worse recompile Python without pymalloc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 12:48:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 May 2019 16:48:02 +0000 Subject: [issue37040] checking for membership in itertools.count enters infinite loop with no way to exit In-Reply-To: <1558758125.27.0.730728069526.issue37040@roundup.psfhosted.org> Message-ID: <1558802882.8.0.814699082128.issue37040@roundup.psfhosted.org> Serhiy Storchaka added the comment: Adding the __contains__() method to the count iterator would not solve the general problem with infinite iterators. For example with the following expressions: -1 in filter(None, itertools.count()) -1 in map(float, itertools.count()) It is not worth to add a method just to handle a single case of misusing. You should not use "in" with infinite iterators. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:53:10 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 25 May 2019 17:53:10 +0000 Subject: [issue37044] Build/test artifacts not ignored for framework build In-Reply-To: <1558792712.2.0.796235844945.issue37044@roundup.psfhosted.org> Message-ID: <1558806790.8.0.114503376146.issue37044@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:53:01 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 25 May 2019 17:53:01 +0000 Subject: [issue37043] Buildbots fail when new files are added In-Reply-To: <1558790050.59.0.505947951024.issue37043@roundup.psfhosted.org> Message-ID: <1558806781.32.0.961971316399.issue37043@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 12:35:10 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 25 May 2019 16:35:10 +0000 Subject: [issue37039] IDLE: Zoom Height Restore restores to default, not previous size In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558802110.0.0.434437660248.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: Andre Roberge reported on idle-dev that Restore Height has no effect for him with Python 3.7.3, 32 bit, on Windows 10. Since it works for me on Win 10, 3.7.3-32 bit local debug build and 3.7.3-64 bit installed and ditto for 3.8, I am initially baffled. Andre, the only way I know to debug this is for you to add debug prints to zoomheight.py and start IDLE in a console, to see the print output, with 'py -m idlelib' (add -3.7 if needed). The first thing I can think of is 'print(geom)' and 'print(newgeom)' in zoom_height() after they are fetched and defined near the top and bottom. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:30:58 2019 From: report at bugs.python.org (Dan Rose) Date: Sat, 25 May 2019 17:30:58 +0000 Subject: [issue37040] checking for membership in itertools.count enters infinite loop with no way to exit In-Reply-To: <1558802882.8.0.814699082128.issue37040@roundup.psfhosted.org> Message-ID: <9514C497-7BAF-4A56-B48A-4AD5139423CE@gmail.com> Dan Rose added the comment: The general problem with infinite iterators is indeed a bigger issue and its resolution would probably resolve this issue too. With the examples you gave at least the user can ctrl-c to interrupt. Entering an infinite, *uninterruptible* loop is a consequence so bad that it deserves a guard rail. > On May 25, 2019, at 11:48, Serhiy Storchaka wrote: > > > Serhiy Storchaka added the comment: > > Adding the __contains__() method to the count iterator would not solve the general problem with infinite iterators. For example with the following expressions: > > -1 in filter(None, itertools.count()) > -1 in map(float, itertools.count()) > > It is not worth to add a method just to handle a single case of misusing. You should not use "in" with infinite iterators. > > ---------- > nosy: +serhiy.storchaka > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:40:17 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 25 May 2019 17:40:17 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558806017.21.0.26803352592.issue27987@roundup.psfhosted.org> Antoine Pitrou added the comment: Here is what I've found for (32-bit) ARM: - "long double" is 8 bytes long, so it's probably the same as "double" (see http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0274b/index.html) - the standard alignment for "double" is 8 bytes (see http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf) And on (32-bit) x86, it looks like the standard alignment for "long double" is 4 bytes: https://www.codesynthesis.com/~boris/blog/2009/04/06/cxx-data-alignment-portability/ So I don't think there's anything to change on 32-bit Python builds *if* we only really care about ARM and x86 (which is restrictive, but using "long double" in C extension types is a bit of an exotic issue). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:33:22 2019 From: report at bugs.python.org (Dan Rose) Date: Sat, 25 May 2019 17:33:22 +0000 Subject: [issue37040] checking for membership in itertools.count enters infinite loop with no way to exit In-Reply-To: <1558758125.27.0.730728069526.issue37040@roundup.psfhosted.org> Message-ID: <1558805602.2.0.00956288542136.issue37040@roundup.psfhosted.org> Dan Rose added the comment: Oops you are right. These enter uninterruptible loops too. They are exceptional situations and should do the expected thing - throw exceptions as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:18:38 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 25 May 2019 17:18:38 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558804718.31.0.216820437782.issue27987@roundup.psfhosted.org> miss-islington added the comment: New changeset 1b85f4ec45a5d63188ee3866bd55eb29fdec7fbf by Miss Islington (bot) in branch '3.7': bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850) https://github.com/python/cpython/commit/1b85f4ec45a5d63188ee3866bd55eb29fdec7fbf ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:22:48 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 25 May 2019 17:22:48 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558804968.36.0.0353343706613.issue1230540@roundup.psfhosted.org> Antoine Pitrou added the comment: A Thread.excepthook() method does not allow to notify exceptions raised in C-created threads ("dummy threads"). Also, as I said already, you can get the current thread by calling threading.current_thread() in the except hook. There is no need to pass it explicitly to the except hook. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 13:10:52 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 25 May 2019 17:10:52 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558804252.91.0.457895988227.issue27987@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: -Python 2.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 14:25:09 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 25 May 2019 18:25:09 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558808709.61.0.635458147507.issue27987@roundup.psfhosted.org> Gregory P. Smith added the comment: if someone runs into an actual need for this on 32-bit builds, please provide details and feel free to reopen the issue. closing as i don't believe there is any more for us to do. ---------- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 14:29:03 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 25 May 2019 18:29:03 +0000 Subject: [issue37045] Implement PEP 591: add Final qualifier and @final decorator to typing Message-ID: <1558808943.82.0.267698974314.issue37045@roundup.psfhosted.org> New submission from Ivan Levkivskyi : The actual implementation is performed by type checkers like mypy. We just need to add the names to the `typing` module. ---------- assignee: levkivskyi components: Library (Lib) messages: 343501 nosy: gvanrossum, levkivskyi, msullivan priority: normal severity: normal stage: needs patch status: open title: Implement PEP 591: add Final qualifier and @final decorator to typing type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 14:33:18 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 25 May 2019 18:33:18 +0000 Subject: [issue37045] Implement PEP 591: add Final qualifier and @final decorator to typing In-Reply-To: <1558808943.82.0.267698974314.issue37045@roundup.psfhosted.org> Message-ID: <1558809198.16.0.463179644641.issue37045@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- keywords: +patch pull_requests: +13479 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13571 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 14:55:15 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sat, 25 May 2019 18:55:15 +0000 Subject: [issue36979] ncurses extension uses wrong include path In-Reply-To: <1558388923.16.0.697144008722.issue36979@roundup.psfhosted.org> Message-ID: <1558810515.98.0.0297799687224.issue36979@roundup.psfhosted.org> Jeffrey Kintscher added the comment: This explains some of the build/linkage problems encountered in issue #36630, and that I encountered while working on issue #36982. ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 15:08:01 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 25 May 2019 19:08:01 +0000 Subject: [issue37046] Implement PEP 586: add Literal type constructor to typing Message-ID: <1558811281.19.0.407876730009.issue37046@roundup.psfhosted.org> New submission from Ivan Levkivskyi : The actual implementation is performed by type checkers like mypy. We just need to add `Literal` to the `typing` module. ---------- assignee: levkivskyi components: Library (Lib) messages: 343503 nosy: gvanrossum, levkivskyi, michael0x2a priority: normal severity: normal stage: needs patch status: open title: Implement PEP 586: add Literal type constructor to typing type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 15:10:36 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 25 May 2019 19:10:36 +0000 Subject: [issue37046] Implement PEP 586: add Literal type constructor to typing In-Reply-To: <1558811281.19.0.407876730009.issue37046@roundup.psfhosted.org> Message-ID: <1558811436.6.0.880848404796.issue37046@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- keywords: +patch pull_requests: +13480 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13572 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 15:38:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 25 May 2019 19:38:44 +0000 Subject: [issue37047] Refactor AsyncMock setup logic in create_autospec Message-ID: <1558813124.86.0.778430760626.issue37047@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : * In create_autospec there is some logic to detect if the function is an async function this could be refactored out as a private function. * create_autospec has initialization code for async mock. For synchronous functions this is done with _setup_func and is called during setting signature. AsyncMock needs different setup logic code to setup the functions but the code can be refactored out of create_autospec into _setup_async_func. * In create_autospec awaited attribute is not set for AsyncMock during setup [0] and hence this causes AttributeError when the coroutine is awaited. awaited attribute can be also initialized. import asyncio from unittest.mock import create_autospec async def foo(): pass spec = create_autospec(foo) awaitable = spec() async def main(): await awaitable asyncio.run(main()) Traceback (most recent call last): File "/tmp/spam.py", line 13, in asyncio.run(main()) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/base_events.py", line 614, in run_until_complete return future.result() File "/tmp/spam.py", line 11, in main await awaitable File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 2045, in _mock_call return await proxy() File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 2043, in proxy await self.awaited._notify() File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 596, in __getattr__ raise AttributeError("Mock object has no attribute %r" % name) AttributeError: Mock object has no attribute 'awaited' * In the setup logic to create attributes like assert_not_awaited uses the pattern setattr(mock, a, f) at [1] . But due to late binding 'a' in the function f has the last value of the loop 'assert_not_awaited' and hence calling other helpers also calls assert_not_awaited. This could be resolved by using a partial function that binds the attribute value early in the loop and respective function would be used in getattr. >>> spec.assert_awaited_once_with(1) # Due to late binding assert_not_awaited is always called TypeError: assert_not_awaited() takes 1 positional argument but 2 were given * assert_not_awaited has the error message indicating it should be awaited once [2] . This can be changed to indicate something like "Expected mock to not have been awaited". >>> spec.assert_not_awaited() AssertionError: Expected mock to have been awaited once. Awaited 1 times. * mock docs have list of magic methods implemented where __aenter__, __aexit__, __aiter__ and __anext__ could be documented with versionadded directive. [3] I have a PR with the above changes that I will post shortly for review. [0] https://github.com/python/cpython/blob/7114c6504a60365b8b0cd718da0ec8a737599fb9/Lib/unittest/mock.py#L2506 [1] https://github.com/python/cpython/blob/7114c6504a60365b8b0cd718da0ec8a737599fb9/Lib/unittest/mock.py#L2518 [2] https://github.com/python/cpython/blob/7114c6504a60365b8b0cd718da0ec8a737599fb9/Lib/unittest/mock.py#L2154 [3] https://docs.python.org/3.8/library/unittest.mock.html#mocking-magic-methods ---------- components: Library (Lib) messages: 343504 nosy: asvetlov, cjw296, lisroach, mariocj89, michael.foord, xtreak, yselivanov priority: normal severity: normal status: open title: Refactor AsyncMock setup logic in create_autospec type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 15:44:14 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 25 May 2019 19:44:14 +0000 Subject: [issue37048] ssl module: QUIC support for HTTP/3 Message-ID: <1558813454.34.0.910569571788.issue37048@roundup.psfhosted.org> New submission from Christian Heimes : This ticket collects information for QUIC [1][2] support and tracks, which APIs have to be added to Python in order to implement a QUIC protocol stack on top of Python's ssl and socket module. QUIC is a "UDP-Based Multiplexed and Secure Transport" protocol. It will replace TCP and TLS record layer as transport channels in the upcoming HTTP/3 [3][4] standard. Although it's UDP, QUIC does *not* use DTLS (Datagram TLS, vulgo TLS over UDP). As far as I understand QUIC at the moment, the ssl module has to gain two additional features: 1. A way to send/receive TLS messages that are not wrapped in the TLS record layer. 2. A key callback that gets called whenever key material is exchanged during handshake or updated later on. OpenSSL does not implement the necessary APIs, yet [5]. Tatsuhiro Tsujikawa's experimental OpenSSL fork [6] implements (1) as a SSL option SSL_MODE_QUIC_HACK and (2) as a callback that acts on five different key types. (Disclaimer: My current understanding of QUIC is very limited.) [1] https://tools.ietf.org/html/draft-ietf-quic-transport-20 [2] https://en.wikipedia.org/wiki/QUIC [2] https://http3-explained.haxx.se/en/ [4] https://en.wikipedia.org/wiki/HTTP/3 [5] https://daniel.haxx.se/blog/2019/01/21/quic-and-missing-apis/ [6] https://github.com/tatsuhiro-t/openssl/commits/quic-draft-17 ---------- assignee: christian.heimes components: SSL messages: 343505 nosy: alex, christian.heimes, dstufft, janssen, njs priority: normal severity: normal status: open title: ssl module: QUIC support for HTTP/3 type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 15:44:49 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 25 May 2019 19:44:49 +0000 Subject: [issue37049] Implement PEP 589: add TypedDict to typing Message-ID: <1558813489.97.0.456123370037.issue37049@roundup.psfhosted.org> New submission from Ivan Levkivskyi : The actual implementation is performed by type checkers like mypy. We just need to add `TypedDict` to the `typing` module. ---------- assignee: levkivskyi components: Library (Lib) messages: 343506 nosy: gvanrossum, levkivskyi priority: normal severity: normal stage: needs patch status: open title: Implement PEP 589: add TypedDict to typing type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 15:47:25 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 25 May 2019 19:47:25 +0000 Subject: [issue37049] Implement PEP 589: add TypedDict to typing In-Reply-To: <1558813489.97.0.456123370037.issue37049@roundup.psfhosted.org> Message-ID: <1558813645.03.0.815467364318.issue37049@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- keywords: +patch pull_requests: +13481 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 15:48:08 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 25 May 2019 19:48:08 +0000 Subject: [issue37047] Refactor AsyncMock setup logic in create_autospec In-Reply-To: <1558813124.86.0.778430760626.issue37047@roundup.psfhosted.org> Message-ID: <1558813688.86.0.99525933371.issue37047@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13482 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13574 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 15:58:45 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 25 May 2019 19:58:45 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558814325.86.0.04869826448.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: I have a 27" 2560X1440 screen. For me: >>> import tkinter; tkinter.Tk().tk.call('tk', 'scaling') 1.333... I presume 3200x200 should be 3200x2000 and that the diagonal size is small enough that the screen is a HiDPI screen, making tk's scaling above 1.4, so that run.fix_scaling() adjusts font sizes. I am not sure what you mean by 'scaling at 100%/200%' other than tk scaling <, >= 1.4 or HiDPI no/yes, or how you changed the scaling. I grepped idlelib for 'scaling' and only found references to the function and the tk call. In any case, tcl/tk does not properly support HiDPI screens. Serhiy Storchaka contributed fix_scaling to make IDLE readable on a HiDPI Linux laptop. The 1.4 and .75 values are empirical. With help from Windows experts, I added the SetProcessDpiAwareness call near the top of pyshell when a Windows user with a HiDPI screen reported a problem on idledev. I believe that the call tells Windows that IDLE already makes a scaling adjustment, so it should not also do so. zoomheight.zoom_height() restores by calling top.wm_geometry(''). https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M42 says "If newGeometry is specified as an empty string then any existing user-specified geometry for window is cancelled, and the window will revert to the size requested internally by its widgets." This works for normal screens but somehow not for your HiDPI Windows screen. Can you do the print experiment I suggested previously? I will experiment to see how much '22' needs to be increased for Windows to accomodate the task bar. What is really needed is to determine the size and orientation of the taskbar, or rather the remaining 'full-screen' height. Serhiy, do you still have a HiDPI screen? If so, does Options => Zoom/Restore Height work for you? Do Linux desktop managers have bottom panels or taskbars that can cover part of a zoomed window? Ignore any task bar over status bar issue.) ---------- nosy: +serhiy.storchaka title: IDLE: Zoom Height Restore restores to default, not previous size -> IDLE: Improve zoomheight doc and behavior. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 16:12:03 2019 From: report at bugs.python.org (SilentGhost) Date: Sat, 25 May 2019 20:12:03 +0000 Subject: [issue37048] ssl module: QUIC support for HTTP/3 In-Reply-To: <1558813454.34.0.910569571788.issue37048@roundup.psfhosted.org> Message-ID: <1558815123.81.0.411708324026.issue37048@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 16:40:46 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 25 May 2019 20:40:46 +0000 Subject: [issue37024] SQLite flag in configure due to homebrew not linking sqlite In-Reply-To: <1558632381.76.0.984637995348.issue37024@roundup.psfhosted.org> Message-ID: <1558816846.37.0.524846801381.issue37024@roundup.psfhosted.org> Ned Deily added the comment: I don't understand what the issue is here. Can you explain or point to an explanation of why Homebrew is not linking to SQLite? Is it just not to the Apple-supplied SQLite? ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 16:50:27 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 25 May 2019 20:50:27 +0000 Subject: [issue37044] Build/test artifacts not ignored for framework build In-Reply-To: <1558792712.2.0.796235844945.issue37044@roundup.psfhosted.org> Message-ID: <1558817427.71.0.628355588637.issue37044@roundup.psfhosted.org> Ned Deily added the comment: That seems like a reasonable request. We should also check that the Makfile clean* rules do the right thing. One potential complication: the framework name is specified by the ./configure --with-framework-name= parameter, so it may not always be "Python.framework", the default value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 16:53:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 May 2019 20:53:33 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558817613.58.0.963292921492.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: > A Thread.excepthook() method does not allow to notify exceptions raised in C-created threads ("dummy threads"). The main difference between sys.excepthook and threading.excepthook is that the threading hook displays the thread name. Which output do you expect if you don't pass a threading.Thread object (which has a 'name' attribute)? The thread identifier from _thread.get_ident()? I can easily modify the default hook implementation to support args.thread=None and displays _thread.get_ident() as the name instead. > Also, as I said already, you can get the current thread by calling threading.current_thread() in the except hook. There is no need to pass it explicitly to the except hook. I understand that your plan is to use sys.excepthook to handle threading.Thread uncaught exception. My main concern is that sys.excepthook can fail on importing the threading module. One solution would be to import threading when the sys module is created and keep a strong reference to threading.current_thread(). But I dislike this idea. I already raised my concern, but so far, you didn't explain how you plan to fix this practical issue. Moreover, the current threading code is quite complex. My guess is that this complexity is needed to display exception very late during Python shutdown, when module attributes are set to None and import no longer works. I would prefer to not move this complexity into sys.excepthook which has currently a simple implementation. -- Daemon threads are evil. We should drop this nasty feature... but I would prefer to not block this issue by the removal of daemon threads, since I'm sure that a lot of code rely on them and so it will be really hard to really remove them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 16:57:14 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 25 May 2019 20:57:14 +0000 Subject: [issue37050] Remove expr_text from ast node FormattedValue Message-ID: <1558817834.95.0.692781617754.issue37050@roundup.psfhosted.org> New submission from Eric V. Smith : I added the expr_text optional field to the FormattedValue node in order to implement the '=' feature of f-strings (see issue 36817). However, the expr_text field isn't strictly needed. Instead, the same feature could be added with another Constant string node child of the JoinedStr node. I'm going to remove expr_text and use another Constant in order to remove this change to the 3.8 ast nodes. I have a patch mostly worked out, I'll have it ready in the next day or two. I want to get this in to 3.8 beta 1, because otherwise we're stuck with the expr_text implementation. ---------- assignee: eric.smith components: Interpreter Core messages: 343511 nosy: eric.smith, lukasz.langa priority: release blocker severity: normal stage: needs patch status: open title: Remove expr_text from ast node FormattedValue versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 17:09:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 May 2019 21:09:43 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558818583.51.0.823618242649.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: Serhiy Storchaka: > I propose to add the Thead.excepthook() method with the signature compatible with sys.excepthook(). This will allow to set easily per-thread hooks and a global hook. I don't see the relationship between the API (signature) and the ability to set a per-thread hook. I'm not convinced that a per-thread hook is needed. My proposed global threading.excepthook gets a thread parameter which allows a custom hook to implement a different behavior depending on the thread. You can use a different behavior depending on the thread name, depending on a custom Thread attribute, etc. Would it be acceptable for first add a global hook and see later if a per-thread hook is needed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 17:10:31 2019 From: report at bugs.python.org (Michael Felt) Date: Sat, 25 May 2019 21:10:31 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1558628176.01.0.203411555837.issue36084@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: On 23/05/2019 18:16, Jake Tesler wrote: > Jake Tesler added the comment: > > Michael Felt - > If you would like some help with adding/building AIX support for this functionality, tag me, I'd be glad to help out! :) > > ---------- Thanks - I'll try to look at this early next week. > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 17:10:53 2019 From: report at bugs.python.org (John Riehl) Date: Sat, 25 May 2019 21:10:53 +0000 Subject: [issue37051] Glossary item "hashable" incorrect Message-ID: <1558818653.08.0.592312048855.issue37051@roundup.psfhosted.org> New submission from John Riehl : The entry in the glossary for "hashable" (https://docs.python.org/3/glossary.html#term-hashable) states "All of Python?s immutable built-in objects are hashable." Tuples are described as immutable sequence types (https://docs.python.org/3/library/stdtypes.html#immutable-sequence-types), but they are not hashable unless all of their elements are hashable. Suggest updating the glossary to reflect this. ---------- assignee: docs at python components: Documentation messages: 343514 nosy: docs at python, john.riehl priority: normal severity: normal status: open title: Glossary item "hashable" incorrect type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 17:11:53 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 25 May 2019 21:11:53 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558818713.5.0.145340492229.issue1230540@roundup.psfhosted.org> Antoine Pitrou added the comment: Sorry, I had overlooked the issue with global variables at shutdown. Though that issue only occurs with daemonic threads, since non-daemonic threads are joined before global variables are cleared. In any case, I think the namedtuple / structseq solution is elegant, because we can add additional information later (the user must only be careful not to use tuple unpacking). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 17:19:46 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 25 May 2019 21:19:46 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads In-Reply-To: <1558818583.51.0.823618242649.issue1230540@roundup.psfhosted.org> Message-ID: <3d109d52-adbf-0c7f-250e-af579d74f2ff@free.fr> Antoine Pitrou added the comment: Le 25/05/2019 ? 23:09, STINNER Victor a ?crit?: > > I don't see the relationship between the API (signature) and the ability to set a per-thread hook. > > I'm not convinced that a per-thread hook is needed. Indeed, if you write your own Thread class, you can add a try...except in the Thread.run() method. You don't need a dedicated Thread.excepthook() method. The only way a per-thread hook could be useful is if you could set it *outside* of the Thread class (so not as a method), so that one can e.g. catch / report exceptions raised in threads launches by third-party libraries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 17:59:16 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 25 May 2019 21:59:16 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558821556.79.0.404013657542.issue37039@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +13483 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 18:07:02 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 25 May 2019 22:07:02 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558822022.61.0.729505273334.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: Tal, how is zoom/restore height working on your Mac? On my updated Macbook Air Mohave, the zoom bottom margin of 88 is too large. Since IDLE starts fully zoomed on this small screen, I determined this by shrinking Shell and then zooming it. The result leaves a margin between IDLE and the app panel, which goes away when restoring to initial state. But I want to know if 88 is too large on other machines before I change it. ---------- nosy: +taleinat stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 18:11:21 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 25 May 2019 22:11:21 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558822281.77.0.762931873673.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: The current patch fixed the hidden status bar on Windows. I just had to increase the margin reserved for the taskbar from 76 to 114. This will also work if the taskbar is moved to the top of the screen. If the taskbar is moved to either side or if it is less high for previous versions of Windows, a visible margin is better than a hidden status bar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 18:12:15 2019 From: report at bugs.python.org (Marco Sulla) Date: Sat, 25 May 2019 22:12:15 +0000 Subject: [issue36964] `python3 -m venv NAME`: virtualenv is not portable In-Reply-To: <1558267639.25.0.0700835222258.issue36964@roundup.psfhosted.org> Message-ID: <1558822335.37.0.545421622904.issue36964@roundup.psfhosted.org> Marco Sulla added the comment: > if you have entry points installed then moving them to another > machine would break their shebang lines. Not if you port it on the same OS using, for example #!/usr/bin/env python3 > And even if you do it on your local machine there's no guarantee > something else wasn't structured to be directory-specific. You are telling about user code, not the virtualenv itself. If the user doe not write the code in such a way it's portable, it's his fault. But this should not stop people that do it right to try to port the venv if possible. I think the modification VIRTUAL_ENV="$(dirname "$(dirname "$(readlink -nf "$0")")")" is very little and quite robust. Don't know how to do in fish and csh shells, but in bash and sh it works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 18:15:40 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 25 May 2019 22:15:40 +0000 Subject: [issue37050] Remove expr_text from ast node FormattedValue In-Reply-To: <1558817834.95.0.692781617754.issue37050@roundup.psfhosted.org> Message-ID: <1558822540.77.0.132671355927.issue37050@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 18:16:55 2019 From: report at bugs.python.org (=?utf-8?q?Jeremy_Lain=C3=A9?=) Date: Sat, 25 May 2019 22:16:55 +0000 Subject: [issue37048] ssl module: QUIC support for HTTP/3 In-Reply-To: <1558813454.34.0.910569571788.issue37048@roundup.psfhosted.org> Message-ID: <1558822615.91.0.793370995027.issue37048@roundup.psfhosted.org> Jeremy Lain? added the comment: I have started implementing a QUIC stack in Python [1] so I'll share a couple of thoughts in addition to Christian's two valid points: - SSLSocket is almost certainly not going to be the right entry point. QUIC's interface to TLS is entirely focused on passing in / out handshake messages and extracting secrets. No data is actually encrypted by the TLS engine. - In addition to being notified about keying material we will need access to the raw extensions either received in the EncryptedExtensions or the ClientHello. This is because QUIC exchanges its transport parameters in the form of a TLS extension. - We will also need additional APIs to manipulate session tickets, both when acting as a client and a server, in order to achieve 0-RTT handshakes. When acting as a client we need to be able to pass in the session ticket to use and be notified when a new session ticket is received. We also need to know the value of the max_early_data_size extension. When acting as a server we need a callback to provide the TLS engine with session tickets and to control issuing new session tickets, and provide the max_early_data_size value. - For header protection and payload encryption we need access to a number of crypto primitives including AES, ChaCha20 and a way to use AEAD. For aioquic I decided to use cryptography's primitives and implemented a minimal TLS 1.3 engine on top of it. This avoids having to wait for some future version of OpenSSL to provide the necessary APIs or having to use a patched version of OpenSSL. [1] https://github.com/aiortc/aioquic ---------- nosy: +jlaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 18:25:08 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 25 May 2019 22:25:08 +0000 Subject: [issue34613] asyncio.StreamReader initialization documentation incorrectly declare limit as None In-Reply-To: <1536476439.55.0.56676864532.issue34613@psf.upfronthosting.co.za> Message-ID: <1558823108.78.0.511632191028.issue34613@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 18:42:27 2019 From: report at bugs.python.org (Andre Roberge) Date: Sat, 25 May 2019 22:42:27 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558822281.77.0.762931873673.issue37039@roundup.psfhosted.org> Message-ID: Andre Roberge added the comment: Thanks. I did a quick check. 114 solves the problem of the Restore Height not working, but the status bar is still hidden. To me, the crucial part of the problem was the restore height not working, so I'd be happy with this. At 164, I can see parts of the status bar [image: image.png] At 180, there is a tiny gap [image: image.png] 178 seems to be just touching. [image: image.png] With the vertical resolution of my screen being 2000 px, tiny gaps are essentially invisible. Because of this huge resolution, most display elements (text, icons ... and the taskbar) are set up to be twice as big - this is the 200% factor I was referring to. So, in pixel terms, the taskbar on my computer is likely twice as high as yours. Using a measuring tape, the physical size of my screen is 183 mm; the taskbar is 8 mm high. I can add these comments (and screenshots?) on the bug tracker if you'd like. Thanks for finding the solution to this problem. Andr? P.S. I *just* started using IDLE again as I want to use it as a basis for my project. The last time I had used IDLE was with Python 2.4 - I quickly moved on to using other editors. There's been tremendous progress since and I want to thank you for all your work. On Sat, May 25, 2019 at 7:11 PM Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > The current patch fixed the hidden status bar on Windows. I just had to > increase the margin reserved for the taskbar from 76 to 114. This will > also work if the taskbar is moved to the top of the screen. If the taskbar > is moved to either side or if it is less high for previous versions of > Windows, a visible margin is better than a hidden status bar. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: https://bugs.python.org/file48358/image.png Added file: https://bugs.python.org/file48359/image.png Added file: https://bugs.python.org/file48360/image.png _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 4205 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 7001 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 5669 bytes Desc: not available URL: From report at bugs.python.org Sat May 25 19:15:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 May 2019 23:15:19 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558826119.54.0.0621316135018.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: > Indeed, if you write your own Thread class, you can add a try...except > in the Thread.run() method. You don't need a dedicated > Thread.excepthook() method. Exactly. You can already do you best in your run() method to handle exceptions. threading.excepthook is only there is everything else already failed. FYI in my implementation, if threading.excepthook raises a new exception, it's also handled... by sys.excepthook this time ;-) > The only way a per-thread hook could be useful is if you could set it > *outside* of the Thread class (so not as a method), so that one can e.g. > catch / report exceptions raised in threads launches by third-party > libraries. I discuss threading excepthook with Pablo and he asked me if it would be possible to have a different behavior depending if the thread is spawn by my application or by "third party code". Using threading.excepthook, you can mark your threads that you spawn directly using a specific name, a special attribute, or you may even track them in a list (maybe using weak references). If sys.excepthook is used to handle threading exceptions, you call threading.current_thread(), but then we come back to the issue to "dying" Python: exception which occurs late in Python finalization, when most modules are already cleared and import no longer works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 19:40:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 May 2019 23:40:02 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558827602.45.0.302439071697.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: Antoine Pitrou: > A Thread.excepthook() method does not allow to notify exceptions raised in C-created threads ("dummy threads"). I modified my PR to use the threading identitifer (threading.get_ident()) as the thread name if args.thread is None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 19:44:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 May 2019 23:44:42 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558827882.77.0.123976201132.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: > In any case, I think the namedtuple / structseq solution is elegant, because we can add additional information later I used the same design for the new sys.unraisablehook in bpo-36829 and I'm already working on adding a new 'err_msg' field to the argument passed to this took: PR 13488 :-) I was trapped in the past when I had to modify warnings "hooks" (warnings.showwarning and warnings.formatwarning) when I had to add a new 'source' parameter. I had to write wrappers which are fragile, to keep the backward compatibility. > (the user must only be careful not to use tuple unpacking) threading.excepthook doesn't mention the compatibility with tuple on purpose. It only documents attributes with their names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 19:50:35 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 25 May 2019 23:50:35 +0000 Subject: [issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there) In-Reply-To: <1557961877.88.0.551239006015.issue36933@roundup.psfhosted.org> Message-ID: <1558828235.52.0.0196929489187.issue36933@roundup.psfhosted.org> Matthias Bussonnier added the comment: Some discussion in https://github.com/python/cpython/pull/13349#discussion_r284567113 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 19:54:15 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 25 May 2019 23:54:15 +0000 Subject: [issue3693] Obscure array.array error message In-Reply-To: <1219801896.33.0.491668230509.issue3693@psf.upfronthosting.co.za> Message-ID: <1558828455.11.0.640875983618.issue3693@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13484 pull_request: https://github.com/python/cpython/pull/13577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 19:56:05 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 25 May 2019 23:56:05 +0000 Subject: [issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there) In-Reply-To: <1557961877.88.0.551239006015.issue36933@roundup.psfhosted.org> Message-ID: <1558828565.11.0.598648446397.issue36933@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- keywords: +patch pull_requests: +13485 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 19:56:23 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sat, 25 May 2019 23:56:23 +0000 Subject: [issue3693] Obscure array.array error message In-Reply-To: <1219801896.33.0.491668230509.issue3693@psf.upfronthosting.co.za> Message-ID: <1558828583.79.0.403254800362.issue3693@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: -13484 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 20:49:29 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 26 May 2019 00:49:29 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: Message-ID: Terry J. Reedy added the comment: Thank you. Along with your path browser report, things are much clearer. With variable pixel densities and custom settings, we cannot use fixed pixel or even mm numbers. 114 is right for me because I have Display Setting "Change the size of text, apps, and other apps, and other items" to 125%. My taskbar is 11+mm high. 78 or something near that is right for 100%. 150% would need more than 114. Under 'Advanced scaling settings', one can enter a custom scaling size. Is this what you meant when you said you set scaling to 200% or 100%. No need to post what you wrote. Let me summarize the numbers I want along with mine for comparison. What I need to do now is examine the tk screen sizing system and functions and see if the needed numbers (max usable height for zoom) are available. If not, I might add a 'Calibrate screen' item under Options. On 5/25/2019 6:42 PM, Andre Roberge wrote: > > Andre Roberge added the comment: > > Thanks. > > I did a quick check. 114 solves the problem of the Restore Height not > working, but the status bar is still hidden. To me, the crucial part of > the problem was the restore height not working, so I'd be happy with this. > > At 164, I can see parts of the status bar > [image: image.png] > > At 180, there is a tiny gap > > [image: image.png] > > 178 seems to be just touching. > > [image: image.png] > > With the vertical resolution of my screen being 2000 px, tiny gaps are > essentially invisible. Because of this huge resolution, most display > elements (text, icons ... and the taskbar) are set up to be twice as big - > this is the 200% factor I was referring to. So, in pixel terms, the taskbar > on my computer is likely twice as high as yours. > > Using a measuring tape, the physical size of my screen is 183 mm; the > taskbar is 8 mm high. > > I can add these comments (and screenshots?) on the bug tracker if you'd > like. > > Thanks for finding the solution to this problem. > > Andr? > > P.S. I *just* started using IDLE again as I want to use it as a basis for > my project. The last time I had used IDLE was with Python 2.4 - I quickly > moved on to using other editors. There's been tremendous progress since and > I want to thank you for all your work. > > On Sat, May 25, 2019 at 7:11 PM Terry J. Reedy > wrote: > >> >> Terry J. Reedy added the comment: >> >> The current patch fixed the hidden status bar on Windows. I just had to >> increase the margin reserved for the taskbar from 76 to 114. This will >> also work if the taskbar is moved to the top of the screen. If the taskbar >> is moved to either side or if it is less high for previous versions of >> Windows, a visible margin is better than a hidden status bar. >> >> ---------- >> >> _______________________________________ >> Python tracker >> >> _______________________________________ >> > > ---------- > Added file: https://bugs.python.org/file48358/image.png > Added file: https://bugs.python.org/file48359/image.png > Added file: https://bugs.python.org/file48360/image.png > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 20:54:49 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 26 May 2019 00:54:49 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1558832089.56.0.461063243345.issue22385@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +13486 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13578 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 20:57:40 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 26 May 2019 00:57:40 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1558832260.71.0.600027928146.issue22385@roundup.psfhosted.org> Gregory P. Smith added the comment: Given that we have f-strings, I don't think a format mini language makes as much sense. My PR adds support for separators to the .hex() methods (and to binascii.hexlify) via a parameter. Extending beyond what MicroPython already does in its binascii implementation (a single sep parameter). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 21:05:53 2019 From: report at bugs.python.org (Andre Roberge) Date: Sun, 26 May 2019 01:05:53 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: Message-ID: Andre Roberge added the comment: On Sat, May 25, 2019 at 9:49 PM Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Thank you. Along with your path browser report, things are much > clearer. With variable pixel densities and custom settings, we cannot > use fixed pixel or even mm numbers. 114 is right for me because I have > Display Setting "Change the size of text, apps, and other apps, and > other items" to 125%. Yes, that's the settings I was talking about (my OS is in French, so I couldn't quote you the exact text.) Mine is set at 200%, as recommended by Windows - and which makes the text just large enough to be readable for me. My taskbar is 11+mm high. 78 or something near > that is right for 100%. 150% would need more than 114. > > Under 'Advanced scaling settings', one can enter a custom scaling size. > Is this what you meant when you said you set scaling to 200% or 100%. > Yes, see above. > No need to post what you wrote. Let me summarize the numbers I want > along with mine for comparison. > > What I need to do now is examine the tk screen sizing system and > functions and see if the needed numbers (max usable height for zoom) are > available. If not, I might add a 'Calibrate screen' item under Options. > > I think that would possibly work out best - people could customize to their liking. With so many different display, including 4k monitors, it makes sense to just make it user-configurable. Andr? > On 5/25/2019 6:42 PM, Andre Roberge wrote: > > > > Andre Roberge added the comment: > > > > Thanks. > > > > I did a quick check. 114 solves the problem of the Restore Height not > > working, but the status bar is still hidden. To me, the crucial part of > > the problem was the restore height not working, so I'd be happy with > this. > > > > At 164, I can see parts of the status bar > > [image: image.png] > > > > At 180, there is a tiny gap > > > > [image: image.png] > > > > 178 seems to be just touching. > > > > [image: image.png] > > > > With the vertical resolution of my screen being 2000 px, tiny gaps are > > essentially invisible. Because of this huge resolution, most display > > elements (text, icons ... and the taskbar) are set up to be twice as big > - > > this is the 200% factor I was referring to. So, in pixel terms, the > taskbar > > on my computer is likely twice as high as yours. > > > > Using a measuring tape, the physical size of my screen is 183 mm; the > > taskbar is 8 mm high. > > > > I can add these comments (and screenshots?) on the bug tracker if you'd > > like. > > > > Thanks for finding the solution to this problem. > > > > Andr? > > > > P.S. I *just* started using IDLE again as I want to use it as a basis for > > my project. The last time I had used IDLE was with Python 2.4 - I > quickly > > moved on to using other editors. There's been tremendous progress since > and > > I want to thank you for all your work. > > > > On Sat, May 25, 2019 at 7:11 PM Terry J. Reedy > > wrote: > > > >> > >> Terry J. Reedy added the comment: > >> > >> The current patch fixed the hidden status bar on Windows. I just had to > >> increase the margin reserved for the taskbar from 76 to 114. This will > >> also work if the taskbar is moved to the top of the screen. If the > taskbar > >> is moved to either side or if it is less high for previous versions of > >> Windows, a visible margin is better than a hidden status bar. > >> > >> ---------- > >> > >> _______________________________________ > >> Python tracker > >> > >> _______________________________________ > >> > > > > ---------- > > Added file: https://bugs.python.org/file48358/image.png > > Added file: https://bugs.python.org/file48359/image.png > > Added file: https://bugs.python.org/file48360/image.png > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 21:33:37 2019 From: report at bugs.python.org (Kevin G) Date: Sun, 26 May 2019 01:33:37 +0000 Subject: [issue4356] Add "key" argument to "bisect" module functions In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za> Message-ID: <1558834417.62.0.151237614457.issue4356@roundup.psfhosted.org> Kevin G added the comment: Can anyone add "reverse" support? Key and reverse support are both functional requirement. ---------- nosy: +flyingosprey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 25 23:23:32 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sun, 26 May 2019 03:23:32 +0000 Subject: [issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition) In-Reply-To: <1488481944.03.0.0307704051627.issue29699@psf.upfronthosting.co.za> Message-ID: <1558841012.55.0.694811017551.issue29699@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +13487 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 00:05:51 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Sun, 26 May 2019 04:05:51 +0000 Subject: [issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition) In-Reply-To: <1488481944.03.0.0307704051627.issue29699@psf.upfronthosting.co.za> Message-ID: <1558843551.41.0.730548096515.issue29699@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I created pull request bpo-29699 to fix this issue. It adds an additional exception handler to ignore FileNotFoundError for most of the try blocks that already handle OSError. I decided not to add it to the initial os.open() call. This should provide the same semantics as the "rm -r" shell command. It will fail with FileNotFoundError when foo is missing, which is the same behavior as "rm -r foo" returning "rm: foo: No such file or directory" when foo is missing. Similarly, "rm -rf foo" always succeeds and is equivalent to setting "ignore_errors=true" in the shutil.rmtree() call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 00:26:04 2019 From: report at bugs.python.org (Ma Lin) Date: Sun, 26 May 2019 04:26:04 +0000 Subject: [issue35360] Update SQLite to 3.26 in Windows and macOS installer builds In-Reply-To: <1543580070.45.0.788709270274.issue35360@psf.upfronthosting.co.za> Message-ID: <1558844764.49.0.00920024753863.issue35360@roundup.psfhosted.org> Ma Lin added the comment: @Mariatta Wijaya, would you update SQLite? I want to do it myself, by following your patch in issue28791. But I find I have to commit SQLite's source code to https://github.com/python/cpython-source-deps, so I think this should be done by a core developer. ---------- nosy: +Ma Lin, Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 00:37:25 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 26 May 2019 04:37:25 +0000 Subject: [issue37041] IDLE: path browser unusable on some displays In-Reply-To: <1558779980.36.0.709549198107.issue37041@roundup.psfhosted.org> Message-ID: <1558845445.86.0.440137716537.issue37041@roundup.psfhosted.org> Terry J. Reedy added the comment: Another reason to replace IDLE's custom tree widget with hard-coded constants with ttk.Treeview. I am closing this because I believe that #31552 will solve this problem. For an initial check, run the following test code, extracted from https://tkdocs.com/tutorial/tree.html Click the [+] buttons. I am curious whether commenting out the fix_scaling call makes any difference. --------- import tkinter as tk from tkinter import ttk from idlelib.run import fix_scaling root = tk.Tk() tree = ttk.Treeview(root) tree.pack() fix_scaling(root) tree.insert('', 'end', 'widgets', text='Widget Tour') tree.insert('', 0, 'gallery', text='Applications') id = tree.insert('', 'end', text='Tutorial') tree.insert('widgets', 'end', text='Canvas') tree.insert(id, 'end', text='Tree') root.mainloop() ---------- assignee: -> terry.reedy components: +IDLE resolution: -> duplicate stage: -> resolved superseder: -> IDLE: Convert browswers to use ttk.Treeview type: -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 00:41:01 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 26 May 2019 04:41:01 +0000 Subject: [issue31552] IDLE: Convert browswers to use ttk.Treeview In-Reply-To: <1506093531.0.0.600281497403.issue31552@psf.upfronthosting.co.za> Message-ID: <1558845661.74.0.498876487069.issue31552@roundup.psfhosted.org> Terry J. Reedy added the comment: I changed the type to behavior because the hard-coded pixel heights prevent the browsers form being usable on at least one HiDPI monitor. I closed #37041 in favor of this on the presumption that ttk.Treeview will work on such monitors, at least after fix_scaling(root) is called. I posted a quick test there. ---------- type: enhancement -> behavior versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 01:22:09 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 26 May 2019 05:22:09 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558848129.4.0.53064454636.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: Andre, we need to severely trim quotes when posting by email. A summary with added info. Andre: 2000 pixels / 183 mm = 10.9 pixels / mm Terry: 1440 pixels / 336 mm = 4.3 pixels / mm Andre: Windows Display setting text size, custom scaling = 200%, 200% Terry: " " = 125%, none Andre: 8 mm tall taskbar needs zoom 'margin' of 178. Terry: 11 mm tall taskbar needs zoom 'margin' of 114. I don't see now to get from px/mm, settings, and bar height to the needed zoom correction. Conclusion 1: The previous Windows zoom margin of 78 is likely better for people with stock Windows (text size = 100%), making the change to 114 in PR 13575 wrong for them. Conclusion 2: No value is right for all Windows users. I assume this is also true for Linux and Windows. Conclusion 3: We need to somehow calculate a specific correction from information available from tkinter. If necessary, add a 'Configurtion' button to the Options menu or Settings dialog. Display a maximized text window, have user verify that it fits properly, and get geometry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 02:21:15 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 26 May 2019 06:21:15 +0000 Subject: [issue27987] obmalloc's 8-byte alignment causes undefined behavior In-Reply-To: <1473207430.19.0.578630759123.issue27987@psf.upfronthosting.co.za> Message-ID: <1558851675.27.0.317516027095.issue27987@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +13488 pull_request: https://github.com/python/cpython/pull/13581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 03:23:47 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 26 May 2019 07:23:47 +0000 Subject: [issue37017] Use LOAD_METHOD optimization in CallMethod C API functions In-Reply-To: <1558571544.48.0.863461247465.issue37017@roundup.psfhosted.org> Message-ID: <1558855427.27.0.428563315992.issue37017@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 03:23:47 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 26 May 2019 07:23:47 +0000 Subject: [issue37017] Use LOAD_METHOD optimization in CallMethod C API functions In-Reply-To: <1558571544.48.0.863461247465.issue37017@roundup.psfhosted.org> Message-ID: <1558855427.93.0.238615487804.issue37017@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6 by Inada Naoki (Michael J. Sullivan) in branch 'master': bpo-37017: PyObject_CallMethodObjArgs uses LOAD_METHOD optimization (GH-13516) https://github.com/python/cpython/commit/47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 03:51:03 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 26 May 2019 07:51:03 +0000 Subject: [issue37052] Add examples for mocking async for and async context manager in unittest.mock docs Message-ID: <1558857063.08.0.951093658338.issue37052@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : Since issue26467 implemented AsyncMock along with async dunder methods for MagicMock it enables users to mock async for and async with statements. Currently examples of how to use this is present only in tests and would be good to add it to docs. There is a docs page for mock that contains similar cookbook style examples [0] where I hope these can be added. I can raise a PR with these examples if it's okay. Do you think it's worthy enough to add these examples? Any additional examples you find around asyncio and mock that can be documented ? An example of mocking async for statement by setting return value for __aiter__ method : # aiter_example.py import asyncio from unittest.mock import MagicMock mock = MagicMock() mock.__aiter__.return_value = range(3) async def main(): print([i async for i in mock]) asyncio.run(main()) $ ./python.exe aiter_example.py [0, 1, 2] An example of mocking async with statement by implementing __aenter__ and __aexit__ method. In this example __aenter__ and __aexit__ are not called. __aenter__ and __aexit__ implementations are tested to have been called in the test at [1]. These tests work since MagicMock is returned during attribute access (mock_instance.entered) which is always True in boolean context under assertTrue. I will raise a separate PR to discuss this since normally while mocking __enter__ and __exit__ the class's __enter__ and __exit__ are not used as a side_effect for the mock calls unless they are set explicitly. # aenter_example.py import asyncio from unittest.mock import MagicMock class WithAsyncContextManager: async def __aenter__(self, *args, **kwargs): return self async def __aexit__(self, *args, **kwargs): pass instance = WithAsyncContextManager() mock_instance = MagicMock(instance) async def main(): async with mock_instance as result: print("entered") asyncio.run(main()) ./python.exe aenter_example.py entered [0] https://docs.python.org/3/library/unittest.mock-examples.html [1] https://github.com/python/cpython/blob/47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6/Lib/unittest/test/testmock/testasync.py#L306 ---------- assignee: docs at python components: Documentation messages: 343536 nosy: asvetlov, cjw296, docs at python, lisroach, mariocj89, michael.foord, xtreak, yselivanov priority: normal severity: normal status: open title: Add examples for mocking async for and async context manager in unittest.mock docs type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 04:02:16 2019 From: report at bugs.python.org (Inada Naoki) Date: Sun, 26 May 2019 08:02:16 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1558857736.6.0.918448374629.issue27860@roundup.psfhosted.org> Inada Naoki added the comment: > I was wondering why it was decided against backporting to 3.7? Because I treats this is just a code cleanup. > 6fa84bd12c4b83bee6a41b989363230d5c03b96c fixes an actual bug #35990 (string mask in tuple argument for IPv4Interfaces). I didn't thought it was a bug. I don't know it is real bug which should be backported to 3.7 for now. > Incidentally, there are also no tests for this behavior. Because I thought there are no change about public (documented) behavior. > Just to note: both merged PRs lacked news entry. NEWS entry is not needed for code cleanup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 04:37:20 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 08:37:20 +0000 Subject: [issue37045] Implement PEP 591: add Final qualifier and @final decorator to typing In-Reply-To: <1558808943.82.0.267698974314.issue37045@roundup.psfhosted.org> Message-ID: <1558859840.7.0.304201712826.issue37045@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset f367242d10ef36db38133a39ab7627f63099cba4 by Ivan Levkivskyi in branch 'master': bpo-37045: PEP 591: Add final qualifiers to typing module (GH-13571) https://github.com/python/cpython/commit/f367242d10ef36db38133a39ab7627f63099cba4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 04:37:52 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 08:37:52 +0000 Subject: [issue37046] Implement PEP 586: add Literal type constructor to typing In-Reply-To: <1558811281.19.0.407876730009.issue37046@roundup.psfhosted.org> Message-ID: <1558859872.04.0.754195207367.issue37046@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset b891c465bb7d38a597c5c2ad547d7b19194f4dad by Ivan Levkivskyi in branch 'master': bpo-37046: PEP 586: Add Literal to typing module (#13572) https://github.com/python/cpython/commit/b891c465bb7d38a597c5c2ad547d7b19194f4dad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 04:39:29 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 08:39:29 +0000 Subject: [issue37049] Implement PEP 589: add TypedDict to typing In-Reply-To: <1558813489.97.0.456123370037.issue37049@roundup.psfhosted.org> Message-ID: <1558859969.03.0.325884102577.issue37049@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset 135c6a56e55d2f4f8718b3b9f03ce3c692b15f0f by Ivan Levkivskyi in branch 'master': bpo-37049: PEP 589: Add TypedDict to typing module (GH-13573) https://github.com/python/cpython/commit/135c6a56e55d2f4f8718b3b9f03ce3c692b15f0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 04:43:08 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 08:43:08 +0000 Subject: [issue37049] Implement PEP 589: add TypedDict to typing In-Reply-To: <1558813489.97.0.456123370037.issue37049@roundup.psfhosted.org> Message-ID: <1558860188.26.0.703006477993.issue37049@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 04:43:34 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 08:43:34 +0000 Subject: [issue37046] Implement PEP 586: add Literal type constructor to typing In-Reply-To: <1558811281.19.0.407876730009.issue37046@roundup.psfhosted.org> Message-ID: <1558860214.17.0.421719737467.issue37046@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 04:43:55 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 08:43:55 +0000 Subject: [issue37045] Implement PEP 591: add Final qualifier and @final decorator to typing In-Reply-To: <1558808943.82.0.267698974314.issue37045@roundup.psfhosted.org> Message-ID: <1558860235.25.0.945501489789.issue37045@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 04:55:00 2019 From: report at bugs.python.org (shangdahao) Date: Sun, 26 May 2019 08:55:00 +0000 Subject: [issue31163] Return destination path in Path.rename and Path.replace In-Reply-To: <1502292744.48.0.627996317333.issue31163@psf.upfronthosting.co.za> Message-ID: <1558860900.15.0.0282065941317.issue31163@roundup.psfhosted.org> Change by shangdahao : ---------- keywords: +patch pull_requests: +13489 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 05:19:18 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 26 May 2019 09:19:18 +0000 Subject: [issue37049] Implement PEP 589: add TypedDict to typing In-Reply-To: <1558813489.97.0.456123370037.issue37049@roundup.psfhosted.org> Message-ID: <1558862358.55.0.601810806515.issue37049@roundup.psfhosted.org> SilentGhost added the comment: Either 135c6a56e55d2f4f8718b3b9f03ce3c692b15f0f or b891c465bb7d38a597c5c2ad547d7b19194f4dad (#37046) broke the build. Lib/test/test_typing.py does not round-trip. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 06:09:29 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 26 May 2019 10:09:29 +0000 Subject: [issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess In-Reply-To: <1555808685.63.0.20312678962.issue36686@roundup.psfhosted.org> Message-ID: <1558865369.93.0.315821240358.issue36686@roundup.psfhosted.org> Andrew Svetlov added the comment: Pull Request is welcome! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 06:22:40 2019 From: report at bugs.python.org (Andre Roberge) Date: Sun, 26 May 2019 10:22:40 +0000 Subject: [issue37041] IDLE: path browser unusable on some displays In-Reply-To: <1558779980.36.0.709549198107.issue37041@roundup.psfhosted.org> Message-ID: <1558866160.71.0.454277887607.issue37041@roundup.psfhosted.org> Andre Roberge added the comment: I ran the example you gave and it worked perfectly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 06:31:23 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sun, 26 May 2019 10:31:23 +0000 Subject: [issue37049] Implement PEP 589: add TypedDict to typing In-Reply-To: <1558813489.97.0.456123370037.issue37049@roundup.psfhosted.org> Message-ID: <1558866683.62.0.0875784785947.issue37049@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 06:34:07 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 26 May 2019 10:34:07 +0000 Subject: [issue4356] Add "key" argument to "bisect" module functions In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za> Message-ID: <1558866847.08.0.723549364763.issue4356@roundup.psfhosted.org> R?mi Lapeyre added the comment: I think it could be done with `key=lambda item: -item` if the key argument is added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 07:35:55 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 May 2019 11:35:55 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558870555.11.0.323291878064.issue37039@roundup.psfhosted.org> Serhiy Storchaka added the comment: I do not have "Zoom/Restore Height". I have only "Restore Height" which maximizes the height. The result looks identical with and without PR 13576 applied. There is no overlapping nor gap between the IDLE windows and the bottom panel. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 08:41:33 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sun, 26 May 2019 12:41:33 +0000 Subject: [issue37053] Tools/parser/unparse.py does not handle u"bar" correctly Message-ID: <1558874493.33.0.876031748189.issue37053@roundup.psfhosted.org> New submission from Chih-Hsuan Yen : Currently (135c6a56e55d2f4f8718b3b9f03ce3c692b15f0f) the following test fails: ./python -m test.regrtest -v test_tools.test_unparse -u cpu (Note that -u cpu is needed to force test_unparse.DirectoryTestCase to check all files under Lib/ and Lib/test/.) An example error message: ====================================================================== FAIL: test_files (test.test_tools.test_unparse.DirectoryTestCase) (filename='/home/yen/Projects/cpython/Lib/test/test_typing.py' ) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/yen/Projects/cpython/Lib/test/test_tools/test_unparse.py", line 309, in test_files self.check_roundtrip(source) File "/home/yen/Projects/cpython/Lib/test/test_tools/test_unparse.py", line 132, in check_roundtrip self.assertASTEqual(ast1, ast2) File "/home/yen/Projects/cpython/Lib/test/test_tools/test_unparse.py", line 124, in assertASTEqual self.assertEqual(ast.dump(ast1), ast.dump(ast2)) AssertionError: 'Modu[88178 chars]kind=\'u\')], ctx=Load())), ctx=Load()))], dec[421987 chars]=[])' != 'Modu[88178 chars]kind=No ne)], ctx=Load())), ctx=Load()))], deco[421986 chars]=[])' ---------------------------------------------------------------------- Apparently that's because Tools/parser/unparse.py does not handle strings like u"bar" correctly. I managed to "fix" it with the following patch: diff --git a/Tools/parser/unparse.py b/Tools/parser/unparse.py index 385902ef4b..a25b5e49df 100644 --- a/Tools/parser/unparse.py +++ b/Tools/parser/unparse.py @@ -399,6 +399,8 @@ class Unparser: elif value is ...: self.write("...") else: + if t.kind == 'u': + self.write("u") self._write_constant(t.value) def _List(self, t): Not sure if this is the correct approach, though. ---------- components: Demos and Tools messages: 343546 nosy: yan12125 priority: normal severity: normal status: open title: Tools/parser/unparse.py does not handle u"bar" correctly type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 08:45:24 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sun, 26 May 2019 12:45:24 +0000 Subject: [issue37049] Implement PEP 589: add TypedDict to typing In-Reply-To: <1558813489.97.0.456123370037.issue37049@roundup.psfhosted.org> Message-ID: <1558874724.12.0.0936043309722.issue37049@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: Regarding the round-trip issue in Lib/test/test_typing.py mentioned by SilentGhost: Apparently the following line added in b891c465bb7d38a597c5c2ad547d7b19194f4dad triggers an issue in Tools/parser/unparse.py Literal[b"foo", u"bar"] As this is more likely an issue in unparse.py instead of test_typing.py, I opened another ticket for tracking: #37053. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 09:12:03 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 May 2019 13:12:03 +0000 Subject: [issue37053] Tools/parser/unparse.py does not handle u"bar" correctly In-Reply-To: <1558874493.33.0.876031748189.issue37053@roundup.psfhosted.org> Message-ID: <1558876323.82.0.807496006486.issue37053@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +easy nosy: +gvanrossum stage: -> needs patch type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 09:54:59 2019 From: report at bugs.python.org (Neil Girdhar) Date: Sun, 26 May 2019 13:54:59 +0000 Subject: [issue4356] Add "key" argument to "bisect" module functions In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za> Message-ID: <1558878899.24.0.103045834024.issue4356@roundup.psfhosted.org> Neil Girdhar added the comment: The problem with `key=lambda item: -item` is that item cannot always be easily negated. For example, tuples are often used as keys. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 10:25:52 2019 From: report at bugs.python.org (Mark Shannon) Date: Sun, 26 May 2019 14:25:52 +0000 Subject: [issue28866] Type cache is not correctly invalidated on a class defining mro() In-Reply-To: <1480862145.72.0.468660451957.issue28866@psf.upfronthosting.co.za> Message-ID: <1558880752.44.0.699010515557.issue28866@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 180dc1b0f4a57c3f66351568ae8488fa8576d7f0 by Mark Shannon (Julien Palard) in branch 'master': bpo-28866: No type cache for types with specialized mro, invalidation is hard. (#13157) https://github.com/python/cpython/commit/180dc1b0f4a57c3f66351568ae8488fa8576d7f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 10:25:52 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 26 May 2019 14:25:52 +0000 Subject: [issue4356] Add "key" argument to "bisect" module functions In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za> Message-ID: <1558880752.33.0.822360328328.issue4356@roundup.psfhosted.org> R?mi Lapeyre added the comment: Can you not use functools.cmp_to_key() for this? Here's an example: >>> import bisect, functools >>> l = [('f', 5), ('d', 3), ('c', 2), ('b', 1), ('a', 0)] >>> def cmp(a, b): ... if a > b: return -1 ... if a < b: return 1 ... return 0 ... >>> bisect.bisect(l, ('e', 4), key=functools.cmp_to_key(cmp)) 1 >>> l [('f', 5), ('d', 3), ('c', 2), ('b', 1), ('a', 0)] >>> bisect.insort(l, ('e', 4), key=functools.cmp_to_key(cmp)) >>> l [('f', 5), ('e', 4), ('d', 3), ('c', 2), ('b', 1), ('a', 0)] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 10:26:05 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 26 May 2019 14:26:05 +0000 Subject: [issue4356] Add "key" argument to "bisect" module functions In-Reply-To: <1227115048.67.0.318831592843.issue4356@psf.upfronthosting.co.za> Message-ID: <1558880765.34.0.916401637426.issue4356@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 10:28:14 2019 From: report at bugs.python.org (Mark Shannon) Date: Sun, 26 May 2019 14:28:14 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1558880894.02.0.722242410248.issue27639@roundup.psfhosted.org> Mark Shannon added the comment: New changeset f3d909428c7c61ea32e8fbb9c8b48344e7904a53 by Mark Shannon (Michael Blahay) in branch '3.7': BPO-27639: Correct return type for UserList slicing operation (#13203) https://github.com/python/cpython/commit/f3d909428c7c61ea32e8fbb9c8b48344e7904a53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 10:54:40 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 26 May 2019 14:54:40 +0000 Subject: [issue37054] Ignored exceptions in test_memoryio Message-ID: <1558882480.22.0.119118964732.issue37054@roundup.psfhosted.org> New submission from Antoine Pitrou : I see the following kind of exceptions when running test_memoryio: Exception ignored in: Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/antoine/cpython/default/Lib/_pyio.py", line 2152, in close if self.buffer is not None and not self.closed: File "/home/antoine/cpython/default/Lib/_pyio.py", line 2093, in buffer return self._buffer AttributeError: 'StringIO' object has no attribute '_buffer' Exception ignored in: Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/antoine/cpython/default/Lib/_pyio.py", line 2152, in close if self.buffer is not None and not self.closed: File "/home/antoine/cpython/default/Lib/_pyio.py", line 2093, in buffer return self._buffer AttributeError: 'StringIO' object has no attribute '_buffer' ok It seems this could be related to issue18748. ---------- components: Library (Lib), Tests messages: 343552 nosy: pitrou, vstinner priority: normal severity: normal status: open title: Ignored exceptions in test_memoryio type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 11:10:14 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 26 May 2019 15:10:14 +0000 Subject: [issue36785] Implement PEP 574 In-Reply-To: <1556908101.83.0.107763193732.issue36785@roundup.psfhosted.org> Message-ID: <1558883414.41.0.218748315869.issue36785@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 91f4380cedbae32b49adbea2518014a5624c6523 by Antoine Pitrou in branch 'master': bpo-36785: PEP 574 implementation (GH-7076) https://github.com/python/cpython/commit/91f4380cedbae32b49adbea2518014a5624c6523 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 11:16:42 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 15:16:42 +0000 Subject: [issue37053] Tools/parser/unparse.py does not handle u"bar" correctly In-Reply-To: <1558874493.33.0.876031748189.issue37053@roundup.psfhosted.org> Message-ID: <1558883802.74.0.266706334918.issue37053@roundup.psfhosted.org> Ivan Levkivskyi added the comment: On the other hand, if this causes troubles, feel free to just replace u"bar" with "bar" in that test. It is not really important. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 11:57:23 2019 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 May 2019 15:57:23 +0000 Subject: [issue37048] ssl module: QUIC support for HTTP/3 In-Reply-To: <1558813454.34.0.910569571788.issue37048@roundup.psfhosted.org> Message-ID: <1558886243.94.0.818430330042.issue37048@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for your feedback! So far I actively refrained from exposing or implementing any encryption primitives and API like AES, ChaCha20, and ECDSA. I'm worried about potential legal issues and export control restrictions. I have to talk to VanL first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:08:52 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 26 May 2019 16:08:52 +0000 Subject: [issue37055] Numerous warnings with blake2 module Message-ID: <1558886932.4.0.665756848832.issue37055@roundup.psfhosted.org> New submission from R?mi Lapeyre : Issue 33164 (commit 51aa35e9e17eef60d04add9619fe2a7eb938358c) introduced numerous new warnings on MacOS: /Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:192:9: warning: 'blake2b_init' macro redefined [-Wmacro-redefined] #define blake2b_init BLAKE2_IMPL_NAME(blake2b_init) ^ /Users/remi/src/cpython/Modules/_blake2/blake2ns.h:10:9: note: previous definition is here #define blake2b_init PyBlake2_blake2b_init ^ In file included from /Users/remi/src/cpython/Modules/_blake2/blake2b_impl.c:32: /Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:193:9: warning: 'blake2b_init_param' macro redefined [-Wmacro-redefined] #define blake2b_init_param BLAKE2_IMPL_NAME(blake2b_init_param) ^ /Users/remi/src/cpython/Modules/_blake2/blake2ns.h:12:9: note: previous definition is here #define blake2b_init_param PyBlake2_blake2b_init_param ^ In file included from /Users/remi/src/cpython/Modules/_blake2/blake2b_impl.c:32: /Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:194:9: warning: 'blake2b_init_key' macro redefined [-Wmacro-redefined] #define blake2b_init_key BLAKE2_IMPL_NAME(blake2b_init_key) ^ /Users/remi/src/cpython/Modules/_blake2/blake2ns.h:11:9: note: previous definition is here #define blake2b_init_key PyBlake2_blake2b_init_key ^ In file included from /Users/remi/src/cpython/Modules/_blake2/blake2b_impl.c:32: /Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:195:9: warning: 'blake2b_update' macro redefined [-Wmacro-redefined] #define blake2b_update BLAKE2_IMPL_NAME(blake2b_update) ^ /Users/remi/src/cpython/Modules/_blake2/blake2ns.h:13:9: note: previous definition is here #define blake2b_update PyBlake2_blake2b_update ^ In file included from /Users/remi/src/cpython/Modules/_blake2/blake2b_impl.c:32: /Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:196:9: warning: 'blake2b_final' macro redefined [-Wmacro-redefined] #define blake2b_final BLAKE2_IMPL_NAME(blake2b_final) ^ /Users/remi/src/cpython/Modules/_blake2/blake2ns.h:9:9: note: previous definition is here #define blake2b_final PyBlake2_blake2b_final ^ In file included from /Users/remi/src/cpython/Modules/_blake2/blake2b_impl.c:32: /Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:197:9: warning: 'blake2b' macro redefined [-Wmacro-redefined] #define blake2b BLAKE2_IMPL_NAME(blake2b) ^ /Users/remi/src/cpython/Modules/_blake2/blake2ns.h:7:9: note: previous definition is here #define blake2b PyBlake2_blake2b I'm not sure what should be the public API exactly and where to fix that. ---------- messages: 343556 nosy: remi.lapeyre priority: normal severity: normal status: open title: Numerous warnings with blake2 module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:28:29 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 May 2019 16:28:29 +0000 Subject: [issue37021] Can _random.getrandbits() be converted to METH_FASTCALL? In-Reply-To: <1558628978.37.0.828538752056.issue37021@roundup.psfhosted.org> Message-ID: <1558888109.17.0.46066517498.issue37021@roundup.psfhosted.org> Raymond Hettinger added the comment: This looks good. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:32:12 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 26 May 2019 16:32:12 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558888332.17.0.557084114911.issue37011@roundup.psfhosted.org> R?mi Lapeyre added the comment: > The proposed change is not backward compatible. Indeed, I missed that thanks. I think I could fix that. > A motivation for this change should be provided first Is getting accurate coverage reports not enough? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:32:14 2019 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 May 2019 16:32:14 +0000 Subject: [issue37055] Numerous warnings with blake2 module In-Reply-To: <1558886932.4.0.665756848832.issue37055@roundup.psfhosted.org> Message-ID: <1558888334.36.0.336777752877.issue37055@roundup.psfhosted.org> Christian Heimes added the comment: The file blake2ns.h renames some of the exported constants to prefix them with PyBlake2_foo. The file needs to be updated every time the sources are updated. I'll look into the issue. ---------- nosy: +christian.heimes, inada.naoki priority: normal -> deferred blocker versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:32:46 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 26 May 2019 16:32:46 +0000 Subject: [issue37053] Tools/parser/unparse.py does not handle u"bar" correctly In-Reply-To: <1558874493.33.0.876031748189.issue37053@roundup.psfhosted.org> Message-ID: <1558888366.69.0.295566773696.issue37053@roundup.psfhosted.org> Guido van Rossum added the comment: Please submit a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:36:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 26 May 2019 16:36:06 +0000 Subject: [issue37056] test_tools is failing on several buildbots Message-ID: <1558888566.71.0.0627400605993.issue37056@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : BUILDBOT FAILURE REPORT ======================= Builder name: AMD64 Debian root 3.x Builder url: https://buildbot.python.org/all/#/builders/27/ Build url: https://buildbot.python.org/all/#/builders/27/builds/3006 Failed tests ------------ - test_files (test.test_tools.test_unparse.DirectoryTestCase) (filename='/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_typing.py') Test leaking resources ---------------------- Build summary ------------- == Tests result: FAILURE then FAILURE == 401 tests OK. 10 slowest tests: - test_concurrent_futures: 2 min 57 sec - test_multiprocessing_spawn: 2 min 22 sec - test_tools: 2 min 3 sec - test_multiprocessing_forkserver: 1 min 31 sec - test_multiprocessing_fork: 1 min 10 sec - test_tokenize: 1 min 2 sec - test_asyncio: 48 sec 814 ms - test_lib2to3: 42 sec 344 ms - test_io: 41 sec 325 ms - test_nntplib: 41 sec 260 ms 1 test failed: test_tools 20 tests skipped: test_devpoll test_gdb test_idle test_ioctl test_kqueue test_msilib test_ossaudiodev test_smtpnet test_ssl test_startfile test_tcl test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio test_winreg test_winsound test_zipfile64 1 re-run test: test_tools Total duration: 15 min 26 sec Tracebacks ---------- ```traceback Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_tools/test_unparse.py", line 309, in test_files self.check_roundtrip(source) File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_tools/test_unparse.py", line 132, in check_roundtrip self.assertASTEqual(ast1, ast2) File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_tools/test_unparse.py", line 124, in assertASTEqual self.assertEqual(ast.dump(ast1), ast.dump(ast2)) AssertionError: 'Modu[88178 chars]kind=\'u\')], ctx=Load())), ctx=Load()))], dec[421987 chars]=[])' != 'Modu[88178 chars]kind=None)], ctx=Load())), ctx=Load()))], deco[421986 chars]=[])' ``` Current builder status ---------------------- The builder is failing currently Other builds with similar failures ---------------------------------- - https://buildbot.python.org/all/#/builders/99/builds/2698 - https://buildbot.python.org/all/#/builders/99/builds/2699 - https://buildbot.python.org/all/#/builders/99/builds/2700 - https://buildbot.python.org/all/#/builders/85/builds/2834 - https://buildbot.python.org/all/#/builders/85/builds/2835 - https://buildbot.python.org/all/#/builders/85/builds/2836 - https://buildbot.python.org/all/#/builders/40/builds/2326 - https://buildbot.python.org/all/#/builders/40/builds/2327 - https://buildbot.python.org/all/#/builders/40/builds/2328 - https://buildbot.python.org/all/#/builders/176/builds/541 - https://buildbot.python.org/all/#/builders/176/builds/542 - https://buildbot.python.org/all/#/builders/176/builds/543 - https://buildbot.python.org/all/#/builders/141/builds/1824 - https://buildbot.python.org/all/#/builders/141/builds/1825 - https://buildbot.python.org/all/#/builders/145/builds/1705 - https://buildbot.python.org/all/#/builders/145/builds/1706 - https://buildbot.python.org/all/#/builders/145/builds/1707 - https://buildbot.python.org/all/#/builders/167/builds/1069 - https://buildbot.python.org/all/#/builders/167/builds/1070 - https://buildbot.python.org/all/#/builders/167/builds/1071 - https://buildbot.python.org/all/#/builders/3/builds/2740 - https://buildbot.python.org/all/#/builders/3/builds/2741 - https://buildbot.python.org/all/#/builders/3/builds/2742 - https://buildbot.python.org/all/#/builders/47/builds/2875 - https://buildbot.python.org/all/#/builders/47/builds/2876 - https://buildbot.python.org/all/#/builders/27/builds/3007 - https://buildbot.python.org/all/#/builders/27/builds/3008 - https://buildbot.python.org/all/#/builders/53/builds/3013 - https://buildbot.python.org/all/#/builders/53/builds/3014 - https://buildbot.python.org/all/#/builders/53/builds/3015 - https://buildbot.python.org/all/#/builders/21/builds/3027 - https://buildbot.python.org/all/#/builders/21/builds/3028 - https://buildbot.python.org/all/#/builders/21/builds/3029 - https://buildbot.python.org/all/#/builders/13/builds/3040 - https://buildbot.python.org/all/#/builders/13/builds/3041 - https://buildbot.python.org/all/#/builders/13/builds/3042 - https://buildbot.python.org/all/#/builders/12/builds/2557 - https://buildbot.python.org/all/#/builders/12/builds/2558 - https://buildbot.python.org/all/#/builders/12/builds/2559 ---------- components: Tests messages: 343561 nosy: pablogsal priority: normal severity: normal status: open title: test_tools is failing on several buildbots versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:37:10 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 26 May 2019 16:37:10 +0000 Subject: [issue37056] test_tools is failing on several buildbots In-Reply-To: <1558888566.71.0.0627400605993.issue37056@roundup.psfhosted.org> Message-ID: <1558888630.4.0.230509683155.issue37056@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This seems a failure caused after merging either PEP589 or PEP586 ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:39:27 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 26 May 2019 16:39:27 +0000 Subject: [issue37056] test_tools is failing on several buildbots In-Reply-To: <1558888566.71.0.0627400605993.issue37056@roundup.psfhosted.org> Message-ID: <1558888767.92.0.0136094437899.issue37056@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue37053 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:40:12 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 16:40:12 +0000 Subject: [issue37056] test_tools is failing on several buildbots In-Reply-To: <1558888566.71.0.0627400605993.issue37056@roundup.psfhosted.org> Message-ID: <1558888812.86.0.776610518147.issue37056@roundup.psfhosted.org> Ivan Levkivskyi added the comment: Duplicate of https://bugs.python.org/issue37053 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:45:47 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 26 May 2019 16:45:47 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558889147.39.0.201852041984.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: When you start, it should say 'Zoom Height', then 'Restore Height' after you maximize. But if on a screen small enough that the initial height is the same as zoomed, IDLE might get confused. No change on Linux in the PR is the intention, so that is good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:46:29 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sun, 26 May 2019 16:46:29 +0000 Subject: [issue37053] Tools/parser/unparse.py does not handle u"bar" correctly In-Reply-To: <1558874493.33.0.876031748189.issue37053@roundup.psfhosted.org> Message-ID: <1558889189.24.0.663114111513.issue37053@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- keywords: +patch pull_requests: +13490 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 12:56:08 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sun, 26 May 2019 16:56:08 +0000 Subject: [issue37053] Tools/parser/unparse.py does not handle u"bar" correctly In-Reply-To: <1558874493.33.0.876031748189.issue37053@roundup.psfhosted.org> Message-ID: <1558889768.94.0.0474180773387.issue37053@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: After reading Python/ast.c, I think my patch is correct, so I submitted it to GitHub as https://github.com/python/cpython/pull/13583 :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:08:23 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 26 May 2019 17:08:23 +0000 Subject: [issue37053] Tools/parser/unparse.py does not handle u"bar" correctly In-Reply-To: <1558874493.33.0.876031748189.issue37053@roundup.psfhosted.org> Message-ID: <1558890503.24.0.603614768572.issue37053@roundup.psfhosted.org> miss-islington added the comment: New changeset aaf47caf35984e614d93bd8bea5227df55e0e3e6 by Miss Islington (bot) (Chih-Hsuan Yen) in branch 'master': bpo-37053: handle strings like u"bar" correctly in Tools/parser/unparse.py (GH-13583) https://github.com/python/cpython/commit/aaf47caf35984e614d93bd8bea5227df55e0e3e6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:10:39 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 26 May 2019 17:10:39 +0000 Subject: [issue37053] Tools/parser/unparse.py does not handle u"bar" correctly In-Reply-To: <1558874493.33.0.876031748189.issue37053@roundup.psfhosted.org> Message-ID: <1558890639.58.0.737137104639.issue37053@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Confirmed that this fixes the broken buildbots: ./python -m test test_tools -vvvv -uall -m test_files == CPython 3.8.0a4+ (heads/master:91f4380ced, May 26 2019, 17:30:21) [GCC 8.3.0] == Linux-5.0.15-1-MANJARO-x86_64-with-glibc2.29 little-endian == cwd: /home/pablogsal/github/cpython/build/test_python_25649 == CPU count: 12 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 load avg: 0.50 [1/1] test_tools test_files (test.test_tools.test_unparse.DirectoryTestCase) ... Testing /home/pablogsal/github/cpython/Lib/typing.py Testing /home/pablogsal/github/cpython/Lib/test/test_typing.py ok Ran 1 test in 0.586s OK == Tests result: SUCCESS == 1 test OK. Total duration: 671 ms Tests result: SUCCESS The manual check is needed because the CI in GitHub does not run test_tools over all files so it does not take forever. ---------- nosy: +pablogsal resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:26:18 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 26 May 2019 17:26:18 +0000 Subject: [issue35753] Importing call from unittest.mock directly causes ValueError In-Reply-To: <1547669844.88.0.953853980523.issue35753@roundup.psfhosted.org> Message-ID: <1558891578.51.0.507473195823.issue35753@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: duplicate -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:30:05 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 26 May 2019 17:30:05 +0000 Subject: [issue37057] suspicious.py sphinx extension access non-existing attribute. Message-ID: <1558891805.96.0.441991162477.issue37057@roundup.psfhosted.org> New submission from Matthias Bussonnier : On a local branch with some modified docs ``` Traceback (most recent call last): File "/Users/bussonniermatthias/dev/cpython/Doc/venv/lib/python3.8/site-packages/sphinx/cmd/build.py", line 284, in build_main app.build(args.force_all, filenames) File "/Users/bussonniermatthias/dev/cpython/Doc/venv/lib/python3.8/site-packages/sphinx/application.py", line 337, in build self.builder.build_update() File "/Users/bussonniermatthias/dev/cpython/Doc/venv/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 324, in build_update self.build(to_build, File "/Users/bussonniermatthias/dev/cpython/Doc/venv/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 392, in build self.finish() File "/Users/bussonniermatthias/dev/cpython/Doc/tools/extensions/suspicious.py", line 118, in finish self.warn('Found %s/%s unused rules:' % AttributeError: 'CheckSuspiciousMarkupBuilder' object has no attribute 'warn' ``` My guess is that it should be self.logger.warn, and not self.warn. ---------- messages: 343569 nosy: mbussonn priority: normal severity: normal status: open title: suspicious.py sphinx extension access non-existing attribute. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:32:39 2019 From: report at bugs.python.org (Michael Blahay) Date: Sun, 26 May 2019 17:32:39 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1558891959.98.0.997982456363.issue27639@roundup.psfhosted.org> Michael Blahay added the comment: Thank you Mark. Everything for this one is complete. The issue may be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:34:49 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 26 May 2019 17:34:49 +0000 Subject: [issue37057] suspicious.py sphinx extension access non-existing attribute. In-Reply-To: <1558891805.96.0.441991162477.issue37057@roundup.psfhosted.org> Message-ID: <1558892089.11.0.627602430487.issue37057@roundup.psfhosted.org> SilentGhost added the comment: This looks like a duplicate of #36853. Do you happen to have sphinx 2 installed? ---------- assignee: -> docs at python components: +Documentation nosy: +SilentGhost, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:36:51 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 26 May 2019 17:36:51 +0000 Subject: [issue27639] UserList.__getitem__ doesn't account for slices In-Reply-To: <1469686507.89.0.362648270021.issue27639@psf.upfronthosting.co.za> Message-ID: <1558892211.32.0.0755417072271.issue27639@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:37:49 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 26 May 2019 17:37:49 +0000 Subject: [issue37057] suspicious.py sphinx extension access non-existing attribute. In-Reply-To: <1558891805.96.0.441991162477.issue37057@roundup.psfhosted.org> Message-ID: <1558892269.18.0.412980030954.issue37057@roundup.psfhosted.org> Matthias Bussonnier added the comment: Oh yeah, I do... and you are right this is duplicate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:37:55 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 26 May 2019 17:37:55 +0000 Subject: [issue37057] suspicious.py sphinx extension access non-existing attribute. In-Reply-To: <1558891805.96.0.441991162477.issue37057@roundup.psfhosted.org> Message-ID: <1558892275.51.0.361804513435.issue37057@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:38:37 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 26 May 2019 17:38:37 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1558892317.74.0.0258477434521.issue36853@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:50:11 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 26 May 2019 17:50:11 +0000 Subject: [issue37057] suspicious.py sphinx extension access non-existing attribute. In-Reply-To: <1558891805.96.0.441991162477.issue37057@roundup.psfhosted.org> Message-ID: <1558893011.66.0.351646069466.issue37057@roundup.psfhosted.org> Change by SilentGhost : ---------- superseder: -> inconsistencies in docs builds (Sphinx 2) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:54:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 26 May 2019 17:54:02 +0000 Subject: [issue35753] Importing call from unittest.mock directly causes ValueError In-Reply-To: <1547669844.88.0.953853980523.issue35753@roundup.psfhosted.org> Message-ID: <1558893242.33.0.365931968013.issue35753@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > The actual bug appears to be "doctest can't run on a module that contains un-unwrappable objects" Is it the below example scenario being discussed in the issue? Since call is imported it's also present in obj.__dict__ and hence trying to unwrap it [0] could cause error. This is also mentioned in https://bugs.python.org/issue25532#msg253885 against which this issue was closed. > This can occur when you use doctest.DocTestSuite to load doc tests from a module where unittest.mock.call has been imported. # bpo35753.py from unittest.mock import call ./python.exe -m doctest bpo35753.py Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", line 2785, in sys.exit(_test()) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", line 2775, in _test failures, _ = testmod(m, verbose=verbose, optionflags=options) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", line 1947, in testmod for test in finder.find(m, name, globs=globs, extraglobs=extraglobs): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", line 932, in find self._find(tests, obj, name, module, source_lines, globs, {}) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", line 991, in _find if ((inspect.isroutine(inspect.unwrap(val)) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", line 524, in unwrap raise ValueError('wrapper loop when unwrapping {!r}'.format(f)) ValueError: wrapper loop when unwrapping call [0] https://github.com/python/cpython/blob/aaf47caf35984e614d93bd8bea5227df55e0e3e6/Lib/doctest.py#L991 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:57:11 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 26 May 2019 17:57:11 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1558893431.34.0.708497875905.issue36853@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also https://github.com/python/cpython/pull/13579 that replaces self.warn with self.logger.warn in Doc/tools/extensions/suspicious.py ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 13:59:02 2019 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sun, 26 May 2019 17:59:02 +0000 Subject: [issue18564] Fix Bluetooth address parser In-Reply-To: <1374861545.82.0.430674187566.issue18564@psf.upfronthosting.co.za> Message-ID: <1558893542.68.0.955729641233.issue18564@roundup.psfhosted.org> Change by Michele Orr? : ---------- title: Integer overflow in the socket function parsing a Bluetooth address -> Fix Bluetooth address parser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 14:27:45 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 May 2019 18:27:45 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1558895265.34.0.453598523886.issue36772@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset b821868e6d909f4805499db519ebc2cdc01cf611 by Raymond Hettinger in branch 'master': bpo-36772 Allow lru_cache to be used as decorator without making a function call (GH-13048) https://github.com/python/cpython/commit/b821868e6d909f4805499db519ebc2cdc01cf611 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 14:52:14 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 18:52:14 +0000 Subject: [issue37058] Implement PEP 544: add Protocol to typing Message-ID: <1558896734.9.0.411733767258.issue37058@roundup.psfhosted.org> New submission from Ivan Levkivskyi : The implementation would be basically copying some code from `typing_extension` and fixing some important known issues (such as renaming @runtime to @runtime_checkable and allowing sub-protocols of builtin protocols). Also ideally we should get rid of the metaclass `_ProtocolMeta`. ---------- assignee: levkivskyi components: Library (Lib) messages: 343576 nosy: gvanrossum, levkivskyi, lukasz.langa priority: normal severity: normal stage: needs patch status: open title: Implement PEP 544: add Protocol to typing type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 14:53:21 2019 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 26 May 2019 18:53:21 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558896801.84.0.853188681975.issue37011@roundup.psfhosted.org> Xavier de Gaye added the comment: > Is getting accurate coverage reports not enough? But it does not achieve that goal, does it ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 15:02:14 2019 From: report at bugs.python.org (hai shi) Date: Sun, 26 May 2019 19:02:14 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1558897334.69.0.0975509201299.issue33071@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +13491 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/13584 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 15:03:27 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 19:03:27 +0000 Subject: [issue37058] Implement PEP 544: add Protocol to typing In-Reply-To: <1558896734.9.0.411733767258.issue37058@roundup.psfhosted.org> Message-ID: <1558897407.24.0.0685557222858.issue37058@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- keywords: +patch pull_requests: +13492 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13585 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 15:11:52 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 26 May 2019 19:11:52 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1558897912.76.0.933535536429.issue36853@roundup.psfhosted.org> Jason R. Coombs added the comment: > I've just locally ran sphinx 2.0.0 on 071cbd4ea1 (the current tip of your PR) and I'm not getting any error, which one are you getting? The issue occurs on 2347d3ae36 with `make suspicious` with Sphinx 2.0.0 and 2.0.1. ``` Doc 2347d3ae36 $ make suspicious mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build -b suspicious -d build/doctrees -D latex_elements.papersize= -W . build/suspicious Running Sphinx v2.0.1 loading ignore rules... done, 352 rules loaded building [mo]: targets for 0 po files that are out of date building [suspicious]: targets for 476 source files that are out of date updating environment: 476 added, 0 changed, 0 removed /Users/jaraco/code/public/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead. env.note_versionchange('deprecated', version[0], node, self.lineno) reading sources... [100%] whatsnew/index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 53%] library/importlib.metadata Exception occurred: File "/Users/jaraco/code/public/cpython/Doc/tools/extensions/suspicious.py", line 154, in report_issue self.warn('[%s:%d] "%s" found in "%-.120s"' % AttributeError: 'CheckSuspiciousMarkupBuilder' object has no attribute 'warn' The full traceback has been saved in /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/sphinx-err-g3i65y10.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at . Thanks! make[1]: *** [build] Error 2 make: *** [suspicious] Error 1 Suspicious check complete; look for any errors in the above output or in build/suspicious/suspicious.csv. If all issues are false positives, append that file to tools/susp-ignored.csv. ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 15:14:29 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 May 2019 19:14:29 +0000 Subject: [issue36772] Let lru_cache be used as a decorator with no arguments In-Reply-To: <1556757609.15.0.729025293802.issue36772@roundup.psfhosted.org> Message-ID: <1558898069.11.0.912938444661.issue36772@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 15:15:52 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 May 2019 19:15:52 +0000 Subject: [issue37051] Glossary item "hashable" incorrect In-Reply-To: <1558818653.08.0.592312048855.issue37051@roundup.psfhosted.org> Message-ID: <1558898152.79.0.737391607361.issue37051@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 15:16:26 2019 From: report at bugs.python.org (Simon Bernier St-Pierre) Date: Sun, 26 May 2019 19:16:26 +0000 Subject: [issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess In-Reply-To: <1555808685.63.0.20312678962.issue36686@roundup.psfhosted.org> Message-ID: <1558898186.23.0.847545551462.issue36686@roundup.psfhosted.org> Change by Simon Bernier St-Pierre : ---------- keywords: +patch pull_requests: +13493 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 15:21:45 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 May 2019 19:21:45 +0000 Subject: [issue37051] Glossary item "hashable" incorrect In-Reply-To: <1558818653.08.0.592312048855.issue37051@roundup.psfhosted.org> Message-ID: <1558898505.77.0.930158543476.issue37051@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +13494 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13587 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 15:26:55 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 May 2019 19:26:55 +0000 Subject: [issue29696] Use namedtuple in string.Formatter.parse iterator response In-Reply-To: <1488468843.51.0.704010418399.issue29696@psf.upfronthosting.co.za> Message-ID: <1558898815.15.0.511157141163.issue29696@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 15:28:40 2019 From: report at bugs.python.org (hai shi) Date: Sun, 26 May 2019 19:28:40 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1558898920.96.0.650278276469.issue33071@roundup.psfhosted.org> hai shi added the comment: hi, everyone. I am a freshman,so let me do it from easy issues:) ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 16:10:20 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 26 May 2019 20:10:20 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558901420.89.0.784708939104.issue37032@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 16:28:30 2019 From: report at bugs.python.org (Erika) Date: Sun, 26 May 2019 20:28:30 +0000 Subject: [issue37059] Pre-compile Directive to Remind Coders that Men are Pigs Message-ID: <1558902510.44.0.685577940512.issue37059@roundup.psfhosted.org> New submission from Erika : Guido Van Rossum recently let the community know that sexism is keeping women away from Python. A simple directive at the top of each py file would help remind us. Throw an error unless #MenArePigs is not in line-1 of the file. ---------- assignee: docs at python components: Documentation messages: 343580 nosy: docs at python, erika1998 priority: normal severity: normal status: open title: Pre-compile Directive to Remind Coders that Men are Pigs versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 16:31:43 2019 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 26 May 2019 20:31:43 +0000 Subject: [issue37059] Pre-compile Directive to Remind Coders that Men are Pigs In-Reply-To: <1558902510.44.0.685577940512.issue37059@roundup.psfhosted.org> Message-ID: <1558902703.7.0.944151422724.issue37059@roundup.psfhosted.org> Change by Mariatta Wijaya : ---------- assignee: docs at python -> nosy: -docs at python resolution: -> rejected stage: -> resolved status: open -> closed versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 16:37:51 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 26 May 2019 20:37:51 +0000 Subject: [issue37059] spam In-Reply-To: <1558902510.44.0.685577940512.issue37059@roundup.psfhosted.org> Message-ID: <1558903071.87.0.00988225127601.issue37059@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: -erika1998 title: Pre-compile Directive to Remind Coders that Men are Pigs -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 16:38:02 2019 From: report at bugs.python.org (SilentGhost) Date: Sun, 26 May 2019 20:38:02 +0000 Subject: [issue37059] spam Message-ID: <1558903082.56.0.56070319096.issue37059@roundup.psfhosted.org> Change by SilentGhost : ---------- Removed message: https://bugs.python.org/msg343580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 16:56:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 26 May 2019 20:56:02 +0000 Subject: [issue28866] Type cache is not correctly invalidated on a class defining mro() In-Reply-To: <1558880752.44.0.699010515557.issue28866@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: Well done Julien ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 16:59:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 26 May 2019 20:59:23 +0000 Subject: [issue28866] Type cache is not correctly invalidated on a class defining mro() In-Reply-To: <1480862145.72.0.468660451957.issue28866@psf.upfronthosting.co.za> Message-ID: <1558904363.98.0.883435983391.issue28866@roundup.psfhosted.org> STINNER Victor added the comment: Python 2.7 and 3 7 should be fixed as well, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 17:15:04 2019 From: report at bugs.python.org (ppperry) Date: Sun, 26 May 2019 21:15:04 +0000 Subject: [issue35753] Importing call from unittest.mock directly causes ValueError In-Reply-To: <1547669844.88.0.953853980523.issue35753@roundup.psfhosted.org> Message-ID: <1558905304.81.0.434474513655.issue35753@roundup.psfhosted.org> Change by ppperry : ---------- nosy: -ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 17:27:38 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 May 2019 21:27:38 +0000 Subject: [issue37045] Implement PEP 591: add Final qualifier and @final decorator to typing In-Reply-To: <1558808943.82.0.267698974314.issue37045@roundup.psfhosted.org> Message-ID: <1558906058.1.0.0396653360059.issue37045@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- pull_requests: +13495 pull_request: https://github.com/python/cpython/pull/13588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 17:42:31 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Sun, 26 May 2019 21:42:31 +0000 Subject: [issue30202] Update test.test_importlib.test_abc to test find_spec() In-Reply-To: <1493416572.94.0.214494308366.issue30202@psf.upfronthosting.co.za> Message-ID: <1558906951.34.0.724988082665.issue30202@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 17:50:15 2019 From: report at bugs.python.org (Julien Palard) Date: Sun, 26 May 2019 21:50:15 +0000 Subject: [issue28866] Type cache is not correctly invalidated on a class defining mro() In-Reply-To: <1480862145.72.0.468660451957.issue28866@psf.upfronthosting.co.za> Message-ID: <1558907415.2.0.0304562733456.issue28866@roundup.psfhosted.org> Julien Palard added the comment: I think I can backport it to 3.7, and I let you choose if 2.7 need this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 17:52:01 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 26 May 2019 21:52:01 +0000 Subject: [issue28866] Type cache is not correctly invalidated on a class defining mro() In-Reply-To: <1480862145.72.0.468660451957.issue28866@psf.upfronthosting.co.za> Message-ID: <1558907521.07.0.082276527503.issue28866@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13496 pull_request: https://github.com/python/cpython/pull/13589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 18:13:09 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 May 2019 22:13:09 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1558908789.87.0.578787996877.issue17005@roundup.psfhosted.org> Raymond Hettinger added the comment: Attaching some of my 2013 work on this. Here are some API notes: * spell-out the name topological_sort() * allow input as ordered pairs like the Unix tsort command https://en.wikipedia.org/wiki/Tsort#Examples * allow more convenient input as dependency sequences (like graphviz): [['a', 'b', 'c', 'x], ['b', 'd', 'e', 'y']] is short for and equivalent to: [(a,b), (b,c), (c,x), (b,d), (d, e), (e, y)] * return both the sorted sequence and cycles (both are individually useful and the latter is helpful in debugging in only the former is wanted) * desire to match the C3 MRO computation * would like the ordering to be stable and deterministic (this precludes picking arbitrary elements from sets). ---------- Added file: https://bugs.python.org/file48361/topological_sort.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 18:14:38 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 26 May 2019 22:14:38 +0000 Subject: [issue28866] Type cache is not correctly invalidated on a class defining mro() In-Reply-To: <1480862145.72.0.468660451957.issue28866@psf.upfronthosting.co.za> Message-ID: <1558908878.62.0.855275998861.issue28866@roundup.psfhosted.org> miss-islington added the comment: New changeset bfd0b7720196b9ff647cc33dafbd31a04496402c by Miss Islington (bot) in branch '3.7': [3.7] bpo-28866: No type cache for types with specialized mro, invalidation is hard. (GH-13157) (GH-13589) https://github.com/python/cpython/commit/bfd0b7720196b9ff647cc33dafbd31a04496402c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 18:16:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 May 2019 22:16:37 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1558908997.78.0.783266276189.issue17005@roundup.psfhosted.org> Change by Raymond Hettinger : Added file: https://bugs.python.org/file48362/tsort.1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 19:27:30 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 26 May 2019 23:27:30 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1558913250.91.0.165863756928.issue17005@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > * allow input as ordered pairs like the Unix tsort command > * allow more convenient input as dependency sequences (like graphviz): This is how my first proposal started (and I still like it a bit more than the dictionary input), but there are some concerns (check other comments) regarding this API, like representing isolated nodes or disjoint graphs. > return both the sorted sequence and cycles Regarding the output, I like returning a collection of sets, where every set represents all possible elements of the same order in the result. This also helps if the user has some expectation regarding the ordering. For example, in: ['ABDGI', 'BEG', 'CEH', 'KCFHJ'] the results starting with ['A', 'B', 'D' and ['A', 'B', 'K' are both valid. With the current implementation, this is the equivalent of C3 linearization: from itertools import tee from collections import defaultdict def c3_linearization(inheritance_seqs): graph = defaultdict(set) for seq in inheritance_seqs: a, b = tee(seq) next(b, None) for child, parent in zip(a,b): graph[child].add(parent) retun ((list(group) for group in functools.toposort(graph)), []) return tuple(reversed(order)) >>> class A: pass >>> class B(A): pass >>> class C(A): pass >>> class D(B, C): pass >> D.__mro__ (__main__.D, __main__.B, __main__.C, __main__.A, object) >> c3_linearization([(D, B, A, object), (D, C, A, object)]) [{__main__.D}, {__main__.B, __main__.C}, {__main__.A}, {object}] What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 19:42:34 2019 From: report at bugs.python.org (daniel hahler) Date: Sun, 26 May 2019 23:42:34 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558914154.76.0.767599640753.issue37011@roundup.psfhosted.org> daniel hahler added the comment: >From my initial comment: > I've done this via monkeypatching for pdbpp's tests, which resulted in an easy 2% coverage gain (https://github.com/antocuni/pdb/pull/253). It will also affect running tests with coverage (in general, or using tools like pytest-testmon), and using pdb.set_trace then (either for debugging, or via post-mortem, e.g. pytest's `--pdb`). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 20:02:41 2019 From: report at bugs.python.org (Gregory Szorc) Date: Mon, 27 May 2019 00:02:41 +0000 Subject: [issue37060] import ctypes fails with a statically linked interpreter due to dlopen() failure Message-ID: <1558915361.55.0.999227161151.issue37060@roundup.psfhosted.org> New submission from Gregory Szorc : ctypes/__init__.py calls _ctypes.dlopen(None) on Linux as part of code execution during module import. Unfortunately, dlopen() doesn't work if the current executable isn't a dynamic executable. Using a fully statically linked Python executable: $ ldd python3.7 not a dynamic executable $ python3.7 >>> import _ctypes >>> _ctypes.dlopen(None) Traceback (most recent call last): File "", line 1, in OSError: Dynamic loading not supported >>> import ctypes Traceback (most recent call last): File "", line 1, in File "/home/gps/src/python-build-standalone.git/build/python/install/lib/python3.7/ctypes/__init__.py", line 444, in pythonapi = PyDLL(None) File "/home/gps/src/python-build-standalone.git/build/python/install/lib/python3.7/ctypes/__init__.py", line 356, in __init__ self._handle = _dlopen(self._name, mode) OSError: Dynamic loading not supported I think it is a bug that `import ctypes` raises OSError at import time in this environment. I can make a compelling argument that this error should either be suppressed or converted to an ImportError. Producing a fully statically linked Python executable is a bit of work and isn't easily accomplished with the existing build system. My "python-build-standalone" project automates the process. A fully statically linked Python executable is available in the zstd compressed archive at https://github.com/indygreg/python-build-standalone/releases/download/20190505/cpython-3.7.3-linux64-musl-20190526T0219.tar.zst under the python/install/bin/python3.7 path. Simply extract that archive and run that binary to reproduce. ---------- components: ctypes messages: 343588 nosy: indygreg priority: normal severity: normal status: open title: import ctypes fails with a statically linked interpreter due to dlopen() failure versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 20:17:15 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 27 May 2019 00:17:15 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558916235.22.0.802492917559.issue37032@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Is there anything more on this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 20:56:38 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 27 May 2019 00:56:38 +0000 Subject: [issue37051] Glossary item "hashable" incorrect In-Reply-To: <1558818653.08.0.592312048855.issue37051@roundup.psfhosted.org> Message-ID: <1558918598.7.0.825781309314.issue37051@roundup.psfhosted.org> Josh Rosenberg added the comment: For that matter, slices are immutable built-ins, but they're not hashable (presumably to avoid silently working with dictionaries in a non-slice capacity). ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:17:32 2019 From: report at bugs.python.org (Bob Vegene) Date: Mon, 27 May 2019 01:17:32 +0000 Subject: [issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. Message-ID: <1558919852.84.0.963565120653.issue37061@roundup.psfhosted.org> New submission from Bob Vegene : So, I'm making a simple program that will allow me to quickly copy programs to System32 for use on the command line. When I tried testing this in a file called test.py in the same directory as sys32move.py, I got a very strange error. IndentError. I am very experienced with python and I know how to fix this and why it is caused. I fixed what I thought I could, but the I realized something was off. I commented out everything in sys32move.py and it still outputs this error. Now, commenting this out is unnecessary, as this is a false error anyway. This is test.py: try: import sys32pack install_folder(testfolder) except Exception as e: print(e) input() (you get same behavior without the catching of the error.) SYS32PACK.py: ---------- components: Build, Cross-Build files: sys32pack.py messages: 343591 nosy: Alex.Willmer, bob.vegena priority: normal severity: normal status: open title: The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file48363/sys32pack.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:25:44 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 27 May 2019 01:25:44 +0000 Subject: [issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. In-Reply-To: <1558919852.84.0.963565120653.issue37061@roundup.psfhosted.org> Message-ID: <1558920344.52.0.223998779704.issue37061@roundup.psfhosted.org> Steven D'Aprano added the comment: Hi Bob, and welcome. Can you copy and paste the actual traceback or error you get? It isn't obvious from your description what the error is. Just glancing at the attached sample code, I see what seems to be an obvious indentation error: for _ in range(len(files)): try: e = files[x] # e = the file with a paramater of x os.copy(e,"C:\\Windows\\System32") # copy the file to system32 except Exception as e: print(Fore.RED,"Could not install file ",x,". The following error occurred: ",e,Fore.WHITE) print(Fore.GREEN,"Installed file ",e,Fore.WHITE) if x>=len(files): # if x is more than or equal to the number of files in teh directory print(Fore.GREEN,"Installed ",Fore.WHITE) Notice that the "if" statement is indented under the print. Is that the cause of your error? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:29:10 2019 From: report at bugs.python.org (Bob Vegene) Date: Mon, 27 May 2019 01:29:10 +0000 Subject: [issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. In-Reply-To: <1558919852.84.0.963565120653.issue37061@roundup.psfhosted.org> Message-ID: <1558920550.36.0.57321942698.issue37061@roundup.psfhosted.org> Bob Vegene added the comment: No, I removed that before. I actually did have one, but I removed that and it still shows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:30:14 2019 From: report at bugs.python.org (Bob Vegene) Date: Mon, 27 May 2019 01:30:14 +0000 Subject: [issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. In-Reply-To: <1558919852.84.0.963565120653.issue37061@roundup.psfhosted.org> Message-ID: <1558920614.95.0.0131426779603.issue37061@roundup.psfhosted.org> Bob Vegene added the comment: The error it gives is unexpected indent (sys32pack.py, line 41) (im also using IDLE) FYI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:34:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 27 May 2019 01:34:54 +0000 Subject: [issue21314] Document '/' in signatures In-Reply-To: <1397988439.5.0.703056699862.issue21314@psf.upfronthosting.co.za> Message-ID: <1558920894.19.0.0991304715494.issue21314@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think we can revisit this now that PEP570 is accepted ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:38:06 2019 From: report at bugs.python.org (Diego Argueta) Date: Mon, 27 May 2019 01:38:06 +0000 Subject: [issue33361] readline() + seek() on codecs.EncodedFile breaks next readline() In-Reply-To: <1524704763.78.0.682650639539.issue33361@psf.upfronthosting.co.za> Message-ID: <1558921086.06.0.152248045024.issue33361@roundup.psfhosted.org> Diego Argueta added the comment: > though #32110 ("Make codecs.StreamReader.read() more compatible with read() of other files") may have fixed more (all?) of it. Still seeing this in 3.7.3 so I don't think so? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:47:19 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 27 May 2019 01:47:19 +0000 Subject: [issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. In-Reply-To: <1558919852.84.0.963565120653.issue37061@roundup.psfhosted.org> Message-ID: <1558921639.19.0.430560052864.issue37061@roundup.psfhosted.org> Tim Peters added the comment: As Steven said, there's an obvious indentation error in the file you actually attached. So nobody can _guess_ what your problem is. Please upload a file showing your actual problem. If I increase the indentation of the `print` Steven identified to match the indentation of the `print` before it, IDLE's Run -> Check Module has no complaints. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:48:40 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 27 May 2019 01:48:40 +0000 Subject: [issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. In-Reply-To: <1558920550.36.0.57321942698.issue37061@roundup.psfhosted.org> Message-ID: <20190527014832.GB4221@ando.pearwood.info> Steven D'Aprano added the comment: Sorry Bob, are you telling us that the code you submitted to demonstrate the error isn't the code that demonstrates the error? Perhaps you could read this: http://www.sscce.org/ for some ideas on how to submit a good bug report. It is written for Java programmers but most of it applies equally to Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:50:03 2019 From: report at bugs.python.org (Bob Vegene) Date: Mon, 27 May 2019 01:50:03 +0000 Subject: [issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. In-Reply-To: <1558919852.84.0.963565120653.issue37061@roundup.psfhosted.org> Message-ID: <1558921803.41.0.727937711396.issue37061@roundup.psfhosted.org> Bob Vegene added the comment: uhm, the current file is attached now is there some sort of error and you guys see it differently??? i can't be the only one getting this. I swear i have everything right, and i'll attach an image if i need too. ---------- Added file: https://bugs.python.org/file48364/sys32pack.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:51:39 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 27 May 2019 01:51:39 +0000 Subject: [issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. In-Reply-To: <1558919852.84.0.963565120653.issue37061@roundup.psfhosted.org> Message-ID: <1558921899.08.0.666368566421.issue37061@roundup.psfhosted.org> Eric V. Smith added the comment: Line 41 is indented 4 spaces past line 38, but should not be. You'd be better served by first asking questions like this on the python-list mailing list. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 21:56:35 2019 From: report at bugs.python.org (Bob Vegene) Date: Mon, 27 May 2019 01:56:35 +0000 Subject: [issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. In-Reply-To: <1558919852.84.0.963565120653.issue37061@roundup.psfhosted.org> Message-ID: <1558922195.79.0.582607723909.issue37061@roundup.psfhosted.org> Bob Vegene added the comment: I decided to check the file in notepad++ and I saw that there actually is an indentationerror... However, the save button wasn't working I guess. I can't tell you how many times i hit ctrl+s and clicked save. Wow, so it still is a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 22:07:43 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 27 May 2019 02:07:43 +0000 Subject: [issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code. In-Reply-To: <1558919852.84.0.963565120653.issue37061@roundup.psfhosted.org> Message-ID: <1558922863.7.0.966461886172.issue37061@roundup.psfhosted.org> Tim Peters added the comment: Same kind of problem with the new upload, Bob. Line 38 is: print(Fore.GREEN,"Installed file ",e,Fore.WHITE) indented 8 spaces. Lines 39 and 40 are empty. Then line 41 is: if x>=len(files): # if x is more than or equal to the number of files in teh directory indented 12 spaces. That's an indentation error, indented more than the statement before it. Maybe you have some kind of weird binary data (by mistake) in the file that gets lost when you upload it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 23:07:05 2019 From: report at bugs.python.org (Michael Blahay) Date: Mon, 27 May 2019 03:07:05 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1558926425.34.0.121427409404.issue35495@roundup.psfhosted.org> Michael Blahay added the comment: Ryan, last chance, do you have any feedback? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 23:15:43 2019 From: report at bugs.python.org (Michael Blahay) Date: Mon, 27 May 2019 03:15:43 +0000 Subject: [issue36913] Missing documentation for decorators In-Reply-To: <1557819328.64.0.0474936169734.issue36913@roundup.psfhosted.org> Message-ID: <1558926943.68.0.991608976046.issue36913@roundup.psfhosted.org> Michael Blahay added the comment: The PEP is not the first place I go looking for information on Python topics, just my two cents. ---------- nosy: +mblahay _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 23:20:17 2019 From: report at bugs.python.org (Michael Blahay) Date: Mon, 27 May 2019 03:20:17 +0000 Subject: [issue17250] argparse: Issue 15906 patch; positional with nargs='*' and string default In-Reply-To: <1361336297.12.0.955168493515.issue17250@psf.upfronthosting.co.za> Message-ID: <1558927217.1.0.401832865601.issue17250@roundup.psfhosted.org> Michael Blahay added the comment: Also see https://bugs.python.org/issue35495 ---------- nosy: +mblahay _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 26 23:43:45 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Mon, 27 May 2019 03:43:45 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1558928625.01.0.366083382178.issue36520@roundup.psfhosted.org> Jeffrey Kintscher added the comment: To aid with debugging the code, the Subject line can be simplified: >>> from email.message import EmailMessage >>> m = EmailMessage() >>> m['Subject'] = 'Hello =?utf-8?q?W=C3=B6rld!_Hello_W=C3=B6rld!_Hello_W=C3=B6rld!?= Hello W?rld!Hello W?rld!' >>> print(bytes(m)) b'Subject: Hello =?utf-8?q?W=C3=B6rld!_Hello_W=C3=B6rld!_Hello_W=C3=B6rld!?=\n Hello =?utf-8?=?utf-8?q?q=3FW=3DC3=3DB6rld!Hello=3F=3D_W=C3=B6rld!?=\n\n' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 02:03:00 2019 From: report at bugs.python.org (Reuben Thomas) Date: Mon, 27 May 2019 06:03:00 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor Message-ID: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> New submission from Reuben Thomas : By changing one line of AutoNumber: def __new__(cls): to def __new__(cls, *args): Enums derived from AutoNumber can now support constructors that take named arguments; for example: class Color(AutoNumber): def __init__(self, pantone=None): self.pantone = pantone or 'unknown' class Swatch(Color): AUBURN = ('3497') SEA_GREEN = ('1246') BLEACHED_CORAL = () # New color, no Pantone code yet! Without the change, one gets the error: TypeError: __new__() takes 1 positional argument but 2 were given I attach runnable demonstration code. ---------- assignee: docs at python components: Documentation files: foo.py messages: 343607 nosy: docs at python, rrt priority: normal severity: normal status: open title: `AutoNumber` class in enum documentation: support *args in constructor versions: Python 3.8 Added file: https://bugs.python.org/file48365/foo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 02:03:35 2019 From: report at bugs.python.org (Reuben Thomas) Date: Mon, 27 May 2019 06:03:35 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor In-Reply-To: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> Message-ID: <1558937015.64.0.802909270511.issue37062@roundup.psfhosted.org> Reuben Thomas added the comment: Just to be clear, the proposed change to the documentation is simply to add ", *args" to the argument list of AutoNumber.__new__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 02:04:29 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 27 May 2019 06:04:29 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor In-Reply-To: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> Message-ID: <1558937069.12.0.421432991239.issue37062@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 02:57:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 06:57:20 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558940240.36.0.593131669666.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 71c52e3048dd07567f0c690eab4e5d57be66f534 by Victor Stinner in branch 'master': bpo-36829: Add _PyErr_WriteUnraisableMsg() (GH-13488) https://github.com/python/cpython/commit/71c52e3048dd07567f0c690eab4e5d57be66f534 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 03:45:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 07:45:56 +0000 Subject: [issue37032] Add CodeType.replace() method In-Reply-To: <1558689955.85.0.932624363868.issue37032@roundup.psfhosted.org> Message-ID: <1558943156.87.0.557144009672.issue37032@roundup.psfhosted.org> STINNER Victor added the comment: Pablo: "Is there anything more on this issue?" I proposed "Once Python 3.8 beta1 will be released, it would be interesting to patch all projects that I had to be fixed to handle the new "posonlyargcount" to use the new "replace()" method is available." But that only concerns third party project,s no Python directly, so I close the issue :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 04:57:19 2019 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 27 May 2019 08:57:19 +0000 Subject: [issue37011] pdb: restore original tracing function instead of sys.settrace(None) In-Reply-To: <1558529084.78.0.178705379805.issue37011@roundup.psfhosted.org> Message-ID: <1558947439.75.0.480996813096.issue37011@roundup.psfhosted.org> Xavier de Gaye added the comment: The main goal of test coverage is to verify that the tests cover the code that is being tested, it is not to get '100 %' printed. Measuring the coverage of the tests themselves is entirely another matter and not very useful. Since it is not possible to measure the coverage of code executed by a trace function, attempting to increase the measure of the coverage of the tests themselves that test pdb, just for the sake of it, does not justify the added complexity and possible source of confusion. -1 for this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 06:43:16 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Mon, 27 May 2019 10:43:16 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1558953796.38.0.164030698767.issue36520@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I uploaded a test script with some test cases: The failure mode occurs when 1. line folding occurs 2. the first folded line has two or more words with UTF-8 characters 3. subsequent lines contain a word with UTF-8 characters located at a different offset than the last encoded substring in the first line For example, the first folded and encoded line of 'Hello W?rld! Hello W?rld! Hello W?rld! Hello W?rld!Hello W?rld!' is b'Subject: Hello =?utf-8?q?W=C3=B6rld!_Hello_W=C3=B6rld!_Hello_W=C3=B6rld!?=' and the second line should be b' Hello =?utf-8?q?W=C3=B6rld!Hello_W=C3=B6rld!?=' but instead, it is b' Hello =?utf-8?=?utf-8?q?q=3FW=3DC3=3DB6rld!Hello=3F=3D_W=C3=B6rld!?=' The function at fault is _refold_parse_tree() in Lib/email/_header_value_parser.py. In the first line, it encodes the first UTF-8 word and saves the starting offset in the output string (15). When it encounters the second UTF-8 word, it re-encodes the entire string starting at the saved offset. This is to help reduce the bloat added by multiple '=?utf-8?q?' start-of-encoding tokens. When it encodes the first UTF-8 word on the second line, it tries to store it at the saved offset into the second line output string, but that is past the end of the string so it just gets appended. When it encounter the second UTF-8 word in the second line, it re-encodes the entire second-line string starting at the saved offset (15), which is in the middle of the first encoded UTF-8 string. The failure mode is not triggered if there is at most one UTF-8 word in each folded line. It also is not triggered when folding occurs in the middle of a word instead of at whitespace because the code follows a different path. The solution is to set the saved starting offset to None when starting a new folded line when the fold-point is whitespace. I will submit a pull request soon with a fix. ---------- Added file: https://bugs.python.org/file48366/bpo-36520-test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 06:57:38 2019 From: report at bugs.python.org (Dan Snider) Date: Mon, 27 May 2019 10:57:38 +0000 Subject: [issue37063] Incorrect application of func.__defaults__ by inspect's signature APIs Message-ID: <1558954658.26.0.250057323757.issue37063@roundup.psfhosted.org> New submission from Dan Snider : The interpreter matches the values in func.__defaults__ with the calculated positional argument names "right-to-left", while inspect does does so "left-to-right". In every day usage, for "normal" functions, generated by the compiler from "normal", hand-typed source code, it is impossible to encounter this. >>> def f(x): return x >>> x.__defaults__ = (1,2,3) >>> inspect.getfullargspec(f) FullArgSpec(args=['x'], varargs=None, varkw=None, defaults=(1,), kwonlyargs=[], kwonlydefaults=None, annotations={}) >>> f() 3 >>> f.__defaults__ (1, 2, 3) So I'll be honest: I've submitted this particularly inconsequential bug report as a pretext to ask for advice on how to contribute here, because frankly, this is getting out of hand. While I haven't counted, it would not surprise me if I have more than 20 open tickets on here currently. While that may not be uncommon it does bother me slightly. And those are just the ones I had the time and/or remembered to to submit a ticket for. There's another 45-50 whose location I'm certain of, fully documented and fixed. If this little digression is against some sort of rules, then I apologize now and must concur. That being said, despite my lack of a formal education, my seemingly never-ending quest to push the interpreter to its limits, hunting for the most esoteric of optimizations (and flaws) has turned out to be quite the hobby. I've aquired a great deal of knowledge on the subject which, in the grand scheme of things is being wasted, as the only thing of actual significance I could see myself doing with it is using it to contribute here. But when I consider the amount of time I've wasted on the matter already on this, I've totally lost faith in my own ability to judge what might constitute a good resource on the subject of GH. The other venues I'm aware of haven't been helpful to me so I don't even bother with them anymore. I will read the dev guide again, since it has been a while. However to my recollection the problems I had with it wasn't technicality per se, it was that it was it was full of totally foreign terminology to me, with words and phrases such as "pulling on this while the squisher of that squasher pushes on that". ---------- components: Library (Lib) messages: 343613 nosy: bup priority: normal severity: normal status: open title: Incorrect application of func.__defaults__ by inspect's signature APIs type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 07:14:14 2019 From: report at bugs.python.org (Stephen McDowell) Date: Mon, 27 May 2019 11:14:14 +0000 Subject: [issue28609] argparse claims '*' positional argument is required in error output In-Reply-To: <1478272763.12.0.609109547521.issue28609@psf.upfronthosting.co.za> Message-ID: <1558955654.89.0.502593267799.issue28609@roundup.psfhosted.org> Stephen McDowell added the comment: > For optionals, `required` is set by the programmer. But for positionals it is set with: ... > So for '?' argument, required is False. But for '*', it must also have a 'default' parameter (not just the default None). > So the proposed patch is overriding the 'required' value that was set during 'add_argument'. And issuing this error message is the main purpose of the 'required' attribute. nargs='*' being marked as `required` is incorrect though, isn't it? I was also very confused by this behavior, the only reason I found this bug was to search before opening new, and had a patch prepared that is nearly identical to the one here. 1. It's really helpful to know about explicitly setting `default=None|[]` depending on use case. Would a docs PR briefly explaining at the bottom of the nargs [a] docs explaining how to change the error message via `default` be welcome? This is a slightly challenging problem to search for. 2. My understanding is the ultimate rejection of the patch is because it's bypassing the `required` attribute. So to fix this adequately, changing ? and * to not show up as required (when no `default` provided) should be done? [a] https://docs.python.org/3/library/argparse.html#nargs ---------- nosy: +svenevs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 07:42:45 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 27 May 2019 11:42:45 +0000 Subject: [issue37028] Implement asyncio repl In-Reply-To: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> Message-ID: <1558957365.78.0.892299682696.issue37028@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 16cefb0bc7b05c08caf08525398ff178c35dece4 by Yury Selivanov in branch 'master': bpo-37028: asyncio REPL; activated via 'python -m asyncio'. (GH-13472) https://github.com/python/cpython/commit/16cefb0bc7b05c08caf08525398ff178c35dece4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 07:46:05 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 27 May 2019 11:46:05 +0000 Subject: [issue37028] Implement asyncio repl In-Reply-To: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> Message-ID: <1558957565.92.0.629403079022.issue37028@roundup.psfhosted.org> Yury Selivanov added the comment: The REPL has been merged to 3.8. It's not perfect though -- a ^C might break the asyncio event loop, sometimes ^C stops working altogether. We'll investigate all these issues in follow up PRs. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 08:42:56 2019 From: report at bugs.python.org (zgoda.mobica) Date: Mon, 27 May 2019 12:42:56 +0000 Subject: [issue34858] MappingProxy objects should JSON serialize just like a dictionary In-Reply-To: <1538358992.7.0.545547206417.issue34858@psf.upfronthosting.co.za> Message-ID: <1558960976.2.0.465897795136.issue34858@roundup.psfhosted.org> zgoda.mobica added the comment: In particular case of lazy type proxy objects the result of dump() may be different than dumps() because dump does iterencode() over data and possibly causing proxy object evaluation. In such case dumps() will raise TypeError but dump() will not. ---------- nosy: +zgoda.mobica _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 08:45:15 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 27 May 2019 12:45:15 +0000 Subject: [issue32528] Change base class for futures.CancelledError In-Reply-To: <1515601875.1.0.467229070634.issue32528@psf.upfronthosting.co.za> Message-ID: <1558961115.67.0.211584081925.issue32528@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 431b540bf79f0982559b1b0e420b1b085f667bb7 by Yury Selivanov in branch 'master': bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528) https://github.com/python/cpython/commit/431b540bf79f0982559b1b0e420b1b085f667bb7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 08:45:50 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 27 May 2019 12:45:50 +0000 Subject: [issue32528] Change base class for futures.CancelledError In-Reply-To: <1515601875.1.0.467229070634.issue32528@psf.upfronthosting.co.za> Message-ID: <1558961150.38.0.0580528984332.issue32528@roundup.psfhosted.org> Yury Selivanov added the comment: Done. ? we don't regret this. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 08:56:29 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 27 May 2019 12:56:29 +0000 Subject: [issue37047] Refactor AsyncMock setup logic in create_autospec In-Reply-To: <1558813124.86.0.778430760626.issue37047@roundup.psfhosted.org> Message-ID: <1558961789.6.0.0434163404159.issue37047@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset ff6b2e66b19a26b4c2ab57e62e1ab9f3d94dd76a by Yury Selivanov (Xtreak) in branch 'master': bpo-37047: Refactor AsyncMock setup logic for autospeccing (GH-13574) https://github.com/python/cpython/commit/ff6b2e66b19a26b4c2ab57e62e1ab9f3d94dd76a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 08:56:57 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 27 May 2019 12:56:57 +0000 Subject: [issue37047] Refactor AsyncMock setup logic in create_autospec In-Reply-To: <1558813124.86.0.778430760626.issue37047@roundup.psfhosted.org> Message-ID: <1558961817.37.0.619751545631.issue37047@roundup.psfhosted.org> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:04:40 2019 From: report at bugs.python.org (NM) Date: Mon, 27 May 2019 13:04:40 +0000 Subject: [issue36305] Inconsistent behavior of pathlib.WindowsPath with drive paths In-Reply-To: <1552664225.98.0.0986812073641.issue36305@roundup.psfhosted.org> Message-ID: <1558962280.18.0.193884131898.issue36305@roundup.psfhosted.org> NM added the comment: Is this related to the weird paths I am seeing when getting different output in venv compared to without venv: from pathlib import Path filename = Path(__file__) filename2 = Path('C:\\path\\to\\file.py') print(filename) print(filename2) Where the result is: ---------------------------- Powershell (python.exe run): file.py C:\path\to\file.py Venv run: C:\path\to\file.py C:\path\to\file.py ---------- nosy: +nmat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:09:47 2019 From: report at bugs.python.org (Patrik Kopkan) Date: Mon, 27 May 2019 13:09:47 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. Message-ID: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> New submission from Patrik Kopkan : Hello, Pathfix is nice simple tool for changing shebang lines. However, it is lacking a way how to keep/add flags making this tool impractical sometimes. ---------- messages: 343622 nosy: pkopkan priority: normal severity: normal status: open title: Feature request: option to keep/add flags to pathfix. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:13:59 2019 From: report at bugs.python.org (Patrik Kopkan) Date: Mon, 27 May 2019 13:13:59 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. In-Reply-To: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> Message-ID: <1558962839.66.0.21909449605.issue37064@roundup.psfhosted.org> Change by Patrik Kopkan : ---------- keywords: +patch pull_requests: +13497 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13591 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:15:32 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 27 May 2019 13:15:32 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. In-Reply-To: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> Message-ID: <1558962932.04.0.707420777827.issue37064@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- components: +Demos and Tools versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:16:06 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 27 May 2019 13:16:06 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. In-Reply-To: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> Message-ID: <1558962966.61.0.634094932683.issue37064@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:28:37 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 27 May 2019 13:28:37 +0000 Subject: [issue37035] Don't log OSError exceptions in asyncio transports In-Reply-To: <1558708377.15.0.222546736903.issue37035@roundup.psfhosted.org> Message-ID: <1558963717.55.0.582698861432.issue37035@roundup.psfhosted.org> miss-islington added the comment: New changeset 1f39c28e489cca0397fc4c3675d13569318122ac by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-37035: Don't log OSError (GH-13548) https://github.com/python/cpython/commit/1f39c28e489cca0397fc4c3675d13569318122ac ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:38:58 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 27 May 2019 13:38:58 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. In-Reply-To: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> Message-ID: <1558964338.28.0.536635635893.issue37064@roundup.psfhosted.org> Change by SilentGhost : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:43:48 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 27 May 2019 13:43:48 +0000 Subject: [issue35397] Undeprecate and document urllib.parse.unwrap In-Reply-To: <1543879550.52.0.788709270274.issue35397@psf.upfronthosting.co.za> Message-ID: <1558964628.44.0.659879393268.issue35397@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 674ee1260025ff36f27e5d70ff6b66e3aab880bf by Cheryl Sabella (R?mi Lapeyre) in branch 'master': bpo-35397: Remove deprecation and document urllib.parse.unwrap (GH-11481) https://github.com/python/cpython/commit/674ee1260025ff36f27e5d70ff6b66e3aab880bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:47:27 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 13:47:27 +0000 Subject: [issue34148] Fatal read error on socket transport In-Reply-To: <1531923784.93.0.56676864532.issue34148@psf.upfronthosting.co.za> Message-ID: <1558964847.99.0.208937775653.issue34148@roundup.psfhosted.org> Andrew Svetlov added the comment: Fixed by issue37035 ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Don't log OSError exceptions in asyncio transports _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:47:48 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 13:47:48 +0000 Subject: [issue37027] Return a safe proxy over a socket from get_extra_info('socket') In-Reply-To: <1558651573.81.0.166270912079.issue37027@roundup.psfhosted.org> Message-ID: <1558964868.69.0.985349877505.issue37027@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:48:59 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 27 May 2019 13:48:59 +0000 Subject: [issue35397] Undeprecate and document urllib.parse.unwrap In-Reply-To: <1543879550.52.0.788709270274.issue35397@psf.upfronthosting.co.za> Message-ID: <1558964939.98.0.0563336213302.issue35397@roundup.psfhosted.org> Cheryl Sabella added the comment: Thanks for the report and for the patch. :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:51:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 13:51:18 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558965078.0.0.0184961289033.issue36763@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13499 pull_request: https://github.com/python/cpython/pull/13592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 09:57:27 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 27 May 2019 13:57:27 +0000 Subject: [issue37027] Return a safe proxy over a socket from get_extra_info('socket') In-Reply-To: <1558651573.81.0.166270912079.issue37027@roundup.psfhosted.org> Message-ID: <1558965447.85.0.0945671364445.issue37027@roundup.psfhosted.org> miss-islington added the comment: New changeset 8cd5165ba05ff57cfdbbc71c393bddad1ce1ab87 by Miss Islington (bot) (Yury Selivanov) in branch 'master': bpo-37027: Return a proxy socket object from transp.get_extra_info('socket') (GH-13530) https://github.com/python/cpython/commit/8cd5165ba05ff57cfdbbc71c393bddad1ce1ab87 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 10:10:31 2019 From: report at bugs.python.org (Patrik Kopkan) Date: Mon, 27 May 2019 14:10:31 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. In-Reply-To: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> Message-ID: <1558966231.31.0.616350484608.issue37064@roundup.psfhosted.org> Patrik Kopkan added the comment: Example: pathfix.py -i /usr/bin/python ./directory --> would change the shebang of every script in this directory recursively to #! /usr/bin/python. That's handy but if you would have script like this: #! /usr/bin/env -flags and wanted to keep the flags. You would need to run again pathfix: pathfix.py -i '/usr/bin/python -flags' ./directory. That is not that bad for one script but with increasing number of scripts, differences of flags between the scripts it gets harder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 10:13:42 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 27 May 2019 14:13:42 +0000 Subject: [issue37034] Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call In-Reply-To: <1558693785.23.0.512986851321.issue37034@roundup.psfhosted.org> Message-ID: <1558966422.34.0.804574300709.issue37034@roundup.psfhosted.org> Change by R?mi Lapeyre : ---------- keywords: +patch pull_requests: +13500 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 10:15:47 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Mon, 27 May 2019 14:15:47 +0000 Subject: [issue37034] Argument Clinic omits name of keyword-only parameter on _PyArg_BadArgument() call In-Reply-To: <1558693785.23.0.512986851321.issue37034@roundup.psfhosted.org> Message-ID: <1558966547.63.0.238030284802.issue37034@roundup.psfhosted.org> R?mi Lapeyre added the comment: With the attached PR, the error message is now: >>> def f(): pass ... >>> code = f.__code__ >>> code.replace(co_lnotab=4) Traceback (most recent call last): File "", line 1, in TypeError: replace() argument 'co_lnotab' must be bytes, not int ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 10:27:54 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 14:27:54 +0000 Subject: [issue37035] Don't log OSError exceptions in asyncio transports In-Reply-To: <1558708377.15.0.222546736903.issue37035@roundup.psfhosted.org> Message-ID: <1558967274.75.0.397836184876.issue37035@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +13501 pull_request: https://github.com/python/cpython/pull/13594 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 10:30:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 14:30:07 +0000 Subject: [issue37028] Implement asyncio repl In-Reply-To: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> Message-ID: <1558967407.35.0.815678143904.issue37028@roundup.psfhosted.org> STINNER Victor added the comment: "asyncio REPL 3.8.0a4+ (heads/pep587_rename-dirty:ae29b4b186, May 27 2019, 16:10:31)" I suggest "Python asyncio REPL 3.8.0a4+ (...)". I prefer to keep "Python" somewhere. Is "exiting asyncio REPL..." message really helpful? If exit can block, would it possible to only display a message if something "hangs" (takes time)? I would expect something like "Waiting for xxx completion for 1 second...". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 10:39:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 14:39:28 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558967968.19.0.713125851818.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 331a6a56e9a9c72f3e4605987fabdaec72677702 by Victor Stinner in branch 'master': bpo-36763: Implement the PEP 587 (GH-13592) https://github.com/python/cpython/commit/331a6a56e9a9c72f3e4605987fabdaec72677702 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 10:45:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 14:45:29 +0000 Subject: [issue13533] Would like Py_Initialize to play friendly with host app In-Reply-To: <1323099394.97.0.36914155274.issue13533@psf.upfronthosting.co.za> Message-ID: <1558968329.3.0.787409765613.issue13533@roundup.psfhosted.org> STINNER Victor added the comment: > I'm building a dll add-in (on Windows) in which I want to use the installed version of Python, not provide my own installation. When py_initialize fails it appears to call exit(). (...) This issue has been fixed by the PEP 587 in bpo-36763: Py_InitializeFromConfig() now returns a PyStatus structure which is a success, error message or an exit code. The caller can decide how to handle it. ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 10:51:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 14:51:32 +0000 Subject: [issue14956] custom PYTHONPATH may break apps embedding Python In-Reply-To: <1338321412.45.0.331737203349.issue14956@psf.upfronthosting.co.za> Message-ID: <1558968692.62.0.0878230207231.issue14956@roundup.psfhosted.org> STINNER Victor added the comment: This issue has been fixed in 36763 by the PEP 587 which provides a new "Isolated Configuration" and a way to tune the Python configuration without impacting subprocesses. For example, the Isolated Configuration ignores environment variables by default. In Python 3.7 and older, you can set Py_IgnoreEnvironmentFlag to 1 (the flag exists also in Python 2.7), or even set Py_IsolatedFlag to 1 (new in Python 3.4). ---------- nosy: +vstinner resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 10:55:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 14:55:55 +0000 Subject: [issue19983] When interrupted during startup, Python should not call abort() but exit() In-Reply-To: <1387074538.57.0.560740834981.issue19983@psf.upfronthosting.co.za> Message-ID: <1558968955.8.0.186058280873.issue19983@roundup.psfhosted.org> STINNER Victor added the comment: This issue has been fixed by the PEP 587 in bpo-36763: when Py_Initialize() fails, it no longer calls abort() but only exit(1). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:04:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:04:10 +0000 Subject: [issue22257] PEP 432: Redesign the interpreter startup sequence In-Reply-To: <1408789351.84.0.0171822343712.issue22257@psf.upfronthosting.co.za> Message-ID: <1558969450.36.0.528158881158.issue22257@roundup.psfhosted.org> STINNER Victor added the comment: Update: my PEP 587 has been accepted and I implemented it in bpo-36763. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:04:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:04:41 +0000 Subject: [issue22213] Make pyvenv style virtual environments easier to configure when embedding Python In-Reply-To: <1408275761.36.0.915361061447.issue22213@psf.upfronthosting.co.za> Message-ID: <1558969481.28.0.319814627894.issue22213@roundup.psfhosted.org> STINNER Victor added the comment: I wrote the PEP 587 "Python Initialization Configuration" which has been accepted. It allows to completely override the "Path Configuration". I'm not sure that it fully implementation what it requested here, but it should now be easier to tune the Path Configuration. See: https://www.python.org/dev/peps/pep-0587/#multi-phase-initialization-private-provisional-api I implemented the PEP 587 in bpo-36763. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:08:30 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 27 May 2019 15:08:30 +0000 Subject: [issue37028] Implement asyncio repl In-Reply-To: <1558652233.35.0.225299391791.issue37028@roundup.psfhosted.org> Message-ID: <1558969710.79.0.253065149355.issue37028@roundup.psfhosted.org> Yury Selivanov added the comment: > I suggest "Python asyncio REPL 3.8.0a4+ (...)". I prefer to keep "Python" somewhere. Sure. > Is "exiting asyncio REPL..." message really helpful? If exit can block, would it possible to only display a message if something "hangs" (takes time)? I would expect something like "Waiting for xxx completion for 1 second...". NP, I can drop the message. The waiting part isn't necessary, since we don't try to shutdown the loop properly anyways (yet) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:11:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:11:06 +0000 Subject: [issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath In-Reply-To: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za> Message-ID: <1558969866.45.0.390358619515.issue29778@roundup.psfhosted.org> STINNER Victor added the comment: > When Py_SetPath is used to set up module path at initialization, the Py_SetPath causes getpathp.c::calculate_path not to be called. However, calculate path is the only function calling getpathp.c::get_progpath which initializes the local dllpath static variable. I fixed this issue in Python 3.8 with this commit: commit 410759fba80aded5247b693c60745aa16906f3bb Author: Victor Stinner Date: Sat May 18 04:17:01 2019 +0200 bpo-36763: Remove _PyCoreConfig.dll_path (GH-13402) I modified Py_SetPath() like that: - new_config.dll_path = _PyMem_RawWcsdup(L""); + new_config.dll_path = _Py_GetDLLPath(); Py_SetPath() no longer sets dll_path to an empty string. Since we only got one bug report and I believe that Tibor Csonka found a way to workaround the issue since he reported it, I close the issue. Please reopen/comment the issue if you would like to get this issue fixed in Python 3.7 as well. -- Moreover, the PEP 587 now has a better API to configure embedded Python. I just implemented this PEP in bpo-36763. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:11:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:11:15 +0000 Subject: [issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath In-Reply-To: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za> Message-ID: <1558969875.27.0.738090625533.issue29778@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:11:54 2019 From: report at bugs.python.org (Denis S. Otkidach) Date: Mon, 27 May 2019 15:11:54 +0000 Subject: [issue37065] File and lineno is not reported for syntax error in f-string Message-ID: <1558969914.07.0.850758121851.issue37065@roundup.psfhosted.org> New submission from Denis S. Otkidach : Minimal example to reproduce: -->8-- >>> with open('f_bug.py', 'w') as fp: ... fp.write('f"{a b}"') ... 8 >>> import f_bug Traceback (most recent call last): File "", line 1, in File "", line 1 (a b) ^ SyntaxError: invalid syntax -->8-- Here we see in track trace "" and line number in erroneous expression in f-string, but no "f_bug.py" and line number in it. ---------- components: Interpreter Core messages: 343639 nosy: ods priority: normal severity: normal status: open title: File and lineno is not reported for syntax error in f-string type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:12:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:12:59 +0000 Subject: [issue30560] Py_SetFatalErrorAbortFunc: Allow embedding program to handle fatal errors In-Reply-To: <1496517343.89.0.835339034855.issue30560@psf.upfronthosting.co.za> Message-ID: <1558969979.54.0.22547467227.issue30560@roundup.psfhosted.org> STINNER Victor added the comment: The issue has been fixed in bpo-36763 with the implementation of the PEP 587. A new API now allow to handle Python initialization error with a new PyStatus structure. By the way, bpo-1195571 was a similar issue. ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:14:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:14:33 +0000 Subject: [issue30560] Py_SetFatalErrorAbortFunc: Allow embedding program to handle fatal errors In-Reply-To: <1496517343.89.0.835339034855.issue30560@psf.upfronthosting.co.za> Message-ID: <1558970073.12.0.616705404043.issue30560@roundup.psfhosted.org> STINNER Victor added the comment: Note: if I misunderstood the issue, please open it ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:15:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:15:35 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1558970135.68.0.316887289643.issue1195571@roundup.psfhosted.org> STINNER Victor added the comment: I understand that this issue has been fixed in bpo-36763 with the implementation of the PEP 587. A new API now allow to handle Python initialization error with a new PyStatus structure. By the way, bpo-30560 was a similar issue. Note: if I misunderstood the issue, please reopen it ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:16:22 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 27 May 2019 15:16:22 +0000 Subject: [issue37065] File and lineno is not reported for syntax error in f-string In-Reply-To: <1558969914.07.0.850758121851.issue37065@roundup.psfhosted.org> Message-ID: <1558970182.07.0.623451516047.issue37065@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:17:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:17:12 +0000 Subject: [issue31745] Overloading "Py_GetPath" does not work In-Reply-To: <1507644495.71.0.213398074469.issue31745@psf.upfronthosting.co.za> Message-ID: <1558970232.72.0.100326496494.issue31745@roundup.psfhosted.org> STINNER Victor added the comment: If I understood correctly, this issue has been fixed by the PEP 587 "Python Initialization Configuration" in bpo-36763 which now provides a more reliable way to configure the "Path Configuration". I close the issue. If I misunderstood the issue, please reopen it. ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.8 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:21:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:21:20 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1558970480.89.0.997893103504.issue34725@roundup.psfhosted.org> STINNER Victor added the comment: I understand that issue is now fixed in bpo-36763 by the implementation of the PEP 587 which adds a new public API for the "Python Initialization Configuration". It provides a finer API to configure the "Path Configuration". For example, PyConfig.executable can be used to replace _Py_SetProgramFullPath(). In Python 3.7, the private _Py_SetProgramFullPath() function can be used as a workaround. I close the issue. If I misunderstood the issue, please comment/reopen it ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:28:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:28:13 +0000 Subject: [issue36204] Deprecate calling Py_Main() after Py_Initialize()? Add Py_InitializeFromArgv()? In-Reply-To: <1551834525.71.0.299851927567.issue36204@roundup.psfhosted.org> Message-ID: <1558970893.28.0.222388527106.issue36204@roundup.psfhosted.org> STINNER Victor added the comment: I added Py_RunMain() in bpo-36763 which implements the PEP 587. IMHO it's the right solution for code like fontforge (see pseudo-code in my first message). I'm no longer sure that we should deprecate calling Py_Main() after Py_Initialize(). Backward compatibility matters more here, no? Maybe the best we can do is to mention Py_RunMain() in Py_Main() documentation. > PySys_SetArgvEx() can be called before Py_Initialize(), but arguments passed to this function are not parsed. With the "Python Configuration" of PEP 587, PyConfig.argv is now parsed as Python command line arguments. > INADA-san proposed to make the existing _Py_UnixMain() function public. (Currently, the function is private.) The PEP 587 exposes this function with the name: Py_BytesMain(). -- I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:31:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:31:08 +0000 Subject: [issue33135] Define field prefixes for the various config structs In-Reply-To: <1521958223.34.0.467229070634.issue33135@psf.upfronthosting.co.za> Message-ID: <1558971068.41.0.553891096588.issue33135@roundup.psfhosted.org> STINNER Victor added the comment: > As a particularly relevant example, we currently have 3 different "warnoptions" fields: the private-to-main one for reading the command line settings, the "wchar_t *" list in the core config, and the "PyObject *" list object in the main interpreter config (which is also the one aliased as sys.warnoptions). This issue has been fixed in bpo-36763 with the implementation of the PEP 587. PyConfig.warnoptions is now an unified list of warnings options. Moreover, the priority of warnings options is now defined at: https://www.python.org/dev/peps/pep-0587/#priority-and-rules ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:33:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:33:59 +0000 Subject: [issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony)) In-Reply-To: <1298644323.49.0.991957845562.issue11320@psf.upfronthosting.co.za> Message-ID: <1558971239.77.0.661573308633.issue11320@roundup.psfhosted.org> STINNER Victor added the comment: I understand that this bug has been fixed by the implementation of the PEP 587 in bpo-36763: Py_SethPath() now uses dynamically allocated memory and can be called multiple times. Moreover, the PEP 587 now provides a better API for the Path Configuration. I close the issue. Reopen/comment the issue if I misunderstood it :-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:37:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:37:18 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558971438.04.0.54054760545.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: I closed the following issues which are fixed by the implementation of the PEP 587: * bpo-1195571 * bpo-11320 * bpo-13533 * bpo-14956 * bpo-19983 * bpo-29778 * bpo-30560 * bpo-31745 * bpo-33135 * bpo-34725 * bpo-36204 Copy of my message in bpo-19983: "This issue has been fixed by the PEP 587 in bpo-36763: when Py_Initialize() fails, it no longer calls abort() but only exit(1)." I should maybe document this change somewhere. In bpo-19983, I proposed a patch (init_error.patch) which changed the error message on initiallization error: "Python initialization error: %s\n" rather than "Fatal Python Error: xxx\n". Maybe we can change that? -- I close to leave bpo-22213 open. bpo-32573 (missing sys.argv) is already fixed in the master branch, but I have been asked to also fix the issue in Python 3.7, so I wrote PR 13553. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:37:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:37:33 +0000 Subject: [issue36763] Implementation of the PEP 587 In-Reply-To: <1556663939.96.0.509924822981.issue36763@roundup.psfhosted.org> Message-ID: <1558971453.56.0.172000921675.issue36763@roundup.psfhosted.org> STINNER Victor added the comment: TODO: I didn't implement PyWideStringList_Insert() yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:51:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 15:51:13 +0000 Subject: [issue28866] Type cache is not correctly invalidated on a class defining mro() In-Reply-To: <1480862145.72.0.468660451957.issue28866@psf.upfronthosting.co.za> Message-ID: <1558972273.61.0.321691035301.issue28866@roundup.psfhosted.org> STINNER Victor added the comment: Python 2.7 is also affected according to Serhiy. Does someone want to write a backport to 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:52:08 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 15:52:08 +0000 Subject: [issue37035] Don't log OSError exceptions in asyncio transports In-Reply-To: <1558708377.15.0.222546736903.issue37035@roundup.psfhosted.org> Message-ID: <1558972328.04.0.318319585444.issue37035@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset a79b6c578fcd2ea8be29440fdd8a998e5527200f by Andrew Svetlov in branch '3.7': [3.7] bpo-37035: Don't log OSError (GH-13548) (#13594) https://github.com/python/cpython/commit/a79b6c578fcd2ea8be29440fdd8a998e5527200f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 11:52:27 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 15:52:27 +0000 Subject: [issue37035] Don't log OSError exceptions in asyncio transports In-Reply-To: <1558708377.15.0.222546736903.issue37035@roundup.psfhosted.org> Message-ID: <1558972347.74.0.825705256864.issue37035@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:02:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 16:02:19 +0000 Subject: [issue37054] Ignored exceptions in test_memoryio In-Reply-To: <1558882480.22.0.119118964732.issue37054@roundup.psfhosted.org> Message-ID: <1558972939.59.0.0574927539507.issue37054@roundup.psfhosted.org> STINNER Victor added the comment: Multiple tests log an "Exception ignored", but all of them come from the Python implementation. The problem is that _pyio.BytesIO and _pyio.TextIOWrapper initialize their self._buffer and self._seekable attribute "later" in the constructor, but then expect these attribute to exist in __del__(). Example: >>> import _pyio; _pyio.BytesIO(b'data', foo=b'fat') Exception ignored in: Traceback (most recent call last): File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 409, in __del__ self.close() File "/home/vstinner/prog/python/master/Lib/_pyio.py", line 903, in close self._buffer.clear() AttributeError: 'BytesIO' object has no attribute '_buffer' Traceback (most recent call last): File "", line 1, in TypeError: __init__() got an unexpected keyword argument 'foo' BytesIO.__init__() is not even called. An easy fix would be to do nothing in __del__() if hasattr(self, '_buffer') if false. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:04:33 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 27 May 2019 16:04:33 +0000 Subject: [issue37054] Ignored exceptions in test_memoryio In-Reply-To: <1558882480.22.0.119118964732.issue37054@roundup.psfhosted.org> Message-ID: <1558973073.99.0.938782252566.issue37054@roundup.psfhosted.org> Antoine Pitrou added the comment: Or to add `_buffer = None` at the class level. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:06:15 2019 From: report at bugs.python.org (Siming Yuan) Date: Mon, 27 May 2019 16:06:15 +0000 Subject: [issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided Message-ID: <1558973175.26.0.897834780365.issue37066@roundup.psfhosted.org> New submission from Siming Yuan : Using os.execl you can open a new bash shell (eg, using python to process some env before opening a new shell. $ echo $SHLVL 1 $ ~/.pyenv/versions/3.6.4/bin/python3 Python 3.6.4 (default, Feb 5 2018, 16:53:35) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.execl('/bin/bash', '') $ echo $SHLVL 2 Doing the above works with just /bin/bash no arguments. (notice SHLVL incrementing) But providing your own custom --init-file or --rcfile, doesn't. eg - /bin/bashrc --rcfile $ echo $SHLVL 1 $ ~/.pyenv/versions/3.6.4/bin/python3 Python 3.6.4 (default, Feb 5 2018, 16:53:35) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.execl('/bin/bash', '--rcfile','/users/me/venv/bin/activate') $ echo $SHLVL 1 this can be replicated in Python 3.5 to 3.7 can be worked-around if using a wrapper.sh file with: #! /bin/bash exec /bin/bash --rcfile /users/me/venv/bin/activate and running this file in os.execl() instead. ---------- messages: 343654 nosy: siming85 priority: normal severity: normal status: open title: os.execl opening a new bash shell doesn't work if initfile/rcfile provided versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:08:47 2019 From: report at bugs.python.org (Siming Yuan) Date: Mon, 27 May 2019 16:08:47 +0000 Subject: [issue37067] os.execl doesn't allow for empty string in mac Message-ID: <1558973327.05.0.558912294588.issue37067@roundup.psfhosted.org> New submission from Siming Yuan : the following works in Linux import os os.execl('/bin/bash', '') doesn't in mac: >>> import os >>> os.execl('/bin/bash', '') Traceback (most recent call last): File "", line 1, in File "/Users/me/.pyenv/versions/3.6.4/lib/python3.6/os.py", line 527, in execl execv(file, args) ValueError: execv() arg 2 first element cannot be empty works if you add a space >>> os.execl('/bin/bash', ' ') notice the space in 2nd argument. technically it is also possible to run a command without arguments - why not allow for the case where *args is []? >>> os.execl('/bin/bash') Traceback (most recent call last): File "", line 1, in File "/Users/siyuan/.pyenv/versions/3.6.4/lib/python3.6/os.py", line 527, in execl execv(file, args) ValueError: execv() arg 2 must not be empty >>> ---------- components: macOS messages: 343655 nosy: ned.deily, ronaldoussoren, siming85 priority: normal severity: normal status: open title: os.execl doesn't allow for empty string in mac versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:16:47 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 27 May 2019 16:16:47 +0000 Subject: [issue37065] File and lineno is not reported for syntax error in f-string In-Reply-To: <1558969914.07.0.850758121851.issue37065@roundup.psfhosted.org> Message-ID: <1558973807.65.0.980863425938.issue37065@roundup.psfhosted.org> Eric V. Smith added the comment: I'm pretty sure there's already an issue for this, but I don't have time to search for it now. This is not an easy problem to solve. I've been working on it on and off for almost a year. I'll eventually get to it, but the changes are pretty invasive. ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:24:03 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 27 May 2019 16:24:03 +0000 Subject: [issue37065] File and lineno is not reported for syntax error in f-string In-Reply-To: <1558969914.07.0.850758121851.issue37065@roundup.psfhosted.org> Message-ID: <1558974243.26.0.537321609018.issue37065@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Related open issue : issue34364. Also issue29051 which was closed as duplicate of issue34364. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:38:07 2019 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 27 May 2019 16:38:07 +0000 Subject: [issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided In-Reply-To: <1558973175.26.0.897834780365.issue37066@roundup.psfhosted.org> Message-ID: <1558975087.43.0.0444435590477.issue37066@roundup.psfhosted.org> Anthony Sottile added the comment: You want: os.execl('/bin/bash', 'bash', '--init-file', ...) argv[0] is supposed to be the program name, your example puts `--init-file` as the program name ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:44:36 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 27 May 2019 16:44:36 +0000 Subject: [issue29819] Avoid raising OverflowError in truncate() if possible In-Reply-To: <1489590666.79.0.55108836997.issue29819@psf.upfronthosting.co.za> Message-ID: <1558975476.36.0.0823159659113.issue29819@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:48:19 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 27 May 2019 16:48:19 +0000 Subject: [issue32941] mmap should expose madvise() In-Reply-To: <1519506923.52.0.467229070634.issue32941@psf.upfronthosting.co.za> Message-ID: <1558975699.61.0.143794609992.issue32941@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset 02db696732c031d9a0265dc9bbf4f5b1fad042b3 by Antoine Pitrou (Zackery Spytz) in branch 'master': bpo-32941: Add madvise() for mmap objects (GH-6172) https://github.com/python/cpython/commit/02db696732c031d9a0265dc9bbf4f5b1fad042b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:48:56 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 27 May 2019 16:48:56 +0000 Subject: [issue32941] mmap should expose madvise() In-Reply-To: <1519506923.52.0.467229070634.issue32941@psf.upfronthosting.co.za> Message-ID: <1558975736.04.0.56755442808.issue32941@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 12:53:22 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 27 May 2019 16:53:22 +0000 Subject: [issue32941] mmap should expose madvise() In-Reply-To: <1519506923.52.0.467229070634.issue32941@psf.upfronthosting.co.za> Message-ID: <1558976002.19.0.848876898357.issue32941@roundup.psfhosted.org> Antoine Pitrou added the comment: Josh, sorry, I hadn't seen your message. Those are low-levels operations, so I don't know if it makes sense to implement madvise() in terms of PrefetchVirtualMemory(), or expose a separate wrapper to PrefetchVirtualMemory(). One complication is that we currently don't expose public wrappers over Windows API functions (there's a private _winapi module). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:01:03 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 27 May 2019 17:01:03 +0000 Subject: [issue26329] os.path.normpath("//") returns // In-Reply-To: <1455116285.45.0.915370101527.issue26329@psf.upfronthosting.co.za> Message-ID: <1558976463.19.0.641925732093.issue26329@roundup.psfhosted.org> Joannah Nanjekye added the comment: @ Jack McCracken do you want to open a pull request for this? ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:17:43 2019 From: report at bugs.python.org (Siming Yuan) Date: Mon, 27 May 2019 17:17:43 +0000 Subject: [issue37067] os.execl doesn't allow for empty string in mac In-Reply-To: <1558973327.05.0.558912294588.issue37067@roundup.psfhosted.org> Message-ID: <1558977463.88.0.435640243245.issue37067@roundup.psfhosted.org> Siming Yuan added the comment: actually just learned that argv0 is program name. in that case is that because of a platform difference where in macOS it doesn't allow for program name to be '' and in linux it does? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:18:14 2019 From: report at bugs.python.org (Siming Yuan) Date: Mon, 27 May 2019 17:18:14 +0000 Subject: [issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided In-Reply-To: <1558973175.26.0.897834780365.issue37066@roundup.psfhosted.org> Message-ID: <1558977494.42.0.264002571874.issue37066@roundup.psfhosted.org> Siming Yuan added the comment: that works... but where does it say arv[0] is the program name? it seems to be more of a how C works... would be nice if the doc had some examples of that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:18:32 2019 From: report at bugs.python.org (Erik Bray) Date: Mon, 27 May 2019 17:18:32 +0000 Subject: [issue21536] extension built with a shared python cannot be loaded with a static python In-Reply-To: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> Message-ID: <1558977512.97.0.832131302544.issue21536@roundup.psfhosted.org> Erik Bray added the comment: Thanks everyone. And FWIW I agree the original change is positive overall, if a bit presumptuous about different linkers' behaviors :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:21:43 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 27 May 2019 17:21:43 +0000 Subject: [issue37051] Glossary item "hashable" incorrect In-Reply-To: <1558818653.08.0.592312048855.issue37051@roundup.psfhosted.org> Message-ID: <1558977703.54.0.823424569352.issue37051@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13502 pull_request: https://github.com/python/cpython/pull/13595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:21:56 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 27 May 2019 17:21:56 +0000 Subject: [issue37051] Glossary item "hashable" incorrect In-Reply-To: <1558818653.08.0.592312048855.issue37051@roundup.psfhosted.org> Message-ID: <1558977716.94.0.604358006725.issue37051@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset cc1c582f6fe450ce1c7de849137039e9b5fab8eb by Raymond Hettinger in branch 'master': bpo-37051: Refine note on what objects are hashable (GH-13587) https://github.com/python/cpython/commit/cc1c582f6fe450ce1c7de849137039e9b5fab8eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:37:30 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 27 May 2019 17:37:30 +0000 Subject: [issue32941] mmap should expose madvise() In-Reply-To: <1519506923.52.0.467229070634.issue32941@psf.upfronthosting.co.za> Message-ID: <1558978650.95.0.15669928977.issue32941@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- pull_requests: +13503 pull_request: https://github.com/python/cpython/pull/13596 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:43:25 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 27 May 2019 17:43:25 +0000 Subject: [issue37051] Glossary item "hashable" incorrect In-Reply-To: <1558818653.08.0.592312048855.issue37051@roundup.psfhosted.org> Message-ID: <1558979005.2.0.249800110831.issue37051@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset e8318f31f35dc851684c094b268e4a85d7f357c9 by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-37051: Refine note on what objects are hashable (GH-13587) (GH-13595) https://github.com/python/cpython/commit/e8318f31f35dc851684c094b268e4a85d7f357c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:43:57 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 27 May 2019 17:43:57 +0000 Subject: [issue37051] Glossary item "hashable" incorrect In-Reply-To: <1558818653.08.0.592312048855.issue37051@roundup.psfhosted.org> Message-ID: <1558979037.76.0.286300879792.issue37051@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:48:33 2019 From: report at bugs.python.org (SilentGhost) Date: Mon, 27 May 2019 17:48:33 +0000 Subject: [issue37065] File and lineno is not reported for syntax error in f-string In-Reply-To: <1558969914.07.0.850758121851.issue37065@roundup.psfhosted.org> Message-ID: <1558979313.65.0.135695954122.issue37065@roundup.psfhosted.org> Change by SilentGhost : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> problem with traceback for syntax error in f-string _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 13:57:26 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 27 May 2019 17:57:26 +0000 Subject: [issue32941] mmap should expose madvise() In-Reply-To: <1519506923.52.0.467229070634.issue32941@psf.upfronthosting.co.za> Message-ID: <1558979846.32.0.92333506937.issue32941@roundup.psfhosted.org> miss-islington added the comment: New changeset 695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7 by Miss Islington (bot) (Antoine Pitrou) in branch 'master': bpo-32941: Fix test_madvise failure when page size >= 8kiB (GH-13596) https://github.com/python/cpython/commit/695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 14:02:24 2019 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 27 May 2019 18:02:24 +0000 Subject: [issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided In-Reply-To: <1558973175.26.0.897834780365.issue37066@roundup.psfhosted.org> Message-ID: <1558980144.49.0.0267683942047.issue37066@roundup.psfhosted.org> Anthony Sottile added the comment: They're thin wrappers around the same C functions -- that's just how C works it is also documented: https://docs.python.org/3/library/os.html#os.execvpe > In either case, the arguments to the child process **should start with the name of the command being run**, but this is not enforced. The pattern that I usually use is ```python cmd = ('bash', '--init-file', 'foo') os.execvp(cmd[0], cmd) # never returns ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 14:19:02 2019 From: report at bugs.python.org (Siming Yuan) Date: Mon, 27 May 2019 18:19:02 +0000 Subject: [issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided In-Reply-To: <1558973175.26.0.897834780365.issue37066@roundup.psfhosted.org> Message-ID: <1558981142.68.0.305478328274.issue37066@roundup.psfhosted.org> Siming Yuan added the comment: thank you for the insight and quick response. thought i hit the weirdest bug ever ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 14:39:05 2019 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 27 May 2019 18:39:05 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1558982345.45.0.745918509905.issue33071@roundup.psfhosted.org> ?ric Araujo added the comment: I?m concerned that not only references to register command were deleted, but also useful general intro to PyPI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 14:43:04 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 27 May 2019 18:43:04 +0000 Subject: [issue37066] os.execl opening a new bash shell doesn't work if initfile/rcfile provided In-Reply-To: <1558973175.26.0.897834780365.issue37066@roundup.psfhosted.org> Message-ID: <1558982584.14.0.240817985689.issue37066@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 14:43:50 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 27 May 2019 18:43:50 +0000 Subject: [issue37050] Remove expr_text from ast node FormattedValue In-Reply-To: <1558817834.95.0.692781617754.issue37050@roundup.psfhosted.org> Message-ID: <1558982630.02.0.203451569561.issue37050@roundup.psfhosted.org> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +13504 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13597 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:04:57 2019 From: report at bugs.python.org (Jack) Date: Mon, 27 May 2019 19:04:57 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1558983897.6.0.858926713812.issue27860@roundup.psfhosted.org> Jack added the comment: I for one have encountered #35990 in my work and would appreciate a backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:10:40 2019 From: report at bugs.python.org (Berker Peksag) Date: Mon, 27 May 2019 19:10:40 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1558984240.38.0.505157534344.issue27860@roundup.psfhosted.org> Change by Berker Peksag : ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:11:14 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 27 May 2019 19:11:14 +0000 Subject: [issue37068] Emit SyntaxWarning for f-strings without expressions ? Message-ID: <1558984274.64.0.992654624102.issue37068@roundup.psfhosted.org> New submission from Matthias Bussonnier : Or more precisely I suggest to emit a SyntaxWarning for JoinedStr where no f-string members has an expression. There seem to be a couple of case where f-strings without expressions may indicate that the programmer may have made a mistake; though there are also a number of case where f-string w/o expressions are legitimate; I believe we should be able to emit a SyntaxWarning in case where `f` are really unnecessary or might be a mistakes. First case where f-string w/o expressions are legitimate: multiline joined string, to make sure each line is aligned. Example from CPython source: # not a SyntaxWarning. msg = ( f'error while attempting to bind on ' f'address {laddr!r}: ' f'{exc.strerror.lower()}' ) The first line has obviously no expression, but the f is useful for visual consistency, and we likely do not want a warning. Though in the above case we can imagine the following typo : msg = ( f'error while attempting to bind on ', #SyntaxWarning here f'address {laddr!r}: ', f'{exc.strerror.lower()}' ) Easy to make and in this case, the expression-less f-string is likely an error. In this case a syntax warning would help to distinguish that there are trailing commas. Another case from the cpython is the following: fullName = f'%s.%s.%s' % ( #SyntaxWarning here testCaseClass.__module__, testCaseClass.__qualname__, attrname ) Looking at the history; I believe the author was meaning to change to an f-string, but got interrupted half-way and only added the prefix. Pep 498 does not seem to say anything about f-string w/o expressions; but test-suite appear to test that f-string without expression do not raise an error. I do not believe that making it an error is in anyway desirable; I believe a SyntaxWarning would align with the current warning on invalid escape sequence, and help ??mostly during refactoring, if an f-string loses some of its parameters, and the f"" if non-intentionally kept. ---------- components: Interpreter Core messages: 343672 nosy: mbussonn priority: normal severity: normal status: open title: Emit SyntaxWarning for f-strings without expressions ? versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:15:47 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 27 May 2019 19:15:47 +0000 Subject: [issue37068] Emit SyntaxWarning for f-strings without expressions ? In-Reply-To: <1558984274.64.0.992654624102.issue37068@roundup.psfhosted.org> Message-ID: <1558984547.13.0.468586947391.issue37068@roundup.psfhosted.org> Eric V. Smith added the comment: I think this would be better suited for a linter. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:16:54 2019 From: report at bugs.python.org (Mario Corchero) Date: Mon, 27 May 2019 19:16:54 +0000 Subject: [issue29143] Logger should ignore propagate property for disabled handlers. In-Reply-To: <1483465774.47.0.809201158116.issue29143@psf.upfronthosting.co.za> Message-ID: <1558984614.05.0.274456374352.issue29143@roundup.psfhosted.org> Mario Corchero added the comment: Note that "handlers" cannot be disabled. This applies only to loggers. Also, the following code shows that disabling the logger does indeed prevents all logs in emitted by that logger from appearing: ``` import logging parent_handler = logging.StreamHandler() child_handler = logging.StreamHandler() parent_logger = logging.getLogger('parent') child_logger = logging.getLogger('parent.child') parent_logger.addHandler(parent_handler) child_logger.addHandler(child_handler) child_logger.disabled = True child_logger.error("wops") ``` Trying to guess what happened, it might be that there was a child of the disabled logged and you saw the log trace expecting it was the child, example: ``` import logging parent_handler = logging.StreamHandler() child_handler = logging.StreamHandler() parent_logger = logging.getLogger('parent') child_logger = logging.getLogger('parent.child') grandchild_logger = logging.getLogger('parent.child.grandchild') parent_logger.addHandler(parent_handler) child_logger.addHandler(child_handler) child_logger.disabled = True grandchild_logger.error("wops") ``` Note that disable does not affect how handlers across loggers are called. It only disables the logger and therefore prevents from emitting logs that are emitted directly through the disabled logger. Might that be the case? Are you OK with closing this issue if so? ---------- nosy: +mariocj89 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:16:57 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 27 May 2019 19:16:57 +0000 Subject: [issue9030] ctypes variable limits In-Reply-To: <1276892210.09.0.679201213154.issue9030@psf.upfronthosting.co.za> Message-ID: <1558984617.36.0.300849903279.issue9030@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:20:21 2019 From: report at bugs.python.org (hai shi) Date: Mon, 27 May 2019 19:20:21 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1558984821.2.0.00646752115609.issue33071@roundup.psfhosted.org> hai shi added the comment: I think you are right, so i remain meaningful intro. Anyone else has an thought? ---------- versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:23:17 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 27 May 2019 19:23:17 +0000 Subject: [issue19904] Add 128-bit integer support to struct In-Reply-To: <1386295463.1.0.439245102985.issue19904@psf.upfronthosting.co.za> Message-ID: <1558984997.76.0.589433582653.issue19904@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:24:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 May 2019 19:24:09 +0000 Subject: [issue37068] Emit SyntaxWarning for f-strings without expressions ? In-Reply-To: <1558984274.64.0.992654624102.issue37068@roundup.psfhosted.org> Message-ID: <1558985049.9.0.332650957506.issue37068@roundup.psfhosted.org> Serhiy Storchaka added the comment: I do not think that all uses of f-strings without expression are errors. Therefore it would be better to left this on linters. Linters are optional and usually are flexible in configuring what warnings and in what part of the code should be emitted. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:32:07 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 27 May 2019 19:32:07 +0000 Subject: [issue37050] Remove expr_text from ast node FormattedValue In-Reply-To: <1558817834.95.0.692781617754.issue37050@roundup.psfhosted.org> Message-ID: <1558985527.41.0.397975283132.issue37050@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 6f6ff8a56518a80da406aad6ac8364c046cc7f18 by Eric V. Smith in branch 'master': bpo-37050: Remove expr_text from FormattedValue ast node, use Constant node instead (GH-13597) https://github.com/python/cpython/commit/6f6ff8a56518a80da406aad6ac8364c046cc7f18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:32:39 2019 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 27 May 2019 19:32:39 +0000 Subject: [issue37050] Remove expr_text from ast node FormattedValue In-Reply-To: <1558817834.95.0.692781617754.issue37050@roundup.psfhosted.org> Message-ID: <1558985559.99.0.958018287764.issue37050@roundup.psfhosted.org> Change by Eric V. Smith : ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:56:27 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 27 May 2019 19:56:27 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1558986987.7.0.592079024255.issue36889@roundup.psfhosted.org> miss-islington added the comment: New changeset 23b4b697e5b6cc897696f9c0288c187d2d24bff2 by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-36889: Merge asyncio streams (GH-13251) https://github.com/python/cpython/commit/23b4b697e5b6cc897696f9c0288c187d2d24bff2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:56:31 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 27 May 2019 19:56:31 +0000 Subject: [issue22253] ConfigParser does not handle files without sections In-Reply-To: <1408731768.17.0.221948826268.issue22253@psf.upfronthosting.co.za> Message-ID: <1558986991.14.0.748155318792.issue22253@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 15:59:57 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 19:59:57 +0000 Subject: [issue34975] start_tls() difficult when using asyncio.start_server() In-Reply-To: <1539460993.6.0.788709270274.issue34975@psf.upfronthosting.co.za> Message-ID: <1558987197.23.0.322048626129.issue34975@roundup.psfhosted.org> Andrew Svetlov added the comment: Fixed by #36889 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> Merge StreamWriter and StreamReader into just asyncio.Stream _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:01:18 2019 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 27 May 2019 20:01:18 +0000 Subject: [issue22253] ConfigParser does not handle files without sections In-Reply-To: <1408731768.17.0.221948826268.issue22253@psf.upfronthosting.co.za> Message-ID: <1558987278.13.0.0637369035534.issue22253@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:01:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 20:01:30 +0000 Subject: [issue36840] Add stream.abort() async method In-Reply-To: <1557259806.05.0.192162125401.issue36840@roundup.psfhosted.org> Message-ID: <1558987290.98.0.123641152195.issue36840@roundup.psfhosted.org> Andrew Svetlov added the comment: Fixed by #36889 ---------- resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> Merge StreamWriter and StreamReader into just asyncio.Stream _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:02:02 2019 From: report at bugs.python.org (Mario) Date: Mon, 27 May 2019 20:02:02 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1558987322.35.0.222836704607.issue34725@roundup.psfhosted.org> Mario added the comment: Unfortunately the underlying cause of this issue has not been addressed, nor discussed. There is now a way to workaround the different behaviour in Windows and Linux and it is possible to use the new call to make virtual environment work in Windows as they already do in Linux. Problem is that application will have to be change to actually implement the workaround. I still think this difference should be addressed directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:12:22 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 20:12:22 +0000 Subject: [issue26270] Support for read()/write()/select() on asyncio In-Reply-To: <1454451619.12.0.0280470843365.issue26270@psf.upfronthosting.co.za> Message-ID: <1558987942.5.0.765044269598.issue26270@roundup.psfhosted.org> Andrew Svetlov added the comment: The suggestion is using streams as a high-level API. I see no real proposals in this issue. select()/read()/write() is not suitable interface, sorry. Closing, feel free to create a new issue if you come up with a concrete proposal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:14:23 2019 From: report at bugs.python.org (paul j3) Date: Mon, 27 May 2019 20:14:23 +0000 Subject: [issue36863] argparse doesn't like options in the middle of arguments In-Reply-To: <1557391162.39.0.325223416239.issue36863@roundup.psfhosted.org> Message-ID: <1558988063.8.0.933259255657.issue36863@roundup.psfhosted.org> paul j3 added the comment: This is intended behavior of multi-nargs positionals. The 'one' string is consumed by the 'file' argument, and there's no positional argument left to consume the other strings. The topic was raised and discussed previously https://bugs.python.org/issue14191 -argparse doesn't allow optionals within positionals The fix is to use 'parser.parse_intermixed_args()', as documented in https://docs.python.org/3/library/argparse.html#intermixed-parsing ---------- nosy: +paul.j3 resolution: -> duplicate stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:14:40 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 20:14:40 +0000 Subject: [issue34655] Support sendfile in asyncio streams API Message-ID: <1558988080.18.0.935340401642.issue34655@roundup.psfhosted.org> New submission from Andrew Svetlov : Done by #36889 ---------- resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> Merge StreamWriter and StreamReader into just asyncio.Stream _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:18:17 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 20:18:17 +0000 Subject: [issue34993] asyncio.streams.FlowControlMixin should be part of the API In-Reply-To: <1539624475.24.0.788709270274.issue34993@psf.upfronthosting.co.za> Message-ID: <1558988297.04.0.192872991145.issue34993@roundup.psfhosted.org> Andrew Svetlov added the comment: FlowControlMixing is a private API class. The class is not intended for the usage outside of asyncio. If you found it useful for you please feel free to copy-paste the class from asyncio sources into your project. The reason is: we want to keep freedom for changing asyncio internals without breaking backward compatibility. One of key technologies for it is keeping the public API as small as possible. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:19:02 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 20:19:02 +0000 Subject: [issue34993] asyncio.streams.FlowControlMixin should be part of the API In-Reply-To: <1539624475.24.0.788709270274.issue34993@psf.upfronthosting.co.za> Message-ID: <1558988342.82.0.909242841915.issue34993@roundup.psfhosted.org> Andrew Svetlov added the comment: #36889 deprecates using FlowXontrolMixin outside of asyncio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:20:56 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 20:20:56 +0000 Subject: [issue35040] [functools] provide an async-compatible version of functools.lru_cache In-Reply-To: <1540172391.19.0.788709270274.issue35040@psf.upfronthosting.co.za> Message-ID: <1558988456.46.0.136354276907.issue35040@roundup.psfhosted.org> Andrew Svetlov added the comment: Brett please elaborate. Do you want to incorporate async_lru library into CPython Core? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:22:17 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 20:22:17 +0000 Subject: [issue26270] Support for read()/write()/select() on asyncio In-Reply-To: <1454451619.12.0.0280470843365.issue26270@psf.upfronthosting.co.za> Message-ID: <1558988537.42.0.401310268597.issue26270@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:23:58 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 20:23:58 +0000 Subject: [issue35279] asyncio uses too many threads by default In-Reply-To: <1542637615.61.0.788709270274.issue35279@psf.upfronthosting.co.za> Message-ID: <1558988638.6.0.119680748285.issue35279@roundup.psfhosted.org> Andrew Svetlov added the comment: asyncio uses bare concurrent.futures.ThreadPoolExecutor. Tha question is: should asyncio reduce the number of threads in the pool or concurrent.futures should change the default value? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:25:11 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 20:25:11 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1558988711.32.0.0509829708749.issue36889@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:28:44 2019 From: report at bugs.python.org (Tal Einat) Date: Mon, 27 May 2019 20:28:44 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558988924.44.0.713635057662.issue37039@roundup.psfhosted.org> Tal Einat added the comment: To get the maximum available height, does Tk's wm_maxsize() not work? https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M54 Answering my own question above: No, it gives the total screen height, which doesn't ignore e.g. taskbars. The best way to get the actual available height appears to be: 1. create a hidden window 2. maximize it with wm_state("zoomed") 3. get its height with winfo_height() Testing on Windows, this does respect the taskbar, as well as scaling in the display settings. (Also note that Tk window heights appear not to include the window manager's title bar.) I've yet to test on other OSs, but I've seen this method recommended before, and it has the potential to be robust. Terry, would you like to see a PR with such an implementation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 16:43:27 2019 From: report at bugs.python.org (Andre Roberge) Date: Mon, 27 May 2019 20:43:27 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558988924.44.0.713635057662.issue37039@roundup.psfhosted.org> Message-ID: Andre Roberge added the comment: I volunteer to do some testing. In addition to the problem I noted on my computer where the status bar disappeared behind the task bar, I noticed that on my secondary 4k monitor (resolution: 3840 x 2160), clicking Zoom Height resulted in a window stretched only about 2/3 of the maximum screen height - so, the opposite "problem". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 17:30:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 21:30:46 +0000 Subject: [issue34725] Py_GetProgramFullPath() odd behaviour in Windows In-Reply-To: <1537291607.58.0.956365154283.issue34725@psf.upfronthosting.co.za> Message-ID: <1558992646.57.0.847766565971.issue34725@roundup.psfhosted.org> STINNER Victor added the comment: I read again the issue. In short, the Path Configuration is a mess and unusable in some cases :-) I reopen the issue. Handling venv shouldn't be handled by the site module which is optional, but earlier. I guess that venv support was added to site because it is way eaiser to write C than touching getpath.c written in C. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 18:34:44 2019 From: report at bugs.python.org (Abhilash Raj) Date: Mon, 27 May 2019 22:34:44 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding In-Reply-To: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> Message-ID: <1558996484.13.0.212385127932.issue30835@roundup.psfhosted.org> Change by Abhilash Raj : ---------- keywords: +patch pull_requests: +13505 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/13598 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 18:39:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 22:39:54 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558996794.77.0.536210508376.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cd590a7cede156a4244e7cac61e4504e5344d842 by Victor Stinner in branch 'master': bpo-1230540: Add threading.excepthook() (GH-13515) https://github.com/python/cpython/commit/cd590a7cede156a4244e7cac61e4504e5344d842 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 18:48:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 22:48:10 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1558997290.86.0.277162591728.issue2506@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13506 pull_request: https://github.com/python/cpython/pull/13600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 18:51:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 22:51:24 +0000 Subject: [issue37069] regrtest: log unraisable exceptions and uncaught thread exceptions Message-ID: <1558997484.87.0.618934402283.issue37069@roundup.psfhosted.org> New submission from STINNER Victor : Python 3.8 got 2 new hooks: sys.unraisablehook and threading.excepthook. It would be interesting to catch these exceptions and display them again in the test summary. I modified the io.IOBase destructor to log close() exception. There are still open issues: see bpo-18748. Once these issues will be fixed, maybe it would even be interesting to make a test fail if at least one uncaught thread exception is raised or an unraisable exception is logged? ---------- components: Tests messages: 343693 nosy: vstinner priority: normal severity: normal status: open title: regrtest: log unraisable exceptions and uncaught thread exceptions versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 18:53:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 22:53:59 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1558997639.2.0.00858070252287.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: It took 14 years, but this issue is now fixed ;-) I close it. Python 3.8 beta 1 will be released in a few days with threading.excepthook(): please test it to ensure that it works as you expected. As a follow-up, I created bpo-37069: "regrtest: log unraisable exceptions and uncaught thread exceptions". ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 18:54:22 2019 From: report at bugs.python.org (Abhilash Raj) Date: Mon, 27 May 2019 22:54:22 +0000 Subject: [issue34222] Email message serialization enters an infinite loop when folding non-ASCII headers with long words In-Reply-To: <1532523404.04.0.56676864532.issue34222@psf.upfronthosting.co.za> Message-ID: <1558997662.82.0.0151604665183.issue34222@roundup.psfhosted.org> Abhilash Raj added the comment: IMO, this is a duplicate of https://bugs.python.org/issue33529 (which was reported before this one was). I have tested that the fix for bpo-33529 does indeed fix the test case which has been provided above. The Pull Request for bpo-33529 has been merged, so I believe this issue and associated PR can be closed. ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 18:54:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 22:54:53 +0000 Subject: [issue37069] regrtest: log unraisable exceptions and uncaught thread exceptions In-Reply-To: <1558997484.87.0.618934402283.issue37069@roundup.psfhosted.org> Message-ID: <1558997693.93.0.648114996034.issue37069@roundup.psfhosted.org> STINNER Victor added the comment: References: * bpo-36829: sys.unraisablehook() * bpo-1230540: threading.excepthook() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 18:57:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 22:57:04 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1558997824.61.0.118255719573.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: Ok, the initial issue has been fixed by adding a new sys.unraisablehook() function. You can kill the process with SIGABRT using the recipe I proposed there: https://bugs.python.org/issue36829#msg343201 As a follow-up, I created bpo-37069: "regrtest: log unraisable exceptions and uncaught thread exceptions". Thanks Thomas Grainger for reviews and for reporting this interesting issue ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 18:59:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 22:59:53 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1558997993.95.0.610714024203.issue36721@roundup.psfhosted.org> STINNER Victor added the comment: The initial issue has been fixed. As far as I know, all known issues have been fixed, so I close the issue. Thanks Miro for the help in reviews and tests! FYI waf is already fixed for the future Python 3.8 beta1! It now attempts to use --embed for its "pyembed" config ;-) Miro wrote a fix: https://gitlab.com/ita1024/waf/merge_requests/2236 https://gitlab.com/ita1024/waf/issues/2239 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:01:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:01:11 +0000 Subject: [issue18748] io.IOBase destructor silence I/O error on close() by default In-Reply-To: <1376572242.37.0.931026549367.issue18748@psf.upfronthosting.co.za> Message-ID: <1558998071.65.0.458814917986.issue18748@roundup.psfhosted.org> STINNER Victor added the comment: Related issue: bpo-37054 "Ignored exceptions in test_memoryio". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:07:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:07:10 +0000 Subject: [issue37054] Ignored exceptions in test_memoryio In-Reply-To: <1558882480.22.0.119118964732.issue37054@roundup.psfhosted.org> Message-ID: <1558998430.92.0.888262706886.issue37054@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13507 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:08:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:08:12 +0000 Subject: [issue37054] Ignored exceptions in test_memoryio In-Reply-To: <1558882480.22.0.119118964732.issue37054@roundup.psfhosted.org> Message-ID: <1558998492.74.0.717774282426.issue37054@roundup.psfhosted.org> STINNER Victor added the comment: Antoine: > Or to add `_buffer = None` at the class level. Ok, I wrote bpo-13601 to implement this idea and fix test_memoryio warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:15:13 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 23:15:13 +0000 Subject: [issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does In-Reply-To: <1542203449.76.0.788709270274.issue35246@psf.upfronthosting.co.za> Message-ID: <1558998913.23.0.0754340057234.issue35246@roundup.psfhosted.org> Andrew Svetlov added the comment: All we need is `program = os.fspath(program)` in base_events.py subprocess_exec() method. Is anybody volunteered to make a patch (with test and docs update, sure)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:15:59 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 27 May 2019 23:15:59 +0000 Subject: [issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does In-Reply-To: <1542203449.76.0.788709270274.issue35246@psf.upfronthosting.co.za> Message-ID: <1558998959.17.0.533178346013.issue35246@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:16:49 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 27 May 2019 23:16:49 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558999009.46.0.646557944519.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset df9b032f47e4edaf306d95449370e565ee470018 by Terry Jan Reedy in branch 'master': bpo-37039: IDLE - zoomheight fixes (GH-13576) https://github.com/python/cpython/commit/df9b032f47e4edaf306d95449370e565ee470018 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:23:11 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 27 May 2019 23:23:11 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558999391.38.0.228756709207.issue37039@roundup.psfhosted.org> Terry J. Reedy added the comment: Tal, please go ahead after updating your repository. I just merged PR 13576 after reverting the change from 72 to 114 that only works for me and adding Skip News. Include a blurb with your patch. It only needs to include something like "Fix zoom height calculation so that it should work on all monitors, regardless of resolution, pixel density, and display setting." Besides replacing the newheight calculation, the patch will need a a reduced conditional expression new_y = 22 if macosx.isAquaTk() else 0 unless we can get it also from the maximized window geometry. "potential to be robust"> I hope so. Your suggestion is part of my 'Conclusion 3 above, but I feared that it might not work at all on a withdrawn window, let alone give us numbers that work. I was unaware of others trying it. Andre, yes, before merging, we should test on multiple (different) Windows systems, as well as other OSes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:25:20 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 27 May 2019 23:25:20 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1558999520.6.0.736510215503.issue37039@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13508 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:26:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:26:02 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1558999562.06.0.10581038636.issue33725@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13509 pull_request: https://github.com/python/cpython/pull/13603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:28:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:28:10 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1558999690.49.0.835975704369.issue33725@roundup.psfhosted.org> STINNER Victor added the comment: I don't see a clear consensus to switch to spawn on *all* platforms, so I wrote PR 13603 which is the minimum fix: switch to spawn by default, but only on macOS. If this PR is merged, I understand that it should be applied to 2.7 and 3.7 branches as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:36:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:36:05 +0000 Subject: [issue36782] Add tests for the datetime C API In-Reply-To: <1556891217.54.0.801221071749.issue36782@roundup.psfhosted.org> Message-ID: <1559000165.33.0.081238802326.issue36782@roundup.psfhosted.org> STINNER Victor added the comment: Paul Ganssle is in favor of backporting new tests to Python 3.7: https://github.com/python/cpython/pull/13088#issuecomment-493591633 But automated backports failed with a conflict. If someone wants to backport it manually, please go ahead! In the meanwhile, I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:40:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:40:30 +0000 Subject: [issue33919] Expose _PyCoreConfig structure to Python In-Reply-To: <1529525175.44.0.56676864532.issue33919@psf.upfronthosting.co.za> Message-ID: <1559000430.97.0.184016204909.issue33919@roundup.psfhosted.org> STINNER Victor added the comment: So far, there is no clear agreement to expose C PyConfig structure in Python, so I close the issue. My PEP 587 has been accepted. I chose to not expose PyConfig in Python in the PEP. But I'm open to revisit this idea later, especially to move towards PEP 432: implement multi-phase initialization (only partially supported in my PEP 587). But I would prefer to a different rationale than exposing hash_seed. For hash_seed alone, I don't think that it's worth it. Moreover, Christian wrote: > hash_seed and use_hash_seed could be added to sys.hash_info. This would be the first place I'd look for the information. After all I implemented it. :) ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:41:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:41:17 +0000 Subject: =?utf-8?q?=5Bissue36895=5D_time=2Eclock=28=29_marked_for_removal_in_3=2E8?= =?utf-8?b?IOKAk8Kgc3RpbGwgdGhlcmUu?= In-Reply-To: <1557696094.54.0.878450659131.issue36895@roundup.psfhosted.org> Message-ID: <1559000477.23.0.511518750521.issue36895@roundup.psfhosted.org> STINNER Victor added the comment: > time.clock() marked for removal in 3.8 ? still there. Nope, it's now gone :-) I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:43:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:43:05 +0000 Subject: [issue36891] Additional startup plugin for vendors In-Reply-To: <1557603168.21.0.544720725277.issue36891@roundup.psfhosted.org> Message-ID: <1559000585.44.0.176005954953.issue36891@roundup.psfhosted.org> STINNER Victor added the comment: I dislike the proposed feature. site already allows sitecustomize and usercustomize. If you distribute Python, you can modify site.py anyway. I suggest to close (reject) this feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:44:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:44:24 +0000 Subject: [issue37054] Ignored exceptions in test_memoryio In-Reply-To: <1558882480.22.0.119118964732.issue37054@roundup.psfhosted.org> Message-ID: <1559000664.39.0.673904539935.issue37054@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a3568417c49f36860393075b21c93996a5f6799b by Victor Stinner in branch 'master': bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601) https://github.com/python/cpython/commit/a3568417c49f36860393075b21c93996a5f6799b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:44:31 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 27 May 2019 23:44:31 +0000 Subject: [issue37054] Ignored exceptions in test_memoryio In-Reply-To: <1558882480.22.0.119118964732.issue37054@roundup.psfhosted.org> Message-ID: <1559000671.54.0.929287048159.issue37054@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13510 pull_request: https://github.com/python/cpython/pull/13604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:45:33 2019 From: report at bugs.python.org (Ryan Govostes) Date: Mon, 27 May 2019 23:45:33 +0000 Subject: [issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument In-Reply-To: <1544803180.32.0.788709270274.issue35495@psf.upfronthosting.co.za> Message-ID: <1559000733.39.0.425100882803.issue35495@roundup.psfhosted.org> Ryan Govostes added the comment: Thanks Michael for all of the examples. After reading them all, I concur that "it can be hard to conceptualize what the exact behavior should be." A documentation change is warranted, at the least. However the argparse documentation, while great, is dense and it would be easy to overlook a simple comment. And I think the point that is being raised isn't merely a suggestion on how to design a good CLI, but a pitfall that makes the behavior of code non-obvious---it's not something someone would necessarily consult the documentation for while reviewing code. (By the way, I'm considering CLIs like `docker run` and `ssh` which take an optional command to execute, and when absent, fall back on default behavior.) So I would prefer a code change that makes it harder to write code that hits this corner case. Potential solutions would be either (a) making a positional REMAINDER arg with a default value an error, as in Paul's proposed change; or (b) making a default value with a positional REMAINDER arg 'just work' I think (a) is the most reasonable. The exception can recommend the use of nargs='*' instead, which makes it actionable. And it is unlikely that the exception would be buried down some untested code path that would end up in released code. (Perhaps it's also worth raising an exception when adding a positional argument after a nargs>1 positional argument already exists, but that's another issue.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:48:08 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 27 May 2019 23:48:08 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1559000888.13.0.375710293485.issue37039@roundup.psfhosted.org> miss-islington added the comment: New changeset abdda3ae2a19326bb10bb6e54400c5d3a904b742 by Miss Islington (bot) in branch '3.7': bpo-37039: IDLE - zoomheight fixes (GH-13576) https://github.com/python/cpython/commit/abdda3ae2a19326bb10bb6e54400c5d3a904b742 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:49:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:49:11 +0000 Subject: [issue36414] Multiple test failures in GCC and Clang optional builds on Travis CI In-Reply-To: <1553412920.81.0.155092332299.issue36414@roundup.psfhosted.org> Message-ID: <1559000951.47.0.95690970628.issue36414@roundup.psfhosted.org> STINNER Victor added the comment: I looked at at recent PR. It's getting better. "Test code coverage (C)" fails with: ====================================================================== ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/distutils/tests/test_build_ext.py", line 91, in test_build_ext import xx ImportError: /tmp/tmpyufwrt3r/xx.cpython-38-x86_64-linux-gnu.so: undefined symbol: __gcov_merge_add Maybe this test is failing for a long time. I don't know. "Test code coverage (Python)": > 4 tests failed: test_asyncio test_descr test_gc test_typing test test_descr failed -- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_descr.py", line 1272, in test_slots self.assertEqual(orig_objects, new_objects) AssertionError: 95538 != 95544 Warning -- sys.gettrace was modified by test_audit Before: After: None ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:50:13 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 27 May 2019 23:50:13 +0000 Subject: [issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled In-Reply-To: <1557336219.34.0.364472599022.issue36856@roundup.psfhosted.org> Message-ID: <1559001013.36.0.467788055361.issue36856@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13511 pull_request: https://github.com/python/cpython/pull/13605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:51:21 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 27 May 2019 23:51:21 +0000 Subject: [issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess In-Reply-To: <1555808685.63.0.20312678962.issue36686@roundup.psfhosted.org> Message-ID: <1559001081.94.0.712388353392.issue36686@roundup.psfhosted.org> miss-islington added the comment: New changeset f0d4c64019ecf8a5f362aa5a478786241613e5c3 by Miss Islington (bot) (sbstp) in branch 'master': bpo-36686: Improve the documentation of the std* params in loop.subprocess_exec (GH-13586) https://github.com/python/cpython/commit/f0d4c64019ecf8a5f362aa5a478786241613e5c3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:51:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:51:27 +0000 Subject: [issue36843] AIX build fails with failure to get random numbers In-Reply-To: <1557262791.73.0.95279707159.issue36843@roundup.psfhosted.org> Message-ID: <1559001087.51.0.271570923833.issue36843@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue. Maybe contact Michael Felt to get help to debug your issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:52:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:52:13 +0000 Subject: [issue34791] xml package does not obey sys.flags.ignore_environment In-Reply-To: <1537807650.53.0.956365154283.issue34791@psf.upfronthosting.co.za> Message-ID: <1559001133.47.0.395253666044.issue34791@roundup.psfhosted.org> STINNER Victor added the comment: It's now fixed in all branches, thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:56:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:56:21 +0000 Subject: [issue24732] 3.5.0b3 Windows accept() on unready non-blocking socket raises PermissionError [now need unit test] In-Reply-To: <1437963228.18.0.486881534673.issue24732@psf.upfronthosting.co.za> Message-ID: <1559001381.07.0.253357543708.issue24732@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 19:59:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 May 2019 23:59:04 +0000 Subject: [issue36809] Crash for test test_importlib In-Reply-To: <1557113260.01.0.872364127661.issue36809@roundup.psfhosted.org> Message-ID: <1559001544.57.0.0973245537346.issue36809@roundup.psfhosted.org> STINNER Victor added the comment: > Hi Furzoom. Would you mind to provide more info about what you are trying to do? What is your operating system? How did you download Python? How did you compile Python? What is your operating system? Can you show the command that you used to run tests? No reply in 20 days, I close the issue. If you provide more info later, we can investigate! ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:01:58 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 28 May 2019 00:01:58 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559001718.06.0.53465964758.issue26423@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +13512 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:03:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 00:03:22 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1559001802.57.0.71692034795.issue2506@roundup.psfhosted.org> STINNER Victor added the comment: I proposed PR 13600 which is based PR 9693, but more complete and up to date. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:05:55 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 28 May 2019 00:05:55 +0000 Subject: [issue37054] Ignored exceptions in test_memoryio In-Reply-To: <1558882480.22.0.119118964732.issue37054@roundup.psfhosted.org> Message-ID: <1559001955.52.0.00228954402615.issue37054@roundup.psfhosted.org> miss-islington added the comment: New changeset 0f352d44e7c14c1c93e3999402c85512b9d5a6ca by Miss Islington (bot) in branch '3.7': bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601) https://github.com/python/cpython/commit/0f352d44e7c14c1c93e3999402c85512b9d5a6ca ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:14:24 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 28 May 2019 00:14:24 +0000 Subject: [issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled In-Reply-To: <1557336219.34.0.364472599022.issue36856@roundup.psfhosted.org> Message-ID: <1559002464.15.0.157448843263.issue36856@roundup.psfhosted.org> miss-islington added the comment: New changeset 1062cf71faa14b90185cf159877083910df10f27 by Miss Islington (bot) in branch '3.7': bpo-36856: Handle possible overflow in faulthandler_stack_overflow (GH-13205) https://github.com/python/cpython/commit/1062cf71faa14b90185cf159877083910df10f27 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:19:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 00:19:06 +0000 Subject: [issue37054] Ignored exceptions in test_memoryio In-Reply-To: <1558882480.22.0.119118964732.issue37054@roundup.psfhosted.org> Message-ID: <1559002746.63.0.530032029964.issue37054@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the report Antoine. It is now fixed in 3.7 and master branches. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:20:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 00:20:17 +0000 Subject: [issue36856] faulthandler._stack_overflow doesn't work on x86-linux with KPTI enabled In-Reply-To: <1557336219.34.0.364472599022.issue36856@roundup.psfhosted.org> Message-ID: <1559002817.54.0.662710639612.issue36856@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Xi Ruoyao, I applied your fix to 3.7 and master branches. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:22:48 2019 From: report at bugs.python.org (Simon Bernier St-Pierre) Date: Tue, 28 May 2019 00:22:48 +0000 Subject: [issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess In-Reply-To: <1555808685.63.0.20312678962.issue36686@roundup.psfhosted.org> Message-ID: <1559002968.61.0.849975681738.issue36686@roundup.psfhosted.org> Change by Simon Bernier St-Pierre : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:33:18 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 28 May 2019 00:33:18 +0000 Subject: [issue37070] Clean up f-string debug handling, including potential memory leaks Message-ID: <1559003598.17.0.659743491517.issue37070@roundup.psfhosted.org> New submission from Eric V. Smith : This addresses a few issues Serhiy found in the review for issue 37050 at https://github.com/python/cpython/pull/13597. Patch to follow. ---------- assignee: eric.smith components: Interpreter Core messages: 343722 nosy: eric.smith, serhiy.storchaka priority: normal severity: normal status: open title: Clean up f-string debug handling, including potential memory leaks type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:43:18 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 28 May 2019 00:43:18 +0000 Subject: [issue36891] Additional startup plugin for vendors In-Reply-To: <1557603168.21.0.544720725277.issue36891@roundup.psfhosted.org> Message-ID: <1559004198.15.0.887906502849.issue36891@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:45:51 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 28 May 2019 00:45:51 +0000 Subject: [issue36891] Additional startup plugin for vendors In-Reply-To: <1557603168.21.0.544720725277.issue36891@roundup.psfhosted.org> Message-ID: <1559004351.38.0.157558631867.issue36891@roundup.psfhosted.org> Inada Naoki added the comment: I closed this because this proposal is not discussed well in conda community. See https://github.com/python/cpython/pull/13246#issuecomment-492447317 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 20:58:04 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 28 May 2019 00:58:04 +0000 Subject: [issue37070] Clean up f-string debug handling, including potential memory leaks In-Reply-To: <1559003598.17.0.659743491517.issue37070@roundup.psfhosted.org> Message-ID: <1559005084.3.0.939715375389.issue37070@roundup.psfhosted.org> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +13513 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13607 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 21:23:00 2019 From: report at bugs.python.org (Hoang Duy Tran) Date: Tue, 28 May 2019 01:23:00 +0000 Subject: [issue37071] HTMLParser mistakenly inventing new tags while parsing Message-ID: <1559006580.21.0.290263720763.issue37071@roundup.psfhosted.org> New submission from Hoang Duy Tran : I have been working with some 'difficult' HTML files generated by Sphinx's RST. The following block of text is the RST original content: ---------------------------------------------------- Animation Playback Options ========================== ``-a`` ```` ```` Playback ````, only operates this way when not running in background. ``-p`` ```` ```` Open with lower left corner at ````, ````. ``-m`` Read from disk (Do not buffer). ``-f`` ```` ```` Specify FPS to start with. ``-j`` ```` Set frame step to ````. ``-s`` ```` Play from ````. ``-e`` ```` Play until ````. ---------------------------------------------------- This is the HTML block that is generated by Sphinx: ----------------------------------------------------
Animation Playback Options-a Playback , only operates this way when not running in background.-p Open with lower left corner at , .-mRead from disk (Do not buffer).-f Specify FPS to start with.-j Set frame step to .-s Play from .-e Play until .
---------------------------------------------------- I then use the BeautifulSoup, which uses the HTMLParser, to beautify and parse the HTML document and I've noticed that every incident of data that leads with a "<" and ends with ">", for example: .... has been misunderstood by the HTMLParser's library as a TAG, and then it INVENTS a CLOSED TAGS for it ie. and which when reversing, ie. turning from HTML back to normal text, muted out the original data, leading to TRUNCATION/LOST of DATA. Here is the content of the beautify generated data, issue lines are marked with '#**************************' to make it easier for you to identify. ----------------------------------------------------
Animation Playback Options -a #************************** #************************** #************************** #************************** Playback #************************** #************************** , only operates this way when not running in background. -p #************************** #************************** #************************** #************************** Open with lower left corner at #************************** #************************** , #************************** #************************** . -m Read from disk (Do not buffer). -f #************************** #************************** #************************** #************************** Specify FPS to start with. -j #************************** Set frame step to #************************** . -s #************************** Play from #************************** . -e #************************** Play until #************************** .
---------------------------------------------------- I enclosed the HTML file generated by Sphinx to allow you test this issue with the actual data. Here is the URL of the HTML file: https://docs.blender.org/manual/en/dev/advanced/command_line/arguments.html Kind Regards, Hoang Tran ---------- components: Library (Lib) files: arguments.html messages: 343724 nosy: htran priority: normal severity: normal status: open title: HTMLParser mistakenly inventing new tags while parsing type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file48367/arguments.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 21:23:28 2019 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 28 May 2019 01:23:28 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1559006608.3.0.409319989553.issue37003@roundup.psfhosted.org> Eric V. Smith added the comment: mbussonn: can you re-check this in light of the changes for issue37050? I'm not sure if there's still a problem that needs fixing or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 21:39:45 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 28 May 2019 01:39:45 +0000 Subject: [issue37003] ast unparse does not support f-string new debug format. In-Reply-To: <1558476188.31.0.971318282226.issue37003@roundup.psfhosted.org> Message-ID: <1559007585.97.0.955561466965.issue37003@roundup.psfhosted.org> Matthias Bussonnier added the comment: I believe all is fine now. Thanks ! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 21:52:54 2019 From: report at bugs.python.org (Graham Dumpleton) Date: Tue, 28 May 2019 01:52:54 +0000 Subject: [issue37072] PyNode_Compile() crashes in Python 3.8. Message-ID: <1559008374.77.0.70293248511.issue37072@roundup.psfhosted.org> New submission from Graham Dumpleton : The code: #include int main(int argc, char *argv[]) { FILE *fp = NULL; PyObject *co = NULL; struct _node *n = NULL; const char * filename = "/dev/null"; Py_Initialize(); fprintf(stderr, "START\n"); fp = fopen(filename, "r"); fprintf(stderr, "CALL PyParser_SimpleParseFile()\n"); n = PyParser_SimpleParseFile(fp, filename, Py_file_input); fprintf(stderr, "CALL PyNode_Compile()\n"); co = (PyObject *)PyNode_Compile(n, filename); fprintf(stderr, "DONE\n"); Py_Finalize(); return 0; } has worked fine since Python 2.3 (and maybe earlier) through Python 3.7, but now crashes in Python 3.8. It crashes in PyNode_Compile(). START CALL PyParser_SimpleParseFile() CALL PyNode_Compile() Segmentation fault: 11 Although it is part of the public interface of compile.h, the PyNode_Compile() seems never to actually be called anywhere in Python itself, and perhaps isn't even covered by tests. So if Python 3.8 internal changes mean this function implementation needs to be changed, that fact may have been missed. ---------- messages: 343727 nosy: grahamd priority: normal severity: normal status: open title: PyNode_Compile() crashes in Python 3.8. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 22:10:44 2019 From: report at bugs.python.org (Graham Dumpleton) Date: Tue, 28 May 2019 02:10:44 +0000 Subject: [issue37072] PyNode_Compile() crashes in Python 3.8. In-Reply-To: <1559008374.77.0.70293248511.issue37072@roundup.psfhosted.org> Message-ID: <1559009444.8.0.667282984095.issue37072@roundup.psfhosted.org> Graham Dumpleton added the comment: FWIW, this was occurring on macOS. Not been able to test on other platforms. ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 22:33:18 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 02:33:18 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1559010798.67.0.58827361428.issue36520@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- keywords: +patch pull_requests: +13514 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13608 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 27 23:38:14 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 03:38:14 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1559014694.56.0.753161965604.issue36520@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- pull_requests: +13515 pull_request: https://github.com/python/cpython/pull/13610 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 00:38:16 2019 From: report at bugs.python.org (lilydjwg) Date: Tue, 28 May 2019 04:38:16 +0000 Subject: [issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does In-Reply-To: <1542203449.76.0.788709270274.issue35246@psf.upfronthosting.co.za> Message-ID: <1559018296.22.0.867935796056.issue35246@roundup.psfhosted.org> lilydjwg added the comment: > All we need is `program = os.fspath(program)` in base_events.py subprocess_exec() method. I don't think so. The arguments could be `pathlib.Path` too. We can update the `isinstance(arg, (str, bytes))` check so the args pass on to `subprocess.Popen`. It will work in the POSIX part but there is an issue (issue33617, issue31961) in Windows part: subprocess.list2cmdline doesn't accept pathlib.Path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 00:49:18 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 04:49:18 +0000 Subject: [issue36520] Email header folded incorrectly In-Reply-To: <1554333300.49.0.663084865399.issue36520@roundup.psfhosted.org> Message-ID: <1559018958.71.0.722391480308.issue36520@roundup.psfhosted.org> Jeffrey Kintscher added the comment: The pull request has been submitted with both the code fix and tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 01:00:37 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 05:00:37 +0000 Subject: [issue36596] tarfile module considers anything starting with 512 bytes of zero bytes to be a valid tar file In-Reply-To: <1554948440.07.0.28828566641.issue36596@roundup.psfhosted.org> Message-ID: <1559019637.81.0.740039202903.issue36596@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I recommend closing this issue since the behavior is the same as the BSD and GNU tar utilities. ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 01:00:22 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 28 May 2019 05:00:22 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559019622.46.0.165389178518.issue36839@roundup.psfhosted.org> Inada Naoki added the comment: I don't like this. It removes guarantee that code object is constant / immutable. > Because the code objects are on random pages and are ref counted the ref counts can cause all of the code to not be shared across processes. These ref counts are not incremented or decremented typically, until shutting down. If you want to avoid CoW when shutting down, you can use os._exit. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 01:13:20 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 05:13:20 +0000 Subject: [issue35070] test_posix fails on macOS 10.14 Mojave In-Reply-To: <1540497129.89.0.788709270274.issue35070@psf.upfronthosting.co.za> Message-ID: <1559020400.88.0.547732815812.issue35070@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 01:15:24 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 28 May 2019 05:15:24 +0000 Subject: [issue35279] asyncio uses too many threads by default In-Reply-To: <1542637615.61.0.788709270274.issue35279@psf.upfronthosting.co.za> Message-ID: <1559020524.0.0.917326083276.issue35279@roundup.psfhosted.org> Inada Naoki added the comment: Current default value is decided in here: https://bugs.python.org/review/21527/#ps11902 It seems there were no strong reason for current cpu_count * 5. I think cpu_count + 4 is better default value, because: * When people are using threadpool for CPU heavy job which releases GIL, workers >= cpu_count is good. * When people are using threadpool for multiplexing I/O, best workers number is vary on the workload. But I think 4~16 is good for typical case. > This is amplified by the fact that the `concurrent.futures.ThreadPoolExecutor` threads are never killed, and are not re-used until `max_workers` threads are spawned. Note that this is fixed by #24882. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 01:42:50 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 05:42:50 +0000 Subject: [issue37040] checking for membership in itertools.count enters infinite loop with no way to exit In-Reply-To: <1558758125.27.0.730728069526.issue37040@roundup.psfhosted.org> Message-ID: <1559022170.11.0.651281743454.issue37040@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 01:43:55 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 28 May 2019 05:43:55 +0000 Subject: [issue37071] HTMLParser mistakenly inventing new tags while parsing In-Reply-To: <1559006580.21.0.290263720763.issue37071@roundup.psfhosted.org> Message-ID: <1559022235.42.0.450320506035.issue37071@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 01:55:40 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 05:55:40 +0000 Subject: [issue37036] Iterating a text file by line should not implicitly disable tell In-Reply-To: <1558714112.82.0.415931508082.issue37036@roundup.psfhosted.org> Message-ID: <1559022940.3.0.0131997405087.issue37036@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 02:01:51 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 28 May 2019 06:01:51 +0000 Subject: [issue37029] PyObject_Free is O(N) where N = # of arenas In-Reply-To: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> Message-ID: <1559023311.7.0.155983981021.issue37029@roundup.psfhosted.org> Change by Tim Peters : ---------- keywords: +patch pull_requests: +13516 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 02:05:01 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 28 May 2019 06:05:01 +0000 Subject: [issue37029] PyObject_Free is O(N) where N = # of arenas In-Reply-To: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> Message-ID: <1559023501.01.0.0562992430029.issue37029@roundup.psfhosted.org> Tim Peters added the comment: Created a PR and assigned myself to this bug. ---------- assignee: -> tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 02:08:46 2019 From: report at bugs.python.org (Carl Meyer) Date: Tue, 28 May 2019 06:08:46 +0000 Subject: [issue21156] Consider moving importlib.abc.InspectLoader.source_to_code() to importlib.abc.Loader In-Reply-To: <1396634360.22.0.98257221553.issue21156@psf.upfronthosting.co.za> Message-ID: <1559023726.3.0.713513349297.issue21156@roundup.psfhosted.org> Carl Meyer added the comment: Making `source_to_code` a staticmethod on the `InspectLoader` abc but not in the `importlib.machinery` implementation causes awkwardness for anyone trying to inherit `SourceFileLoader` and override `source_to_code` in typechecked code, since typeshed assumes that `SourceFileLoader` actually implements the `importlib.abc.FileLoader` interface. Given the ABC registration, it seems that `importlib.machinery.SourceFileLoader` should in fact implement the `importlib.abc.FileLoader` interface. Should we make `SourceFileLoader.source_to_code` a staticmethod also? If so, I can file a separate bug for that. ---------- nosy: +carljm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 02:51:10 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 28 May 2019 06:51:10 +0000 Subject: [issue37067] os.execl doesn't allow for empty string in mac In-Reply-To: <1558973327.05.0.558912294588.issue37067@roundup.psfhosted.org> Message-ID: <1559026270.68.0.46952952339.issue37067@roundup.psfhosted.org> Ronald Oussoren added the comment: Which exact python version did you test? The current codebase raises this exception on all platforms, not just macOS (see os_execv_impl in Modules/posixmodule.c) The behaviour of raising an exception was introduced in issue 28732 for Windows, not sure when that code was refactored to raise the exception on all platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:00:45 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 07:00:45 +0000 Subject: [issue35279] asyncio uses too many threads by default In-Reply-To: <1542637615.61.0.788709270274.issue35279@psf.upfronthosting.co.za> Message-ID: <1559026845.03.0.891892348724.issue35279@roundup.psfhosted.org> Andrew Svetlov added the comment: I'm ok with changing the default threads number limit. Not sure about numbers. If you want to limit to 16-20 that may be ok but `cpu_count + 4` doesn't work in this case. On cloud servers, I see 128 or even more cores very often. 160+4 is not that you want to propose, sure. I insist on changing the default calculation schema in concurrent.futures, not in asyncio. There is no case for asyncio to be exceptional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:07:55 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 28 May 2019 07:07:55 +0000 Subject: [issue36996] unittest.mock.patch decorator doesn't work with async functions In-Reply-To: <1558452128.6.0.303675531512.issue36996@roundup.psfhosted.org> Message-ID: <1559027275.65.0.039787663338.issue36996@roundup.psfhosted.org> miss-islington added the comment: New changeset 436c2b0d67da68465e709a96daac7340af3a5238 by Miss Islington (bot) (Xtreak) in branch 'master': bpo-36996: Handle async functions when mock.patch is used as a decorator (GH-13562) https://github.com/python/cpython/commit/436c2b0d67da68465e709a96daac7340af3a5238 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:10:01 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 07:10:01 +0000 Subject: [issue36996] unittest.mock.patch decorator doesn't work with async functions In-Reply-To: <1558452128.6.0.303675531512.issue36996@roundup.psfhosted.org> Message-ID: <1559027401.26.0.376139344287.issue36996@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:11:05 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 28 May 2019 07:11:05 +0000 Subject: [issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there) In-Reply-To: <1557961877.88.0.551239006015.issue36933@roundup.psfhosted.org> Message-ID: <1559027465.89.0.780533615821.issue36933@roundup.psfhosted.org> miss-islington added the comment: New changeset 3880f263d2994fb1eba25835dddccb0cf696fdf0 by Miss Islington (bot) (Matthias Bussonnier) in branch 'master': bpo-36933: Remove sys.set_coroutine_wrapper (marked for removal in 3.8) (GH-13577) https://github.com/python/cpython/commit/3880f263d2994fb1eba25835dddccb0cf696fdf0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:11:25 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 07:11:25 +0000 Subject: [issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there) In-Reply-To: <1557961877.88.0.551239006015.issue36933@roundup.psfhosted.org> Message-ID: <1559027485.38.0.0226758609021.issue36933@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:17:02 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 28 May 2019 07:17:02 +0000 Subject: [issue35279] asyncio uses too many threads by default In-Reply-To: <1542637615.61.0.788709270274.issue35279@psf.upfronthosting.co.za> Message-ID: <1559027822.05.0.477677233767.issue35279@roundup.psfhosted.org> Inada Naoki added the comment: > If you want to limit to 16-20 that may be ok but `cpu_count + 4` doesn't work in this case. On cloud servers, I see 128 or even more cores very often. 160+4 is not that you want to propose, sure. I proposed cpu_count + 4 because #24882 almost fixed the problem of large maxworks. If you don't like it, how about min(32, cpu_count+4)? > I insist on changing the default calculation schema in concurrent.futures, not in asyncio. There is no case for asyncio to be exceptional. Makes sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:18:04 2019 From: report at bugs.python.org (Windson Yang) Date: Tue, 28 May 2019 07:18:04 +0000 Subject: [issue37073] clarify functions docs in IO modules and Bytes Objects Message-ID: <1559027884.63.0.0963085588001.issue37073@roundup.psfhosted.org> New submission from Windson Yang : > PyBytes_FromStringAndSize(const char *v, Py_ssize_t len): > Return a new bytes object with a copy of the string v as value and length len on success, and NULL on failure. If v is NULL, the contents of the bytes object are uninitialized. The function actually copies `len` bytes from string v instead of the whole string. (link 1) I suggested we can change to > Return a new bytes object with a copy of the first len bytes of string v as value and length len on success... > readinto(b) > Read bytes into a pre-allocated, writable bytes-like object b and return the number of bytes read. For example, b might be a bytearray. The function will call _bufferediobase_readinto_generic(link 2) which may return NULL. Maybe we can change to > and return the number of bytes that read succeed (it may be smaller than b or NULL if failed)... 1. https://github.com/python/cpython/blob/master/Objects/bytesobject.c#L126 2. https://github.com/python/cpython/blob/master/Modules/_io/bufferedio.c#L962 ---------- assignee: docs at python components: Documentation messages: 343741 nosy: Windson Yang, docs at python priority: normal severity: normal status: open title: clarify functions docs in IO modules and Bytes Objects type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:24:11 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 07:24:11 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559028251.15.0.864324647207.issue36411@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I adapted the test code on StackOverflow to show the expected and actual values. I get this output using Python 2.7.16: opening myfile with wb writing 3 bytes to file ('f.tell(): expecting 3, got', 3) closing myfile opening myfile with a+b ('f.tell(): expecting 3, got', 3) writing 3 bytes to file ('f.tell(): expecting 6, got', 6) ('f.seek(0): expecting 0, got', None) ('f.tell(): expecint 0, got', 0) writing 3 bytes to file ('f.tell(): expecting 9, got', 9) writing 3 bytes to file ('f.tell(): expecting 12, got', 12) ('f.seek(0, io.SEEK_CUR): expecting 12, got', None) ('f.tell(): expecting 12, got', 12) ('f.seek(0): expecting 0, got', None) ("f.read(): expecting b'abcdefghijkl', got", 'abcdefghijkl') closing file removing file As described, I get different results using Python 3.7.3 as well as the master branch (Python 3.8.0a4+): closing myfile opening myfile with a+b f.tell(): expecting 3, got 3 writing 3 bytes to file f.tell(): expecting 6, got 6 f.seek(0): expecting 0, got 0 f.tell(): expecint 0, got 0 writing 3 bytes to file f.tell(): expecting 9, got 3 writing 3 bytes to file f.tell(): expecting 12, got 6 f.seek(0, io.SEEK_CUR): expecting 12, got 12 f.tell(): expecting 12, got 12 f.seek(0): expecting 0, got 0 f.read(): expecting b'abcdefghijkl', got b'abcdefghijkl' closing file removing file I wrote an equivalent C program using the stream I/O functions and get the same results as Python 2.7.16: opening file with wb writing 3 bytes to file ftell(f): expecting 3, got 3 closing file opening file with a+b ftell(f): expecting 3, got 3 writing 3 bytes to filftell(f): expecting 6, got 6 fseek(f, 0, SEEK_SET): expecting 0, got 0 ftell(f): expecting 0, got 0 writing 3 bytes to file ftell(f): expecting 9, got 9 writing 3 bytes to file ftell(f): expecting 12, got 12 fseek(f, 0, SEEK_CUR): expecting 0, got 0 ftell(f): expecting 12, got 12 fseek(f, 0, SEEK_SET): expecting 0, got 0 fread(buf, 1, 256, f): expecting 12, got 12 expecting 'abcdefghijkl', got 'abcdefghijkl' closing file removing file I consider this behavior to be a bug because Python 2.7 and C agree, but Python 3.7 behaves differently. Requiring that developers know and work around non-standard quirky behavior leads to extra work and error-prone code. ---------- nosy: +Jeffrey.Kintscher Added file: https://bugs.python.org/file48368/bpo-36411.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:24:34 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 07:24:34 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559028274.47.0.282886946621.issue36411@roundup.psfhosted.org> Change by Jeffrey Kintscher : Added file: https://bugs.python.org/file48369/bpo-36411.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:26:21 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 07:26:21 +0000 Subject: [issue35279] asyncio uses too many threads by default In-Reply-To: <1542637615.61.0.788709270274.issue35279@psf.upfronthosting.co.za> Message-ID: <1559028381.68.0.646013426825.issue35279@roundup.psfhosted.org> Andrew Svetlov added the comment: > how about min(32, cpu_count+4)? I think it produces reasonable good numbers for any CPU count. Do you have time for preparing a pull request? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:29:04 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 07:29:04 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559028544.15.0.138745908436.issue36411@roundup.psfhosted.org> Change by Jeffrey Kintscher : Removed file: https://bugs.python.org/file48369/bpo-36411.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:29:30 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 07:29:30 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559028570.52.0.564739961156.issue36411@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I saw the bug in the C output after I hit submit. Here is the correct output: opening file with wb writing 3 bytes to file ftell(f): expecting 3, got 3 closing file opening file with a+b ftell(f): expecting 3, got 3 writing 3 bytes to file ftell(f): expecting 6, got 6 fseek(f, 0, SEEK_SET): expecting 0, got 0 ftell(f): expecting 0, got 0 writing 3 bytes to file ftell(f): expecting 9, got 9 writing 3 bytes to file ftell(f): expecting 12, got 12 fseek(f, 0, SEEK_CUR): expecting 0, got 0 ftell(f): expecting 12, got 12 fseek(f, 0, SEEK_SET): expecting 0, got 0 fread(buf, 1, 256, f): expecting 12, got 12 expecting 'abcdefghijkl', got 'abcdefghijkl' closing file removing file ---------- Added file: https://bugs.python.org/file48370/bpo-36411.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:37:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 May 2019 07:37:41 +0000 Subject: [issue37074] os.stat() does not work for NUL and CON Message-ID: <1559029061.14.0.328684807212.issue37074@roundup.psfhosted.org> New submission from Serhiy Storchaka : >>> os.stat('nul') Traceback (most recent call last): File "", line 1, in OSError: [WinError 1] Incorrect function: 'nul' >>> os.stat('con') Traceback (most recent call last): File "", line 1, in OSError: [WinError 87] The parameter is incorrect: 'con' But os.open() and os.fstat() work. >>> os.fstat(os.open('nul', os.O_RDONLY)) os.stat_result(st_mode=8192, st_ino=0, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=0, st_atime=0, st_mtime=0, st_ctime=0) >>> os.fstat(os.open('con', os.O_RDONLY)) os.stat_result(st_mode=8192, st_ino=0, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=0, st_atime=0, st_mtime=0, st_ctime=0) ---------- components: Windows messages: 343745 nosy: paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.stat() does not work for NUL and CON type: behavior versions: Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:40:21 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 28 May 2019 07:40:21 +0000 Subject: [issue37058] Implement PEP 544: add Protocol to typing In-Reply-To: <1558896734.9.0.411733767258.issue37058@roundup.psfhosted.org> Message-ID: <1559029221.8.0.9120213687.issue37058@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset 74d7f76e2c953fbfdb7ce01b7319d91d471cc5ef by Ivan Levkivskyi in branch 'master': bpo-37058: PEP 544: Add Protocol to typing module (GH-13585) https://github.com/python/cpython/commit/74d7f76e2c953fbfdb7ce01b7319d91d471cc5ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:41:35 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 28 May 2019 07:41:35 +0000 Subject: [issue37058] Implement PEP 544: add Protocol to typing In-Reply-To: <1558896734.9.0.411733767258.issue37058@roundup.psfhosted.org> Message-ID: <1559029295.19.0.912332149738.issue37058@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:49:04 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 07:49:04 +0000 Subject: [issue37005] bz2 module doesn't write end-of-stream marker In-Reply-To: <1558496168.36.0.56962236665.issue37005@roundup.psfhosted.org> Message-ID: <1559029744.4.0.268432003529.issue37005@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 03:51:39 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 07:51:39 +0000 Subject: [issue36988] zipfile: string IndexError on extract In-Reply-To: <1558435795.93.0.150119411648.issue36988@roundup.psfhosted.org> Message-ID: <1559029899.97.0.462775039514.issue36988@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 04:22:35 2019 From: report at bugs.python.org (Piotr Karkut) Date: Tue, 28 May 2019 08:22:35 +0000 Subject: [issue36053] pkgutil.walk_packages jumps out from given path if there is package with the same name in sys.path In-Reply-To: <1550680627.64.0.854320242724.issue36053@roundup.psfhosted.org> Message-ID: <1559031755.51.0.813617893233.issue36053@roundup.psfhosted.org> Piotr Karkut added the comment: Bump? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 04:25:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 May 2019 08:25:52 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1559031952.44.0.359860881658.issue1230540@roundup.psfhosted.org> Serhiy Storchaka added the comment: If we want to support low-level threads created by start_new_thread() we should call excepthook() from t_bootstrap instead of Thread._bootstrap_inner. Otherwise implementing excepthook() as a Thread method would be more convenient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 04:33:17 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 08:33:17 +0000 Subject: [issue36976] email: AttributeError In-Reply-To: <1558376398.04.0.740342940317.issue36976@roundup.psfhosted.org> Message-ID: <1559032397.82.0.481739792023.issue36976@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 04:35:48 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 08:35:48 +0000 Subject: [issue36910] Certain Malformed email causes email.parser to throw AttributeError In-Reply-To: <1557798519.08.0.310106320232.issue36910@roundup.psfhosted.org> Message-ID: <1559032548.72.0.82325083029.issue36910@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 04:37:36 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 08:37:36 +0000 Subject: [issue36881] isinstance raises TypeError for metaclass with metaclass=ABCMeta In-Reply-To: <1557541744.61.0.162387429511.issue36881@roundup.psfhosted.org> Message-ID: <1559032656.84.0.786334161839.issue36881@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 04:38:52 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 28 May 2019 08:38:52 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1559032732.27.0.882291237691.issue35975@roundup.psfhosted.org> Petr Viktorin added the comment: It looks like this caused bpo-37072: PyAST_FromNodeObject doesn't ignore flags any more, and when PyNode_Compile passes NULL flags, it crashes. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 04:40:34 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 08:40:34 +0000 Subject: [issue36691] SystemExit & sys.exit : Allow both exit status and message In-Reply-To: <1555851872.77.0.954312917312.issue36691@roundup.psfhosted.org> Message-ID: <1559032834.95.0.653784787494.issue36691@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 04:42:07 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 28 May 2019 08:42:07 +0000 Subject: [issue37072] PyNode_Compile() crashes in Python 3.8. In-Reply-To: <1559008374.77.0.70293248511.issue37072@roundup.psfhosted.org> Message-ID: <1559032927.22.0.589454314001.issue37072@roundup.psfhosted.org> Petr Viktorin added the comment: Looks like this is caused by: https://github.com/python/cpython/pull/12086/files#diff-4d35cf8992b795c5e97e9c8b6167cb34R787 PyAST_FromNodeObject doesn't ignore flags any more, so when PyNode_Compile passes NULL flags, it crashes. (This is unfamiliar code for me; I won't have time to fix & test properly this week.) ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 04:44:51 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 08:44:51 +0000 Subject: [issue36956] Calling "functions" used to implement generators/comps easily cause crash In-Reply-To: <1558187601.17.0.878025070628.issue36956@roundup.psfhosted.org> Message-ID: <1559033091.17.0.743715606048.issue36956@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 04:47:13 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Tue, 28 May 2019 08:47:13 +0000 Subject: [issue2818] pulldom cannot handle xml file with large external entity properly In-Reply-To: <1210512738.34.0.315015103661.issue2818@psf.upfronthosting.co.za> Message-ID: <1559033233.74.0.228842909837.issue2818@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 05:06:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 09:06:46 +0000 Subject: [issue36900] Use _PyCoreConfig rather than global configuration variables In-Reply-To: <1557745648.65.0.648187833126.issue36900@roundup.psfhosted.org> Message-ID: <1559034406.61.0.631327206236.issue36900@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13517 pull_request: https://github.com/python/cpython/pull/13614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 05:11:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 09:11:37 +0000 Subject: [issue1230540] Add threading.excepthook() to handle uncaught exceptions raised by Thread.run() Message-ID: <1559034697.6.0.309054207693.issue1230540@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: sys.excepthook doesn't work in threads -> Add threading.excepthook() to handle uncaught exceptions raised by Thread.run() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 05:15:31 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 28 May 2019 09:15:31 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1559034931.4.0.795491271818.issue37039@roundup.psfhosted.org> Tal Einat added the comment: I haven't found a way to maximize a hidden window; being "zoomed" and "withdrawn" are both considered "states" by Tk, and apparently a window cannot be in both states simultaneously. An alternative is, when zooming the height: 1. save the current window position and size 2. maximize the current window 3. set the horizontal position and width to their original values There is a visual artifact when doing so - the window is seen to maximize and then return to its original width. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 05:35:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 09:35:53 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1559036153.17.0.58711265835.issue2506@roundup.psfhosted.org> STINNER Victor added the comment: My PR 13600 works as expected. I simplified attached continue.py: see attached traceme.py. Output with optimizations --- $ ./python traceme.py 6 0 LOAD_CONST 1 (0) 2 STORE_FAST 0 (a) 7 4 LOAD_GLOBAL 0 (range) 6 LOAD_CONST 2 (3) 8 LOAD_CONST 3 (4) 10 CALL_FUNCTION 2 12 GET_ITER >> 14 FOR_ITER 30 (to 46) 16 STORE_FAST 1 (n) 8 18 LOAD_FAST 1 (n) 20 LOAD_CONST 4 (2) 22 BINARY_MODULO 24 POP_JUMP_IF_FALSE 14 9 26 LOAD_FAST 1 (n) 28 LOAD_CONST 2 (3) 30 BINARY_MODULO 32 POP_JUMP_IF_FALSE 14 10 34 LOAD_FAST 0 (a) 36 LOAD_CONST 5 (1) 38 INPLACE_ADD 40 STORE_FAST 0 (a) 11 42 JUMP_ABSOLUTE 14 44 JUMP_ABSOLUTE 14 >> 46 LOAD_CONST 0 (None) 48 RETURN_VALUE --- modulename: traceme, funcname: func traceme.py(6): a = 0 traceme.py(7): for n in range(3, 4): traceme.py(8): if n % 2: traceme.py(9): if n % 3: traceme.py(7): for n in range(3, 4): --- Output without optimizations (-X noopt): --- $ ./python -X noopt traceme.py 6 0 LOAD_CONST 1 (0) 2 STORE_FAST 0 (a) 7 4 LOAD_GLOBAL 0 (range) 6 LOAD_CONST 2 (3) 8 LOAD_CONST 3 (4) 10 CALL_FUNCTION 2 12 GET_ITER >> 14 FOR_ITER 30 (to 46) 16 STORE_FAST 1 (n) 8 18 LOAD_FAST 1 (n) 20 LOAD_CONST 4 (2) 22 BINARY_MODULO 24 POP_JUMP_IF_FALSE 44 9 26 LOAD_FAST 1 (n) 28 LOAD_CONST 2 (3) 30 BINARY_MODULO 32 POP_JUMP_IF_FALSE 42 10 34 LOAD_FAST 0 (a) 36 LOAD_CONST 5 (1) 38 INPLACE_ADD 40 STORE_FAST 0 (a) 11 >> 42 JUMP_ABSOLUTE 14 >> 44 JUMP_ABSOLUTE 14 >> 46 LOAD_CONST 0 (None) 48 RETURN_VALUE --- modulename: traceme, funcname: func traceme.py(6): a = 0 traceme.py(7): for n in range(3, 4): traceme.py(8): if n % 2: traceme.py(9): if n % 3: traceme.py(11): continue traceme.py(7): for n in range(3, 4): --- The difference on the trace is that using -X noopt, "traceme.py(11): continue" line is traced as expected. The difference on the bytecode is that jumps are no longer optimized using -X noopt: * Optimized: "32 POP_JUMP_IF_FALSE 14" * Not optimized: "32 POP_JUMP_IF_FALSE 42" ">> 42 JUMP_ABSOLUTE 14" The peephole optimizer replaces a jump to an unconditional jump with a jump directly to the target of the unconditional jump. I documented peephole optimizations in my reimplementation in pure Python: https://bytecode.readthedocs.io/en/latest/peephole.html#optimizations (I'm not sure that it's up to date, but it should give you an idea of which kinds of optimizations are implemented.) ---------- Added file: https://bugs.python.org/file48371/traceme.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 05:50:10 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 28 May 2019 09:50:10 +0000 Subject: [issue37075] Error message improvement for AsyncMock Message-ID: <1559037010.51.0.223468847551.issue37075@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : * assert_has_awaits has a comma in between the error message string used in AssertionError and hence error is raised as a tuple instead of a string. import asyncio from unittest.mock import AsyncMock, call async def main(): a = AsyncMock() await a(1) a.assert_has_awaits([call(2)]) asyncio.run(main()) Traceback (most recent call last): File "/tmp/foo.py", line 9, in asyncio.run(main()) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "/tmp/foo.py", line 7, in main a.assert_has_awaits([call(2)]) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 2164, in assert_has_awaits raise AssertionError( AssertionError: ('Awaits not found.\nExpected: [call(2)]\n', 'Actual: [call(1)]') It should be printed as a single string as below : AssertionError: Awaits not found. Expected: [call(2)] Actual: [call(1)] * assert_awaited_with uses _format_mock_failure_message which has "call" hardcoded but most of the error messages in AsyncMock use "await". assert_awaited_with error seems little confusing as it's same as assert_called_with. This is mostly a consistency nit as in below where call to a(2) is made but it's not awaited that should be noted in the message. The fix is simple which would be to make the string 'call' as a parameter that defaults to 'call' and needs to be passed as 'await' from assert_awaited_with error formatting. This would make "expected call not found" as "expected await not found" in below program. import asyncio from unittest.mock import AsyncMock, call async def main(): a = AsyncMock() await a(1) a(2) a.assert_awaited_with(2) asyncio.run(main()) ./python.exe /tmp/foo.py /tmp/foo.py:7: RuntimeWarning: coroutine 'AsyncMockMixin._mock_call' was never awaited a(2) RuntimeWarning: Enable tracemalloc to get the object allocation traceback Traceback (most recent call last): File "/tmp/foo.py", line 10, in asyncio.run(main()) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "/tmp/foo.py", line 8, in main a.assert_awaited_with(2) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", line 2118, in assert_awaited_with raise AssertionError(_error_message()) from cause AssertionError: expected call not found. Expected: mock(2) Actual: mock(1) I will raise a PR for the above shortly. ---------- components: Library (Lib) messages: 343753 nosy: asvetlov, lisroach, xtreak priority: normal severity: normal status: open title: Error message improvement for AsyncMock type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 05:52:19 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 28 May 2019 09:52:19 +0000 Subject: [issue29883] asyncio: Windows Proactor Event Loop UDP Support In-Reply-To: <1490210881.18.0.553215827239.issue29883@psf.upfronthosting.co.za> Message-ID: <1559037139.38.0.526520841718.issue29883@roundup.psfhosted.org> miss-islington added the comment: New changeset bafd4b5ac83b6cc0b7455290a04c4bfad34bdc90 by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-29883: Asyncio proactor udp (GH-13440) https://github.com/python/cpython/commit/bafd4b5ac83b6cc0b7455290a04c4bfad34bdc90 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 05:52:53 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 28 May 2019 09:52:53 +0000 Subject: [issue37075] Error message improvement for AsyncMock In-Reply-To: <1559037010.51.0.223468847551.issue37075@roundup.psfhosted.org> Message-ID: <1559037173.8.0.495241835178.issue37075@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13518 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 05:54:22 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 09:54:22 +0000 Subject: [issue29883] asyncio: Windows Proactor Event Loop UDP Support In-Reply-To: <1490210881.18.0.553215827239.issue29883@psf.upfronthosting.co.za> Message-ID: <1559037262.88.0.0213583773277.issue29883@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 05:57:10 2019 From: report at bugs.python.org (Michele Angrisano) Date: Tue, 28 May 2019 09:57:10 +0000 Subject: [issue37074] os.stat() does not work for NUL and CON In-Reply-To: <1559029061.14.0.328684807212.issue37074@roundup.psfhosted.org> Message-ID: <1559037430.08.0.0245751718384.issue37074@roundup.psfhosted.org> Michele Angrisano added the comment: I've tried to reproduce this behavior on my Mac with python3.8 and python 3.7 but I couldn't. If 'nul' doesn't exist, it raises a FileNotFound exception as it should do. If 'nul' exists, it shows me the right output. Same behavior with 'con'. ---------- nosy: +mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 06:15:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 10:15:10 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions Message-ID: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> New submission from STINNER Victor : Python 3.8 now has 3 hooks for uncaught exceptions: * sys.excepthook() * sys.unraisablehook() * threading.excepthook() _thread.start_new_thread() calls none of these hooks, but directly logs the exception. I propose to modify it to reuse sys.unraisablehook(): see attached PR. -- Using threading.excepthook() would be another option, but _thread.start_new_thread() is usually wrapped in threading.Thread.run() which already uses threading.excepthook(). It might be surprising to see two bugs from the same thread using threading.excepthook(). Moreover, right now, _thread is the "low-level" API to access threads: it doesn't acces threading. I'm not comfortable by adding an inter-dependency between _thread (low-level) and threading (high-level). If threading.Thread.run() is correctly written, it should not raise an exception. In the worst case, threading.excepthook should handle the exception. _thread.start_new_thread() should never get an exception raised by threading if threading.excepthook does correctly its job. ---------- components: Library (Lib) messages: 343756 nosy: vstinner priority: normal severity: normal status: open title: _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 06:16:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 10:16:10 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions In-Reply-To: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> Message-ID: <1559038570.4.0.324438763545.issue37076@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +13519 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13617 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 06:16:47 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 28 May 2019 10:16:47 +0000 Subject: [issue35279] asyncio uses too many threads by default In-Reply-To: <1542637615.61.0.788709270274.issue35279@psf.upfronthosting.co.za> Message-ID: <1559038607.1.0.429578451433.issue35279@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +13520 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 06:19:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 10:19:12 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions In-Reply-To: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> Message-ID: <1559038752.81.0.929047691547.issue37076@roundup.psfhosted.org> STINNER Victor added the comment: With PR 13617, the function which raised the exception can be retrieved using unraisable.object. If we used threading.excepthook, I don't see how we could pass this function into threading.ExceptHookArgs: ExceptHookArgs.thread is expected to be a threading.Thread object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 06:20:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 10:20:57 +0000 Subject: [issue1230540] Add threading.excepthook() to handle uncaught exceptions raised by Thread.run() Message-ID: <1559038857.28.0.512666386819.issue1230540@roundup.psfhosted.org> STINNER Victor added the comment: > If we want to support low-level threads created by start_new_thread() we should call excepthook() from t_bootstrap instead of Thread._bootstrap_inner. Otherwise implementing excepthook() as a Thread method would be more convenient. I created bpo-37076: "_thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 06:23:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 10:23:15 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions In-Reply-To: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> Message-ID: <1559038995.49.0.868306719569.issue37076@roundup.psfhosted.org> STINNER Victor added the comment: This issue is a follow-up of: * bpo-36829: Add sys.unraisablehook() to custom how "unraisable exceptions" are logged * bpo-1230540: Add threading.excepthook() to handle uncaught exceptions raised by Thread.run() Discussions around _thread.start_new_thead() exception: Antoine Pitrou: """ >From the doc: Handle uncaught :func:``Thread.run`` exception. What if some C extension wants to report uncaught exceptions in C-created threads? Does it have to create a dummy Thread object? For example, how about threads created by _thread.start_new_thread? """ https://github.com/python/cpython/pull/13515#issuecomment-495935350 Serhiy Storchaka: "If we want to support low-level threads created by start_new_thread() we should call [threading.]excepthook() from t_bootstrap instead of Thread._bootstrap_inner. Otherwise implementing excepthook() as a Thread method would be more convenient." https://bugs.python.org/issue1230540#msg343748 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 06:24:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 10:24:04 +0000 Subject: [issue36900] Use _PyCoreConfig rather than global configuration variables In-Reply-To: <1557745648.65.0.648187833126.issue36900@roundup.psfhosted.org> Message-ID: <1559039044.16.0.951751292157.issue36900@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9ea277a788eabec102e8fe613b7f1e27995d5918 by Victor Stinner in branch 'master': bpo-36900: Fix compilation on HP-UX (GH-13614) https://github.com/python/cpython/commit/9ea277a788eabec102e8fe613b7f1e27995d5918 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 06:33:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 10:33:11 +0000 Subject: [issue37072] PyNode_Compile() crashes in Python 3.8. In-Reply-To: <1559008374.77.0.70293248511.issue37072@roundup.psfhosted.org> Message-ID: <1559039591.66.0.820373098771.issue37072@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a release blocker. ---------- nosy: +lukasz.langa, vstinner priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 06:38:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 10:38:38 +0000 Subject: [issue29883] asyncio: Windows Proactor Event Loop UDP Support In-Reply-To: <1490210881.18.0.553215827239.issue29883@psf.upfronthosting.co.za> Message-ID: <1559039918.56.0.239925316927.issue29883@roundup.psfhosted.org> STINNER Victor added the comment: I planned to ask you (Adam and Andrew) to merge the PR even if it's not finished, just to make sure that UDP support will land into Python 3.8. But Andrew finished the PR, yahoo! Thanks you very much Adam Meily and Andrew Svetlov! Sorry, I planned to do what Andrew did: "finish" the PR, but I was just too busy on other things :-( Well done, I see that you fixed max_size, pause/resume protocol, etc. asyncio on Windows will be much better experience with IOCP by default, CTRL+c support, UDP support, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 06:46:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 10:46:30 +0000 Subject: [issue29883] asyncio: Windows Proactor Event Loop UDP Support In-Reply-To: <1490210881.18.0.553215827239.issue29883@psf.upfronthosting.co.za> Message-ID: <1559040390.36.0.834074270854.issue29883@roundup.psfhosted.org> Andrew Svetlov added the comment: You are welcome, Victor! Thank you very much, Adam! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 07:09:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 11:09:59 +0000 Subject: [issue36339] test_ttk_guionly: test_traversal() fails randomly on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1552899428.95.0.891639199681.issue36339@roundup.psfhosted.org> Message-ID: <1559041799.61.0.371016984044.issue36339@roundup.psfhosted.org> STINNER Victor added the comment: New failure: https://buildbot.python.org/all/#/builders/33/builds/600 ..test test_ttk_guionly failed -- Traceback (most recent call last): File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_ttk\test_widgets.py", line 1096, in test_traversal self.assertEqual(self.nb.select(), str(self.child2)) AssertionError: '.78592616L' != '.78590040L' test_widget_state (test_ttk.test_widgets.WidgetTest) ... ok ====================================================================== FAIL: test_traversal (test_ttk.test_widgets.NotebookTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_ttk\test_widgets.py", line 1096, in test_traversal self.assertEqual(self.nb.select(), str(self.child2)) AssertionError: '.78592616L' != '.78590040L' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 07:12:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 11:12:30 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1559041950.61.0.947352980055.issue36829@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13521 pull_request: https://github.com/python/cpython/pull/13620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 07:28:55 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 28 May 2019 11:28:55 +0000 Subject: [issue37077] Threading: add builtin TID attribute to Thread objects for AIX Message-ID: <1559042935.56.0.899309127578.issue37077@roundup.psfhosted.org> New submission from Michael Felt : As issue36084 is already closed - opening a new issue for the PR to add this support for AIX. ---------- messages: 343765 nosy: Michael.Felt priority: normal severity: normal status: open title: Threading: add builtin TID attribute to Thread objects for AIX versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 07:44:30 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 May 2019 11:44:30 +0000 Subject: [issue36305] Inconsistent behavior of pathlib.WindowsPath with drive paths In-Reply-To: <1552664225.98.0.0986812073641.issue36305@roundup.psfhosted.org> Message-ID: <1559043870.54.0.0611727545502.issue36305@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:02:59 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 28 May 2019 12:02:59 +0000 Subject: [issue35279] asyncio uses too many threads by default In-Reply-To: <1542637615.61.0.788709270274.issue35279@psf.upfronthosting.co.za> Message-ID: <1559044979.21.0.716327110049.issue35279@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 9a7e5b1b42abcedb895b1ce49d83fe067d01835c by Inada Naoki in branch 'master': bpo-35279: reduce default max_workers of ThreadPoolExecutor (GH-13618) https://github.com/python/cpython/commit/9a7e5b1b42abcedb895b1ce49d83fe067d01835c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:03:20 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 28 May 2019 12:03:20 +0000 Subject: [issue35279] asyncio uses too many threads by default In-Reply-To: <1542637615.61.0.788709270274.issue35279@psf.upfronthosting.co.za> Message-ID: <1559045000.32.0.256993240054.issue35279@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:08:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 12:08:14 +0000 Subject: [issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel >= 3.10 In-Reply-To: <1396430238.51.0.283909097168.issue21131@psf.upfronthosting.co.za> Message-ID: <1559045294.24.0.371060681554.issue21131@roundup.psfhosted.org> STINNER Victor added the comment: + pthread_attr_t attrs; + pthread_attr_init(&attrs); + (void)pthread_attr_getstacksize(&attrs, &stack.ss_size); PyThread_start_new_thread() of thread_pthread.h already contains logic to get a "good" stack size. I would prefer to reuse this code. See also _pythread_nt_set_stacksize() of thread_nt.h. Maybe we need a private function to get the default stack size? See also PyThread_get_stacksize() and _thread.stack_size(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:37:32 2019 From: report at bugs.python.org (suraj) Date: Tue, 28 May 2019 12:37:32 +0000 Subject: [issue37078] norton login Message-ID: <1559047052.73.0.927653434628.issue37078@roundup.psfhosted.org> New submission from suraj : Norton Login - Manage Your Norton Subscription, Setup Norton, Norton Sign in etc at Norton.com/setup and Manage Norton Services using Norton Account Here! norton login ---------- files: Untitled design.png messages: 343768 nosy: norton priority: normal severity: normal status: open title: norton login Added file: https://bugs.python.org/file48372/Untitled design.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:42:53 2019 From: report at bugs.python.org (Peter Edwards) Date: Tue, 28 May 2019 12:42:53 +0000 Subject: [issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel >= 3.10 In-Reply-To: <1559045294.24.0.371060681554.issue21131@roundup.psfhosted.org> Message-ID: Peter Edwards added the comment: Ok - let me submit a pull request with your suggestions On Tue, 28 May 2019 at 13:08, STINNER Victor wrote: > > STINNER Victor added the comment: > > + pthread_attr_t attrs; > + pthread_attr_init(&attrs); > + (void)pthread_attr_getstacksize(&attrs, &stack.ss_size); > > PyThread_start_new_thread() of thread_pthread.h already contains logic to > get a "good" stack size. I would prefer to reuse this code. > > See also _pythread_nt_set_stacksize() of thread_nt.h. > > Maybe we need a private function to get the default stack size? > > See also PyThread_get_stacksize() and _thread.stack_size(). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:43:04 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 28 May 2019 12:43:04 +0000 Subject: [issue36922] Implement Py_TPFLAGS_METHOD_DESCRIPTOR In-Reply-To: <1557909585.08.0.913937443168.issue36922@roundup.psfhosted.org> Message-ID: <1559047384.65.0.377233042035.issue36922@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset eb65e2443ac21739baf6d373abc7b4638b9d6927 by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-36922: implement PEP-590 Py_TPFLAGS_METHOD_DESCRIPTOR (GH-13338) https://github.com/python/cpython/commit/eb65e2443ac21739baf6d373abc7b4638b9d6927 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:44:39 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 28 May 2019 12:44:39 +0000 Subject: [issue36922] Implement Py_TPFLAGS_METHOD_DESCRIPTOR In-Reply-To: <1557909585.08.0.913937443168.issue36922@roundup.psfhosted.org> Message-ID: <1559047479.41.0.811043288029.issue36922@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:45:13 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 28 May 2019 12:45:13 +0000 Subject: [issue34626] PEP 384's PyType_Spec and PyType_Slot are not documented In-Reply-To: <1536629597.33.0.0269046726804.issue34626@psf.upfronthosting.co.za> Message-ID: <1559047513.57.0.898527634074.issue34626@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:46:04 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 12:46:04 +0000 Subject: [issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does In-Reply-To: <1542203449.76.0.788709270274.issue35246@psf.upfronthosting.co.za> Message-ID: <1559047564.4.0.577485925288.issue35246@roundup.psfhosted.org> Andrew Svetlov added the comment: Aha, I see. You are right. Let's drop checks for cmd/program/args types but left to subprocess do these checks. This approach avoiding complex checking/converting logic in asyncio itself and reduces code duplication. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:51:33 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 28 May 2019 12:51:33 +0000 Subject: [issue37078] spam In-Reply-To: <1559047052.73.0.927653434628.issue37078@roundup.psfhosted.org> Message-ID: <1559047893.39.0.0538375807001.issue37078@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- stage: -> resolved status: open -> closed title: norton login -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:53:35 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 28 May 2019 12:53:35 +0000 Subject: [issue32299] unittest.mock.patch.dict.__enter__ should return the dict In-Reply-To: <1513148900.41.0.213398074469.issue32299@psf.upfronthosting.co.za> Message-ID: <1559048015.1.0.616582726706.issue32299@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 04530812e90e45a37ed84e83505d63db7edc1262 by Cheryl Sabella (Mario Corchero) in branch 'master': bpo-32299: Return patched dict when using patch.dict as a context manager (GH-11062) https://github.com/python/cpython/commit/04530812e90e45a37ed84e83505d63db7edc1262 ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:54:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 12:54:25 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559048065.65.0.761320476128.issue33725@roundup.psfhosted.org> STINNER Victor added the comment: As soon as the "fork" start method "just works" on Linux, I'm not sure why you want to use "spawn" by default on Linux. I don't buy the "consistency" argument here. I'm not surprised that such "low level" module like multiprocessing behaves differently depending on the platform to get the "native" and most efficient way to spawn subprocesses. In general, fork is bad, but it's also convenient and people rely on it to prepare data in a main process and then "duplicate" the process to inherit cooked data. If someone wants to more away from fork by default, I would suggest to *first* enhance multiprocessing documentation to list issues caused by fork(), and maybe also described when fork is safe (never doesn't sound like a good answer, since so far, I'm not aware of tons of bug reports on Linux caused by fork :-)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:55:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 12:55:36 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559048136.06.0.435400448023.issue26423@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 05f16416d99dc9fc76fef11e56f16593e7a5955e by Victor Stinner (Zackery Spytz) in branch 'master': bpo-26423: Fix possible overflow in wrap_lenfunc() (GH-13606) https://github.com/python/cpython/commit/05f16416d99dc9fc76fef11e56f16593e7a5955e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:55:41 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 28 May 2019 12:55:41 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559048141.08.0.298790185073.issue26423@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13522 pull_request: https://github.com/python/cpython/pull/13622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:55:54 2019 From: report at bugs.python.org (Denis S. Otkidach) Date: Tue, 28 May 2019 12:55:54 +0000 Subject: [issue34364] problem with traceback for syntax error in f-string In-Reply-To: <31c748a7-5e57-009a-08e5-c18171489bc0@gmail.com> Message-ID: <1559048154.87.0.263359288889.issue34364@roundup.psfhosted.org> Change by Denis S. Otkidach : ---------- nosy: +ods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:57:24 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 28 May 2019 12:57:24 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559048244.6.0.973749090429.issue26423@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 08:59:19 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 28 May 2019 12:59:19 +0000 Subject: [issue32299] unittest.mock.patch.dict.__enter__ should return the dict In-Reply-To: <1513148900.41.0.213398074469.issue32299@psf.upfronthosting.co.za> Message-ID: <1559048359.06.0.766520749255.issue32299@roundup.psfhosted.org> Cheryl Sabella added the comment: @Allen Li, thank you for the report. And thank you, @Vadim Tsander for the original pull request and @mariocj89 for reviving this. Also, thank you @eric.araujo for the review and approval. This has been merged! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 09:06:47 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 13:06:47 +0000 Subject: [issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess In-Reply-To: <1555808685.63.0.20312678962.issue36686@roundup.psfhosted.org> Message-ID: <1559048807.13.0.943773291961.issue36686@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed versions: -Python 3.5, Python 3.6, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 09:10:56 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 28 May 2019 13:10:56 +0000 Subject: [issue37078] spam Message-ID: <1559049056.94.0.193975362946.issue37078@roundup.psfhosted.org> Change by SilentGhost : ---------- Removed message: https://bugs.python.org/msg343768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 09:11:14 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 28 May 2019 13:11:14 +0000 Subject: [issue37078] spam Message-ID: <1559049074.43.0.765604821173.issue37078@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: -norton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 09:11:25 2019 From: report at bugs.python.org (SilentGhost) Date: Tue, 28 May 2019 13:11:25 +0000 Subject: [issue37078] spam Message-ID: <1559049085.68.0.330148526063.issue37078@roundup.psfhosted.org> Change by SilentGhost : Removed file: https://bugs.python.org/file48372/Untitled design.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 09:11:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 13:11:30 +0000 Subject: [issue36709] Asyncio SSL keep-alive connections raise errors after loop close. In-Reply-To: <1556095707.61.0.53219784779.issue36709@roundup.psfhosted.org> Message-ID: <1559049090.71.0.120329812023.issue36709@roundup.psfhosted.org> Andrew Svetlov added the comment: >From my understanding, the correct code should close all transports and wait for their connection_lost() callbacks before closing the loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 09:17:50 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 28 May 2019 13:17:50 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559049470.24.0.319541241912.issue26423@roundup.psfhosted.org> miss-islington added the comment: New changeset e7ddf586ae5b7a3b975103b09c8202226d77f421 by Miss Islington (bot) in branch '3.7': bpo-26423: Fix possible overflow in wrap_lenfunc() (GH-13606) https://github.com/python/cpython/commit/e7ddf586ae5b7a3b975103b09c8202226d77f421 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 09:24:54 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 28 May 2019 13:24:54 +0000 Subject: [issue37077] Threading: add builtin TID attribute to Thread objects for AIX In-Reply-To: <1559042935.56.0.899309127578.issue37077@roundup.psfhosted.org> Message-ID: <1559049894.37.0.458751195932.issue37077@roundup.psfhosted.org> Change by Michael Felt : ---------- keywords: +patch pull_requests: +13523 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 09:58:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 13:58:58 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559051938.59.0.345944256062.issue26423@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13524 pull_request: https://github.com/python/cpython/pull/13625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:01:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 14:01:23 +0000 Subject: [issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged In-Reply-To: <1557231007.92.0.23824097772.issue36829@roundup.psfhosted.org> Message-ID: <1559052083.68.0.190893285346.issue36829@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a85a1d337d26a65036e427341d15e3979f7e9ced by Victor Stinner in branch 'master': bpo-36829: sys.excepthook and sys.unraisablehook flush (GH-13620) https://github.com/python/cpython/commit/a85a1d337d26a65036e427341d15e3979f7e9ced ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:02:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 14:02:57 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559052177.33.0.302104894065.issue33725@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 17a5588740b3d126d546ad1a13bdac4e028e6d50 by Victor Stinner in branch 'master': bpo-33725: multiprocessing uses spawn by default on macOS (GH-13603) https://github.com/python/cpython/commit/17a5588740b3d126d546ad1a13bdac4e028e6d50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:04:19 2019 From: report at bugs.python.org (Tom Christie) Date: Tue, 28 May 2019 14:04:19 +0000 Subject: [issue36709] Asyncio SSL keep-alive connections raise errors after loop close. In-Reply-To: <1556095707.61.0.53219784779.issue36709@roundup.psfhosted.org> Message-ID: <1559052259.99.0.439925263111.issue36709@roundup.psfhosted.org> Tom Christie added the comment: > From my understanding, the correct code should close all transports and wait for their connection_lost() callbacks before closing the loop. Ideally, yes, although we should be able to expect that an SSL connection that hasn't been gracefully closed wouldn't loudly error on teardown like that. In standard sync code, the equivelent would running something like this... ```python session = requests.Session() session.get('https://example.com/') ``` We wouldn't expect a traceback to be raised on exiting. (Even though the user *hasn't* explicitly closed the session, and even though a keep alive SSL connection will be open at the point of exit.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:10:09 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 28 May 2019 14:10:09 +0000 Subject: [issue37074] os.stat() does not work for NUL and CON In-Reply-To: <1559029061.14.0.328684807212.issue37074@roundup.psfhosted.org> Message-ID: <1559052609.91.0.368630295086.issue37074@roundup.psfhosted.org> Eryk Sun added the comment: Opening "CON" (i.e. r"\\.\CON") fails with ERROR_INVALID_PARAMETER (87) because it has to be opened with either GENERIC_READ or GENERIC_WRITE data access in order to map it to either the console input buffer or active screen buffer. The CreateFileW call in stat() necessarily requests no data access. Calling stat on "NUL" (among others such as "CONIN$", "//./C:", and "//./PhysicalDrive0") fails with ERROR_INVALID_FUNCTION (1) -- or possibly ERROR_INVALID_PARAMETER or ERROR_NOT_SUPPORTED (50), depending on the device. stat() calls GetFileInformationByHandle. This requests FileFsVolumeInformation and FileAllInformation, which commonly fail as unsupported or invalid requests for devices other than filesystem devices. Even volume and raw disk devices fail a FileAllInformation request. If we have a valid file handle, we can get the file type via GetFileType(hFile), as _Py_fstat_noraise does in Python/fileutils.c. If opening a handle fails with ERROR_INVALID_PARAMETER for a path that resolves to r"\\.\CON" or r"\\?\CON" via GetFullPathNameW, we can simply set st_mode to _S_IFCHR and return. For example: if (hFile == INVALID_HANDLE_VALUE) { DWORD lastError = GetLastError(); if (lastError == ERROR_INVALID_PARAMETER) { WCHAR fullPath[8]; if (GetFullPathNameW(path, sizeof(fullPath), fullPath, NULL) == 7 && ( _wcsicmp(fullPath, L"\\\\.\\CON") == 0 || _wcsicmp(fullPath, L"\\\\?\\CON") == 0)) { memset(result, 0, sizeof(*result)); result->st_mode = _S_IFCHR; return 0; } } /* Existing error handling code. */ } else { DWORD type = GetFileType(hFile); if (type != FILE_TYPE_DISK) { CloseHandle(hFile); if (type == FILE_TYPE_UNKNOWN && GetLastError() != 0) { return -1; } memset(result, 0, sizeof(*result)); if (type == FILE_TYPE_CHAR) { /* e.g. "//./NUL" */ result->st_mode = _S_IFCHR; } else if (type == FILE_TYPE_PIPE) { /* e.g. "//./PIPE/Spam" */ result->st_mode = _S_IFIFO; } return 0; } else if (!GetFileInformationByHandle(hFile, &info)) { DWORD lastError = GetLastError(); CloseHandle(hFile); /* e.g. "//./C:" or "//./PhysicalDrive0" */ if (lastError == ERROR_INVALID_FUNCTION || lastError == ERROR_INVALID_PARAMETER || lastError == ERROR_NOT_SUPPORTED) { memset(result, 0, sizeof(*result)); result->st_mode = _S_IFREG; return 0; } return -1; } } ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:13:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 14:13:58 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559052838.01.0.171846822967.issue33725@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13525 pull_request: https://github.com/python/cpython/pull/13626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:14:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 14:14:44 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559052884.02.0.837135135708.issue33725@roundup.psfhosted.org> STINNER Victor added the comment: Ok, I pushed a minimum fix to make sure that it lands in Python 3.8 beta1. Please check if the documentation if properly updated :-) We will still have time after beta1 to revisit the question of making spawn the default on more/all platforms. I wrote PR 13626 to change also Python 3.7. Once this one will be merged, I will also write a PR for Python 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:25:53 2019 From: report at bugs.python.org (Jizhou Yang) Date: Tue, 28 May 2019 14:25:53 +0000 Subject: [issue37079] PEM cadata causes ssl.SSLError: nested ans1 error Message-ID: <1559053553.63.0.405634897269.issue37079@roundup.psfhosted.org> Change by Jizhou Yang : ---------- assignee: christian.heimes components: SSL nosy: Jizhou Yang, christian.heimes priority: normal severity: normal status: open title: PEM cadata causes ssl.SSLError: nested ans1 error type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:31:50 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 28 May 2019 14:31:50 +0000 Subject: [issue37074] os.stat() does not work for NUL and CON In-Reply-To: <1559029061.14.0.328684807212.issue37074@roundup.psfhosted.org> Message-ID: <1559053910.86.0.525422314791.issue37074@roundup.psfhosted.org> Eryk Sun added the comment: > GetFullPathNameW(path, sizeof(fullPath), That should be sizeof(fullPath) / sizeof(WCHAR), or use Py_ARRAY_LENGTH, or just hard code 8. That's probably not the only mistake. But this is just an example to discuss the details and alternatives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:34:18 2019 From: report at bugs.python.org (Maor Kleinberger) Date: Tue, 28 May 2019 14:34:18 +0000 Subject: [issue36305] Inconsistent behavior of pathlib.WindowsPath with drive paths In-Reply-To: <1552664225.98.0.0986812073641.issue36305@roundup.psfhosted.org> Message-ID: <1559054058.07.0.603048835406.issue36305@roundup.psfhosted.org> Maor Kleinberger added the comment: > Is this related to the weird paths I am seeing when getting different output in venv compared to without venv This is probably not related, sounds like something caused by the venv implementation. On a different note, how do I get my PR reviewed? (https://github.com/python/cpython/pull/12361) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:36:04 2019 From: report at bugs.python.org (Jizhou Yang) Date: Tue, 28 May 2019 14:36:04 +0000 Subject: [issue37079] PEM cadata causes ssl.SSLError: nested asn1 error Message-ID: <1559054164.15.0.615290495729.issue37079@roundup.psfhosted.org> New submission from Jizhou Yang : Loading cadata in PEM format results in a nested asn1 error. Workaround is to convert cadata to unicode. Minimum code for reproducing the issue: >>>import ssl >>> with open('ca.crt') as f: ... ca_crt = f.read() ... >>> c = ssl.create_default_context() >>> c.load_verify_locations(cadata=ca_crt) Traceback (most recent call last): File "", line 1, in ssl.SSLError: nested asn1 error (_ssl.c:2902) With workaround to make it work: >>>import ssl >>> with open('ca.crt') as f: ... ca_crt = f.read() ... >>> c = ssl.create_default_context() >>> c.load_verify_locations(cadata=unicode(ca_crt)) The issue is annoying as the documentation explicitly states cadata to be "either an ASCII string of one or more PEM-encoded certificates...". Furthermore the unicode function is not present in Python 3.x, making the workaround version-dependent. ---------- title: PEM cadata causes ssl.SSLError: nested ans1 error -> PEM cadata causes ssl.SSLError: nested asn1 error Added file: https://bugs.python.org/file48373/ca.crt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 10:42:47 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 28 May 2019 14:42:47 +0000 Subject: [issue35975] Put back the ability to parse files where async/await aren't keywords In-Reply-To: <1549931018.54.0.209945896308.issue35975@roundup.psfhosted.org> Message-ID: <1559054567.56.0.901482173675.issue35975@roundup.psfhosted.org> Guido van Rossum added the comment: Sorry for the oversight. Do you need help fixing that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:04:42 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 28 May 2019 15:04:42 +0000 Subject: [issue37079] PEM cadata causes ssl.SSLError: nested asn1 error In-Reply-To: <1559054164.15.0.615290495729.issue37079@roundup.psfhosted.org> Message-ID: <1559055882.73.0.438695578142.issue37079@roundup.psfhosted.org> Christian Heimes added the comment: The documentation refers to ASCII string as Python 3-style ASCII text object. In Python 2, that's the unicode data type. The feature was backported from Python 3. I guess the documentation was directly taken from Python 3's documentation and not updated to reflect Python 2's quirky str type. You can use the io module to get the proper text type on Python 2 and 3. import io with io.open('ca.crt') as f: ca_crt = f.read() ---------- resolution: -> not a bug status: open -> pending type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:07:57 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 28 May 2019 15:07:57 +0000 Subject: [issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there) In-Reply-To: <1557961877.88.0.551239006015.issue36933@roundup.psfhosted.org> Message-ID: <1559056077.73.0.946503032416.issue36933@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- pull_requests: +13526 pull_request: https://github.com/python/cpython/pull/13627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:16:37 2019 From: report at bugs.python.org (Christoph Reiter) Date: Tue, 28 May 2019 15:16:37 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions In-Reply-To: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> Message-ID: <1559056597.66.0.447846473713.issue37076@roundup.psfhosted.org> Christoph Reiter added the comment: > _thread.start_new_thread() calls none of these hooks, but directly logs the exception. It calls sys.excepthook() currently: import _thread import threading import sys done = False def hook(*args): global done print(threading.current_thread()) done = True sys.excepthook = hook def worker(): raise Exception _thread.start_new_thread(worker, tuple()) while not done: pass ---------- nosy: +lazka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:16:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 15:16:56 +0000 Subject: [issue33407] Implement Py_DEPRECATED() macro for Visual Studio In-Reply-To: <1525253389.49.0.682650639539.issue33407@psf.upfronthosting.co.za> Message-ID: <1559056616.03.0.204045039992.issue33407@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3c8724fc60163f4f3c3b0d531c84cc7b36783f82 by Victor Stinner (Zackery Spytz) in branch 'master': bpo-33407: Implement Py_DEPRECATED() on MSVC (GH-8980) https://github.com/python/cpython/commit/3c8724fc60163f4f3c3b0d531c84cc7b36783f82 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:19:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 15:19:44 +0000 Subject: [issue33407] Implement Py_DEPRECATED() macro for Visual Studio In-Reply-To: <1525253389.49.0.682650639539.issue33407@psf.upfronthosting.co.za> Message-ID: <1559056784.93.0.432152732612.issue33407@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Zackery Spytz for the fix! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:20:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 15:20:34 +0000 Subject: [issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros In-Reply-To: <1384348276.8.0.185765824651.issue19569@psf.upfronthosting.co.za> Message-ID: <1559056834.73.0.981876598922.issue19569@roundup.psfhosted.org> STINNER Victor added the comment: bpo-33407 added MSVC support for Py_DEPRECATED(). ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:23:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 15:23:12 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559056992.38.0.851182835197.issue26423@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 80dfe990162e7a2dd99524829beecd449a973e9e by Victor Stinner in branch '2.7': bpo-26423: Fix possible overflow in wrap_lenfunc() (GH-13606) (GH-13625) https://github.com/python/cpython/commit/80dfe990162e7a2dd99524829beecd449a973e9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:24:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 15:24:03 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559057043.4.0.735026867237.issue26423@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Zackery Spytz for the fix. It's now applied to 2.7, 3.7 and master branches. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:27:13 2019 From: report at bugs.python.org (lilydjwg) Date: Tue, 28 May 2019 15:27:13 +0000 Subject: [issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does In-Reply-To: <1542203449.76.0.788709270274.issue35246@psf.upfronthosting.co.za> Message-ID: <1559057233.36.0.245805348635.issue35246@roundup.psfhosted.org> Change by lilydjwg : ---------- keywords: +patch pull_requests: +13527 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:37:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 15:37:17 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559057837.12.0.154952326334.issue26423@roundup.psfhosted.org> STINNER Victor added the comment: Oh. The test fails on Python 2.7 on Windows: https://buildbot.python.org/all/#/builders/26/builds/287 ERROR: test_wrap_lenfunc_bad_cast (test.test_descr.OperatorsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\2.7.kloth-win64vs9\build\lib\test\test_descr.py", line 407, in test_wrap_lenfunc_bad_cast self.assertEqual(xrange(sys.maxsize).__len__(), sys.maxsize) OverflowError: Python int too large to convert to C long ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:37:32 2019 From: report at bugs.python.org (Jarl Gullberg) Date: Tue, 28 May 2019 15:37:32 +0000 Subject: [issue37080] Cannot compile Python3.7.3 on Alt-F (ARM) Message-ID: <1559057852.62.0.663214501823.issue37080@roundup.psfhosted.org> New submission from Jarl Gullberg : I am currently trying to compile the latest stable release of Python (3.7.3 at the time of writing) on a small ARM device (a DNS-323A1 NAS), running Alt-F (a custom linux-based firmware) using GCC 4.3.3. Unfortunately, I've hit a major snag that I just can't seem to get past. In short, the compilation goes well until the [sharedmods] stage, where it encounters an error related to readline and the module not having been compiled with -fPIC. I've included a truncated log (taken from a second make invocation after the first failed) that displays the issue. This is the ./configure invocation I've used: '--prefix=/usr' '--enable-shared' '--with-system-expat' '--with-system-ffi' '--with-ensurepip=yes' '--enable-optimizations' '--enable-ipv6' 'CFLAGS=-fPIC' 'CXXFLAGS=-fPIC' Any assistance would be much appreciated. ---------- components: Build files: make.log messages: 343796 nosy: Jarl Gullberg priority: normal severity: normal status: open title: Cannot compile Python3.7.3 on Alt-F (ARM) type: compile error versions: Python 3.7 Added file: https://bugs.python.org/file48374/make.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 11:44:52 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 28 May 2019 15:44:52 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c Message-ID: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> New submission from Christian Heimes : OpenSSL 1.1.1c is out, https://github.com/openssl/openssl/blob/OpenSSL_1_1_1c/CHANGES ---------- assignee: christian.heimes components: SSL, Tests messages: 343797 nosy: christian.heimes priority: high severity: normal status: open title: Test with OpenSSL 1.1.1c versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:02:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 16:02:10 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559059330.16.0.0436907956843.issue26423@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13529 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/13629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:05:23 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 16:05:23 +0000 Subject: [issue35621] asyncio.create_subprocess_exec() only works with main event loop In-Reply-To: <1546210778.19.0.43686311162.issue35621@roundup.psfhosted.org> Message-ID: <1559059523.46.0.0943431839175.issue35621@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +13530 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:10:44 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 28 May 2019 16:10:44 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c In-Reply-To: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> Message-ID: <1559059844.15.0.250305744767.issue37081@roundup.psfhosted.org> Christian Heimes added the comment: test_start_tls_server_1 is failing reproducible with OpenSSL 1.1.1c on Linux (Fedora 29). ====================================================================== ERROR: test_start_tls_server_1 (test.test_asyncio.test_sslproto.SelectorStartTLSTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/heimes/dev/python/cpython/Lib/test/test_asyncio/test_sslproto.py", line 577, in test_start_tls_server_1 self.loop.run_until_complete(run_main()) File "/home/heimes/dev/python/cpython/Lib/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "/home/heimes/dev/python/cpython/Lib/test/test_asyncio/test_sslproto.py", line 570, in run_main await asyncio.wait_for( File "/home/heimes/dev/python/cpython/Lib/asyncio/tasks.py", line 461, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError ---------- components: +asyncio nosy: +asvetlov, yselivanov type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:11:44 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 28 May 2019 16:11:44 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c In-Reply-To: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> Message-ID: <1559059904.57.0.143970490032.issue37081@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +13531 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:14:34 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 28 May 2019 16:14:34 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c In-Reply-To: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> Message-ID: <1559060074.52.0.857484100121.issue37081@roundup.psfhosted.org> Charalampos Stratakis added the comment: Reported here: https://bugs.python.org/issue35998 ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:15:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 16:15:34 +0000 Subject: [issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1 In-Reply-To: <1456268688.08.0.284414420897.issue26423@psf.upfronthosting.co.za> Message-ID: <1559060134.17.0.620143282459.issue26423@roundup.psfhosted.org> STINNER Victor added the comment: New changeset aaed2c332ae8370e5e87d09c43ef7a39c2abf68d by Victor Stinner in branch '2.7': bpo-26423: Fix test_descr.test_wrap_lenfunc_bad_cast() on 32-bit Windows (GH-13629) https://github.com/python/cpython/commit/aaed2c332ae8370e5e87d09c43ef7a39c2abf68d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:18:28 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 28 May 2019 16:18:28 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c In-Reply-To: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> Message-ID: <1559060308.3.0.874888008125.issue37081@roundup.psfhosted.org> Christian Heimes added the comment: Ah, thanks! I forgot about that bug. The test suite is aready failing with OpenSSL 1.1.1b. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:20:14 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 28 May 2019 16:20:14 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c In-Reply-To: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> Message-ID: <1559060414.48.0.0461363403254.issue37081@roundup.psfhosted.org> Charalampos Stratakis added the comment: Also those failures are recorded on the Fedora buildbot, it seems to be happening randomly: https://buildbot.python.org/all/#/workers/32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:24:27 2019 From: report at bugs.python.org (Berker Peksag) Date: Tue, 28 May 2019 16:24:27 +0000 Subject: [issue36991] zipfile: AttributeError on extract In-Reply-To: <1558441602.37.0.911226270551.issue36991@roundup.psfhosted.org> Message-ID: <1559060667.22.0.807235993865.issue36991@roundup.psfhosted.org> Change by Berker Peksag : ---------- pull_requests: +13532 pull_request: https://github.com/python/cpython/pull/13632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:25:32 2019 From: report at bugs.python.org (Berker Peksag) Date: Tue, 28 May 2019 16:25:32 +0000 Subject: [issue36991] zipfile: AttributeError on extract In-Reply-To: <1558441602.37.0.911226270551.issue36991@roundup.psfhosted.org> Message-ID: <1559060732.04.0.972746637046.issue36991@roundup.psfhosted.org> Berker Peksag added the comment: The OP's report is valid and they already stated that the file is malformed. More importantly, this can be reproduced with a valid ZIP file as well. The correct behavior is to get RuntimeError in this case. _check_compression() needs to be called before _get_decompressor(). There is no issue when getting the compressor object because _check_compression() is called inside _writecheck(). ---------- components: +Library (Lib) nosy: +berker.peksag, serhiy.storchaka resolution: not a bug -> stage: resolved -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:29:08 2019 From: report at bugs.python.org (Berker Peksag) Date: Tue, 28 May 2019 16:29:08 +0000 Subject: [issue22640] Add silent mode for py_compile In-Reply-To: <1413361400.01.0.34334853586.issue22640@psf.upfronthosting.co.za> Message-ID: <1559060948.03.0.561541887043.issue22640@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 2e33ecd7c9b0cac3efc6fcbdd4547fd086b4e2d1 by Berker Peksag (Joannah Nanjekye) in branch 'master': bpo-22640: Add silent mode to py_compile.compile() (GH-12976) https://github.com/python/cpython/commit/2e33ecd7c9b0cac3efc6fcbdd4547fd086b4e2d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:29:43 2019 From: report at bugs.python.org (Berker Peksag) Date: Tue, 28 May 2019 16:29:43 +0000 Subject: [issue22640] Add silent mode for py_compile In-Reply-To: <1413361400.01.0.34334853586.issue22640@psf.upfronthosting.co.za> Message-ID: <1559060983.99.0.084357637752.issue22640@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:44:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 16:44:03 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions In-Reply-To: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> Message-ID: <1559061843.17.0.974479281167.issue37076@roundup.psfhosted.org> STINNER Victor added the comment: Output: --- Unhandled exception in thread started by <_DummyThread(Dummy-1, started daemon 140385971111680)> --- Ah right, sys.excepthook is called! But "Unhandled exception in thread started by " line is always written into stderr, it cannot be avoided :-( And sys.excepthook doesn't provide access to the thread function which caused the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 12:49:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 16:49:32 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions In-Reply-To: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> Message-ID: <1559062172.86.0.540574989238.issue37076@roundup.psfhosted.org> STINNER Victor added the comment: I updated my PR description: _thread.start_new_thread() now logs uncaught exception raised by the function using sys.unraisablehook(), rather than sys.excepthook(), so the hook gets access to the function which raised the exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 13:07:03 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 28 May 2019 17:07:03 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1558999690.49.0.835975704369.issue33725@roundup.psfhosted.org> Message-ID: Barry A. Warsaw added the comment: On May 27, 2019, at 16:28, STINNER Victor wrote: > I don't see a clear consensus to switch to spawn on *all* platforms, so I wrote PR 13603 which is the minimum fix: switch to spawn by default, but only on macOS. Fair enough. Let?s fix what we have consensus on and go from there. Thanks for working on this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 13:30:56 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 28 May 2019 17:30:56 +0000 Subject: [issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there) In-Reply-To: <1557961877.88.0.551239006015.issue36933@roundup.psfhosted.org> Message-ID: <1559064656.88.0.703648068041.issue36933@roundup.psfhosted.org> miss-islington added the comment: New changeset 382034b255935fbf0b5516708ac16a020d27af39 by Miss Islington (bot) (Matthias Bussonnier) in branch 'master': bpo-36933: fix what's new. (GH-13627) https://github.com/python/cpython/commit/382034b255935fbf0b5516708ac16a020d27af39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 13:50:25 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 28 May 2019 17:50:25 +0000 Subject: [issue36373] asyncio.gather: no docs for deprecated loop parameter In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559065825.55.0.961106743509.issue36373@roundup.psfhosted.org> Andrew Svetlov added the comment: *Passing* loop to gather should be deprecated. *Using* loop by *internal logic* is pretty fine, we do it in asyncio everywhere. Yuri, I think we should deprecate explicit loop everywhere in non-deprecated asyncio API by Python 3.8. We can do it even in Python beta I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 13:51:15 2019 From: report at bugs.python.org (David Carlier) Date: Tue, 28 May 2019 17:51:15 +0000 Subject: [issue33164] Blake 2 module update In-Reply-To: <1558585970.68.0.308420136648.issue33164@roundup.psfhosted.org> Message-ID: <1559065875.15.0.320328555089.issue33164@roundup.psfhosted.org> Change by David Carlier : ---------- pull_requests: +13533 pull_request: https://github.com/python/cpython/pull/13633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 13:52:43 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 28 May 2019 17:52:43 +0000 Subject: [issue36373] asyncio.gather: no docs for deprecated loop parameter In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559065963.57.0.609647097451.issue36373@roundup.psfhosted.org> Yury Selivanov added the comment: > Yuri, I think we should deprecate explicit loop everywhere in non-deprecated asyncio API by Python 3.8. +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 14:03:33 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 28 May 2019 18:03:33 +0000 Subject: [issue37072] PyNode_Compile() crashes in Python 3.8. In-Reply-To: <1559008374.77.0.70293248511.issue37072@roundup.psfhosted.org> Message-ID: <1559066613.82.0.724059094421.issue37072@roundup.psfhosted.org> Guido van Rossum added the comment: OK, I'll look into this. ---------- assignee: -> gvanrossum nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 14:14:42 2019 From: report at bugs.python.org (Jizhou Yang) Date: Tue, 28 May 2019 18:14:42 +0000 Subject: [issue37079] PEM cadata causes ssl.SSLError: nested asn1 error In-Reply-To: <1559054164.15.0.615290495729.issue37079@roundup.psfhosted.org> Message-ID: <1559067282.1.0.110866254876.issue37079@roundup.psfhosted.org> Jizhou Yang added the comment: Thanks a lot for the quick answer! Verified that the proposed solution works with PEM certificates in both Python 2 and 3. ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 14:17:10 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 28 May 2019 18:17:10 +0000 Subject: [issue37072] PyNode_Compile() crashes in Python 3.8. In-Reply-To: <1559008374.77.0.70293248511.issue37072@roundup.psfhosted.org> Message-ID: <1559067430.43.0.666183109131.issue37072@roundup.psfhosted.org> Change by Guido van Rossum : ---------- keywords: +patch pull_requests: +13534 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 14:26:23 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 28 May 2019 18:26:23 +0000 Subject: [issue37082] Assignment expression operator (walrus) not in built-in help() Message-ID: <1559067983.32.0.880606504508.issue37082@roundup.psfhosted.org> New submission from Matthias Bussonnier : Do the following at a Python prompt: ``` >>> help() Welcome to Python 3.8's help utility! [...]SNIP help> symbols Here is a list of the punctuation symbols which Python assigns special meaning to. Enter any symbol to get more help. != + <= __ " += <> ` """ , == b" % - > b' %= -= >= f" & . >> f' &= ... >>= j ' / @ r" ''' // J r' ( //= [ u" ) /= \ u' * : ] | ** < ^ |= **= << ^= ~ *= <<= _ ``` Oh no ! Our favorite `:=` is missing :-( ---------- assignee: docs at python components: Documentation messages: 343813 nosy: docs at python, mbussonn priority: normal severity: normal status: open title: Assignment expression operator (walrus) not in built-in help() versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 14:46:27 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 28 May 2019 18:46:27 +0000 Subject: [issue37082] Assignment expression operator (walrus) not in built-in help() In-Reply-To: <1559067983.32.0.880606504508.issue37082@roundup.psfhosted.org> Message-ID: <1559069187.77.0.42284242356.issue37082@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +emilyemorehouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 15:49:45 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 May 2019 19:49:45 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1559072985.29.0.00156895063457.issue31961@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 9e3c4526394856d6376eed4968d27d53e1d69b7d by Serhiy Storchaka in branch 'master': bpo-31961: Fix support of path-like executables in subprocess. (GH-5914) https://github.com/python/cpython/commit/9e3c4526394856d6376eed4968d27d53e1d69b7d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 16:05:12 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 May 2019 20:05:12 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions In-Reply-To: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> Message-ID: <1559073912.41.0.132007082845.issue37076@roundup.psfhosted.org> Serhiy Storchaka added the comment: > If threading.Thread.run() is correctly written, it should not raise an exception. Since the error handling for threading.Thread.run() is written on Python there are many opportunities to get an exception in error handling: KeyboardInterrupt, MemoryError and, at the shutdown stage, maybe NameError, AttributeError or TypeError. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 16:10:11 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 28 May 2019 20:10:11 +0000 Subject: [issue35040] [functools] provide an async-compatible version of functools.lru_cache In-Reply-To: <1540172391.19.0.788709270274.issue35040@psf.upfronthosting.co.za> Message-ID: <1559074211.26.0.338646168996.issue35040@roundup.psfhosted.org> Brett Cannon added the comment: I was just saying that this is an enhancement request, no judgment about whether we want to solve the enhancement request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 16:32:36 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 28 May 2019 20:32:36 +0000 Subject: [issue21156] Consider moving importlib.abc.InspectLoader.source_to_code() to importlib.abc.Loader In-Reply-To: <1396634360.22.0.98257221553.issue21156@psf.upfronthosting.co.za> Message-ID: <1559075556.78.0.376091857539.issue21156@roundup.psfhosted.org> Brett Cannon added the comment: @Carl Feel free to open new issues for whatever you need. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 16:44:49 2019 From: report at bugs.python.org (Liran Nuna) Date: Tue, 28 May 2019 20:44:49 +0000 Subject: [issue35040] [functools] provide an async-compatible version of functools.lru_cache In-Reply-To: <1540172391.19.0.788709270274.issue35040@psf.upfronthosting.co.za> Message-ID: <1559076289.38.0.717847005603.issue35040@roundup.psfhosted.org> Liran Nuna added the comment: > A coroutine detection is a relatively slow check. > I don't think we need to do it in `functools.lru_cache`. Wouldn't a coroutine check only happen during decoration time? To successfully solve this easily and efficiently, we only really need to wrap the coroutine with `asyncio.ensure_future` if the decorated function is a coroutine, and it will only happen when a result comes back from the decorated function which would have minimal impact. Of course, I don't know much about the internals of `lru_cache` so my assumptions could be wrong. I should familiar myself with the implementation and figure out how doable it would be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 17:18:28 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 28 May 2019 21:18:28 +0000 Subject: [issue36935] bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function In-Reply-To: <1557983600.93.0.891686339403.issue36935@roundup.psfhosted.org> Message-ID: <1559078308.44.0.767218016004.issue36935@roundup.psfhosted.org> Zackery Spytz added the comment: The PR for bpo-33407 has been merged, so two warnings are now emitted in Modules/_winapi.c. I think it would be best to replace the two calls with PyErr_SetFromWindowsErr(0) (for now). Eryk, I think a discussion on python-dev would be necessary for something like PyErr_SetExcFromWindowsErrWithWideCharFilename(). ---------- nosy: +serhiy.storchaka, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 17:37:48 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 28 May 2019 21:37:48 +0000 Subject: [issue37083] Document TYPE_COMMENT in documentation reference for compound statements Message-ID: <1559079468.64.0.0790187408059.issue37083@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : The last changes in the grammar regarding TYPE_COMMENTS should be added to this section: https://docs.python.org/3/reference/compound_stmts.html#function-definitions ---------- assignee: docs at python components: Documentation messages: 343820 nosy: docs at python, gvanrossum, levkivskyi, pablogsal priority: normal severity: normal stage: needs patch status: open title: Document TYPE_COMMENT in documentation reference for compound statements type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 17:39:30 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 28 May 2019 21:39:30 +0000 Subject: [issue37083] Document TYPE_COMMENT in documentation reference for compound statements In-Reply-To: <1559079468.64.0.0790187408059.issue37083@roundup.psfhosted.org> Message-ID: <1559079570.84.0.893225658104.issue37083@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I will make a PR after https://github.com/python/cpython/pull/13202 is merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 17:53:56 2019 From: report at bugs.python.org (Brian Spratke) Date: Tue, 28 May 2019 21:53:56 +0000 Subject: [issue37084] _ctypes not failing, can't find reason Message-ID: <1559080436.17.0.198846412068.issue37084@roundup.psfhosted.org> New submission from Brian Spratke : I am trying to cross compile Python 3.7 for Android. I have Python building, but I keep getting an error that _ctypes failed to build, but I see nothing that jumps out as a reason. _ctypes_test builds, before that I see this INFO message INFO: Can't locate Tcl/Tk libs and/or headers grpmodule and crypt module have issues as well, but I do not feel that those are related. Are there any other ideas people can throw out? ---------- components: Cross-Build files: Python3.7Output.zip messages: 343822 nosy: Alex.Willmer, Brian Spratke priority: normal severity: normal status: open title: _ctypes not failing, can't find reason versions: Python 3.7 Added file: https://bugs.python.org/file48375/Python3.7Output.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 18:14:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 22:14:44 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions In-Reply-To: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> Message-ID: <1559081684.67.0.507685679311.issue37076@roundup.psfhosted.org> STINNER Victor added the comment: > Since the error handling for threading.Thread.run() is written on Python there are many opportunities to get an exception in error handling: KeyboardInterrupt, MemoryError and, at the shutdown stage, maybe NameError, AttributeError or TypeError. Sure, the risk is real, but I tried to minimize it. NameError and AttributeError "should" not happen: I wrote _make_invoke_excepthook() to prevent name errors. Functions used to invoke threading.excepthook are "cached" in a private namespace. Moreover, the default hook is implemented in C also to reduce the risk of raising a new exception. Anyway, if threading.excepthook() raises a second exception, sys.excepthook() is now called to handle it ;-) That's a Python 3.8 change. In Python 3.7 and older, new exception was handled by start_new_thread(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 18:28:53 2019 From: report at bugs.python.org (Pavel Koneski) Date: Tue, 28 May 2019 22:28:53 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1559082533.2.0.229468669694.issue36919@roundup.psfhosted.org> Change by Pavel Koneski : ---------- keywords: +patch pull_requests: +13535 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13639 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 18:58:33 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 28 May 2019 22:58:33 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559084313.48.0.350396697874.issue36839@roundup.psfhosted.org> Dino Viehland added the comment: The PR actually checks that the buffer is read-only (this was also a concern that Mark Shannon had). And the Python buffer protocol says that you need to consistently hand out read-only buffers. So while someone could create a buffer and mutate it outside of the buffer protocol it should be really read-only. As far as the ref counts, it's not just the ref counts for the code byte strings that are potentially problematic. But it's the ref counts on all of the random other objects which the code objects are on the same page as, as well as other random read-write data that could be on those pages. There's also an additional benefit in that code objects not loaded before forking can continue to share their memory as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:15:22 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 28 May 2019 23:15:22 +0000 Subject: [issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator In-Reply-To: <1406670130.27.0.606950005482.issue22102@psf.upfronthosting.co.za> Message-ID: <1559085322.94.0.22467474006.issue22102@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset ab0716ed1ea2957396054730afbb80c1825f9786 by Cheryl Sabella (Francisco Facioni) in branch 'master': bpo-22102: Fixes zip files with disks set to 0 (GH-5985) https://github.com/python/cpython/commit/ab0716ed1ea2957396054730afbb80c1825f9786 ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:15:34 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 28 May 2019 23:15:34 +0000 Subject: [issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator In-Reply-To: <1406670130.27.0.606950005482.issue22102@psf.upfronthosting.co.za> Message-ID: <1559085334.71.0.98573533294.issue22102@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13536 pull_request: https://github.com/python/cpython/pull/13641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:18:24 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 28 May 2019 23:18:24 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559085504.52.0.432355809003.issue33725@roundup.psfhosted.org> Gregory P. Smith added the comment: There is a multiprocessing spawn method on Python 2.7. And we should never do such a crazy huge feature backport. IMNSHO - We should not change the default in 3.7 either. That is a notable behavior change. That decision is entirely up to Ned (RM). If people are using an OS that changes behavior out from underneath their application between minor OS version upgrades, they should take that up with the OS vendor. We cannot workaround this fundamental problem. Applications and libraries will still need to support a slew of Python versions and OS versions, so they're all going to need to be modified to explicitly request the "spawn" method from multiprocessing on macOS anyways. So there seems little point in changing the default within a patch release 3.7.4. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:19:15 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 28 May 2019 23:19:15 +0000 Subject: [issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator In-Reply-To: <1406670130.27.0.606950005482.issue22102@psf.upfronthosting.co.za> Message-ID: <1559085555.25.0.806669731605.issue22102@roundup.psfhosted.org> Cheryl Sabella added the comment: @Guillaume.Carre, thank you for the report and @fran6co, thank you for the contribution. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:20:08 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 28 May 2019 23:20:08 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559085608.21.0.901722817883.issue33725@roundup.psfhosted.org> Gregory P. Smith added the comment: FWIW I am in favor of "spawn" being the default on _all_ platforms in 3.8. The safest option being the default just seems like the right thing to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:21:21 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 28 May 2019 23:21:21 +0000 Subject: [issue37001] symtable.symtable doesn't accept bytes which leads to a mismatch from compile() In-Reply-To: <1558472495.26.0.119384648617.issue37001@roundup.psfhosted.org> Message-ID: <1559085681.88.0.0724278955126.issue37001@roundup.psfhosted.org> Dino Viehland added the comment: New changeset 415406999d7c09af9f3dcacfb4578b9e97b2ce77 by Dino Viehland in branch 'master': bpo-37001: Makes symtable.symtable have parity with compile for input (#13483) https://github.com/python/cpython/commit/415406999d7c09af9f3dcacfb4578b9e97b2ce77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:22:09 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 28 May 2019 23:22:09 +0000 Subject: [issue37001] symtable.symtable doesn't accept bytes which leads to a mismatch from compile() In-Reply-To: <1558472495.26.0.119384648617.issue37001@roundup.psfhosted.org> Message-ID: <1559085729.36.0.298538154925.issue37001@roundup.psfhosted.org> Change by Dino Viehland : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:26:25 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 28 May 2019 23:26:25 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559085985.77.0.773476047952.issue33725@roundup.psfhosted.org> Ned Deily added the comment: GPS beat me to it: this definitely should not be backported to either 3.7 or 2.7 since it is a major user behavior change. ---------- versions: -Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:33:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 May 2019 23:33:28 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559086408.99.0.0808577792123.issue33725@roundup.psfhosted.org> STINNER Victor added the comment: Ned Deily: > GPS beat me to it: this definitely should not be backported to either 3.7 or 2.7 since it is a major user behavior change. Hum ok, but test_multiprocessing_fork is now always skipped on macOS in Python 3.7. Can we at least document that the default start method (fork) is now unsafe on macOS? Maybe also explain how to change the default start method on macOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:33:24 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 28 May 2019 23:33:24 +0000 Subject: [issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator In-Reply-To: <1406670130.27.0.606950005482.issue22102@psf.upfronthosting.co.za> Message-ID: <1559086404.0.0.700506498831.issue22102@roundup.psfhosted.org> miss-islington added the comment: New changeset 0eb69990c85b6c82c677d5a43e3df28836ae845e by Miss Islington (bot) in branch '3.7': bpo-22102: Fixes zip files with disks set to 0 (GH-5985) https://github.com/python/cpython/commit/0eb69990c85b6c82c677d5a43e3df28836ae845e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:37:17 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 28 May 2019 23:37:17 +0000 Subject: [issue29731] Ability to filter warnings to print current stack In-Reply-To: <1488779988.78.0.195524634738.issue29731@psf.upfronthosting.co.za> Message-ID: <1559086637.3.0.392208056585.issue29731@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +christian.heimes, pitrou, vstinner versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:43:35 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 28 May 2019 23:43:35 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559087015.93.0.999902713837.issue33725@roundup.psfhosted.org> Ned Deily added the comment: > Can we at least document that the default start method (fork) is now unsafe on macOS? Thanks, I was just going to add that I would accept a doc change for 3.7. But the wording should be a little clearer that fork has *always* been unsafe on macOS, i.e. this is not a new issue for 3.7 which is one of the reasons it should not be backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:45:01 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 28 May 2019 23:45:01 +0000 Subject: [issue37072] PyNode_Compile() crashes in Python 3.8. In-Reply-To: <1559008374.77.0.70293248511.issue37072@roundup.psfhosted.org> Message-ID: <1559087101.22.0.57623914353.issue37072@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 77f0ed7a42606d03ebfe48ab152caf0d796d6540 by Guido van Rossum in branch 'master': bpo-37072: Fix crash in PyAST_FromNodeObject() when flags is NULL (#13634) https://github.com/python/cpython/commit/77f0ed7a42606d03ebfe48ab152caf0d796d6540 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:45:35 2019 From: report at bugs.python.org (Carol Willing) Date: Tue, 28 May 2019 23:45:35 +0000 Subject: [issue36540] PEP 570: Python Positional-Only Parameters In-Reply-To: <1554512763.87.0.931597726758.issue36540@roundup.psfhosted.org> Message-ID: <1559087135.17.0.188871434555.issue36540@roundup.psfhosted.org> Carol Willing added the comment: New changeset b76302ddd0896cb39ce69909349b53db6e7776e2 by Carol Willing (Pablo Galindo) in branch 'master': bpo-36540: Documentation for PEP570 - Python positional only arguments (#13202) https://github.com/python/cpython/commit/b76302ddd0896cb39ce69909349b53db6e7776e2 ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:45:50 2019 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 28 May 2019 23:45:50 +0000 Subject: [issue37072] PyNode_Compile() crashes in Python 3.8. In-Reply-To: <1559008374.77.0.70293248511.issue37072@roundup.psfhosted.org> Message-ID: <1559087150.76.0.868719773295.issue37072@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:47:37 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 28 May 2019 23:47:37 +0000 Subject: [issue36373] asyncio.gather: no docs for deprecated loop parameter In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559087257.11.0.2648400219.issue36373@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:49:45 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 28 May 2019 23:49:45 +0000 Subject: [issue36540] PEP 570: Python Positional-Only Parameters In-Reply-To: <1554512763.87.0.931597726758.issue36540@roundup.psfhosted.org> Message-ID: <1559087385.32.0.469363614334.issue36540@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Closing this. Will reopen if we realize we missed something. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:50:46 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 28 May 2019 23:50:46 +0000 Subject: [issue37082] Assignment expression operator (walrus) not in built-in help() In-Reply-To: <1559067983.32.0.880606504508.issue37082@roundup.psfhosted.org> Message-ID: <1559087446.08.0.700069313579.issue37082@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 19:58:32 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 28 May 2019 23:58:32 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559087912.88.0.351316889682.issue36839@roundup.psfhosted.org> Inada Naoki added the comment: read-only is slightly different than const / immutable. const / immutable means anyone can not modify the memory. read-only means only the memory should not be modified through the buffer. But underlaying memory block can be modified by owner who creates buffer. For example, you can create read only buffer from bytearray, or even raw C char array. It doesn't violate semantics of read-only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 20:06:50 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 29 May 2019 00:06:50 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1559087015.93.0.999902713837.issue33725@roundup.psfhosted.org> Message-ID: <2E6BD551-7D54-4358-981C-7FAA5C6BFE94@python.org> Barry A. Warsaw added the comment: On May 28, 2019, at 16:43, Ned Deily wrote: > Thanks, I was just going to add that I would accept a doc change for 3.7. But the wording should be a little clearer that fork has *always* been unsafe on macOS, i.e. this is not a new issue for 3.7 which is one of the reasons it should not be backported. To be clear, what is unsafe on macOS (as of 10.13, but even more so on 10.14) is calling into the Objective-C runtime between fork and exec. The problem for Python is that it?s way too easy to do that implicitly, thus causing the macOS to abort the subprocess in surprising ways. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 20:07:27 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 29 May 2019 00:07:27 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1559088447.31.0.548314946112.issue19184@roundup.psfhosted.org> Cheryl Sabella added the comment: The original PR appears to have been abandoned, so this issue available for someone to submit a new PR. ---------- nosy: +cheryl.sabella versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 20:16:03 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 29 May 2019 00:16:03 +0000 Subject: [issue35453] pathlib.Path: glob and rglob should accept PathLike patterns In-Reply-To: <1544439282.17.0.788709270274.issue35453@psf.upfronthosting.co.za> Message-ID: <1559088963.84.0.121041171726.issue35453@roundup.psfhosted.org> Joannah Nanjekye added the comment: Since this is not considered an issue, I will just add tests to confirm this behavior and close this. ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 20:17:40 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 29 May 2019 00:17:40 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559089060.54.0.0927659443925.issue33725@roundup.psfhosted.org> Gregory P. Smith added the comment: Documentation of the issue for sure! A RuntimeWarning is a maybe if it can be made conditional on the OS version (10.13 and higher?)... when the "fork" method would be used. BUT be very cautious about warnings as they tend to crop up in front of users rather than developers when it isn't their fault. So if there is any flaw in the logic of when to show it in a situation where the application isn't about to crash or lockup, it'll show up when it shouldn't and cause somebody some grief to deal with via new code to ignore that warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 20:18:03 2019 From: report at bugs.python.org (Vladimir Chebotarev) Date: Wed, 29 May 2019 00:18:03 +0000 Subject: [issue29326] Blank lines in ._pth file are not ignored In-Reply-To: <1484844872.11.0.819349056222.issue29326@psf.upfronthosting.co.za> Message-ID: <1559089083.16.0.112469106414.issue29326@roundup.psfhosted.org> Change by Vladimir Chebotarev : ---------- pull_requests: +13537 pull_request: https://github.com/python/cpython/pull/7243 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 20:21:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 29 May 2019 00:21:33 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559089293.33.0.822605654905.issue33725@roundup.psfhosted.org> STINNER Victor added the comment: > To be clear, what is unsafe on macOS (as of 10.13, but even more so on 10.14) is calling into the Objective-C runtime between fork and exec. The problem for Python is that it?s way too easy to do that implicitly, thus causing the macOS to abort the subprocess in surprising ways. Do only a few Python module use the Objective-C runtime? Or is it basically "everything"? If it's just a few, would it be possible to emit a warning or even an exception if called in a child process after fork? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 20:38:11 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 00:38:11 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559090291.0.0.812534160773.issue33725@roundup.psfhosted.org> Ned Deily added the comment: > To be clear, what is unsafe on macOS (as of 10.13, but even more so on 10.14) is calling into the Objective-C runtime between fork and exec. No, it has *always* been unsafe. What's new as of 10.13/14 is that macOS tries much harder at runtime to detect such cases and more predictably cause an error rather than letter than let the process run on and possibly fail nondeterministically. > Do only a few Python module use the Objective-C runtime? Or is it basically "everything"? I don't think we should try to second-guess this. We now recognize that using fork like this on macOS has always been dangerous. For some programs it will be fine, for others it won't. People have had many macOS and Python releases to deal with this; if it works for their application, we shouldn't be changing the default for them. But let's make it easier for new users to do the right thing - first by documenting the pitfall, than, in 3.8, changing the default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 20:39:36 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 00:39:36 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559090376.68.0.291937692632.issue33725@roundup.psfhosted.org> Ned Deily added the comment: > To be clear, what is unsafe on macOS (as of 10.13, but even more so on 10.14) is calling into the Objective-C runtime between fork and exec. No, it has *always* been unsafe. What's new as of 10.13/14 is that macOS tries much harder at runtime to detect such cases and more predictably cause an error rather than let the process run on and possibly fail nondeterministically. > Do only a few Python module use the Objective-C runtime? Or is it basically "everything"? I don't think we should try to second-guess this. We now recognize that using fork like this on macOS has always been dangerous. For some programs it will be fine, for others it won't. People have had many macOS and Python releases to deal with this; if it works for their application, we shouldn't be changing the default for them. But let's make it easier for new users to do the right thing - first by documenting the pitfall, then, in 3.8, changing the default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 20:39:45 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 00:39:45 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1559090385.27.0.310453961683.issue33725@roundup.psfhosted.org> Change by Ned Deily : ---------- Removed message: https://bugs.python.org/msg343843 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 20:58:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 29 May 2019 00:58:01 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions In-Reply-To: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> Message-ID: <1559091481.26.0.605884261867.issue37076@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8b09500345d998f3ff1e363a5210bc87f42ff306 by Victor Stinner in branch 'master': bpo-37076: _thread.start_new_thread() calls _PyErr_WriteUnraisableMsg() (GH-13617) https://github.com/python/cpython/commit/8b09500345d998f3ff1e363a5210bc87f42ff306 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 21:03:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 29 May 2019 01:03:33 +0000 Subject: [issue37076] _thread.start_new_thread(): call sys.unraisablehook() to handle uncaught exceptions In-Reply-To: <1559038510.38.0.6664392813.issue37076@roundup.psfhosted.org> Message-ID: <1559091813.87.0.648368615955.issue37076@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Serhiy for the review! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 21:17:01 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 29 May 2019 01:17:01 +0000 Subject: [issue36935] bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function In-Reply-To: <1557983600.93.0.891686339403.issue36935@roundup.psfhosted.org> Message-ID: <1559092621.05.0.324244503824.issue36935@roundup.psfhosted.org> Eryk Sun added the comment: > I think it would be best to replace the two calls with > PyErr_SetFromWindowsErr(0) (for now). For now it can at least be implemented inline. For example: if (handle == NULL) { PyObject *temp = name ? PyUnicode_FromWideChar(name, -1) : NULL; PyErr_SetExcFromWindowsErrWithFilenameObjects(PyExc_OSError, 0, temp, NULL); Py_XDECREF(temp); handle = INVALID_HANDLE_VALUE; } I think undeprecating the two PyErr_ functions with a modified signature in 3.8 is okay since they were never in the documented API, never in the stable (limited) API, and Py_UNICODE has been a typedef for wchar_t since 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 21:17:06 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 29 May 2019 01:17:06 +0000 Subject: [issue34818] test.test_ssl.ThreadedTests.test_tls1_3 fails in 2.7 with AttributeError: __exit__ In-Reply-To: <1538039231.16.0.545547206417.issue34818@psf.upfronthosting.co.za> Message-ID: <1559092626.07.0.070793371394.issue34818@roundup.psfhosted.org> Cheryl Sabella added the comment: Thank you for the report and the pull request. This was fixed as part of issue28043, so I'm closing this as a duplicate. ---------- nosy: +cheryl.sabella resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Sane defaults for SSLContext options and ciphers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 21:36:18 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 01:36:18 +0000 Subject: [issue33006] docstring of filter function is incorrect In-Reply-To: <1520300191.48.0.467229070634.issue33006@psf.upfronthosting.co.za> Message-ID: <1559093778.63.0.281474481022.issue33006@roundup.psfhosted.org> miss-islington added the comment: New changeset 09ba83330b495afedbb6b27853506fe15a85b461 by Miss Islington (bot) (Tony Flury) in branch '2.7': [2.7] bpo-33006 - Correct filter doc string to clarify 2nd argument can be iterable (GH-6015) https://github.com/python/cpython/commit/09ba83330b495afedbb6b27853506fe15a85b461 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 21:37:04 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 01:37:04 +0000 Subject: [issue37081] Test with OpenSSL 1.1.1c In-Reply-To: <1559058292.64.0.780398663722.issue37081@roundup.psfhosted.org> Message-ID: <1559093824.5.0.23539874652.issue37081@roundup.psfhosted.org> Ned Deily added the comment: Should we update the Windows and Mac installers to 1.1.1c now? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 21:55:27 2019 From: report at bugs.python.org (Dino Viehland) Date: Wed, 29 May 2019 01:55:27 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559094927.91.0.556706781636.issue36839@roundup.psfhosted.org> Dino Viehland added the comment: Sure, but immutable/const is almost always a language level guarantee. The only case where that's not true is when you have OS/hardware level memory protection and that doesn't apply to any of Python's existing byte codes. So from a Python perspective, code objects are remaining immutable - they can only be created by objects which expose the read-only buffer protocol. So for example passing in a memoryview(b'abc') will work here while a memoryview(bytearray(b'abc')) will fail. And because when asking for a non read-write view the buffer implementer needs to be consistent for all callers (https://docs.python.org/3/c-api/buffer.html#c.PyBUF_WRITABLE) it seems that this invariant should hold for all objects being passed in. Could someone create a buffer object which still allows the underlying memory to be written? Sure. But I can use ctypes to modify byte code today as well with something like "ctypes.cast(id(f.__code__.co_code) + 32, ctypes.POINTER(ctypes.c_char)) [0] = 101" So people will still be able to do nasty things, but there are certainly guards in place to strongly discourage them from doing so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 22:00:25 2019 From: report at bugs.python.org (Abhilash Raj) Date: Wed, 29 May 2019 02:00:25 +0000 Subject: [issue34025] SMTP EmailPolicy not using the correct line length for RCF 2045 encoded data (is 78, should be 76) In-Reply-To: <1530548294.1.0.56676864532.issue34025@psf.upfronthosting.co.za> Message-ID: <1559095225.84.0.243373652866.issue34025@roundup.psfhosted.org> Change by Abhilash Raj : ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 22:04:01 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 02:04:01 +0000 Subject: [issue33006] docstring of filter function is incorrect In-Reply-To: <1520300191.48.0.467229070634.issue33006@psf.upfronthosting.co.za> Message-ID: <1559095441.84.0.777087315321.issue33006@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the docstring improvement! It looks like the Library Reference entry for filter has similar wording in 3.x and 2.7 with regard to "items are removed". If soneone feels strongly that that is not precise enough, suggest supplying a separate doc PR. ---------- nosy: +ned.deily resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 22:05:01 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 02:05:01 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1559095501.84.0.254913673463.issue32947@roundup.psfhosted.org> Ned Deily added the comment: New changeset 3dbc43f63c7e056b80d6e28f3812125a09555456 by Ned Deily (Victor Stinner) in branch '3.6': bpo-32947: test_ssl fixes for TLS 1.3 and OpenSSL 1.1.1 (GH-11612) https://github.com/python/cpython/commit/3dbc43f63c7e056b80d6e28f3812125a09555456 ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 22:06:57 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 02:06:57 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1559095617.45.0.447943359311.issue32947@roundup.psfhosted.org> Ned Deily added the comment: I don't have a strong opinion about backporting to 3.6. With OpenSSL 1.0.2 official support ending at the end of 2019 and 3.6.z retired towards the ned of 2021, there would be a 2-year window where 3.6 is still in security-fix-only status. But, if we don't do the backport now, we could always choose to backport it later if the need arises. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 22:08:31 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 02:08:31 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1559095711.74.0.860328215535.issue35925@roundup.psfhosted.org> Ned Deily added the comment: New changeset 8ab624b17ba656e9af5a79be6af0cf2911a111ba by Ned Deily (Gregory P. Smith) in branch '3.6': [3.6] bpo-35925: Skip SSL tests that fail due to weak external certs or old TLS (GH-13124) (GH-13252) https://github.com/python/cpython/commit/8ab624b17ba656e9af5a79be6af0cf2911a111ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 22:12:18 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 02:12:18 +0000 Subject: [issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a) In-Reply-To: <1549503926.32.0.191493141556.issue35925@roundup.psfhosted.org> Message-ID: <1559095938.55.0.978516111538.issue35925@roundup.psfhosted.org> Change by Ned Deily : ---------- assignee: ned.deily -> resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 22:19:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 29 May 2019 02:19:59 +0000 Subject: [issue32128] test_nntplib: test_article_head_body() fails in SSL mode In-Reply-To: <1511573022.36.0.213398074469.issue32128@psf.upfronthosting.co.za> Message-ID: <1559096399.47.0.233329865753.issue32128@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +13538 pull_request: https://github.com/python/cpython/pull/11612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 22:30:52 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 02:30:52 +0000 Subject: [issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib In-Reply-To: <1549441191.29.0.148559977828.issue35907@roundup.psfhosted.org> Message-ID: <1559097052.94.0.0536481881293.issue35907@roundup.psfhosted.org> Ned Deily added the comment: New changeset 4f06dae5d8d4400ba38d8502da620f07d4a5696e by Ned Deily (Victor Stinner) in branch '3.6': bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-13513) https://github.com/python/cpython/commit/4f06dae5d8d4400ba38d8502da620f07d4a5696e ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 22:38:41 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 02:38:41 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1559097521.95.0.027478494572.issue26903@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13539 pull_request: https://github.com/python/cpython/pull/13643 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 23:11:39 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 03:11:39 +0000 Subject: [issue37067] os.execl doesn't allow for empty string in mac In-Reply-To: <1558973327.05.0.558912294588.issue37067@roundup.psfhosted.org> Message-ID: <1559099499.83.0.959636545835.issue37067@roundup.psfhosted.org> Ned Deily added the comment: The behavior was changed in Python 3.6 for all platforms to catch this error; see Issue28732. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 23:12:47 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 03:12:47 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1559099567.91.0.825887431853.issue26903@roundup.psfhosted.org> Ned Deily added the comment: New changeset 8ea0fd85bc67438f679491fae29dfe0a3961900a by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-26903: Limit ProcessPoolExecutor to 61 workers on Windows (GH-13132) (GH-13643) https://github.com/python/cpython/commit/8ea0fd85bc67438f679491fae29dfe0a3961900a ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 23:13:32 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 03:13:32 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1559099612.53.0.674318782264.issue26903@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: -Python 3.5, Python 3.6, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 23:15:14 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 29 May 2019 03:15:14 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559099714.39.0.790387848404.issue36839@roundup.psfhosted.org> Inada Naoki added the comment: > Could someone create a buffer object which still allows the underlying memory to be written? Sure. But I can use ctypes to modify byte code today as well with something like "ctypes.cast(id(f.__code__.co_code) + 32, ctypes.POINTER(ctypes.c_char)) [0] = 101" You are comparing apple and orange. Breanking memory inside immutable object by ctypes is far different from mutating mutable memory. It introduce more weakness and complexity into code object. At least, you need to demonstrate the benefit. When importing module, there are many objects are created. Why avoiding decref only for co_code make much difference? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 23:23:41 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Wed, 29 May 2019 03:23:41 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1559100221.87.0.707229292054.issue36889@roundup.psfhosted.org> Kubilay Kocak added the comment: Seeing a test_ayncio failure on koobs-freebsd-current: Timeout (0:25:00)! Thread 0x0000000800abb000 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/selectors.py", line 558 in select File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 1813 in _run_once File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 563 in run_forever File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/base_events.py", line 595 in run_until_complete File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_asyncio/test_streams.py", line 1531 in test_stream_server_abort Some errors (warnings?) later in the re-run (which passes), may be related/indicative: Future exception was never retrieved future: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/subprocess.py", line 173, in _feed_stdin await self.stdin.drain() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/streams.py", line 1415, in drain await self._protocol._drain_helper() File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncio/streams.py", line 594, in _drain_helper await waiter BrokenPipeError Full log attached ---------- nosy: +koobs resolution: fixed -> status: closed -> open Added file: https://bugs.python.org/file48376/koobs-freebsd-current-3.x-build-168.stdio.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 23:38:09 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 03:38:09 +0000 Subject: [issue36739] "4.6. Defining Functions" should mention nonlocal In-Reply-To: <1556339049.57.0.959218106285.issue36739@roundup.psfhosted.org> Message-ID: <1559101089.5.0.915272840714.issue36739@roundup.psfhosted.org> miss-islington added the comment: New changeset e1f95e77e0647aff602e0660ba3c282b71045875 by Miss Islington (bot) (pbhd) in branch 'master': bpo-36739: Update controlflow.rst (GH-12983) https://github.com/python/cpython/commit/e1f95e77e0647aff602e0660ba3c282b71045875 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 23:40:23 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 03:40:23 +0000 Subject: [issue36739] "4.6. Defining Functions" should mention nonlocal In-Reply-To: <1556339049.57.0.959218106285.issue36739@roundup.psfhosted.org> Message-ID: <1559101223.64.0.253823296927.issue36739@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13540 pull_request: https://github.com/python/cpython/pull/13644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 23:41:04 2019 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 29 May 2019 03:41:04 +0000 Subject: [issue36739] "4.6. Defining Functions" should mention nonlocal In-Reply-To: <1556339049.57.0.959218106285.issue36739@roundup.psfhosted.org> Message-ID: <1559101264.46.0.312924573796.issue36739@roundup.psfhosted.org> Mariatta Wijaya added the comment: Thanks! ---------- nosy: +Mariatta resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 28 23:48:16 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 03:48:16 +0000 Subject: [issue36739] "4.6. Defining Functions" should mention nonlocal In-Reply-To: <1556339049.57.0.959218106285.issue36739@roundup.psfhosted.org> Message-ID: <1559101696.93.0.11300241681.issue36739@roundup.psfhosted.org> miss-islington added the comment: New changeset cee95fe1825dfeb52d7074c8209b5884a079f06c by Miss Islington (bot) in branch '3.7': bpo-36739: Update controlflow.rst (GH-12983) https://github.com/python/cpython/commit/cee95fe1825dfeb52d7074c8209b5884a079f06c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 02:51:05 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 06:51:05 +0000 Subject: [issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does In-Reply-To: <1542203449.76.0.788709270274.issue35246@psf.upfronthosting.co.za> Message-ID: <1559112665.83.0.976518475875.issue35246@roundup.psfhosted.org> miss-islington added the comment: New changeset 744c08a9c75a1a53b7a6521fcee3e7c513919ff9 by Miss Islington (bot) (??) in branch 'master': bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628) https://github.com/python/cpython/commit/744c08a9c75a1a53b7a6521fcee3e7c513919ff9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 02:51:26 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 06:51:26 +0000 Subject: [issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does In-Reply-To: <1542203449.76.0.788709270274.issue35246@psf.upfronthosting.co.za> Message-ID: <1559112686.49.0.0479990148602.issue35246@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 02:53:00 2019 From: report at bugs.python.org (Karl Ding) Date: Wed, 29 May 2019 06:53:00 +0000 Subject: [issue37085] Expose additional socket constants for CAN_BCM flags Message-ID: <1559112780.91.0.584487288185.issue37085@roundup.psfhosted.org> New submission from Karl Ding : When reading through the values exposed via the socket library, I noticed that currently, only the SocketCAN BCM opcode enums are exposed via the socket constants. These correspond to the following from the Linux headers: enum { TX_SETUP = 1, /* create (cyclic) transmission task */ TX_DELETE, /* remove (cyclic) transmission task */ TX_READ, /* read properties of (cyclic) transmission task */ TX_SEND, /* send one CAN frame */ RX_SETUP, /* create RX content filter subscription */ RX_DELETE, /* remove RX content filter subscription */ RX_READ, /* read properties of RX content filter subscription */ TX_STATUS, /* reply to TX_READ request */ TX_EXPIRED, /* notification on performed transmissions (count=0) */ RX_STATUS, /* reply to RX_READ request */ RX_TIMEOUT, /* cyclic message is absent */ RX_CHANGED /* updated CAN frame (detected content change) */ }; It would be nice to expose the BCM flags #defines as well. #define SETTIMER 0x0001 #define STARTTIMER 0x0002 #define TX_COUNTEVT 0x0004 #define TX_ANNOUNCE 0x0008 #define TX_CP_CAN_ID 0x0010 #define RX_FILTER_ID 0x0020 #define RX_CHECK_DLC 0x0040 #define RX_NO_AUTOTIMER 0x0080 #define RX_ANNOUNCE_RESUME 0x0100 #define TX_RESET_MULTI_IDX 0x0200 #define RX_RTR_FRAME 0x0400 #define CAN_FD_FRAME 0x0800 These BCM flags are used as part of the BCM header that has the aforementioned opcodes. The flags are set on the bcm_msg_head struct: struct bcm_msg_head { __u32 opcode; __u32 flags; __u32 count; struct bcm_timeval ival1, ival2; canid_t can_id; __u32 nframes; struct can_frame frames[0]; }; The existing documentation for the BCM constants (https://docs.python.org/3/library/socket.html#socket.CAN_BCM) seems to imply that these constants should already be included, but they are not. See the Linux headers for more details: https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/can/bcm.h ---------- components: Library (Lib) messages: 343865 nosy: karlding priority: normal severity: normal status: open title: Expose additional socket constants for CAN_BCM flags type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 02:57:38 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 06:57:38 +0000 Subject: [issue34793] Remove support for "with (await asyncio.lock):" In-Reply-To: <1537815811.02.0.545547206417.issue34793@psf.upfronthosting.co.za> Message-ID: <1559113058.94.0.85759615204.issue34793@roundup.psfhosted.org> Andrew Svetlov added the comment: Let's postpone to 3.9 I recall at least reports for aioredis, aiomysql and aiokafka for these deprecation warnings. Sure, fix is trivial (and will be applied to next release of libs) but I pretty sure there are many other usages. ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 03:02:45 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 07:02:45 +0000 Subject: [issue37075] Error message improvement for AsyncMock In-Reply-To: <1559037010.51.0.223468847551.issue37075@roundup.psfhosted.org> Message-ID: <1559113365.85.0.844479677513.issue37075@roundup.psfhosted.org> miss-islington added the comment: New changeset 0ae022c6a47abffce22ec185552e319b7b93dbf4 by Miss Islington (bot) (Xtreak) in branch 'master': bpo-37075: Fix string concatenation in assert_has_awaits error message (GH-13616) https://github.com/python/cpython/commit/0ae022c6a47abffce22ec185552e319b7b93dbf4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 03:22:40 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 29 May 2019 07:22:40 +0000 Subject: [issue37082] Assignment expression operator (walrus) not in built-in help() In-Reply-To: <1559067983.32.0.880606504508.issue37082@roundup.psfhosted.org> Message-ID: <1559114560.35.0.795107216419.issue37082@roundup.psfhosted.org> Mark Dickinson added the comment: Looks like that list could do with some attention: - I don't see regular assignment there, either. - And "`" shouldn't be in that list. - Neither should "<>" - "->" (for function annotations) is missing. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 03:23:42 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 29 May 2019 07:23:42 +0000 Subject: [issue37082] Assignment expression operator (walrus) not in built-in help() In-Reply-To: <1559067983.32.0.880606504508.issue37082@roundup.psfhosted.org> Message-ID: <1559114622.84.0.767548948745.issue37082@roundup.psfhosted.org> Mark Dickinson added the comment: @= is also missing. Looks like we need to go through the grammar and reconcile what's there with the symbols help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 03:25:54 2019 From: report at bugs.python.org (Karl Ding) Date: Wed, 29 May 2019 07:25:54 +0000 Subject: [issue37085] Expose additional socket constants for CAN_BCM flags In-Reply-To: <1559112780.91.0.584487288185.issue37085@roundup.psfhosted.org> Message-ID: <1559114754.93.0.414014380608.issue37085@roundup.psfhosted.org> Change by Karl Ding : ---------- keywords: +patch pull_requests: +13541 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 03:55:53 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 29 May 2019 07:55:53 +0000 Subject: [issue37070] Clean up f-string debug handling, including potential memory leaks In-Reply-To: <1559003598.17.0.659743491517.issue37070@roundup.psfhosted.org> Message-ID: <1559116553.25.0.875920237618.issue37070@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset f83d1dbd3bfbde940117c85f5c70de00e47b7e6e by Eric V. Smith in branch 'master': bpo-37070: Cleanup fstring debug handling (GH-13607) https://github.com/python/cpython/commit/f83d1dbd3bfbde940117c85f5c70de00e47b7e6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 03:56:19 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 29 May 2019 07:56:19 +0000 Subject: [issue37070] Clean up f-string debug handling, including potential memory leaks In-Reply-To: <1559003598.17.0.659743491517.issue37070@roundup.psfhosted.org> Message-ID: <1559116579.91.0.0241688281932.issue37070@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 03:57:48 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 29 May 2019 07:57:48 +0000 Subject: [issue37082] Assignment expression operator (walrus) not in built-in help() In-Reply-To: <1559067983.32.0.880606504508.issue37082@roundup.psfhosted.org> Message-ID: <1559116668.47.0.967135920539.issue37082@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Seems this was added in db7b6b95828c25df6f428bc21a5d6d1cb68287a0 (2009) and wasn't updated from then. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 04:06:21 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 29 May 2019 08:06:21 +0000 Subject: [issue22454] Adding the opposite function of shlex.split() In-Reply-To: <1411328149.26.0.00522128245951.issue22454@psf.upfronthosting.co.za> Message-ID: <1559117181.37.0.377444790295.issue22454@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset ca804955927dddb6ae5a846dbc0248a932be9a4e by Vinay Sajip (Bo Bayles) in branch 'master': bpo-22454: Add shlex.join() (the opposite of shlex.split()) (GH-7605) https://github.com/python/cpython/commit/ca804955927dddb6ae5a846dbc0248a932be9a4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 04:41:27 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Wed, 29 May 2019 08:41:27 +0000 Subject: [issue37030] Lib/cmd.py: Hide undocumented commands in help and completenames In-Reply-To: <1558682753.85.0.407660629596.issue37030@roundup.psfhosted.org> Message-ID: <1559119287.72.0.399560168903.issue37030@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: The EOF mentioned in [0] is indeed the same and was the first reason why I searched in the library code for a solution. Then saw it as an opportunity to create hidden functions in the shell. [0] https://bugs.python.org/issue13214#msg309788 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 04:49:26 2019 From: report at bugs.python.org (Aldwin Pollefeyt) Date: Wed, 29 May 2019 08:49:26 +0000 Subject: [issue13214] Cmd: list available completions from the cmd.Cmd subclass and filter out EOF handler(s) In-Reply-To: <1318965366.62.0.48247525728.issue13214@psf.upfronthosting.co.za> Message-ID: <1559119766.11.0.140108125724.issue13214@roundup.psfhosted.org> Aldwin Pollefeyt added the comment: The EOF mentioned in msg309788 is the first reason why I searched in the library code for a solution. Then saw it as an opportunity to create hidden functions in the shell. So I created issue37030 [0] and PR13536 [1]. Later got notified about this thread. [0] https://bugs.python.org/issue37030#msg343873 [1] https://github.com/python/cpython/pull/13536 ---------- nosy: +aldwinaldwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 05:05:15 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 29 May 2019 09:05:15 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1555158343.77.0.950141438455.issue36624@roundup.psfhosted.org> Message-ID: <1559120715.14.0.923308371876.issue36624@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +13542 pull_request: https://github.com/python/cpython/pull/13648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 05:34:06 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 09:34:06 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1559122446.56.0.0386045315233.issue32972@roundup.psfhosted.org> miss-islington added the comment: New changeset 4dd3e3f9bbd320f0dd556688e04db0a6b55a7b52 by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-32972: Async test case (GH-13386) https://github.com/python/cpython/commit/4dd3e3f9bbd320f0dd556688e04db0a6b55a7b52 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 05:37:22 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 09:37:22 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1559122642.45.0.563093639338.issue32972@roundup.psfhosted.org> Andrew Svetlov added the comment: Done. Let's keep the issue open until the documentation will be committed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 05:53:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 09:53:30 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1559123610.87.0.194073891627.issue36889@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks for letting me know. Investigating. BrokenPipeError is not related, I had a plan to fix such messages during the beta phase. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 06:18:55 2019 From: report at bugs.python.org (Michele Angrisano) Date: Wed, 29 May 2019 10:18:55 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1559125135.37.0.0323111466752.issue19184@roundup.psfhosted.org> Michele Angrisano added the comment: I'm working on it. ---------- nosy: +mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 06:29:25 2019 From: report at bugs.python.org (Tal Einat) Date: Wed, 29 May 2019 10:29:25 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1555158343.77.0.950141438455.issue36624@roundup.psfhosted.org> Message-ID: <1559125765.14.0.630593391034.issue36624@roundup.psfhosted.org> Tal Einat added the comment: There a cleanly rebased PR up at GH-13648. I'd like to get opinions from additional people about this now that the PR is ready. Steve? Victor? Some discussion which happened in PR comments: Andrew Svetlov approved the changes for the asyncio tests. Stefan Krah asked to revert the changes in test_decimal, saying "I don't quite like this change.". Michael Felt argued "imho - this adds clarity to the whole", to which Stefan replied: "I don't think so: Now I have to wonder which of the different idioms hides behind MS_WINDOWS. And in other project's setup.py files I still need sys.platform, so now there's even one additional way to accomplish the same thing." Michael followed up with additional arguments in favor of this change, which are rather verbose, but can be summed up as saying that this adds clarity and uniformity throughout the tests. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 06:37:02 2019 From: report at bugs.python.org (Justin Fay) Date: Wed, 29 May 2019 10:37:02 +0000 Subject: [issue37086] time.sleep error message misleading Message-ID: <1559126222.88.0.100290912588.issue37086@roundup.psfhosted.org> New submission from Justin Fay : Using python3.6 and calling `time.sleep` with an invalid argument the `TypeError` raised has the error message "TypeError: an integer is required". This is not the case as a float or integer is acceptable. Using python 2.7 the error message given is better "TypeError: a float is required". ---------- messages: 343880 nosy: Justin Fay priority: normal severity: normal status: open title: time.sleep error message misleading versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 06:58:13 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 29 May 2019 10:58:13 +0000 Subject: [issue33164] Blake 2 module update In-Reply-To: <1558585970.68.0.308420136648.issue33164@roundup.psfhosted.org> Message-ID: <1559127493.78.0.101891238562.issue33164@roundup.psfhosted.org> Inada Naoki added the comment: New changeset d8b755167235e0621814eb5ac39163b3db6879bb by Inada Naoki (David Carlier) in branch 'master': bpo-33164: blake2 fix for HP-UX (GH-13633) https://github.com/python/cpython/commit/d8b755167235e0621814eb5ac39163b3db6879bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 07:16:27 2019 From: report at bugs.python.org (Peter Edwards) Date: Wed, 29 May 2019 11:16:27 +0000 Subject: [issue21131] test_faulthandler.test_register_chain fails on 64bit ppc/arm with kernel >= 3.10 In-Reply-To: <1396430238.51.0.283909097168.issue21131@psf.upfronthosting.co.za> Message-ID: <1559128587.9.0.666064322624.issue21131@roundup.psfhosted.org> Change by Peter Edwards : ---------- pull_requests: +13543 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 07:42:21 2019 From: report at bugs.python.org (Michele Angrisano) Date: Wed, 29 May 2019 11:42:21 +0000 Subject: [issue19184] dis module has incorrect docs for RAISE_VARARGS In-Reply-To: <1381078012.05.0.236677780468.issue19184@psf.upfronthosting.co.za> Message-ID: <1559130141.37.0.930360273971.issue19184@roundup.psfhosted.org> Change by Michele Angrisano : ---------- keywords: +patch pull_requests: +13544 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 08:14:34 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 12:14:34 +0000 Subject: [issue36373] asyncio.gather: no docs for deprecated loop parameter In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559132074.69.0.429957886896.issue36373@roundup.psfhosted.org> Andrew Svetlov added the comment: A champion is welcome :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 08:14:46 2019 From: report at bugs.python.org (Sihoon Lee) Date: Wed, 29 May 2019 12:14:46 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1559132086.72.0.976745909851.issue30458@roundup.psfhosted.org> Change by Sihoon Lee : ---------- pull_requests: +13545 pull_request: https://github.com/python/cpython/pull/12524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 08:15:07 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 29 May 2019 12:15:07 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1559132107.37.0.948956209653.issue30458@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: +13546 pull_request: https://github.com/python/cpython/pull/11768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 09:13:55 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 13:13:55 +0000 Subject: [issue36709] Asyncio SSL keep-alive connections raise errors after loop close. In-Reply-To: <1556095707.61.0.53219784779.issue36709@roundup.psfhosted.org> Message-ID: <1559135635.6.0.733107670227.issue36709@roundup.psfhosted.org> Andrew Svetlov added the comment: I would say that if requests a designed from scratch more idiomatic way could be with requests.Session() as session: session.get('https://example.com/') or session = requests.Session() session.get('https://example.com/') session.close() Like the recommended way to handle files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 09:39:18 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 29 May 2019 13:39:18 +0000 Subject: [issue36974] Implement PEP 590 Message-ID: <1559137158.82.0.874787564139.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13547 pull_request: https://github.com/python/cpython/pull/13653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 09:48:49 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 29 May 2019 13:48:49 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1558736392.74.0.828369698293.issue35545@roundup.psfhosted.org> Message-ID: <4b5a13db-28a0-6126-70a4-88809f32323a@felt.demon.nl> Michael Felt added the comment: On 25/05/2019 00:19, Erwan Le Pape wrote: > Erwan Le Pape added the comment: > > Thanks for testing that. It's good that you used an actual address because that eliminates the possibility that AIX doesn't handle addresses it doesn't really know about. > > On the other hand, even when properly specified to a real scoped IPv6 address, `getaddrinfo` doesn't seem to get the necessary scope ID from the underlying C call which socket.getaddrinfo > _socket.getaddrinfo is pretty much mapped to. > > I'm looking at cpython/master for the socketmodule implementation: > https://github.com/python/cpython/blob/6dbbe748e101a173b4cff8aada41e9313e287e0f/Modules/socketmodule.c#L6400 is `getaddrinfo` > https://github.com/python/cpython/blob/master/Modules/socketmodule.c#L1294 is `makesockaddr` which actually creates the 4-tuple returned as the last element of the `getaddrinfo` tuples. > The fourth element (ie. the scope ID) is clearly `a->sin6_scope_id` which should contain the scope ID. > > At this stage, I don't know if this is a bug from the socketmodule which I doubt or if the AIX `getaddrinfo` simply just doesn't handle scoped IP addresses properly. I also doubt a bug in the socketmodule - my assumption is that AIX may be wrong - although I prefer different, i.e., has idiosyncrasies. ++ If we "accept" or "conclude" that AIX's getaddrinfo() routine is not working as needed for this test - would "you" (Python-core) accept a @SkipIf for this test - as is already done re: IPv6 re: bpo-34490 Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') ++ Further, I have a start on "send/receive" stubs in C and am trying out different ideas - learn as I go. "netstat" clearly shows, as does ifconfig -a root at x066:[/]ifconfig -a en0: flags=1e080863,c0 ??????? inet 192.168.129.66 netmask 0xffffff00 broadcast 192.168.129.255 ??????? inet6 fe80::221:5eff:fea3:c746/64 ???????? tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0 en1: flags=1e080863,480 ??????? inet6 fe80::f8d1:8cff:fe32:8305%2/64 lo0: flags=e08084b,c0 ??????? inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255 ??????? inet6 ::1%1/128 ???????? tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1 Sadly, I have a lot to learn re: IPv6 - and I expect how "host-based routing" is concerned*, so movement forward will be slow going. * from years ago, I recall a discussion where one of the improvements in IPv6 compared to IPv4 is that the "work" of routing would be shared by all end-points, rather than focused in router(-hubs) whose performance basically determine the performance limits of a connection (or connections). > > If you're still okay to proxy tests for AIX, I'll try and come up with either a simple C snippet to see what's in the returned structure or ctype the AIX `libc` `getaddrinfo`. Repeating - always willing. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:29:34 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 14:29:34 +0000 Subject: [issue33918] Hooking into pause/resume of iterators/coroutines In-Reply-To: <1529519056.15.0.56676864532.issue33918@psf.upfronthosting.co.za> Message-ID: <1559140174.84.0.518350300306.issue33918@roundup.psfhosted.org> Andrew Svetlov added the comment: decimal was changed from threading.local to contextvar usage. The module is "safe" not only for asyncio but for threading, trio etc. unittest.mock doesn't use explicit context all for patching. It changes global interpreter-wide objects instead. So, mock.patch fails not only if two async tasks are executed in parallel but two threads also. I doubt if thread-local (or contextvar) can be applied to mock because it changes the current behavior -- but this is a different story. *Any* library that needs to modify a global state, e.g. your MyLogger.enabled can use contextvars for handling it. Say again, contextvars is not for asyncio-only but a generic instrument for handling context-aware variables. I'm going to close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:29:57 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 14:29:57 +0000 Subject: [issue33918] Hooking into pause/resume of iterators/coroutines In-Reply-To: <1529519056.15.0.56676864532.issue33918@psf.upfronthosting.co.za> Message-ID: <1559140197.21.0.678289113847.issue33918@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:36:13 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 May 2019 14:36:13 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1555158343.77.0.950141438455.issue36624@roundup.psfhosted.org> Message-ID: <1559140573.17.0.412262839995.issue36624@roundup.psfhosted.org> Ned Deily added the comment: FWIW, my opinion on making this kind of wholesale change has not changed: see the discussion in PR 7800. I think the changes made there were not an improvement for all the reasons stated, primarily because this now requires people reading the code base to learn *two* different ways of doing the same thing since these changes only affect the tests and not the platform-conditional code in the standard library modules themselves (which are not and should not be changed). Also, this means that backports of fixes from 3.8 will be complicated. Note there ware already some "translation" errors detected and fixed in the PR re-spin; how many others remain? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:38:17 2019 From: report at bugs.python.org (desbma) Date: Wed, 29 May 2019 14:38:17 +0000 Subject: [issue31749] Request: Human readable byte amounts in the standard library In-Reply-To: <1507655453.9.0.213398074469.issue31749@psf.upfronthosting.co.za> Message-ID: <1559140697.99.0.576925874645.issue31749@roundup.psfhosted.org> Change by desbma : ---------- nosy: +desbma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:43:34 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 29 May 2019 14:43:34 +0000 Subject: [issue36373] asyncio.gather: no docs for deprecated loop parameter In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559141014.92.0.326739535651.issue36373@roundup.psfhosted.org> Emmanuel Arias added the comment: hello, I will work on it, if there are no objection. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:47:52 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 14:47:52 +0000 Subject: [issue36373] asyncio.gather: no docs for deprecated loop parameter In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559141272.85.0.618189547349.issue36373@roundup.psfhosted.org> Andrew Svetlov added the comment: Thank you. The change is pretty straightforward. There is no need to jumbo PR, you can split the work into PR-per-module if it is more comfortable to you. I'm ok with reviewing any approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:50:43 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 14:50:43 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559141443.79.0.317179285762.issue36373@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- title: asyncio.gather: no docs for deprecated loop parameter -> Deprecate explicit loop parameter in all public asyncio APIs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:50:49 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 14:50:49 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559141449.27.0.0898168145924.issue36373@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:52:48 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 29 May 2019 14:52:48 +0000 Subject: [issue36373] asyncio.gather: no docs for deprecated loop parameter In-Reply-To: <1559141272.85.0.618189547349.issue36373@roundup.psfhosted.org> Message-ID: <10ee377b-682d-b5c7-6c68-09b0b1cabc93@gmail.com> Emmanuel Arias added the comment: Hi > There is no need to jumbo PR, you can split the work into PR-per-module if it is more comfortable to you. Yes, I think that is better split I will try it. > I'm ok with reviewing any approach. Thanks! ---------- title: Deprecate explicit loop parameter in all public asyncio APIs -> asyncio.gather: no docs for deprecated loop parameter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:53:06 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 29 May 2019 14:53:06 +0000 Subject: [issue31829] Portability issues with pickle In-Reply-To: <1508521289.37.0.213398074469.issue31829@psf.upfronthosting.co.za> Message-ID: <1559141586.28.0.461180800941.issue31829@roundup.psfhosted.org> Cheryl Sabella added the comment: Bumping this discussion in case the should be merged for 3.8b1. Thanks! ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 10:55:09 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 14:55:09 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559141709.27.0.100284305754.issue36373@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- title: asyncio.gather: no docs for deprecated loop parameter -> Deprecate explicit loop parameter in all public asyncio APIs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 11:20:52 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 29 May 2019 15:20:52 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1559143252.18.0.0497974280787.issue36842@roundup.psfhosted.org> Steve Dower added the comment: New changeset 9ddc416e9f6635376312c3615193f19480ac772a by Steve Dower in branch 'master': bpo-36842: Fix reference leak in tests by running out-of-proc (GH-13556) https://github.com/python/cpython/commit/9ddc416e9f6635376312c3615193f19480ac772a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 11:29:33 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 29 May 2019 15:29:33 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1559143773.94.0.54379356021.issue36842@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 11:38:57 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 29 May 2019 15:38:57 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1559144337.94.0.542741469107.issue37007@roundup.psfhosted.org> Zackery Spytz added the comment: Well, it turns out that implementing if_nameindex() on Windows using GetIfTable2Ex() was also quite simple. I've updated the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 11:45:57 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 29 May 2019 15:45:57 +0000 Subject: [issue14656] Add a macro for unreachable code In-Reply-To: <1335217931.89.0.157136074708.issue14656@psf.upfronthosting.co.za> Message-ID: <1559144757.02.0.716293499653.issue14656@roundup.psfhosted.org> Zackery Spytz added the comment: The Py_UNREACHABLE() macro was implemented in bpo-31338, so this issue can be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 12:15:52 2019 From: report at bugs.python.org (Michele Angrisano) Date: Wed, 29 May 2019 16:15:52 +0000 Subject: [issue37086] time.sleep error message misleading In-Reply-To: <1559126222.88.0.100290912588.issue37086@roundup.psfhosted.org> Message-ID: <1559146552.76.0.587907395292.issue37086@roundup.psfhosted.org> Michele Angrisano added the comment: The doc (3.7) says that the argument "may be a floating point number to indicate a more precise sleep time." I think that TypeError message is right because you can choose how much precision you need but it's optional. What do you think about that? ---------- nosy: +mangrisano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 12:20:31 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 29 May 2019 16:20:31 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1559089293.33.0.822605654905.issue33725@roundup.psfhosted.org> Message-ID: <9AC32CA5-FBEB-491A-8EA1-F108C86EBB30@python.org> Barry A. Warsaw added the comment: On May 28, 2019, at 17:21, STINNER Victor wrote: > > > STINNER Victor added the comment: > >> To be clear, what is unsafe on macOS (as of 10.13, but even more so on 10.14) is calling into the Objective-C runtime between fork and exec. The problem for Python is that it?s way too easy to do that implicitly, thus causing the macOS to abort the subprocess in surprising ways. > > Do only a few Python module use the Objective-C runtime? Or is it basically "everything"? > > If it's just a few, would it be possible to emit a warning or even an exception if called in a child process after fork? I think it?s hard to know, but I found it through a path that lead from requests to _scproxy.c. Here?s everything I know about the subject: https://wefearchange.org/2018/11/forkmacos.rst.html So yes, it?s theoretically possible to do *some* between fork and exec and not crash, and it?s of course perfectly safe to call exec pretty much right after fork. It?s just hard to know for sure, and there are surprising ways to get into the Objective-C runtime. I think we won?t be able to work around all of Apple?s choices here. Documentation is the best way to handle it in <=3.7, and changing the default makes sense to me for 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 12:32:16 2019 From: report at bugs.python.org (David Carlier) Date: Wed, 29 May 2019 16:32:16 +0000 Subject: [issue36084] Threading: add builtin TID attribute to Thread objects In-Reply-To: <1550875571.41.0.297490361597.issue36084@roundup.psfhosted.org> Message-ID: <1559147536.16.0.00347988712992.issue36084@roundup.psfhosted.org> Change by David Carlier : ---------- pull_requests: +13548 pull_request: https://github.com/python/cpython/pull/13654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 12:32:45 2019 From: report at bugs.python.org (David Carlier) Date: Wed, 29 May 2019 16:32:45 +0000 Subject: [issue37087] Adding native id support for openbsd Message-ID: <1559147565.3.0.574292103957.issue37087@roundup.psfhosted.org> New submission from David Carlier : Following up on bpo-36084 ---------- messages: 343896 nosy: David Carlier priority: normal pull_requests: 13549 severity: normal status: open title: Adding native id support for openbsd versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 12:46:29 2019 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 29 May 2019 16:46:29 +0000 Subject: [issue37088] Add a way to schedule a function to be called from the main thread Message-ID: <1559148389.14.0.649589094885.issue37088@roundup.psfhosted.org> New submission from Yury Selivanov : When asyncio event loop is created in a non-main thread, it needs to initialize a so called ChildWatcher for it (a helper object to intercept subprocesses exits). Doing that requires to run code in the main thread. I propose to add a 'sys.addpendingcall' function that will simply expose the already existing Py_AddPendingCall to the pure Python land. ---------- components: Interpreter Core, asyncio messages: 343897 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: Add a way to schedule a function to be called from the main thread versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 12:48:21 2019 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 29 May 2019 16:48:21 +0000 Subject: [issue37088] Add a way to schedule a function to be called from the main thread In-Reply-To: <1559148389.14.0.649589094885.issue37088@roundup.psfhosted.org> Message-ID: <1559148501.19.0.0526602143234.issue37088@roundup.psfhosted.org> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +13550 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 12:50:10 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 29 May 2019 16:50:10 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1559148610.93.0.625156947795.issue37007@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: -eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 13:04:10 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 29 May 2019 17:04:10 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1559090291.0.0.812534160773.issue33725@roundup.psfhosted.org> Message-ID: Barry A. Warsaw added the comment: On May 28, 2019, at 17:38, Ned Deily wrote: > > Ned Deily added the comment: > >> To be clear, what is unsafe on macOS (as of 10.13, but even more so on 10.14) is calling into the Objective-C runtime between fork and exec. > > No, it has *always* been unsafe. What's new as of 10.13/14 is that macOS tries much harder at runtime to detect such cases and more predictably cause an error rather than letter than let the process run on and possibly fail nondeterministically. Right, thanks for the additional nuance. I think what changed is that in 10.13, Apple added a warning output when this condition occurred, and in 10.14 they actually abort the subprocess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 13:05:32 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 17:05:32 +0000 Subject: [issue33071] Document that PyPI no longer requires 'register' In-Reply-To: <1520950887.05.0.467229070634.issue33071@psf.upfronthosting.co.za> Message-ID: <1559149532.86.0.871362156353.issue33071@roundup.psfhosted.org> miss-islington added the comment: New changeset 103b8d9f9179089019ddb363ec0098b63816001b by Miss Islington (bot) (Hai Shi) in branch '2.7': [2.7] bpo-33071: remove outdated PyPI docs (GH-13087) (GH-13584) https://github.com/python/cpython/commit/103b8d9f9179089019ddb363ec0098b63816001b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 13:07:49 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 29 May 2019 17:07:49 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1559149669.41.0.654058904674.issue37007@roundup.psfhosted.org> Steve Dower added the comment: Great, thanks Zackery! (And thanks for the ping - I don't notice GitHub notifications.) Had a few comments about error handling, but it looks great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 13:08:20 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 17:08:20 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1559149700.91.0.491840881101.issue36794@roundup.psfhosted.org> miss-islington added the comment: New changeset 34f4f5efea730504216ee19f237734e0bb0104ee by Miss Islington (bot) (Hrvoje Nik?i?) in branch 'master': bpo-36794: Document that Lock.acquire is fair. (GH-13082) https://github.com/python/cpython/commit/34f4f5efea730504216ee19f237734e0bb0104ee ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 13:09:06 2019 From: report at bugs.python.org (Berker Peksag) Date: Wed, 29 May 2019 17:09:06 +0000 Subject: [issue22454] Adding the opposite function of shlex.split() In-Reply-To: <1411328149.26.0.00522128245951.issue22454@psf.upfronthosting.co.za> Message-ID: <1559149746.88.0.646600312734.issue22454@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 13:11:21 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 17:11:21 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1559149881.83.0.231169240225.issue36794@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 13:30:46 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 17:30:46 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1559151046.12.0.810594985003.issue36794@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13551 pull_request: https://github.com/python/cpython/pull/13659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 13:46:52 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 29 May 2019 17:46:52 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1559152012.14.0.660837597845.issue36889@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: test_stream_shutdown_hung_task_prevents_cancellation was added as part of this issue. Seems to be a random error : https://ci.appveyor.com/project/python/cpython/builds/24901585 ====================================================================== ERROR: test_stream_shutdown_hung_task_prevents_cancellation (test.test_asyncio.test_streams.StreamTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\asyncio\windows_events.py", line 453, in finish_recv return ov.getresult() OSError: [WinError 64] The specified network name is no longer available During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_asyncio\test_streams.py", line 1605, in test_stream_shutdown_hung_task_prevents_cancellation self.loop.run_until_complete(test()) File "C:\projects\cpython\lib\asyncio\base_events.py", line 608, in run_until_complete return future.result() File "C:\projects\cpython\lib\test\test_asyncio\test_streams.py", line 1601, in test await task File "C:\projects\cpython\lib\test\test_asyncio\test_streams.py", line 1586, in client self.assertEqual(b'', await stream.readline()) File "C:\projects\cpython\lib\asyncio\streams.py", line 1545, in readline line = await self.readuntil(sep) File "C:\projects\cpython\lib\asyncio\streams.py", line 1638, in readuntil await self._wait_for_data('readuntil') File "C:\projects\cpython\lib\asyncio\streams.py", line 1521, in _wait_for_data await self._waiter File "C:\projects\cpython\lib\asyncio\proactor_events.py", line 279, in _loop_reading data = fut.result() File "C:\projects\cpython\lib\asyncio\windows_events.py", line 808, in _poll value = callback(transferred, key, ov) File "C:\projects\cpython\lib\asyncio\windows_events.py", line 457, in finish_recv raise ConnectionResetError(*exc.args) ConnectionResetError: [WinError 64] The specified network name is no longer available ---------------------------------------------------------------------- ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 13:54:54 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 29 May 2019 17:54:54 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1559152494.16.0.365050950139.issue36889@roundup.psfhosted.org> Andrew Svetlov added the comment: Wow! Thanks for the report. Internally it is pretty close to freebsd problem. The test is unstable, not asyncio code itself. The test uses future objects to synchronize client and server socket processing but looks like there are race conditions still. Please let me work on it. If the problem is very annoying I can temporarily disable these problematic tests while working on their improvements ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 14:03:03 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 29 May 2019 18:03:03 +0000 Subject: [issue37086] time.sleep error message misleading In-Reply-To: <1559126222.88.0.100290912588.issue37086@roundup.psfhosted.org> Message-ID: <1559152983.9.0.040902512963.issue37086@roundup.psfhosted.org> Eric V. Smith added the comment: I think it's reasonable to change the TypeError to say integer or float. That's what _PyTime_FromObject is looking for. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 14:20:00 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 18:20:00 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents In-Reply-To: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> Message-ID: <1559154000.83.0.88958661431.issue36983@roundup.psfhosted.org> miss-islington added the comment: New changeset d30da5dd9a8a965cf24a22bbaff8a5b1341c2944 by Miss Islington (bot) (Anthony Sottile) in branch 'master': bpo-36983: Fix typing.__all__ and add test for exported names (GH-13456) https://github.com/python/cpython/commit/d30da5dd9a8a965cf24a22bbaff8a5b1341c2944 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 14:23:20 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 29 May 2019 18:23:20 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents In-Reply-To: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> Message-ID: <1559154200.96.0.382434824466.issue36983@roundup.psfhosted.org> Guido van Rossum added the comment: It looks like the backports need to be done manually. Hopefully you'll feel up to that, otherwise we can close without doing the backports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 14:24:40 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 18:24:40 +0000 Subject: [issue36794] asyncio.Lock documentation in Py3.8 lacks parts presented in documentation in Py3.6 In-Reply-To: <1556979606.65.0.142990517106.issue36794@roundup.psfhosted.org> Message-ID: <1559154280.32.0.902739863497.issue36794@roundup.psfhosted.org> miss-islington added the comment: New changeset 4e1e887203ef069bf293ecabd945f7567d6a4879 by Miss Islington (bot) in branch '3.7': bpo-36794: Document that Lock.acquire is fair. (GH-13082) https://github.com/python/cpython/commit/4e1e887203ef069bf293ecabd945f7567d6a4879 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 14:31:58 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 29 May 2019 18:31:58 +0000 Subject: [issue36974] Implement PEP 590 Message-ID: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> New submission from Petr Viktorin : New changeset aacc77fbd77640a8f03638216fa09372cc21673d by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-36974: implement PEP 590 (GH-13185) https://github.com/python/cpython/commit/aacc77fbd77640a8f03638216fa09372cc21673d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 14:34:46 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 29 May 2019 18:34:46 +0000 Subject: [issue37086] time.sleep error message misleading In-Reply-To: <1559126222.88.0.100290912588.issue37086@roundup.psfhosted.org> Message-ID: <1559154886.48.0.204215822198.issue37086@roundup.psfhosted.org> Cheryl Sabella added the comment: While not exactly the same, issue35707 is also about time.sleep and floats. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 14:47:04 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 29 May 2019 18:47:04 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1559155624.46.0.124893772631.issue22385@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 0c2f9305640f7655ba0cd5f478948b2763b376b3 by Gregory P. Smith in branch 'master': bpo-22385: Support output separators in hex methods. (#13578) https://github.com/python/cpython/commit/0c2f9305640f7655ba0cd5f478948b2763b376b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 14:58:41 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 29 May 2019 18:58:41 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents In-Reply-To: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> Message-ID: <1559156321.93.0.620615140889.issue36983@roundup.psfhosted.org> Anthony Sottile added the comment: yep, happy to do that -- I know I'll need to do 3.7, but should I also do 3.6? 3.5? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 14:59:40 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 29 May 2019 18:59:40 +0000 Subject: [issue36624] cleanup the stdlib and tests with regard to sys.platform usage In-Reply-To: <1559140573.17.0.412262839995.issue36624@roundup.psfhosted.org> Message-ID: <05fcee9e-1b19-7c6c-022b-4d9b30bedb7e@felt.demon.nl> Michael Felt added the comment: On 29/05/2019 16:36, Ned Deily wrote: > Ned Deily added the comment: > > FWIW, my opinion on making this kind of wholesale change has not changed: see the discussion in PR 7800. I had actually read through that before I started on this. Your closing comments are here: https://github.com/python/cpython/pull/7800#issuecomment-400182213 As someone who does not work 100% of the time with python - it is extremely confusing and frustrating because there is no clear way of doing something. From afar it appears as if platform.system() and sys.platform evolved at different moments. I saw them as equivalent, and only learned much later than one is build and the other is run-time. And, there are very specific strings - that no longer match the current situation. Why, I ask myself, is it sometimes "darwin" (or is it "Darwin" - oh yes, different test). And, I also ask myself - why did sys.platform "win"? People did not like a function call (e.g., more resource intensive?) - or was sys.platform "first" and platform.system() just never caught on? I (think I) understand your concerns. While I would consider going through the code to bring them in-line - that may be, for many reasons - going too far. I had hoped to: a) improve consistency and set a good example; as well as b) be more than 'two constants' and in so-doing, provide a basis for a grounded discussion. As we stand now I still have a concern/question - is there any willingness to work towards a solution - that can be (a basis of) a clear definition of what "should" be. In a word - I consider the current situation 'confusing'. What is presented here does not have to be the solution. I hope everyone will remember that this concern continues to popup. Saying no over and over again does not solve anything - will not make it go away. Saying no, repeatedly, may silence people. All I can offer is my willingness to help. Thank you for your time spent reading! > I think the changes made there were not an improvement for all the reasons stated, primarily because this now requires people reading the code base to learn *two* different ways of doing the same thing since these changes only affect the tests and not the platform-conditional code in the standard library modules themselves (which are not and should not be changed). Also, this means that backports of fixes from 3.8 will be complicated. Note there ware already some "translation" errors detected and fixed in the PR re-spin; how many others remain? > > ---------- > nosy: +ned.deily > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 15:00:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 29 May 2019 19:00:56 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1559156456.85.0.301873024925.issue37015@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13552 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 15:06:32 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 29 May 2019 19:06:32 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents In-Reply-To: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> Message-ID: <1559156792.45.0.822692956999.issue36983@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +13553 pull_request: https://github.com/python/cpython/pull/13662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 15:13:38 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 29 May 2019 19:13:38 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents In-Reply-To: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> Message-ID: <1559157218.97.0.545941922844.issue36983@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +13554 pull_request: https://github.com/python/cpython/pull/13663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 15:27:38 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 29 May 2019 19:27:38 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559158058.31.0.516168788561.issue36974@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +13555 pull_request: https://github.com/python/cpython/pull/13665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 15:30:14 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 29 May 2019 19:30:14 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1559158214.13.0.740977417566.issue37007@roundup.psfhosted.org> Zackery Spytz added the comment: Thanks, Steve. I've addressed your comments on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 15:34:30 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 29 May 2019 19:34:30 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1559158470.96.0.566291998867.issue22117@roundup.psfhosted.org> Jeroen Demeyer added the comment: Can somebody here explain the meaning of the comment in test_gdb.py # Tested function must not be defined with METH_NOARGS or METH_O, # otherwise call_function() doesn't call PyCFunction_Call() This test is breaking with PEP 590, see https://github.com/python/cpython/pull/13185 ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 15:37:30 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 29 May 2019 19:37:30 +0000 Subject: [issue22117] Rewrite pytime.h to work on nanoseconds In-Reply-To: <1406848093.52.0.5184372094.issue22117@psf.upfronthosting.co.za> Message-ID: <1559158650.02.0.736663591281.issue22117@roundup.psfhosted.org> Jeroen Demeyer added the comment: Petr claims to have a fix, https://github.com/python/cpython/pull/13665 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 15:57:14 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 29 May 2019 19:57:14 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559159834.3.0.13170907833.issue26836@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 43fdbd2729cb7cdbb5afb5d16352f6604859e564 by Christian Heimes (Zackery Spytz) in branch 'master': bpo-26836: Add os.memfd_create() (#13567) https://github.com/python/cpython/commit/43fdbd2729cb7cdbb5afb5d16352f6604859e564 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 16:04:23 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 29 May 2019 20:04:23 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559160263.04.0.161794940523.issue26836@roundup.psfhosted.org> Christian Heimes added the comment: https://buildbot.python.org/all/#builders/99/builds/2738 is failing because some HUGE TLB constants are not defined on Gentoo. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 16:12:41 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 29 May 2019 20:12:41 +0000 Subject: [issue32388] Remove cross-version binary compatibility In-Reply-To: <1513790879.02.0.213398074469.issue32388@psf.upfronthosting.co.za> Message-ID: <1559160761.64.0.06109396948.issue32388@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset ada319bb6d0ebcc68d3e0ef2b4279ea061877ac8 by Antoine Pitrou in branch 'master': bpo-32388: Remove cross-version binary compatibility requirement in tp_flags (GH-4944) https://github.com/python/cpython/commit/ada319bb6d0ebcc68d3e0ef2b4279ea061877ac8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 16:13:09 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 29 May 2019 20:13:09 +0000 Subject: [issue32388] Remove cross-version binary compatibility In-Reply-To: <1513790879.02.0.213398074469.issue32388@psf.upfronthosting.co.za> Message-ID: <1559160789.72.0.995604475116.issue32388@roundup.psfhosted.org> Antoine Pitrou added the comment: PR is merged now! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 16:25:53 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 29 May 2019 20:25:53 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559161553.32.0.680022529877.issue26836@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +13556 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13666 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 16:32:13 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 29 May 2019 20:32:13 +0000 Subject: [issue37088] Add a way to schedule a function to be called from the main thread In-Reply-To: <1559148389.14.0.649589094885.issue37088@roundup.psfhosted.org> Message-ID: <1559161933.7.0.172141919083.issue37088@roundup.psfhosted.org> Eric Snow added the comment: Note that I'm working on making pending calls per-interpreter (see issue #33608 and https://github.com/python/cpython/pull/12360 (since reverted)). As to exposing Py_AddPendingCall() as sys.addpendingcall, that might be opening a can of worms. Injecting code into the eval loop at some arbitrary ("soon") future time requires care and the code isn't well exercised historically (much like subinterpreters). By making it easier to use the pending calls API (e.g. from Python code) we may be introducing an attractive nuisance. It also adds burden on other Python implementations. My point is, let's think this through before adding sys.addpendingcall(). :) Is there another way this could be done that doesn't open a can of worms? Also, at the very least it should probably be a "private" function (i.e sys._addpendingcall). ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 16:43:54 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 29 May 2019 20:43:54 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559162634.91.0.472353679963.issue26836@roundup.psfhosted.org> miss-islington added the comment: New changeset e70bfa95e6f0c98b9906f306f24d71f8b7689f87 by Miss Islington (bot) (Zackery Spytz) in branch 'master': bpo-26836: Add ifdefs for all MFD_HUGE* constants (GH-13666) https://github.com/python/cpython/commit/e70bfa95e6f0c98b9906f306f24d71f8b7689f87 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 16:45:44 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 29 May 2019 20:45:44 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559162744.45.0.74326233433.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset fecb75c1bb46c818e6579ba422cfa5d0d9d104d1 by Petr Viktorin in branch 'master': bpo-36974: Fix GDB integration (GH-13665) https://github.com/python/cpython/commit/fecb75c1bb46c818e6579ba422cfa5d0d9d104d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 16:52:39 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 29 May 2019 20:52:39 +0000 Subject: [issue37089] `import Lib.os` works on windows (but shouldn't) Message-ID: <1559163159.15.0.0136841146516.issue37089@roundup.psfhosted.org> New submission from Anthony Sottile : Additionally, virtualenvs have the root of their directory on `sys.path` -- this is unlike posix behaviour For example: $ python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD6 4)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import Lib.os >>> Lib.os.__file__ 'C:\\Python37\\Lib\\os.py' >>> Lib.os.listdir('C:\\') ['$Recycle.Bin', 'BGinfo', 'Documents and Settings', 'pagefile.sys', 'PerfLogs', 'Program Files', 'Program Files (x86)', 'ProgramData', 'Python27', 'Python37', 'Recovery', 'swapfile.sys', 'System Volume Information', 'Users', 'Windows'] ---------- components: Library (Lib), Windows messages: 343923 nosy: Anthony Sottile, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: `import Lib.os` works on windows (but shouldn't) versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 16:59:02 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 29 May 2019 20:59:02 +0000 Subject: [issue37089] `import Lib.os` works on windows (but shouldn't) In-Reply-To: <1559163159.15.0.0136841146516.issue37089@roundup.psfhosted.org> Message-ID: <1559163542.48.0.798158123526.issue37089@roundup.psfhosted.org> Steve Dower added the comment: I don't think we can change the assumption that sys.prefix is in sys.path at this point, though technically it's not required (certainly not in 3.7). Maybe we could create a new marker file that means "never treat this directory as a namespace package"? ---------- versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 17:02:44 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 29 May 2019 21:02:44 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1559163764.27.0.465083175837.issue37007@roundup.psfhosted.org> Steve Dower added the comment: New changeset 8f96c9f8ed2a4795e34b333411451e24f28f74d2 by Steve Dower (Zackery Spytz) in branch 'master': bpo-37007: Implement socket.if_nametoindex(), if_indextoname() and if_nameindex() on Windows (GH-13522) https://github.com/python/cpython/commit/8f96c9f8ed2a4795e34b333411451e24f28f74d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 17:14:51 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 29 May 2019 21:14:51 +0000 Subject: [issue37089] `import Lib.os` works on windows (but shouldn't) In-Reply-To: <1559163159.15.0.0136841146516.issue37089@roundup.psfhosted.org> Message-ID: <1559164491.21.0.948864190719.issue37089@roundup.psfhosted.org> Anthony Sottile added the comment: sys.prefix isn't on sys.path on other platforms -- why is it on windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 17:38:35 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 29 May 2019 21:38:35 +0000 Subject: [issue37090] test_gdb's test_pycfunction should test all calling conventions Message-ID: <1559165915.61.0.362997663954.issue37090@roundup.psfhosted.org> New submission from Petr Viktorin : test_gdb.StackNavigationTests.test_pycfunction checks that the GDB integration can pick up calls to C-API functions. Currently it includes the comment: > Tested function must not be defined with METH_NOARGS or METH_O, > otherwise call_function() doesn't call PyCFunction_Call() This is (now?) false; furthermore it looks like all builtin_function_or_method are discoverable. As the code paths for various METH_* conventions are diverging due to optimizations, we should check they continue to be covered. ---------- assignee: petr.viktorin messages: 343927 nosy: petr.viktorin priority: normal severity: normal status: open title: test_gdb's test_pycfunction should test all calling conventions versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 17:38:40 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 29 May 2019 21:38:40 +0000 Subject: [issue14656] Add a macro for unreachable code In-Reply-To: <1335217931.89.0.157136074708.issue14656@psf.upfronthosting.co.za> Message-ID: <1559165920.02.0.871001753137.issue14656@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 17:46:42 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 29 May 2019 21:46:42 +0000 Subject: [issue37090] test_gdb's test_pycfunction should test all calling conventions In-Reply-To: <1559165915.61.0.362997663954.issue37090@roundup.psfhosted.org> Message-ID: <1559166402.59.0.247411538163.issue37090@roundup.psfhosted.org> Change by Petr Viktorin : ---------- keywords: +patch pull_requests: +13557 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 17:52:48 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 29 May 2019 21:52:48 +0000 Subject: [issue37089] `import Lib.os` works on windows (but shouldn't) In-Reply-To: <1559163159.15.0.0136841146516.issue37089@roundup.psfhosted.org> Message-ID: <1559166768.74.0.432273712427.issue37089@roundup.psfhosted.org> Steve Dower added the comment: Honestly, no idea. Because it always has been :) If you can find when it was added, we may be able to answer that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 17:52:59 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 29 May 2019 21:52:59 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559166779.06.0.436143566251.issue36974@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: BUILDBOT FAILURE REPORT ======================= Builder name: AMD64 Ubuntu Shared 3.x Builder url: https://buildbot.python.org/all/#/builders/141/ Build url: https://buildbot.python.org/all/#/builders/141/builds/1866 Failed tests ------------ - test_pycfunction (test.test_gdb.PyBtTests) Test leaking resources ---------------------- Build summary ------------- == Tests result: FAILURE then FAILURE == 405 tests OK. 10 slowest tests: - test_multiprocessing_spawn: 6 min 27 sec - test_tools: 5 min 34 sec - test_concurrent_futures: 5 min 13 sec - test_tokenize: 4 min 43 sec - test_lib2to3: 3 min 58 sec - test_gdb: 3 min 16 sec - test_multiprocessing_forkserver: 2 min 25 sec - test_asyncio: 2 min 5 sec - test_multiprocessing_fork: 1 min 40 sec - test_capi: 1 min 36 sec 1 test failed: test_gdb 17 tests skipped: test_devpoll test_idle test_ioctl test_kqueue test_msilib test_ossaudiodev test_startfile test_tcl test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio test_winreg test_winsound test_zipfile64 1 re-run test: test_gdb Total duration: 42 min 45 sec Tracebacks ---------- ```traceback Traceback (most recent call last): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_gdb.py", line 890, in test_pycfunction self.assertIn('#2 , args=(1,)) at ./Modules/timemodule.c:446\n446\t{\n#6 Frame 0x7ffff7f11a50, for file , line 3, in foo ()\n#12 Frame 0x5555557be620, for file , line 5, in bar ()\n#18 Frame 0x5555557be3f0, for file , line 6, in ()\n' Traceback (most recent call last): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_gdb.py", line 890, in test_pycfunction self.assertIn('#2 , args=(1,)) at ./Modules/timemodule.c:446\n446\t{\n#6 Frame 0x7ffff7f11a50, for file , line 3, in foo ()\n#12 Frame 0x5555557be590, for file , line 5, in bar ()\n#18 Frame 0x5555557be360, for file , line 6, in ()\n' ``` Current builder status ---------------------- The builder is failing currently Commits ------- - 0c2f9305640f7655ba0cd5f478948b2763b376b3 - aacc77fbd77640a8f03638216fa09372cc21673d Other builds with similar failures ---------------------------------- - https://buildbot.python.org/all/#/builders/21/builds/3076 - https://buildbot.python.org/all/#/builders/21/builds/3077 - https://buildbot.python.org/all/#/builders/21/builds/3078 - https://buildbot.python.org/all/#/builders/21/builds/3079 - https://buildbot.python.org/all/#/builders/21/builds/3080 - https://buildbot.python.org/all/#/builders/13/builds/3087 - https://buildbot.python.org/all/#/builders/13/builds/3088 - https://buildbot.python.org/all/#/builders/13/builds/3089 - https://buildbot.python.org/all/#/builders/13/builds/3090 - https://buildbot.python.org/all/#/builders/85/builds/2883 - https://buildbot.python.org/all/#/builders/85/builds/2884 - https://buildbot.python.org/all/#/builders/85/builds/2885 - https://buildbot.python.org/all/#/builders/85/builds/2886 - https://buildbot.python.org/all/#/builders/141/builds/1869 - https://buildbot.python.org/all/#/builders/176/builds/590 - https://buildbot.python.org/all/#/builders/176/builds/591 - https://buildbot.python.org/all/#/builders/176/builds/592 - https://buildbot.python.org/all/#/builders/176/builds/593 - https://buildbot.python.org/all/#/builders/176/builds/594 - https://buildbot.python.org/all/#/builders/16/builds/3055 - https://buildbot.python.org/all/#/builders/16/builds/3056 - https://buildbot.python.org/all/#/builders/16/builds/3057 - https://buildbot.python.org/all/#/builders/16/builds/3058 - https://buildbot.python.org/all/#/builders/16/builds/3059 Common commits for all builds: - aacc77fbd77640a8f03638216fa09372cc21673d ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 17:56:23 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 29 May 2019 21:56:23 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559166983.76.0.385531384164.issue36974@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: @Petr is https://bugs.python.org/issue37090 and https://github.com/python/cpython/pull/13668 also addressing the buildbot failures? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 17:58:45 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 29 May 2019 21:58:45 +0000 Subject: [issue37007] Implement socket.if_{nametoindex, indextoname} for Windows In-Reply-To: <1558522884.94.0.451573431034.issue37007@roundup.psfhosted.org> Message-ID: <1559167125.68.0.5342440363.issue37007@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 18:00:09 2019 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 29 May 2019 22:00:09 +0000 Subject: [issue37088] Add a way to schedule a function to be called from the main thread In-Reply-To: <1559148389.14.0.649589094885.issue37088@roundup.psfhosted.org> Message-ID: <1559167209.49.0.766804151191.issue37088@roundup.psfhosted.org> Yury Selivanov added the comment: > As to exposing Py_AddPendingCall() as sys.addpendingcall, that might be opening a can of worms. Injecting code into the eval loop at some arbitrary ("soon") future time requires care and the code isn't well exercised historically (much like subinterpreters). Well, it's absolutely the same mechanism that signal handlers use. It looks like this can of works has been open for a pretty long time now :) The whole point of adding this API is to make it possible for asyncio to work with the "signals" module not from the main thread. I expect 99.9% of other use cases to be either about signals or other super low-level stuff that needs the main thread (off the top of my head I can't name any :)) > It also adds burden on other Python implementations. Python signal processing *requires* users callbacks to be executed in the main thread (whereas Unix can deliver the signal to any thread, potentially). Therefore I think that any alternative Python implementation should have a mechanism to schedule code execution in the main thread. > My point is, let's think this through before adding sys.addpendingcall(). :) Is there another way this could be done that doesn't open a can of worms? Maybe. One of such ways is to enable signal.signal calls from non-main threads. But I'm not sure this is possible for all platforms we support. Maybe Victor or Andrew can shed more light on this. > Also, at the very least it should probably be a "private" function (i.e sys._addpendingcall). Maybe. The problem is that asyncio must work the same on PyPy, which means that the sys API it uses should be available on PyPy too. In which case, they will kind of have to add it, which means that there's no point in making it semi-private. OTOH, I wouldn't mind sys._addpendingcall(), as long as PyPy implements it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 18:12:54 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 29 May 2019 22:12:54 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559167974.86.0.208001443426.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: No, just https://github.com/python/cpython/pull/13665 is addressing the failures. And it seems that it's successful -- only the slowest of the failed ones (AMD64 Ubuntu Shared 3.x) is still red. bpo-37090 extends the test so it can catch more bugs in the future (but there's no rush to get it in...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 18:15:38 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 29 May 2019 22:15:38 +0000 Subject: [issue37088] Add a way to schedule a function to be called from the main thread In-Reply-To: <1559148389.14.0.649589094885.issue37088@roundup.psfhosted.org> Message-ID: <1559168138.09.0.226400122125.issue37088@roundup.psfhosted.org> Eric Snow added the comment: > Well, it's absolutely the same mechanism that signal handlers use. Antoine changed signals a while back so they no longer use the pending calls machinery. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 18:16:52 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 29 May 2019 22:16:52 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559168212.43.0.0342680715714.issue36974@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Great! Thank you very much for the quick fix for the problem. For AMD64 Ubuntu Shared 3.x, the last build was successful: https://buildbot.python.org/all/#/builders/141/builds/1870/steps/5/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 18:17:50 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 29 May 2019 22:17:50 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559168270.09.0.267587724705.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: All stable buildbots are back to green. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 18:17:58 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 29 May 2019 22:17:58 +0000 Subject: [issue37088] Add a way to schedule a function to be called from the main thread In-Reply-To: <1559148389.14.0.649589094885.issue37088@roundup.psfhosted.org> Message-ID: <1559168278.92.0.402632597141.issue37088@roundup.psfhosted.org> Eric Snow added the comment: If this is about signals, it isn't enough just to run on the main thread. It also has to be the main interpreter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 18:28:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 29 May 2019 22:28:18 +0000 Subject: [issue37088] Add a way to schedule a function to be called from the main thread In-Reply-To: <1559168278.92.0.402632597141.issue37088@roundup.psfhosted.org> Message-ID: STINNER Victor added the comment: I dislike pending calls. It is a weird beast which complicates ceval.c. I would prefer to remove it. It is no longer needed to handle signals! At least, it sounds like a bad idea to me to expose it in Python in a public API. If you really need it, hide it better ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 18:30:16 2019 From: report at bugs.python.org (Anthony Sottile) Date: Wed, 29 May 2019 22:30:16 +0000 Subject: [issue37089] `import Lib.os` works on windows (but shouldn't) In-Reply-To: <1559163159.15.0.0136841146516.issue37089@roundup.psfhosted.org> Message-ID: <1559169016.47.0.405179032159.issue37089@roundup.psfhosted.org> Anthony Sottile added the comment: If I'm reading this correctly this is the relevant line for python3: https://github.com/python/cpython/blob/29cb21ddb92413931e473eb799a02e2d8cdf4a45/PC/getpathp.c#L1068 it was added in 4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9 python2 seems to do the same as well and I'm having a harder time tracing that code -- my guess is it comes from here: https://github.com/python/cpython/blob/103b8d9f9179089019ddb363ec0098b63816001b/PC/getpathp.c#L550 (so in that case, only present because `python.exe` is at the root of the prefix) -- but it's still showing up in the `virtualenv` case due to site manipulation (coming from `virtualenv`'s `site.py` I believe? trying to mimic that behaviour) Hmmm not much information there but I have to get back to what I was doing before -- I'll see if I can't find more info on this later! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 18:52:02 2019 From: report at bugs.python.org (hw) Date: Wed, 29 May 2019 22:52:02 +0000 Subject: [issue37091] subprocess - uncaught PermissionError in send_signal can cause hang Message-ID: <1559170322.53.0.309237543574.issue37091@roundup.psfhosted.org> New submission from hw <13hurdw at gmail.com>: Python 3.7.3 Ubuntu 18.10 Cosmic https://github.com/python/cpython/pull/13669 Encountered a condition where uncaught PermissionError caused a hang running a subprocess command with sudo -u Traceback (most recent call last): File "/usr/lib/python3.7/subprocess.py", line 474, in run stdout, stderr = process.communicate(input, timeout=timeout) File "/usr/lib/python3.7/subprocess.py", line 939, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File "/usr/lib/python3.7/subprocess.py", line 1707, in _communicate self.wait(timeout=self._remaining_time(endtime)) File "/usr/lib/python3.7/subprocess.py", line 990, in wait return self._wait(timeout=timeout) File "/usr/lib/python3.7/subprocess.py", line 1616, in _wait raise TimeoutExpired(self.args, timeout) subprocess.TimeoutExpired: Command '['sudo', '-u', 'chrome', '/snap/bin/chromium', '--headless', '--disable-gpu', '--hide-scrollbars', '--ignore-certificate-errors', '--enable-sandbox', '--incognito', '--mute-audio', '--disable-databases', '--enable-strict-powerful-feature-restrictions', '--no-pings', '--no-referrers', '--timeout=30000', '--window-size=1280,1000', '--screenshot=[REDACTED]_screenshot.png', 'https://[REDACTED]']' timed out after 59.9998986274004 seconds During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.7/subprocess.py", line 476, in run process.kill() File "/usr/lib/python3.7/subprocess.py", line 1756, in kill self.send_signal(signal.SIGKILL) File "/usr/lib/python3.7/subprocess.py", line 1746, in send_signal os.kill(self.pid, sig) PermissionError: [Errno 1] Operation not permitted ---------- components: Library (Lib) messages: 343939 nosy: Hw priority: normal pull_requests: 13558 severity: normal status: open title: subprocess - uncaught PermissionError in send_signal can cause hang type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 18:52:36 2019 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 29 May 2019 22:52:36 +0000 Subject: [issue37088] Add a way to schedule a function to be called from the main thread In-Reply-To: Message-ID: Yury Selivanov added the comment: Eric, regarding signals no longer using pending calls -- interesting, I'll take a look. Thanks for pointing this out. Sent from my iPhone ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 19:03:42 2019 From: report at bugs.python.org (Dave Johansen) Date: Wed, 29 May 2019 23:03:42 +0000 Subject: [issue37092] LoggerAdapter doesn't have fatal() like Logger Message-ID: <1559171022.38.0.633277520355.issue37092@roundup.psfhosted.org> New submission from Dave Johansen : Using LoggerAdapter is a convenient way to add extra info to all logs, but it doesn't have the fatal() method like Logger, so it isn't a drop in replacement like it should be. ---------- components: Library (Lib) messages: 343941 nosy: Dave Johansen priority: normal severity: normal status: open title: LoggerAdapter doesn't have fatal() like Logger type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 19:32:09 2019 From: report at bugs.python.org (Tim Burke) Date: Wed, 29 May 2019 23:32:09 +0000 Subject: [issue37093] http.client aborts header parsing upon encountering non-ASCII header names Message-ID: <1559172729.29.0.908018369806.issue37093@roundup.psfhosted.org> New submission from Tim Burke : First, spin up a fairly trivial http server: import wsgiref.simple_server def app(environ, start_response): start_response('200 OK', [ ('Some-Canonical', 'headers'), ('sOme-CRAzY', 'hEaDERs'), ('Utf-8-Values', '\xe2\x9c\x94'), ('s\xc3\xb6me-UT\xc6\x92-8', 'in the header name'), ('some-other', 'random headers'), ]) return [b'Hello, world!\n'] if __name__ == '__main__': httpd = wsgiref.simple_server.make_server('', 8000, app) while True: httpd.handle_request() Note that this code works equally well on py2 or py3; the interesting bytes on the wire are the same on either. Verify the expected response using an independent tool such as curl: $ curl -v http://localhost:8000 * Trying ::1... * TCP_NODELAY set * connect to ::1 port 8000 failed: Connection refused * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 8000 (#0) > GET / HTTP/1.1 > Host: localhost:8000 > User-Agent: curl/7.64.0 > Accept: */* > * HTTP 1.0, assume close after body < HTTP/1.0 200 OK < Date: Wed, 29 May 2019 23:02:37 GMT < Server: WSGIServer/0.2 CPython/3.7.3 < Some-Canonical: headers < sOme-CRAzY: hEaDERs < Utf-8-Values: ? < s?me-UT?-8: in the header name < some-other: random headers < Content-Length: 14 < Hello, world! * Closing connection 0 Check that py2 includes all the same headers: $ python2 -c 'import pprint, urllib; resp = urllib.urlopen("http://localhost:8000"); pprint.pprint((dict(resp.info().items()), resp.read()))' ({'content-length': '14', 'date': 'Wed, 29 May 2019 23:03:02 GMT', 'server': 'WSGIServer/0.2 CPython/3.7.3', 'some-canonical': 'headers', 'some-crazy': 'hEaDERs', 'some-other': 'random headers', 's\xc3\xb6me-ut\xc6\x92-8': 'in the header name', 'utf-8-values': '\xe2\x9c\x94'}, 'Hello, world!\n') But py3 *does not*: $ python3 -c 'import pprint, urllib.request; resp = urllib.request.urlopen("http://localhost:8000"); pprint.pprint((dict(resp.info().items()), resp.read()))' ({'Date': 'Wed, 29 May 2019 23:04:09 GMT', 'Server': 'WSGIServer/0.2 CPython/3.7.3', 'Some-Canonical': 'headers', 'Utf-8-Values': '?\x9c\x94', 'sOme-CRAzY': 'hEaDERs'}, b'Hello, world!\n') Instead, it is missing the first header that has a non-ASCII name as well as all subsequent headers (even if they are all-ASCII). Interestingly, the response body is intact. This is eventually traced back to email.feedparser's expectation that all headers conform to rfc822 and its assumption that anything that *doesn't* conform must be part of the body: https://github.com/python/cpython/blob/v3.7.3/Lib/email/feedparser.py#L228-L236 However, http.client has *already* determined the boundary between headers and body in parse_headers, and sent everything that it thinks is headers to the parser: https://github.com/python/cpython/blob/v3.7.3/Lib/http/client.py#L193-L214 ---------- messages: 343942 nosy: tburke priority: normal severity: normal status: open title: http.client aborts header parsing upon encountering non-ASCII header names versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 20:50:45 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Thu, 30 May 2019 00:50:45 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559177445.56.0.545069036377.issue36373@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- keywords: +patch pull_requests: +13559 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 21:43:11 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Thu, 30 May 2019 01:43:11 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1559180591.32.0.38702618188.issue36373@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- pull_requests: +13560 pull_request: https://github.com/python/cpython/pull/13671 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 21:50:03 2019 From: report at bugs.python.org (=?utf-8?b?6bqm5qCL6ZOW?=) Date: Thu, 30 May 2019 01:50:03 +0000 Subject: [issue37094] Provide an example for TestCase.skipTest in unittest doc Message-ID: <1559181003.42.0.162580428843.issue37094@roundup.psfhosted.org> New submission from ??? : I found that there's an function TestCase.skipTest(reason)[0] supports skipping test in testing, but there's no example for this function in chapter Skipping tests[1] and expected failures I create PR[2] for updating the example for TestCase.skipTest in unittest doc. The example is from Lib/unittest/test, the test for unittest. I am sorry for that i don't know if the issue tracker support markdown link syntax, so i just copy and paste the link below: [0] https://docs.python.org/3.7/library/unittest.html#unittest.TestCase.skipTest [1]https://docs.python.org/3.7/library/unittest.html#skipping-tests-and-expected-failures [2]https://github.com/python/cpython/pull/13645 ---------- assignee: docs at python components: Documentation messages: 343943 nosy: docs at python, ??? priority: normal pull_requests: 13561 severity: normal status: open title: Provide an example for TestCase.skipTest in unittest doc type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 23:25:39 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 30 May 2019 03:25:39 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1559186739.05.0.819659899734.issue24564@roundup.psfhosted.org> Giampaolo Rodola' added the comment: New changeset a16387ab2d85f19665920bb6ff91a7e57f59dd2a by Giampaolo Rodola (Ying Wang) in branch 'master': bpo-24564: shutil.copystat(): ignore EINVAL on os.setxattr() (GH-13369) https://github.com/python/cpython/commit/a16387ab2d85f19665920bb6ff91a7e57f59dd2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 23:27:14 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 03:27:14 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1559186834.51.0.153869976075.issue24564@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13562 pull_request: https://github.com/python/cpython/pull/13673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 23:42:48 2019 From: report at bugs.python.org (Evan Greenup) Date: Thu, 30 May 2019 03:42:48 +0000 Subject: [issue37095] [Feature Request]: Add zstd support in tarfile Message-ID: <1559187768.11.0.7498103877.issue37095@roundup.psfhosted.org> New submission from Evan Greenup : Zstandard is getting more and more popular. It could be awesome if tarfile support this compression format for .tar.zst file. ---------- components: Library (Lib) messages: 343945 nosy: evan0greenup priority: normal severity: normal status: open title: [Feature Request]: Add zstd support in tarfile type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 29 23:46:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 30 May 2019 03:46:44 +0000 Subject: [issue37095] [Feature Request]: Add zstd support in tarfile In-Reply-To: <1559187768.11.0.7498103877.issue37095@roundup.psfhosted.org> Message-ID: <1559188004.71.0.528008486984.issue37095@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +lars.gustaebel, serhiy.storchaka versions: +Python 3.8, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 00:03:29 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 30 May 2019 04:03:29 +0000 Subject: [issue36610] os.sendfile can return EINVAL on Solaris In-Reply-To: <1555059394.06.0.893471228224.issue36610@roundup.psfhosted.org> Message-ID: <1559189009.06.0.606864168362.issue36610@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- pull_requests: +13563 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 00:05:38 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 04:05:38 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents In-Reply-To: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> Message-ID: <1559189138.68.0.782352079508.issue36983@roundup.psfhosted.org> miss-islington added the comment: New changeset 3a98bbf7275903a0f84d1374abd0b7f3a85950a4 by Miss Islington (bot) (Anthony Sottile) in branch '3.7': [3.7] bpo-36983: Fix typing.__all__ and add test for exported names (GH-13456) (GH-13662) https://github.com/python/cpython/commit/3a98bbf7275903a0f84d1374abd0b7f3a85950a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 00:06:33 2019 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 30 May 2019 04:06:33 +0000 Subject: [issue36983] typing.__all__ has drifted from actual contents In-Reply-To: <1558410016.34.0.625577465387.issue36983@roundup.psfhosted.org> Message-ID: <1559189193.48.0.0412433170208.issue36983@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks! No 3.6 backport is needed after all. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 00:23:35 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 30 May 2019 04:23:35 +0000 Subject: [issue36610] os.sendfile can return EINVAL on Solaris In-Reply-To: <1555059394.06.0.893471228224.issue36610@roundup.psfhosted.org> Message-ID: <1559190215.69.0.591338122631.issue36610@roundup.psfhosted.org> Giampaolo Rodola' added the comment: I currently have no Solaris box to test this against and am currently short on time but I'm of the opinion that because of: > Sendfile on Solaris can raise EINVAL if offset is equal or bigger than the size > of the file (Python expects that it will return 0 bytes sent in that case). ...and the fact that beta1 will happen soon it's safer to use sendfile() on Linux only. Googling for "solaris + sendfile" also raises suspicions that sendfile() may be broken on Solaris. shutil.copyfile() is too central to risk breaking it. We may also want to look at socket.sendfile() implementation and add tests for large files for both functions (socket.sendfile() and shutil.copyfile()). I'm adding that to my TODO list. ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 01:50:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 30 May 2019 05:50:57 +0000 Subject: [issue37091] subprocess - uncaught PermissionError in send_signal can cause hang In-Reply-To: <1559170322.53.0.309237543574.issue37091@roundup.psfhosted.org> Message-ID: <1559195457.34.0.701730753474.issue37091@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 01:58:46 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 30 May 2019 05:58:46 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1559195926.6.0.0456375989565.issue24564@roundup.psfhosted.org> Giampaolo Rodola' added the comment: New changeset f1487b323549e2360460383b4304f6592fb38e27 by Giampaolo Rodola (Miss Islington (bot)) in branch '3.7': bpo-24564: shutil.copystat(): ignore EINVAL on os.setxattr() (GH-13369) https://github.com/python/cpython/commit/f1487b323549e2360460383b4304f6592fb38e27 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 02:03:47 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 30 May 2019 06:03:47 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1559196227.44.0.297678882527.issue24564@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 02:05:52 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 30 May 2019 06:05:52 +0000 Subject: [issue36610] os.sendfile can return EINVAL on Solaris In-Reply-To: <1555059394.06.0.893471228224.issue36610@roundup.psfhosted.org> Message-ID: <1559196352.26.0.788613549909.issue36610@roundup.psfhosted.org> Giampaolo Rodola' added the comment: New changeset 413d955f8ec88a7183f91d7ad8b0ff7def803de3 by Giampaolo Rodola in branch 'master': bpo-36610: shutil.copyfile(): use sendfile() on Linux only (GH-13675) https://github.com/python/cpython/commit/413d955f8ec88a7183f91d7ad8b0ff7def803de3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 02:06:39 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 30 May 2019 06:06:39 +0000 Subject: [issue36610] os.sendfile can return EINVAL on Solaris In-Reply-To: <1555059394.06.0.893471228224.issue36610@roundup.psfhosted.org> Message-ID: <1559196399.42.0.572453155243.issue36610@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- assignee: -> giampaolo.rodola resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 03:09:27 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 30 May 2019 07:09:27 +0000 Subject: [issue37093] http.client aborts header parsing upon encountering non-ASCII header names In-Reply-To: <1559172729.29.0.908018369806.issue37093@roundup.psfhosted.org> Message-ID: <1559200167.77.0.0766239358075.issue37093@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Library (Lib) nosy: +barry, maxking, r.david.murray stage: -> test needed type: -> behavior versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 03:18:19 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 30 May 2019 07:18:19 +0000 Subject: [issue37096] Add large-file tests for modules using sendfile(2) Message-ID: <1559200699.13.0.758657145229.issue37096@roundup.psfhosted.org> New submission from Giampaolo Rodola' : The need for this emerged in: https://bugs.python.org/issue36610#msg343948. We currently use sendfile(2) syscall in high-level shutil.copyfile() on Linux and socket.sendfile() on UNIX. In addition this PR also tests shutil.copyfile() implementation on OSX which takes advantage of fcopyfile(2) syscall. The goal is to make sure "fast-copy" syscalls can handle files > 2G. On my Ubuntu 18.04 with SSD disk this introduces a 5 secs slowdown to the test run. According to: https://github.com/golang/go/issues/13892 ...problems may arise on SunOS, so if a BB will turn red this is expected. ---------- components: Library (Lib) messages: 343951 nosy: giampaolo.rodola, rosslagerwall priority: normal severity: normal status: open title: Add large-file tests for modules using sendfile(2) versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 03:19:26 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 30 May 2019 07:19:26 +0000 Subject: [issue37096] Add large-file tests for modules using sendfile(2) In-Reply-To: <1559200699.13.0.758657145229.issue37096@roundup.psfhosted.org> Message-ID: <1559200766.49.0.370251851395.issue37096@roundup.psfhosted.org> Change by Giampaolo Rodola' : ---------- keywords: +patch pull_requests: +13564 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 03:43:48 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 30 May 2019 07:43:48 +0000 Subject: [issue37097] python_is_optimized() false negatives Message-ID: <1559202228.98.0.967762980868.issue37097@roundup.psfhosted.org> New submission from Jeroen Demeyer : The function python_is_optimized() in Lib/test/support.py: def python_is_optimized(): """Find if Python was built with optimizations.""" cflags = sysconfig.get_config_var('PY_CFLAGS') or '' final_opt = "" for opt in cflags.split(): if opt.startswith('-O'): final_opt = opt return final_opt not in ('', '-O0', '-Og') However, it seems that the *default* (when no special CFLAGS are configured) is -O3. My Python build is done with this default -O3 but python_is_optimized() returns False. This is the reason why I didn't catch the buildbot failure at https://github.com/python/cpython/pull/13185#issuecomment-497062965 (this test is only run when python_is_optimized() is True) ---------- components: Tests messages: 343952 nosy: benjamin.peterson, jdemeyer, petr.viktorin, pitrou priority: normal severity: normal status: open title: python_is_optimized() false negatives type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 03:48:02 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 30 May 2019 07:48:02 +0000 Subject: [issue37098] test_memfd_create() test failure Message-ID: <1559202482.0.0.225844714186.issue37098@roundup.psfhosted.org> New submission from Jeroen Demeyer : On an older Linux system: ====================================================================== ERROR: test_memfd_create (test.test_os.MemfdCreateTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/src/sage-config/local/src/cpython/Lib/test/test_os.py", line 3128, in test_memfd_create fd = os.memfd_create("Hi", os.MFD_CLOEXEC) OSError: [Errno 38] Function not implemented ---------- components: Tests messages: 343953 nosy: ZackerySpytz, christian.heimes, jdemeyer priority: normal severity: normal status: open title: test_memfd_create() test failure type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 03:48:33 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 30 May 2019 07:48:33 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559202513.41.0.468472100117.issue26836@roundup.psfhosted.org> Jeroen Demeyer added the comment: Testsuite breakage: https://bugs.python.org/issue37098 ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 03:53:26 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Thu, 30 May 2019 07:53:26 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559202806.75.0.689736861319.issue36411@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I did some tracing through bpo-36411.py using pdb and lldb. The problem is that the file position variables stored in the buffered file object get out of sync with the kernel in the write operation after the seek(0) call. It thinks it is writing to the buffer as if it were relative to the last seek position. This is reflected in the incorrect values returned by tell (3 instead of 9, 6 instead of 12). The second seek operation flushes the buffer to disk and synchronizes the position variables with the kernel. The data is always written correctly to disk because the kernel maintains its own file position and handles the append operations internally. Now that I have a handle on what is happening, I will dig into the buffered writes to find the root cause and hopefully a solution. A workaround is to call f.seek(0, io.SEEK_CUR) before f.tell() to force the file object to synchronize its position variables with the kernel. There is a performance hit as f.seek() will flush dirty buffers to disk each time it is called, though it probably won't be noticed on a file system buffered by the kernel. Here is what I found line by line (only relevant details are included): 1. The first f.open() creates the file and initializes the internal position variables to reflect the beginning of the file. 2. The first f.write() stores three bytes in the buffer and updates the internal position variables accordingly. 3. f.tell() correctly returns 3. 4. f.close() flushes the buffer to disk and closes the file. 5. When f.open() is called a second time with append mode, it calls lseek() to get the file position from the kernel and sets the internal position variables accordingly. 6. f.tell() correctly returns 3 to reflect the 3 bytes already in the file. 7. f.write() stores three bytes into the beginning of the buffer and updates the internal position variables accordingly. 8. f.tell() returns 6 as the correct position. 9. f.seek(0) flushes the dirty buffer to disk, calls lseek() so that the kernel updates the file position, and resets the internal position variables to reflect the beginning of the file. 10. f.write() stores three bytes into the beginning of the buffer, but the position variables are updated as if the write is relative to the beginning of the file. The position variables are now out of sync with the kernel. 11. f.tell() reflects this discrepancy by returning 3 instead of 9. 12. f.write() stores three bytes into the buffer starting at offset 3 and updates the position variables accordingly. 13. f.tell() returns 6 instead of 9. 14. f.seek(0, io.SEEK_CUR) flushes the 6 bytes in the dirty buffer to disk. The flush operation correctly appends the 6 bytes to the disk file regardless of the position variables because the kernel handles the append operation internally based upon its own file position variable. It then calls lseek() to determine the new position and updates the position variables accordingly. 15. f.tell() returns the correct position. 16. The final f.seek(0) calls lseek() to move the file position back to the beginning of the file and updates the position variables, but doesn't flush anything to disk because the buffer is clean. 17. f.read() reads the entire file from the beginning. 18. f.close() closes the file. No flush operation is performed because the buffer is clean. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 03:59:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 May 2019 07:59:07 +0000 Subject: [issue36935] bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function In-Reply-To: <1557983600.93.0.891686339403.issue36935@roundup.psfhosted.org> Message-ID: <1559203147.37.0.301899503624.issue36935@roundup.psfhosted.org> STINNER Victor added the comment: New changeset eda385c0dca62f97a8ae80feb57c2a51df3c807f by Victor Stinner (Zackery Spytz) in branch 'master': bpo-36935: Remove usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() (GH-13355) https://github.com/python/cpython/commit/eda385c0dca62f97a8ae80feb57c2a51df3c807f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 04:04:35 2019 From: report at bugs.python.org (LihuaZhao) Date: Thu, 30 May 2019 08:04:35 +0000 Subject: [issue31904] Python should support VxWorks RTOS In-Reply-To: <1509393393.78.0.213398074469.issue31904@psf.upfronthosting.co.za> Message-ID: <1559203475.87.0.534391511158.issue31904@roundup.psfhosted.org> Change by LihuaZhao : ---------- pull_requests: -12349 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 04:27:25 2019 From: report at bugs.python.org (Erwan Le Pape) Date: Thu, 30 May 2019 08:27:25 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1559204845.28.0.677551550717.issue35545@roundup.psfhosted.org> Erwan Le Pape added the comment: Assuming similar configuration to the one in msg343430, a simple native getaddrinfo test to check whether any scope ID is returned. ``` #include #include #include #include void test(char *addrstr) { int status; struct addrinfo *res; struct addrinfo *iter; struct sockaddr_in6 *addr; status = getaddrinfo(addrstr, "80", NULL, &res); if (status != 0) { fprintf(stderr, "getaddrinfo(%s) returned %i\n", addrstr, status); return; } for (iter = res; iter; iter = iter->ai_next) { if (iter->ai_addr->sa_family != AF_INET6) continue; addr = (struct sockaddr_in6 *) iter->ai_addr; if (addr->sin6_scope_id != 0) { fprintf(stdout, "getaddrinfo(%s) return scope %u\n", addrstr, addr->sin6_scope_id); return; } } } int main() { test("fe80::f8d1:81ff:fe81:ac05%2"); test("fe80::f8d1:81ff:fe81:ac05%en1"); return 0; } ``` I've explicitly tested against numeric and named interfaces to ensure that this isn't linked to AIX only handling named interfaces for scopes instead of numeric ones (although given your `netstat` output, that's be surprising). Since I've had to look for AIX programming documentation just to be sure, I also stumbled upon this AIX bug https://www-01.ibm.com/support/docview.wss?uid=isg1IV53671 (which is referenced by the one I mentioned previously but I missed that). It seem to apply up to 7100-03 so you should be immune nonetheless. I also noticed that it mentions SSH not working so I went and checked the OpenSSH sources to see how they handle AIX. While they have an explicit BROKEN_GETADDRINFO define, it doesn't check for the specific scoped IPv6 address issue so I'm not sure they decided to special case it. https://github.com/openssh/openssh-portable/blob/85ceb0e64bff672558fc87958cd548f135c83cdd/configure.ac#L2341 If this is truly an "idiosyncrasy" in AIX, I'm not sure there is a better way to handle it than skipping it since it's not really a Python bug if the underlying `libc` doesn't work as intended. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 05:01:38 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 May 2019 09:01:38 +0000 Subject: [issue37098] test_memfd_create() test failure In-Reply-To: <1559202482.0.0.225844714186.issue37098@roundup.psfhosted.org> Message-ID: <1559206898.23.0.116362731001.issue37098@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +13565 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 05:03:14 2019 From: report at bugs.python.org (Justin Fay) Date: Thu, 30 May 2019 09:03:14 +0000 Subject: [issue37086] time.sleep error message misleading In-Reply-To: <1559126222.88.0.100290912588.issue37086@roundup.psfhosted.org> Message-ID: <1559206994.89.0.455382336788.issue37086@roundup.psfhosted.org> Justin Fay added the comment: >From looking at the code for this (note I am not a C programmer so may have gotten this wrong) _PyTime_FromObject first checks if the object is a float using PyFloat_Check(obj) this is evident as passing nan to time.sleep raises a ValueError with the message "Invalid value NaN (not a number)". However if the object is not a float it next assumes the only valid value to be an integer, this logic appears fine to me. The problem however is if the object is not an integer the code raises the error with the message that an integer is required, it is unaware that a before this branch of the code executes a float would have been an accepted value. In python I imagine the fix for this would be along the lines try: float(obj) except (TypeError, ValueError): try: int(obj): except (TypeError, ValueError): raise TypeError('an float or integer is required') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 05:27:11 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 May 2019 09:27:11 +0000 Subject: [issue37098] test_memfd_create() test failure In-Reply-To: <1559202482.0.0.225844714186.issue37098@roundup.psfhosted.org> Message-ID: <1559208431.91.0.756913214659.issue37098@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 6eb814b8ce9a4fed8773a65501fb96aad8b3ecf2 by Christian Heimes in branch 'master': bpo-37098: Skip memfd_create test before Linux 3.17 (GH-13677) https://github.com/python/cpython/commit/6eb814b8ce9a4fed8773a65501fb96aad8b3ecf2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 05:41:34 2019 From: report at bugs.python.org (Thomas Moreau) Date: Thu, 30 May 2019 09:41:34 +0000 Subject: [issue30006] Deadlocks in `concurrent.futures.ProcessPoolExecutor` In-Reply-To: <1491482471.73.0.550300132711.issue30006@psf.upfronthosting.co.za> Message-ID: <1559209294.15.0.54775203703.issue30006@roundup.psfhosted.org> Thomas Moreau added the comment: The deadlocks I refer to in this issue are fixed by the PR #3895. Subsequent failures (like the fact that the Executor is set in a broken state when there is an unpickling error) are tracked in other issues so I think it is safe to close this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 05:53:36 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 30 May 2019 09:53:36 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1559210016.1.0.567241338336.issue36906@roundup.psfhosted.org> Inada Naoki added the comment: Can we dedent docstring too? Is there any string like inspect.cleandoc(s) != inspect.cleandoc(s.dedent())? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 06:00:00 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 30 May 2019 10:00:00 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1559210400.18.0.425935133057.issue37039@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +13566 pull_request: https://github.com/python/cpython/pull/13678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 06:00:32 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 10:00:32 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1559210432.76.0.776031865238.issue37015@roundup.psfhosted.org> miss-islington added the comment: New changeset 0f39c2b1919727904f4fac2d79cb41dc6bfe41fe by Miss Islington (bot) (Xtreak) in branch 'master': bpo-37015: Ensure tasks created by _accept_connection2 due to AsyncMock are completed (GH-13661) https://github.com/python/cpython/commit/0f39c2b1919727904f4fac2d79cb41dc6bfe41fe ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 06:01:18 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 30 May 2019 10:01:18 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1558749886.9.0.817731232242.issue37039@roundup.psfhosted.org> Message-ID: <1559210478.54.0.0772957415299.issue37039@roundup.psfhosted.org> Tal Einat added the comment: See an implementation in PR GH-13678. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 06:07:09 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 30 May 2019 10:07:09 +0000 Subject: [issue37015] Fix asyncio mock warnings In-Reply-To: <1558547763.57.0.769583160761.issue37015@roundup.psfhosted.org> Message-ID: <1559210829.68.0.00861121682332.issue37015@roundup.psfhosted.org> Andrew Svetlov added the comment: Fixed ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 06:22:08 2019 From: report at bugs.python.org (Andre Roberge) Date: Thu, 30 May 2019 10:22:08 +0000 Subject: [issue37039] IDLE: Improve zoomheight doc and behavior. In-Reply-To: <1559210478.54.0.0772957415299.issue37039@roundup.psfhosted.org> Message-ID: Andre Roberge added the comment: As I wrote on Github: On my computer (Windows 10, resolution: 3000 x 2000, scaling of UI elements set to 200%), clicking on Zoom Height makes Idle go full screen. Clicking on the same menu (now called Restore Height) does absolutely nothing: Idle stays in full screen mode. If I run the program on a secondary monitor (4k), the height only changes, but nowhere enough to be equal to the height of the screen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 06:32:55 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 30 May 2019 10:32:55 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1559212375.55.0.498357580252.issue22385@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This change seems to have created some compile time warnings : https://buildbot.python.org/all/#/builders/103/builds/2544/steps/3/logs/warnings__6_ Python/pystrhex.c:18:45: warning: passing argument 1 of ?PyObject_Size? discards ?const? qualifier from pointer target type [-Wdiscarded-qualifiers] Python/pystrhex.c:60:27: warning: comparison of integer expressions of different signedness: ?unsigned int? and ?Py_ssize_t? {aka ?const int?} [-Wsign-compare] Python/pystrhex.c:90:29: warning: ?sep_char? may be used uninitialized in this function [-Wmaybe-uninitialized] Python/pystrhex.c:90:29: warning: ?sep_char? may be used uninitialized in this function [-Wmaybe-uninitialized] ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 06:43:33 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 30 May 2019 10:43:33 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559213013.93.0.572157032547.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 735e8afa9ee942367b5d0807633a2b9f662cbdbf by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-36974: inherit the vectorcall protocol (GH-13498) https://github.com/python/cpython/commit/735e8afa9ee942367b5d0807633a2b9f662cbdbf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 06:44:02 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 30 May 2019 10:44:02 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559213042.62.0.588210170017.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset c145f3bfbe80d498d40848450d4d33c14e2cf782 by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-36974: remove _PyObject_HasFastCall (GH-13460) https://github.com/python/cpython/commit/c145f3bfbe80d498d40848450d4d33c14e2cf782 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 06:56:32 2019 From: report at bugs.python.org (PEW's Corner) Date: Thu, 30 May 2019 10:56:32 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559213792.43.0.985023558301.issue36411@roundup.psfhosted.org> PEW's Corner added the comment: Great analysis, Jeffrey. Does the kernel position actually move to the end of the file on the f.write() in step 10, or on the flush in step 14? If it's the latter, then f.write() should probably call lseek() to set both the kernel position and internal position to the end of the file before the write. This would have the added benefit of making the Python append behavior independent of the kernel behavior (as some kernels apparently handle appending differently). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 07:08:36 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 30 May 2019 11:08:36 +0000 Subject: [issue20602] sys.flags and sys.float_info disappear at shutdown In-Reply-To: <1392146521.44.0.544055558433.issue20602@psf.upfronthosting.co.za> Message-ID: <1559214516.09.0.362128692659.issue20602@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 249b7d59d8038f9017fc95dc28a3ce3494aaf832 by Petr Viktorin (Zackery Spytz) in branch 'master': bpo-20602: Do not clear sys.flags and sys.float_info during shutdown (GH-8096) https://github.com/python/cpython/commit/249b7d59d8038f9017fc95dc28a3ce3494aaf832 ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 07:24:20 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 30 May 2019 11:24:20 +0000 Subject: [issue37099] test_inspect generates DeprecationWarning Message-ID: <1559215460.17.0.300068245937.issue37099@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : In PR 13245 getfullargspec was undeprecated. But functions like getargspec and formatargspec still have deprecation warnings in code. As part of the PR code to ignore these warnings in test were also removed though the actual warning remains in Lib/inspect.py . This generates below warnings. ./python.exe -Wall -m test test_inspect Run tests sequentially 0:00:00 load avg: 3.05 [1/1] test_inspect /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec() args, varargs, varkw, defaults = inspect.getargspec(routine) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults, == Tests result: SUCCESS == 1 test OK. Total duration: 1 sec 662 ms Tests result: SUCCESS ---------- components: Tests messages: 343971 nosy: pablogsal, xtreak priority: normal severity: normal status: open title: test_inspect generates DeprecationWarning type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 07:30:53 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 30 May 2019 11:30:53 +0000 Subject: [issue37099] test_inspect generates DeprecationWarning In-Reply-To: <1559215460.17.0.300068245937.issue37099@roundup.psfhosted.org> Message-ID: <1559215853.41.0.145001595879.issue37099@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +13567 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 08:01:43 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 12:01:43 +0000 Subject: [issue37099] test_inspect generates DeprecationWarning In-Reply-To: <1559215460.17.0.300068245937.issue37099@roundup.psfhosted.org> Message-ID: <1559217703.0.0.819761041108.issue37099@roundup.psfhosted.org> miss-islington added the comment: New changeset 6d0b7470a4738a403ef48cfd50d9447e0f32f00c by Miss Islington (bot) (Xtreak) in branch 'master': bpo-37099: Silence DeprecationWarning in test_inspect (GH-13679) https://github.com/python/cpython/commit/6d0b7470a4738a403ef48cfd50d9447e0f32f00c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 08:24:45 2019 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Thu, 30 May 2019 12:24:45 +0000 Subject: [issue36999] Expose the coroutine object in asyncio task objects In-Reply-To: <1558471537.52.0.812163346713.issue36999@roundup.psfhosted.org> Message-ID: <1559219085.03.0.426943248956.issue36999@roundup.psfhosted.org> Change by Alex Gr?nholm : ---------- keywords: +patch pull_requests: +13568 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 08:33:22 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 30 May 2019 12:33:22 +0000 Subject: [issue30006] Deadlocks in `concurrent.futures.ProcessPoolExecutor` In-Reply-To: <1491482471.73.0.550300132711.issue30006@psf.upfronthosting.co.za> Message-ID: <1559219602.92.0.302911014428.issue30006@roundup.psfhosted.org> Antoine Pitrou added the comment: Ok, closing as duplicate then. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 08:57:05 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 30 May 2019 12:57:05 +0000 Subject: [issue37100] test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror Message-ID: <1559221025.29.0.0441448239991.issue37100@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : Running test_coroutines under -Werror raises error. It seems ZeroDivisionError is expected and RuntimeWarning is raised and happens only under -Werror. This test was added with e4d300e07c3 . ./python.exe -Werror -m test test_coroutines Run tests sequentially 0:00:00 load avg: 2.02 [1/1] test_coroutines test test_coroutines failed -- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_coroutines.py", line 2263, in test_unawaited_warning_when_module_broken self.assertEqual(cm.unraisable.exc_type, ZeroDivisionError) AssertionError: != test_coroutines failed == Tests result: FAILURE == 1 test failed: test_coroutines Total duration: 436 ms Tests result: FAILURE ---------- components: Tests messages: 343974 nosy: vstinner, xtreak priority: normal severity: normal status: open title: test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 08:58:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 30 May 2019 12:58:13 +0000 Subject: [issue37099] test_inspect generates DeprecationWarning In-Reply-To: <1559215460.17.0.300068245937.issue37099@roundup.psfhosted.org> Message-ID: <1559221093.52.0.43875100383.issue37099@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 09:11:43 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 30 May 2019 13:11:43 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559221903.75.0.407009920678.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 37788bc23f6f1ed0362b9b3b248daf296c024849 by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-36974: rename _FastCallKeywords -> _Vectorcall (GH-13653) https://github.com/python/cpython/commit/37788bc23f6f1ed0362b9b3b248daf296c024849 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 09:13:33 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 30 May 2019 13:13:33 +0000 Subject: [issue37100] test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror In-Reply-To: <1559221025.29.0.0441448239991.issue37100@roundup.psfhosted.org> Message-ID: <1559222013.3.0.0647015849856.issue37100@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The coroutine is not awaited in the test and generates a RuntimeWarning. Since I used -Werror I guess the warning was converted to an error and thus replacing ZeroDivisionError in the support.catch_unraisable_exception context manager. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 10:00:41 2019 From: report at bugs.python.org (Tom Christie) Date: Thu, 30 May 2019 14:00:41 +0000 Subject: [issue36709] Asyncio SSL keep-alive connections raise errors after loop close. In-Reply-To: <1556095707.61.0.53219784779.issue36709@roundup.psfhosted.org> Message-ID: <1559224841.64.0.159073330265.issue36709@roundup.psfhosted.org> Tom Christie added the comment: Right, and `requests` *does* provide both those styles. The point more being that *not* having closed the transport at the point of exit shouldn't end up raising a hard error. It doesn't raise errors in sync-land, and it shouldn't do so in async-land. Similarly, we wouldn't expect an open file resource to cause errors to be raised at the point of exit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 10:10:43 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 30 May 2019 14:10:43 +0000 Subject: [issue36709] Asyncio SSL keep-alive connections raise errors after loop close. In-Reply-To: <1556095707.61.0.53219784779.issue36709@roundup.psfhosted.org> Message-ID: <1559225443.13.0.126484157061.issue36709@roundup.psfhosted.org> Andrew Svetlov added the comment: The difference is that socket.close() is an instant call. After socket.close() the socket is done. But transport.close() doesn't close the transport instantly. asyncio requires at least one loop iteration for calling protocol.connection_lost() and actual socket closing. In case of SSL it may take much longer. Sorry, that's how asyncio is designed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 10:42:53 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 30 May 2019 14:42:53 +0000 Subject: [issue36709] Asyncio SSL keep-alive connections raise errors after loop close. In-Reply-To: <1556095707.61.0.53219784779.issue36709@roundup.psfhosted.org> Message-ID: <1559227373.75.0.646229240559.issue36709@roundup.psfhosted.org> Yury Selivanov added the comment: > Sorry, that's how asyncio is designed. Andrew, couldn't we provide a "stream.terminate()" method (not a coroutine) that would do the following: * close the transport * set a flag in the protocol that the stream has been terminated. When the flag is set, the protocol simply ignores all errors (i.e. they are never shown to the user or logged) This way Tom could have a weakref to the stream object from his high-level wrapper, and whenever the wrapper object is dereferenced it could terminate its stream. > Sorry, that's how asyncio is designed. I think it's a real problem, let's try to find out if we can provide a solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 10:52:05 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 30 May 2019 14:52:05 +0000 Subject: [issue36709] Asyncio SSL keep-alive connections raise errors after loop close. In-Reply-To: <1556095707.61.0.53219784779.issue36709@roundup.psfhosted.org> Message-ID: <1559227925.32.0.848734922955.issue36709@roundup.psfhosted.org> Andrew Svetlov added the comment: It's not about streams only. The stream protocol can have such flag, sure. But transport emits a warning like "unclosed transport ..." Not sure if we have to drop this warning, it enforces writing good code that controls all created resources lifecycle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 10:57:32 2019 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 30 May 2019 14:57:32 +0000 Subject: [issue36709] Asyncio SSL keep-alive connections raise errors after loop close. In-Reply-To: <1556095707.61.0.53219784779.issue36709@roundup.psfhosted.org> Message-ID: <1559228252.66.0.436462461266.issue36709@roundup.psfhosted.org> Yury Selivanov added the comment: > Not sure if we have to drop this warning, it enforces writing good code that controls all created resources lifecycle. Right, maybe we add "transport.terminate()" as well? Synchronously & immediately closing a transport is a valid use case. TBH I don't see why we absolutely must wait the "connection_lost" callback call. I mean it would be reasonable to allow users to terminate the connection (even if it means that in some cases, like SSL, it won't be correctly closed) and not care about what happens to it next. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 11:15:18 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 30 May 2019 15:15:18 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559229318.66.0.443988931038.issue36974@roundup.psfhosted.org> Change by Jeroen Demeyer : ---------- pull_requests: +13569 pull_request: https://github.com/python/cpython/pull/13682 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 11:30:16 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 15:30:16 +0000 Subject: [issue36999] Expose the coroutine object in asyncio task objects In-Reply-To: <1558471537.52.0.812163346713.issue36999@roundup.psfhosted.org> Message-ID: <1559230216.74.0.0725112647724.issue36999@roundup.psfhosted.org> miss-islington added the comment: New changeset 98ef92002ec289bf8086b0ef3d4f96c2589f4e68 by Miss Islington (bot) (Alex Gr?nholm) in branch 'master': bpo-36999: Add asyncio.Task.get_coro() (GH-13680) https://github.com/python/cpython/commit/98ef92002ec289bf8086b0ef3d4f96c2589f4e68 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 11:34:33 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 30 May 2019 15:34:33 +0000 Subject: [issue36999] Expose the coroutine object in asyncio task objects In-Reply-To: <1558471537.52.0.812163346713.issue36999@roundup.psfhosted.org> Message-ID: <1559230473.64.0.187549880933.issue36999@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 11:49:09 2019 From: report at bugs.python.org (Dale Visser) Date: Thu, 30 May 2019 15:49:09 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable Message-ID: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> New submission from Dale Visser : Alternative version of Filterer.filter(...) would look like this, which takes advantage of efficient Python 3.x built-ins, and is immediately understandable: def _filter_callable(filter): return filter.filter if hasattr(filter, 'filter') else filter def filter(self, record): filters = map(_filter_callable, self.filters) return all(f(record) for f in filters) I will add a tested pull request on GitHub. ---------- components: Library (Lib) messages: 343983 nosy: dwvisser priority: normal severity: normal status: open title: Filterer.filter can be rewritten using built-ins just as efficient much more readable type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 11:51:03 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 30 May 2019 15:51:03 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable In-Reply-To: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> Message-ID: <1559231463.97.0.714730554099.issue37101@roundup.psfhosted.org> Change by SilentGhost : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 11:54:49 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 30 May 2019 15:54:49 +0000 Subject: [issue36709] Asyncio SSL keep-alive connections raise errors after loop close. In-Reply-To: <1556095707.61.0.53219784779.issue36709@roundup.psfhosted.org> Message-ID: <1559231689.36.0.655146413639.issue36709@roundup.psfhosted.org> Andrew Svetlov added the comment: Sorry, I'm not comfortable with such change just before the feature freeze. The idea is maybe good but let's discuss and implement it later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 12:01:21 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 30 May 2019 16:01:21 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable In-Reply-To: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> Message-ID: <1559232081.17.0.992719984851.issue37101@roundup.psfhosted.org> Zachary Ware added the comment: This could simplify even further with the following: def filter(self, record): return all(getattr(f, 'filter', f)(record) for f in self.filters) ---------- nosy: +zach.ware versions: +Python 3.8 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 12:43:49 2019 From: report at bugs.python.org (Dale Visser) Date: Thu, 30 May 2019 16:43:49 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable In-Reply-To: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> Message-ID: <1559234629.77.0.93216060713.issue37101@roundup.psfhosted.org> Change by Dale Visser : ---------- keywords: +patch pull_requests: +13570 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13683 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 13:22:11 2019 From: report at bugs.python.org (Dale Visser) Date: Thu, 30 May 2019 17:22:11 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable In-Reply-To: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> Message-ID: <1559236931.18.0.592784907467.issue37101@roundup.psfhosted.org> Dale Visser added the comment: Great! My PR now uses getattr as @zach.ware has suggested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 13:48:10 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 30 May 2019 17:48:10 +0000 Subject: [issue22385] Define a binary output formatting mini-language for *.hex() In-Reply-To: <1410393301.25.0.193851592698.issue22385@psf.upfronthosting.co.za> Message-ID: <1559238490.41.0.782586532911.issue22385@roundup.psfhosted.org> Gregory P. Smith added the comment: thanks, i'll take care of them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 13:55:14 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 30 May 2019 17:55:14 +0000 Subject: [issue30754] textwrap.dedent mishandles empty lines In-Reply-To: <1498404324.65.0.525714137023.issue30754@psf.upfronthosting.co.za> Message-ID: <1559238914.13.0.544611656157.issue30754@roundup.psfhosted.org> Gregory P. Smith added the comment: The current behavior is desired. We just need to document it better in https://docs.python.org/3/library/textwrap.html#textwrap.dedent ---------- assignee: -> docs at python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs at python, gregory.p.smith versions: +Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 13:57:27 2019 From: report at bugs.python.org (Nic Watson) Date: Thu, 30 May 2019 17:57:27 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module Message-ID: <1559239047.74.0.800247535134.issue1572968@roundup.psfhosted.org> Nic Watson added the comment: I'll add one more system I/O call that's not GIL-wrapped in the mmap module that can take some time: mmap itself. mmap on Linux with MAP_POPULATE (0x8000) as the flags can take quite a bit of time. That's the flag that prefaults the memory range. MAP_POPULATE has been around since Linux 2.5.46. I know that MAP_POPULATE isn't explicitly supported in the module, but mmap.mmap does take arbitrary flags, so it isn't exactly unsupported either. ---------- nosy: +jnwatson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 14:00:00 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 30 May 2019 18:00:00 +0000 Subject: [issue37102] Automatically dedent docstring constants by default Message-ID: <1559239200.57.0.0816589870282.issue37102@roundup.psfhosted.org> New submission from Gregory P. Smith : I'm spawning this issue of as a separate feature from https://bugs.python.org/issue36906 (adding string dedent method and an optimization to do it at compile timer on constants). It'd be great if docstrings were given a similar treatment. Right now we carry the whitespace burden within the str constants for __doc__ stored in all code objects in the process. This adds up. This is not _quite_ the same as calling textwrap.dedent() or the upcoming str.dedent method on them at compile time. We need to special case the first line of docstrings. inspect.getdoc() is our library function that does this for us today. Change of breaking things with this change? not impossible, but extremely minor. Something using docstrings as data _and_ depending on leading indentation whitespace preservation would not like this. I am not aware of anything that would ever do that. ---------- components: Interpreter Core messages: 343990 nosy: gregory.p.smith priority: normal severity: normal status: open title: Automatically dedent docstring constants by default type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 14:00:38 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 30 May 2019 18:00:38 +0000 Subject: [issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals In-Reply-To: <1557772831.22.0.440689390024.issue36906@roundup.psfhosted.org> Message-ID: <1559239238.29.0.23439344706.issue36906@roundup.psfhosted.org> Gregory P. Smith added the comment: I think dedenting docstring content by default would be a great thing to do. But that's a separate issue, it isn't quite the same as .dedent() due to the first line. I filed https://bugs.python.org/issue37102 to track that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 14:03:30 2019 From: report at bugs.python.org (Dino Viehland) Date: Thu, 30 May 2019 18:03:30 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559239410.96.0.187067751517.issue36839@roundup.psfhosted.org> Dino Viehland added the comment: In the Instagram case there's about 20mb of byte code total and there are 3-4 dozen worker processes running per server. The byte code also represents the second largest section of memory as far as serialized code objects are concerned, the only larger one is strings (which are about 25mb). Anyway, that leads to around 1gb of memory savings per server, which is the reason why this was an interesting optimization to pursue when it's applied to many servers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 15:07:32 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 May 2019 19:07:32 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559243252.79.0.345546388004.issue36839@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Inada. This would add complexity in the code object. Note also that the code object is not just a sequence of bytes. It is a complex object which contains references to a dozen of objects: bytes objects, strings, integers, tuples, dicts. I suppose that the byte code itself is only a tiny part of the memory consumed by the code object in large program. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 15:23:03 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 May 2019 19:23:03 +0000 Subject: [issue9883] minidom: AttributeError: DocumentFragment instance has no attribute 'writexml' In-Reply-To: <1284694245.92.0.410723728376.issue9883@psf.upfronthosting.co.za> Message-ID: <1559244183.52.0.38062202756.issue9883@roundup.psfhosted.org> Cheryl Sabella added the comment: I've closed PR1745 as it appeared to be abandoned. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 15:31:56 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 19:31:56 +0000 Subject: [issue5028] tokenize.generate_tokens doesn't always return logical line In-Reply-To: <1232588343.15.0.723713394492.issue5028@psf.upfronthosting.co.za> Message-ID: <1559244716.82.0.532370116389.issue5028@roundup.psfhosted.org> miss-islington added the comment: New changeset 1e36f75d634383eb243aa1798c0f2405c9ceb5d4 by Miss Islington (bot) (Andrew Carr) in branch 'master': bpo-5028: fix doc bug for tokenize (GH-11683) https://github.com/python/cpython/commit/1e36f75d634383eb243aa1798c0f2405c9ceb5d4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 15:33:23 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 May 2019 19:33:23 +0000 Subject: [issue5028] tokenize.generate_tokens doesn't always return logical line In-Reply-To: <1232588343.15.0.723713394492.issue5028@psf.upfronthosting.co.za> Message-ID: <1559244803.22.0.799191557082.issue5028@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: -miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 15:43:18 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 30 May 2019 19:43:18 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559245398.39.0.86697715856.issue36839@roundup.psfhosted.org> Eric Snow added the comment: FWIW, I don't see the problem with supporting any read-only "buffer" object, rather than just bytes objects, for the string of bytes in a code object. That's all that Dino is proposing. The change is not invasive and solves a real need. The additional maintenance burden is negligible. Furthermore, the accommodation makes sense conceptually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 15:50:25 2019 From: report at bugs.python.org (Anders Kaseorg) Date: Thu, 30 May 2019 19:50:25 +0000 Subject: [issue37103] Undo deprecation of optparse Message-ID: <1559245825.26.0.384245211115.issue37103@roundup.psfhosted.org> New submission from Anders Kaseorg : The optparse library is currently marked in the documentation as deprecated in favor of argparse. However, argparse uses a nonstandard reinterpretation of Unix command line grammars that makes certain arguments impossible to express, and causes scripts to break when ported from optparse to argparse. See the bug report I filed nine years ago: https://bugs.python.org/issue9334 argparse does not accept options taking arguments beginning with dash (regression from optparse) The conclusion of the core developers (e.g. msg309691) seems to have been that although it?s a valid bug, it can?t or won?t be fixed with the current argparse architecture. I was asked by another core developer to file a bug report for the de-deprecation of optparse (https://discuss.python.org/t/pep-594-removing-dead-batteries-from-the-standard-library/1704/20), so here it is. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 343997 nosy: andersk, docs at python priority: normal severity: normal status: open title: Undo deprecation of optparse versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:00:04 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 May 2019 20:00:04 +0000 Subject: [issue35018] Sax parser provides no user access to lexical handlers In-Reply-To: <1539879741.38.0.788709270274.issue35018@psf.upfronthosting.co.za> Message-ID: <1559246404.17.0.096886037912.issue35018@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:00:25 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 May 2019 20:00:25 +0000 Subject: [issue9371] pulldom doesn't provide END_DOCUMENT or COMMENT nodes. In-Reply-To: <1279976512.14.0.00983593867016.issue9371@psf.upfronthosting.co.za> Message-ID: <1559246425.25.0.311623673719.issue9371@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:00:45 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 May 2019 20:00:45 +0000 Subject: [issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes In-Reply-To: <1250018393.94.0.435666063731.issue6686@psf.upfronthosting.co.za> Message-ID: <1559246445.91.0.995278631935.issue6686@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:01:37 2019 From: report at bugs.python.org (Karl Ding) Date: Thu, 30 May 2019 20:01:37 +0000 Subject: [issue29753] Ctypes Packing Bitfields Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1559246497.54.0.37296200927.issue29753@roundup.psfhosted.org> Karl Ding added the comment: I believe the example can be simplified to the following: class MyStructure(ctypes.Structure): _pack_ = 1 _fields_ = [('A', ctypes.c_uint32, 8)] assert ctypes.sizeof(MyStructure) == 1 Here, ctypes.sizeof returns 4 on my machine (64-bit Ubuntu 18.04 LTS), while I would expect it to return 1 like GCC. This is using a tree checked out at 33ce3f012f249782507df896824b045b34f765aa, if it makes a difference. If we compile the equivalent C code (on 64-bit Ubuntu 18.04 LTS): #include #include #include struct my_structure_uint32 { uint32_t a : 8; } __attribute__((packed)); int main(int argc, char *argv[]) { printf("sizeof(struct my_structure_uint32): %d\n", sizeof(struct my_structure_uint32)); printf("alignof(struct my_structure_uint32): %d\n", alignof(struct my_structure_uint32)); return 0; } Using the following GCC invocation: gcc temp.c -o test && ./test We get the following result: sizeof(struct my_structure_uint32): 1 alignof(struct my_structure_uint32): 1 However, if I compile with MSVC bitfields: gcc -mms-bitfields test.c -o test && ./test We get the following result: sizeof(struct my_structure_uint32): 4 alignof(struct my_structure_uint32): 1 Similarly, adding a second and third 8-bit wide bitfield member fails and returns 4, instead of the expected 2 and 3. This is not just c_uint32, c_uint16 and c_int also exhibit the same behaviour: class MyStructure(ctypes.Structure): _pack_ = 1 _fields_ = [('A', ctypes.c_uint16, 8)] assert ctypes.sizeof(MyStructure) == 1 ---------- nosy: +karlding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:12:34 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 30 May 2019 20:12:34 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559247154.71.0.642473776163.issue36839@roundup.psfhosted.org> Brett Cannon added the comment: I agree with Eric. While I understand what Serhiy is saying about code objects being more than a bytearray of bytecode, the buffer protocol is still a view on an object, and that view happens to be for a subset which I think is acceptable as I think of what a buffer of a code object would be other than the bytecode. I also think read-only is a good enough guarantee. We're talking low-level stuff here and if anyone were to muck with this stuff they are already playing with fire. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:19:45 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 May 2019 20:19:45 +0000 Subject: [issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__` In-Reply-To: <1500465353.64.0.619810995706.issue30969@psf.upfronthosting.co.za> Message-ID: <1559247585.16.0.272576345558.issue30969@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 2f5b9dcc0a89cbde1499c76df81c36bfd5ef9aa8 by Cheryl Sabella (Antti Haapala) in branch 'master': bpo-30969: Fix docs about the comparison in absence of __contains__ (GH-2761) https://github.com/python/cpython/commit/2f5b9dcc0a89cbde1499c76df81c36bfd5ef9aa8 ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:20:17 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 May 2019 20:20:17 +0000 Subject: [issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__` In-Reply-To: <1500465353.64.0.619810995706.issue30969@psf.upfronthosting.co.za> Message-ID: <1559247617.62.0.485745348586.issue30969@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:23:36 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 20:23:36 +0000 Subject: [issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__` In-Reply-To: <1500465353.64.0.619810995706.issue30969@psf.upfronthosting.co.za> Message-ID: <1559247816.93.0.890632935714.issue30969@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13572 pull_request: https://github.com/python/cpython/pull/13684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:41:25 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 20:41:25 +0000 Subject: [issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__` In-Reply-To: <1500465353.64.0.619810995706.issue30969@psf.upfronthosting.co.za> Message-ID: <1559248885.97.0.917309543329.issue30969@roundup.psfhosted.org> miss-islington added the comment: New changeset e8661c1dabc206bf7fe6e302e38fa426aa734dd0 by Miss Islington (bot) in branch '3.7': bpo-30969: Fix docs about the comparison in absence of __contains__ (GH-2761) https://github.com/python/cpython/commit/e8661c1dabc206bf7fe6e302e38fa426aa734dd0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:41:50 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 May 2019 20:41:50 +0000 Subject: [issue27605] Inconsistent calls to __eq__ from built-in __contains__ In-Reply-To: <1469362395.06.0.246923750082.issue27605@psf.upfronthosting.co.za> Message-ID: <1559248910.37.0.0171070405026.issue27605@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> needs patch versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:43:23 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 30 May 2019 20:43:23 +0000 Subject: [issue37103] Undo deprecation of optparse In-Reply-To: <1559245825.26.0.384245211115.issue37103@roundup.psfhosted.org> Message-ID: <1559249003.82.0.630895240269.issue37103@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 16:52:03 2019 From: report at bugs.python.org (Michael Felt) Date: Thu, 30 May 2019 20:52:03 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1559204845.28.0.677551550717.issue35545@roundup.psfhosted.org> Message-ID: Michael Felt added the comment: On 30/05/2019 10:27, Erwan Le Pape wrote: > Erwan Le Pape added the comment: > > Assuming similar configuration to the one in msg343430, a simple native getaddrinfo test to check whether any scope ID is returned. The 'expanded' program ... main(): int main() { /* local addresses */ ??? test("fe80::221:5eff:fea3:c746%0"); ??? test("fe80::221:5eff:fea3:c746%en0"); ??? test("fe80::f8d1:8cff:fe32:8305%2"); ??? test("fe80::f8d1:8cff:fe32:8305%en1"); /* remote addresses */ ??? test("fe80::f8d1:81ff:fe81:ac05%2"); ??? test("fe80::f8d1:81ff:fe81:ac05%en1"); ??? return 0; } The conclusion seems to be that the scopeid returned is always 0 - when it is working; The status is always "8", when it fails. This seems to be: #define EAI_NONAME????? 8?????? /* hostname nor servname not provided, or not known */ So, %enX is not recognized - only a numerical scope. +++ Details +++ On the first server - added two addresses - they are local to platform. root at x066:[/data/prj/aixtools/tests/tcpip/socket]cc -g ex03.c -o ex03 root at x066:[/data/prj/aixtools/tests/tcpip/socket]./ex03 getaddrinfo(fe80::221:5eff:fea3:c746%en0) returned 8 getaddrinfo(fe80::f8d1:8cff:fe32:8305%en1) returned 8 getaddrinfo(fe80::f8d1:81ff:fe81:ac05%en1) returned 8 root at x066:[/data/prj/aixtools/tests/tcpip/socket]netstat -ni Name? Mtu?? Network???? Address??????????? Ipkts Ierrs??? Opkts Oerrs? Coll en0?? 1500? link#2????? 0.21.5e.a3.c7.46? 1496455???? 0? 1214300???? 0???? 0 en0?? 1500? 192.168.129 192.168.129.66??? 1496455???? 0? 1214300???? 0???? 0 en0?? 1500? fe80::221:5eff:fea3:c746????? 1496455???? 0? 1214300???? 0???? 0 en1?? 65390 link#3????? fa.d1.8c.32.83.5???? 4041???? 0?????? 34???? 0???? 0 en1?? 65390 fe80::f8d1:8cff:fe32:8305%2????? 4041???? 0?????? 34???? 0???? 0 lo0?? 16896 link#1???????????????????????? 160253???? 0?? 160252???? 0???? 0 lo0?? 16896 127???????? 127.0.0.1????????? 160253???? 0?? 160252???? 0???? 0 lo0?? 16896 ::1%1????????????????????????? 160253???? 0?? 160252???? 0???? 0 root at x066:[/data/prj/aixtools/tests/tcpip/socket]oslevel -s 6100-07-07-1316 +++ Note +++ the 5th field says below (-), equal (=), or exceeded (+) ?- so on this server they are equal, on the AIX 7.1 TL4 - exceeded. root at x066:[/data/prj/aixtools/tests/tcpip/socket]instfix -ciqk IV52116 IV52116:bos.64bit:6.1.7.21:6.1.7.21:=:GETADDRINFO AND INET_PTON CANNOT HANDLE IPV6 SCOPE/ZONE IV52116:bos.rte.control:6.1.7.21:6.1.7.21:=:GETADDRINFO AND INET_PTON CANNOT HANDLE IPV6 SCOPE/ZONE IV52116:bos.rte.libc:6.1.7.21:6.1.7.21:=:GETADDRINFO AND INET_PTON CANNOT HANDLE IPV6 SCOPE/ZONE IV52116:bos.rte.shell:6.1.7.22:6.1.7.22:=:GETADDRINFO AND INET_PTON CANNOT HANDLE IPV6 SCOPE/ZONE IV52116:mcr.rte:6.1.7.21:6.1.7.21:=:GETADDRINFO AND INET_PTON CANNOT HANDLE IPV6 SCOPE/ZONE On a second server (all addresses are 'remote now') root at x064:[/data/prj/aixtools/tests/tcpip/socket]netstat -ni Name? Mtu?? Network???? Address??????????? Ipkts Ierrs??? Opkts Oerrs? Coll en0?? 1500? link#2????? 0.21.5e.a3.c7.44?? 765518???? 0?? 792062???? 0???? 0 en0?? 1500? 192.168.129 192.168.129.64???? 765518???? 0?? 792062???? 0???? 0 en0?? 1500? fe80::221:5eff:fea3:c744?????? 765518???? 0?? 792062???? 0???? 0 en1?? 1500? link#3????? fa.d1.81.81.ac.5?? 773516???? 0?? 422335???? 0???? 0 en1?? 1500? 192.168.2?? 192.168.2.64?????? 773516???? 0?? 422335???? 0???? 0 en1?? 1500? fe80::f8d1:81ff:fe81:ac05%2??? 773516???? 0?? 422335???? 0???? 0 lo0?? 16896 link#1???????????????????????? 410599???? 0?? 410596???? 0???? 0 lo0?? 16896 127???????? 127.0.0.1????????? 410599???? 0?? 410596???? 0???? 0 lo0?? 16896 ::1%1????????????????????????? 410599???? 0?? 410596???? 0???? 0 root at x064:[/data/prj/aixtools/tests/tcpip/socket]./ex03 getaddrinfo(fe80::221:5eff:fea3:c746%en0) returned 8 gai_strerror:Hostname and service name not provided or found getaddrinfo(fe80::f8d1:8cff:fe32:8305%en1) returned 8 gai_strerror:Hostname and service name not provided or found getaddrinfo(fe80::f8d1:81ff:fe81:ac05%en1) returned 8 gai_strerror:Hostname and service name not provided or found root at x064:[/data/prj/aixtools/tests/tcpip/socket]oslevel -s 7100-04-06-1806 root at x064:[/data/prj/aixtools/tests/tcpip/socket]instfix -ciqk IV53671 IV53671:bos.64bit:7.1.3.15:7.1.4.33:+:getaddrinfo cannot handle IPv6 scope/zone IV53671:bos.rte.control:7.1.3.15:7.1.4.33:+:getaddrinfo cannot handle IPv6 scope/zone IV53671:bos.rte.libc:7.1.3.15:7.1.4.33:+:getaddrinfo cannot handle IPv6 scope/zone IV53671:bos.rte.shell:7.1.3.15:7.1.4.33:+:getaddrinfo cannot handle IPv6 scope/zone IV53671:mcr.rte:7.1.3.15:7.1.4.33:+:getaddrinfo cannot handle IPv6 scope/zone And a server with the bug - i.e., not fixed: root at x065:[/data/prj/aixtools/tests/tcpip/socket]./ex03 getaddrinfo(fe80::221:5eff:fea3:c746%0) returned 8 getaddrinfo(fe80::221:5eff:fea3:c746%en0) returned 8 getaddrinfo(fe80::f8d1:8cff:fe32:8305%2) returned 8 getaddrinfo(fe80::f8d1:8cff:fe32:8305%en1) returned 8 getaddrinfo(fe80::f8d1:81ff:fe81:ac05%2) returned 8 getaddrinfo(fe80::f8d1:81ff:fe81:ac05%en1) returned 8 root at x065:[/data/prj/aixtools/tests/tcpip/socket]oslevel -s 5300-07-00-0000 *** In closing *** Maybe AIX needs "hints" to reveal the scopeid. There is a lot of 'talk' about that in the man page. I can attach that in a new email if you do not have that. Regards, Michael ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 17:11:06 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 30 May 2019 21:11:06 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1545303410.27.0.788709270274.issue35545@psf.upfronthosting.co.za> Message-ID: <1559250666.33.0.298262901504.issue35545@roundup.psfhosted.org> Andrew Svetlov added the comment: Guys, thank you for investigation. If there is AIX "idiosyncrasy" -- please feel free to skip failed tests on AIX. If you have access to AIX box it would be much easier for you. I can only look at Python buildbot statuses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 17:23:55 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 30 May 2019 21:23:55 +0000 Subject: [issue29262] Provide a way to check for *real* typing.Union instances In-Reply-To: <1484322347.31.0.5780880295.issue29262@psf.upfronthosting.co.za> Message-ID: <1559251435.5.0.579561186528.issue29262@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- keywords: +patch pull_requests: +13573 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 17:42:35 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 21:42:35 +0000 Subject: [issue36342] test_venv failure when executed by test_multiprocessing and the platform lacks a functional sem_open() In-Reply-To: <1552903359.9.0.770761638832.issue36342@roundup.psfhosted.org> Message-ID: <1559252555.6.0.150400321104.issue36342@roundup.psfhosted.org> miss-islington added the comment: New changeset 5437ccca1424e415a938c583df43d8cc74047d16 by Miss Islington (bot) (xdegaye) in branch 'master': bpo-36342: Fix test_multiprocessing in test_venv (GH-12513) https://github.com/python/cpython/commit/5437ccca1424e415a938c583df43d8cc74047d16 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 17:45:52 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 21:45:52 +0000 Subject: [issue36953] Remove collections ABCs? In-Reply-To: <1558140764.46.0.049733618419.issue36953@roundup.psfhosted.org> Message-ID: <1559252752.0.0.495324955313.issue36953@roundup.psfhosted.org> miss-islington added the comment: New changeset eea47e09394dfb64d3a59a601d947d25bb1bdc96 by Miss Islington (bot) (Matthias Bussonnier) in branch 'master': bpo-36953: Delay removal of ABCs from collections. (GH-13409) https://github.com/python/cpython/commit/eea47e09394dfb64d3a59a601d947d25bb1bdc96 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 17:48:48 2019 From: report at bugs.python.org (Anthony Sottile) Date: Thu, 30 May 2019 21:48:48 +0000 Subject: [issue5028] tokenize.generate_tokens doesn't always return logical line In-Reply-To: <1232588343.15.0.723713394492.issue5028@psf.upfronthosting.co.za> Message-ID: <1559252928.61.0.446134300993.issue5028@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +13574 pull_request: https://github.com/python/cpython/pull/13686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 18:00:24 2019 From: report at bugs.python.org (Mario Corchero) Date: Thu, 30 May 2019 22:00:24 +0000 Subject: [issue29143] Logger should ignore propagate property for disabled handlers. In-Reply-To: <1483465774.47.0.809201158116.issue29143@psf.upfronthosting.co.za> Message-ID: <1559253624.21.0.336387803575.issue29143@roundup.psfhosted.org> Mario Corchero added the comment: Closing as unable to reproduce. Please comment if you can reproduce the issue and we can have a further look. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 18:03:29 2019 From: report at bugs.python.org (Mario Corchero) Date: Thu, 30 May 2019 22:03:29 +0000 Subject: [issue37104] logging.Logger.disabled is not documented Message-ID: <1559253809.15.0.569168617436.issue37104@roundup.psfhosted.org> New submission from Mario Corchero : Just realised the "disabled" attribute of the Logger class is not documented in https://docs.python.org/3/library/logging.html#logging.Logger. Any reason to not have it documented? I'll send a PR otherwise. This comes as I was trying to point to the docs of the attribute in https://bugs.python.org/issue29143 ---------- assignee: docs at python components: Documentation messages: 344007 nosy: docs at python, mariocj89 priority: low severity: normal status: open title: logging.Logger.disabled is not documented type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 18:03:46 2019 From: report at bugs.python.org (Mario Corchero) Date: Thu, 30 May 2019 22:03:46 +0000 Subject: [issue37104] logging.Logger.disabled is not documented In-Reply-To: <1559253809.15.0.569168617436.issue37104@roundup.psfhosted.org> Message-ID: <1559253826.85.0.778213095696.issue37104@roundup.psfhosted.org> Change by Mario Corchero : ---------- keywords: +patch pull_requests: +13575 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 18:06:44 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 30 May 2019 22:06:44 +0000 Subject: [issue5028] tokenize.generate_tokens doesn't always return logical line In-Reply-To: <1232588343.15.0.723713394492.issue5028@psf.upfronthosting.co.za> Message-ID: <1559254004.7.0.937657994829.issue5028@roundup.psfhosted.org> miss-islington added the comment: New changeset 2a58b0636d1f620f8a85a2e4c030cc10551936a5 by Miss Islington (bot) (Anthony Sottile) in branch 'master': bpo-5028: Fix up rest of documentation for tokenize documenting line (GH-13686) https://github.com/python/cpython/commit/2a58b0636d1f620f8a85a2e4c030cc10551936a5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 18:25:32 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 30 May 2019 22:25:32 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559255132.45.0.521230146305.issue12639@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +13576 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 18:28:45 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 30 May 2019 22:28:45 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559255325.21.0.634811406409.issue12639@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz type: -> behavior versions: +Python 2.7, Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 18:46:10 2019 From: report at bugs.python.org (Dino Viehland) Date: Thu, 30 May 2019 22:46:10 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559256370.33.0.346800541583.issue36839@roundup.psfhosted.org> Dino Viehland added the comment: Well given that we're one day away from 3.8 Beta 1 I'm not going to rush this in :) In particular the discussion has made me wonder if I can also do more with sharing strings using the legacy unicode strings (which I don't believe will require any runtime changes). So I'll keep pushing on this and hopefully be able to demonstrate an even large win from the concept. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 18:51:03 2019 From: report at bugs.python.org (Berker Peksag) Date: Thu, 30 May 2019 22:51:03 +0000 Subject: [issue35950] io.BufferedReader.writabe is False, but io.BufferedReader.truncate does not raise OSError In-Reply-To: <1549719382.2.0.923720230511.issue35950@roundup.psfhosted.org> Message-ID: <1559256663.08.0.520709981397.issue35950@roundup.psfhosted.org> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +13577 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 19:07:00 2019 From: report at bugs.python.org (Berker Peksag) Date: Thu, 30 May 2019 23:07:00 +0000 Subject: [issue32655] File mode should be a constant In-Reply-To: <1516815666.29.0.467229070634.issue32655@psf.upfronthosting.co.za> Message-ID: <1559257620.48.0.837476065679.issue32655@roundup.psfhosted.org> Berker Peksag added the comment: Changing the value of mode also changes its repr. This seems like a bug to me. It's probably too late to change TextIOWrapper.__repr__(). I think this needs to be discussed on python-dev first. >>> f = open("README.rst") >>> f <_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'> >>> f.writable() False >>> f.mode = "w" >>> f.writable() False >>> f <_io.TextIOWrapper name='README.rst' mode='w' encoding='UTF-8'> There's an commented-out code in the initial checkin: https://github.com/python/cpython/commit/4fa88fa0ba35e25ad9be66ebbdaba9aca553dc8b#diff-b67be9e0a41447de808ba3b7099a44a8R2341 /* {"mode", (getter)TextIOWrapper_mode_get, NULL, NULL}, */ TextIOWrapper.__repr__() was updated to include 'mode' in https://github.com/python/cpython/commit/a4815caa7ccf21aa994d0e0eec66873072f0e352 See issue 36271 for a related report. The OP was confused because we don't set mode manually in gzip.open() and bz2.open() (as opposed to what we do in io.open() and tokenize.open()) ---------- nosy: +berker.peksag, pitrou stage: -> test needed versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 19:07:47 2019 From: report at bugs.python.org (Berker Peksag) Date: Thu, 30 May 2019 23:07:47 +0000 Subject: [issue36271] '_io.TextIOWrapper' object has no attribute 'mode' In-Reply-To: <1552401043.29.0.979236036871.issue36271@roundup.psfhosted.org> Message-ID: <1559257667.18.0.684267346726.issue36271@roundup.psfhosted.org> Berker Peksag added the comment: Thank you for the report. This is a duplicate of issue 32655. ---------- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> File mode should be a constant _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 19:10:15 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 30 May 2019 23:10:15 +0000 Subject: [issue29262] Provide a way to check for *real* typing.Union instances In-Reply-To: <1484322347.31.0.5780880295.issue29262@psf.upfronthosting.co.za> Message-ID: <1559257815.1.0.778143487598.issue29262@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset 4c23aff065fb28aba789a211937a2af974842110 by Ivan Levkivskyi in branch 'master': bpo-29262: Add get_origin() and get_args() introspection helpers to typing (GH-13685) https://github.com/python/cpython/commit/4c23aff065fb28aba789a211937a2af974842110 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 19:27:20 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 30 May 2019 23:27:20 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559258840.88.0.136945551949.issue36839@roundup.psfhosted.org> Inada Naoki added the comment: > In the Instagram case there's about 20mb of byte code total and there are 3-4 dozen worker processes running per server. The byte code also represents the second largest section of memory as far as serialized code objects are concerned, the only larger one is strings (which are about 25mb). How did you measure it? How much % of the RAM usage of process? What "serialized code objects are concerned" means? Don't you concern RAM usage in process? > FWIW, I don't see the problem with supporting any read-only "buffer" object, rather than just bytes objects, for the string of bytes in a code object. That's all that Dino is proposing. It means byte code is changed in anytime by anyone other than code object. code object is not immutable anymore. "read-only" means only code object doesn't change the co_code. Anyone else can modify it without breaking Python (and Python/C API) semantics. For example, per-opcode cache can't assume opcode is not changed. I think there are some other possible optimization from co_code is constant. Another complexity is GC. We allowed only bytes here (no subclass allowed) and it allow us to code object is non-GC object. If we allow any object implementing buffer protocol, we should make code object as GC object. We can untrack the code object if co_code is bytes (like tuples does), but all code objects needs 16byte header (like tuples requires it...) Of course we can break the rule and allow Python makes circular reference not collected. But please don't think changing from bytes to arbitrary objects is simple change. I think it needs significant benefits for typical users, not only for Instagram. If only Instagram get benefit from this, keep it as Instagram's internal patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 19:47:25 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 30 May 2019 23:47:25 +0000 Subject: [issue29262] Provide a way to check for *real* typing.Union instances In-Reply-To: <1484322347.31.0.5780880295.issue29262@psf.upfronthosting.co.za> Message-ID: <1559260045.27.0.481990074096.issue29262@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 20:43:58 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 31 May 2019 00:43:58 +0000 Subject: [issue37091] subprocess - uncaught PermissionError in send_signal can cause hang In-Reply-To: <1559170322.53.0.309237543574.issue37091@roundup.psfhosted.org> Message-ID: <1559263438.59.0.0543504145283.issue37091@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 20:53:28 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 31 May 2019 00:53:28 +0000 Subject: [issue37091] subprocess - uncaught PermissionError in send_signal can cause hang In-Reply-To: <1559170322.53.0.309237543574.issue37091@roundup.psfhosted.org> Message-ID: <1559264008.98.0.507280726355.issue37091@roundup.psfhosted.org> Gregory P. Smith added the comment: Clarifying: The problem is that the TimeoutExpired exception that is desired was replaced with a PermissionError that the caller isn't expecting to catch and handle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 20:53:38 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 31 May 2019 00:53:38 +0000 Subject: [issue37091] subprocess - uncaught PermissionError in send_signal can cause hang In-Reply-To: <1559170322.53.0.309237543574.issue37091@roundup.psfhosted.org> Message-ID: <1559264018.91.0.597718422655.issue37091@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 21:40:39 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Fri, 31 May 2019 01:40:39 +0000 Subject: [issue37105] Add deprecated-remove information on stream doc Message-ID: <1559266839.05.0.214061892347.issue37105@roundup.psfhosted.org> New submission from Emmanuel Arias : According to the code on streams.py the functions: open_connection(), start_server(), open_unix_connection(), start_unix_server() are deprecated. I inform that on documentation. ---------- assignee: docs at python components: Documentation messages: 344015 nosy: docs at python, eamanu priority: normal severity: normal status: open title: Add deprecated-remove information on stream doc type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 21:41:12 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Fri, 31 May 2019 01:41:12 +0000 Subject: [issue37105] Add deprecated-remove information on stream doc In-Reply-To: <1559266839.05.0.214061892347.issue37105@roundup.psfhosted.org> Message-ID: <1559266872.56.0.348948678812.issue37105@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- keywords: +patch pull_requests: +13578 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 30 22:13:54 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 31 May 2019 02:13:54 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559268834.25.0.666098339099.issue36974@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 530f506ac91338b55cf2be71b1cdf50cb077512f by Benjamin Peterson (Jeroen Demeyer) in branch 'master': bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) https://github.com/python/cpython/commit/530f506ac91338b55cf2be71b1cdf50cb077512f ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 00:14:36 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 31 May 2019 04:14:36 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559276076.55.0.669385394815.issue36411@roundup.psfhosted.org> Jeffrey Kintscher added the comment: I ran another C test where I called lseek(fd, 0, SEEK_CUR) in-between each of the stream I/O functions to see how it reports the buffered and kernel file positions: opening file with wb writing 3 bytes to file lseek: 0 ftell(f): expecting 3, got 3 lseek: 3 closing file opening file with a+b lseek: 3 ftell(f): expecting 3, got 3 lseek: 3 writing 3 bytes to file lseek: 3 ftell(f): expecting 6, got 6 lseek: 6 fseek(f, 0, SEEK_SET): expecting 0, got 0 lseek: 0 ftell(f): expecting 0, got 0 lseek: 0 writing 3 bytes to file lseek: 0 ftell(f): expecting 9, got 9 lseek: 9 writing 3 bytes to file lseek: 9 ftell(f): expecting 12, got 12 lseek: 12 fseek(f, 0, SEEK_CUR): expecting 0, got 0 lseek: 12 ftell(f): expecting 12, got 12 lseek: 12 fseek(f, 0, SEEK_SET): expecting 0, got 0 lseek: 0 fread(buf, 1, 256, f): expecting 12, got 12 lseek: 12 expecting 'abcdefghijkl', got 'abcdefghijkl' closing file removing file The C library fseek() and ftell() functions update the kernel file position, but fwrite() doesn't (because it hasn't overflowed its write buffer). The kernel doesn't allow seeking past the end of the file, so it looks like fseek() and ftell() are flushing the C library's write buffer because the subsequent lseek() calls return the same value. My observation of Python 3 and C library behavior with read/write append mode: Bufferred write: C - write to memory buffer, no kernel position updates unless the buffer is flushed to the kernel by buffer overflow Python - same as C Buffered seek: C - write buffer is flushed to the kernel to update the kernel position, then a kernel seek operation is performed and the new location reported by the kernel is returned Python - same as C Buffered tell: C - identical behavior as buffered seek; semantically a wrapper for fseek(f, 0, SEEK_CUR) Python - the position is calculated using the last queried kernel position and the dirty buffer length, the kernel position is queried only if a kernel position hasn't been previously queried since the file was opened Having the buffered I/O library keep track of the file position is attractive in that it saves time by skipping a few kernel calls, but, as demonstrated, it can easily get out of sync. I'm sure I can come up with a way to fix the accounting to work properly without querying the kernel, but I don't think that is a good solution. I see dangers with trying to track the file position in the library independent of the kernel. For one, when the file is opened with the append flag, the kernel changes the position to the end of the file with every write. Yes, that can be tracked with careful code in the library, except when the file is opened two or more times and written to using different file descriptors. This is a common scenario for log files, with appends being performed by multiple processes. The only mitigation is to use file locking to guarantee exclusive file access, but the semantics vary from system to system and it is not universally supported. My preferred solution is to follow the C library semantics and turn buffered tell() into a wrapper for buffered seek(0, io.SEEK_CUR). Please, let me know if there are some semantics I haven't considered. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 00:26:35 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 31 May 2019 04:26:35 +0000 Subject: [issue36910] Certain Malformed email causes email.parser to throw AttributeError In-Reply-To: <1557798519.08.0.310106320232.issue36910@roundup.psfhosted.org> Message-ID: <1559276795.93.0.475841656145.issue36910@roundup.psfhosted.org> Abhilash Raj added the comment: This is a dupe of https://bugs.python.org/issue30835, which has an attached PR. I have verified the provided test case is fixed by the PR for bpo-30835. ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 00:28:54 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Fri, 31 May 2019 04:28:54 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1559276934.44.0.324838050725.issue36889@roundup.psfhosted.org> Kubilay Kocak added the comment: @Andrew That would be great, as having failing buildbots can hide new regressions that end up taking much longer to identify and fix as they are hidden, and is better for you than reverting implementation code ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 00:37:21 2019 From: report at bugs.python.org (MANI M) Date: Fri, 31 May 2019 04:37:21 +0000 Subject: [issue37106] python re.escape doesn't escape some special characters. Message-ID: <1559277441.34.0.827558992585.issue37106@roundup.psfhosted.org> New submission from MANI M : Recently I figured out an issue in python3 re which doesn't escape some special characters. Not sure whether this bug has been reported already. Have attached screenshots for your reference. Steps to reproduce: 1. wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz 2. tar -xvzf Python-3.7.3.tar.xz 3. cd Python-3.7.3 4. ./configure 5. make 6. make install. GCC version: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36) OS: CentOS Linux release 7.6.1810 (Core) ---------- components: Regular Expressions files: python_3.7.3_bug.png messages: 344020 nosy: MANI M, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: python re.escape doesn't escape some special characters. type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48377/python_3.7.3_bug.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 00:38:25 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 31 May 2019 04:38:25 +0000 Subject: [issue36910] Certain Malformed email causes email.parser to throw AttributeError In-Reply-To: <1557798519.08.0.310106320232.issue36910@roundup.psfhosted.org> Message-ID: <1559277505.07.0.271223154449.issue36910@roundup.psfhosted.org> Jeffrey Kintscher added the comment: The PR for bpo-30835 changes code in a different source file. I suggest adopting both PRs so that future changes don't accidentally reintroduce either bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 00:46:17 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 31 May 2019 04:46:17 +0000 Subject: [issue37106] python re.escape doesn't escape some special characters. In-Reply-To: <1559277441.34.0.827558992585.issue37106@roundup.psfhosted.org> Message-ID: <1559277977.09.0.551850786486.issue37106@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Please consider posting text content instead of images for better accessibility. This could be due to issue29995. ? cpython git:(master) python3.6 Python 3.6.4 (default, Mar 12 2018, 13:42:53) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> a = r"Hello'`~world" >>> re.escape(a) "Hello\\'\\`\\~world" ? cpython git:(master) python3.7 Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> a = r"Hello'`~world" >>> re.escape(a) "Hello'`\\~world" ---------- nosy: +serhiy.storchaka, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 00:55:30 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 31 May 2019 04:55:30 +0000 Subject: [issue37103] Undo deprecation of optparse In-Reply-To: <1559245825.26.0.384245211115.issue37103@roundup.psfhosted.org> Message-ID: <1559278530.49.0.479172889665.issue37103@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: See also issue25521 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 01:15:49 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 31 May 2019 05:15:49 +0000 Subject: [issue37029] PyObject_Free is O(N) where N = # of arenas In-Reply-To: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> Message-ID: <1559279749.1.0.295706052892.issue37029@roundup.psfhosted.org> Tim Peters added the comment: Added file arena.py. This adds some code to the OP's original test, to print out build time and teardown time, and display obmalloc stats. You'll need at least 80GB of RAM to run it - I don't have that much. Building the tree may take on the order of an hour, but the time to tear it down is what's interesting here. Apparently 3.7.3 needs more than 4 hours to reclaim the memory. ---------- Added file: https://bugs.python.org/file48378/arena.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 01:32:37 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 31 May 2019 05:32:37 +0000 Subject: [issue36910] Certain Malformed email causes email.parser to throw AttributeError In-Reply-To: <1557798519.08.0.310106320232.issue36910@roundup.psfhosted.org> Message-ID: <1559280757.03.0.78757290785.issue36910@roundup.psfhosted.org> Abhilash Raj added the comment: I am not sure which 2nd PR are we talking about here? The reported exception stems from Lib/email/feedparser.py#L323 and same is fixed in PR (https://github.com/python/cpython/pull/13598) for bpo-30835. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 01:34:07 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 31 May 2019 05:34:07 +0000 Subject: [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding In-Reply-To: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> Message-ID: <1559280847.68.0.294007664423.issue30835@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 01:37:47 2019 From: report at bugs.python.org (MANI M) Date: Fri, 31 May 2019 05:37:47 +0000 Subject: [issue37106] python re.escape doesn't escape some special characters. In-Reply-To: <1559277441.34.0.827558992585.issue37106@roundup.psfhosted.org> Message-ID: <1559281067.48.0.998592707203.issue37106@roundup.psfhosted.org> MANI M added the comment: Thanks a lot for the info. May I know in what version of python the patches are applied? Because still 3.7.3 seems to have the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 02:02:58 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 31 May 2019 06:02:58 +0000 Subject: [issue36988] zipfile: string IndexError on extract In-Reply-To: <1558435795.93.0.150119411648.issue36988@roundup.psfhosted.org> Message-ID: <1559282578.42.0.878883486083.issue36988@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: -Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 02:04:00 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 31 May 2019 06:04:00 +0000 Subject: [issue37106] python re.escape doesn't escape some special characters. In-Reply-To: <1559277441.34.0.827558992585.issue37106@roundup.psfhosted.org> Message-ID: <1559282640.83.0.969521106059.issue37106@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: It's a behavior change from 3.6 and it's present from 3.7.0a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 02:07:01 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 31 May 2019 06:07:01 +0000 Subject: [issue36910] Certain Malformed email causes email.parser to throw AttributeError In-Reply-To: <1557798519.08.0.310106320232.issue36910@roundup.psfhosted.org> Message-ID: <1559282821.0.0.33402180867.issue36910@roundup.psfhosted.org> Jeffrey Kintscher added the comment: My mistake for responding to the wrong issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 02:14:55 2019 From: report at bugs.python.org (Chris Withers) Date: Fri, 31 May 2019 06:14:55 +0000 Subject: [issue37107] ensurepip --upgrade doesn't change the version of pip used by venv Message-ID: <1559283295.29.0.266679199585.issue37107@roundup.psfhosted.org> New submission from Chris Withers : $ python3.7 -m ensurepip --upgrade Looking in links: /var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T/tmpqk_vncev Requirement already up-to-date: setuptools in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (39.0.1) Requirement already up-to-date: pip in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (18.1) But: $ python3.7 -m venv /tmp/test_venv $ /tmp/test_venv/bin/pip --version pip 10.0.1 from /private/tmp/test_venv/lib/python3.7/site-packages/pip (python 3.7) ---------- components: Library (Lib) messages: 344029 nosy: cjw296 priority: normal severity: normal status: open title: ensurepip --upgrade doesn't change the version of pip used by venv versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 02:26:22 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 31 May 2019 06:26:22 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1559283982.86.0.259349738436.issue34155@roundup.psfhosted.org> Abhilash Raj added the comment: How about we go a slightly different route than suggested by jpic and instead of returning a None value, we return the entire rest of the string as the domain? That would take care of the security issue since it won't be a valid domain anymore. msg = email.message_from_string( 'From: SomeAbhilashRaj ', policy=email.policy.default) print(msg['From'].addresses) print(msg['From'].defects) (Address(display_name='SomeAbhilashRaj', username='abhilash', domain='malicious.org at important.com>'),) (InvalidHeaderDefect('invalid address in address-list'), InvalidHeaderDefect("missing trailing '>' on angle-addr"), InvalidHeaderDefect("unpected '@' in domain"), ObsoleteHeaderDefect("period in 'phrase'")) This lets us do postel-style error recovery while working in RFC 2822 style grammar. I wrote this patch to achieve this: @@ -1573,6 +1574,11 @@ def get_domain(value): domain.append(DOT) token, value = get_atom(value[1:]) domain.append(token) + if value and value[0] == '@': + domain.defects.append(errors.InvalidHeaderDefect( + "unpected '@' in domain")) + token = get_unstructured(value) + domain.append(token) return domain, value Does this makes sense? ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 02:45:27 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 31 May 2019 06:45:27 +0000 Subject: [issue35547] email.parser / email.policy does not correctly handle multiple RFC2047 encoded-word tokens across RFC5322 folded headers In-Reply-To: <1545328447.76.0.788709270274.issue35547@psf.upfronthosting.co.za> Message-ID: <1559285127.54.0.744699083161.issue35547@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 03:11:56 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 31 May 2019 07:11:56 +0000 Subject: [issue27513] email.utils.getaddresses does not handle Header objects In-Reply-To: <1468493411.01.0.0415400585896.issue27513@psf.upfronthosting.co.za> Message-ID: <1559286716.64.0.445256606665.issue27513@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 03:39:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 May 2019 07:39:53 +0000 Subject: [issue36548] Make the repr of re flags more readable In-Reply-To: <1554632881.49.0.427945168441.issue36548@roundup.psfhosted.org> Message-ID: <1559288393.68.0.0871978632227.issue36548@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 14a0e16c8805f7ba7c98132ead815dcfdf0e9d33 by Serhiy Storchaka in branch 'master': bpo-36548: Improve the repr of re flags. (GH-12715) https://github.com/python/cpython/commit/14a0e16c8805f7ba7c98132ead815dcfdf0e9d33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 03:40:31 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 31 May 2019 07:40:31 +0000 Subject: [issue37106] python re.escape doesn't escape some special characters. In-Reply-To: <1559277441.34.0.827558992585.issue37106@roundup.psfhosted.org> Message-ID: <1559288431.34.0.687362358683.issue37106@roundup.psfhosted.org> Eric V. Smith added the comment: Could you show a problem caused by the characters that are unescaped? I assume you're talking about the ` and ' characters, since that's what your example shows. But those aren't listed as "special characters" (https://docs.python.org/3.5/library/re.html#regular-expression-syntax), so I'm not sure what problem would be caused by them being unescaped. ---------- nosy: +eric.smith stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 04:26:56 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 31 May 2019 08:26:56 +0000 Subject: [issue26836] Add memfd_create to os module In-Reply-To: <1461506163.13.0.0180353008827.issue26836@psf.upfronthosting.co.za> Message-ID: <1559291216.65.0.27214669585.issue26836@roundup.psfhosted.org> Antoine Pitrou added the comment: Davin, Pierre, it looks like this could simplify lifetime management of shared memory pools, what do you think? ---------- nosy: +davin, pierreglaser, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 04:27:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 May 2019 08:27:50 +0000 Subject: [issue37108] Positional-only arguments break super() Message-ID: <1559291270.55.0.00118529711916.issue37108@roundup.psfhosted.org> New submission from Serhiy Storchaka : See the example pep570super.py. super() without arguments does not work for positional-only arguments. Traceback (most recent call last): File "pep570super.py", line 13, in print(C()) File "pep570super.py", line 10, in __new__ return super().__new__(cls) RuntimeError: super(): no arguments ---------- components: Interpreter Core files: pep570super.py messages: 344034 nosy: ncoghlan, pablogsal, serhiy.storchaka priority: normal severity: normal status: open title: Positional-only arguments break super() type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file48379/pep570super.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 04:29:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 May 2019 08:29:43 +0000 Subject: [issue31829] Portability issues with pickle In-Reply-To: <1508521289.37.0.213398074469.issue31829@psf.upfronthosting.co.za> Message-ID: <1559291383.34.0.925740567494.issue31829@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 38ab7d4721b422547f7b46b9d68968863fa70573 by Serhiy Storchaka in branch 'master': bpo-31829: Make protocol 0 pickles be loadable in text mode in Python 2. (GH-11859) https://github.com/python/cpython/commit/38ab7d4721b422547f7b46b9d68968863fa70573 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 04:29:50 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 08:29:50 +0000 Subject: [issue31829] Portability issues with pickle In-Reply-To: <1508521289.37.0.213398074469.issue31829@psf.upfronthosting.co.za> Message-ID: <1559291390.95.0.553753419267.issue31829@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13579 pull_request: https://github.com/python/cpython/pull/13693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 04:30:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 May 2019 08:30:40 +0000 Subject: [issue35144] TemporaryDirectory clean-up fails with unsearchable directories In-Reply-To: <1541148008.66.0.788709270274.issue35144@psf.upfronthosting.co.za> Message-ID: <1559291440.8.0.737313765677.issue35144@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset e9b51c0ad81da1da11ae65840ac8b50a8521373c by Serhiy Storchaka in branch 'master': bpo-26660, bpo-35144: Fix permission errors in TemporaryDirectory cleanup. (GH-10320) https://github.com/python/cpython/commit/e9b51c0ad81da1da11ae65840ac8b50a8521373c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 04:30:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 May 2019 08:30:40 +0000 Subject: [issue26660] tempfile.TemporaryDirectory() cleanup exception if nonwriteable or non-searchable files or directories created In-Reply-To: <1459203748.81.0.389724870435.issue26660@psf.upfronthosting.co.za> Message-ID: <1559291440.87.0.262383846863.issue26660@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset e9b51c0ad81da1da11ae65840ac8b50a8521373c by Serhiy Storchaka in branch 'master': bpo-26660, bpo-35144: Fix permission errors in TemporaryDirectory cleanup. (GH-10320) https://github.com/python/cpython/commit/e9b51c0ad81da1da11ae65840ac8b50a8521373c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 04:45:22 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 31 May 2019 08:45:22 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1559292322.98.0.74763566179.issue12178@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 04:51:15 2019 From: report at bugs.python.org (MANI M) Date: Fri, 31 May 2019 08:51:15 +0000 Subject: [issue37106] python re.escape doesn't escape some special characters. In-Reply-To: <1559277441.34.0.827558992585.issue37106@roundup.psfhosted.org> Message-ID: <1559292675.45.0.790019282868.issue37106@roundup.psfhosted.org> MANI M added the comment: I've scripts which insert data into MySQL database. The values may contain symbols. Hence in order to escape that I use re.escape(). @erik.smith isn't re.escape() supposed to escape all the symbols. If not why is this introduced in 3.7 whereas previous versions behave differently. Example snippet: import pymysql from re import escape def db_connection(): ...... ...... ...... # This throws error. query = " insert into table(column) values('{}'.format(escape("Hello'`~world"))) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 04:52:17 2019 From: report at bugs.python.org (Antony Lee) Date: Fri, 31 May 2019 08:52:17 +0000 Subject: [issue37109] Inacurrate documentation regarding return type of math.factorial Message-ID: <1559292737.06.0.619691147167.issue37109@roundup.psfhosted.org> New submission from Antony Lee : https://docs.python.org/3/library/math.html says The following functions are provided by this module. Except when explicitly noted otherwise, all return values are floats. and math.factorial(x) Return x factorial. Raises ValueError if x is not integral or is negative. but math.factorial returns an int (which is perfectly reasonable and just needs to be documented): In [3]: math.factorial(5) Out[3]: 120 ---------- assignee: docs at python components: Documentation messages: 344039 nosy: Antony.Lee, docs at python priority: normal severity: normal status: open title: Inacurrate documentation regarding return type of math.factorial versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 04:54:44 2019 From: report at bugs.python.org (MANI M) Date: Fri, 31 May 2019 08:54:44 +0000 Subject: [issue37106] python re.escape doesn't escape some special characters. In-Reply-To: <1559277441.34.0.827558992585.issue37106@roundup.psfhosted.org> Message-ID: <1559292884.26.0.687467481223.issue37106@roundup.psfhosted.org> MANI M added the comment: sorry my bad query = "insert into table(column) values('{}')".format(escape("Hello'`~world")) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:00:25 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 31 May 2019 09:00:25 +0000 Subject: [issue34368] ftplib __init__ function can't handle 120 or 4xy reply when connect to the server In-Reply-To: <1533877262.72.0.56676864532.issue34368@psf.upfronthosting.co.za> Message-ID: <1559293225.31.0.312163310336.issue34368@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:02:40 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 31 May 2019 09:02:40 +0000 Subject: [issue37106] python re.escape doesn't escape some special characters. In-Reply-To: <1559277441.34.0.827558992585.issue37106@roundup.psfhosted.org> Message-ID: <1559293360.95.0.801127199098.issue37106@roundup.psfhosted.org> Eric V. Smith added the comment: re.escape() is designed to only escape characters that have special meaning in regular expressions. It is not a general purpose escaping mechanism, and it is especially dangerous to use it for building SQL statements. You should be using parameterized SQL queries. See https://en.wikipedia.org/wiki/SQL_injection and for example https://stackoverflow.com/questions/1633332/how-to-put-parameterized-sql-query-into-variable-and-then-execute-in-python In any event, it seems that re.escape() is working as designed, so I'm going to close this. ---------- resolution: -> not a bug stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:07:25 2019 From: report at bugs.python.org (Christoph Zwerschke) Date: Fri, 31 May 2019 09:07:25 +0000 Subject: [issue37110] Clarify hashability of custom class instances Message-ID: <1559293645.61.0.954260937021.issue37110@roundup.psfhosted.org> New submission from Christoph Zwerschke : The Python documentation says about hashability in the glossary (https://docs.python.org/3/glossary.html#term-hashable): "Objects which are instances of user-defined classes are hashable by default." This is not quite true. Objects of a user-defined class with an __eq__ method are not hashable. Maybe it would be better to make this more explicit: "Objects which are instances of user_defined classes without custom __eq__ and __hash__ methods are hashable by default." ---------- assignee: docs at python components: Documentation messages: 344042 nosy: cito, docs at python priority: normal severity: normal status: open title: Clarify hashability of custom class instances type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:09:07 2019 From: report at bugs.python.org (Michael Felt) Date: Fri, 31 May 2019 09:09:07 +0000 Subject: [issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses In-Reply-To: <1559250666.33.0.298262901504.issue35545@roundup.psfhosted.org> Message-ID: <15e4d03c-a672-b181-6861-591f8d5e5767@felt.demon.nl> Michael Felt added the comment: On 30/05/2019 23:11, Andrew Svetlov wrote: > Andrew Svetlov added the comment: > > Guys, thank you for investigation. > If there is AIX "idiosyncrasy" -- please feel free to skip failed tests on AIX. > > If you have access to AIX box it would be much easier for you. I can only look at Python buildbot statuses. OK. I'll setup a skip test - but also try to get more info from IBM and/or discover the root cause myself. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:12:33 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 31 May 2019 09:12:33 +0000 Subject: [issue37104] logging.Logger.disabled is not documented In-Reply-To: <1559253809.15.0.569168617436.issue37104@roundup.psfhosted.org> Message-ID: <1559293953.71.0.701492195258.issue37104@roundup.psfhosted.org> Vinay Sajip added the comment: Thanks for looking at this, Mario, but I'd rather not document this attribute, for the reason stated on the PR when I closed it: "I'd like to avoid documenting this attribute, as it's really meant for internal use by the configuration machinery. I realise that it's named disabled rather than _disabled, which might indicate that it's public, but it isn't meant to be, and the name can't be changed now for compatibility reasons, in case some code somewhere is relying on it! I don't want someone to ask for "disabled" to be explicitly supported in configurations, for instance - I can currently argue that it's not meant to be public, as it isn't documented." ---------- nosy: +vinay.sajip resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:20:07 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 31 May 2019 09:20:07 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable In-Reply-To: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> Message-ID: <1559294407.57.0.948893705795.issue37101@roundup.psfhosted.org> Vinay Sajip added the comment: I grant that your version is more compact, but I don't find it more readable in general (perhaps it is for very experienced Python developers/developers who like a functional style, but I persoanlly don't think it improves readability). Since the rationale proposed for making this change is "efficiency", I would like to see some real-world performance numbers to back this up. Can you please provide some quantitative data on the amount of speedup achievable in real-world scenarios? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:23:10 2019 From: report at bugs.python.org (Jeffrey Kintscher) Date: Fri, 31 May 2019 09:23:10 +0000 Subject: [issue35964] shutil.make_archive (xxx, tar, root_dir) is adding './' entry to archive which is wrong In-Reply-To: <1549888846.57.0.721579437713.issue35964@roundup.psfhosted.org> Message-ID: <1559294590.19.0.379194384441.issue35964@roundup.psfhosted.org> Change by Jeffrey Kintscher : ---------- nosy: +Jeffrey.Kintscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:23:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 31 May 2019 09:23:34 +0000 Subject: [issue37109] Inacurrate documentation regarding return type of math.factorial In-Reply-To: <1559292737.06.0.619691147167.issue37109@roundup.psfhosted.org> Message-ID: <1559294614.99.0.867079401243.issue37109@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Is this same as issue25735 ? ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:27:15 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 09:27:15 +0000 Subject: [issue21314] Document '/' in signatures In-Reply-To: <1397988439.5.0.703056699862.issue21314@psf.upfronthosting.co.za> Message-ID: <1559294835.43.0.636160521572.issue21314@roundup.psfhosted.org> Terry J. Reedy added the comment: Hooray! Now that PEP570 is implemented in 3.8: >>> def f(a, /, *, b): return 3 ... >>> f(0, b=2) 3 # other combinations raise and somewhat documented, ('/' in grammar of '8.6 Function definitions', though not explained, should its status become final and listing moved? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:29:34 2019 From: report at bugs.python.org (Antony Lee) Date: Fri, 31 May 2019 09:29:34 +0000 Subject: [issue37109] Inacurrate documentation regarding return type of math.factorial In-Reply-To: <1559292737.06.0.619691147167.issue37109@roundup.psfhosted.org> Message-ID: <1559294974.58.0.635158066796.issue37109@roundup.psfhosted.org> Antony Lee added the comment: oops, missed that, thanks for pointing that out. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:36:56 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 31 May 2019 09:36:56 +0000 Subject: [issue26835] Add file-sealing ops to fcntl In-Reply-To: <1461505999.3.0.387096384665.issue26835@psf.upfronthosting.co.za> Message-ID: <1559295416.46.0.580239046628.issue26835@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +13580 pull_request: https://github.com/python/cpython/pull/13694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:42:48 2019 From: report at bugs.python.org (PEW's Corner) Date: Fri, 31 May 2019 09:42:48 +0000 Subject: [issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode In-Reply-To: <1553387625.02.0.693122073587.issue36411@roundup.psfhosted.org> Message-ID: <1559295768.78.0.38760271478.issue36411@roundup.psfhosted.org> PEW's Corner added the comment: Your proposal sounds good to me, Jeffrey. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:44:08 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 31 May 2019 09:44:08 +0000 Subject: [issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE In-Reply-To: <1532867889.16.0.56676864532.issue34271@psf.upfronthosting.co.za> Message-ID: <1559295848.08.0.966831914805.issue34271@roundup.psfhosted.org> Christian Heimes added the comment: New changeset c7f7069e77c58e83b847c0bfe4d5aadf6add2e68 by Christian Heimes in branch 'master': bpo-34271: Add ssl debugging helpers (GH-10031) https://github.com/python/cpython/commit/c7f7069e77c58e83b847c0bfe4d5aadf6add2e68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:46:39 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 09:46:39 +0000 Subject: [issue36379] nb_inplace_pow is always called with an invalid argument In-Reply-To: <1553083293.5.0.811205671176.issue36379@roundup.psfhosted.org> Message-ID: <1559295999.83.0.79835293949.issue36379@roundup.psfhosted.org> miss-islington added the comment: New changeset c7f803b08ed5211701c75f98ba9ada85d45ac155 by Miss Islington (bot) (Zackery Spytz) in branch 'master': bpo-36379: __ipow__ must be a ternaryfunc, not a binaryfunc (GH-13546) https://github.com/python/cpython/commit/c7f803b08ed5211701c75f98ba9ada85d45ac155 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:46:49 2019 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 31 May 2019 09:46:49 +0000 Subject: [issue34368] ftplib __init__ function can't handle 120 or 4xy reply when connect to the server In-Reply-To: <1533877262.72.0.56676864532.issue34368@psf.upfronthosting.co.za> Message-ID: <1559296009.49.0.116708026735.issue34368@roundup.psfhosted.org> Giampaolo Rodola' added the comment: >From RFC-959: If the server is unable to accept input right away, a 120 "expected delay" reply should be sent immediately and a 220 reply when ready. The user will then know not to hang up if there is a delay. Seems to make sense. Willing to provide a patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:53:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 31 May 2019 09:53:36 +0000 Subject: [issue37109] Inacurrate documentation regarding return type of math.factorial In-Reply-To: <1559292737.06.0.619691147167.issue37109@roundup.psfhosted.org> Message-ID: <1559296416.09.0.17085036923.issue37109@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> duplicate superseder: -> math.factorial doc should mention integer return type _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:57:21 2019 From: report at bugs.python.org (Antony Lee) Date: Fri, 31 May 2019 09:57:21 +0000 Subject: [issue37109] Inacurrate documentation regarding return type of math.factorial In-Reply-To: <1559292737.06.0.619691147167.issue37109@roundup.psfhosted.org> Message-ID: <1559296641.87.0.27425911521.issue37109@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 05:57:34 2019 From: report at bugs.python.org (Jonathan) Date: Fri, 31 May 2019 09:57:34 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode Message-ID: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> New submission from Jonathan : Python is inconsistent in how it handles errors that have some unicode characters. It works to screen but fails to log This works: ``` >>> import logging >>> logging.error('???1') ERROR:root:???1 ``` The following breaks: ``` >>> import logging >>> logging.basicConfig(filename='c:\\my_log.log') >>> logging.error('???1') ``` This raises a unicode error: UnicodeEncodeError: 'charmap' codec can't encode characters in position 11-13: character maps to Python 3.6.3 Given that the file created by the logger is utf-8, it's unclear why it doesn't work. I found a workaround by using a Handler, but surely the loggers should all work the same way so that people don't get unpleasant surprises that even more painful to debug when things only break in certain logging modes? ---------- messages: 344053 nosy: jonathan-lp priority: normal severity: normal status: open title: Logging - Inconsistent behaviour when handling unicode versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 06:00:35 2019 From: report at bugs.python.org (Mario Corchero) Date: Fri, 31 May 2019 10:00:35 +0000 Subject: [issue37104] logging.Logger.disabled is not documented In-Reply-To: <1559253809.15.0.569168617436.issue37104@roundup.psfhosted.org> Message-ID: <1559296835.23.0.177747176208.issue37104@roundup.psfhosted.org> Mario Corchero added the comment: Thanks! I was wondering about it but saw no comment about it, issue or anything in the history. At least we have now this issue :). Would you like that I move this to `_disabled` and have a setter for `disabled` that emits a deprecation warning so we can remove this someday or at least make it more explicit that it should not be used? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 06:12:13 2019 From: report at bugs.python.org (Michael Felt) Date: Fri, 31 May 2019 10:12:13 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1559297533.18.0.0150048259853.issue36889@roundup.psfhosted.org> Michael Felt added the comment: FYI: since: commit 23b4b697e5b6cc897696f9c0288c187d2d24bff2 Author: Andrew Svetlov Date: Mon May 27 22:56:22 2019 +0300 bpo-36889: Merge asyncio streams (GH-13251) https://bugs.python.org/issue36889 AIX bot 'hangs' during test_sendfile (test.test_asyncio.test_streams.StreamTests) ctrl-c gives this (in case useful) Warning -- 'test_asyncio' left behind file '@test_7012552_tmp' Warning -- asyncio.events._event_loop_policy was modified by test_asyncio Before: None After: == Tests result: INTERRUPTED == Test suite interrupted by signal SIGINT. 1 test omitted: test_asyncio Total duration: 13 min 36 sec Tests result: INTERRUPTED /data/prj/python/git/python3-3.8/Lib/asyncio/base_events.py:646: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False> _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback Exception ignored in: .test at 0x30576ed0> Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/test/test_asyncio/test_streams.py", line 1643, in test await do_connect(*srv.sockets[0].getsockname()) File "/data/prj/python/git/python3-3.8/Lib/asyncio/streams.py", line 314, in __aexit__ await self.close() File "/data/prj/python/git/python3-3.8/Lib/asyncio/streams.py", line 292, in close await tasks.wait([stream.close() for stream in streams]) File "/data/prj/python/git/python3-3.8/Lib/asyncio/streams.py", line 292, in await tasks.wait([stream.close() for stream in streams]) File "/data/prj/python/git/python3-3.8/Lib/asyncio/streams.py", line 1382, in close self._transport.close() File "/data/prj/python/git/python3-3.8/Lib/asyncio/selector_events.py", line 680, in close self._loop.call_soon(self._call_connection_lost, None) File "/data/prj/python/git/python3-3.8/Lib/asyncio/base_events.py", line 711, in call_soon self._check_closed() File "/data/prj/python/git/python3-3.8/Lib/asyncio/base_events.py", line 504, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed /data/prj/python/git/python3-3.8/Lib/asyncio/streams.py:352: ResourceWarning: unclosed stream server _warn(f"unclosed stream server {self!r}", ResourceWarning: Enable tracemalloc to get the object allocation traceback /data/prj/python/git/python3-3.8/Lib/asyncio/selector_events.py:684: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=7> _warn(f"unclosed transport {self!r}", ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback /data/prj/python/git/python3-3.8/Lib/asyncio/selector_events.py:684: ResourceWarning: unclosed transport <_SelectorSocketTransport closing fd=8> _warn(f"unclosed transport {self!r}", ResourceWarning, source=self) ResourceWarning: Enable tracemalloc to get the object allocation traceback ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 06:13:28 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 31 May 2019 10:13:28 +0000 Subject: [issue37104] logging.Logger.disabled is not documented In-Reply-To: <1559253809.15.0.569168617436.issue37104@roundup.psfhosted.org> Message-ID: <1559297608.66.0.992892030253.issue37104@roundup.psfhosted.org> Vinay Sajip added the comment: As it's not documented, people would come across it by browsing the source. I'd just mention in the source (Logger constructor) that it's for internal use, and leave it at that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 06:17:36 2019 From: report at bugs.python.org (Michael Felt) Date: Fri, 31 May 2019 10:17:36 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1559297856.59.0.774673004522.issue36889@roundup.psfhosted.org> Michael Felt added the comment: hmm - i had just synced with master. must have just missed something since there is a strike-out through GH-13251. If so, please ignore. BBL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 06:26:25 2019 From: report at bugs.python.org (Mario Corchero) Date: Fri, 31 May 2019 10:26:25 +0000 Subject: [issue37104] logging.Logger.disabled is not documented In-Reply-To: <1559253809.15.0.569168617436.issue37104@roundup.psfhosted.org> Message-ID: <1559298385.94.0.760382051575.issue37104@roundup.psfhosted.org> Mario Corchero added the comment: Note that even if not in the standard library I've seen this attributed used and documented quite often. Example: https://docs.python-guide.org/writing/logging/#or-print I would really suggest making it private as mentioned before to make sure this does not happen, but if you still prefer just a comment (as in source comment, not even documentation) I'll go with that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 06:27:59 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 31 May 2019 10:27:59 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559298479.09.0.14520712893.issue37111@roundup.psfhosted.org> SilentGhost added the comment: > Given that the file created by the logger is utf-8 I don't think this is true. Default file handler created using filename argument is opened with encoding None (meaning that it relies on system-default encoding, which is on Windows is not utf-8). And it also explains why your work-around works, provided you've opened file handler with explicit utf-8 encoding. ---------- nosy: +SilentGhost, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 06:28:08 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 31 May 2019 10:28:08 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559298488.15.0.71621772727.issue37111@roundup.psfhosted.org> Change by SilentGhost : ---------- versions: +Python 3.7, Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 06:42:59 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 10:42:59 +0000 Subject: [issue37108] Positional-only arguments break super() In-Reply-To: <1559291270.55.0.00118529711916.issue37108@roundup.psfhosted.org> Message-ID: <1559299379.54.0.708278245871.issue37108@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13581 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 06:54:49 2019 From: report at bugs.python.org (Jonathan) Date: Fri, 31 May 2019 10:54:49 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559300089.66.0.931330771539.issue37111@roundup.psfhosted.org> Jonathan added the comment: It definitely claims to be "utf-8" in NotePad++. I've attached it if you want to double-check. (Windows 7) ---------- Added file: https://bugs.python.org/file48380/my_log.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 06:58:06 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 31 May 2019 10:58:06 +0000 Subject: [issue18911] minidom does not encode correctly when calling Document.writexml In-Reply-To: <1378186619.58.0.930376227557.issue18911@psf.upfronthosting.co.za> Message-ID: <1559300286.03.0.124864502787.issue18911@roundup.psfhosted.org> Stefan Behnel added the comment: Asking users unconditionally to use the "xmlcharrefreplace" replacement method seems wrong for UTF-8. It should not be necessary. We should, however, document explicitly that the file will receive text and not bytes, i.e. that users are themselves responsible for opening the output file with the desired encoding. We should also make it clearer that the "encoding" argument to writexml() does not change that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 07:07:59 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 11:07:59 +0000 Subject: [issue37108] Positional-only arguments break super() In-Reply-To: <1559291270.55.0.00118529711916.issue37108@roundup.psfhosted.org> Message-ID: <1559300879.45.0.139534717911.issue37108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 3a46d5c293d39995dc5218bf46a7d92b16fb2a15 by Pablo Galindo in branch 'master': bpo-37108: Support super with methods that use positional-only arguments (GH-13695) https://github.com/python/cpython/commit/3a46d5c293d39995dc5218bf46a7d92b16fb2a15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 07:08:42 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 11:08:42 +0000 Subject: [issue37108] Positional-only arguments break super() In-Reply-To: <1559291270.55.0.00118529711916.issue37108@roundup.psfhosted.org> Message-ID: <1559300922.24.0.920763389407.issue37108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thank you very much, Serhiy, for the catch! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 07:12:12 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 31 May 2019 11:12:12 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559301132.97.0.782474197702.issue37111@roundup.psfhosted.org> Change by SilentGhost : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 07:31:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 May 2019 11:31:31 +0000 Subject: [issue37112] Error in compilig the AST for functions with optional positional arguments Message-ID: <1559302291.91.0.202997088134.issue37112@roundup.psfhosted.org> New submission from Serhiy Storchaka : >>> import ast >>> sample = 'def f(a=1, /): pass' >>> compile(sample, '?', 'exec') at 0x7f7cacdfd5c0, file "?", line 1> >>> compile(ast.parse(sample, '?'), '?', 'exec') Traceback (most recent call last): File "", line 1, in ValueError: more positional defaults than args on arguments ---------- components: Interpreter Core messages: 344064 nosy: benjamin.peterson, brett.cannon, pablogsal, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: Error in compilig the AST for functions with optional positional arguments type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 07:32:40 2019 From: report at bugs.python.org (Richard Neumann) Date: Fri, 31 May 2019 11:32:40 +0000 Subject: =?utf-8?b?W2lzc3VlMzcxMTNdICfDnycudXBwZXIoKSBzaG91bGQgcmV0dXJuICfhup4n?= Message-ID: <1559302360.96.0.658137467016.issue37113@roundup.psfhosted.org> New submission from Richard Neumann : Currently, calling the method .upper() on a string containing '?' will replace this character by 'SS'. It should, however, be replaced by '?'. ---------- components: Unicode messages: 344065 nosy: Richard Neumann, ezio.melotti, vstinner priority: normal severity: normal status: open title: '?'.upper() should return '?' type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 07:33:30 2019 From: report at bugs.python.org (Richard Neumann) Date: Fri, 31 May 2019 11:33:30 +0000 Subject: =?utf-8?b?W2lzc3VlMzcxMTNdICfDnycudXBwZXIoKSBzaG91bGQgcmV0dXJuICfhup4n?= In-Reply-To: <1559302360.96.0.658137467016.issue37113@roundup.psfhosted.org> Message-ID: <1559302410.92.0.594487493597.issue37113@roundup.psfhosted.org> Richard Neumann added the comment: See also: https://en.wikipedia.org/wiki/Capital_%E1%BA%9E ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 07:39:09 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 31 May 2019 11:39:09 +0000 Subject: =?utf-8?b?W2lzc3VlMzcxMTNdICfDnycudXBwZXIoKSBzaG91bGQgcmV0dXJuICfhup4n?= In-Reply-To: <1559302360.96.0.658137467016.issue37113@roundup.psfhosted.org> Message-ID: <1559302749.56.0.0837232018264.issue37113@roundup.psfhosted.org> SilentGhost added the comment: Python implements Unicode standard when it comes to capitalisation rules. According to the latest standard '?' is upper-cased to 'SS'. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 07:52:56 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 31 May 2019 11:52:56 +0000 Subject: =?utf-8?b?W2lzc3VlMzcxMTNdICfDnycudXBwZXIoKSBzaG91bGQgcmV0dXJuICfhup4n?= In-Reply-To: <1559302360.96.0.658137467016.issue37113@roundup.psfhosted.org> Message-ID: <1559303576.46.0.440943381347.issue37113@roundup.psfhosted.org> Eric V. Smith added the comment: See http://unicode.org/faq/casemap_charprop.html, search for "Why does ? (U+00DF LATIN SMALL LETTER SHARP S) not uppercase to U+1E9E LATIN CAPITAL LETTER SHARP S by default?" ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 08:01:53 2019 From: report at bugs.python.org (SilentGhost) Date: Fri, 31 May 2019 12:01:53 +0000 Subject: [issue37092] LoggerAdapter doesn't have fatal() like Logger In-Reply-To: <1559171022.38.0.633277520355.issue37092@roundup.psfhosted.org> Message-ID: <1559304113.89.0.994101986906.issue37092@roundup.psfhosted.org> SilentGhost added the comment: fatal is an undocumented feature, it's probably better not to use it in the first place. ---------- nosy: +SilentGhost, vinay.sajip versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 08:35:18 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 12:35:18 +0000 Subject: [issue37112] Error in compilig the AST for functions with optional positional arguments In-Reply-To: <1559302291.91.0.202997088134.issue37112@roundup.psfhosted.org> Message-ID: <1559306118.5.0.794546104247.issue37112@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- assignee: -> pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 08:40:18 2019 From: report at bugs.python.org (Akilesh K) Date: Fri, 31 May 2019 12:40:18 +0000 Subject: [issue37114] lstrip remove extra characters in the presence of a matching number Message-ID: <1559306418.29.0.0735578073723.issue37114@roundup.psfhosted.org> New submission from Akilesh K : When the argument to lstrip / strip has a number and it matches the string it begins to act different. >>> text = "apiv1appliance" >>> text.strip("apiv1") 'liance' >>> text.strip("apiv2") '1appliance' >>> text.strip("a") 'piv1appliance' >>> text.strip("ap") 'iv1appliance' >>> text.strip("api") 'v1appliance' >>> text.strip("apiv") '1appliance' >>> text.strip("apiv1") 'liance' >>> text.strip("apiv2") '1appliance' ---------- messages: 344070 nosy: Akilesh K priority: normal severity: normal status: open title: lstrip remove extra characters in the presence of a matching number type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 08:41:29 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 12:41:29 +0000 Subject: [issue37112] Error in compilig the AST for functions with optional positional arguments In-Reply-To: <1559302291.91.0.202997088134.issue37112@roundup.psfhosted.org> Message-ID: <1559306489.86.0.474477233294.issue37112@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13582 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 08:41:55 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 12:41:55 +0000 Subject: [issue37112] Error in compilig the AST for functions with optional positional arguments In-Reply-To: <1559302291.91.0.202997088134.issue37112@roundup.psfhosted.org> Message-ID: <1559306515.84.0.823821767302.issue37112@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks again, Serhiy :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 08:43:05 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 31 May 2019 12:43:05 +0000 Subject: [issue37114] lstrip remove extra characters in the presence of a matching number In-Reply-To: <1559306418.29.0.0735578073723.issue37114@roundup.psfhosted.org> Message-ID: <1559306585.67.0.668529993969.issue37114@roundup.psfhosted.org> Christian Heimes added the comment: It's not a bug. strip() does not work like you think. Please read the documentation https://docs.python.org/3/library/stdtypes.html?highlight=strip#str.strip ---------- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 09:00:46 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 13:00:46 +0000 Subject: [issue37112] Error in compilig the AST for functions with optional positional-only arguments In-Reply-To: <1559302291.91.0.202997088134.issue37112@roundup.psfhosted.org> Message-ID: <1559307646.58.0.73274585308.issue37112@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- title: Error in compilig the AST for functions with optional positional arguments -> Error in compilig the AST for functions with optional positional-only arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 09:05:20 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 31 May 2019 13:05:20 +0000 Subject: [issue29447] Add/check os.PathLike support for the tempfile module's 'dir' arguments In-Reply-To: <1486273182.96.0.640027026479.issue29447@psf.upfronthosting.co.za> Message-ID: <1559307920.6.0.592479371084.issue29447@roundup.psfhosted.org> Cheryl Sabella added the comment: The pull request attached to this issue has been closed as the repository was marked as unknown. This issue is now available for a new pull request. ---------- nosy: +cheryl.sabella stage: -> needs patch versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 09:09:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 13:09:54 +0000 Subject: [issue37112] Error in compilig the AST for functions with optional positional-only arguments In-Reply-To: <1559302291.91.0.202997088134.issue37112@roundup.psfhosted.org> Message-ID: <1559308194.45.0.964929083186.issue37112@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 2f58a84104ef64f71deb71d264305bcd73e59c97 by Pablo Galindo in branch 'master': bpo-37112: Allow compile to work on AST with positional only arguments with defaults (GH-13697) https://github.com/python/cpython/commit/2f58a84104ef64f71deb71d264305bcd73e59c97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 09:10:05 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 13:10:05 +0000 Subject: [issue37112] Error in compilig the AST for functions with optional positional-only arguments In-Reply-To: <1559302291.91.0.202997088134.issue37112@roundup.psfhosted.org> Message-ID: <1559308205.35.0.287408033891.issue37112@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 09:23:41 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 13:23:41 +0000 Subject: [issue37115] Support annotations in positional-only arguments Message-ID: <1559309021.21.0.994521369613.issue37115@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- components: Interpreter Core nosy: pablogsal priority: normal severity: normal status: open title: Support annotations in positional-only arguments versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 09:25:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 13:25:06 +0000 Subject: [issue37115] Support annotations in positional-only arguments Message-ID: <1559309106.06.0.454749102583.issue37115@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +13583 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13698 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 09:26:16 2019 From: report at bugs.python.org (Dale Visser) Date: Fri, 31 May 2019 13:26:16 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable In-Reply-To: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> Message-ID: <1559309176.17.0.717808680311.issue37101@roundup.psfhosted.org> Dale Visser added the comment: It is with great surprise and sadness that I report that I found that performance measurements don't support merging this change. I'm attaching my performance test script. I ran it with/without the logging filters for 1000000 iterations, e.g., ./python all 1000000 The results on my system were as follows, where the numbers may be interpreted as milliseconds per 1000 log messages: No Filters 3 Filters master 17.9 19.8 CBO-37101 19.6 23.1 I imagine I could put a guard 'if' statement that would restore the 'no filters' performance to match 'master', but my use of generators apparently causes the use of significantly more cycles than the existing code. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed Added file: https://bugs.python.org/file48381/test_filter_perf.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 09:45:40 2019 From: report at bugs.python.org (Dale Visser) Date: Fri, 31 May 2019 13:45:40 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable In-Reply-To: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> Message-ID: <1559310340.43.0.438717021696.issue37101@roundup.psfhosted.org> Dale Visser added the comment: Correction on that example of running the test script: ./python test_filter_perf.py all 1000000 I simply prepended this with the Linux `time` command for measuring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 10:08:06 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 31 May 2019 14:08:06 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559311686.38.0.138561601848.issue36974@roundup.psfhosted.org> Petr Viktorin added the comment: I found an issue in PEP 590: When inheriting a heap subclass from a vectorcall class that sets .tp_call=PyVectorcall_Call (as recommended), the subclass does not inherit _Py_TPFLAGS_HAVE_VECTORCALL, and thus PyVectorcall_Call does not work for it. Possible solutions come to mind: - Inherit tp_vectorcall_offset more normally but handle setting __call__ specially - Inherit tp_vectorcall_offset (but not _Py_TPFLAGS_HAVE_VECTORCALL) more normally, and make PyVectorcall_Call ignore _Py_TPFLAGS_HAVE_VECTORCALL I'll send a PR for the latter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 10:19:55 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 14:19:55 +0000 Subject: [issue37115] Support annotations in positional-only arguments Message-ID: <1559312395.08.0.406212854564.issue37115@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : New changeset a0c01bf1364f2996bb0186ddfc41d74350e01c39 by Pablo Galindo in branch 'master': bpo-37115: Support annotations in positional-only arguments (GH-13698) https://github.com/python/cpython/commit/a0c01bf1364f2996bb0186ddfc41d74350e01c39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 10:20:04 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 14:20:04 +0000 Subject: [issue37115] Support annotations in positional-only arguments In-Reply-To: <1559312395.08.0.406212854564.issue37115@roundup.psfhosted.org> Message-ID: <1559312404.66.0.200914122844.issue37115@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 10:20:40 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 31 May 2019 14:20:40 +0000 Subject: [issue36974] Implement PEP 590 In-Reply-To: <1559154718.16.0.347735090162.issue36974@roundup.psfhosted.org> Message-ID: <1559312440.12.0.832772654553.issue36974@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +13584 pull_request: https://github.com/python/cpython/pull/13699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 10:47:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 May 2019 14:47:41 +0000 Subject: [issue37116] Use PEP 570 syntax for positional-only parameters Message-ID: <1559314061.29.0.391357031696.issue37116@roundup.psfhosted.org> New submission from Serhiy Storchaka : Two PRs apply PEP 570 syntax to the existing code. PR 13700 contains only compatible changes and can be applied to 3.8. It removes existing *args or naming tricks and makes self and cls arguments positional-only (if needed). PR 12620 contains breaking changes and can be applied only to 3.9. It converts deprecation warnings introduced in 3.8 into errors. ---------- components: Library (Lib) messages: 344079 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Use PEP 570 syntax for positional-only parameters type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 10:48:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 May 2019 14:48:31 +0000 Subject: [issue37116] Use PEP 570 syntax for positional-only parameters In-Reply-To: <1559314061.29.0.391357031696.issue37116@roundup.psfhosted.org> Message-ID: <1559314111.6.0.505974857952.issue37116@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +13585 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 10:48:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 May 2019 14:48:50 +0000 Subject: [issue37116] Use PEP 570 syntax for positional-only parameters In-Reply-To: <1559314061.29.0.391357031696.issue37116@roundup.psfhosted.org> Message-ID: <1559314130.23.0.0427539340194.issue37116@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +13586 pull_request: https://github.com/python/cpython/pull/12620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 11:21:12 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 31 May 2019 15:21:12 +0000 Subject: [issue37092] LoggerAdapter doesn't have fatal() like Logger In-Reply-To: <1559171022.38.0.633277520355.issue37092@roundup.psfhosted.org> Message-ID: <1559316072.86.0.102990508903.issue37092@roundup.psfhosted.org> Vinay Sajip added the comment: FATAL and fatal() are synonyms for CRITICAL and critical(), and they are only around because of backward compatibility constraints on the Logger class at the time logging was added to Python. Because LoggerAdapter has no backward compatibility constraints, fatal() wasn't provided there - but critical() is, and can be used equivalently. Note that FATAL, fatal() are not documented as they are a legacy and not intended to be used - use CRITICAL and critical() instead. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 11:37:20 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 31 May 2019 15:37:20 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559317040.27.0.794708667703.issue37111@roundup.psfhosted.org> Vinay Sajip added the comment: > Given that the file created by the logger is utf-8, it's unclear why it doesn't work ... I found a workaround by using a Handler Loggers don't create files - handlers do. The file that you attached seems to be just a text file containing ASCII text. Any ASCII is also utf-8, so Notepad++'s assertion doesn't mean anything in this situation. > so that people don't get unpleasant surprises that even more painful to debug when things only break in certain logging modes? People have been using logging, on Windows, without problems, for years, often using utf-8 to encode their log files. Perhaps you need to read the documentation and look at examples more carefully - I'm not intending to be rude, but say that because using a handler isn't some kind of workaround, and you thinking that it was indicates that you're not sufficiently familiar with the documentation. I'd suggest posting questions on Stack Overflow or the python-list mailing list, to establish whether there really seems to be a Python bug, before actually logging a Python issue. I appreciate that you're trying to improve Python. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 11:51:44 2019 From: report at bugs.python.org (Inada Naoki) Date: Fri, 31 May 2019 15:51:44 +0000 Subject: [issue37029] PyObject_Free is O(N) where N = # of arenas In-Reply-To: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> Message-ID: <1559317904.9.0.997183300607.issue37029@roundup.psfhosted.org> Inada Naoki added the comment: master: build time 0:48:53.664428 teardown time 4:58:20.132930 patched: build time 0:48:08.485639 teardown time 0:01:10.466707 About 250x speedup! ---------- Added file: https://bugs.python.org/file48382/result.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:01:53 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 31 May 2019 16:01:53 +0000 Subject: [issue37029] PyObject_Free is O(N) where N = # of arenas In-Reply-To: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> Message-ID: <1559318513.49.0.409994917697.issue37029@roundup.psfhosted.org> Tim Peters added the comment: Thank you so much, Inada! That's very good to hear :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:16:39 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 16:16:39 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature In-Reply-To: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> Message-ID: <1559319399.32.0.714942556623.issue36896@roundup.psfhosted.org> Terry J. Reedy added the comment: In msg342227 Pablo Galindo Salgado said "I am +1 to such a sentence, but I think this is a decision that more core devs should agree on." > "These types are not supposed to be instantiated outside of CPython internals" At least Petr Vidtorin and I disagree with this part. As Petr wrote on pydev thread "Expected stability of PyCode_New() and types.CodeType() signatures", there are multiple tools that instantiate code objects, in particular Cython, which is far from being a rogue project. Python is a 'consenting adults' languages, and we generally do not officially tell people what they are 'supposed' to do or not do. ---------- nosy: +petr.viktorin, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:19:15 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 16:19:15 +0000 Subject: [issue37094] Provide an example for TestCase.skipTest in unittest doc In-Reply-To: <1559181003.42.0.162580428843.issue37094@roundup.psfhosted.org> Message-ID: <1559319555.97.0.143128456795.issue37094@roundup.psfhosted.org> miss-islington added the comment: New changeset ffed76b6fc4d7dd0244b662d6e5738eb496d9def by Miss Islington (bot) (Makdon) in branch 'master': bpo-37094: Add example for TestCase.skipTest in unittest doc (GH-13645) https://github.com/python/cpython/commit/ffed76b6fc4d7dd0244b662d6e5738eb496d9def ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:19:34 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 16:19:34 +0000 Subject: [issue37094] Provide an example for TestCase.skipTest in unittest doc In-Reply-To: <1559181003.42.0.162580428843.issue37094@roundup.psfhosted.org> Message-ID: <1559319574.16.0.167230903113.issue37094@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +13587 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:31:58 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 16:31:58 +0000 Subject: [issue37094] Provide an example for TestCase.skipTest in unittest doc In-Reply-To: <1559181003.42.0.162580428843.issue37094@roundup.psfhosted.org> Message-ID: <1559320318.61.0.536681899396.issue37094@roundup.psfhosted.org> miss-islington added the comment: New changeset 8135455c840b9e169a6cd527cb1ee922cafb9109 by Miss Islington (bot) in branch '3.7': bpo-37094: Add example for TestCase.skipTest in unittest doc (GH-13645) https://github.com/python/cpython/commit/8135455c840b9e169a6cd527cb1ee922cafb9109 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:32:36 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 31 May 2019 16:32:36 +0000 Subject: [issue26835] Add file-sealing ops to fcntl In-Reply-To: <1461505999.3.0.387096384665.issue26835@psf.upfronthosting.co.za> Message-ID: <1559320356.76.0.0138339331952.issue26835@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 8cbb5b6625268400d6e9092b75b06d6f90398dc9 by Christian Heimes in branch 'master': bpo-26835: Add file sealing constants to fcntl (GH-13694) https://github.com/python/cpython/commit/8cbb5b6625268400d6e9092b75b06d6f90398dc9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:41:34 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 31 May 2019 16:41:34 +0000 Subject: [issue25735] math.factorial doc should mention integer return type In-Reply-To: <1448480671.49.0.139605050425.issue25735@psf.upfronthosting.co.za> Message-ID: <1559320894.7.0.240927181437.issue25735@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset 4612671df2742eade8ecf8003a6ce1247973c135 by Cheryl Sabella (Akshay Sharma) in branch 'master': bpo-25735: math.factorial doc should mention integer return type (GH-6420) https://github.com/python/cpython/commit/4612671df2742eade8ecf8003a6ce1247973c135 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:43:16 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 16:43:16 +0000 Subject: [issue25735] math.factorial doc should mention integer return type In-Reply-To: <1448480671.49.0.139605050425.issue25735@psf.upfronthosting.co.za> Message-ID: <1559320996.95.0.394657720222.issue25735@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13588 pull_request: https://github.com/python/cpython/pull/13702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:43:18 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 31 May 2019 16:43:18 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559320998.36.0.770722114842.issue12639@roundup.psfhosted.org> Steve Dower added the comment: New changeset c8d5bf6c3fa09b43f6a5ee779d493d251dbcc53c by Steve Dower (Zackery Spytz) in branch 'master': bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688) https://github.com/python/cpython/commit/c8d5bf6c3fa09b43f6a5ee779d493d251dbcc53c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:43:45 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 16:43:45 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559321025.3.0.918338937989.issue12639@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13589 pull_request: https://github.com/python/cpython/pull/13703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:43:55 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 16:43:55 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559321035.94.0.704341945716.issue12639@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13590 pull_request: https://github.com/python/cpython/pull/13704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:44:03 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 16:44:03 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559321043.01.0.75057886743.issue12639@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13591 pull_request: https://github.com/python/cpython/pull/13705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:44:19 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 31 May 2019 16:44:19 +0000 Subject: [issue37109] Inacurrate documentation regarding return type of math.factorial In-Reply-To: <1559292737.06.0.619691147167.issue37109@roundup.psfhosted.org> Message-ID: <1559321059.57.0.94847701362.issue37109@roundup.psfhosted.org> Cheryl Sabella added the comment: Thanks for pointing out the other issue. I've now merged it. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:46:16 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 31 May 2019 16:46:16 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559321176.86.0.341600551361.issue12639@roundup.psfhosted.org> Steve Dower added the comment: Thanks, Zackery! The backports are running CI now and should merge if everything passes. ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:46:33 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 31 May 2019 16:46:33 +0000 Subject: [issue25735] math.factorial doc should mention integer return type In-Reply-To: <1448480671.49.0.139605050425.issue25735@psf.upfronthosting.co.za> Message-ID: <1559321193.43.0.508290301974.issue25735@roundup.psfhosted.org> Cheryl Sabella added the comment: @John.Yeung, thank you for the report. @mine0901, thanks for the initial patch and @akshaysharma, thank you for the PR. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:54:17 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 31 May 2019 16:54:17 +0000 Subject: [issue37116] Use PEP 570 syntax for positional-only parameters In-Reply-To: <1559314061.29.0.391357031696.issue37116@roundup.psfhosted.org> Message-ID: <1559321657.07.0.160379323841.issue37116@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 12:58:30 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 16:58:30 +0000 Subject: [issue25735] math.factorial doc should mention integer return type In-Reply-To: <1448480671.49.0.139605050425.issue25735@psf.upfronthosting.co.za> Message-ID: <1559321910.53.0.0551150431978.issue25735@roundup.psfhosted.org> miss-islington added the comment: New changeset fc3b8437c86167983cc75e5a9a3ed1dc542a1b79 by Miss Islington (bot) in branch '3.7': bpo-25735: math.factorial doc should mention integer return type (GH-6420) https://github.com/python/cpython/commit/fc3b8437c86167983cc75e5a9a3ed1dc542a1b79 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 13:06:59 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 31 May 2019 17:06:59 +0000 Subject: [issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs In-Reply-To: <1344422598.39.0.464686614779.issue15590@psf.upfronthosting.co.za> Message-ID: <1559322419.32.0.798391634517.issue15590@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 13:09:42 2019 From: report at bugs.python.org (Michael Haubenwallner) Date: Fri, 31 May 2019 17:09:42 +0000 Subject: [issue36721] Add pkg-config python-3.8-embed and --embed to python3.8-config In-Reply-To: <1556216748.62.0.992604554579.issue36721@roundup.psfhosted.org> Message-ID: <1559322582.98.0.6028268732.issue36721@roundup.psfhosted.org> Change by Michael Haubenwallner : ---------- pull_requests: +13592 pull_request: https://github.com/python/cpython/pull/737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 13:22:21 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 17:22:21 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559323341.17.0.203849574049.issue12639@roundup.psfhosted.org> miss-islington added the comment: New changeset 49fc57abf5fcf60129e460046d78c9bf20a19931 by Miss Islington (bot) in branch '3.7': bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688) https://github.com/python/cpython/commit/49fc57abf5fcf60129e460046d78c9bf20a19931 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 13:38:09 2019 From: report at bugs.python.org (Zachary Ware) Date: Fri, 31 May 2019 17:38:09 +0000 Subject: [issue37094] Provide an example for TestCase.skipTest in unittest doc In-Reply-To: <1559181003.42.0.162580428843.issue37094@roundup.psfhosted.org> Message-ID: <1559324289.74.0.43030014511.issue37094@roundup.psfhosted.org> Zachary Ware added the comment: Thanks for the patch! ---------- nosy: +zach.ware resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 13:43:40 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 17:43:40 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature In-Reply-To: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> Message-ID: <1559324620.65.0.579181055953.issue36896@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Although I completely agree with the decision of figuring out an explicit consensus regarding these APIs, I will explain a bit my +1: My +1 is not about the usage of PyCode_New, is about the usage of `types.CodeType`. The constructor for the later has never been documented on the Python side, so one could argue that is not a supported feature to manually construct code objects. The more we expose and call "stable" regarding internals, the less freedom we will have to apply optimizations and add additional data members to internal structures. With this, I am not saying that we should say that whoever uses this is a "roge" project but marking these APIs as stable will greatly restrict future changes. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 13:47:19 2019 From: report at bugs.python.org (Brett Cannon) Date: Fri, 31 May 2019 17:47:19 +0000 Subject: [issue36839] Support the buffer protocol in code objects In-Reply-To: <1557258986.94.0.539165158195.issue36839@roundup.psfhosted.org> Message-ID: <1559324839.4.0.572294965949.issue36839@roundup.psfhosted.org> Brett Cannon added the comment: RE: "I think it needs significant benefits for typical users, not only for Instagram. If only Instagram get benefit from this, keep it as Instagram's internal patch." But who's typical in this case? You? Me? We're talking code objects, something that the typical Python user doesn't even know exists if you take "typical" to mean "common" or "majority". I suspect if we asked Python developers if they knew what lnotab was an abbreviation of they wouldn't know, let alone how it worked. And just because Instagram did this work and is making it public doesn't mean (a) others wouldn't use it or (b) others are already doing it privately. There are plenty of other companies with massive server installs of Python beyond Instagram. My point is we have to be very careful when we start to claim we know what is typical or useful to the wider community considering how huge and diverse the Python community is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 14:00:24 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 18:00:24 +0000 Subject: [issue36540] PEP 570: Python Positional-Only Parameters In-Reply-To: <1554512763.87.0.931597726758.issue36540@roundup.psfhosted.org> Message-ID: <1559325624.81.0.856428656012.issue36540@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13593 pull_request: https://github.com/python/cpython/pull/13706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 14:03:01 2019 From: report at bugs.python.org (Dale Visser) Date: Fri, 31 May 2019 18:03:01 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable In-Reply-To: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> Message-ID: <1559325781.9.0.0852652297229.issue37101@roundup.psfhosted.org> Dale Visser added the comment: Adding the patch file associated with GitHub pull request #13683, as well as the performance test I just reported. ---------- Added file: https://bugs.python.org/file48383/pr13683.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 14:06:38 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 18:06:38 +0000 Subject: [issue36842] Implement PEP 578 In-Reply-To: <1557262112.79.0.0300199683807.issue36842@roundup.psfhosted.org> Message-ID: <1559325998.34.0.905919167471.issue36842@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +13594 pull_request: https://github.com/python/cpython/pull/13707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 14:12:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 18:12:06 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature In-Reply-To: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> Message-ID: <1559326326.56.0.0625010365834.issue36896@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Being said that, I am very happy with the current changes on the PR :) Thank you @Terry and @Petr for helping with this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 14:39:52 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 18:39:52 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1559327992.24.0.929330604983.issue26826@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset aac4d0342c3e692731c189d003dbd73a8c681a34 by Pablo Galindo in branch 'master': bpo-26826: Expose copy_file_range in the os module (GH-7255) https://github.com/python/cpython/commit/aac4d0342c3e692731c189d003dbd73a8c681a34 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 14:43:25 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 31 May 2019 18:43:25 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559328205.87.0.572445988181.issue12639@roundup.psfhosted.org> Steve Dower added the comment: Looks like the tests need to be customized for 2.7 and 3.6: Traceback (most recent call last): File "D:\a\1\s\lib\test\test_msilib.py", line 64, in test_directory_start_component_keyfile self.addCleanup(db.Close) AttributeError: '_msi.Database' object has no attribute 'Close' I can edit directly in miss-islington's branch, but what's the change? Do we just remove the addCleanup code? Or should we just skip the backport? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 14:44:02 2019 From: report at bugs.python.org (Mario Corchero) Date: Fri, 31 May 2019 18:44:02 +0000 Subject: [issue37117] Simplify customization of the logging time through datefmt Message-ID: <1559328242.82.0.712821467925.issue37117@roundup.psfhosted.org> New submission from Mario Corchero : Users that want to provide a custom template for the timestamp part of logging cannot customize the milliseconds part of asctime. They can use the msecs attribute of the Logger but that effectively requires to break the formatting in two parts. Note that it is not necessary to provide msecs on the default template as there is code that handles it in https://github.com/python/cpython/blob/c8d5bf6c3fa09b43f6a5ee779d493d251dbcc53c/Lib/logging/__init__.py#L603 Something we can do to improve this situation is changing the default converter to produce a datetime rather than a timetuple, as strftime of datetime and time uses the same template format. This will allow changing the format including milliseconds through the datefmt argument. formatter = logging.Formatter("%(asctime)s %(message)s", datefmt="%Y%m%d %H:%M:%S.%f") Compare this to the current soltution: formatter = logging.Formatter("%(asctime)s%(msecs)d %(message)s", datefmt="%Y%m%d %H:%M:%S") Note how you need to split the formatting of time into two different parts. This becomes even more diserse if you also want to add something after the time formatting (Example: a Z to note UTC). One more reason why this is quite powerful is that once we get timezones added to the standard library we will be able to (in a backward compatible way) just pass the timezone when we do `datetime.fromtimestamp`, which will add the timezone information to the datetime and users will be able to use %z to add the offset of the logging timestamp (Hurray! timestamps with offsets). Sample implementation: https://github.com/mariocj89/cpython/commit/5047d730c0a0dcd6276f40c5b66762071dfcb448 If it looks interesting I can update the docs, add some further tests and send the PR. Wanted to confirm it is before putting time into that. I cannot come with any "downside" of not doing it and I think it will simplify considerably the way users can format timestamps in logs. With this change we will just be able to say "To change the formatting of timestamps in a formatter, just use the datefmt argument". Thoughts? ---------- components: Library (Lib) messages: 344102 nosy: mariocj89, p-ganssle, vinay.sajip priority: normal severity: normal status: open title: Simplify customization of the logging time through datefmt type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 14:44:26 2019 From: report at bugs.python.org (Chirag Garg) Date: Fri, 31 May 2019 18:44:26 +0000 Subject: [issue10936] Simple CSS fix for left margin at docs.python.org In-Reply-To: <1295377924.0.0.902429691003.issue10936@psf.upfronthosting.co.za> Message-ID: <1559328266.12.0.411261895167.issue10936@roundup.psfhosted.org> Chirag Garg added the comment: Yes, it is creating a vision problem as the text is creating a problem. And the CSS script of @cdunn2001 is correct also there is a need to change the navigation bar. ---------- nosy: +codevil_2o _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 14:45:59 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 31 May 2019 18:45:59 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature In-Reply-To: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> Message-ID: <1559328359.14.0.801860063221.issue36896@roundup.psfhosted.org> Matthias Bussonnier added the comment: Victor recently implemented CodeType.replace(); which I believe will cover many of the usecase. Should I also send a PR that update the DocStrings of (some of) ? these objects? many people don't go and read the html docs... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 14:52:04 2019 From: report at bugs.python.org (Chirag Garg) Date: Fri, 31 May 2019 18:52:04 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1559328724.32.0.433132324847.issue36947@roundup.psfhosted.org> Chirag Garg added the comment: It should be written like "In the following example, both MyClass and MySubclass are instances of Meta and the type of MyClass is of metaclass Meta and type of MySubclass is MyClass:" ---------- nosy: +codevil_2o _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 15:00:14 2019 From: report at bugs.python.org (Jonathan) Date: Fri, 31 May 2019 19:00:14 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559329214.05.0.914677827713.issue37111@roundup.psfhosted.org> Jonathan added the comment: Thank you for your comments but this wasn't a question and I maintain this is a bug, or at least undesirable behaviour. I'd consider it a bug in my own software. Reasoning: * It's an inconsistent default with the logging to screen. This causes more complexity for users when their bug is intermittent. * Despite your assertion, it's not documented anywhere on the logging docs (I did check before creating this bug when trying to figure out what's going on) - The word "utf" or "unicode" doesn't appear on the logging page, or any of the two tutorials, or the logging.handlers page. There's something in the cookbook but that's about BOM's. * Much of the world's native characters won't log to ASCII Per this page: https://docs.python.org/3/howto/unicode.html "UTF-8 is one of the most commonly used encodings, and Python often defaults to using it." > People have been using logging, on Windows, without problems, for years, often using utf-8 to encode their log files. I'm afraid this line of reasoning is suffering from selection bias, cherry picking, confirmation bias, and probably some others too. Clearly people have had problems before because it was from one of those folks I took the solution. Doing something as basic as logging unicode shouldn't require knowledge of "handlers" - that's failing "simple is better than complex". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 15:07:23 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 31 May 2019 19:07:23 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559329643.11.0.0653566394861.issue12639@roundup.psfhosted.org> Zackery Spytz added the comment: Thanks for looking at this issue, Steve. At this point in time, 3.6 only takes security fixes, so PR 13703 should be closed. The Close() method was added in 3.7, so I think removing the addCleanup() call is the way to go for 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 15:08:23 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 31 May 2019 19:08:23 +0000 Subject: [issue37117] Simplify customization of the logging time through datefmt In-Reply-To: <1559328242.82.0.712821467925.issue37117@roundup.psfhosted.org> Message-ID: <1559329703.2.0.00940443710683.issue37117@roundup.psfhosted.org> Vinay Sajip added the comment: The documentation mentions that the converter attribute of the formatter should be signature-compatible with time.localtime() and time.gmtime(), and some users will have set this attribute with one or the other or a compatible function. Doesn't your change break backward compatibility by changing the signature of the converter? If one wants to implement the functionality you're suggesting, one could implement a Formatter subclass that does it, isn't that right? That wouldn't cause backward compatibility problems, and could be added in a cookbook recipe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 15:17:39 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 19:17:39 +0000 Subject: [issue23667] IDLE to provide option for making trailing whitespace visible In-Reply-To: <1426376584.28.0.267295855034.issue23667@psf.upfronthosting.co.za> Message-ID: <1559330259.98.0.800231733033.issue23667@roundup.psfhosted.org> Terry J. Reedy added the comment: Raymond, which definition of 'whitespace' do you intent? Git gui also marks trailing spaces in frozen diffs. This is much harder to do while editing as text can be read, keyed, and pasted. Most spaces and blank lines are only temporarily trailing, before something more is added. I believe I would dislike the idea of temporarily marking them, unless it were very subtle. They really only need to be stripped just before saving. So I think we should make that easy and not too intrusive. 1. Ask if there is trailing whitespace. For instance, if (text.find('\s\n') != -1) or : 2. Add a setting to strip on save, default yes. 3. always strip trailing whitespace from .py files when saving. Perhaps flash 'trailing whitespace stripped' to status bar. The danger with any of these is stripping of wanted trailing whitespace in tripple-quoted string literals. Such whitespace is rare, but I don't know how rare. Alternate ways of making such are better in making the blanks permanently visible in any display, not just in IDLE. The problem is teaching this. >>> s = ( 'This is justified text\n' 'with blank spaces. \n' 'It is is followed by \n' 'a trailing blank line.\n' '\n') >>> s 'This is justified text\nwith blank spaces. \nIt is is followed by \na trailing blank line.\n\n' while an error marking would tell users to do it manually. --- I closed PR 1644 because implementing features as extensions is obsolete and because the trim function duplicates the existing function (once it is fixed to include blank lines). I am dubious about PR 1643. Tagging trailing whitespace as an error would suggest that the user should delete it. With strip on save, this would be noise. ---------- stage: patch review -> needs patch versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 15:33:50 2019 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 31 May 2019 19:33:50 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559331230.68.0.163862353268.issue37111@roundup.psfhosted.org> Vinay Sajip added the comment: > Doing something as basic as logging unicode shouldn't require knowledge of "handlers" - that's failing "simple is better than complex". I reiterate my statement that it appears that you aren't sufficiently familiar with how logging is designed to work. Logging is more complex than print() or open() because it has to work flexibly in lots of different scenarios. Handlers are part of this, as are Formatters and Filters. See my 2009 blog post https://plumberjack.blogspot.com/2009/09/python-logging-101.html for more information for why logging is designed the way it is. If you want to configure a stream with utf-8 encoding, without explicitly using handlers, this is easily doable, as follows: C:\Users\Vinay> \python37\python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import logging >>> logging.basicConfig(stream=open(r'c:\temp\my_log.log', 'w', encoding='utf-8')) >>> logging.error('???1') >>> ^Z and, lo and behold, the file c:\temp\my_log.log contains ERROR:root:???1 The use of the stream keyword parameter is clearly documented at https://docs.python.org/3/library/logging.html#logging.basicConfig Did you look at the basicConfig documentation before raising this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 15:44:16 2019 From: report at bugs.python.org (Berker Peksag) Date: Fri, 31 May 2019 19:44:16 +0000 Subject: [issue33361] readline() + seek() on codecs.EncodedFile breaks next readline() In-Reply-To: <1524704763.78.0.682650639539.issue33361@psf.upfronthosting.co.za> Message-ID: <1559331856.43.0.517433952187.issue33361@roundup.psfhosted.org> Berker Peksag added the comment: New changeset a6ec1ce1ac05b1258931422e96eac215b6a05459 by Berker Peksag (Ammar Askar) in branch 'master': bpo-33361: Fix bug with seeking in StreamRecoders (GH-8278) https://github.com/python/cpython/commit/a6ec1ce1ac05b1258931422e96eac215b6a05459 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 15:44:22 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 19:44:22 +0000 Subject: [issue33361] readline() + seek() on codecs.EncodedFile breaks next readline() In-Reply-To: <1524704763.78.0.682650639539.issue33361@psf.upfronthosting.co.za> Message-ID: <1559331862.38.0.687822530247.issue33361@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13595 pull_request: https://github.com/python/cpython/pull/13708 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 15:47:05 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 19:47:05 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature In-Reply-To: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> Message-ID: <1559332025.58.0.568780477625.issue36896@roundup.psfhosted.org> Terry J. Reedy added the comment: Pablo, I am all for respectfully preserving implementation freedom where we can. From idlelib.__init__: [idlelib files other than idle*.*] "are private implementations. Their details are subject to change. See PEP 434 for more. Import them at your own risk." Matthias: I don't believe we put version changed notes in docstrings, as they are for the current code. But if a docstring covers arguments, as usual, then the new one should be added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 15:55:14 2019 From: report at bugs.python.org (Jonathan) Date: Fri, 31 May 2019 19:55:14 +0000 Subject: [issue37111] Logging - Inconsistent behaviour when handling unicode In-Reply-To: <1559296654.15.0.378802674413.issue37111@roundup.psfhosted.org> Message-ID: <1559332514.94.0.986592568295.issue37111@roundup.psfhosted.org> Jonathan added the comment: > Did you look at the basicConfig documentation before raising this issue? This seems like an attempt at victim blaming. But yes, I did. In fact, this is now the third time I've looked at that page - once before raising this issue, once before my previous reply, and now. I note that your example and nothing like your example is anywhere on that page. The word "encoding" doesn't appear anywhere on the page either. Sure "stream" is on there, but then you need to know about streams and make the association with logging which I apparently don't. You have to remember not everyone has your level of proficiency in the language. In fact, most Python users don't. Lets put this another way - is there a reason NOT to have Unicode logging as the default? Clearly Unicode was important enough for Guido-et-al to decide to throw Python 2 under the bus. I've listed the advantages of changing it, what are the disadvantages? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:02:15 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 31 May 2019 20:02:15 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature In-Reply-To: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> Message-ID: <1559332935.37.0.297975675002.issue36896@roundup.psfhosted.org> Matthias Bussonnier added the comment: > I don't believe we put version changed notes in docstrings, Oh no I was thinking a note in the docstring "constructor signature may change between Python versions". Whether to put changed/addition info in docstrings is another subject and a thing I would be in favor of; but let's not digress and the current issue which is to convey to users the non-stability of interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:03:28 2019 From: report at bugs.python.org (Berker Peksag) Date: Fri, 31 May 2019 20:03:28 +0000 Subject: [issue33361] readline() + seek() on codecs.EncodedFile breaks next readline() In-Reply-To: <1524704763.78.0.682650639539.issue33361@psf.upfronthosting.co.za> Message-ID: <1559333008.13.0.0793976835827.issue33361@roundup.psfhosted.org> Berker Peksag added the comment: New changeset a6dc5d4e1c9ef465dc1f1ad95c382aa8e32b178f by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-33361: Fix bug with seeking in StreamRecoders (GH-8278) https://github.com/python/cpython/commit/a6dc5d4e1c9ef465dc1f1ad95c382aa8e32b178f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:04:36 2019 From: report at bugs.python.org (Berker Peksag) Date: Fri, 31 May 2019 20:04:36 +0000 Subject: [issue33361] readline() + seek() on codecs.EncodedFile breaks next readline() In-Reply-To: <1524704763.78.0.682650639539.issue33361@psf.upfronthosting.co.za> Message-ID: <1559333076.76.0.536228234451.issue33361@roundup.psfhosted.org> Berker Peksag added the comment: Thank you for the report, Diego and thank you for the patch, Ammar! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:09:02 2019 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 31 May 2019 20:09:02 +0000 Subject: [issue37102] Automatically dedent docstring constants by default In-Reply-To: <1559239200.57.0.0816589870282.issue37102@roundup.psfhosted.org> Message-ID: <1559333342.18.0.342240562574.issue37102@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:19:01 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 31 May 2019 20:19:01 +0000 Subject: [issue15115] Duplicated Content-Transfer-Encoding header when applying email.encoders In-Reply-To: <1340188711.86.0.286169814605.issue15115@psf.upfronthosting.co.za> Message-ID: <1559333941.44.0.00242264207268.issue15115@roundup.psfhosted.org> Cheryl Sabella added the comment: New changeset a747c3a5edf21fa5670bc30f5e1d804de89ebf62 by Cheryl Sabella in branch 'master': bpo-15115: Document deprecation of email.encoders in Python 3 (GH-5354) https://github.com/python/cpython/commit/a747c3a5edf21fa5670bc30f5e1d804de89ebf62 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:20:02 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 20:20:02 +0000 Subject: [issue15115] Duplicated Content-Transfer-Encoding header when applying email.encoders In-Reply-To: <1340188711.86.0.286169814605.issue15115@psf.upfronthosting.co.za> Message-ID: <1559334002.4.0.402577780132.issue15115@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +13596 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13709 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:20:22 2019 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 31 May 2019 20:20:22 +0000 Subject: [issue15115] Duplicated Content-Transfer-Encoding header when applying email.encoders In-Reply-To: <1340188711.86.0.286169814605.issue15115@psf.upfronthosting.co.za> Message-ID: <1559334022.89.0.817872198213.issue15115@roundup.psfhosted.org> Change by Cheryl Sabella : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:24:46 2019 From: report at bugs.python.org (Ivan Pozdeev) Date: Fri, 31 May 2019 20:24:46 +0000 Subject: [issue11871] test_default_timeout() of test_threading.BarrierTests failure: BrokenBarrierError In-Reply-To: <1303163944.05.0.666091618845.issue11871@psf.upfronthosting.co.za> Message-ID: <1559334286.66.0.315840623202.issue11871@roundup.psfhosted.org> Ivan Pozdeev added the comment: Got this issue today in AppVeyor's PR check: https://ci.appveyor.com/project/python/cpython/builds/24945165, so it's not local to David's worker. (At rerun, the test succeeeded, so the check status was not affected.) ---------- nosy: +Ivan.Pozdeev versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:26:09 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 31 May 2019 20:26:09 +0000 Subject: [issue15115] Duplicated Content-Transfer-Encoding header when applying email.encoders In-Reply-To: <1340188711.86.0.286169814605.issue15115@psf.upfronthosting.co.za> Message-ID: <1559334369.91.0.511080310665.issue15115@roundup.psfhosted.org> miss-islington added the comment: New changeset 464c1ec65af2c1c1d849d50d9726fa453804e70e by Miss Islington (bot) in branch '3.7': bpo-15115: Document deprecation of email.encoders in Python 3 (GH-5354) https://github.com/python/cpython/commit/464c1ec65af2c1c1d849d50d9726fa453804e70e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:30:23 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 20:30:23 +0000 Subject: [issue37040] checking for membership in itertools.count enters infinite loop with no way to exit In-Reply-To: <1558758125.27.0.730728069526.issue37040@roundup.psfhosted.org> Message-ID: <1559334623.89.0.593307560906.issue37040@roundup.psfhosted.org> Terry J. Reedy added the comment: Dan, please leave this closed. It duplicates #31815 and should be closed on that grounds alone, regardless of the status of the latter. #31815 was closed in favor of #33939, which is open, with ongoing discussion. Resolution either way is blocked because different core developers disagree. ---------- nosy: +terry.reedy resolution: -> duplicate status: open -> closed superseder: -> Make itertools iterators interruptible _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:49:02 2019 From: report at bugs.python.org (gary*atlanta) Date: Fri, 31 May 2019 20:49:02 +0000 Subject: [issue37118] Why is GIL on 2.7 so much faster than 3.7 Message-ID: <1559335742.69.0.897974337357.issue37118@roundup.psfhosted.org> Change by gary*atlanta : ---------- components: Interpreter Core nosy: gary*atlanta priority: normal severity: normal status: open title: Why is GIL on 2.7 so much faster than 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:49:05 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 31 May 2019 20:49:05 +0000 Subject: [issue37105] Add deprecated-remove information on stream doc In-Reply-To: <1559266839.05.0.214061892347.issue37105@roundup.psfhosted.org> Message-ID: <1559335745.62.0.16035272024.issue37105@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset ed9f3562b637a59b9000abbceee5ae369d35444d by Andrew Svetlov (Emmanuel Arias) in branch 'master': bpo-37105: Add deprecated-remove information on stream doc (#13672) https://github.com/python/cpython/commit/ed9f3562b637a59b9000abbceee5ae369d35444d ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 16:57:08 2019 From: report at bugs.python.org (Berker Peksag) Date: Fri, 31 May 2019 20:57:08 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1559336228.5.0.85397128493.issue12178@roundup.psfhosted.org> Change by Berker Peksag : ---------- pull_requests: +13597 pull_request: https://github.com/python/cpython/pull/13710 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:05:32 2019 From: report at bugs.python.org (Zachary Ware) Date: Fri, 31 May 2019 21:05:32 +0000 Subject: [issue37118] Why is GIL on 2.7 so much faster than 3.7 Message-ID: <1559336732.6.0.988022790595.issue37118@roundup.psfhosted.org> New submission from Zachary Ware : This is a bug tracker, not a forum for questions. Please try a more appropriate venue for your question, like python-list at python.org or StackOverflow. You're going to need to provide some actual evidence rather than just a provocative assertion, though. ---------- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:07:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 31 May 2019 21:07:25 +0000 Subject: [issue37102] Automatically dedent docstring constants by default In-Reply-To: <1559239200.57.0.0816589870282.issue37102@roundup.psfhosted.org> Message-ID: <1559336845.56.0.0663097419699.issue37102@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:14:40 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 21:14:40 +0000 Subject: [issue37068] Emit SyntaxWarning for f-strings without expressions ? In-Reply-To: <1558984274.64.0.992654624102.issue37068@roundup.psfhosted.org> Message-ID: <1559337280.31.0.921908558563.issue37068@roundup.psfhosted.org> Terry J. Reedy added the comment: An f-string is equivalent to a format string and call. The exact details are not important. An field with no value is an error either way. (I prefer the compile-time exception.) >>> f'{}a' SyntaxError: f-string: empty expression not allowed >>> '{}a'.format() Traceback (most recent call last): File "", line 1, in '{}a'.format() IndexError: tuple index out of range >>> 'abc'.format() 'abc' >>> f'abc' 'abc' I agree that neither needs a warning. I actually think the useless call is worse than the unneeded prefix. SyntaxWarnings are rare. Invalid escapes are now errors. >>> '\o' SyntaxError: invalid escape sequence \o ---------- nosy: +terry.reedy resolution: -> rejected stage: -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:17:59 2019 From: report at bugs.python.org (gary*atlanta) Date: Fri, 31 May 2019 21:17:59 +0000 Subject: [issue37118] Why is GIL on 2.7 so much faster than 3.7 In-Reply-To: <1559336732.6.0.988022790595.issue37118@roundup.psfhosted.org> Message-ID: <1559337479.02.0.725833158652.issue37118@roundup.psfhosted.org> gary*atlanta added the comment: tested this loop: for (i=0; i performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:21:09 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 21:21:09 +0000 Subject: [issue37071] HTMLParser mistakenly inventing new tags while parsing In-Reply-To: <1559006580.21.0.290263720763.issue37071@roundup.psfhosted.org> Message-ID: <1559337669.47.0.93711662814.issue37071@roundup.psfhosted.org> Terry J. Reedy added the comment: Please verify with 3.7.3+ and the latest version of Sphinx. Even if there is a problem, Sphinx is not an stdlib package. The problem would only be relevant to this tracker, rather than the Sphinx tracker, if it were due to our customizations or use of Sphinx. ---------- nosy: +terry.reedy versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:22:42 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 21:22:42 +0000 Subject: [issue37073] clarify functions docs in IO modules and Bytes Objects In-Reply-To: <1559027884.63.0.0963085588001.issue37073@roundup.psfhosted.org> Message-ID: <1559337762.69.0.812588957446.issue37073@roundup.psfhosted.org> Terry J. Reedy added the comment: Can you prepare a PR? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:26:27 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 21:26:27 +0000 Subject: [issue37080] Cannot compile Python3.7.3 on Alt-F (ARM) In-Reply-To: <1559057852.62.0.663214501823.issue37080@roundup.psfhosted.org> Message-ID: <1559337987.58.0.910746899611.issue37080@roundup.psfhosted.org> Terry J. Reedy added the comment: I presume you are trying to compile CPython. Perhaps you might do better with MicroPython, designed for micro devices. Steve, do you know anything about CPython on Arm with linux? ---------- nosy: +steve.dower, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:35:08 2019 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Fri, 31 May 2019 21:35:08 +0000 Subject: [issue37102] Automatically dedent docstring constants by default In-Reply-To: <1559239200.57.0.0816589870282.issue37102@roundup.psfhosted.org> Message-ID: <1559338508.68.0.00866364131465.issue37102@roundup.psfhosted.org> R?mi Lapeyre added the comment: Hi, I'm working on a PR. It should be ready in a couple of days. It's more involved than what I thought as to avoid importing inspect during compilation I will probably need to port cleandoc() in C. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:38:14 2019 From: report at bugs.python.org (Berker Peksag) Date: Fri, 31 May 2019 21:38:14 +0000 Subject: [issue32628] Add configurable DirectoryIndex to http.server In-Reply-To: <1516681005.05.0.467229070634.issue32628@psf.upfronthosting.co.za> Message-ID: <1559338694.55.0.487787609056.issue32628@roundup.psfhosted.org> Berker Peksag added the comment: Thank you for the report and for the patch! What's your use case? I understand the need for it for httpd, but as someone who uses http.server daily, I can't think of a use case that I'd find this feature useful. Note that even the example in your message and the test in the patch use artificial file names :) Handler.directory_index.append("index.htmlx") API doesn't look good to me. It would be nice to subclass it, but that would make http.server less usable (especially if you run it via "python -m http.server") I suggest closing this as 'rejected' (sorry!) ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:42:22 2019 From: report at bugs.python.org (Dale Visser) Date: Fri, 31 May 2019 21:42:22 +0000 Subject: [issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable In-Reply-To: <1559231349.65.0.379811854452.issue37101@roundup.psfhosted.org> Message-ID: <1559338942.69.0.387049045637.issue37101@roundup.psfhosted.org> Dale Visser added the comment: FWIW, when I tried this instead, I got 21 to 22 msec per 1000 log messages (still a 5-10% performance hit): def filter(self, record): rv = True if self.filters: rv = all(getattr(f, 'filter', f)(record) for f in self.filters) return rv I don't see that getattr(...) should be less efficient than hasattr(...), so the generator expression is the likely culprit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:55:03 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 21:55:03 +0000 Subject: [issue37082] Assignment expression symbol (walrus) not in built-in help() In-Reply-To: <1559067983.32.0.880606504508.issue37082@roundup.psfhosted.org> Message-ID: <1559339703.9.0.0510544498351.issue37082@roundup.psfhosted.org> Terry J. Reedy added the comment: The augmented assignment symbol, like that for plain assignment, is not, properly speaking, an operator. But it definitely is a symbol that needs to be documented. 1. Generally update the help symbol list. 2. Document :=, assignment expression, in the regular docs, but I found nothing. ':=' should be on https://docs.python.org/3.8/genindex-Symbols.html just ':(colon)'. 'expression' should be listed under 'assignment on https://docs.python.org/3.8/genindex-A.html I think 'assignment' should be listed under 'expression' on https://docs.python.org/3.8/genindex-E.html I could not find anything in the expressions chapter. ---------- nosy: +terry.reedy title: Assignment expression operator (walrus) not in built-in help() -> Assignment expression symbol (walrus) not in built-in help() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 17:55:49 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 31 May 2019 21:55:49 +0000 Subject: [issue12202] Check status returns in msilib.SummaryInformation.GetProperty() In-Reply-To: <1306591176.31.0.169874894705.issue12202@psf.upfronthosting.co.za> Message-ID: <1559339749.74.0.62958402541.issue12202@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +13598 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 18:01:44 2019 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 31 May 2019 22:01:44 +0000 Subject: [issue12202] Check status returns in msilib.SummaryInformation.GetProperty() In-Reply-To: <1306591176.31.0.169874894705.issue12202@psf.upfronthosting.co.za> Message-ID: <1559340103.99.0.0662620600145.issue12202@roundup.psfhosted.org> Zackery Spytz added the comment: This issue needs to be fixed. Passing an invalid value to SummaryInformation.GetProperty() will cause the first MsiSummaryInfoGetProperty() call to fail. As the call is not properly checked, the "type" variable will then be used uninitialized in summary_getproperty(). ---------- nosy: +ZackerySpytz type: -> behavior versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 18:07:58 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 22:07:58 +0000 Subject: [issue37089] `import Lib.os` works on windows (but shouldn't) In-Reply-To: <1559163159.15.0.0136841146516.issue37089@roundup.psfhosted.org> Message-ID: <1559340478.17.0.459815152157.issue37089@roundup.psfhosted.org> Terry J. Reedy added the comment: If .../Tools and its subdirectories had __init__.py files, the presence of sys.prefix on sys.path, on Windows, would allow imports from those subdirs. Otherwise, it only provides a second way to import stdlib modules. This seems like a bit of a bug. Guido, do you remember why we have this Windows-only feature? ---------- nosy: +gvanrossum, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 18:16:22 2019 From: report at bugs.python.org (Mario Corchero) Date: Fri, 31 May 2019 22:16:22 +0000 Subject: [issue37117] Simplify customization of the logging time through datefmt In-Reply-To: <1559328242.82.0.712821467925.issue37117@roundup.psfhosted.org> Message-ID: <1559340982.47.0.00719928355811.issue37117@roundup.psfhosted.org> Mario Corchero added the comment: AFAIK, the converter attribute is only to "be set" with a function of such signature. It is not documented that it can be used and it is only used on the format time function. The only situation where this might break someone is if they inherit from formatter, substitute the formatTime function by their own implementation and rely on the function returning a time tuple. Doing that is relying on the implementation of the formatter though, as the docs explain is just something to be set. This could be released as part of a new Python version, I'd be surprised if this is an issue and it will improve quite nicely the way users can configure the formatting of timestamps. Even if adding it to the cookbook would "work" I think it would be much better to have this change and provide a nicer experience with the default class. This is your call though! But I'd say it would be quite a nice improvement, was speaking with some other devs at PyCon and they seemed quite excited. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 18:16:38 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 May 2019 22:16:38 +0000 Subject: [issue36896] clarify in types.rst that FunctionTypes & co constructors don't have stable signature In-Reply-To: <1557698610.19.0.556381141599.issue36896@roundup.psfhosted.org> Message-ID: <1559340998.76.0.824016873332.issue36896@roundup.psfhosted.org> Terry J. Reedy added the comment: Yes, I think " Not for the faint of heart." could be replaced or augmented by 'api may change' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 18:39:42 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 31 May 2019 22:39:42 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559342382.9.0.316986411251.issue12639@roundup.psfhosted.org> Steve Dower added the comment: New changeset bfc1f605609218b9734d3cf3eab3531a2f4624e1 by Steve Dower (Miss Islington (bot)) in branch '2.7': [2.7] bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688) https://github.com/python/cpython/commit/bfc1f605609218b9734d3cf3eab3531a2f4624e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 18:39:58 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 31 May 2019 22:39:58 +0000 Subject: [issue12639] msilib Directory.start_component() fails if keyfile is not None In-Reply-To: <1311611007.28.0.321431208072.issue12639@psf.upfronthosting.co.za> Message-ID: <1559342398.04.0.767333876165.issue12639@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 18:47:17 2019 From: report at bugs.python.org (Erik Paulson) Date: Fri, 31 May 2019 22:47:17 +0000 Subject: [issue32628] Add configurable DirectoryIndex to http.server In-Reply-To: <1516681005.05.0.467229070634.issue32628@psf.upfronthosting.co.za> Message-ID: <1559342837.24.0.0186091452135.issue32628@roundup.psfhosted.org> Erik Paulson added the comment: I think my use case was Sharepoint and static site generators - Sharepoint can serve a tree of .aspx files as raw HTML, but maddeningly not .html files. The site generator we used spit out a fairly complicated site where the internal links point at directories counting on the fact that it is served correctly by the directoryindex handler. The site generator spits out .aspx but http.server can't serve them. A directory full of .xhtml files would have similar problems, which certainly still exist in the wild. The example in the test was named index.test because it's creating files on the disk in the test, shared by other parts of the test, and I wanted to be clear about what it was. It was not intended to be an example use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 19:00:39 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 31 May 2019 23:00:39 +0000 Subject: [issue37110] Clarify hashability of custom class instances In-Reply-To: <1559293645.61.0.954260937021.issue37110@roundup.psfhosted.org> Message-ID: <1559343639.47.0.973129266.issue37110@roundup.psfhosted.org> Raymond Hettinger added the comment: The docs look correct to me: >>> class A: pass >>> hash(A()) 274859987 User defined classes are in-fact hashable by default. Other methods can be defined to change hashability, but they are not the default. FWIW, it isn't the purpose of the glossary to be a language spec; rather, it is to provide a rough meaning of what the word "hashable" means. Already, the wording has exceeded its original intent. The correct place for a more detailed specification in the language reference for object.__hash__(): https://docs.python.org/3/reference/datamodel.html?highlight=__hash__#object.__hash__ Thank you for the suggestion, but we'll pass on this one. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 19:25:28 2019 From: report at bugs.python.org (Christoph Zwerschke) Date: Fri, 31 May 2019 23:25:28 +0000 Subject: [issue37110] Clarify hashability of custom class instances In-Reply-To: <1559293645.61.0.954260937021.issue37110@roundup.psfhosted.org> Message-ID: <1559345128.31.0.779577271033.issue37110@roundup.psfhosted.org> Christoph Zwerschke added the comment: My point was that it's not immediately obvious what "by default" means and that hashability is not only affected by the __hash__ method but also by __eq__. But I agree, you can argue that "by default" already includes not adding any special methods like __eq__ and the glossary should not become too verbose. (I remember these words from Donald Knuth in one of his books: "In the interest of conciseness, you need to indulge in simplifications that are really little lies; these should be overlooked.") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 20:16:31 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 01 Jun 2019 00:16:31 +0000 Subject: [issue12202] Check status returns in msilib.SummaryInformation.GetProperty() In-Reply-To: <1306591176.31.0.169874894705.issue12202@psf.upfronthosting.co.za> Message-ID: <1559348191.2.0.833511808629.issue12202@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 549e55a3086d04c13da9b6f33214f6399681292a by Berker Peksag (Zackery Spytz) in branch 'master': bpo-12202: Properly check MsiSummaryInfoGetProperty() calls in msilib (GH-13711) https://github.com/python/cpython/commit/549e55a3086d04c13da9b6f33214f6399681292a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 20:16:49 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 01 Jun 2019 00:16:49 +0000 Subject: [issue12202] Check status returns in msilib.SummaryInformation.GetProperty() In-Reply-To: <1306591176.31.0.169874894705.issue12202@psf.upfronthosting.co.za> Message-ID: <1559348209.58.0.763366306975.issue12202@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 21:11:26 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 01 Jun 2019 01:11:26 +0000 Subject: [issue12202] Check status returns in msilib.SummaryInformation.GetProperty() In-Reply-To: <1306591176.31.0.169874894705.issue12202@psf.upfronthosting.co.za> Message-ID: <1559351486.62.0.893950892511.issue12202@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +13599 pull_request: https://github.com/python/cpython/pull/13712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 22:16:08 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 01 Jun 2019 02:16:08 +0000 Subject: [issue37029] PyObject_Free is O(N) where N = # of arenas In-Reply-To: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> Message-ID: <1559355368.91.0.97474997362.issue37029@roundup.psfhosted.org> Tim Peters added the comment: New changeset 1c263e39c4ed28225a7dc8ca1f24953225ac48ca by Tim Peters in branch 'master': bpo-37029: keep usable_arenas in sorted order without searching (#13612) https://github.com/python/cpython/commit/1c263e39c4ed28225a7dc8ca1f24953225ac48ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 22:19:40 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 01 Jun 2019 02:19:40 +0000 Subject: [issue37029] PyObject_Free is O(N) where N = # of arenas In-Reply-To: <1558676037.99.0.0721055204531.issue37029@roundup.psfhosted.org> Message-ID: <1559355580.55.0.00979340602905.issue37029@roundup.psfhosted.org> Change by Tim Peters : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 23:16:52 2019 From: report at bugs.python.org (Eric Snow) Date: Sat, 01 Jun 2019 03:16:52 +0000 Subject: [issue36818] Add PyInterpreterState.runtime. In-Reply-To: <1557168344.92.0.643564511932.issue36818@roundup.psfhosted.org> Message-ID: <1559359012.62.0.744360074102.issue36818@roundup.psfhosted.org> Eric Snow added the comment: New changeset 396e0a8d9dc65453cb9d53500d0a620602656cfe by Eric Snow in branch 'master': bpo-36818: Add PyInterpreterState.runtime field. (gh-13129) https://github.com/python/cpython/commit/396e0a8d9dc65453cb9d53500d0a620602656cfe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 23:38:15 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 03:38:15 +0000 Subject: [issue35996] Optional modulus argument for new math.prod() function In-Reply-To: <1550172876.35.0.867721234262.issue35996@roundup.psfhosted.org> Message-ID: <1559360295.52.0.104141528099.issue35996@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 23:49:45 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 01 Jun 2019 03:49:45 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1559360985.33.0.635751008009.issue17005@roundup.psfhosted.org> Raymond Hettinger added the comment: Unless ?ukasz gives us a nod to work out this API for the second beta, we'll need to defer this to 3.9. IMO, the API in the patch is not user friendly. It started on the right path but became contorted (for both inputs and outputs) to serve unusual cases. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 31 23:50:51 2019 From: report at bugs.python.org (Berker Peksag) Date: Sat, 01 Jun 2019 03:50:51 +0000 Subject: [issue34763] Python lacks 0x4E17 In-Reply-To: <1537543820.35.0.956365154283.issue34763@psf.upfronthosting.co.za> Message-ID: <1559361051.83.0.534109979978.issue34763@roundup.psfhosted.org> Berker Peksag added the comment: Tools/unicode/makeunicodedata.py looks at Unihan database for the fields kAccountingNumeric, kOtherNumeric, and kPrimaryNumeric in Unihan_NumericValues.txt: https://github.com/python/cpython/blob/549e55a3086d04c13da9b6f33214f6399681292a/Tools/unicode/makeunicodedata.py#L1107-L1119 And as of Unicode version 12.0.0, 0x4E17 isn't listed as numeric there: ... U+4E00 kPrimaryNumeric 1 U+4E03 kPrimaryNumeric 7 U+4E07 kPrimaryNumeric 10000 U+4E09 kPrimaryNumeric 3 ... Is there another way to get this information by using one of the fields shown at http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=4E17 ---------- nosy: +berker.peksag versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________