Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-115961: Add name and mode attributes for compressed file-like objects#116036

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedFeb 28, 2024
edited by github-actionsbot
Loading

  • 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'.

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

…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'.
Copy link
Contributor

@eendebakpteendebakpt left a 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.

Copy link
Member

@gpsheadgpshead left a 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.

@serhiy-storchakaserhiy-storchaka merged commit51ef89c intopython:mainApr 21, 2024
@serhiy-storchakaserhiy-storchaka deleted the compress-file-name-mode branchApril 21, 2024 08:46
@bedevere-bot
Copy link

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

Hi! The buildbotAMD64 RHEL7 LTO + PGO 3.x has failed when building commit51ef89c.

What do you need to do:

  1. Don't panic.
  2. Checkthe 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 0From https://github.com/python/cpython * branch            main       -> FETCH_HEADNote:checking out '51ef89cd9acbfbfa7fd8d82f0c6baa388bb650c9'.You are in 'detached HEAD' state. You can look around, make experimentalchanges and commit them, and you can discard any commits you make in thisstate without impacting any branches by performing another checkout.If you want to create a new branch to retain commits you create, you maydo so (now or later) by using -b with the checkout command again. Example:  git checkout -b new_branch_nameHEAD 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 directoryfind:‘build’: No such file or directoryfind:‘build’: No such file or directoryfind:‘build’: No such file or directorymake[2]:[Makefile:3082: clean-retain-profile] Error 1 (ignored)make:*** [Makefile:2229: buildbottest] Error 2

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

@gpsheadgpsheadgpshead approved these changes

@eendebakpteendebakpteendebakpt approved these changes

@ethanfurmanethanfurmanAwaiting requested review from ethanfurmanethanfurman is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@serhiy-storchaka@bedevere-bot@gpshead@eendebakpt

[8]ページ先頭

©2009-2025 Movatter.jp