GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-115961: Add name and mode attributes for compressed file-like objects by serhiy-storchaka · Pull Request #116036 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Feb 28, 2024 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Add name and mode attributes for compressed and archived file-like objects in modules bz2, lzma, tarfile and zipfile.
  • Change the value of the mode attribute of GzipFile from integer (1 or 2) to string ('rb' or 'wb').
  • Change the value of the mode attribute of ZipExtFile from 'r' to 'rb'.
  • Issue: Add name and mode attributes to compressed file-like objects #115961

📚 Documentation preview 📚: https://cpython-previews--116036.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@serhiy-storchaka
serhiy-storchaka requested a review from ethanfurman as a code owner February 28, 2024 08:47
@bedevere-app bedevere-app Bot added the awaiting core review label Feb 28, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Feb 28, 2024
Add name and mode attributes to compressed file-like objects #115961
Closed
@serhiy-storchaka
pythongh-115961: Add name and mode attributes for compressed file-lik…
874c8eb
…e objects

* Add name and mode attributes for compressed and archived file-like objects
  in modules bz2, lzma, tarfile and zipfile.
* Change the value of the mode attribute of GzipFile from integer (1 or 2)
  to string ('rb' or 'wb').
* Change the value of the mode attribute of ZipExtFile from 'r' to 'rb'.
@serhiy-storchaka
serhiy-storchaka force-pushed the compress-file-name-mode branch from 223fd79 to 874c8eb Compare February 28, 2024 09:00
@serhiy-storchaka
serhiy-storchaka requested a review from gpshead February 28, 2024 09:26
serhiy-storchaka added 3 commits March 13, 2024 12:02
@serhiy-storchaka
Merge branch 'main' into compress-file-name-mode
69180ef
@serhiy-storchaka
Fix grammar.
bebc9ac
@serhiy-storchaka
Merge branch 'main' into compress-file-name-mode
bbabc1c
eendebakpt
eendebakpt approved these changes Apr 20, 2024
View reviewed changes

@eendebakpt eendebakpt left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Some changes are not backwards compatible, but every change is properly documented.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gpshead
gpshead approved these changes Apr 20, 2024
View reviewed changes

@gpshead gpshead left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. This is much more consistent across all our file like ducks.

I'm not worried about things like the old gzip 1 and 2 values as I don't expect anyone to ever have used them. Similar for the old 'r' that should've been a 'rb'.

If anything comes up depending on this during the betas we can revisit.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Apr 20, 2024
@serhiy-storchaka
serhiy-storchaka merged commit 51ef89c into python:main Apr 21, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 21, 2024
@serhiy-storchaka
serhiy-storchaka deleted the compress-file-name-mode branch April 21, 2024 08:46
@bedevere-bot

bedevere-bot commented Apr 21, 2024

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 RHEL7 LTO + PGO 3.x has failed when building commit 51ef89c.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/96/builds/7319) and take a look at the build logs.
  4. Check if the failure is related to this commit (51ef89c) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/96/builds/7319

