Chris Jerdonek added the comment:
> Or should we be satisfied with the half-measure of including the qualname but
> not the module (at least for now)?
This is something I was wondering myself, too (also for other contexts). Let's
take things one step at a time and limit oursel
Chris Jerdonek added the comment:
Oh, I see now I was hitting a different line:
https://github.com/python/cpython/blob/master/Objects/call.c#L1009
Maybe my suggestion is enough to help you (I didn't really look closely at the
code), or maybe you were already aware of
Chris Jerdonek added the comment:
Oh, that string is used in even more spots (sorry wasn't looking too closely
the first time).
--
___
Python tracker
<https://bugs.python.org/is
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue40696>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
I'm getting close to tracking this down. There is a certain point in the code
path of the Django test where `exc is exc.__context__` becomes True. I'm
guessing this is what's causing the hang. I'll try to get a simple reproducer
(ther
Chris Jerdonek added the comment:
FWIW, I found that the following hangs, but it also hangs on earlier versions
of Python:
import traceback
try:
raise RuntimeError
except Exception as exc:
print(f'handling: {exc!r}')
exc.__context__ = exc
print('pri
Chris Jerdonek added the comment:
To start out sharing what I found in the Django code:
Here inside BaseHandler._get_response_async():
https://github.com/django/django/blob/3460ea49e839fd6bb924c48eaa1cd3d6dc888035/django/core/handlers/base.py#L226-L232
try:
response = await
Chris Jerdonek added the comment:
The Django details might not matter so much at this point, but to add to
something I said above: It might not only be process_exception_by_middleware()
as I mentioned, but also asgiref's sync_to_async() function. In that function,
you can see an al
New submission from Chris Cordero :
Frozensets disallow the .update and the .__ior__ methods from being used, but
allows the |= operator, which I think is inconsistent with the disallowed
methods†.
```
foo = frozenset()
print(foo) # frozenset()
foo.update({"
Chris Jerdonek added the comment:
I don't think that would be a real solution because it looks like that would
cause the while loop always to loop at most once (which would defeat its
purpose) -- because the loop ends with "o = context":
while ((context = PyExcepti
Chris Jerdonek added the comment:
>From a process perspective, I think we should probably pursue two PR's for
>this: one for the general issue that affects all Python versions (what Yury is
>talking about), and something narrower that addresses the 3.9.0b1 case that
>came
Chris Jerdonek added the comment:
Okay, I'll keep it one issue then. Someone else is still welcome to work on the
more general issue.
Note that there is some chance the narrower fix should happen independent of
the more general fix. This is because _PyErr_ChainExceptions() (which i
Chris Jerdonek added the comment:
> So maybe the test coverage (or removal?) should be a separate issue.
That sounds good. Want to file the issue?
--
___
Python tracker
<https://bugs.python.org/issu
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue40706>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Chris Jerdonek :
--
keywords: +patch
pull_requests: +19561
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20287
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
I just posted a draft PR that implements the narrower fix:
https://github.com/python/cpython/pull/20287
I confirmed that the Django test passes with it. I also included two regression
tests: one using only generators, and one more like the Django test that
Chris Jerdonek added the comment:
Also, I just want to point out one thing about _PyErr_SetObject(). I believe it
can detect cycles of arbitrary length (which is what the while loop is for).
It's just that it can only detect cycles that involve the first node. So for
things to fail
Change by Chris Jerdonek :
--
components: +Interpreter Core -asyncio
title: "await" hangs in Python3.9.0b1. -> Exception handling with "await" can
hang in Python3.9.0b1
type: -> behavior
versions: +Python 3.10
Change by Chris Jerdonek :
--
components: +Interpreter Core
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue40679>
___
___
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue23188>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Mariusz, someone may also want to review Django's code there. Raising an
exception that would otherwise create a cycle in the chain could be obscuring
another issue, or there could be more straightforward alternatives. (The Python
issue will still be
Chris Jerdonek added the comment:
> then you will have 1 extra test in that module (the imported one), moreover,
> that test will be broken.
If this is true, then how is anyone able to be using FunctionTestCase in their
tests today? Is the feature broken?
--
nosy: +chris.je
Chris Jerdonek added the comment:
New changeset 7c30d12bd5359b0f66c4fbc98aa055398bcc8a7e by Chris Jerdonek in
branch 'master':
bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)
https://github.com/python/cpython/commit/7c30d12bd5359b0f66c4fbc98aa055
Chris Jerdonek added the comment:
New changeset b5cc2089cc354469f12eabc7ba54280e85fdd6dc by Dennis Sweeney in
branch 'master':
bpo-40679: Use the function's qualname in certain TypeErrors (GH-20236)
https://github.com/python/cpython/commit/b5cc2089cc354469f12eabc7b
Chris Jerdonek added the comment:
Thanks again, Dennis!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Chris Jerdonek :
A sporadic failure of test_nntplib.NetworkedNNTP_SSLTests.test_with_statement
on the CI for macOS:
https://github.com/python/cpython/pull/20321/checks?check_run_id=700729471#step:6:612
See also:
* https://bugs.python.org/issue19613 (test_article_head_body
Chris Jerdonek added the comment:
See also: https://bugs.python.org/issue40735 (test_with_statement)
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue19
Chris Jerdonek added the comment:
See also: https://bugs.python.org/issue40735 (test_with_statement)
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue19
New submission from Chris Jerdonek :
This TypeError could be a bit better:
"/Users/runner/runners/2.262.1/work/cpython/cpython/Lib/test/test_nntplib.py",
line 293, in test_with_statement
if re.search(r'(?i)KEY.TOO.SMALL', ssl_err.reason):
File "/Users/runner/run
Change by Chris Jerdonek :
--
nosy: -chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue19613>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Chris Jerdonek :
--
nosy: -chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue19756>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
> _PyObject_FunctionString as discussed here (
> https://bugs.python.org/issue37645 ) returns a string that also includes the
> module name where applicable.
By the way, Dennis, regarding the above, one thing I noticed is that Python
doesn
Chris Jerdonek added the comment:
New changeset 7f77ac463cff219e0c8afef2611cad5080cc9df1 by Miss Islington (bot)
in branch '3.9':
bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)
https://github.com/python/cpython/commit/7f77ac463cff219e0c8afef2611cad
Chris Jerdonek added the comment:
Good to hear, Mariusz! And thanks for the report!
Also, as discussed above, I'm leaving this issue open (and retitling) until the
following more general issue is fixed:
try:
raise RuntimeError
except Exception as exc:
print(f'handli
Change by Chris Jerdonek :
--
stage: patch review -> needs patch
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
I just want to point out one difference between _PyErr_ChainExceptions and
PyErr_SetObject that I encountered while working on this issue:
https://bugs.python.org/issue40696
While both functions set the context, only PyErr_SetObject does a check to
prevent
Change by Chris Jerdonek :
--
keywords: +patch
pull_requests: +19597
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20329
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
> The documentation of PyErr_SetObject, PyErr_SetString et al should also be
> updated to mention exception chaining.
I just posted a PR to do the above:
https://github.com/python/cpython/pull/20329
--
___
Chris Jerdonek added the comment:
Reopening as this is happening again -- twice for me:
https://github.com/python/cpython/pull/20329/checks?check_run_id=701405252#step:7:117
--
nosy: +chris.jerdonek
resolution: fixed ->
status: closed ->
Chris Jerdonek added the comment:
This was discussed a bit last December 2019 here ("Is there prior discussion
around the build system of CPython itself?"):
https://discuss.python.org/t/is-there-prior-discussion-around-the-build-system-of-cpython-itself/2813
--
nosy: +chri
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue34852>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
I already started one actually. But if I don't get to it in a week, I'll make a
note here and you can take it up.
--
___
Python tracker
<https://bugs.python.o
Change by Chris Meyer :
--
keywords: +patch
pull_requests: +19769
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20525
___
Python tracker
<https://bugs.python.org/issu
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue25782>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
I think this issue needs deeper discussion to know how to proceed.
> If there is a chain A -> B -> C -> D -> E, after assignment C.__context__ = A
> we will get a chain C -> A -> B -> D -> E. No exception is lost.
I understand
Chris Jerdonek added the comment:
To clarify, would there be any observable difference in behavior aside from
speed? And would there be any limitations in when the speedup can be applied?
--
nosy: +chris.jerdonek
___
Python tracker
<ht
Chris Withers added the comment:
Terry, mock is now a rolling backport of unittest.mock with all development
taking place in cpython's repo. If issues are reported there, they need to be
triaged here first, as it's most likely a bug in unittest.mock that needs
fixing here.
Rob,
Change by Chris Withers :
--
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue40805>
___
___
Python-bugs-list mailing list
Unsubscrib
Chris Withers added the comment:
Rob, you're welcome to dump `mock` and use `unittest.mock`, and that might be
best for now, but this will then likely come back to bite you when you end up
on the version of Python, probably 3.9, where it is pr
Chris Jerdonek added the comment:
Thanks a lot, Victor.
--
___
Python tracker
<https://bugs.python.org/issue40679>
___
___
Python-bugs-list mailing list
Unsub
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue31213>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Dent added the comment:
I just wanted to reiterate what I said at
https://bugs.python.org/issue27657#msg360196
The supposed fix provides terribly UX and violates what I think for many people
is the path of least surprise.
--
___
Python
Chris Dent added the comment:
I don't want to belabour the point. If there's general agreement that the new
behaviour is the best result that's fine, especially if it is well announced. I
agree that it has been inconsistent and weird for a long time. I think my
objection si
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue40932>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Withers added the comment:
Gregory, I find your response a little troubling. Myself and Karthikeyan both
do a lot of work on Mock, some might even say we're the maintainers of Mock in
both cpython's core repo and the backport.
We both feel this belongs standalone on pypi,
Change by Chris AtLee :
--
pull_requests: +20149
pull_request: https://github.com/python/cpython/pull/20972
___
Python tracker
<https://bugs.python.org/issue12
Chris Withers added the comment:
Okay, but to be up-front about this, I don't see any place in the stdlib for
any more "helpers" that could more easily be maintained on pypi and wouldn't
incur further support burden for anyone looking after this part of the standard
Chris Burr added the comment:
Hi Zack, I've already opened a PR that is loosely based on this patch. If you
have time to give it a review I'd appreciate the extra set of eyes.
https://github.com/python/cpython/pull/17938
--
versions: +Python 3.9 -
Chris Jerdonek added the comment:
Mark, I want to flag issue29590 for you ("Incorrect stack traces when
re-entering a generator/coroutine stack via .throw()") in case this issue
relates to or would help at all with that.
--
nosy: +chri
Change by Chris Meyer :
--
nosy: +cmeyer
___
Python tracker
<https://bugs.python.org/issue38856>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Withers added the comment:
Given that `mock.patch` is being used incorrectly here, the error message seems
clear enough: It's saying there's a `Foo` object in place, and `rsplit` gives a
strong indication that a string was expected.
Would adding type hints in mock.py be a
New submission from Chris Withers :
Reproducer:
def test_forward_type_references(self):
def foo(a: 'Foo') -> 'Bar': pass
class Foo: pass
class Bar: pass
get_type_hints(foo)
The above gives the following exception, rather
Chris Withers added the comment:
The tough one is that no-one wants an ugly sys._getframe() call, but by
avoiding it in the standard library, we force each library that needs this to
have the ugly sys._getframe() call rather than it being an unpleasant
implementation detail of
New submission from Chris Tse :
Following up on https://bugs.python.org/issue37369 as it was advised to open a
new issue regarding case sensitivity.
I am on Windows 10 running Version 10.0.19041 Build 19041. I am experiencing
the same problem in that issue when using venv on Powershell.
The
Change by Chris Tse :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue41925>
___
___
Python-bugs-list mailing list
Unsubscrib
Chris Tse added the comment:
UPDATE:
After some further investigation, it seems like even on cmd and seeing the
(myenv) indicator, it actually seems to be falling back to system pip and
installing packages globally. Running `.\myenv\Scripts\pip.exe` actually throws
that same error. CMD
Chris Tse added the comment:
Another update:
After a full shutdown from yesterday and trying again today, everything seems
to be working now, including activating the venv via:
1. python -m venv myenv
2. .\myenv\Scripts\activate (not Activate.ps1, though that work too, is this
intended
Chris Angelico added the comment:
Has this been ongoing, or is it something that started in the past day and a
half? I've had intermittent internet issues (and expect them to continue for
another half day or thereabouts), so it's possible that this is actually a
symptom of that.
Chris Jerdonek added the comment:
Another API option is to use str.replace's existing arguments: str.replace(old,
new[, count]). In addition to "old" and "new" being strings, they could also be
lists of strings of equal length, similar to how str.maketrans() can acc
Change by Chris Jerdonek :
--
title: Add re.replace(string, replacement_map) -> Add
str.replace(replacement_map)
___
Python tracker
<https://bugs.python.org/issu
Chris Jerdonek added the comment:
I believe this also resolves issue 30181 (which was the same issue).
--
nosy: +chris.jerdonek
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8
___
Pytho
Chris Jerdonek added the comment:
I believe this was addressed by issue 39450, which I think was technically a
duplicate of this issue.
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue30
Chris Angelico added the comment:
That ducks the immediate issue, but I think the underlying issue would still be
worth solving. How hard would it be to fetch this via an encrypted connection?
It's still not 100% secure, but it would be resilient against some of these
sorts of i
New submission from Chris Burr :
Since bpo-36302 was implemented, extension sources are now sorted for
reproducibility. This is causing an issue in pywin32 as the *.mc files must be
processed first to ensure the *.h files are generated before trying to compile
the actual sources. I'
Change by Chris Burr :
--
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue39342>
___
___
Python-bugs-list mailing list
Unsub
Change by Chris Burr :
--
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue18233>
___
___
Python-bugs-list mailing list
Unsub
Change by Chris Jerdonek :
--
pull_requests: +21719
pull_request: https://github.com/python/cpython/pull/22756
___
Python tracker
<https://bugs.python.org/issue38
Change by Chris Jerdonek :
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue42130>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
It looks like issue 37658 might be the relevant change rather.
Here is the new logic it introduced:
https://github.com/python/cpython/blob/db455296be5f792b8c12b7cd7f3962b52e4f44ee/Lib/asyncio/tasks.py#L483-L488
(via https://github.com/python/cpython/pull
Chris Jerdonek added the comment:
Issue #42130 that was recently filed appears related to this change.
--
nosy: +chris.jerdonek
___
Python tracker
<https://bugs.python.org/issue37
Chris Jerdonek added the comment:
I'm closing this as a duplicate of issue 39450, which has been resolved.
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> unittest TestCase shortDescription does not
Chris Jerdonek added the comment:
Are you suggesting this is a bug, or is it just a suggested code cleanup? I ask
because the docs suggest that a set should be passed:
https://docs.python.org/3/library/asyncio-task.html#asyncio.wait
And the docstring says it should be a sequence:
https
New submission from Chris Xiao :
jump to https://docs.python.org/3/library/imaplib.html#imap4-objects,
in the "See also" text, the url(https://www.washington.edu/imap/) of the
University of Washington’s IMAP Information Center is not available.
--
assignee: docs@python
Chris Jerdonek added the comment:
If it's just a code cleanup and not a bugfix though, it shouldn't be
backported. But yes, as a cleanup it's fine. And even if it's expected to go
away later, it's okay to do now.
--
_
Chris Xiao added the comment:
maybe,you can try to contact the webmaster of the University of Washington to
get the correct url
--
___
Python tracker
<https://bugs.python.org/issue42
Chris Meyer added the comment:
Responding to your request for feedback on Python-Dev:
We embed Python dynamically by finding the libPython DLL, loading it, and
looking up the required symbols. We make appropriate define's so that the
Python headers (and NumPy headers) point to our func
Chris Meyer added the comment:
> How do you configure sys.path currently? Do you parse a configuration file?
> Do you use a registry key on Windows?
We have several launch scenarios - but for the currently most common one, which
is to launch using a separate, existing Python environme
Chris Meyer added the comment:
>> I would like to request that this ability to dynamically load Python DLLs
>> remains even with any new initialization mechanism.
> I don't plan to remove any feature :-)
I am glad to hear that. I'm somewhat nervous about it neverthe
New submission from Chris Warrick :
When formatting decimal.Decimal using old-style formatting (%g), the output is
as short as possible, as expected. When using new-style formatting (str.format
or f-strings), the output uses the input precision. Floats behave correctly
with new-style
New submission from Chris Drake :
This should not work:-
python3.7 -c
'print(eval("().__class__.__base__.__subclasses__()[-1].__init__.__globals__",{"__builtins__":
{}},{"__builtins__": {}}))'
and should be properly fixed.
--
messages: 3
Chris Drake added the comment:
The specification specifically allows for the restriction of access to globals
via the second argument to eval.
While Christian and Victor make interesting, albeit suicidal, comments and
references to other efforts, the fact remains that this is a violation of
Chris Jones added the comment:
You can work around this issue by using:
python.exe -c "import nose; nose.main()"
instead of nosetests
Note that nose.main() with no args parses sys.argv
--
nosy: +Chris.Jones
___
Python trac
Chris Withers added the comment:
Just as a post-fix to this, the email handlers for the python logging framework
that I maintain as a package on PyPI now handle unicode email correctly:
http://pypi.python.org/pypi/mailinglogger/3.7.0
I'd suggest people looking for fully-featured emai
New submission from Chris Gill :
I believe I am having a similar issue to this: http://bugs.python.org/issue7150
I am in the middle of programming a quick script and now I cannot seem to get
beyond this issue; as it is printing up the expiration times from the AD user
listings (many of
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue13997>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Rebert added the comment:
@Bendersky:
Unlike open()'s other arguments, that one wouldn't be orthogonal though. It
would be possible to write e.g.:
f = open(fname, encoding="big5", errors="replace", ascii_only=True)
which seems disturbing, IMO. It w
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14015>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue13866>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue13703>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Rebert :
The part of the Language Reference concerning the `def` statement
(http://docs.python.org/dev/reference/compound_stmts.htm#function-definitions )
should include a See Also link to PEP 3107 "Function Annotations".
--
assignee: docs@python
501 - 600 of 2758 matches
Mail list logo