[issue35306] OSError [WinError 123] when testing if pathlib.Path('*') (asterisks) exists

2018-11-23 Thread jimbo1qaz_ via Gmail
New submission from jimbo1qaz_ via Gmail : I'm writing a program taking paths from user input through CLI. `path` is a pathlib.Path(). Since Windows doesn't expand asterisks, I check if the path doesn't exist. If so I expand using Path().glob(path). Unfortunately on Windows, if `path` (type:

[issue35305] subprocess.Popen(['/sbin/ldconfig', '-p'], stdin=PIPE) itself hangs/deadlocks (Linux)

2018-11-23 Thread Henrik Bengtsson
New submission from Henrik Bengtsson : (originally posted to https://mail.python.org/pipermail/python-list/2018-November/738209.html) I ran into an interesting problem where calling 'subprocess.Popen(['/sbin/ldconfig', '-p'], stdin=PIPE)' hangs and never returns. $ python Python 2.7.9 (defau

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2018-11-23 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred

2018-11-23 Thread INADA Naoki
Change by INADA Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue35300] Document what functions are suitable for use with the lru_cache

2018-11-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- title: Bug with memoization and mutable objects -> Document what functions are suitable for use with the lru_cache ___ Python tracker ___

[issue35300] Bug with memoization and mutable objects

