zope.mimetype 3.0__tar.gz → 3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. zope_mimetype-3.2/.pre-commit-config.yaml +28 -0
  2. zope_mimetype-3.2/.readthedocs.yaml +25 -0
  3. {zope.mimetype-3.0 → zope_mimetype-3.2}/CHANGES.rst +14 -0
  4. {zope.mimetype-3.0 → zope_mimetype-3.2}/CONTRIBUTING.md +1 -1
  5. {zope.mimetype-3.0 → zope_mimetype-3.2}/MANIFEST.in +2 -0
  6. {zope.mimetype-3.0 → zope_mimetype-3.2}/PKG-INFO +62 -9
  7. {zope.mimetype-3.0 → zope_mimetype-3.2}/README.rst +2 -2
  8. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/conf.py +18 -19
  9. zope_mimetype-3.2/docs/requirements.txt +4 -0
  10. zope_mimetype-3.2/pyproject.toml +33 -0
  11. {zope.mimetype-3.0 → zope_mimetype-3.2}/setup.cfg +1 -4
  12. {zope.mimetype-3.0 → zope_mimetype-3.2}/setup.py +5 -5
  13. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/configure.rst +1 -1
  14. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/interfaces.py +1 -1
  15. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/source.py +2 -2
  16. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/tests/test_contentinfo.py +0 -4
  17. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/tests/test_doctests.py +1 -1
  18. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/tests/test_source.py +1 -1
  19. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/typegetter.py +1 -1
  20. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/zcml.py +1 -1
  21. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope.mimetype.egg-info/PKG-INFO +62 -9
  22. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope.mimetype.egg-info/SOURCES.txt +4 -0
  23. {zope.mimetype-3.0 → zope_mimetype-3.2}/tox.ini +32 -36
  24. {zope.mimetype-3.0 → zope_mimetype-3.2}/COPYRIGHT.txt +0 -0
  25. {zope.mimetype-3.0 → zope_mimetype-3.2}/LICENSE.txt +0 -0
  26. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/api/index.rst +0 -0
  27. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/changelog.rst +0 -0
  28. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/codec.rst +0 -0
  29. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/constraints.rst +0 -0
  30. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/contentinfo.rst +0 -0
  31. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/event.rst +0 -0
  32. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/index.rst +0 -0
  33. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/intro.rst +0 -0
  34. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/retrieving_mime_types.rst +0 -0
  35. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/source.rst +0 -0
  36. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/typegetter.rst +0 -0
  37. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/utils.rst +0 -0
  38. {zope.mimetype-3.0 → zope_mimetype-3.2}/docs/widget.rst +0 -0
  39. {zope.mimetype-3.0 → zope_mimetype-3.2}/rtd-requirements.txt +0 -0
  40. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/__init__.py +0 -0
  41. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/README.rst +0 -0
  42. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/TODO.rst +0 -0
  43. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/__init__.py +0 -0
  44. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/character-sets.txt +0 -0
  45. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/codec.py +0 -0
  46. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/codec.rst +0 -0
  47. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/configure.zcml +0 -0
  48. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/constraints.rst +0 -0
  49. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/contentinfo.py +0 -0
  50. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/contentinfo.rst +0 -0
  51. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/event.py +0 -0
  52. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/event.rst +0 -0
  53. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/i18n.py +0 -0
  54. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/archive.png +0 -0
  55. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/audio.gif +0 -0
  56. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/binary.gif +0 -0
  57. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/css.gif +0 -0
  58. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/document.gif +0 -0
  59. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/html.gif +0 -0
  60. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/image.gif +0 -0
  61. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/javascript.gif +0 -0
  62. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/ms-excel.gif +0 -0
  63. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/ms-powerpoint.gif +0 -0
  64. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/ms-project.gif +0 -0
  65. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/ms-word.gif +0 -0
  66. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/octet-stream.gif +0 -0
  67. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/oo-calc.png +0 -0
  68. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/oo-impress.png +0 -0
  69. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/oo-writer.png +0 -0
  70. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/pdf.gif +0 -0
  71. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/python.gif +0 -0
  72. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/video.png +0 -0
  73. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/wordperfect.gif +0 -0
  74. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/xml.gif +0 -0
  75. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/icons/xsl.gif +0 -0
  76. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/meta.zcml +0 -0
  77. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/mtypes.py +0 -0
  78. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/retrieving_mime_types.rst +0 -0
  79. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/source.rst +0 -0
  80. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/tests/__init__.py +0 -0
  81. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/tests/test_codec.py +0 -0
  82. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/tests/test_typegetter.py +0 -0
  83. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/tests/test_zcml.py +0 -0
  84. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/typegetter.rst +0 -0
  85. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/types.csv +0 -0
  86. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/utils.py +0 -0
  87. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/utils.rst +0 -0
  88. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/widget.py +0 -0
  89. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope/mimetype/widget.rst +0 -0
  90. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope.mimetype.egg-info/dependency_links.txt +0 -0
  91. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope.mimetype.egg-info/namespace_packages.txt +0 -0
  92. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope.mimetype.egg-info/not-zip-safe +0 -0
  93. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope.mimetype.egg-info/requires.txt +0 -0
  94. {zope.mimetype-3.0 → zope_mimetype-3.2}/src/zope.mimetype.egg-info/top_level.txt +0 -0
