zope.mimetype 3.1__py3-none-any.whl → 4.0__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.
@@ -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
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 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):
@@ -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
 
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 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.1
3
+ Version: 4.0
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,50 +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
21
19
  Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
22
21
  Classifier: Programming Language :: Python :: Implementation :: CPython
23
22
  Classifier: Programming Language :: Python :: Implementation :: PyPy
24
23
  Classifier: Natural Language :: English
25
24
  Classifier: Operating System :: OS Independent
26
25
  Classifier: Topic :: Internet :: WWW/HTTP
27
26
  Classifier: Framework :: Zope :: 3
28
- Requires-Python: >=3.7
27
+ Requires-Python: >=3.9
29
28
  License-File: LICENSE.txt
30
29
  Requires-Dist: setuptools
31
30
  Requires-Dist: zope.component
32
31
  Requires-Dist: zope.configuration
33
- Requires-Dist: zope.contenttype >=3.5
32
+ Requires-Dist: zope.contenttype>=3.5
34
33
  Requires-Dist: zope.event
35
34
  Requires-Dist: zope.i18n
36
35
  Requires-Dist: zope.i18nmessageid
37
36
  Requires-Dist: zope.interface
38
37
  Requires-Dist: zope.schema
39
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>=6.4; extra == "test"
40
46
  Provides-Extra: browser
41
- Requires-Dist: zope.browser ; extra == 'browser'
42
- Requires-Dist: zope.browserresource ; extra == 'browser'
43
- Requires-Dist: zope.formlib >=4.0 ; extra == 'browser'
44
- Requires-Dist: zope.publisher ; 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"
45
51
  Provides-Extra: docs
46
- Requires-Dist: Sphinx ; extra == 'docs'
47
- Requires-Dist: sphinx-rtd-theme ; extra == 'docs'
48
- Requires-Dist: repoze.sphinx.autointerface ; extra == 'docs'
49
- Requires-Dist: zope.browser ; extra == 'docs'
50
- Requires-Dist: zope.browserresource ; extra == 'docs'
51
- Requires-Dist: zope.formlib >=4.0 ; extra == 'docs'
52
- Requires-Dist: zope.publisher ; extra == 'docs'
53
- Provides-Extra: test
54
- Requires-Dist: zope.browser ; extra == 'test'
55
- Requires-Dist: zope.browserresource ; extra == 'test'
56
- Requires-Dist: zope.formlib >=4.0 ; extra == 'test'
57
- Requires-Dist: zope.publisher ; extra == 'test'
58
- Requires-Dist: zope.testing ; extra == 'test'
59
- Requires-Dist: zope.testrunner ; extra == 'test'
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
60
71
 
61
72
  zope.mimetype
62
73
  =============
@@ -90,6 +101,20 @@ See complete documentation at https://zopemimetype.readthedocs.io/en/latest/
90
101
  Changes
91
102
  =========
92
103
 
104
+ 4.0 (2025-09-12)
105
+ ================
106
+
107
+ - Replace ``pkg_resources`` namespace with PEP 420 native namespace.
108
+
109
+
110
+ 3.2 (2025-07-03)
111
+ ================
112
+
113
+ - Add support for Python 3.13.
114
+
115
+ - Drop support for Python 3.7, 3.8.
116
+
117
+
93
118
  3.1 (2024-02-08)
94
119
  ================
95
120
 
@@ -1,11 +1,10 @@
1
- zope.mimetype-3.1-py3.11-nspkg.pth,sha256=SWEVH-jEWsKYrL0qoC6GBJaStx_iKxGoAY9PQycFVC4,529
2
1
  zope/mimetype/README.rst,sha256=4t11TnXKAOUPydVNAsPCb_kLzYpXAcjQgLt3lR0r5B0,2841
3
2
  zope/mimetype/TODO.rst,sha256=xD68bNt3BXApezJV5oGfGQ52UZfYubf5ratu6Aw7s88,156
4
3
  zope/mimetype/__init__.py,sha256=dlav9SNH9SSfv-V4IKDUM3aMyG0yhQrHesUxPs2JhgM,106
5
4
  zope/mimetype/character-sets.txt,sha256=n4vZIZQLsXG_vsOsMr2KvaHOs79SIC0Jc7ox1QVXdPU,52408
6
5
  zope/mimetype/codec.py,sha256=PQevg_W57ESvjgZXvuEDwb9wg82zIHvDL4wndzGtUZU,4990
7
6
  zope/mimetype/codec.rst,sha256=2n69qHlJDNoshJu8v5J4OQeImVVNCXqeUq3xANYYcpY,2851
8
- zope/mimetype/configure.rst,sha256=9tydwL_Byw18v0mh9701zWTEfE0-r8kj3pgfSiRmmUg,785
7
+ zope/mimetype/configure.rst,sha256=5twYpFTdLJfSzNQigr2HB8hWQli1CepGBua9vwLhx54,793
9
8
  zope/mimetype/configure.zcml,sha256=D57XSdQF7NotnI-_ng1LmFOn_rgT_P8aP9Bwh7Z-CaE,1561
10
9
  zope/mimetype/constraints.rst,sha256=cMf7jveb8xcL4D5DESvmDcjCgyptfagTuPGib-MyRqk,4318
11
10
  zope/mimetype/contentinfo.py,sha256=WONYu_hCnYbQLkr2DWe3nlsoKdpm5lK6143xkvwhmCw,2942
@@ -13,20 +12,20 @@ zope/mimetype/contentinfo.rst,sha256=e6ArMTrZg6ot93m6DrTnhcFkV5bpBsKg1CnvWd1JrLY
13
12
  zope/mimetype/event.py,sha256=GHSKpueihmzTCVz3kYmNM7AQvX6EfD0ZW8avIUxOMWA,2090
14
13
  zope/mimetype/event.rst,sha256=ztTC38SPNx3ptxMmGLd1SDPgq2czV1eKqeLyLQ5WK60,3366
15
14
  zope/mimetype/i18n.py,sha256=1xAvozcLg1G2b9Q8HM1y5sliyiPn1ZzKubzKECXExVQ,1119
16
- zope/mimetype/interfaces.py,sha256=2zgvF9rjF6X1HgZdvMUerq-WZ4CpGFIJjzyHhfXtWgs,10739
15
+ zope/mimetype/interfaces.py,sha256=ejEtQpTAW33lrRoP_3HhckRCzEm94IKq7IVDAOrgLiM,10729
17
16
  zope/mimetype/meta.zcml,sha256=W4kXR1O9FI7OtpIGu7aahzmENEeQOLVVqjhLLPrKmT4,612
18
17
  zope/mimetype/mtypes.py,sha256=npR-vnRDOVAMm1LelYN0eUu6bYLA1y3DT4mSM3utWxc,2789
19
18
  zope/mimetype/retrieving_mime_types.rst,sha256=hK89CbHrD9IeubLyEQ_YPMOIGhdjQIsU6NDHjYBrTO8,2389
20
- zope/mimetype/source.py,sha256=DS_MinEDFkOpj87bPrNkR_vgMykYp1YZj8twc6Td-8Y,5866
19
+ zope/mimetype/source.py,sha256=baSVIfpqjrsHPca5vdlBsVlpxEx-0TYGBdwQ_hbBVoE,5864
21
20
  zope/mimetype/source.rst,sha256=iDvFMHG04FxxwSGRTY6p_0a8Gj7iKnc4RKFn0QL9P4k,3425
22
- zope/mimetype/typegetter.py,sha256=8nlSKYFC12LQqnEGXqbKWj5IYeKo37UAfy-GanIFkp0,5371
21
+ zope/mimetype/typegetter.py,sha256=i2fNcK2Dl1mnD_Gt3cn2OnFw4i9EL6tUzj2Su0fe8_4,5361
23
22
  zope/mimetype/typegetter.rst,sha256=UylvVi6zLXV8Tm7vjSCQZSOYaBOdNj27uGrmfu3lxC4,8261
24
23
  zope/mimetype/types.csv,sha256=KLGFqNNFtH75G-gXHi5fZikVPYhz20HtmmdwsPOyiWY,5621
25
24
  zope/mimetype/utils.py,sha256=a8lWoldma9WvIimMdFOJdUu42FD-WWTcoYVJISmdXKU,913
26
25
  zope/mimetype/utils.rst,sha256=zSDZ0q3LnlS3bNanzfSk823-bsn91pG1aWnNRVbN4xk,1321
27
26
  zope/mimetype/widget.py,sha256=w5dswBNnskiSSKKXN4A_fSqdjpYH3P4Uz5p7UR9f5Co,2867