2018-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Victor. The proposed API change defeats the purpose of the cache. By design, the intent of the cache is to reuse the previously computed value. I can add something like this to the docs: """In general, the LRU cache should only be used wh

[issue35304] The return of truncate(size=None) (file io) is unexpected

2018-11-23 Thread Martin Panter
Martin Panter added the comment: This is the same as Issue 26158. Truncating text files is not clearly documented for a start, and truncating after reading doesn’t seem to be considered much in the implementations. Your question is answered at .

[issue12215] TextIOWrapper: issues with interlaced read-write

2018-11-23 Thread Martin Panter
Martin Panter added the comment: For the record, the more recent bug I mentioned was a complaint from 2015 (one and a half years before Victor’s comment). Even if it is not worth supporting writing after reading, the problem could be documented. -- resolution: out of date -> wont fix

[issue28247] Add an option to zipapp to produce a Windows executable

2018-11-23 Thread Ismail Donmez
Ismail Donmez added the comment: The documentation helped a lot, so thanks for that! But it misses the final crucial step: copy /b zastub.exe+app.pyz app.exe The documentation talks about prepending the zastub.exe to the zip file but never mentions how, which is very confusing. --

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

2018-11-23 Thread Steve Dower
Steve Dower added the comment: Ah, you're right, it's only C++. My bad. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-11-23 Thread Michael Saah
Michael Saah added the comment: Summary to accompany my patch: Modules/_datetimemodule.c and Lib/datetime.py do not behave identically. Specifically, the strftime functions do not match when passed a format string terminated with a '%'. The C function performs an explicit check for this condit

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-11-23 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +9944 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: > Could we have used function overloading to handle the different types? Rather than reintroducing the macro for the sake of the cast? Sorry, I don't know what is function overloading. Is it a C++ thing? Py_INCREF() must accept any type based on PyObject. At

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-11-23 Thread Роман Донченко
Change by Роман Донченко : -- nosy: +SpecLad ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue35281] Allow access to unittest.TestSuite tests

2018-11-23 Thread Lihu
Lihu added the comment: Sorry, I guess some context might be helpful. I'm writing a program that links unittest-based tests with a third-party test tracking/reporting system. Said third-party software has a concept of test suites/cases that doesn't align 1:1 with unittest, so I need to manip

[issue35303] A reference leak in _operator.c's methodcaller_repr()

2018-11-23 Thread miss-islington
miss-islington added the comment: New changeset bc665b42ba3a372bc60451583bfaff41d8e1993d by Miss Islington (bot) in branch '3.7': bpo-35303: Fix a reference leak in _operator.c's methodcaller_repr(). (GH-10689) https://github.com/python/cpython/commit/bc665b42ba3a372bc60451583bfaff41d8e1993d

[issue35303] A reference leak in _operator.c's methodcaller_repr()

2018-11-23 Thread miss-islington
miss-islington added the comment: New changeset 8c70c08f0fb5795904442e95a2987ea18aed2899 by Miss Islington (bot) in branch '3.6': bpo-35303: Fix a reference leak in _operator.c's methodcaller_repr(). (GH-10689) https://github.com/python/cpython/commit/8c70c08f0fb5795904442e95a2987ea18aed2899

[issue34977] Release Windows Store app containing Python

2018-11-23 Thread Steve Dower
Steve Dower added the comment: If anyone would like to try this out early, here's some instructions for a build I just made. Enable sideloading apps on your machine (see https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development - may already be done, sidelo

[issue35304] The return of truncate(size=None) (file io) is unexpected

2018-11-23 Thread liugang
liugang added the comment: # Run in Windows 10 # Code snippet 1 f = open('test', "w+") f.write('xxx\nyyy\nzzz') f.seek(0) f.readline() print(f.tell()) # 5 x = f.truncate() print(x) # 13 - why it is 13, not 5? # Code snippet 2 f = open('test', "w+") f.write('xxx\nyyy\nzzz') f.seek(0) f

[issue35304] The return of truncate(size=None) (file io) is unexpected

2018-11-23 Thread liugang
New submission from liugang : -- run in Windows 10 1 - f = open('test', "w+") f.write('xxx\nyyy\nzzz') f.seek(0) f.readline() print(f.tell()) # output 5 (xxx\r\n) x = f.truncate() print(x) # output 13 (xxx\r\nyyy\r\nzzz), why it is 13, not 5? 2 - f = open('test', "w+") f.write('xxx\nyyy

[issue35303] A reference leak in _operator.c's methodcaller_repr()

2018-11-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +9943 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35303] A reference leak in _operator.c's methodcaller_repr()

2018-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5b83ef71d3060e1651d3680e805f13a1049c7d6d by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-35303: Fix a reference leak in _operator.c's methodcaller_repr(). (GH-10689) https://github.com/python/cpython/commit/5b83ef71d3060e1651d3680e

[issue35303] A reference leak in _operator.c's methodcaller_repr()

2018-11-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +9942 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35303] A reference leak in _operator.c's methodcaller_repr()

2018-11-23 Thread Zackery Spytz
New submission from Zackery Spytz : The attached PR fixes a reference leak in _operator.c's methodcaller_repr(). -- ___ Python tracker ___ _

[issue35303] A reference leak in _operator.c's methodcaller_repr()

2018-11-23 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +9941 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue35303] A reference leak in _operator.c's methodcaller_repr()

2018-11-23 Thread Zackery Spytz
Change by Zackery Spytz : -- components: Extension Modules nosy: ZackerySpytz priority: normal severity: normal status: open title: A reference leak in _operator.c's methodcaller_repr() versions: Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue35302] create_connection with local_addr misses valid socket bindings

2018-11-23 Thread Neil Booth
New submission from Neil Booth : I run a machine with IPv4 and IPv6 interfaces on MacOSX Mojave. I try to loop.create_connection() to a remote machine whose domain resolves to an IPv6 address only, with a local_addr domain name argument that resolves to two local addresses: an IPv4 one first

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

2018-11-23 Thread Steve Dower
Steve Dower added the comment: Could we have used function overloading to handle the different types? Rather than reintroducing the macro for the sake of the cast? -- nosy: +steve.dower ___ Python tracker _

[issue34812] [Security] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: Ok, the bug is now fixed in Python 3.6, 3.7 and master branches ;-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue34812] [Security] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset cc0e0a2214d6515cf6ba4c7b164902a87e321b45 by Victor Stinner in branch '3.6': bpo-34812: subprocess._args_from_interpreter_flags(): add isolated (GH-10675) (GH-10688) https://github.com/python/cpython/commit/cc0e0a2214d6515cf6ba4c7b164902a87e321b

[issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR)

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: Thanks Aapo Samuli Keskimolo for the bug report and thanks Nierob for the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31512] Add non-elevated symlink support for dev mode Windows 10

2018-11-23 Thread Steve Dower
Steve Dower added the comment: Thanks for the ping (I don't see GitHub notifications - I get 1000s per day and it's not feasible to read them). I left one more comment on the PR, but then it's good to go! -- ___ Python tracker

[issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR)

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset eef813b1091f4b7411aa58d2746a9761ee99 by Victor Stinner in branch '3.6': [3.7] bpo-35189: Retry fnctl calls on EINTR (GH-10413) (GH-10678) (GH-10685) https://github.com/python/cpython/commit/eef813b1091f4b7411aa58d2746a9761ee99

[issue35299] LGHT0091: Duplicate symbol 'File:include_pyconfig.h' found

2018-11-23 Thread Steve Dower
Steve Dower added the comment: I'm going to declare that this is a bug in distutils not correctly setting INCLUDE and LIB values when building in a source directory. When this is fixed, there will be no need to copy pyconfig.h anywhere, and the installer build will be fine. (And it should b

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2018-11-23 Thread miss-islington
miss-islington added the comment: New changeset 879f5f3d9c1f5b66e2a080c712e2323e9c03d558 by Miss Islington (bot) in branch '3.6': bpo-29877: compileall: import ProcessPoolExecutor only when needed (GH-4856) https://github.com/python/cpython/commit/879f5f3d9c1f5b66e2a080c712e2323e9c03d558 --

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2018-11-23 Thread miss-islington
miss-islington added the comment: New changeset 903a3e8d67b61594c0fa17fb201769ca924b38f8 by Miss Islington (bot) in branch '3.7': bpo-29877: compileall: import ProcessPoolExecutor only when needed (GH-4856) https://github.com/python/cpython/commit/903a3e8d67b61594c0fa17fb201769ca924b38f8 --

[issue34812] [Security] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag

2018-11-23 Thread miss-islington
miss-islington added the comment: New changeset 01e579949ab546cd4cdd0d6d18e3ef41ce94f46e by Miss Islington (bot) in branch '3.7': bpo-34812: subprocess._args_from_interpreter_flags(): add isolated (GH-10675) https://github.com/python/cpython/commit/01e579949ab546cd4cdd0d6d18e3ef41ce94f46e -

[issue34812] [Security] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9940 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers)

2018-11-23 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: A lot of time has passed and things have changed significantly. We now live in a mostly python3-world (which doesn't have the bug) and Python2 has less than two years before beeing put to sleep. If nobody opposes, I offer to close this issue that I opened fir

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2018-11-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +9939 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2018-11-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +9938 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2018-11-23 Thread miss-islington
miss-islington added the comment: New changeset 1d817e4c8259f49602eefe9729743f6d9d748e8d by Miss Islington (bot) (Dustin Spicuzza) in branch 'master': bpo-29877: compileall: import ProcessPoolExecutor only when needed (GH-4856) https://github.com/python/cpython/commit/1d817e4c8259f49602eefe97

[issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR)

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9937 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35220] delete "how do I emulate os.kill" section in Windows FAQ

2018-11-23 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: My PR has been merged, thanks -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue34812] [Security] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag

2018-11-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +9936 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34812] [Security] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9de363271519e0616f4a7b59427057c4810d3acc by Victor Stinner in branch 'master': bpo-34812: subprocess._args_from_interpreter_flags(): add isolated (GH-10675) https://github.com/python/cpython/commit/9de363271519e0616f4a7b59427057c4810d3acc

[issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR)

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 56742f1eb05401a27499af0ccdcb4e4214859fd1 by Victor Stinner in branch '3.7': [3.7] bpo-35189: Retry fnctl calls on EINTR (GH-10413) (GH-10678) https://github.com/python/cpython/commit/56742f1eb05401a27499af0ccdcb4e4214859fd1 -- ___

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: Advantages of inline functions over C macros: https://mail.python.org/pipermail/python-dev/2018-November/155805.html There are multiple advantages: * Better development and debugging experience: tools understand inlined functions much better than C macros:

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: Number lines containing Py_LIMITED_API in Include/ dir: 13:pyerrors.h 12:abstract.h 11:pylifecycle.h 11:dictobject.h 10:pystate.h 8:longobject.h 7:modsupport.h 7:ceval.h 7:bytesobject.h 6:pythonrun.h 5:warnings.h 5:tupleobject.h 5:methodobject.h 5:complexobjec

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9935 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9934 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset e421106b9e4d780c083113e4180d58d68acc69ab by Victor Stinner in branch 'master': bpo-35134: Create Include/cpython/ subdirectory (GH-10624) https://github.com/python/cpython/commit/e421106b9e4d780c083113e4180d58d68acc69ab -- ___

[issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR)

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9933 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35189] PEP 475: fnctl functions are not retried if interrupted by a signal (EINTR)

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset b409ffa848b280c1db1b4f450bfae14f263099ac by Victor Stinner (nierob) in branch 'master': bpo-35189: Retry fnctl calls on EINTR (GH-10413) https://github.com/python/cpython/commit/b409ffa848b280c1db1b4f450bfae14f263099ac --

[issue35081] Move internal headers to Include/internal/

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: In bpo-35296, I modified "make install" to also install Include/internal/. -- ___ Python tracker ___

[issue35296] Install Include/internal/ header files

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: I decided to merge my PR because I started to *remove* functions from the public C API to move them to the CPython internal API: _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() are two examples from bpo-35081. So some people might want even more to use the i

[issue35296] Install Include/internal/ header files

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset f653fd4d950ac092719b6152e38d77c62b443125 by Victor Stinner in branch 'master': bpo-35296: make install now installs the internal API (GH-10665) https://github.com/python/cpython/commit/f653fd4d950ac092719b6152e38d77c62b443125 -- _

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: Nick Coghlan, Steve Dower and Paul Moore and me prefer "cpython" name, so let's go with that one! -- ___ Python tracker ___

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: I close the issue, it seems like all subtasks have been completed. Summary of the issue: * The following macros have been converted to static inline functions: - Py_INCREF(), Py_DECREF() - Py_XINCREF(), Py_XDECREF() - PyObject_INIT(), PyObject_INIT_VAR

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: > Drawbacks: Require a specific type can introduce compiler warnings if the > caller doesn't pass the proper type (PyObject* or PyVarObject*). > _Py_NewReference() and _Py_ForgetReference() seem to be properly used, but > not PyObject_INIT() and PyObject_INI

[issue35081] Move internal headers to Include/internal/

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: I close the issue, it seems like all sub-tasks have been completed! Summary of the change: * Header files of Include/internal/ are now all prefixed by "pycore_" and the directory has been added to the header search path. For example, #include "pycore_pystat

[issue34977] Release Windows Store app containing Python

2018-11-23 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +9932 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue35301] python.exe crashes - lzma?

2018-11-23 Thread Jonathan
New submission from Jonathan : Python 3.6.3 on Windows 7 64 bit. I keep getting intermittent crashes of Python.exe with my project. The error is below and as best I can see seems to be indicating the issue with the LZMA module. All I'm doing is using it to compress web-pages (typically XML o

[issue35081] Move internal headers to Include/internal/

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 4ac5328affa37bdfc5847dfdb2a41bad772e7270 by Victor Stinner in branch 'master': bpo-35081: add NEWS entry for new Include/internal/pycore_*.h files (GH-10666) https://github.com/python/cpython/commit/4ac5328affa37bdfc5847dfdb2a41bad772e7270 ---

[issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +9931 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue34812] [Security] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: I tried to explain how to fix the bug, but nobody came up with a working change 2 months, so I wrote the PR myself. It's an important security issue, since the function is used by multiprocessing and distutils modules to spawn new child processes. -

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- title: Add a new Include/unstable/ subdirectory for the "unstable" API -> Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details ___ Python tracker

[issue35134] Add a new Include/unstable/ subdirectory for the "unstable" API

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: Jeremy Kloth: > First off, to me, 'unstable' comes off quite negative, i.e. risky or erratic. Ok, the 3rd people who dislike my "unstable" name, so it sounds really bad :-) Jeremy Kloth: > 'volatile'; synonym for 'unstable' but with the benefit of being a C

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset b509d52083e156f97d6bd36f2f894a052e960f03 by Victor Stinner in branch 'master': bpo-35059: PyObject_INIT() casts to PyObject* (GH-10674) https://github.com/python/cpython/commit/b509d52083e156f97d6bd36f2f894a052e960f03 -- _

[issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily

2018-11-23 Thread Steve Dower
Steve Dower added the comment: You're welcome to it - I deliberately left it for someone else to work on, though I'm happy to review and merge. The visible change of making this lazy is that if someone reads from the dict, it'll be missing system-specified content types (until we lazily fill

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

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9930 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: I ran my benchmarks, I close the PR 10669 (replace static inline functions with macros). You should still be able to use it as patch: https://github.com/python/cpython/pull/10669.patch -- ___ Python tracker

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: "PyObject* PyObject_INIT(PyObject *op, PyTypeObject *typeobj)" and "PyVarObject* PyObject_INIT_VAR(PyVarObject *op, PyTypeObject *typeobj, Py_ssize_t size)" Don't cast their argument to PyObject*/PyVarObject* which can introduce new warnings when upgrading f

[issue35290] [FreeBSD] test_c_locale_coercion doesn't support new C.UTF-8 locale of FreeBSD CURRENT

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: I tested my 3.7 and master fixes: they fix test_c_locale_coercion on the FreeBSD CURRENT buildbot. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tr

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset f6e323ce322cf54b1a9e9252b13f93ebc28b5c24 by Victor Stinner in branch '3.7': bpo-34523: Fix C locale coercion on FreeBSD CURRENT (GH-10672) (GH-10673) https://github.com/python/cpython/commit/f6e323ce322cf54b1a9e9252b13f93ebc28b5c24 --

[issue35290] [FreeBSD] test_c_locale_coercion doesn't support new C.UTF-8 locale of FreeBSD CURRENT

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset f6e323ce322cf54b1a9e9252b13f93ebc28b5c24 by Victor Stinner in branch '3.7': bpo-34523: Fix C locale coercion on FreeBSD CURRENT (GH-10672) (GH-10673) https://github.com/python/cpython/commit/f6e323ce322cf54b1a9e9252b13f93ebc28b5c24 --

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: Stefan Behnel wrote: https://mail.python.org/pipermail/python-dev/2018-November/155759.html """ It's also slower to compile, given that function inlining happens at a much later point in the compiler pipeline than macro expansion. The C compiler won't even get

