[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Could it instead throw a FileNotFoundError if the db simply doesn't exist at > the specified path? We pass the database path pretty much straight to sqlite3_open_v2(), via the os.PathLike interface, so any errors we get come straight from SQLite (apart

[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue15373] copy.copy() does not properly copy os.environment

2021-09-21 Thread Andrei Kulakov
Andrei Kulakov added the comment: I think the advantage of asdict() method is it's more discoverable and it doesn't leave any uncertainty of whether returned value will update environment or not. If a user sees `dict(os.environ)` in code, they may wonder if it does or does not; and there's n

[issue15373] copy.copy() does not properly copy os.environment

2021-09-21 Thread Anton Barkovsky
Change by Anton Barkovsky : -- nosy: -anton.barkovsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset 79a31480992c3fa5890fc7a6c5d9af6d337d5844 by Victor Stinner in branch 'main': bpo-45061: Detect refcount bug on empty tuple singleton (GH-28503) https://github.com/python/cpython/commit/79a31480992c3fa5890fc7a6c5d9af6d337d5844 -- _

[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26899 pull_request: https://github.com/python/cpython/pull/28504 ___ Python tracker ___ __

[issue15373] copy.copy() does not properly copy os.environment

2021-09-21 Thread Andrei Kulakov
Andrei Kulakov added the comment: I guess the easy way to test it would be to modify the copy and check os.environ, but still there would be some uncertainty if it's consistent across platforms and python versions, if it's expected to still work in future python versions, etc. asdict() docst

[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +26900 pull_request: https://github.com/python/cpython/pull/28505 ___ Python tracker _

[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +26901 pull_request: https://github.com/python/cpython/pull/28506 ___ Python tracker ___ __

[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 06e1773c8d8fe375423bb7fcf5922b49bc737b75 by Nikita Sobolev in branch 'main': bpo-45216: Remove extraneous method docs from `difflib` (GH-28445) https://github.com/python/cpython/commit/06e1773c8d8fe375423bb7fcf5922b49bc737b75 -- nosy: +lu

[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: See bpo-43760 and PR 28498 for a discussion about the PyThreadState.use_tracing member. -- ___ Python tracker ___ __

[issue45215] Add docs for Mock name and parent args and deprecation warning when wrong args are passed

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: Have you encountered misuse of Mock's `name` and `parent` in the wild? As you're saying, since `str()` and `repr()` will error out anyway, it's unlikely users were doing this in the first place. I'm a little hesitant to accept the deprecation since there are ve

[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset 86f28372b17c8c56539e9543bea9f125ab11b8aa by Victor Stinner in branch 'main': bpo-45061: Detect refcount bug on empty string singleton (GH-28504) https://github.com/python/cpython/commit/86f28372b17c8c56539e9543bea9f125ab11b8aa --

[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: I don't want to add a deallocator to bytes and int types to detect when their singleton is destroyed, since it would slow down C extensions which have no refcount bug. Maybe it could be added only if Py_DEBUG macro is defined. But I don't think that Py_DECRE

[issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef()

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: There is no consensus on changing things, so I just close my issue. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b7eac52b466f697d3e89f47508e0df0196a98970 by andrei kulakov in branch 'main': bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) https://github.com/python/cpython/commit/b7eac52b466f697d3e89f47

[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b7eac52b466f697d3e89f47508e0df0196a98970 by andrei kulakov in branch 'main': bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) https://github.com/python/cpython/commit/b7eac52b466f697d3e89f47

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +26905 pull_request: https://github.com/python/cpython/pull/28508 ___ Python tracker ___ __

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +26903 pull_request: https://github.com/python/cpython/pull/28507 ___ Python tracker ___ __

[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +26902 pull_request: https://github.com/python/cpython/pull/28507 ___ Python tracker _

[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset e6b6c1d23b3702052637f70551451d12695403a1 by Miss Islington (bot) in branch '3.10': bpo-45216: Remove extraneous method docs from `difflib` (GH-28445) (GH-28505) https://github.com/python/cpython/commit/e6b6c1d23b3702052637f70551451d12695403a1 ---

[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +26904 pull_request: https://github.com/python/cpython/pull/28508 ___ Python tracker ___ __

[issue42260] [C API] Add _PyInterpreterState_SetConfig(): reconfigure an interpreter

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: The initial issue, adding an API to reconfigure an interepreter, is implemented: I added _PyInterpreterState_SetConfig(). But I failed finding time to finish the larger project "rewrite getpath.c in Python" (PR 23169). It requires changing the C API of the P

[issue40989] [C API] Remove _Py_NewReference() and _Py_ForgetReference() from the public C API

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: I still consider that these functions must be moved to the internal C API. But I failed to find time to design a *public* C API for that, or help projects using these functions to avoid it. I prefer to close the isseu for now. -- resolution: -> reje

[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset df1006b561f9dca5a15af98d54f0337a75b69445 by Miss Islington (bot) in branch '3.9': bpo-45216: Remove extraneous method docs from `difflib` (GH-28445) (GH-28506) https://github.com/python/cpython/commit/df1006b561f9dca5a15af98d54f0337a75b69445

[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: The PEP 620 is still a draft. I prefer to work on other C API changes before coming back to this change which may break many C extensions. I failed finding time to design an API to expose a PyObject** array "view" with a function to release/destroy the view.

[issue45216] Remove redundant information from difflib docstrings

2021-09-21 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 ___ Python tracker ___ __

[issue42648] subprocess: add a helper/parameter to catch exec() OSError exception

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: I failed finding time to finish to design this feature. I'm not convinced that it's really needed. I abandoned my idea of deprecating os.popen(): bpo-42641. I close the issue. -- resolution: -> rejected stage: patch review -> resolved status: open -

[issue44807] typing.Protocol silently overrides __init__ method of delivered class

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: Marking issue as "pending" until we figure out how PEP 544 should be amended. -- status: open -> pending ___ Python tracker ___

[issue42671] Make the Python finalization more deterministic

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: I'm not really excited about breaking applications. While there is maybe a way to make the Python finalization more determistic, sorry, I'm not the one who will be brave enough to do it today. I abandon my idea for now. -- resolution: -> rejected st

[issue45041] [sqlite3] simplify executescript()

2021-09-21 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26906 pull_request: https://github.com/python/cpython/pull/28509 ___ Python tracker ___ ___

[issue43770] Rework C types initialization

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: The code is way more complicated than what I expected. I hope that my work on this issue will help future developers who will try to understand the code. But I prefer to stop the refactoring at this point. I pushed enough changes ;-) -- resolution:

[issue45035] sysconfig's posix_home scheme has different platlib value to distutils's unix_home

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: Should we simply close the issue and leave distutils as it is? -- ___ Python tracker ___ ___ Pyth

[issue19829] _pyio.BufferedReader and _pyio.TextIOWrapper destructor don't emit ResourceWarning if the file is not closed

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: While it would be great to also emit ResourceWarning, in the last 8 years, nobody managed to implement the feature. Also, this issue has no activity. I prefer to close the issue. -- resolution: -> out of date stage: needs patch -> resolved status: o

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 41d48bc038b254cc4a78a2d840097196b9545a84 by Miss Islington (bot) in branch '3.10': bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28508) https://github.com/python/cpython/commit/41d48b

[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 41d48bc038b254cc4a78a2d840097196b9545a84 by Miss Islington (bot) in branch '3.10': bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28508) https://github.com/python/cpython/commit/41d48b

[issue27069] webbrowser creates zombi processes in the background mode

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: Python 3.6 was released 5 years ago. Nobody complained about ResourceWarning. While it would be nice to fix the issue, nobody managed to write a fix in 5 years and this issue has no activity for 3 years. I close the issue. -- resolution: -> out of d

[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: Pablo, this regression was fixed in GH-28508 which should go into 3.10.0. -- nosy: +pablogsal priority: normal -> release blocker ___ Python tracker ___

[issue28977] Document PyObject_CallFunction() special case more explicitly

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: I don't know what to do with this old issue, so I prefer to simply close it. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29312] Use FASTCALL in dict.update()

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: It seems like using FASTCALL would make the code slower, not faster. I close this old issue. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: This issue has no activity for 3 years and was created 4 years ago. I close it. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue29811] Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs()

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue32085] [Security] A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages!

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: No activity for 3 years, I close the issue. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue33793] asyncio: _ProactorReadPipeTransport reads by chunk of 32 KiB: chunk size should be configurable

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: Nobody implemented the feature. I prefer to abandon my idea. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker __

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 09390c837a0bf73e213db2fbde34d756fa77a837 by Miss Islington (bot) in branch '3.9': bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28507) https://github.com/python/cpython/commit/09390c8

[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-21 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 09390c837a0bf73e213db2fbde34d756fa77a837 by Miss Islington (bot) in branch '3.9': bpo-45234: Fix FileNotFound exception raised instead of IsADirectoryError in shutil.copyfile() (GH-28421) (GH-28507) https://github.com/python/cpython/commit/09390c8

[issue35276] Document thread safety

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: It would be nice to document thread safety, but it's a large project. Maybe the Documentation Working Group could look into this issue. But nobody managed to write the doc in 3 years, I prefer to close the issue. -- resolution: -> rejected stage: -

[issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: No activity for 2 years, I close the issue. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38199] python3.8-config --ldflags must not generate -L/usr/lib64

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue37475] What is urllib.request.urlcleanup() function?

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: ResourceWarning is no longer emitted. I close the issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue36437] method_descriptor surprising error message when self is passed a keyword argument

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue35518] test_timeout uses blackhole.snakebite.net domain which doesn't exist anymore

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35478] multiprocessing: ApplyResult.get() hangs if the pool is terminated

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35479] multiprocessing.Pool.join() always takes at least 100 ms

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: Nobody managed to find a solution in 3 years. I close the issue. -- dependencies: -multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit, multiprocessing: ApplyResult.get() hangs if the pool is terminated resolution: ->

[issue35333] [C API] Rename private structs to use names closer to types

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-

[issue36136] Windows: python._pth sets isolated mode late during Python initialization

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue38564] test_asyncio: test_run_coroutine_threadsafe_with_timeout() has a race condition

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue38620] Shell python-config --includes returns the same path twice

2021-09-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue44958] [sqlite3] only reset statements when needed

2021-09-21 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Now that pysqlite_statement_reset() is only used in cursor.c, I suggest to > move it to cursor.c and make it a static function. I'll wait until PR 25984 is merged before opening a PR for relocating pysqlite_statement_reset(). -- __

[issue45259] No _heappush_max()

2021-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: The underscore functions are private and for internal use. There is no _heappush_max() because we didn't need it internally and it would just be dead code. Thanks for the report. -- resolution: -> not a bug stage: -> resolved status: open -> c

[issue45215] Add docs for Mock name and parent args and deprecation warning when wrong args are passed

2021-09-21 Thread Andrei Kulakov
Andrei Kulakov added the comment: Łukasz: For parent, there's this issue: #39222 (which is why I started looking into this). For name, I couldn't find anything here or on SO, but it's hard to search for this because keywords 'mock argument name' on SO finds over 700 results but they're refe

[issue45258] sysroot_paths in setup.py does not consider -isysroot for macOS

2021-09-21 Thread Ned Deily
Ned Deily added the comment: See my comment on the PR. -- components: +macOS -Build nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___

[issue41266] IDLE call hints and completions confused by ints and floats

2021-09-21 Thread wyz23x2
wyz23x2 added the comment: Ping. >>> from datetime import datetime as d >>> d(2021, 9, 22)-d(2020, 7, 10) datetime.timedelta(days=439) -- ___ Python tracker ___ __

[issue45260] Implement superinstruction UNPACK_SEQUENCE_ST

2021-09-21 Thread zcpara
New submission from zcpara : PEP 659 quickening provides a mechanism for replacing instructions. We add another super-instruction UNPACK_SEQUENCE_ST to replace the original UNPACK_SEQUENCE and the following n STROE_FAST instructions. See https://github.com/faster-cpython/ideas/issues/16. ---

[issue44423] copy2 / sendfile fails on linux with large file

2021-09-21 Thread karl
karl added the comment: could not reproduce the error -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

<    1   2