28
27
  zope/mimetype/widget.rst,sha256=fv0WSee5pT9eOIL34vD8tf2CYv_4XsKNpzXaFU2OTQU,3392
29
- zope/mimetype/zcml.py,sha256=ERz-vOFISH-axLaYBgfesqHnr_CpRhk2y7JkuChE-v0,4465
28
+ zope/mimetype/zcml.py,sha256=DBEzXJW4N1Wur43pjSdDL2kHVjiWMeckZY8TMlVA29k,4473
30
29
  zope/mimetype/icons/archive.png,sha256=4eDJcaDvjVjzDujLRF30S4G3xJfzA-nX6NadDZcpsnw,392
31
30
  zope/mimetype/icons/audio.gif,sha256=MI_ZGa39gmGSs6oj6pLip83YcudCpBYeqt94Pv_ropU,144
32
31
  zope/mimetype/icons/binary.gif,sha256=1q9mG0MHjd-f31oRuc_SKlPVD6-UCAMy4erWmS5NhLw,366
@@ -52,13 +51,12 @@ zope/mimetype/icons/xsl.gif,sha256=QluyDfgaf6UmjXU8yUMyHYob5EtWDKFn99Gsb9qOG2o,9
52
51
  zope/mimetype/tests/__init__.py,sha256=zV7K7Una4vGEtpC2mYxbELN_0aop0Aa4F75JNX8r0eM,1546
53
52
  zope/mimetype/tests/test_codec.py,sha256=p_8qmvZNiMW2vl1RJwGJmAQZ57z1VmOzwORZm30COxY,1167
54
53
  zope/mimetype/tests/test_contentinfo.py,sha256=aGb3gJOmmx_Lt6Cdp-sldvuaXQkaKT1637AAjznbC4U,1452
55
- zope/mimetype/tests/test_doctests.py,sha256=9h9H38FMW5FvzNurBx6JM70i4BOHKqov5O9ZI_5VGBI,2331
56
- zope/mimetype/tests/test_source.py,sha256=knGutTjDxx3rh8TZjiTCUSg4DaIjpL4nrDMjMx81Tjg,2994
54
+ zope/mimetype/tests/test_doctests.py,sha256=5G_TsJIlWIXFh57IUvS1WNwLN9-5Qy5_IpYQ5hN39Tg,2339
55
+ zope/mimetype/tests/test_source.py,sha256=9ar034obZXUYxrEk6abmgGGb2vnkWiFPbIVWuxnK4Co,3002
57
56
  zope/mimetype/tests/test_typegetter.py,sha256=muDwKKr2pV7BxWfDxUZB2pveXLSGvgefzqkRWkthABM,2306
58
57
  zope/mimetype/tests/test_zcml.py,sha256=9y1hS0JyLQD4fZZ-zJhAl0CXCsZcSnkw5UZJ0Sk5DlQ,2460
59
- zope.mimetype-3.1.dist-info/LICENSE.txt,sha256=PmcdsR32h1FswdtbPWXkqjg-rKPCDOo_r1Og9zNdCjw,2070
60
- zope.mimetype-3.1.dist-info/METADATA,sha256=uiay0ItiB1Fcok423vwqGc8pQs9NH9LC5LDlwOVdtCA,7661
61
- zope.mimetype-3.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
62
- zope.mimetype-3.1.dist-info/namespace_packages.txt,sha256=QpUHvpO4wIuZDeEgKY8qZCtD-tAukB0fn_f6utzlb98,5
63
- zope.mimetype-3.1.dist-info/top_level.txt,sha256=QpUHvpO4wIuZDeEgKY8qZCtD-tAukB0fn_f6utzlb98,5
64
- zope.mimetype-3.1.dist-info/RECORD,,
58
+ zope_mimetype-4.0.dist-info/licenses/LICENSE.txt,sha256=PmcdsR32h1FswdtbPWXkqjg-rKPCDOo_r1Og9zNdCjw,2070
59
+ zope_mimetype-4.0.dist-info/METADATA,sha256=kxO3_Nh8F_dBACBEv9WRAW71yGhlGsWPiN5BQwd0nNY,8051
60
+ zope_mimetype-4.0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
61
+ zope_mimetype-4.0.dist-info/top_level.txt,sha256=QpUHvpO4wIuZDeEgKY8qZCtD-tAukB0fn_f6utzlb98,5
62
+ zope_mimetype-4.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: setuptools (78.1.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -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)
@@ -1 +0,0 @@
1
- zope