[issue35300] Bug with memoization and mutable objects

2018-11-23 Thread bolorsociedad
bolorsociedad added the comment: I understand it may be inefficient sometimes. Perhaps it would be nice to add an argument to lru_cache to specify that we want to deep copy? Something like def lru_cache(..., deepcopy=False): ... -- ___ Python t

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: Unexpected cool effect of static inline functions (copy of my email): https://mail.python.org/pipermail/python-dev/2018-November/155747.html Le jeu. 15 nov. 2018 à 01:06, Gregory P. Smith a écrit : > I expect the largest visible impact may be that a profiler m

[issue35300] Bug with memoization and mutable objects

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: > When the returned mutable object is modified, the cache is modified as well. > In my opinion, functools.lru_cache should store a deep copy of the returned > object. It would be inefficient to deep copy the mutable result and can defeat the purpose of the

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

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9928 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35290] [FreeBSD] test_c_locale_coercion doesn't support new C.UTF-8 locale of FreeBSD CURRENT

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9929 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 353933e712b6c7f7ba9a9a50bd5bd472db7c35d0 by Victor Stinner in branch 'master': bpo-34523: Fix C locale coercion on FreeBSD CURRENT (GH-10672) https://github.com/python/cpython/commit/353933e712b6c7f7ba9a9a50bd5bd472db7c35d0 -- ___

