Skip to content

gh-74185: repr() of ImportError now contains attributes name and path. #1011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
20 changes: 20 additions & 0 deletions .github/workflows/trigger-bots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Bots

on:
# PR synchronization is a push into a branch associated with the PR
pull_request:
types: [opened, edited, synchronize, labeled, unlabeled]
issue_comment:
types: [created, edited]
pull_request_review_comment:
types: [created, edited]

jobs:
call_bedevere:
name: Call Bedevere
runs-on: ubuntu-latest
steps:
- uses: arhadthedev/bedevere@c51d1d2d5c7a9cec31ce16af209f42a5905070dd
with:
token: ${{ secrets.BEDEVERE_PAT }}
event: ${{ toJSON(github.event) }}
8 changes: 1 addition & 7 deletions Objects/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,7 @@ BaseException_str(PyBaseExceptionObject *self)
static PyObject *
BaseException_repr(PyBaseExceptionObject *self)
{
const char *name;
const char *dot;

name = Py_TYPE(self)->tp_name;
dot = (const char *) strrchr(name, '.');
if (dot != NULL) name = dot+1;

const char *name = _PyType_Name(Py_TYPE(self));
if (PyTuple_GET_SIZE(self->args) == 1)
return PyUnicode_FromFormat("%s(%R)", name,
PyTuple_GET_ITEM(self->args, 0));
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy