Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-nbformat for openSUSE:Factory
checked in at 2022-09-28 17:51:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-nbformat (Old)
and /work/SRC/openSUSE:Factory/.python-nbformat.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-nbformat"
Wed Sep 28 17:51:37 2022 rev:13 rq:1006527 version:5.6.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-nbformat/python-nbformat.changes
2022-09-19 16:37:09.435452466 +0200
+++
/work/SRC/openSUSE:Factory/.python-nbformat.new.2275/python-nbformat.changes
2022-09-28 17:51:37.775217348 +0200
@@ -1,0 +2,16 @@
+Tue Sep 27 16:58:10 UTC 2022 - Arun Persaud <[email protected]>
+
+- update to version 5.6.1:
+ * Fix handling of "__version__` on Python 3.7.
+
+-------------------------------------------------------------------
+Thu Sep 22 18:05:13 UTC 2022 - Arun Persaud <[email protected]>
+
+- specfile:
+ * change to hatchling
+
+- update to version 5.6.0:
+ * Fix docs and type annotations for validator.normalize.
+ * Switch to hatch build backend.
+
+-------------------------------------------------------------------
Old:
----
nbformat-5.5.0.tar.gz
New:
----
nbformat-5.6.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-nbformat.spec ++++++
--- /var/tmp/diff_new_pack.u8i07W/_old 2022-09-28 17:51:38.347218498 +0200
+++ /var/tmp/diff_new_pack.u8i07W/_new 2022-09-28 17:51:38.355218514 +0200
@@ -20,7 +20,7 @@
%define doc_ver 5.2.0
%bcond_without libalternatives
Name: python-nbformat
-Version: 5.5.0
+Version: 5.6.1
Release: 0
Summary: The Jupyter Notebook format
License: BSD-3-Clause
@@ -29,10 +29,12 @@
# PyPI sdist has only some schema tests, get the full test suite from GitHub
sources
Source:
https://github.com/jupyter/nbformat/archive/%{version}.tar.gz#/nbformat-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.7}
-BuildRequires: %{python_module flit-core >= 3.2}
+BuildRequires: %{python_module hatch_nodejs_version}
+BuildRequires: %{python_module hatchling >= 1.5}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
+BuildRequires: nodejs
BuildRequires: python-rpm-macros >= 20210929
Requires: jupyter-nbformat = %{version}
Requires: python-fastjsonschema
++++++ nbformat-5.5.0.tar.gz -> nbformat-5.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/.bumpversion.cfg
new/nbformat-5.6.1/.bumpversion.cfg
--- old/nbformat-5.5.0/.bumpversion.cfg 2022-09-13 11:22:39.000000000 +0200
+++ new/nbformat-5.6.1/.bumpversion.cfg 1970-01-01 01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-[bumpversion]
-current_version = 5.5.0
-commit = True
-message = Bump version: {current_version} ??? {new_version}
-tag = False
-tag_name = {new_version}
-parse =
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<build>\d+))?
-serialize =
- {major}.{minor}.{patch}{release}{build}
- {major}.{minor}.{patch}
-
-[bumpversion:part:release]
-optional_value = prod
-first_value = b
-values =
- b
- prod
-
-[bumpversion:part:build]
-
-[bumpversion:file:pyproject.toml]
-parse =
(?P<major>\d+),\s*(?P<minor>\d+),\s*(?P<patch>\d+)(,\s*['"](?P<release>[a-z]+)(?P<build>\d+)['"])?
-serialize =
- "{major}.{minor}.{patch}{release}{build}"
- "{major}.{minor}.{patch}"
-
-[bumpversion:file:nbformat/_version.py]
-parse =
(?P<major>\d+),\s*(?P<minor>\d+),\s*(?P<patch>\d+)(,\s*['"](?P<release>[a-z]+)(?P<build>\d+)['"])?
-serialize =
- {major}, {minor}, {patch}, "{release}{build}"
- {major}, {minor}, {patch}
-
-[bumpversion:file:docs/conf.py]
-parse = (?P<major>\d+).(?P<minor>\d+)
-serialize = {major}.{minor}
-search = version = "{current_version}"
-replace = version = "{new_version}"
-
-[bumpversion:file:package.json]
-parse =
(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(-(?P<release>[a-z]+)\.(?P<build>\d+))?
-serialize =
- {major}.{minor}.{patch}-{release}.{build}
- {major}.{minor}.{patch}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/.github/workflows/release_publish.yml
new/nbformat-5.6.1/.github/workflows/release_publish.yml
--- old/nbformat-5.5.0/.github/workflows/release_publish.yml 2022-09-13
11:22:39.000000000 +0200
+++ new/nbformat-5.6.1/.github/workflows/release_publish.yml 2022-09-26
16:32:02.000000000 +0200
@@ -18,12 +18,11 @@
python-version: "3.10"
- name: Install dependencies
run: |
- pip install --upgrade pip setuptools
- pip install bump2version twine wheel flit
+ pip install pipx
- name: Build release
run: |
- flit build
- python -m twine check dist/*
+ pipx run build .
+ pipx run twine check dist/*
- name: Parse tag
run: |
echo "RELEASE_TAG=$(python .github/scripts/parse_ref.py)" >>
$GITHUB_ENV
@@ -42,7 +41,7 @@
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
- run: python -m twine upload dist/*
+ run: pipx run twine upload dist/*
- name: Create NPM configuration
run: python .github/scripts/create_npmrc.py
- name: Publish NPM Package
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/.github/workflows/tests.yml
new/nbformat-5.6.1/.github/workflows/tests.yml
--- old/nbformat-5.5.0/.github/workflows/tests.yml 2022-09-13
11:22:39.000000000 +0200
+++ new/nbformat-5.6.1/.github/workflows/tests.yml 2022-09-26
16:32:02.000000000 +0200
@@ -39,6 +39,10 @@
run: python -m pytest -v --cov=nbformat --cov-report
term-missing:skip-covered --no-cov-on-fail
- name: Coverage
run: codecov
+ - name: Bump version test
+ run: |
+ pip install pipx
+ pipx run hatch version 100.100.100
# Run "pre-commit run --all-files --hook-stage=manual"
pre-commit:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/.pre-commit-config.yaml
new/nbformat-5.6.1/.pre-commit-config.yaml
--- old/nbformat-5.5.0/.pre-commit-config.yaml 2022-09-13 11:22:39.000000000
+0200
+++ new/nbformat-5.6.1/.pre-commit-config.yaml 2022-09-26 16:32:02.000000000
+0200
@@ -35,7 +35,7 @@
- id: prettier
- repo: https://github.com/asottile/pyupgrade
- rev: v2.37.3
+ rev: v2.38.0
hooks:
- id: pyupgrade
args: [--py37-plus]
@@ -69,7 +69,7 @@
stages: [manual]
- repo: https://github.com/sirosen/check-jsonschema
- rev: 0.18.2
+ rev: 0.18.3
hooks:
- id: check-jsonschema
name: "Check GitHub Workflows"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/RELEASING.md
new/nbformat-5.6.1/RELEASING.md
--- old/nbformat-5.5.0/RELEASING.md 2022-09-13 11:22:39.000000000 +0200
+++ new/nbformat-5.6.1/RELEASING.md 2022-09-26 16:32:02.000000000 +0200
@@ -30,49 +30,23 @@
## Update version
-We use [bump2version](https://github.com/c4urself/bump2version) to manage
versions.
+We use [hatch](https://hatch.pypa.io/latest/version/) to manage versions.
-To bump versions we use the `bump2version <VERSION-COMPONENT>` command, where
the
-version component can take any of the following values:
+You must first install `pipx` (or install `hatch` itself if you prefer).
-- `major`: Bump the major component. `5.0.9b0 -> 6.0.0b0`
-- `minor`: Bump the minor component. `5.0.9b0 -> 5.1.0b0`
-- `patch`: Bump the patch component. `5.0.9b0 -> 5.0.10b0`
-- `release`: Bump the release component. `5.0.9b0 -> 5.0.9`
-- `build`: Bump the build component. `5.0.9b0 -> 5.0.9b1`
+To bump versions we use the `pipx run hatch version <new_version>` command.
-Configuration of bump2version is stored on the
[.bumpversion.cfg](https://github.com/jupyter/nbformat/blob/main/.bumpversion.cfg)
file and it currently tracks and updates the following files:
-
--
[pyproject.toml](https://github.com/jupyter/nbformat/blob/main/pyproject.toml)
--
[nbformat/\_version.py](https://github.com/jupyter/nbformat/blob/main/nbformat/_version.py)
-- [docs/conf.py](https://github.com/jupyter/nbformat/blob/main/docs/conf.py)
-- [package.json](https://github.com/jupyter/nbformat/blob/main/package.json)
-
-### To make a beta release
+### To make a release
```bash
# Commit, test, publish, beta tag
-bump2version build --tag
+pipx run hatch version <new_version>
+git tag -a <new_version> -m "<new_version>"
git push upstream master
git push upstream --tags
```
-### To make a release
-
-Change `<VERSION-COMPONENT>` to `major`, `minor` or `patch` for the
corresponding
-version updates depending on the release type that will follow.
-
-```bash
-# Commit, test, publish, tag release
-pip install build twine bump2version
-bump2version release --tag
-bump2version <VERSION-COMPONENT>
-
-git push upstream main
-git push upstream --tags
-```
-
## Publish packages
PyPI and NPM packages will be built and published on CI when a tag is pushed.
@@ -84,10 +58,10 @@
```bash
rm -rf dist/*
rm -rf build/*
-python -m build .
+pipx run build .
# Double check the dist/* files have the right verison (no `.dev`) and install
the wheel to ensure it's good
pip install dist/*
-twine upload dist/*
+pipx run twine upload dist/*
```
### Push to npm
@@ -96,4 +70,4 @@
npm publish
```
-Note for JavaScript developers -- `bump2version` updates the version in
`package.json`.
+Note for JavaScript developers -- `hatch` updates the version in
`package.json`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/docs/changelog.rst
new/nbformat-5.6.1/docs/changelog.rst
--- old/nbformat-5.5.0/docs/changelog.rst 2022-09-13 11:22:39.000000000
+0200
+++ new/nbformat-5.6.1/docs/changelog.rst 2022-09-26 16:32:02.000000000
+0200
@@ -4,6 +4,17 @@
Changes in nbformat
=========================
+5.6.1
+=====
+
+* Fix handling of ``__version__` on Python 3.7.
+
+5.6.0
+=====
+
+* Fix docs and type annotations for ``validator.normalize``.
+* Switch to hatch build backend.
+
5.5.0
=====
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/docs/conf.py
new/nbformat-5.6.1/docs/conf.py
--- old/nbformat-5.5.0/docs/conf.py 2022-09-13 11:22:39.000000000 +0200
+++ new/nbformat-5.6.1/docs/conf.py 2022-09-26 16:32:02.000000000 +0200
@@ -59,7 +59,9 @@
# built documents.
#
# The short X.Y version.
-version = "5.5"
+from importlib.metadata import version as get_version
+
+version = ".".join(get_version("nbformat").split(".")[:2])
# The full version, including alpha/beta/rc tags.
release = version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/nbformat/_version.py
new/nbformat-5.6.1/nbformat/_version.py
--- old/nbformat-5.5.0/nbformat/_version.py 2022-09-13 11:22:39.000000000
+0200
+++ new/nbformat-5.6.1/nbformat/_version.py 2022-09-26 16:32:02.000000000
+0200
@@ -1,9 +1,38 @@
-# Make sure to update package.json, too!
-version_info = (5, 5, 0)
+# Use "hatchling version xx.yy.zz" to handle version changes
+import re
-if len(version_info) <= 3:
- version_extra = ""
-else:
- version_extra = version_info[3]
+try:
+ from importlib.metadata import version
+except ImportError:
+ from importlib_metadata import version # type:ignore
-__version__ = ".".join(map(str, version_info[:3])) + version_extra
+__version__ = version("nbformat")
+
+# matches tbump regex in pyproject.toml
+_version_regex = re.compile(
+ r"""
+ (?P<major>\d+)
+ \.
+ (?P<minor>\d+)
+ \.
+ (?P<patch>\d+)
+ (?P<pre>((a|b|rc)\d+))?
+ (\.
+ (?P<dev>dev\d*)
+ )?
+ """,
+ re.VERBOSE,
+)
+
+_version_fields = _version_regex.match(__version__).groupdict() # type:ignore
+version_info = tuple(
+ field
+ for field in (
+ int(_version_fields["major"]),
+ int(_version_fields["minor"]),
+ int(_version_fields["patch"]),
+ _version_fields["pre"],
+ _version_fields["dev"],
+ )
+ if field is not None
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/nbformat/validator.py
new/nbformat-5.6.1/nbformat/validator.py
--- old/nbformat-5.5.0/nbformat/validator.py 2022-09-13 11:22:39.000000000
+0200
+++ new/nbformat-5.6.1/nbformat/validator.py 2022-09-26 16:32:02.000000000
+0200
@@ -262,7 +262,7 @@
version_minor: Optional[int] = None,
*,
relax_add_props: bool = False,
-) -> Tuple[Any, int]:
+) -> Tuple[int, Any]:
"""
Normalise a notebook prior to validation.
@@ -285,10 +285,10 @@
Returns
-------
- notebook : dict
- deep-copy of the original object with relevant changes.
changes : int
number of changes in the notebooks
+ notebook : dict
+ deep-copy of the original object with relevant changes.
"""
nbdict = deepcopy(nbdict)
@@ -314,7 +314,7 @@
repair_duplicate_cell_ids: bool,
relax_add_props: bool,
strip_invalid_metadata: bool,
-) -> Tuple[Any, int]:
+) -> Tuple[int, Any]:
"""
Private normalisation routine.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/package.json
new/nbformat-5.6.1/package.json
--- old/nbformat-5.5.0/package.json 2022-09-13 11:22:39.000000000 +0200
+++ new/nbformat-5.6.1/package.json 2022-09-26 16:32:02.000000000 +0200
@@ -1,6 +1,6 @@
{
"name": "nbformat-schema",
- "version": "5.5.0",
+ "version": "5.6.1",
"description": "JSON schemata for Jupyter notebook formats",
"main": "index.js",
"files": [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/pyproject.toml
new/nbformat-5.6.1/pyproject.toml
--- old/nbformat-5.5.0/pyproject.toml 2022-09-13 11:22:39.000000000 +0200
+++ new/nbformat-5.6.1/pyproject.toml 2022-09-26 16:32:02.000000000 +0200
@@ -1,10 +1,10 @@
[build-system]
-requires = ["flit_core >=3.2,<4"]
-build-backend = "flit_core.buildapi"
+requires = ["hatchling>=1.5", "hatch-nodejs-version"]
+build-backend = "hatchling.build"
[project]
name = "nbformat"
-version = "5.5.0"
+dynamic = ["version"]
description = "The Jupyter Notebook format"
license = { file = "COPYING.md" }
keywords = ["Interactive", "Interpreter", "Shell", "Web"]
@@ -26,6 +26,7 @@
"jsonschema>=2.6",
"jupyter_core",
"traitlets>=5.1",
+ "importlib-metadata>=3.6;python_version<\"3.8\"",
]
[[project.authors]]
@@ -51,8 +52,8 @@
[project.scripts]
jupyter-trust = "nbformat.sign:TrustNotebookApp.launch_instance"
-[tool.flit.sdist]
-include = ["tests/"]
+[tool.hatch.version]
+source = "nodejs"
[tool.pytest.ini_options]
addopts = "-raXs --durations 10 --color=yes --doctest-modules"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/nbformat-5.5.0/readthedocs.yml
new/nbformat-5.6.1/readthedocs.yml
--- old/nbformat-5.5.0/readthedocs.yml 2022-09-13 11:22:39.000000000 +0200
+++ new/nbformat-5.6.1/readthedocs.yml 2022-09-26 16:32:02.000000000 +0200
@@ -4,4 +4,5 @@
python:
version: 3.8
install:
+ - path: "."
- requirements: docs/requirements.txt