-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gzip.GzipFile has no name attribute #44518
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
The gzip.GzipFile object uses a filename instead of a name attribute. This deviates from the standard practice and the interface described in "3.9 File Objects" and seems unnecessary. |
Seems that nobody is interested. I will check this in in a few days if nobody objects. |
I think the patch is fine. It is debatable whether this should be backported to 2.5; I think it is better to not backport it. Please also add a test case testing for the presence of the name attribute (feel free to name it test_1647484) |
When I wrote the test I saw that in write mode a '.gz' extension is automatically added to the filename if it has none. However this is stripped again when the name is written to the gzip header. I removed this so that the name attribute always reflects the real filesystem name. The filename property imitates the old behaviour. I don't think that this should necessarily be backported, at least I don't need it ;-) Applied in rev. 53772. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: