1
0

0.4.27-49-ga1fad43.fix-test-for-apache-parquet-files-for-file-5-47.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. Subject: Fix test for Apache Parquet files for file 5.47
  2. Origin: upstream, commit 0.4.27-49-ga1fad43 <https://github.com/ahupp/python-magic/commit/0.4.27-49-ga1fad43>
  3. Author: Adam Thompson-Sharpe <adamthompsonsharpe@gmail.com>
  4. Date: Wed May 6 12:15:43 2026 -0400
  5. Forwarded: not-needed
  6. The output for Parquet files changed in 5.47. This commit edits the test
  7. to accept both the old and new output.
  8. ```sh
  9. # Old
  10. $ file example.parquet
  11. example.parquet: Apache Parquet
  12. $ file --mime example.parquet
  13. example.parquet: application/octet-stream; charset=binary
  14. # New
  15. $ file example.parquet
  16. example.parquet: Apache Parquet file
  17. $ file --mime example.parquet
  18. example.parquet: application/vnd.apache.parquet; charset=binary
  19. ```
  20. --- a/test/python_magic_test.py
  21. +++ b/test/python_magic_test.py
  22. @@ -89,8 +89,8 @@
  23. (NO_SOFT, ["data"]),
  24. ],
  25. b"test.snappy.parquet": [
  26. - (COMMON_MIME, ["application/octet-stream"]),
  27. - (COMMON_PLAIN, ["Apache Parquet", "Par archive data"]),
  28. + (COMMON_MIME, ["application/octet-stream", "application/vnd.apache.parquet"]),
  29. + (COMMON_PLAIN, ["Apache Parquet", "Apache Parquet file", "Par archive data"]),
  30. (NO_SOFT, ["data"]),
  31. ],
  32. b"test.json": [