1
0

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

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