[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2019-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should not parallel tests be ran in different directories? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39

[issue39033] zipimport raises NameError: name '_boostrap_external' is not defined

2019-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Wince you has virtually written a patch, do you mind to create a PR Karthikeyan? -- ___ Python tracker <https://bugs.python.org/issue39

[issue32949] Simplify "with"-related opcodes

2019-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sure. -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32952] Add __qualname__ for attributes of Mock instances

2019-12-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +michael.foord versions: +Python 3.9 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue32952> ___ ___ Python-bug

[issue39037] Wrong trial order of __exit__ and __enter__ in the with statement

2019-12-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation -Interpreter Core keywords: +easy nosy: +docs@python stage: -> needs patch ___ Python tracker <https://bugs.python.org/i

[issue39055] base64.b64decode() with validate=True does not raise for a trailing \n

2019-12-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : If validate=True is passed to base64.b64decode(), it should raise a binascii.Error if the input contains any character not from the acceptable alphabet. But it does not raise if the input ends with a single \n. It raises if the input ends with a

[issue39055] base64.b64decode() with validate=True does not raise for a trailing \n

2019-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17087 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17616 ___ Python tracker <https://bugs.python.org/issu

[issue39056] Issues with handling the -W option

2019-12-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are some issues with handling the -W option: 1. A traceback is printed for some invalid category names. $ ./python -Wignore::0 'import warnings' failed; traceback: Traceback (most recent call last): File "/home/serhiy/py/cpython/

[issue39056] Issues with handling the -W option

2019-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17088 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17618 ___ Python tracker <https://bugs.python.org/issu

[issue39057] Issues with urllib.request.proxy_bypass_environment

2019-12-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are several issues with urllib.request.proxy_bypass_environment: 1. Leading dots are ignored in the proxy list, but not in the checked hostname. So ".localhost" does not matches ".localhost" in the proxy list. 2. A singl

[issue39057] Issues with urllib.request.proxy_bypass_environment

2019-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17089 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17619 ___ Python tracker <https://bugs.python.org/issu

[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We usually do not iterate all attributes, and dir() always sort attribute names. -- nosy: +rhettinger, serhiy.storchaka, yselivanov ___ Python tracker <https://bugs.python.org/issue39

[issue39091] CPython Segfault in 5 lines of code

2019-12-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39091> ___ ___ Python-bugs-list mailing list Unsub

[issue39091] CPython Segfault in 5 lines of code

2019-12-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! Since you already investigated the code, do you mind to create a PR which fixes a crash? I think that adding PyExceptionInstance_Check() in _PyErr_CreateException() could fix the issue

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2019-12-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mean some concrete code? Several times I wished similar feature. To get a UTF-8 cache if it exists and encode to UTF-8 without creating a cache otherwise. The private _PyUnicode_UTF8() macro could help if ((s = _PyUnicode_UTF8(str))) { size

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2019-12-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Would it be possible to use a "container" object like a Py_buffer? Looks like a good idea. int PyUnicode_GetUTF8Buffer(Py_buffer *view, const char *errors) -- nosy: +skrah ___ Python tr

[issue26767] Inconsistant error messages for failed attribute modification

2019-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not all error messages contain an attribute name, an object type name and a reason. -- ___ Python tracker <https://bugs.python.org/issue26

[issue39113] PyUnicode_AsUTF8AndSize Sometimes Segfaults With Incomplete Surrogate Pair

2019-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Your function returns a borrowed reference. It xiuld cause ceash even without calling PyUnicode_AsUTF8AndSize. Add Py_INCREF(str) -- nosy: +serhiy.storchaka resolution: -> not a bug ___ Python tracker <

[issue39113] PyUnicode_AsUTF8AndSize Sometimes Segfaults With Incomplete Surrogate Pair

2019-12-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue39113> ___ ___ Python-bugs-list

[issue34850] Emit a syntax warning for "is" with a literal

2019-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It cannot be suppressed by the code in the module caused a warning, because the warning is emitted at compile time. You need to silence it before compiling that module. Once you have compiled it, warning will no longer be emitted

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2019-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I like this idea, but I think that we should at least notify Python-Dev about all additions to the public C API. If somebody have objections or better idea, it is better to know earlier. -- ___ Python tracker

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39114> ___ ___ Python-bugs-list mailing list Unsub

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you show evidences that dropping the GIL can help you? bytes.join() needs to perform operations which needs to hold the GIL (allocating the memory, iterating the list, getting the data of bytes-like objects). I afraid that the cost of memcpy() is a

[issue39121] gzip header write OS field

2019-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The OS field is used in determining end-of-line convention for text files. But since we do not set the FTEXT flag, all files are binary. RFC 1952 Why do you need to set this field? -- nosy: +serhiy.storchaka

[issue39117] Performance regression for making bound methods

2019-12-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +inada.naoki, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39117> ___ ___ Python-bugs-list mailin

[issue39132] Adding funcitonality to determine if a constant string node is triple quoted

2019-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is impossible because of using newline escaping and string literal concatenation. In the following examples lineno != end_lineno, but strings use single quotes: print('Hello ' 'world!') print('Hello\ world

[issue39149] False positive using operator 'AND' while checking keys on dict()

2019-12-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39153] Clarify refcounting semantics of PyDict_SetItem[String]

2019-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The documentation for PyList_SetItem is explicit because its behavior is an exception from common rule and differs from PyList_SET_ITEM, so both should be documented explicitly. -- nosy: +serhiy.storchaka

[issue39156] Break up COMPARE_OP into logically distinct operations.

2019-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Few years ago I experimented with a special opcode for exception matching. It could make the bytecode a tiny bit smaller and faster, but since catching an exception in Python is relatively expensive, it would not have significant performance benefit. As

[issue39158] ast.literal_eval() doesn't support empty sets

2019-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: set() is neither literal nor container display. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please provide benchmarks that demonstrate the benefit of this change. We also need to add a test for join() which covers the new code. -- ___ Python tracker <https://bugs.python.org/issue36

[issue39146] too much memory consumption in re.compile unicode

2019-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We usually do not backport optimizations to 2.7. It could be backported if a regression was introduced in one of 2.7 bugfixes, but range() was here before ebd48b4f650d. Also, range(0x1,0x10+1) takes only 32*2**16 = 2 MiB of memory. It is small in

[issue39169] TypeError: 'int' object is not callable if the signal handler is SIG_IGN

2019-12-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +ethan.furman, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39169> ___ ___ Python-bugs-list mailin

[issue39172] Transformation of "string.find('asd', 'sd')" to Python 3 using 2to3

2019-12-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fixers find, rfind, etc in 'string' module ___ Python tracker <https://b

[issue39178] Should we make dict not accept a sequence of sets?

2020-01-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a very special case. I think it is better to leave it to third-party linters. Actually it is so uncommon, that I have doubts that even linters will want to handle it. -- nosy: +serhiy.storchaka

[issue39165] Completeness and symmetry in RE, avoid `findall(...)[0]`

2020-01-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This was discussed recently on the Python-ideas mailing list. https://mail.python.org/archives/list/python-id...@python.org/thread/M2OZCN5C26YUJJ4EXLIIXHQBGF6IM5GW/#H3GURL35C7AZ3ZBK6CQZGGCISUZ42WDV I agree with Raymond that this is an education problem

[issue39195] re._compile should check if the argument is a compiled pattern before checking cache and flags

2020-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 17799 improves the performance of an uncommon case at the cost of reducing the performance of a common case. I doubt this is a good change. If you have a compiled pattern, it is better to use its methods. -- nosy: +serhiy.storchaka

[issue39196] json fails to encode dictionary view types

2020-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: To handle non-standard types you can implement the default() method in the subclass of json.JSONEncoder (https://docs.python.org/3/library/json.html#json.JSONEncoder.default) or pass the corresponding argument to json.JSONEncoder() or json.dumps

[issue39165] Completeness and symmetry in RE, avoid `findall(...)[0]`

2020-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Your implementation takes several lines of code only because of complex semantic of findall() which you want to preserve in findfirst(). Actually findall() is an equivalent of one of three expressions, depending on the number of capturing groups in the

[issue39158] ast.literal_eval() doesn't support empty sets

2020-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The documentation for ast.literal_eval(): Safely evaluate an expression node or a string containing a Python literal or container display. The string or node provided may only consist of the following Python literal structures: strings, bytes

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a special case in tests for Scale.configure. It should be removed now. And maybe there is an old issue for this? -- ___ Python tracker <https://bugs.python.org/issue39

[issue39219] Fix attributes of syntax errors raized in the tokenizer

2020-01-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : SyntaxError can be raised at different stages of compiling. In some places the source text is not available and should be read from the file using the file name. Which does not work in case of compiling a string or reading from stdin. >>>

[issue39057] Issues with urllib.request.proxy_bypass_environment

2020-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6a265f0d0c0a4b3b8fecf4275d49187a384167f4 by Serhiy Storchaka in branch 'master': bpo-39057: Fix urllib.request.proxy_bypass_environment(). (GH-17619) https://github.com/python/cpython/commit/6a265f0d0c0a4b3b8fecf4275d4918

[issue39056] Issues with handling the -W option

2020-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 41ec17e45d54473d32f543396293256f1581e44d by Serhiy Storchaka in branch 'master': bpo-39056: Fix handling invalid warning category in the -W option. (GH-17618) https://github.com/python/cpython/commit/41ec17e45d54473d32f54339629325

[issue39055] base64.b64decode() with validate=True does not raise for a trailing \n

2020-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b19c0d77e6f25ea831ab608c71f15d0d9266c8c4 by Serhiy Storchaka in branch 'master': bpo-39055: Reject a trailing \n in base64.b64decode() with validate=True. (GH-17616) https://github.com/python/cpyt

[issue39057] Issues with urllib.request.proxy_bypass_environment

2020-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39055] base64.b64decode() with validate=True does not raise for a trailing \n

2020-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39056] Issues with handling the -W option

2020-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32856] Optimize the `for y in [x]` idiom in comprehensions

2020-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I want to merge PR 16814 if there are no objections. -- ___ Python tracker <https://bugs.python.org/issue32856> ___ ___ Pytho

[issue37685] Fix equality checks for some types

2020-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +17263 pull_request: https://github.com/python/cpython/pull/17836 ___ Python tracker <https://bugs.python.org/issue37

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The optimization for constant indexes is handy for things like b'A'[0]. I do not know cases for constant slices of constant strings. Even if there are cases, we need to prove that they are common enough. The compiler does not perform all possibl

[issue39223] Fold constant slicing with slices

2020-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Then I suggest to focus on optimizing real code. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39271] Dead assignment in pattern_subx

2020-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1a183faccbe5c32c367dbced721a25c1444dc5c1 by Serhiy Storchaka (Alex Henrie) in branch 'master': bpo-39271: Remove dead assignment from pattern_subx (GH-17915) https://github.com/python/cpython/commit/1a183faccbe5c32c367dbced721a25

[issue39271] Dead assignment in pattern_subx

2020-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Alex. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2020-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If TESTFN is the same in different processes, there is something wrong in the code for running parallel tests. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39150] See if PyToken_OneChar would be faster as a lookup table

2020-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The difference around 10% looks very strange. Tokenizing is just one of parts of the compiler, and unlikely it is a narrow way. There are input/output, many memory allocations, encoding and decoding, many iterations and recursions. Are you sure that you

[issue39235] Generator expression has wrong line/col info when inside a Call object

2020-01-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +17333 pull_request: https://github.com/python/cpython/pull/17926 ___ Python tracker <https://bugs.python.org/issue39

[issue39235] Generator expression has wrong line/col info when inside a Call object

2020-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 850a8856e120f8cba15e557a0e791f93b43d6989 by Serhiy Storchaka in branch 'master': bpo-39235: Check end_lineno and end_col_offset of AST nodes. (GH-17926) https://github.com/python/cpython/commit/850a8856e120f8cba15e557a0e791f

[issue39235] Generator expression has wrong line/col info when inside a Call object

2020-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If somebody want to backport tests to 3.8, he must check manually all end positions. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7 ___ Pytho

[issue39219] Fix attributes of syntax errors raized in the tokenizer

2020-01-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17360 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17828 ___ Python tracker <https://bugs.python.org/issu

[issue39219] Fix attributes of syntax errors raized in the tokenizer

2020-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, wrong issue number. -- ___ Python tracker <https://bugs.python.org/issue39219> ___ ___ Python-bugs-list mailin

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39318> ___ ___ Python-bugs-list mailing list Un

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue is more complex. I am working on it. -- ___ Python tracker <https://bugs.python.org/issue39318> ___ ___ Python-bug

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Problems: 1. In general, it is hard to avoid leaks because an exception like KeyboardInterrupt or MemoryError can be raised virtually anywhere, even before we save a file descriptor. We may rewrite the code so that it will use few simple bytecode

[issue39341] [security] zipfile: ZIP Bomb vulnerability, don't check announced uncompressed size

2020-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is this 2.7 only issue? I think it is too late. -- ___ Python tracker <https://bugs.python.org/issue39341> ___ ___ Python-bug

[issue39353] Deprecate the binhex module

2020-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: binhex provides an encoding different from binascii.a2b_hex() and binascii.unhexlify(). If deprecate the binhex module, we perhaps should deprecate also binascii.b2a_hqx(), binascii.a2b_hqx(), binascii.rlecode_hqx(), binascii.rledecode_hqx() and

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2020-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Names of arguments can be just removed from function declarations in header files. -- keywords: +easy (C) nosy: +serhiy.storchaka stage: -> needs patch type: -> enhancement versions: -Python 2.7, Python 3.5, Pyth

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2020-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Qt has different issue. "slots" is not a keyword, and the issue can be avoided by including Python.h before Qt.h or undefining the "slots" macro. It could be a harder issue if "module" would be a field name of a public str

[issue39165] Completeness and symmetry in RE, avoid `findall(...)[0]`

2020-01-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Most of examples do not test whether findall() returns an empty list. So there is no significant difference with using search() -- just different type of exception if fails (IndexError, TypeError or AttributeError). Since most examples do not handle

[issue39353] Deprecate the binhex module

2020-01-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker <https://bugs.python.org/issue39353> ___ ___ Python-bug

[issue39372] The header files in Include/ have many declarations with no definition

2020-01-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! All removals LGTM. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39372> ___ ___

[issue39372] The header files in Include/ have many declarations with no definition

2020-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe backport this change (except PyNoArgsFunction)? -- ___ Python tracker <https://bugs.python.org/issue39372> ___ ___

[issue18091] Remove PyNoArgsFunction

2020-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Removed in issue39372 together with other unused declarations. PyNoArgsFunction was the only one that breaks a user code. But using PyNoArgsFunction is likely a sign of error. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: needs pa

[issue18091] Remove PyNoArgsFunction

2020-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I cannot report a bug in Blender, because get an exception on link https://developer.blender.org/maniphest/project/2/type/Bug/ . -- ___ Python tracker <https://bugs.python.org/issue18

[issue39377] json.loads encoding parameter deprecation removal in Python 3.9

2020-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please update the documentation which still mentions the encoding parameter. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39365] Support (SEEK_END/SEEK_CUR) relative seeking in StringIO

2020-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue25190. -- components: +Library (Lib) nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Define StringIO seek offset as code point offset ty

[issue39389] gzip metadata fails to reflect compresslevel

2020-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks reasonable. gzip should write b'\002' for compresslevel == _COMPRESS_LEVEL_BEST, b'\004' for compresslevel == _COMPRESS_LEVEL_FAST, and b'\000' otherwise. Do you mind to create a PR William. -- keywords: +easy

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks like a backward incompatible change in 3.8. Should not copytree convert arguments of the ignore callback to str and list correspondingly? -- nosy: +serhiy.storchaka ___ Python tracker <ht

