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

1234567891011121314151617181920212223242526272829303132333435
  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. The output for Parquet files changed in 5.47. This commit edits the test
  6. to accept both the old and new output.
  7. ```sh
  8. # Old
  9. $ file example.parquet
  10. example.parquet: Apache Parquet
  11. $ file --mime example.parquet
  12. example.parquet: application/octet-stream; charset=binary
  13. # New
  14. $ file example.parquet
  15. example.parquet: Apache Parquet file
  16. $ file --mime example.parquet
  17. example.parquet: application/vnd.apache.parquet; charset=binary
  18. ```
  19. --- a/test/python_magic_test.py
  20. +++ b/test/python_magic_test.py
  21. @@ -89,8 +89,8 @@
  22. (NO_SOFT, ["data"]),
  23. ],
  24. b"test.snappy.parquet": [
  25. - (COMMON_MIME, ["application/octet-stream"]),
  26. - (COMMON_PLAIN, ["Apache Parquet", "Par archive data"]),
  27. + (COMMON_MIME, ["application/octet-stream", "application/vnd.apache.parquet"]),
  28. + (COMMON_PLAIN, ["Apache Parquet", "Apache Parquet file", "Par archive data"]),
  29. (NO_SOFT, ["data"]),
  30. ],
  31. b"test.json": [