# HG changeset patch # User Milka Kuzminski # Date 2021-04-02 09:36:38 # Node ID eba754337fd424f0d6d87a2f354d9a56a198051e # Parent 92f430c01f77488c5a8fc649ddf8d53b2ba17196 # Parent 87b362810d3242fad70c0f813f44680c5cdf56ce release: Merge default into stable for release preparation diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,6 +1,5 @@ [bumpversion] -current_version = 4.24.1 +current_version = 4.25.0 message = release: Bump version {current_version} to {new_version} [bumpversion:file:vcsserver/VERSION] - diff --git a/.release.cfg b/.release.cfg --- a/.release.cfg +++ b/.release.cfg @@ -5,12 +5,10 @@ done = false done = true [task:fixes_on_stable] -done = true [task:pip2nix_generated] -done = true [release] -state = prepared -version = 4.24.1 +state = in_progress +version = 4.25.0 diff --git a/pkgs/patches/configparser/pyproject.patch b/pkgs/patches/configparser/pyproject.patch new file mode 100644 --- /dev/null +++ b/pkgs/patches/configparser/pyproject.patch @@ -0,0 +1,10 @@ +diff -rup configparser-4.0.2-orig/pyproject.toml configparser-4.0.2/pyproject.toml +--- configparser-4.0.2-orig/pyproject.toml 2021-03-22 21:28:11.000000000 +0100 ++++ configparser-4.0.2/pyproject.toml 2021-03-22 21:28:11.000000000 +0100 +@@ -1,5 +1,5 @@ + [build-system] +-requires = ["setuptools>=40.7", "wheel", "setuptools_scm>=1.15"] ++requires = ["setuptools<=42.0", "wheel", "setuptools_scm<6.0.0"] + build-backend = "setuptools.build_meta" + + [tool.black] diff --git a/pkgs/patches/importlib_metadata/pyproject.patch b/pkgs/patches/importlib_metadata/pyproject.patch new file mode 100644 --- /dev/null +++ b/pkgs/patches/importlib_metadata/pyproject.patch @@ -0,0 +1,7 @@ +diff -rup importlib-metadata-1.6.0-orig/yproject.toml importlib-metadata-1.6.0/pyproject.toml +--- importlib-metadata-1.6.0-orig/yproject.toml 2021-03-22 22:10:33.000000000 +0100 ++++ importlib-metadata-1.6.0/pyproject.toml 2021-03-22 22:11:09.000000000 +0100 +@@ -1,3 +1,3 @@ + [build-system] +-requires = ["setuptools>=30.3", "wheel", "setuptools_scm"] ++requires = ["setuptools<42.0", "wheel", "setuptools_scm<6.0.0"] diff --git a/pkgs/patches/pytest/setuptools.patch b/pkgs/patches/pytest/setuptools.patch --- a/pkgs/patches/pytest/setuptools.patch +++ b/pkgs/patches/pytest/setuptools.patch @@ -6,7 +6,7 @@ diff -rup pytest-4.6.5-orig/setup.py pyt setup( use_scm_version={"write_to": "src/_pytest/_version.py"}, - setup_requires=["setuptools-scm", "setuptools>=40.0"], -+ setup_requires=["setuptools-scm", "setuptools<=42.0"], ++ setup_requires=["setuptools-scm<6.0.0", "setuptools<=42.0"], package_dir={"": "src"}, # fmt: off extras_require={ \ No newline at end of file diff --git a/pkgs/patches/zipp/pyproject.patch b/pkgs/patches/zipp/pyproject.patch new file mode 100644 --- /dev/null +++ b/pkgs/patches/zipp/pyproject.patch @@ -0,0 +1,10 @@ +diff -rup zip-1.2.0-orig/pyproject.toml zip-1.2.0/pyproject.toml +--- zip-1.2.0-orig/pyproject.toml 2021-03-23 10:55:37.000000000 +0100 ++++ zip-1.2.0/pyproject.toml 2021-03-23 10:56:05.000000000 +0100 +@@ -1,5 +1,5 @@ + [build-system] +-requires = ["setuptools>=34.4", "wheel", "setuptools_scm>=1.15"] ++requires = ["setuptools<42.0", "wheel", "setuptools_scm<6.0.0"] + build-backend = "setuptools.build_meta" + + [tool.black] diff --git a/pkgs/python-packages-overrides.nix b/pkgs/python-packages-overrides.nix --- a/pkgs/python-packages-overrides.nix +++ b/pkgs/python-packages-overrides.nix @@ -21,9 +21,15 @@ self: super: { ]; }); + "ipython" = super."ipython".override (attrs: { + propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ + self."setuptools-scm" + ]; + }); + "gevent" = super."gevent".override (attrs: { propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ - # NOTE: (marcink) odd requirements from gevent aren't set properly, + # NOTE: (marcink) odd requirements from gevent aren not set properly, # thus we need to inject psutil manually self."psutil" ]; @@ -71,6 +77,48 @@ self: super: { ]; }); + "pytest-runner" = super."pytest-runner".override (attrs: { + propagatedBuildInputs = [ + self."setuptools-scm" + ]; + }); + + "py" = super."py".override (attrs: { + propagatedBuildInputs = [ + self."setuptools-scm" + ]; + }); + + "configparser" = super."configparser".override (attrs: { + patches = [ + ./patches/configparser/pyproject.patch + ]; + propagatedBuildInputs = [ + self."setuptools-scm" + ]; + }); + + "importlib-metadata" = super."importlib-metadata".override (attrs: { + + patches = [ + ./patches/importlib_metadata/pyproject.patch + ]; + + propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ + self."setuptools-scm" + ]; + + }); + + "zipp" = super."zipp".override (attrs: { + patches = [ + ./patches/zipp/pyproject.patch + ]; + propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ + self."setuptools-scm" + ]; + }); + # Avoid that base packages screw up the build process inherit (basePythonPackages) setuptools; diff --git a/pkgs/python-packages.nix b/pkgs/python-packages.nix --- a/pkgs/python-packages.nix +++ b/pkgs/python-packages.nix @@ -784,7 +784,7 @@ self: super: { }; }; "rhodecode-vcsserver" = super.buildPythonPackage { - name = "rhodecode-vcsserver-4.24.1"; + name = "rhodecode-vcsserver-4.25.0"; buildInputs = [ self."pytest" self."py" @@ -886,6 +886,19 @@ self: super: { license = [ pkgs.lib.licenses.mit ]; }; }; + + "setuptools-scm" = super.buildPythonPackage { + name = "setuptools-scm-3.5.0"; + doCheck = false; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/b2/f7/60a645aae001a2e06cf4b8db2fba9d9f36b8fd378f10647e3e218b61b74b/setuptools_scm-3.5.0.tar.gz"; + sha256 = "5bdf21a05792903cafe7ae0c9501182ab52497614fa6b1750d9dbae7b60c1a87"; + }; + meta = { + license = [ pkgs.lib.licenses.psfl ]; + }; + }; + "simplegeneric" = super.buildPythonPackage { name = "simplegeneric-0.8.1"; doCheck = false; diff --git a/vcsserver/VERSION b/vcsserver/VERSION --- a/vcsserver/VERSION +++ b/vcsserver/VERSION @@ -1,1 +1,1 @@ -4.24.1 \ No newline at end of file +4.25.0 \ No newline at end of file diff --git a/vcsserver/svn.py b/vcsserver/svn.py --- a/vcsserver/svn.py +++ b/vcsserver/svn.py @@ -38,6 +38,7 @@ import svn.repos from vcsserver import svn_diff, exceptions, subprocessio, settings from vcsserver.base import RepoFactory, raise_from_original, ArchiveNode, archive_repo from vcsserver.exceptions import NoContentException +from vcsserver.utils import safe_str from vcsserver.vcs_base import RemoteBase log = logging.getLogger(__name__) @@ -483,9 +484,7 @@ class SvnRemote(RemoteBase): if path and os.path.isdir(path): opts['cwd'] = path - safe_call = False - if '_safe' in opts: - safe_call = True + safe_call = opts.pop('_safe', False) svnenv = os.environ.copy() svnenv.update(opts.pop('extra_env', {})) @@ -499,7 +498,7 @@ class SvnRemote(RemoteBase): return ''.join(p), ''.join(p.error) except (EnvironmentError, OSError) as err: if safe_call: - return '', err + return '', safe_str(err).strip() else: cmd = ' '.join(cmd) # human friendly CMD tb_err = ("Couldn't run svn command (%s).\n"