Skip to content

gh-107396: tarfiles: set self.exception before _init_read_gz() #107485

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

Merged

Conversation

balmeida-nokia
Copy link
Contributor

@balmeida-nokia balmeida-nokia commented Jul 31, 2023

In the stack call of: _init_read_gz()

_read, tarfile.py:548
read, tarfile.py:526
_init_read_gz, tarfile.py:491

a try;except exists that uses self.exception, so it needs to be set before calling _init_read_gz().

closes: #107396

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@ghost
Copy link

ghost commented Jul 31, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@balmeida-nokia balmeida-nokia force-pushed the gh-107396-tarfiles-swap_self.exception branch 2 times, most recently from b7eaea9 to 5656fe0 Compare August 1, 2023 14:47
@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

balmeida-nokia and others added 2 commits August 18, 2023 15:57
In the stack call of: _init_read_gz()
```
_read, tarfile.py:548
read, tarfile.py:526
_init_read_gz, tarfile.py:491
```
a try;except exists that uses `self.exception`, so it needs to be set before
calling _init_read_gz().

closes: python#107396
@balmeida-nokia balmeida-nokia force-pushed the gh-107396-tarfiles-swap_self.exception branch from 4de3480 to 25ac1e4 Compare August 18, 2023 14:57
@ethanfurman ethanfurman added type-bug An unexpected behavior, bug, or error stdlib Python modules in the Lib dir 3.11 only security fixes 3.12 only security fixes needs backport to 3.11 only security fixes 3.13 bugs and security fixes needs backport to 3.12 only security fixes labels Aug 18, 2023
@balmeida-nokia
Copy link
Contributor Author

@ethanfurman Want me to try making the backports once this is merged?

@encukou encukou enabled auto-merge (squash) August 21, 2023 10:04
@encukou
Copy link
Member

encukou commented Aug 21, 2023

Hopefully bots will be able to do the backports.

@encukou encukou merged commit 37135d2 into python:main Aug 21, 2023
@miss-islington
Copy link
Contributor

Thanks @balmeida-nokia for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 21, 2023
…ythonGH-107485)

In the stack call of: _init_read_gz()
```
_read, tarfile.py:548
read, tarfile.py:526
_init_read_gz, tarfile.py:491
```
a try;except exists that uses `self.exception`, so it needs to be set before
calling _init_read_gz().
(cherry picked from commit 37135d2)

Co-authored-by: balmeida-nokia <83089745+balmeida-nokia@users.noreply.github.com>
@bedevere-bot
Copy link

GH-108207 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Aug 21, 2023
@bedevere-bot
Copy link

GH-108208 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 21, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 21, 2023
…ythonGH-107485)

In the stack call of: _init_read_gz()
```
_read, tarfile.py:548
read, tarfile.py:526
_init_read_gz, tarfile.py:491
```
a try;except exists that uses `self.exception`, so it needs to be set before
calling _init_read_gz().
(cherry picked from commit 37135d2)

Co-authored-by: balmeida-nokia <83089745+balmeida-nokia@users.noreply.github.com>
Yhg1s pushed a commit that referenced this pull request Aug 21, 2023
…GH-107485) (#108207)

gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485)

In the stack call of: _init_read_gz()
```
_read, tarfile.py:548
read, tarfile.py:526
_init_read_gz, tarfile.py:491
```
a try;except exists that uses `self.exception`, so it needs to be set before
calling _init_read_gz().
(cherry picked from commit 37135d2)

Co-authored-by: balmeida-nokia <83089745+balmeida-nokia@users.noreply.github.com>
encukou pushed a commit that referenced this pull request Aug 21, 2023
…GH-107485) (GH-108208)

gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485)

In the stack call of: _init_read_gz()
```
_read, tarfile.py:548
read, tarfile.py:526
_init_read_gz, tarfile.py:491
```
a try;except exists that uses `self.exception`, so it needs to be set before
calling _init_read_gz().
(cherry picked from commit 37135d2)

Co-authored-by: balmeida-nokia <83089745+balmeida-nokia@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 only security fixes 3.13 bugs and security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tarfiles: AttributeError: '_Stream' object has no attribute 'exception' while trying to open tgz file
5 participants