Serhiy Storchaka added the comment:
Should not parallel tests be ran in different directories?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39
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
Serhiy Storchaka added the comment:
Sure.
--
resolution: -> out of date
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
nosy: +michael.foord
versions: +Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue32952>
___
___
Python-bug
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
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
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
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/
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
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
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
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
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39091>
___
___
Python-bugs-list mailing list
Unsub
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
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
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
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
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
<
Change by Serhiy Storchaka :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue39113>
___
___
Python-bugs-list
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
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
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39114>
___
___
Python-bugs-list mailing list
Unsub
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
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
Change by Serhiy Storchaka :
--
nosy: +inada.naoki, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39117>
___
___
Python-bugs-list mailin
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
Change by Serhiy Storchaka :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
Serhiy Storchaka added the comment:
set() is neither literal nor container display.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39
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
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
Change by Serhiy Storchaka :
--
nosy: +ethan.furman, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39169>
___
___
Python-bugs-list mailin
Change by Serhiy Storchaka :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Fixers find, rfind, etc in 'string' module
___
Python tracker
<https://b
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
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
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
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
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
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
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
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.
>>>
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
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
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
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
I want to merge PR 16814 if there are no objections.
--
___
Python tracker
<https://bugs.python.org/issue32856>
___
___
Pytho
Change by Serhiy Storchaka :
--
pull_requests: +17263
pull_request: https://github.com/python/cpython/pull/17836
___
Python tracker
<https://bugs.python.org/issue37
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
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
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
Serhiy Storchaka added the comment:
Thank you Alex.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
Change by Serhiy Storchaka :
--
pull_requests: +17333
pull_request: https://github.com/python/cpython/pull/17926
___
Python tracker
<https://bugs.python.org/issue39
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
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
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
Serhiy Storchaka added the comment:
Sorry, wrong issue number.
--
___
Python tracker
<https://bugs.python.org/issue39219>
___
___
Python-bugs-list mailin
Change by Serhiy Storchaka :
--
assignee: -> serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39318>
___
___
Python-bugs-list mailing list
Un
Serhiy Storchaka added the comment:
This issue is more complex. I am working on it.
--
___
Python tracker
<https://bugs.python.org/issue39318>
___
___
Python-bug
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
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
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
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
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
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
Change by Serhiy Storchaka :
--
components: +macOS
nosy: +ned.deily, ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue39353>
___
___
Python-bug
Serhiy Storchaka added the comment:
Good catch!
All removals LGTM.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39372>
___
___
Serhiy Storchaka added the comment:
Maybe backport this change (except PyNoArgsFunction)?
--
___
Python tracker
<https://bugs.python.org/issue39372>
___
___
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
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
Serhiy Storchaka added the comment:
Please update the documentation which still mentions the encoding parameter.
--
___
Python tracker
<https://bugs.python.org/issue39
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
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
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
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
Serhiy Storchaka added the comment:
Maybe use SetEnvironmentVariable() on Windows?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39
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
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
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
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
Serhiy Storchaka added the comment:
There is also _wputenv_s which affects _spawn, _exec and system.
--
___
Python tracker
<https://bugs.python.org/issue39
Serhiy Storchaka added the comment:
Why posix_putenv_garbage was renamed to putenv_dict?
--
___
Python tracker
<https://bugs.python.org/issue39406>
___
___
Pytho
Serhiy Storchaka added the comment:
A patch was proposed in issue18842.
--
nosy: +martin.panter, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39
Change by Serhiy Storchaka :
--
nosy: +giampaolo.rodola
___
Python tracker
<https://bugs.python.org/issue39390>
___
___
Python-bugs-list mailing list
Unsub
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
Change by Serhiy Storchaka :
--
type: -> crash
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue39395>
___
___
Python-
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
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
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
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
Change by Serhiy Storchaka :
--
nosy: +brett.cannon, eric.snow, lars.gustaebel, ncoghlan
___
Python tracker
<https://bugs.python.org/issue39430>
___
___
Pytho
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
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
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.
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
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.
2301 - 2400 of 25874 matches
Mail list logo