New submission from Dmitry Marakasov :
Here's a curious problem. issubclass() check of a type against an ABC-derived
class raises TypeError claiming that type is not a class, however
inspect.isclass() says it's a class, and issubclass() check against a simple
class works fine:
``
Change by Dmitry Smirnov :
--
keywords: +patch
nosy: +dmitrysmirnov931
nosy_count: 2.0 -> 3.0
pull_requests: +27588
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29318
___
Python tracker
<https://bugs.p
New submission from Dmitry Marakasov :
So, I was investigating a test failure of python 3.11 and 3.10 on FreeBSD (but
it likely applies to all python versions):
==
FAIL: test_makedev (test.test_posix.PosixTester
Change by Dmitry Marakasov :
--
pull_requests: +27743
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29494
___
Python tracker
<https://bugs.python.org/issu
Dmitry Marakasov added the comment:
In case you're curious, here are some st_dev values which are encountered on my
FreeBSD:
- 0xac2308de99d1f699 - ZFS
- 0x7100ff00 - devfs
- 0x8700ff01 - tmpfs
- 0x2900ff4e - nullfs
I suspect Linux uses smaller numbers which do not cause overflo
Dmitry Marakasov added the comment:
> What happens if you instead write:
It survived more than 4000 runs, it looks like it doesn't experience the
problem.
--
___
Python tracker
<https://bugs.python.org
Dmitry Tsirkov added the comment:
I have recently stumbled upon this bug, and I can present the example and a
solution I've used.
The issue happens when we try to parse x-www-form-urlencoded of type bytes:
```
>>> from urllib.parse import urlencode, parse_qs
>>> urlenco
New submission from Dmitry Goldenberg :
Is there a reliable way to certify (ensure, track) the delivery of an email
message when using smtplib?
For example:
Disposition-Notification-To message header which enables the e-mail reader of
the recipient to send confirmation e-mail when the
Dmitry Goldenberg added the comment:
Yes, it's a question which could lend itself well to a documentation issue.
I've looked at things like:
https://stackoverflow.com/questions/54047021/python-smtplib-how-to-use-disposition-notification-to
https://stackoverflow.com/questions/40369
New submission from Dmitry Shachnev :
Currently my /usr/lib/python3.2/email/encoders.py has this code:
def _qencode(s):
enc = _encodestring(s, quotetabs=True)
# Must encode spaces, which quopri.encodestring() doesn't do
return enc.replace(' ', '=20
Changes by Dmitry Shachnev :
--
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue14360>
___
___
Python-bugs-list mailing list
Unsubscri
Dmitry Shachnev added the comment:
(Sorry for not replying earlier).
I think the main priority here is getting things working, not the tests (so I
have little interest in that).
First of all, should quopri.encodestring() really return bytes? Everything it
returns is ascii text, obviously
Dmitry Shachnev added the comment:
> In fact, there's really no reason to call an encode_ method at all, since if
> you pass a string to MIMEText when giving it a non-ascii unicode string, it
> will default to utf-8 and do the appropriate CTE encoding.
No, it doesn'
Dmitry Shachnev added the comment:
> You can get it to work by explicitly passing the charset
Thanks, I didn't know about that.
> Given the above, do you need it anymore?
No.
--
___
Python tracker
<http://bugs.python.
Dmitry Shachnev added the comment:
> Then, which types of argument should encode_* functions take (I think str
> should be supported, and it's not a case here as encode_quopri will only
> accept bytes)?
I meant which types of *payload* should they accept. Here's an illu
New submission from Dmitry Tantsur :
These two calls are currently Unix-only in the socket module. However, Windows
supports them starting with Vista:
https://docs.microsoft.com/en-us/windows/desktop/api/netioapi/nf-netioapi-if_indextoname
https://docs.microsoft.com/en-us/windows/desktop/api
Dmitry Tantsur added the comment:
That would be fantastic, but I did not dare asking for it :)
This is how the output of if_nameindex looks on my Fedora 29:
[(1, 'lo'), (2, 'enp0s31f6'), (3, 'wlp4s0'), (4, 'virbr0'), (5, 'virbr0-nic'),
Change by Dmitry Shachnev :
--
nosy: +mitya57
___
Python tracker
<https://bugs.python.org/issue37504>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Dmitry Shachnev :
--
keywords: +patch
pull_requests: +14421
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14606
___
Python tracker
<https://bugs.python.org/issu
Change by Dmitry Shachnev :
--
title: 3.8 b2 now requires sphinx2, but only has documented 1.8 ->
Documentation fails to build when using Sphinx' texinfo builder
___
Python tracker
<https://bugs.python.org
Dmitry Rubanovich added the comment:
lookdict_index() (and the rest of the files in dictobject.c) are using
unnecessarily complicated perturb mechanism. And, in fact, it's slower than
the simpler case.
Instead of this:
for (size_t perturb = hash;;) {
perturb >>= PERTURB_S
New submission from Dmitry Rubanovich:
lookdict_index() (and the rest of the files in dictobject.c) are using
unnecessarily complicated perturb mechanism. And, in fact, it's slower than
the simpler case.
Instead of this:
for (size_t perturb = hash;;) {
perturb >>= PERTURB_S
Dmitry Rubanovich added the comment:
I am looking at the 3.6.1 code. I am not trying to simulate the index lookup
as the lookup function would do it.
There is no point in that. The point of the script is to detect collisions
among perturbed secondary indexes rather than between primary
Dmitry Rubanovich added the comment:
Yes, I do understand it.
But the statement in lines 166, 167: "For any initial j in range(2**i),
repeating that 2**i times generates each int in range(2**i) exactly once" does
not hold when the perturb is added. 2**i times will not be enough t
Dmitry Rubanovich added the comment:
Tim,
I am not testing randomly. The scripts calculate secondary hash for **each**
value in a ring to see how often this results in duplicate (or triplicate,
etc.) values. And they do it for each (mod 2**i) ring for i between 8 and 20.
Then (mostly as an
Dmitry Rubanovich added the comment:
Changing the title, to remove "simplify", since the discussion revealed that
the potential improvement would have to be treated as a special case and,
therefore, would not simplify the code.
--
title: dict: simplify and improve looku
Dmitry Rubanovich added the comment:
A few notes on my motivation and other comments I made(not necessarily in the
order of significance):
1. I started looking at this because of the fix in Issue28201. It effectively
improves on the difference between
print_collision_counts
Dmitry K added the comment:
test_concurrency (test.test_import.ImportTests) seems to fail, too, with a
similar error:
ModuleNotFoundError: No module named 'package'
Apparently, this happens because the LIBSUBDIRS variable in Makefile doesn't
include all the subdire
Dmitry Kazakov added the comment:
Please ignore my last message, I didn't notice the existing pull request...
Sorry.
--
___
Python tracker
<http://bugs.python.org/is
New submission from Dmitry Vinokurov:
Hi!
I'm using python-opcua and wonder if it is possible to get list of clients
connected to running server? I've asked such question in python-opcua repo
https://github.com/FreeOpcUa/python-opcua/issues/480 and developers redirected
me here.
New submission from Dmitry Malinovsky:
When there is a huge amount of `writer.write` calls followed by `await
writer.drain()` on a non-paused channel, and there are no other coroutine
switches, `await writer.drain()` immediately returns without a switch. This is
because
Dmitry Kazakov added the comment:
In order to load and compile the module code, runpy calls the loader's get_code
method. Because that happens outside of the normal import process, and
PyImport_ImportModuleLevelObject is currently the only place where
remove_importlib_frames is being in
Dmitry Kazakov added the comment:
Since runpy also handles the execution of directories and zip files, I think it
would be reasonable to clean up tracebacks in these cases, too.
The ignore_modules argument would be a great addition to the traceback module.
Should I create a separate issue
Changes by Dmitry Kazakov :
--
pull_requests: +3274
___
Python tracker
<http://bugs.python.org/issue31299>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Dmitry Chestnykh:
The example for creating and verifying signed cookies with hashlib.blake2
doesn't work. Corrected in GitHub PR #3694.
--
assignee: docs@python
components: Documentation
messages: 302787
nosy: dchest, docs@python
priority: normal
pull_requests:
Dmitry Kazakov added the comment:
It would seem no one is actually interested in this proposed enhancement. I'm
closing my PR, since I'm not interested in resolving the file conflict. I'll
probably submit a traceback-mutating patch to the issue 16217. This issue
Change by Dmitry Kazakov :
--
pull_requests: -5065
___
Python tracker
<https://bugs.python.org/issue31299>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Dmitry Kazakov :
--
pull_requests: +11522
___
Python tracker
<https://bugs.python.org/issue31299>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Dmitry Kazakov :
--
pull_requests: -11522
___
Python tracker
<https://bugs.python.org/issue31299>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Dmitry Kazakov :
--
nosy: -vaultah
___
Python tracker
<https://bugs.python.org/issue31299>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from DMITRY KOSHELEV :
Hello dear developer!
I was playing with try/else/finally block and have found a bug:
Inside of "else" or/and "except" I can do this
1 + print('Why do you print me?') + 1
this would print "Why do you print me?",
New submission from Dmitry Marakasov :
Python 3.8 and nightly introduces unused (in some cases) parameters in object.h
header. This makes compilation of third party code which includes the header
fail if it's built with -Werror.
Build log excerpt:
---
g++ -Wno-unused-result -Wsign-co
Change by Dmitry Kazakov :
--
pull_requests: -4438
___
Python tracker
<https://bugs.python.org/issue31841>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Dmitry Kazakov :
--
pull_requests: -4870
___
Python tracker
<https://bugs.python.org/issue27639>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Dmitry Kazakov :
--
pull_requests: +13067
___
Python tracker
<https://bugs.python.org/issue31841>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Dmitry Kazakov :
--
pull_requests: -13067
___
Python tracker
<https://bugs.python.org/issue31841>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Dmitry Kazakov :
--
pull_requests: +13069
___
Python tracker
<https://bugs.python.org/issue27639>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Dmitry Kazakov :
--
pull_requests: +5065
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue31299>
___
___
Python-
New submission from Dmitry Alimov :
In the comments to `hamt_node_collision_without` function in hamt.c module, I
think should be `so convert` instead of `co convert`:
```
if (new_count == 1) {
/* The node has two keys, and after deletion the
Change by Dmitry Alimov :
--
keywords: +patch
pull_requests: +5307
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32743>
___
___
Py
New submission from Dmitry Alimov :
I've found "double colons" typos in examples:
@consumer
def jpeg_writer(dirname):: # 1) here
fileno = 1
and
try:
while self.running and self.queue:: # 2) here
func = self.queue.popleft()
--
Dmitry Alimov added the comment:
https://github.com/python/peps/pull/567
--
___
Python tracker
<https://bugs.python.org/issue32744>
___
___
Python-bugs-list m
Dmitry Alimov added the comment:
Merged. It's fixed now: https://www.python.org/dev/peps/pep-0342/
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Dmitry Alimov added the comment:
Fixed
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dmitry Zotikov added the comment:
James, double check you specify the right path to the local system libraries.
If the system is multilib, libssl resides in /usr/local/lib/hpux32 (64) and not
in /usr/local/lib directly.
--
nosy: +dmitry.zotikov
Dmitry Andreychuk added the comment:
I created this issue almost 4 years ago. Looking at it now, I think that I was
asking too much of that docstring. I believe it's current version quite
sufficient.
I would close the issue, but I'm not sure if it's up
Dmitry Alimov added the comment:
The documentation for EXTENDED_ARG opcode should also be updated for Python
versions 3.6, 3.7, 3.8.
--
nosy: +delimitry
versions: +Python 3.6, Python 3.8
___
Python tracker
<https://bugs.python.org/issue32
Dmitry Kazakov added the comment:
Yes, a public built-in facility to modify a traceback would certainly be
useful, although there should be a standard way to "hide" unwanted frames
without mutating the traceback, too, and the traceback module seems a perfect
place to add it.
New submission from Dmitry Kazakov :
A few of the methods of collections.UserString return objects of type str when
one would expect instances of UserString or a subclass. Here's an example for
UserString.join:
>>> s = UserString(', ').join(['a', 'b&
Dmitry Kazakov added the comment:
Ping. (this issue needs a decision on ignore_modules vs filter callback, and/or
patch review)
--
___
Python tracker
<https://bugs.python.org/issue31
Dmitry Kazakov added the comment:
This is a documented feature:
https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation
And yes, it was discussed before:
https://mail.python.org/pipermail/python-ideas/2013-May/020527.html
--
nosy: +vaultah
Dmitry Kazakov added the comment:
I only recently realized that trace.Trace accepts two similar arguments, namely
ignoremods and ignoredirs. Should we try to make the API and implementation of
the functionality proposed here conform to that of trace.Trace's ignoremods?
Would Python-Ide
Change by Dmitry Kazakov :
--
pull_requests: -3274
___
Python tracker
<https://bugs.python.org/issue31299>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Dmitry Kazakov :
--
keywords: +patch
pull_requests: +4438
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31841>
___
___
Py
Dmitry Kazakov added the comment:
I added a PR.
FWIW, I still think it would make sense to change the return type of
UserString.join, and maybe *split* and *partition methods (to return list/tuple
of UserString objects) for the sake of consistency
Dmitry Kazakov added the comment:
This is not a bug in Python. Refer to this page for the explanation:
https://stackoverflow.com/questions/240178/list-of-lists-changes-reflected-across-sublists-unexpectedly
Basically, [{}]*3 creates a list with three references to the same dictionary
New submission from Dmitry sky :
def get_search_url(from_, to):
return f"http://thesite.com/Search?SO0={from_}&SD0={to}&SD1={from}&NA=false";
# pls note `from_` vs `from` ^^
$ python fstring.py
File "", line 1
Change by Dmitry Kazakov :
--
pull_requests: +4870
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue27639>
___
___
Python-
Change by Dmitry Kazakov :
--
nosy: +vaultah
___
Python tracker
<https://bugs.python.org/issue27639>
___
___
Python-bugs-list mailing list
Unsubscribe:
Dmitry Malinovsky added the comment:
I've changed the implementation significantly since August 2017, futures are
not involved anymore so please ignore that part. However, such drain behavior
is still present - but I don't think anymore that yielding to the event loop is
an easy
Change by Dmitry Kalinkin :
Added file: https://bugs.python.org/file47669/python-3.8-distutils-C++.patch
___
Python tracker
<https://bugs.python.org/issue1222
Dmitry Kazakov added the comment:
I asked for some input on this issue in January
(https://mail.python.org/pipermail/python-dev/2018-January/151590.html). Since
then an important PR was merged (https://github.com/python/cpython/pull/4793),
however it mutates the traceback object. Should
Change by Dmitry Shachnev :
--
nosy: +mitya57
___
Python tracker
<https://bugs.python.org/issue22543>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Dmitry Jemerov:
On Mac OS X 10.8 with the default language set to English (System Preferences |
Language and Text), the default terminal application sets the LC_CTYPE
environment variable to "UTF-8". If you run Python from the terminal and t
Dmitry Jemerov added the comment:
Judging from the results of Googling for the error message, I'm far from the
only one seeing this problem.
What exactly would be the benefit of adding the code to check for the platform?
--
___
Python tr
Dmitry Jemerov added the comment:
Why exactly does this matter? UTF-8 not being a valid LC_CTYPE value simply
means that no one running Linux will ever have LC_CTYPE set to UTF-8, and the
branch will never be hit.
OTOH, adding the check will make the code harder to test and simply larger (no
Dmitry Jemerov added the comment:
A related issue (with a patch that touches the same locale parsing code) is
http://bugs.python.org/issue5815
--
___
Python tracker
<http://bugs.python.org/issue18
Dmitry Jemerov added the comment:
A related issue (a case which isn't taken into account by Serhiy's patch) is
http://bugs.python.org/issue18378
--
nosy: +Dmitry.Jemerov
___
Python tracker
<http://bugs.python.
Dmitry Jemerov added the comment:
I personally don't, but the function is used by Sphinx, which is what I was
trying to get to work when I ran into this problem.
--
___
Python tracker
<http://bugs.python.org/is
New submission from Dmitry Dvoinikov :
Using Python 3.3.0a2 (default, Apr 1 2012, 19:34:58) [MSC v.1500 64 bit
(AMD64)] on win32.
This line of code
"{0:s}{1:s}".format("ABC", "\u0410\u0411\u0412")
results in
SystemError: Cannot copy UCS2 characters int
New submission from Dmitry Shachnev :
Trying to write a email-sending script with PGP-signing functionality, I
stumbled upon a problem (see [1]): it was impossible to sign mutlipart emails
(actually the signing was performed, but the verifying programs thought that
the signature is bad
Dmitry Shachnev added the comment:
Maybe it'll be better to use 'latin-1' charset for latin-1 texts?
Something like this:
if _charset == 'us-ascii':
try:
_text.encode(_charset)
except UnicodeEncodeError:
try:
_text.encode(
Dmitry Shachnev added the comment:
> Looking at your stackoverflow post, you might be able to fix this by doing an
> rstrip on the string body before signing it.
My body doesn't end with \n, so that doesn't help. If you suggest me any (easy)
way to fix this on the level of m
Dmitry Shachnev added the comment:
> By 'body' I actually meant the multipart part you are signing.
Yes, I've understood you, and I mean the same :) The signature is created
against the not-ending-with-newline string, in any case.
--
Dmitry Shachnev added the comment:
> Hmm. So that means the verifiers are not paying attention to the MIME > RFC?
> That's unfortunate.
It seems that's true...
--
___
Python tracker
<http://bugs
Changes by Dmitry Shachnev :
--
nosy: +mitya57
___
Python tracker
<http://bugs.python.org/issue7304>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Dmitry Shachnev :
(Follow-up to issue 14380)
The attached patch makes the email.mime.text.MIMEText constructor use the
iso-8859-1 (aka latin-1) encoding for messages where all characters are in
range(256). This also makes them use quoted-printable transfer encoding instead
Changes by Dmitry Shachnev :
--
keywords: +patch
Added file: http://bugs.python.org/file25845/issue_15016.patch
___
Python tracker
<http://bugs.python.org/issue15
Dmitry Shachnev added the comment:
Updated the patch:
- Avoid using letter Ш in test, it's better to use chr(256) as the test case;
- Updated the comment in MIMEText constructor to reflect the new behaviour.
--
hgrepos: +135
Added file: http://bugs.python.org/file25846/issue_150
Changes by Dmitry Shachnev :
--
hgrepos: -135
___
Python tracker
<http://bugs.python.org/issue15016>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Dmitry Shachnev :
Removed file: http://bugs.python.org/file25845/issue_15016.patch
___
Python tracker
<http://bugs.python.org/issue15016>
___
___
Python-bug
Dmitry Shachnev added the comment:
Done, sent an e-mail to contribut...@python.org.
--
___
Python tracker
<http://bugs.python.org/issue15016>
___
___
Python-bug
Dmitry Shachnev added the comment:
> This seems to be an enhancement sort of request rather than a bug... so I
> wonder why Python 3.2 is listed?
Fixed.
> ... although I see nothing in the PEP about how to access that information
> from Python.
You are right, it seems there
New submission from Dmitry Dvoinikov:
The following line prints different things each time you run it:
python3 -c "print(', '.join({ '1': '2', '3': '4' }.keys()))"
The output is either "1, 3" or "3, 1". Is such ind
New submission from Dmitry Dvoinikov:
For the following script
import xmlrpc.client; from xmlrpc.client import escape
text = "...\u043c..<"
print(escape(text))
Python 3.3.0b1 produces
...ь..<...<
New submission from Dmitry Dvoinikov:
The following script
---
import email.header
print(email.header.decode_header("foo =?windows-1251?Q?bar?="))
---
produces
[(b'foo', None), (b'bar', 'windows-1251')]
in Python 3.2 but
[(b'foo ', N
New submission from Dmitry Andreychuk:
Calls to autospecced mock functions are not recorded to mock_calls list of
parent mock. This only happens if autospec is used and the original object is a
function.
Example:
import unittest.mock as mock
def foo():
pass
parent = mock.Mock
New submission from Dmitry Andreychuk:
https://docs.python.org/3.4/library/functions.html?highlight=int#int
The docstring for int() function has these sentences:
"If x is a number, return x.__int__()."
"If x is not a number or if base is given..."
Unfortunately the docstr
Dmitry Andreychuk added the comment:
Now I see that my message may look like a suggestion to add an encyclopedic
definition of number there. Sorry.
Actually I was talking about requirements for user-defined types to make them
work with int(). Something like: "If x has __int__() method r
New submission from Dmitry Korchemny:
In enum module the functional API for enum creation has the following signature:
Enum(value='NewEnumName', names=<...>, *, module='...', qualname='...',
type=)
so that the numeration always starts with 1. In some cases
101 - 200 of 314 matches
Mail list logo