1
0

- Update to 5.1.1

* Only prefer envs owned by the current user #323 (@minrk)
  * Don't treat the conda root env as an env #324 (@minrk)
- Release 5.1.0
  * Add run_sync and ensure_async functions #315 (@davidbrochart)
- Release 5.0.0
  ## Major Changes
  * Prefer Environment Level Configuration. We now make the
    assumption that if we are running in a virtual environment, we
    * should prioritize the environment-level sys.prefix over the
    user-level paths. Users can opt out of this behavior by setting
    JUPYTER_PREFER_ENV_PATH, which takes precedence over our
    autodetection.
  * Migrate to Standard Platform Directories. In version 5, we
    introduce a JUPYTER_PLATFORM_DIRS environment variable to opt
    in   * to using more appropriate platform-specific directories.
    We raise a deprecation warning if the variable is not set. In
    version 6, JUPYTER_PLATFORM_DIRS will be opt-out. In version 7,
    we will remove the environment variable checks and old
    directory logic.
  * Drop Support for Python 3.7
  * We are dropping support for Python 3.7 ahead of its official
    end of life, to reduce   * maintenance burden as we add support
    for Python 3.11.
  * Use platformdirs for path locations #292 (@blink1073)
  * Try to detect if we are in a virtual environment and change
    path precedence   * accordingly #286 (@jasongrout)
  * Add current working directory as first config path #291
    (@blink1073)
  * Fix inclusion of jupyter file and check in CI #276 (@blink1073)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=28
This commit is contained in:
Benjamin Greiner 2022-12-25 20:40:52 +00:00 committed by Git OBS Bridge
parent 77c4b8efa5
commit fe763d17fd
5 changed files with 81 additions and 33 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c2909b9bc7dca75560a6c5ae78c34fd305ede31cd864da3c0d0bb2ed89aa9337
size 788994

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f342d29eb6edb06f8dffa69adea987b3a9ee2b6702338a8cb6911516ea0b432d
size 81576

View File

@ -1,3 +1,46 @@
-------------------------------------------------------------------
Sun Dec 25 20:25:31 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 5.1.1
* Only prefer envs owned by the current user #323 (@minrk)
* Don't treat the conda root env as an env #324 (@minrk)
- Release 5.1.0
* Add run_sync and ensure_async functions #315 (@davidbrochart)
- Release 5.0.0
## Major Changes
* Prefer Environment Level Configuration. We now make the
assumption that if we are running in a virtual environment, we
* should prioritize the environment-level sys.prefix over the
user-level paths. Users can opt out of this behavior by setting
JUPYTER_PREFER_ENV_PATH, which takes precedence over our
autodetection.
* Migrate to Standard Platform Directories. In version 5, we
introduce a JUPYTER_PLATFORM_DIRS environment variable to opt
in * to using more appropriate platform-specific directories.
We raise a deprecation warning if the variable is not set. In
version 6, JUPYTER_PLATFORM_DIRS will be opt-out. In version 7,
we will remove the environment variable checks and old
directory logic.
* Drop Support for Python 3.7
* We are dropping support for Python 3.7 ahead of its official
end of life, to reduce * maintenance burden as we add support
for Python 3.11.
* Use platformdirs for path locations #292 (@blink1073)
* Try to detect if we are in a virtual environment and change
path precedence * accordingly #286 (@jasongrout)
* Add current working directory as first config path #291
(@blink1073)
* Fix inclusion of jupyter file and check in CI #276 (@blink1073)
* Bump github/codeql-action from 1 to 2 #308 (@dependabot)
* Bump actions/checkout from 2 to 3 #307 (@dependabot)
* Add dependabot #306 (@blink1073)
* Adopt jupyter releaser #305 (@blink1073)
* Add more typing #304 (@blink1073)
* Require Python 3.8+ #302 (@blink1073)
* Use hatch backend #265 (@blink1073)
* Switch to flit build backend #262 (@blink1073)
* is_hidden: Use normalized paths #271 (@martinRenou)
-------------------------------------------------------------------
Wed Oct 26 10:12:39 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@ -31,8 +31,9 @@
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-jupyter-core%{psuffix}
Version: 4.11.2
Version: 5.1.1
Release: 0
Summary: Base package on which Jupyter projects rely
License: BSD-3-Clause
@ -40,12 +41,13 @@ URL: https://github.com/jupyter/jupyter_core
Source0: https://files.pythonhosted.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
# PATCH-FIX-OPENSUSE -- use_rpms_paths.patch -- change paths so they are easy to replace at build time
Patch0: use_rpms_paths.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210929
Requires: python-traitlets
Requires: python-platformdirs >= 2.5
Requires: python-traitlets >= 5.3
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
@ -83,8 +85,8 @@ as a dependency by packages that require it.
%prep
%autosetup -p1 -n jupyter_core-%{version}
# Set the appropriate hardcoded paths dynamically
sed -i "s|\"_datadir_jupyter_\"|\"%{_datadir}/jupyter\"|" jupyter_core/paths.py
sed -i "s|\"_sysconfdir_jupyter_\"|\"%{_sysconfdir}/jupyter\"|" jupyter_core/paths.py
sed -i "s|@_datadir_jupyter_@|\"%{_datadir}/jupyter\"|" jupyter_core/paths.py
sed -i "s|@_distconfdir_jupyter_@|\"%{_distconfdir}/jupyter\"|" jupyter_core/paths.py
sed -i "/addopts/ s/--color=yes//" pyproject.toml
%if !%{with test}
@ -107,8 +109,11 @@ sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" %{buildroot}%{$python_sitel
%if %{with test}
%check
# test_jupyter_path_prefer_env does not work outside venvs: gh#jupyter/jupyter_core#208
%pytest -k "not test_jupyter_path_prefer_env"
# does not work outside venvs: gh#jupyter/jupyter_core#208
donttest="test_jupyter_path_prefer_env or test_jupyter_config_path_prefer_env"
# we changed the xdg path
donttest="$donttest or test_config_dir_linux"
%pytest -k "not ($donttest)"
%endif
%pre

View File

@ -7,11 +7,11 @@ system paths in the .spec file.
---
Index: jupyter_core-4.11.1/jupyter_core/paths.py
Index: jupyter_core-5.1.1/jupyter_core/paths.py
===================================================================
--- jupyter_core-4.11.1.orig/jupyter_core/paths.py
+++ jupyter_core-4.11.1/jupyter_core/paths.py
@@ -130,10 +130,7 @@ if os.name == "nt":
--- jupyter_core-5.1.1.orig/jupyter_core/paths.py
+++ jupyter_core-5.1.1/jupyter_core/paths.py
@@ -219,10 +219,7 @@ else:
else: # PROGRAMDATA is not defined by default on XP.
SYSTEM_JUPYTER_PATH = [os.path.join(sys.prefix, "share", "jupyter")]
else:
@ -19,11 +19,11 @@ Index: jupyter_core-4.11.1/jupyter_core/paths.py
- "/usr/local/share/jupyter",
- "/usr/share/jupyter",
- ]
+ SYSTEM_JUPYTER_PATH = ["_datadir_jupyter_"]
+ SYSTEM_JUPYTER_PATH = [ @_datadir_jupyter_@ ]
ENV_JUPYTER_PATH = [os.path.join(sys.prefix, "share", "jupyter")]
ENV_JUPYTER_PATH: List[str] = [os.path.join(sys.prefix, "share", "jupyter")]
@@ -207,10 +204,7 @@ if os.name == "nt":
@@ -301,10 +298,7 @@ else:
else: # PROGRAMDATA is not defined by default on XP.
SYSTEM_CONFIG_PATH = []
else:
@ -31,7 +31,7 @@ Index: jupyter_core-4.11.1/jupyter_core/paths.py
- "/usr/local/etc/jupyter",
- "/etc/jupyter",
- ]
+ SYSTEM_CONFIG_PATH = ["_sysconfdir_jupyter_"]
+ SYSTEM_CONFIG_PATH = [ @_distconfdir_jupyter_@ ]
ENV_CONFIG_PATH: List[str] = [os.path.join(sys.prefix, "etc", "jupyter")]
ENV_CONFIG_PATH = [os.path.join(sys.prefix, "etc", "jupyter")]