1
0

0.4.27-40-g5a89644.add-support-for-python-3-13.patch 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. Subject: Add support for python 3.13
  2. Origin: upstream, commit 0.4.27-40-g5a89644 <https://github.com/ahupp/python-magic/commit/0.4.27-40-g5a89644>
  3. Author: Adam Hupp <adam@hupp.org>
  4. Date: Wed Feb 19 12:30:05 2025 -0800
  5. --- a/.github/workflows/ci.yml
  6. +++ b/.github/workflows/ci.yml
  7. @@ -5,11 +5,11 @@
  8. strategy:
  9. fail-fast: false
  10. matrix:
  11. - os: ['ubuntu-latest']
  12. - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
  13. + os: ["ubuntu-latest"]
  14. + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
  15. include:
  16. - os: macos-latest
  17. - python-version: '3.13'
  18. + python-version: "3.13"
  19. # - os: windows-latest # TODO: Fix the Windows test that runs in an infinite loop
  20. # python-version: '3.13'
  21. runs-on: ${{ matrix.os }}
  22. @@ -28,4 +28,4 @@
  23. run: pip install python-magic-bin
  24. - run: LC_ALL=en_US.UTF-8 pytest
  25. shell: bash
  26. - timeout-minutes: 15 # Limit Windows infinite loop.
  27. + timeout-minutes: 15 # Limit Windows infinite loop.
  28. --- a/setup.py
  29. +++ b/setup.py
  30. @@ -8,41 +8,43 @@
  31. def read(file_name):
  32. """Read a text file and return the content as a string."""
  33. - with io.open(os.path.join(os.path.dirname(__file__), file_name),
  34. - encoding='utf-8') as f:
  35. + with io.open(
  36. + os.path.join(os.path.dirname(__file__), file_name), encoding="utf-8"
  37. + ) as f:
  38. return f.read()
  39. +
  40. setuptools.setup(
  41. - name='python-magic',
  42. - description='File type identification using libmagic',
  43. - author='Adam Hupp',
  44. - author_email='adam@hupp.org',
  45. + name="python-magic",
  46. + description="File type identification using libmagic",
  47. + author="Adam Hupp",
  48. + author_email="adam@hupp.org",
  49. url="http://github.com/ahupp/python-magic",
  50. - version='0.4.28',
  51. - long_description=read('README.md'),
  52. - long_description_content_type='text/markdown',
  53. - packages=['magic'],
  54. + version="0.4.28",
  55. + long_description=read("README.md"),
  56. + long_description_content_type="text/markdown",
  57. + packages=["magic"],
  58. package_data={
  59. - 'magic': ['py.typed', '*.pyi', '**/*.pyi'],
  60. + "magic": ["py.typed", "*.pyi", "**/*.pyi"],
  61. },
  62. keywords="mime magic file",
  63. license="MIT",
  64. - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
  65. + python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
  66. classifiers=[
  67. - 'Intended Audience :: Developers',
  68. - 'License :: OSI Approved :: MIT License',
  69. - 'Programming Language :: Python',
  70. - 'Programming Language :: Python :: 2.7',
  71. - 'Programming Language :: Python :: 3',
  72. - 'Programming Language :: Python :: 3.5',
  73. - 'Programming Language :: Python :: 3.6',
  74. - 'Programming Language :: Python :: 3.7',
  75. - 'Programming Language :: Python :: 3.8',
  76. - 'Programming Language :: Python :: 3.9',
  77. - 'Programming Language :: Python :: 3.10',
  78. - 'Programming Language :: Python :: 3.11',
  79. - 'Programming Language :: Python :: 3.12',
  80. - 'Programming Language :: Python :: Implementation :: CPython',
  81. + "Intended Audience :: Developers",
  82. + "License :: OSI Approved :: MIT License",
  83. + "Programming Language :: Python",
  84. + "Programming Language :: Python :: 2.7",
  85. + "Programming Language :: Python :: 3",
  86. + "Programming Language :: Python :: 3.5",
  87. + "Programming Language :: Python :: 3.6",
  88. + "Programming Language :: Python :: 3.7",
  89. + "Programming Language :: Python :: 3.8",
  90. + "Programming Language :: Python :: 3.9",
  91. + "Programming Language :: Python :: 3.10",
  92. + "Programming Language :: Python :: 3.11",
  93. + "Programming Language :: Python :: 3.12",
  94. + "Programming Language :: Python :: 3.13",
  95. + "Programming Language :: Python :: Implementation :: CPython",
  96. ],
  97. )
  98. -
  99. --- a/tox.ini
  100. +++ b/tox.ini
  101. @@ -9,6 +9,7 @@
  102. py310,
  103. py311,
  104. py312,
  105. + py313,
  106. mypy
  107. [testenv]