[issue35290] [FreeBSD] test_c_locale_coercion doesn't support new C.UTF-8 locale of FreeBSD CURRENT

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 353933e712b6c7f7ba9a9a50bd5bd472db7c35d0 by Victor Stinner in branch 'master': bpo-34523: Fix C locale coercion on FreeBSD CURRENT (GH-10672) https://github.com/python/cpython/commit/353933e712b6c7f7ba9a9a50bd5bd472db7c35d0 -- ___

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: I ran a coarse benchmark on the debug mode using PR 10669: I ran the full Python test suite. => I don't see any significant impact on performance. * C macros: PR 10669 * static inline functions: commit 3bb183d7fb83ad6a84ec13dea90f95d67be35c69 (PR 10669 pare

[issue35300] Bug with memoization and mutable objects

2018-11-23 Thread bolorsociedad
New submission from bolorsociedad : The decorator functools.lru_cache seems to not work properly when the function to be memoized returns a mutable object. For instance: >>> import functools >>> @functools.lru_cache() ... def f(x): ...return [x, x + 1] ... >>> a = f(4) >>> print(a) [4, 5

[issue35300] Bug with memoization and mutable objects

2018-11-23 Thread bolorsociedad
Change by bolorsociedad : -- components: Library (Lib) nosy: bolorsociedad priority: normal severity: normal status: open title: Bug with memoization and mutable objects type: behavior versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

[issue35290] [FreeBSD] test_c_locale_coercion doesn't support new C.UTF-8 locale of FreeBSD CURRENT

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: The bug is that sys.getfilesystemencoding() should be the locale encoding. On FreeBSD CURRENT, Python uses ASCII for the filesystem encoding, whereas the locale encoding is UTF-8. CURRENT-amd64% env -i ./python -X utf8=0 -c 'import locale, sys; print(sys.ge

[issue31512] Add non-elevated symlink support for dev mode Windows 10

2018-11-23 Thread Vidar Fauske
Vidar Fauske added the comment: The PR has been sitting for a while now with all previous concerns addressed. There has been a few pings on the PR without anything new happening, so I thought I would ping this issue as well: are there any other concerns about this PR, or anything else that i

[issue35290] [FreeBSD] test_c_locale_coercion doesn't support new C.UTF-8 locale of FreeBSD CURRENT

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: Oh, I also modified Python 3.7 to respect the "force ASCII" mode in bpo-34403, commit 21220bbe65108f5a763ead24a6b572f80d84c9e2. Hopefully, this change is not part of the latest Python 3.7.1 bugfix release. By the way, the bug only impacts FreeBSD CURRENT use

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset e89607c0fc8d6edbf19c06ba42ff0f00e6c4273f by Victor Stinner in branch 'master': bpo-35059: NEWS entry for macros converted to inline funcs (GH-10671) https://github.com/python/cpython/commit/e89607c0fc8d6edbf19c06ba42ff0f00e6c4273f --

[issue35081] Move internal headers to Include/internal/

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 984061eeb49c54fee901b92e5d3dde1c7a25cfa1 by Victor Stinner in branch 'master': bpo-35081: Add new internal headers to Makefile (GH-10670) https://github.com/python/cpython/commit/984061eeb49c54fee901b92e5d3dde1c7a25cfa1 -- ___

[issue35290] [FreeBSD] test_c_locale_coercion doesn't support new C.UTF-8 locale of FreeBSD CURRENT

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: Ok, I found the bug: it is related to the commit 905f1ace5f7424e314ca7bed997868a2a3044839 of bpo-34523. Python now uses ASCII for the filesystem encoding if the internal "force ASCII" mode is enabled in Py_DecodeLocale/Py_EncodeLocale. FreeBSD CURRENT intro

[issue35290] [FreeBSD] test_c_locale_coercion doesn't support new C.UTF-8 locale of FreeBSD CURRENT

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9927 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

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

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9926 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

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

2018-11-23 Thread STINNER Victor
STINNER Victor added the comment: I wrote a pull request to replace static inline functions with C macros: PR 10669. I ran a benchmark on speed.python.org server using the "performance" benchmark suite: http://pyperformance.readthedocs.io/ I understand that from the benchmark results that co

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

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9925 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35081] Move internal headers to Include/internal/

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +9924 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

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

2018-11-23 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file47943/2018-11-22_17-38-master-3bb183d7fb83-patch-10669.json.gz ___ Python tracker ___ __

[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-11-23 Thread Petr Viktorin
Petr Viktorin added the comment: Ah, XML is such an overengineered format! I usually live with the standard HTML entities – but it turns out you can define your own! Here's a reproducer which shows how to do that. -- nosy: +petr.viktorin Added file: https://bugs.python.org/file47942

  1   2   >