@@ -0,0 +1,28 @@
1
+ # Generated from:
2
+ # https://github.com/zopefoundation/meta/tree/master/config/pure-python
3
+ minimum_pre_commit_version: '3.6'
4
+ repos:
5
+ - repo: https://github.com/pycqa/isort
6
+ rev: "6.0.1"
7
+ hooks:
8
+ - id: isort
9
+ - repo: https://github.com/hhatto/autopep8
10
+ rev: "v2.3.2"
11
+ hooks:
12
+ - id: autopep8
13
+ args: [--in-place, --aggressive, --aggressive]
14
+ - repo: https://github.com/asottile/pyupgrade
15
+ rev: v3.20.0
16
+ hooks:
17
+ - id: pyupgrade
18
+ args: [--py39-plus]
19
+ - repo: https://github.com/isidentical/teyit
20
+ rev: 0.4.3
21
+ hooks:
22
+ - id: teyit
23
+ - repo: https://github.com/PyCQA/flake8
24
+ rev: "7.3.0"
25
+ hooks:
26
+ - id: flake8
27
+ additional_dependencies:
28
+ - flake8-debugger == 4.1.2
@@ -0,0 +1,25 @@
1
+ # Generated from:
2
+ # https://github.com/zopefoundation/meta/tree/master/config/pure-python
3
+ # Read the Docs configuration file
4
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
5
+
6
+ # Required
7
+ version: 2
8
+
9
+ # Set the version of Python and other tools you might need
10
+ build:
11
+ os: ubuntu-22.04
12
+ tools:
13
+ python: "3.11"
14
+
15
+ # Build documentation in the docs/ directory with Sphinx
16
+ sphinx:
17
+ configuration: docs/conf.py
18
+
19
+ # We recommend specifying your dependencies to enable reproducible builds:
20
+ # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
21
+ python:
22
+ install:
23
+ - requirements: docs/requirements.txt
24
+ - method: pip
25
+ path: .
@@ -2,6 +2,20 @@
2
2
  Changes
3
3
  =========
4
4
 
5
+ 3.2 (2025-07-03)
6
+ ================
7
+
8
+ - Add support for Python 3.13.
9
+
10
+ - Drop support for Python 3.7, 3.8.
11
+
12
+
13
+ 3.1 (2024-02-08)
14
+ ================
15
+
16
+ - Add support for Python 3.12.
17
+
18
+
5
19
  3.0 (2023-02-27)
6
20
  ================
7
21
 
@@ -1,7 +1,7 @@
1
1
  <!--
2
2
  Generated from:
3
3
  https://github.com/zopefoundation/meta/tree/master/config/pure-python
4
- -->
4
+ -->
5
5
  # Contributing to zopefoundation projects
6
6
 
7
7
  The projects under the zopefoundation GitHub organization are open source and
@@ -5,6 +5,7 @@ include *.rst
5
5
  include *.txt
6
6
  include buildout.cfg
7
7
  include tox.ini
8
+ include .pre-commit-config.yaml
8
9
 
9
10
  recursive-include docs *.py
10
11
  recursive-include docs *.rst
@@ -12,6 +13,7 @@ recursive-include docs *.txt
12
13
  recursive-include docs Makefile
13
14
 
14
15
  recursive-include src *.py
16
+ include *.yaml
15
17
  recursive-include src *.csv
16
18
  recursive-include src *.gif
17
19
  recursive-include src *.png
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: zope.mimetype
3
- Version: 3.0
3
+ Version: 3.2
4
4
  Summary: A simple package for working with MIME content types
5
5
  Home-page: https://github.com/zopefoundation/zope.mimetype
6
6
  Author: Zope Foundation and Contributors