[issue39394] DeprecationWarning for `flag not at the start of expression` is cutoff too early

2020-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why do you want to output the full regular expression? Is not source file path, line number, and starting 20 characters not enough to identify the affected regular expression? -- nosy: +serhiy.storchaka

[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe use SetEnvironmentVariable() on Windows? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39

[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This indeed a good argument to continue to use _wputenv. Thank you Eryk, you have saved us from making a mistake. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39389] gzip metadata fails to reflect compresslevel

2020-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset eab3b3f1c60afecfb4db3c3619109684cb04bd60 by Serhiy Storchaka (William Chargin) in branch 'master': bpo-39389: gzip: fix compression level metadata (GH-18077) https://github.com/python/cpython/commit/eab3b3f1c60afecfb4db3c36191096

[issue39389] gzip metadata fails to reflect compresslevel

2020-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution William! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39408] Add support for SQLCipher

2020-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What exactly do you need to add and change in the sqlite module? The stdlib cannot depend on a third-party module. Ideally, you just create a subclass of some standard class and overrides a constructor and few methods. -- nosy: +serhiy.storchaka

[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is also _wputenv_s which affects _spawn, _exec and system. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why posix_putenv_garbage was renamed to putenv_dict? -- ___ Python tracker <https://bugs.python.org/issue39406> ___ ___ Pytho

[issue39415] Remove unused code from longobject.c complexobject.c floatobject.c

2020-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: A patch was proposed in issue18842. -- nosy: +martin.panter, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +giampaolo.rodola ___ Python tracker <https://bugs.python.org/issue39390> ___ ___ Python-bugs-list mailing list Unsub

[issue39408] Add support for SQLCipher

2020-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If SQLCipher is a drop-in replacement, perhaps the simplest way is to use LD_LIBRARY_PATH to replace libsqlite3. You can also insert a path to your build of the _sqlite module in sys.path before standard paths

[issue39395] The os module should unset() environment variable at exit

2020-01-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- type: -> crash versions: +Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue39395> ___ ___ Python-

[issue39395] The os module should unset() environment variable at exit

2020-01-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue39406 is a new feature. In any case we should fix potential crash in older Python versions. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39

[issue39433] curses.setupterm can raise _curses.error

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: curses.error is documented as an exception raised when a curses library function returns an error. No need to repeat this for every curses function. It is very uncommon to document all exceptions that can be raised by a particular function in Python

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17548 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18161 ___ Python tracker <https://bugs.python.org/issu

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 18161 fixes race condition by using "from ... import ..." which waits until the module be completely initialized if the specified names are not set. -- components: +Library (Lib) nosy: +serhiy.storchaka type: crash -> behavior vers

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +brett.cannon, eric.snow, lars.gustaebel, ncoghlan ___ Python tracker <https://bugs.python.org/issue39430> ___ ___ Pytho

[issue39391] Nondeterministic Pydoc output on functions that have functions as default parameters

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You will get the same problem for common idiom of using a singleton for optional parameters without default value. _singleton = object() def get(key, default=_signleton): if default is _signleton: ... And for other objects whos

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is intended to support circular imports. Let foo.py contains "import bar" and bar.py contains "import foo". When you execute "import foo", the import machinery first creates an empty module foo, adds it to sys.modules, re

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > For completeness, a similar problem is present also on python < 3.8 if > passing a pathlib.Path type as *src* I do not think this is a problem. If you pass a string, you will get a string, so existing code will continue to work as before.

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suppose it fixed the bug. But I cannot confirm because I cannot reproduce the original bug. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39461] [RFE] os.environ should support Path-like values, like subprocess(..., env=...)

2020-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Implicit conversion can also hide some bugs. Semantically os.environ is an str to str mapping and os.environb is a bytes to bytes mapping. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.

<    19   20   21   22   23   24   25   26   27   28   >