diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9ec0632..7fca0d5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,8 +1,8 @@ Changelog ========= -0.16.0 (unreleased) -******************* +1.0.0 (unreleased) +****************** Features: @@ -18,6 +18,12 @@ Support: * Test against Python 3.12. * Drop support for Python 3.7. +Other changes: + +* *Backwards-incompatible*: Remove ```flask_marshmallow.__version__`` + and ``flask_marshmallow.__version_info__`` attributes (:pr:`284`). + Use feature detection or ``importlib.metadata.version("flask-marshmallow")`` instead. + 0.15.0 (2023-04-05) ******************* diff --git a/setup.py b/setup.py index 1e01dde..89228c1 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,3 @@ -import re - from setuptools import find_packages, setup EXTRAS_REQUIRE = { @@ -15,23 +13,6 @@ REQUIRES = ["Flask", "marshmallow>=3.0.0", "packaging>=17.0"] -def find_version(fname): - """Attempts to find the version number in the file names fname. - Raises RuntimeError if not found. - """ - version = "" - with open(fname) as fp: - reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]') - for line in fp: - m = reg.match(line) - if m: - version = m.group(1) - break - if not version: - raise RuntimeError("Cannot find version information") - return version - - def read(fname): with open(fname) as fp: content = fp.read() @@ -40,7 +21,7 @@ def read(fname): setup( name="flask-marshmallow", - version=find_version("src/flask_marshmallow/__init__.py"), + version="1.0.0", description="Flask + marshmallow for beautiful APIs", long_description=read("README.rst"), author="Steven Loria", diff --git a/src/flask_marshmallow/__init__.py b/src/flask_marshmallow/__init__.py index b6b3b9a..264bc7a 100755 --- a/src/flask_marshmallow/__init__.py +++ b/src/flask_marshmallow/__init__.py @@ -6,7 +6,6 @@ with your Flask application. """ import warnings -from packaging.version import Version from marshmallow import fields as base_fields, exceptions, pprint @@ -30,8 +29,6 @@ else: has_sqla = True -__version__ = "0.15.0" -__version_info__ = Version(__version__).release __all__ = [ "EXTENSION_NAME", "Marshmallow", @@ -39,7 +36,6 @@ "fields", "exceptions", "pprint", - "validate", ] EXTENSION_NAME = "flask-marshmallow"