From 91629d8781c5b66bcf9756d86096a8fd6ea245df Mon Sep 17 00:00:00 2001 From: Samarth Date: Sun, 14 Sep 2025 12:06:36 +0000 Subject: [PATCH 1/4] chore: update pyproject.toml with project metadata and dependencies --- pyproject.toml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7fd26b97..2eecd154 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,34 @@ [build-system] requires = ["setuptools"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" + +[project] +name = "pynvim" +version = "0.6.0" +description = "Python client for Neovim" +readme = "README.md" +license = {text = "Apache"} +authors = [{name = "Neovim Authors"}] +requires-python = ">=3.7" +dependencies = [ + "msgpack>=1.0.0", + "greenlet>=3.0; python_implementation != 'PyPy'", + "typing-extensions>=4.5; python_version < '3.12'", +] + +[project.optional-dependencies] +test = [ + "pytest", + "pytest_timeout", +] +docs = [ + "sphinx", + "sphinx-rtd-theme", +] + +[project.scripts] +pynvim-python = "pynvim.python:main" + +[project.urls] +Homepage = "http://github.com/neovim/pynvim" +Download = "https://github.com/neovim/pynvim/archive/0.6.0.tar.gz" From 7022164e89bf7c42d1e5eb5c0833fcee3f6c67d5 Mon Sep 17 00:00:00 2001 From: Samarth Date: Sun, 14 Sep 2025 12:47:41 +0000 Subject: [PATCH 2/4] chore: update pyproject.toml to include additional dependencies and improve metadata --- pyproject.toml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2eecd154..9686e83a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools"] +requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" [project] @@ -7,8 +7,10 @@ name = "pynvim" version = "0.6.0" description = "Python client for Neovim" readme = "README.md" -license = {text = "Apache"} -authors = [{name = "Neovim Authors"}] +license = { text = "Apache-2.0" } +authors = [ + { name = "Neovim Authors" } +] requires-python = ">=3.7" dependencies = [ "msgpack>=1.0.0", @@ -16,10 +18,23 @@ dependencies = [ "typing-extensions>=4.5; python_version < '3.12'", ] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", +] + [project.optional-dependencies] test = [ "pytest", - "pytest_timeout", + "pytest-timeout", ] docs = [ "sphinx", @@ -30,5 +45,6 @@ docs = [ pynvim-python = "pynvim.python:main" [project.urls] -Homepage = "http://github.com/neovim/pynvim" +Homepage = "https://github.com/neovim/pynvim" Download = "https://github.com/neovim/pynvim/archive/0.6.0.tar.gz" +Documentation = "https://pynvim.readthedocs.io" From e4a4e1dee6fd7ccc279f21ef6194dcf2958c8ca3 Mon Sep 17 00:00:00 2001 From: Samarth Date: Mon, 15 Sep 2025 12:52:08 +0000 Subject: [PATCH 3/4] chore: update version to 0.6.1.dev0 and modify bumpversion configuration --- pyproject.toml | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9686e83a..ad4db359 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pynvim" -version = "0.6.0" +version = "0.6.1.dev0" description = "Python client for Neovim" readme = "README.md" license = { text = "Apache-2.0" } @@ -33,12 +33,15 @@ classifiers = [ [project.optional-dependencies] test = [ - "pytest", - "pytest-timeout", + "pytest", + "pytest-timeout", ] docs = [ - "sphinx", - "sphinx-rtd-theme", + "sphinx", + "sphinx-rtd-theme", +] +dev = [ + "bump-my-version", ] [project.scripts] @@ -46,5 +49,36 @@ pynvim-python = "pynvim.python:main" [project.urls] Homepage = "https://github.com/neovim/pynvim" -Download = "https://github.com/neovim/pynvim/archive/0.6.0.tar.gz" +Download = "https://github.com/neovim/pynvim/archive/refs/tags/0.6.1.dev0.tar.gz" Documentation = "https://pynvim.readthedocs.io" + +# Configuration for bumpversion / bump-my-version +[tool.bumpversion] +current_version = "0.6.1.dev0" +commit = true +tag = true + +# Regex that captures major/minor/patch/prerelease (prerelease optional) +parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)(?:\\.(?P[a-zA-Z]+\\d*))?" +serialize = [ + "{major}.{minor}.{patch}.{prerelease}", + "{major}.{minor}.{patch}" +] + +# Update the version in pyproject.toml +[[tool.bumpversion.files]] +filename = "pyproject.toml" +search = 'version = "{current_version}"' +replace = 'version = "{new_version}"' + +# Update the version in pynvim/_version.py (non-hardcoded) +[[tool.bumpversion.files]] +filename = "pynvim/_version.py" +search = 'VERSION = SimpleNamespace(major={current_major}, minor={current_minor}, patch={current_patch}, prerelease="{current_prerelease}")' +replace = 'VERSION = SimpleNamespace(major={new_major}, minor={new_minor}, patch={new_patch}, prerelease="{new_prerelease}")' + +# Update the download URL in pyproject.toml +[[tool.bumpversion.files]] +filename = "pyproject.toml" +search = 'Download = "https://github.com/neovim/pynvim/archive/refs/tags/{current_version}.tar.gz"' +replace = 'Download = "https://github.com/neovim/pynvim/archive/refs/tags/{new_version}.tar.gz"' From 2b52080d0c2dad74f1ad1132b11707d3e61fec11 Mon Sep 17 00:00:00 2001 From: Samarth Date: Tue, 16 Sep 2025 06:01:42 +0000 Subject: [PATCH 4/4] docs: add instructions for releasing with bump-my-version --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index e43b7725..a05dca7f 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,34 @@ Release 8. Run `scripts/enable_log_statements.sh` or `git reset --hard` to restore the working dir. 9. Bump up to the next development version in `pynvim/_version.py`, with `prerelease` suffix `dev0`. +### Releasing with bump-my-version + +`bump-my-version` automates the process of updating version strings, creating git commits, and tagging releases. + +1. **Install `bump-my-version`:** + If you haven't already, install the development dependencies: + ```bash + pip install .[dev] + ``` + +2. **Bump the version:** + To increment the version, use one of the following commands: + * **Patch release:** `bump-my-version bump patch` (e.g., `0.6.1` -> `0.6.2`) + * **Minor release:** `bump-my-version bump minor` (e.g., `0.6.1` -> `0.7.0`) + * **Major release:** `bump-my-version bump major` (e.g., `0.6.1` -> `1.0.0`) + + This command will: + * Update the `version` in `pyproject.toml`. + * Update the `VERSION` in `pynvim/_version.py`. + * Create a git commit with a message like "Bump version: 0.6.1 → 0.6.2". + * Create a git tag (e.g., `v0.6.2`). + +3. **Push changes and tags:** + After bumping the version, push the commit and the new tag to your remote repository: + ```bash + git push --follow-tags + ``` + License -------