Failed tests:

  • test_capi

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 58, done.        
remote: Counting objects:   1% (1/58)        
remote: Counting objects:   3% (2/58)        
remote: Counting objects:   5% (3/58)        
remote: Counting objects:   6% (4/58)        
remote: Counting objects:   8% (5/58)        
remote: Counting objects:  10% (6/58)        
remote: Counting objects:  12% (7/58)        
remote: Counting objects:  13% (8/58)        
remote: Counting objects:  15% (9/58)        
remote: Counting objects:  17% (10/58)        
remote: Counting objects:  18% (11/58)        
remote: Counting objects:  20% (12/58)        
remote: Counting objects:  22% (13/58)        
remote: Counting objects:  24% (14/58)        
remote: Counting objects:  25% (15/58)        
remote: Counting objects:  27% (16/58)        
remote: Counting objects:  29% (17/58)        
remote: Counting objects:  31% (18/58)        
remote: Counting objects:  32% (19/58)        
remote: Counting objects:  34% (20/58)        
remote: Counting objects:  36% (21/58)        
remote: Counting objects:  37% (22/58)        
remote: Counting objects:  39% (23/58)        
remote: Counting objects:  41% (24/58)        
remote: Counting objects:  43% (25/58)        
remote: Counting objects:  44% (26/58)        
remote: Counting objects:  46% (27/58)        
remote: Counting objects:  48% (28/58)        
remote: Counting objects:  50% (29/58)        
remote: Counting objects:  51% (30/58)        
remote: Counting objects:  53% (31/58)        
remote: Counting objects:  55% (32/58)        
remote: Counting objects:  56% (33/58)        
remote: Counting objects:  58% (34/58)        
remote: Counting objects:  60% (35/58)        
remote: Counting objects:  62% (36/58)        
remote: Counting objects:  63% (37/58)        
remote: Counting objects:  65% (38/58)        
remote: Counting objects:  67% (39/58)        
remote: Counting objects:  68% (40/58)        
remote: Counting objects:  70% (41/58)        
remote: Counting objects:  72% (42/58)        
remote: Counting objects:  74% (43/58)        
remote: Counting objects:  75% (44/58)        
remote: Counting objects:  77% (45/58)        
remote: Counting objects:  79% (46/58)        
remote: Counting objects:  81% (47/58)        
remote: Counting objects:  82% (48/58)        
remote: Counting objects:  84% (49/58)        
remote: Counting objects:  86% (50/58)        
remote: Counting objects:  87% (51/58)        
remote: Counting objects:  89% (52/58)        
remote: Counting objects:  91% (53/58)        
remote: Counting objects:  93% (54/58)        
remote: Counting objects:  94% (55/58)        
remote: Counting objects:  96% (56/58)        
remote: Counting objects:  98% (57/58)        
remote: Counting objects: 100% (58/58)        
remote: Counting objects: 100% (58/58), done.        
remote: Compressing objects:   3% (1/27)        
remote: Compressing objects:   7% (2/27)        
remote: Compressing objects:  11% (3/27)        
remote: Compressing objects:  14% (4/27)        
remote: Compressing objects:  18% (5/27)        
remote: Compressing objects:  22% (6/27)        
remote: Compressing objects:  25% (7/27)        
remote: Compressing objects:  29% (8/27)        
remote: Compressing objects:  33% (9/27)        
remote: Compressing objects:  37% (10/27)        
remote: Compressing objects:  40% (11/27)        
remote: Compressing objects:  44% (12/27)        
remote: Compressing objects:  48% (13/27)        
remote: Compressing objects:  51% (14/27)        
remote: Compressing objects:  55% (15/27)        
remote: Compressing objects:  59% (16/27)        
remote: Compressing objects:  62% (17/27)        
remote: Compressing objects:  66% (18/27)        
remote: Compressing objects:  70% (19/27)        
remote: Compressing objects:  74% (20/27)        
remote: Compressing objects:  77% (21/27)        
remote: Compressing objects:  81% (22/27)        
remote: Compressing objects:  85% (23/27)        
remote: Compressing objects:  88% (24/27)        
remote: Compressing objects:  92% (25/27)        
remote: Compressing objects:  96% (26/27)        
remote: Compressing objects: 100% (27/27)        
remote: Compressing objects: 100% (27/27), done.        
remote: Total 30 (delta 27), reused 5 (delta 3), pack-reused 0        
From https://github.com/python/cpython
 * branch            main       -> FETCH_HEAD
Note: checking out '51ef89cd9acbfbfa7fd8d82f0c6baa388bb650c9'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 51ef89c... gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036)
Switched to and reset branch 'main'

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [Makefile:3082: clean-retain-profile] Error 1 (ignored)

make: *** [Makefile:2229: buildbottest] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead gpshead approved these changes
@eendebakpt eendebakpt eendebakpt approved these changes
@ethanfurman ethanfurman Awaiting requested review from ethanfurman ethanfurman is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@serhiy-storchaka @bedevere-bot @gpshead @eendebakpt
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.