7
7
  Author-email: zope-dev@zope.dev
8
- License: ZPL 2.1
8
+ License: ZPL-2.1
9
9
  Keywords: file content mimetype
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Web Environment
@@ -13,22 +13,61 @@ Classifier: Intended Audience :: Developers
13
13
  Classifier: License :: OSI Approved :: Zope Public License
14
14
  Classifier: Programming Language :: Python
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.7
17
- Classifier: Programming Language :: Python :: 3.8
18
16
  Classifier: Programming Language :: Python :: 3.9
19
17
  Classifier: Programming Language :: Python :: 3.10
20
18
  Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Programming Language :: Python :: Implementation :: CPython
22
22
  Classifier: Programming Language :: Python :: Implementation :: PyPy
23
23
  Classifier: Natural Language :: English
24
24
  Classifier: Operating System :: OS Independent
25
25
  Classifier: Topic :: Internet :: WWW/HTTP
26
26
  Classifier: Framework :: Zope :: 3
27
- Requires-Python: >=3.7
27
+ Requires-Python: >=3.9
28
+ License-File: LICENSE.txt
29
+ Requires-Dist: setuptools
30
+ Requires-Dist: zope.component
31
+ Requires-Dist: zope.configuration
32
+ Requires-Dist: zope.contenttype>=3.5
33
+ Requires-Dist: zope.event
34
+ Requires-Dist: zope.i18n
35
+ Requires-Dist: zope.i18nmessageid
36
+ Requires-Dist: zope.interface
37
+ Requires-Dist: zope.schema
38
+ Requires-Dist: zope.security
28
39
  Provides-Extra: test
40
+ Requires-Dist: zope.browser; extra == "test"
41
+ Requires-Dist: zope.browserresource; extra == "test"
42
+ Requires-Dist: zope.formlib>=4.0; extra == "test"
43
+ Requires-Dist: zope.publisher; extra == "test"
44
+ Requires-Dist: zope.testing; extra == "test"
45
+ Requires-Dist: zope.testrunner; extra == "test"
29
46
  Provides-Extra: browser
47
+ Requires-Dist: zope.browser; extra == "browser"
48
+ Requires-Dist: zope.browserresource; extra == "browser"
49
+ Requires-Dist: zope.formlib>=4.0; extra == "browser"
50
+ Requires-Dist: zope.publisher; extra == "browser"
30
51
  Provides-Extra: docs
31
- License-File: LICENSE.txt
52
+ Requires-Dist: Sphinx; extra == "docs"
53
+ Requires-Dist: sphinx_rtd_theme; extra == "docs"
54
+ Requires-Dist: repoze.sphinx.autointerface; extra == "docs"
55
+ Requires-Dist: zope.browser; extra == "docs"
56
+ Requires-Dist: zope.browserresource; extra == "docs"
57
+ Requires-Dist: zope.formlib>=4.0; extra == "docs"
58
+ Requires-Dist: zope.publisher; extra == "docs"
59
+ Dynamic: author
60
+ Dynamic: author-email
61
+ Dynamic: classifier
62
+ Dynamic: description
63
+ Dynamic: home-page
64
+ Dynamic: keywords
65
+ Dynamic: license
66
+ Dynamic: license-file
67
+ Dynamic: provides-extra
68
+ Dynamic: requires-dist
69
+ Dynamic: requires-python
70
+ Dynamic: summary
32
71
 
33
72
  zope.mimetype
34
73
  =============
@@ -41,8 +80,8 @@ zope.mimetype
41
80
  :target: https://pypi.org/project/zope.mimetype/
42
81
  :alt: Supported Python versions
43
82
 
44
- .. image:: https://travis-ci.com/zopefoundation/zope.mimetype.svg?branch=master
45
- :target: https://travis-ci.com/zopefoundation/zope.mimetype
83
+ .. image:: https://github.com/zopefoundation/zope.mimetype/actions/workflows/tests.yml/badge.svg
84
+ :target: https://github.com/zopefoundation/zope.mimetype/actions/workflows/tests.yml
46
85
 
47
86
  .. image:: https://coveralls.io/repos/github/zopefoundation/zope.mimetype/badge.svg?branch=master
48
87
  :target: https://coveralls.io/github/zopefoundation/zope.mimetype?branch=master
@@ -62,6 +101,20 @@ See complete documentation at https://zopemimetype.readthedocs.io/en/latest/
62
101
  Changes
63
102
  =========
64
103
 
104
+ 3.2 (2025-07-03)
105
+ ================
106
+
107
+ - Add support for Python 3.13.
108
+
109
+ - Drop support for Python 3.7, 3.8.
110
+
111
+
112
+ 3.1 (2024-02-08)
113
+ ================
114
+
115
+ - Add support for Python 3.12.
116
+
117
+
65
118
  3.0 (2023-02-27)
66
119
  ================
67
120
 
@@ -9,8 +9,8 @@ zope.mimetype
9
9
  :target: https://pypi.org/project/zope.mimetype/
10
10
  :alt: Supported Python versions
11
11
 
12
- .. image:: https://travis-ci.com/zopefoundation/zope.mimetype.svg?branch=master
13
- :target: https://travis-ci.com/zopefoundation/zope.mimetype
12
+ .. image:: https://github.com/zopefoundation/zope.mimetype/actions/workflows/tests.yml/badge.svg
13
+ :target: https://github.com/zopefoundation/zope.mimetype/actions/workflows/tests.yml
14
14
 
15
15
  .. image:: https://coveralls.io/repos/github/zopefoundation/zope.mimetype/badge.svg?branch=master
16
16
  :target: https://coveralls.io/github/zopefoundation/zope.mimetype?branch=master
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  #
3
2
  # zope.mimetype documentation build configuration file, created by
4
3
  # sphinx-quickstart on Thu Jun 8 07:02:25 2017.
@@ -21,7 +20,10 @@
21
20
  # sys.path.insert(0, os.path.abspath('.'))
22
21
  import os
23
22
  import sys
23
+
24
24
  import pkg_resources
25
+
26
+
25
27
  # Use the python versions instead of the cython compiled versions
26
28
  # for better documentation extraction and ease of tweaking docs.
27
29
  os.environ['PURE_PYTHON'] = '1'
@@ -58,9 +60,9 @@ source_suffix = '.rst'
58
60
  master_doc = 'index'
59
61
 
60
62
  # General information about the project.
61
- project = u'zope.mimetype'
62
- copyright = u'2017, Zope Foundation contributors'
63
- author = u'Zope Foundation contributors'
63
+ project = 'zope.mimetype'
64
+ copyright = '2017, Zope Foundation contributors'
65
+ author = 'Zope Foundation contributors'
64
66
 
65
67
  # The version info for the project you're documenting, acts as replacement for
66
68
  # |version| and |release|, also used in various other places throughout the
@@ -76,14 +78,15 @@ release = rqmt.version
76
78
  #
77
79
  # This is also used if you do content translation via gettext catalogs.
78
80
  # Usually you set "language" from the command line for these cases.
79
- language = None
81
+ language = 'en'
80
82
 
81
83
  # List of patterns, relative to source directory, that match files and
82
84
  # directories to ignore when looking for source files.
83
85
  # This patterns also effect to html_static_path and html_extra_path
84
86
  exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
85
87
 
86
- # The reST default role (used for this markup: `text`) to use for all documents.
88
+ # The reST default role (used for this markup: `text`) to use for all
89
+ # documents.
87
90
  default_role = 'obj'
88
91
 
89
92
  # If true, '()' will be appended to :func: etc. cross-reference text.
@@ -116,7 +119,7 @@ html_theme = 'sphinx_rtd_theme'
116
119
  # Add any paths that contain custom static files (such as style sheets) here,
117
120
  # relative to this directory. They are copied after the builtin static files,
118
121
  # so a file named "default.css" will overwrite the builtin "default.css".
119
- html_static_path = ['_static']
122
+ # html_static_path = ['_static']
120
123
 
121
124
 
122
125
  # -- Options for HTMLHelp output ------------------------------------------
@@ -149,8 +152,8 @@ latex_elements = {
149
152
  # (source start file, target name, title,
150
153
  # author, documentclass [howto, manual, or own class]).
151
154
  latex_documents = [
152
- (master_doc, 'zopemimetype.tex', u'zope.mimetype Documentation',
153
- u'NextThought', 'manual'),
155
+ (master_doc, 'zopemimetype.tex', 'zope.mimetype Documentation',
156
+ 'NextThought', 'manual'),
154
157
  ]
155
158
 
156
159
 
@@ -159,7 +162,7 @@ latex_documents = [
159
162
  # One entry per manual page. List of tuples
160
163
  # (source start file, name, description, authors, manual section).
161
164
  man_pages = [
162
- (master_doc, 'zopemimetype', u'zope.mimetype Documentation',
165
+ (master_doc, 'zopemimetype', 'zope.mimetype Documentation',
163
166
  [author], 1)
164
167
  ]
165
168
 
@@ -170,20 +173,16 @@ man_pages = [
170
173
  # (source start file, target name, title, author,
171
174
  # dir menu entry, description, category)
172
175
  texinfo_documents = [
173
- (master_doc, 'zopemimetype', u'zope.mimetype Documentation',
176
+ (master_doc, 'zopemimetype', 'zope.mimetype Documentation',
174
177
  author, 'zopemimetype', 'One line description of project.',
175
178
  'Miscellaneous'),
176
179
  ]
177
180
 
178
-
179
-
180
-
181
- # Example configuration for intersphinx: refer to the Python standard library.
182
181
  intersphinx_mapping = {
183
- 'https://docs.python.org/': None,
184
- 'https://zopecomponent.readthedocs.io/en/latest': None,
185
- 'https://zopeformlib.readthedocs.io/en/latest': None,
186
- 'https://zopeinterface.readthedocs.io/en/latest': None,
182
+ 'python': ('https://docs.python.org/', None),
183
+ 'zope.component': ('https://zopecomponent.readthedocs.io/en/latest', None),
184
+ 'zope.formlib': ('https://zopeformlib.readthedocs.io/en/latest', None),
185
+ 'zope.interface': ('https://zopeinterface.readthedocs.io/en/latest', None),
187
186
  }
188
187
 
189
188
  extlinks = {
@@ -0,0 +1,4 @@
1
+ Sphinx
2
+ sphinx_rtd_theme >= 2
3
+ repoze.sphinx.autointerface
4
+ zope.mimetype
@@ -0,0 +1,33 @@
1
+ #
2
+ # Generated from:
3
+ # https://github.com/zopefoundation/meta/tree/master/config/pure-python
4
+
5
+ [build-system]
6
+ requires = [
7
+ "setuptools == 78.1.1",
8
+ "wheel",
9
+ ]
10
+ build-backend = "setuptools.build_meta"
11
+
12
+ [tool.coverage.run]
13
+ branch = true
14
+ source = ["zope.mimetype"]
15
+
16
+ [tool.coverage.report]
17
+ fail_under = 99
18
+ precision = 2
19
+ ignore_errors = true
20
+ show_missing = true
21
+ exclude_lines = [
22
+ "pragma: no cover",
23
+ "pragma: nocover",
24
+ "except ImportError:",
25
+ "raise NotImplementedError",
26
+ "if __name__ == '__main__':",
27
+ "self.fail",
28
+ "raise AssertionError",
29
+ "raise unittest.Skip",
30
+ ]
31
+
32
+ [tool.coverage.html]
33
+ directory = "parts/htmlcov"
@@ -1,6 +1,3 @@
1
- [bdist_wheel]
2
- universal = 0
3
-
4
1
  [flake8]
5
2
  doctests = 1
6
3
 
@@ -15,7 +12,7 @@ ignore =
15
12
  force_single_line = True
16
13
  combine_as_imports = True
17
14
  sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
18
- known_third_party = six, docutils, pkg_resources, pytz
15
+ known_third_party = docutils, pkg_resources, pytz
19
16
  known_zope =
20
17
  known_first_party =
21
18
  default_section = ZOPE
@@ -42,7 +42,7 @@ TEST_REQUIRES = BROWSER_REQUIRES + [
42
42
  ]
43
43
 
44
44
  setup(name='zope.mimetype',
45
- version='3.0',
45
+ version='3.2',
46
46
  author='Zope Foundation and Contributors',
47
47
  author_email='zope-dev@zope.dev',
48
48
  description="A simple package for working with MIME content types",
@@ -59,11 +59,11 @@ setup(name='zope.mimetype',
59
59
  'License :: OSI Approved :: Zope Public License',
60
60
  'Programming Language :: Python',
61
61
  'Programming Language :: Python :: 3',
62
- 'Programming Language :: Python :: 3.7',
63
- 'Programming Language :: Python :: 3.8',
64
62
  'Programming Language :: Python :: 3.9',
65
63
  'Programming Language :: Python :: 3.10',
66
64
  'Programming Language :: Python :: 3.11',
65
+ 'Programming Language :: Python :: 3.12',
66
+ 'Programming Language :: Python :: 3.13',
67
67
  'Programming Language :: Python :: Implementation :: CPython',
68
68
  'Programming Language :: Python :: Implementation :: PyPy',
69
69
  'Natural Language :: English',
@@ -72,11 +72,11 @@ setup(name='zope.mimetype',
72
72
  'Framework :: Zope :: 3',
73
73
  ],
74
74
  url='https://github.com/zopefoundation/zope.mimetype',
75
- license='ZPL 2.1',
75
+ license='ZPL-2.1',
76
76
  packages=find_packages('src'),
77
77
  package_dir={'': 'src'},
78
78
  namespace_packages=['zope'],
79
- python_requires='>=3.7',
79
+ python_requires='>=3.9',
80
80
  extras_require={
81
81
  'test': TEST_REQUIRES,
82
82
  'browser': BROWSER_REQUIRES,
@@ -21,7 +21,7 @@ is available:
21
21
 
22
22
  >>> try:
23
23
  ... import zope.browserresource
24
- ... except ImportError:
24
+ ... except ModuleNotFoundError:
25
25
  ... expected = 1
26
26
  ... else:
27
27
  ... expected = 107
@@ -39,7 +39,7 @@ from zope.mimetype.i18n import _
39
39
  # http://www.faqs.org/rfcs/rfc2045.html
40
40
  _token_re = r"[!#$%&'*+\-.\d^_`a-z{|}~]+"
41
41
  _token_rx = re.compile("%s$" % _token_re)
42
- _mime_type_rx = re.compile("{}/{}$".format(_token_re, _token_re))
42
+ _mime_type_rx = re.compile(f"{_token_re}/{_token_re}$")
43
43
 
44
44
 
45
45
  # These helpers are used to define constraints for specific schema
@@ -94,7 +94,7 @@ class ContentTypeTerms(Terms):
94
94
  if module not in sys.modules:
95
95
  try:
96
96
  __import__(module)
97
- except ImportError:
97
+ except ModuleNotFoundError:
98
98
  raise LookupError("could not import module for token")
99
99
  interface = getattr(sys.modules[module], name)
100
100
  if interface in self.context:
@@ -113,7 +113,7 @@ class ContentTypeTerm:
113
113
 
114
114
  @property
115
115
  def token(self):
116
- return "{}.{}".format(self.value.__module__, self.value.__name__)
116
+ return f"{self.value.__module__}.{self.value.__name__}"
117
117
 
118
118
  @property
119
119
  def title(self):
@@ -26,10 +26,6 @@ from zope.mimetype.contentinfo import ContentInfo
26
26
 
27
27
  class TestContentinfo(cleanup.CleanUp,
28
28
  unittest.TestCase):
29
- # py2 bwc
30
- assertRaisesRegex = getattr(unittest.TestCase,
31
- 'assertRaisesRegex',
32
- unittest.TestCase.assertRaisesRegexp)
33
29
 
34
30
  def test_codec_cant_decode_all(self):
35
31
  from zope.mimetype.interfaces import IContentTypeAware
@@ -25,7 +25,7 @@ def optional_test_suite_setUp(required_module):
25
25
  import importlib
26
26
  try:
27
27
  importlib.import_module(required_module)
28
- except ImportError: # pragma: no cover
28
+ except ModuleNotFoundError: # pragma: no cover
29
29
  raise unittest.SkipTest(
30
30
  "Required module %r missing" %
31
31
  (required_module,))
@@ -32,7 +32,7 @@ class TestCodecTerms(cleanup.CleanUp,
32
32
  try:
33
33
  from zope.mimetype.source import CodecTerms
34
34
  from zope.mimetype.source import codecSource
35
- except ImportError: # pragma: no cover
35
+ except ModuleNotFoundError: # pragma: no cover
36
36
  raise unittest.SkipTest("Missing browser extra")
37
37
 
38
38
  return CodecTerms(source if source is not None else codecSource,
@@ -35,7 +35,7 @@ def mimeTypeGetter(name=None, data=None, content_type=None):
35
35
  except ValueError:
36
36
  pass
37
37
  else:
38
- return "{}/{}".format(major, minor)
38
+ return f"{major}/{minor}"
39
39
 
40
40
  return None
41
41
 
@@ -25,7 +25,7 @@ from zope.mimetype.i18n import _
25
25
 
26
26
  try:
27
27
  from zope.browserresource.metaconfigure import icon
28
- except ImportError: # pragma: no cover
28
+ except ModuleNotFoundError: # pragma: no cover
29
29
  def icon(*args):
30
30
  import warnings
31
31
  warnings.warn("No icon support: zope.browserresource is not installed")
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: zope.mimetype
3
- Version: 3.0
3
+ Version: 3.2
4
4
  Summary: A simple package for working with MIME content types
5
5
  Home-page: https://github.com/zopefoundation/zope.mimetype
6
6
  Author: Zope Foundation and Contributors
7
7
  Author-email: zope-dev@zope.dev
8
- License: ZPL 2.1
8
+ License: ZPL-2.1
9
9
  Keywords: file content mimetype
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Web Environment
@@ -13,22 +13,61 @@ Classifier: Intended Audience :: Developers
13
13
  Classifier: License :: OSI Approved :: Zope Public License
14
14
  Classifier: Programming Language :: Python
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.7
17
- Classifier: Programming Language :: Python :: 3.8
18
16
  Classifier: Programming Language :: Python :: 3.9
19
17
  Classifier: Programming Language :: Python :: 3.10
20
18
  Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Programming Language :: Python :: Implementation :: CPython
22
22
  Classifier: Programming Language :: Python :: Implementation :: PyPy
23
23
  Classifier: Natural Language :: English
24
24
  Classifier: Operating System :: OS Independent
25
25
  Classifier: Topic :: Internet :: WWW/HTTP
26
26
  Classifier: Framework :: Zope :: 3
27
- Requires-Python: >=3.7
27
+ Requires-Python: >=3.9
28
+ License-File: LICENSE.txt
29
+ Requires-Dist: setuptools
30
+ Requires-Dist: zope.component
31
+ Requires-Dist: zope.configuration
32
+ Requires-Dist: zope.contenttype>=3.5
33
+ Requires-Dist: zope.event
34
+ Requires-Dist: zope.i18n
35
+ Requires-Dist: zope.i18nmessageid
36
+ Requires-Dist: zope.interface
37
+ Requires-Dist: zope.schema
38
+ Requires-Dist: zope.security
28
39
  Provides-Extra: test
40
+ Requires-Dist: zope.browser; extra == "test"
41
+ Requires-Dist: zope.browserresource; extra == "test"
42
+ Requires-Dist: zope.formlib>=4.0; extra == "test"
43
+ Requires-Dist: zope.publisher; extra == "test"
44
+ Requires-Dist: zope.testing; extra == "test"
45
+ Requires-Dist: zope.testrunner; extra == "test"
29
46
  Provides-Extra: browser
47
+ Requires-Dist: zope.browser; extra == "browser"
48
+ Requires-Dist: zope.browserresource; extra == "browser"
49
+ Requires-Dist: zope.formlib>=4.0; extra == "browser"
50
+ Requires-Dist: zope.publisher; extra == "browser"
30
51
  Provides-Extra: docs
31
- License-File: LICENSE.txt
52
+ Requires-Dist: Sphinx; extra == "docs"
53
+ Requires-Dist: sphinx_rtd_theme; extra == "docs"
54
+ Requires-Dist: repoze.sphinx.autointerface; extra == "docs"
55
+ Requires-Dist: zope.browser; extra == "docs"
56
+ Requires-Dist: zope.browserresource; extra == "docs"
57
+ Requires-Dist: zope.formlib>=4.0; extra == "docs"
58
+ Requires-Dist: zope.publisher; extra == "docs"
59
+ Dynamic: author
60
+ Dynamic: author-email
61
+ Dynamic: classifier
62
+ Dynamic: description
63
+ Dynamic: home-page
64
+ Dynamic: keywords
65
+ Dynamic: license
66
+ Dynamic: license-file
67
+ Dynamic: provides-extra
68
+ Dynamic: requires-dist
69
+ Dynamic: requires-python
70
+ Dynamic: summary
32
71
 
33
72
  zope.mimetype
34
73
  =============
@@ -41,8 +80,8 @@ zope.mimetype
41
80
  :target: https://pypi.org/project/zope.mimetype/
42
81
  :alt: Supported Python versions
43
82
 
44
- .. image:: https://travis-ci.com/zopefoundation/zope.mimetype.svg?branch=master
45
- :target: https://travis-ci.com/zopefoundation/zope.mimetype
83
+ .. image:: https://github.com/zopefoundation/zope.mimetype/actions/workflows/tests.yml/badge.svg
84
+ :target: https://github.com/zopefoundation/zope.mimetype/actions/workflows/tests.yml
46
85
 
47
86
  .. image:: https://coveralls.io/repos/github/zopefoundation/zope.mimetype/badge.svg?branch=master
48
87
  :target: https://coveralls.io/github/zopefoundation/zope.mimetype?branch=master
@@ -62,6 +101,20 @@ See complete documentation at https://zopemimetype.readthedocs.io/en/latest/
62
101
  Changes
63
102
  =========
64
103
 
104
+ 3.2 (2025-07-03)
105
+ ================
106
+
107
+ - Add support for Python 3.13.
108
+
109
+ - Drop support for Python 3.7, 3.8.
110
+
111
+
112
+ 3.1 (2024-02-08)
113
+ ================
114
+
115
+ - Add support for Python 3.12.
116
+
117
+
65
118
  3.0 (2023-02-27)
66
119
  ================
67
120
 
@@ -1,9 +1,12 @@
1
+ .pre-commit-config.yaml
2
+ .readthedocs.yaml
1
3
  CHANGES.rst
2
4
  CONTRIBUTING.md
3
5
  COPYRIGHT.txt
4
6
  LICENSE.txt
5
7
  MANIFEST.in
6
8
  README.rst
9
+ pyproject.toml
7
10
  rtd-requirements.txt
8
11
  setup.cfg
9
12
  setup.py
@@ -16,6 +19,7 @@ docs/contentinfo.rst
16
19
  docs/event.rst
17
20
  docs/index.rst
18
21
  docs/intro.rst
22
+ docs/requirements.txt
19
23
  docs/retrieving_mime_types.rst
20
24
  docs/source.rst
21
25
  docs/typegetter.rst
@@ -3,47 +3,61 @@
3
3
  [tox]
4
4
  minversion = 3.18
5
5
  envlist =
6
+ release-check
6
7
  lint
7
- py37
8
- py38
9
8
  py39
10
9
  py310
11
10
  py311
11
+ py312
12
+ py313
12
13
  pypy3
13
14
  docs
14
15
  coverage
15
16
 
16
17
  [testenv]
17
18
  usedevelop = true
19
+ package = wheel
20
+ wheel_build_env = .pkg
18
21
  deps =
22
+ setuptools == 78.1.1
19
23
  commands =
20
24
  zope-testrunner --test-path=src {posargs:-vc}
21
25
  extras =
22
26
  test
23
27
 
24
- [testenv:lint]
28
+ [testenv:setuptools-latest]
29
+ basepython = python3
30
+ deps =
31
+ git+https://github.com/pypa/setuptools.git\#egg=setuptools
32
+
33
+ [testenv:release-check]
34
+ description = ensure that the distribution is ready to release
25
35
  basepython = python3
26
36
  skip_install = true
27
- commands =
28
- isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py
29
- flake8 src setup.py
30
- check-manifest
31
- check-python-versions
32
37
  deps =
38
+ setuptools == 78.1.1
39
+ wheel
40
+ twine
41
+ build
33
42
  check-manifest
34
- check-python-versions >= 0.19.1
43
+ check-python-versions >= 0.20.0
35
44
  wheel
36
- flake8
37
- isort
45
+ commands_pre =
46
+ commands =
47
+ check-manifest
48
+ check-python-versions --only setup.py,tox.ini,.github/workflows/tests.yml
49
+ python -m build --sdist --no-isolation
50
+ twine check dist/*
38
51
 
39
- [testenv:isort-apply]
52
+ [testenv:lint]
53
+ description = This env runs all linters configured in .pre-commit-config.yaml
40
54
  basepython = python3
41
55
  skip_install = true
42
- commands_pre =
43
56
  deps =
44
- isort
57
+ pre-commit
58
+ commands_pre =
45
59
  commands =
46
- isort {toxinidir}/src {toxinidir}/setup.py []
60
+ pre-commit run --all-files --show-diff-on-failure
47
61
 
48
62
  [testenv:docs]
49
63
  basepython = python3
@@ -59,27 +73,9 @@ basepython = python3
59
73
  allowlist_externals =
60
74
  mkdir
61
75
  deps =
62
- coverage
76
+ coverage[toml]
63
77
  commands =
64
78
  mkdir -p {toxinidir}/parts/htmlcov
65
79
  coverage run -m zope.testrunner --test-path=src {posargs:-vc}
66
- coverage html --ignore-errors
67
- coverage report --ignore-errors --show-missing --fail-under=99
68
-
69
- [coverage:run]
70
- branch = True
71
- source = zope.mimetype
72
-
73
- [coverage:report]
74
- precision = 2
75
- exclude_lines =
76
- pragma: no cover
77
- pragma: nocover
78
- except ImportError:
79
- raise NotImplementedError
80
- if __name__ == '__main__':
81
- self.fail
82
- raise AssertionError
83
-
84
- [coverage:html]
85
- directory = parts/htmlcov
80
+ coverage html
81
+ coverage report
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes