zope.mimetype 3.0__py3-none-any.whl → 3.2__py3-none-any.whl
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.
- zope/mimetype/configure.rst +1 -1
- zope/mimetype/interfaces.py +1 -1
- zope/mimetype/source.py +2 -2
- zope/mimetype/tests/test_contentinfo.py +0 -4
- zope/mimetype/tests/test_doctests.py +1 -1
- zope/mimetype/tests/test_source.py +1 -1
- zope/mimetype/typegetter.py +1 -1
- zope/mimetype/zcml.py +1 -1
- zope.mimetype-3.2-py3.12-nspkg.pth +1 -0
- {zope.mimetype-3.0.dist-info → zope_mimetype-3.2.dist-info}/METADATA +53 -27
- {zope.mimetype-3.0.dist-info → zope_mimetype-3.2.dist-info}/RECORD +15 -15
- {zope.mimetype-3.0.dist-info → zope_mimetype-3.2.dist-info}/WHEEL +1 -1
- zope.mimetype-3.0-py3.9-nspkg.pth +0 -1
- {zope.mimetype-3.0.dist-info → zope_mimetype-3.2.dist-info/licenses}/LICENSE.txt +0 -0
- {zope.mimetype-3.0.dist-info → zope_mimetype-3.2.dist-info}/namespace_packages.txt +0 -0
- {zope.mimetype-3.0.dist-info → zope_mimetype-3.2.dist-info}/top_level.txt +0 -0
zope/mimetype/configure.rst
CHANGED
zope/mimetype/interfaces.py
CHANGED
@@ -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("{}/{}$"
|
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
|
zope/mimetype/source.py
CHANGED
@@ -94,7 +94,7 @@ class ContentTypeTerms(Terms):
|
|
94
94
|
if module not in sys.modules:
|
95
95
|
try:
|
96
96
|
__import__(module)
|
97
|
-
except
|
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 "{
|
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
|
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
|
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,
|
zope/mimetype/typegetter.py
CHANGED
zope/mimetype/zcml.py
CHANGED
@@ -25,7 +25,7 @@ from zope.mimetype.i18n import _
|
|
25
25
|
|
26
26
|
try:
|
27
27
|
from zope.browserresource.metaconfigure import icon
|
28
|
-
except
|
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")
|
@@ -0,0 +1 @@
|
|
1
|
+
import sys, types, os;p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('zope',));importlib = __import__('importlib.util');__import__('importlib.machinery');m = sys.modules.setdefault('zope', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('zope', [os.path.dirname(p)])));m = m or sys.modules.setdefault('zope', types.ModuleType('zope'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p)
|
@@ -1,11 +1,11 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: zope.mimetype
|
3
|
-
Version: 3.
|
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
|
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,49 +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.
|
27
|
+
Requires-Python: >=3.9
|
28
28
|
License-File: LICENSE.txt
|
29
29
|
Requires-Dist: setuptools
|
30
30
|
Requires-Dist: zope.component
|
31
31
|
Requires-Dist: zope.configuration
|
32
|
-
Requires-Dist: zope.contenttype
|
32
|
+
Requires-Dist: zope.contenttype>=3.5
|
33
33
|
Requires-Dist: zope.event
|
34
34
|
Requires-Dist: zope.i18n
|
35
35
|
Requires-Dist: zope.i18nmessageid
|
36
36
|
Requires-Dist: zope.interface
|
37
37
|
Requires-Dist: zope.schema
|
38
38
|
Requires-Dist: zope.security
|
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"
|
39
46
|
Provides-Extra: browser
|
40
|
-
Requires-Dist: zope.browser
|
41
|
-
Requires-Dist: zope.browserresource
|
42
|
-
Requires-Dist: zope.formlib
|
43
|
-
Requires-Dist: zope.publisher
|
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"
|
44
51
|
Provides-Extra: docs
|
45
|
-
Requires-Dist: Sphinx
|
46
|
-
Requires-Dist:
|
47
|
-
Requires-Dist: repoze.sphinx.autointerface
|
48
|
-
Requires-Dist: zope.browser
|
49
|
-
Requires-Dist: zope.browserresource
|
50
|
-
Requires-Dist: zope.formlib
|
51
|
-
Requires-Dist: zope.publisher
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
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
|
59
71
|
|
60
72
|
zope.mimetype
|
61
73
|
=============
|
@@ -68,8 +80,8 @@ zope.mimetype
|
|
68
80
|
:target: https://pypi.org/project/zope.mimetype/
|
69
81
|
:alt: Supported Python versions
|
70
82
|
|
71
|
-
.. image:: https://
|
72
|
-
:target: https://
|
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
|
73
85
|
|
74
86
|
.. image:: https://coveralls.io/repos/github/zopefoundation/zope.mimetype/badge.svg?branch=master
|
75
87
|
:target: https://coveralls.io/github/zopefoundation/zope.mimetype?branch=master
|
@@ -89,6 +101,20 @@ See complete documentation at https://zopemimetype.readthedocs.io/en/latest/
|
|
89
101
|
Changes
|
90
102
|
=========
|
91
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
|
+
|
92
118
|
3.0 (2023-02-27)
|
93
119
|
================
|
94
120
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
zope.mimetype-3.
|
1
|
+
zope.mimetype-3.2-py3.12-nspkg.pth,sha256=_l6EZJaefCi1yytmDbFQGX_jfS2gAtFyaDmlK1uFLec,457
|
2
2
|
zope/mimetype/README.rst,sha256=4t11TnXKAOUPydVNAsPCb_kLzYpXAcjQgLt3lR0r5B0,2841
|
3
3
|
zope/mimetype/TODO.rst,sha256=xD68bNt3BXApezJV5oGfGQ52UZfYubf5ratu6Aw7s88,156
|
4
4
|
zope/mimetype/__init__.py,sha256=dlav9SNH9SSfv-V4IKDUM3aMyG0yhQrHesUxPs2JhgM,106
|
5
5
|
zope/mimetype/character-sets.txt,sha256=n4vZIZQLsXG_vsOsMr2KvaHOs79SIC0Jc7ox1QVXdPU,52408
|
6
6
|
zope/mimetype/codec.py,sha256=PQevg_W57ESvjgZXvuEDwb9wg82zIHvDL4wndzGtUZU,4990
|
7
7
|
zope/mimetype/codec.rst,sha256=2n69qHlJDNoshJu8v5J4OQeImVVNCXqeUq3xANYYcpY,2851
|
8
|
-
zope/mimetype/configure.rst,sha256=
|
8
|
+
zope/mimetype/configure.rst,sha256=5twYpFTdLJfSzNQigr2HB8hWQli1CepGBua9vwLhx54,793
|
9
9
|
zope/mimetype/configure.zcml,sha256=D57XSdQF7NotnI-_ng1LmFOn_rgT_P8aP9Bwh7Z-CaE,1561
|
10
10
|
zope/mimetype/constraints.rst,sha256=cMf7jveb8xcL4D5DESvmDcjCgyptfagTuPGib-MyRqk,4318
|
11
11
|
zope/mimetype/contentinfo.py,sha256=WONYu_hCnYbQLkr2DWe3nlsoKdpm5lK6143xkvwhmCw,2942
|
@@ -13,20 +13,20 @@ zope/mimetype/contentinfo.rst,sha256=e6ArMTrZg6ot93m6DrTnhcFkV5bpBsKg1CnvWd1JrLY
|
|
13
13
|
zope/mimetype/event.py,sha256=GHSKpueihmzTCVz3kYmNM7AQvX6EfD0ZW8avIUxOMWA,2090
|
14
14
|
zope/mimetype/event.rst,sha256=ztTC38SPNx3ptxMmGLd1SDPgq2czV1eKqeLyLQ5WK60,3366
|
15
15
|
zope/mimetype/i18n.py,sha256=1xAvozcLg1G2b9Q8HM1y5sliyiPn1ZzKubzKECXExVQ,1119
|
16
|
-
zope/mimetype/interfaces.py,sha256=
|
16
|
+
zope/mimetype/interfaces.py,sha256=ejEtQpTAW33lrRoP_3HhckRCzEm94IKq7IVDAOrgLiM,10729
|
17
17
|
zope/mimetype/meta.zcml,sha256=W4kXR1O9FI7OtpIGu7aahzmENEeQOLVVqjhLLPrKmT4,612
|
18
18
|
zope/mimetype/mtypes.py,sha256=npR-vnRDOVAMm1LelYN0eUu6bYLA1y3DT4mSM3utWxc,2789
|
19
19
|
zope/mimetype/retrieving_mime_types.rst,sha256=hK89CbHrD9IeubLyEQ_YPMOIGhdjQIsU6NDHjYBrTO8,2389
|
20
|
-
zope/mimetype/source.py,sha256=
|
20
|
+
zope/mimetype/source.py,sha256=baSVIfpqjrsHPca5vdlBsVlpxEx-0TYGBdwQ_hbBVoE,5864
|
21
21
|
zope/mimetype/source.rst,sha256=iDvFMHG04FxxwSGRTY6p_0a8Gj7iKnc4RKFn0QL9P4k,3425
|
22
|
-
zope/mimetype/typegetter.py,sha256=
|
22
|
+
zope/mimetype/typegetter.py,sha256=i2fNcK2Dl1mnD_Gt3cn2OnFw4i9EL6tUzj2Su0fe8_4,5361
|
23
23
|
zope/mimetype/typegetter.rst,sha256=UylvVi6zLXV8Tm7vjSCQZSOYaBOdNj27uGrmfu3lxC4,8261
|
24
24
|
zope/mimetype/types.csv,sha256=KLGFqNNFtH75G-gXHi5fZikVPYhz20HtmmdwsPOyiWY,5621
|
25
25
|
zope/mimetype/utils.py,sha256=a8lWoldma9WvIimMdFOJdUu42FD-WWTcoYVJISmdXKU,913
|
26
26
|
zope/mimetype/utils.rst,sha256=zSDZ0q3LnlS3bNanzfSk823-bsn91pG1aWnNRVbN4xk,1321
|
27
27
|
zope/mimetype/widget.py,sha256=w5dswBNnskiSSKKXN4A_fSqdjpYH3P4Uz5p7UR9f5Co,2867
|
28
28
|
zope/mimetype/widget.rst,sha256=fv0WSee5pT9eOIL34vD8tf2CYv_4XsKNpzXaFU2OTQU,3392
|
29
|
-
zope/mimetype/zcml.py,sha256=
|
29
|
+
zope/mimetype/zcml.py,sha256=DBEzXJW4N1Wur43pjSdDL2kHVjiWMeckZY8TMlVA29k,4473
|
30
30
|
zope/mimetype/icons/archive.png,sha256=4eDJcaDvjVjzDujLRF30S4G3xJfzA-nX6NadDZcpsnw,392
|
31
31
|
zope/mimetype/icons/audio.gif,sha256=MI_ZGa39gmGSs6oj6pLip83YcudCpBYeqt94Pv_ropU,144
|
32
32
|
zope/mimetype/icons/binary.gif,sha256=1q9mG0MHjd-f31oRuc_SKlPVD6-UCAMy4erWmS5NhLw,366
|
@@ -51,14 +51,14 @@ zope/mimetype/icons/xml.gif,sha256=V7rvD6NxM3jCffoaIKk0r3bsnzThTsBxMZ4rV1z3RlE,1
|
|
51
51
|
zope/mimetype/icons/xsl.gif,sha256=QluyDfgaf6UmjXU8yUMyHYob5EtWDKFn99Gsb9qOG2o,956
|
52
52
|
zope/mimetype/tests/__init__.py,sha256=zV7K7Una4vGEtpC2mYxbELN_0aop0Aa4F75JNX8r0eM,1546
|
53
53
|
zope/mimetype/tests/test_codec.py,sha256=p_8qmvZNiMW2vl1RJwGJmAQZ57z1VmOzwORZm30COxY,1167
|
54
|
-
zope/mimetype/tests/test_contentinfo.py,sha256=
|
55
|
-
zope/mimetype/tests/test_doctests.py,sha256=
|
56
|
-
zope/mimetype/tests/test_source.py,sha256=
|
54
|
+
zope/mimetype/tests/test_contentinfo.py,sha256=aGb3gJOmmx_Lt6Cdp-sldvuaXQkaKT1637AAjznbC4U,1452
|
55
|
+
zope/mimetype/tests/test_doctests.py,sha256=5G_TsJIlWIXFh57IUvS1WNwLN9-5Qy5_IpYQ5hN39Tg,2339
|
56
|
+
zope/mimetype/tests/test_source.py,sha256=9ar034obZXUYxrEk6abmgGGb2vnkWiFPbIVWuxnK4Co,3002
|
57
57
|
zope/mimetype/tests/test_typegetter.py,sha256=muDwKKr2pV7BxWfDxUZB2pveXLSGvgefzqkRWkthABM,2306
|
58
58
|
zope/mimetype/tests/test_zcml.py,sha256=9y1hS0JyLQD4fZZ-zJhAl0CXCsZcSnkw5UZJ0Sk5DlQ,2460
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
zope_mimetype-3.2.dist-info/licenses/LICENSE.txt,sha256=PmcdsR32h1FswdtbPWXkqjg-rKPCDOo_r1Og9zNdCjw,2070
|
60
|
+
zope_mimetype-3.2.dist-info/METADATA,sha256=ACa2fzSmOPV6HObw-w3XomG7MHCRHnMGU9UyaVV-B1g,7940
|
61
|
+
zope_mimetype-3.2.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
|
62
|
+
zope_mimetype-3.2.dist-info/namespace_packages.txt,sha256=QpUHvpO4wIuZDeEgKY8qZCtD-tAukB0fn_f6utzlb98,5
|
63
|
+
zope_mimetype-3.2.dist-info/top_level.txt,sha256=QpUHvpO4wIuZDeEgKY8qZCtD-tAukB0fn_f6utzlb98,5
|
64
|
+
zope_mimetype-3.2.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('zope',));importlib = has_mfs and __import__('importlib.util');has_mfs and __import__('importlib.machinery');m = has_mfs and sys.modules.setdefault('zope', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('zope', [os.path.dirname(p)])));m = m or sys.modules.setdefault('zope', types.ModuleType('zope'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p)
|
File without changes
|
File without changes
|
File without changes
|