Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upbpo-39121: write gzip header OS information #17682
Conversation
This comment has been minimized.
This comment has been minimized.
the-knights-who-say-ni
commented
Dec 23, 2019
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Misc/NEWS.d/next/Library/2019-12-23-03-21-38.bpo-39121.HgPaAz.rst
Outdated
Show resolved
Hide resolved
@@ -17,6 +17,14 @@ | |||
|
|||
READ, WRITE = 1, 2 | |||
|
|||
# OS field values as specified in RFC 1952 | |||
OS_CODES = { | |||
'linux': 3, |
This comment has been minimized.
This comment has been minimized.
serhiy-storchaka
Dec 23, 2019
Member
There are many other supported Unix flavors: FreeBSD, NetBSD, OpenBSD, AIX, OpenIndiana, etc.
This comment has been minimized.
This comment has been minimized.
wungad
Dec 23, 2019
Author
I used C library (
http://git.savannah.gnu.org/cgit/gzip.git/tree/tailor.h#n113) as a
reference which sets 0x0b when it detects win32. From the looks of it a
value of 0x03 can be set for darwin, linux and aix.
# OS field values as specified in RFC 1952 | ||
OS_CODES = { | ||
'linux': 3, | ||
'os2': 6, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
wungad
Dec 23, 2019
Author
I was looking at RFC and used those code for which I was
certain that this is working.
OS_CODES = { | ||
'linux': 3, | ||
'os2': 6, | ||
'win32': 11, |
This comment has been minimized.
This comment has been minimized.
serhiy-storchaka
Dec 23, 2019
Member
Actually two most common file systems on Windows are FAT and NTFS.
This comment has been minimized.
This comment has been minimized.
wungad
Dec 23, 2019
Author
Looking at https://docs.python.org/3/library/sys.html we ave the following available:
- aix
- linux
- win32
- cygwin
- darwin
wungad commentedDec 23, 2019
•
edited by bedevere-bot
https://bugs.python.org/issue39121