#31564 closed enhancement (fixed)

update mpmath to 1.2.1

Reported by: Dima Pasechnik Owned by:
Priority: major Milestone: sage-9.4
Component: packages: standard Keywords:
Cc: Matthias Köppe, François Bissey Merged in:
Authors: Dima Pasechnik Reviewers: Isuru Fernando
Report Upstream: Reported upstream. No feedback yet. Work issues:
Branch: f4a6074 (Commits, GitHub, GitLab) Commit: f4a60740a7d6f47ec0cbf609b56d596f41a769f9
Dependencies: Stopgaps:

Status badges

Description (last modified by Dima Pasechnik)

the latest version of mpmath is 1.2.1, the previous update, to 1.1.0, was more than 2 years ago in 23d134cce41, in #26969

Change History (26)

comment:1 Changed 21 months ago by R. Bernstein

mpmath 1.2.1 (not 1.2.0) seems to be the latest mpmath

comment:2 Changed 21 months ago by Dima Pasechnik

Authors: Dima Pasechnik
Branch: u/dimpase/packages/mpmath/v112
Commit: 5d7c935e36b52747caa30c1879cfec11789d0413
Status: newneeds_review

New commits:

5d7c935update mpmath to 1.1.2

comment:3 in reply to:  1 ; Changed 21 months ago by Dima Pasechnik

Replying to gh-rocky:

mpmath 1.2.1 (not 1.2.0) seems to be the latest mpmath

mpmath homepage says 1.2.0

I've openened https://github.com/fredrik-johansson/mpmath/issues/584 to clarify.

comment:4 Changed 21 months ago by Dima Pasechnik

Report Upstream: N/AReported upstream. No feedback yet.

comment:5 Changed 21 months ago by git

Commit: 5d7c935e36b52747caa30c1879cfec11789d041388d43cf69133344b59bb7a546fac2e84391f259a

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

88d43cfupdate mpmath to 1.2.0

comment:6 Changed 21 months ago by Dima Pasechnik

fixed typo in commit message

comment:7 Changed 21 months ago by Dima Pasechnik

Status: needs_reviewneeds_work

hmm, this errors out with

[mpmath-1.2.0] ERROR: Could not find a version that satisfies the requirement setuptools_scm>=1.7.0
[mpmath-1.2.0] ERROR: No matching distribution found for setuptools_scm>=1.7.0

comment:8 Changed 21 months ago by Dima Pasechnik

Cc: Matthias Köppe added

Matthias, any idea what can cause this?

With u/mkoeppe/sagelib__add_setup_cfg__install_requires_ applied, I get a different error

Installing mpmath-1.2.0
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    setuptools.setup(use_scm_version=True)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/_distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/dist.py", line 424, in __init__
    k: v for k, v in attrs.items()
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/_distutils/dist.py", line 293, in __init__
    self.finalize_options()
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/dist.py", line 695, in finalize_options
    ep(self)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/dist.py", line 702, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools_scm/integration.py", line 26, in version_keyword
    dist.metadata.version = _get_version(config)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools_scm/__init__.py", line 173, in _get_version
    parsed_version = _do_parse(config)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools_scm/__init__.py", line 142, in _do_parse
    "use git+https://github.com/user/proj.git#egg=proj" % config.absolute_root
LookupError: setuptools-scm was unable to detect version for '/home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/mpmath-1.2.0/src'.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
Error: could not determine package name
Warning: Failure trying to uninstall a previous version of mpmath-1.2.0
Ignoring indexes: https://pypi.org/simple
Created temporary directory: /home/scratch2/dimpase/tmp/pip-ephem-wheel-cache-a3rlnu1g
Created temporary directory: /home/scratch2/dimpase/tmp/pip-req-tracker-1jcod24o
Initialized build tracking at /home/scratch2/dimpase/tmp/pip-req-tracker-1jcod24o
Created build tracker: /home/scratch2/dimpase/tmp/pip-req-tracker-1jcod24o
Entered build tracker: /home/scratch2/dimpase/tmp/pip-req-tracker-1jcod24o
Created temporary directory: /home/scratch2/dimpase/tmp/pip-wheel-gt6q_58m
Processing /home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/mpmath-1.2.0/src
  Created temporary directory: /home/scratch2/dimpase/tmp/pip-req-build-m_nefw2k
  Added file:///home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/mpmath-1.2.0/src to build tracker '/home/scratch2/dimpase/tmp/pip-req-tracker-1jcod24o'
    Running setup.py (path:/home/scratch2/dimpase/tmp/pip-req-build-m_nefw2k/setup.py) egg_info for package from file:///home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/mpmath-1.2.0/src
    Created temporary directory: /home/scratch2/dimpase/tmp/pip-pip-egg-info-0589o42m
    Running command python setup.py egg_info
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/scratch2/dimpase/tmp/pip-req-build-m_nefw2k/setup.py", line 6, in <module>
        setuptools.setup(use_scm_version=True)
      File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/_distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/dist.py", line 424, in __init__
        k: v for k, v in attrs.items()
      File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/_distutils/dist.py", line 293, in __init__
        self.finalize_options()
      File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/dist.py", line 695, in finalize_options
        ep(self)
      File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools/dist.py", line 702, in _finalize_setup_keywords
        ep.load()(self, ep.name, value)
      File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools_scm/integration.py", line 26, in version_keyword
        dist.metadata.version = _get_version(config)
      File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools_scm/__init__.py", line 173, in _get_version
        parsed_version = _do_parse(config)
      File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/setuptools_scm/__init__.py", line 142, in _do_parse
        "use git+https://github.com/user/proj.git#egg=proj" % config.absolute_root
    LookupError: setuptools-scm was unable to detect version for '/home/scratch2/dimpase/tmp/pip-req-build-m_nefw2k'.

    Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

    For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
WARNING: Discarding file:///home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/mpmath-1.2.0/src. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Exception information:
Traceback (most recent call last):
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/cli/base_command.py", line 189, in _main
    status = self.run(options, args)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/cli/req_command.py", line 178, in wrapper
    return func(self, options, args)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/commands/wheel.py", line 159, in run
    reqs, check_supported_wheels=True
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 101, in resolve
    req, requested_extras=(),
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 316, in make_requirement_from_install_req
    raise self._build_failures[ireq.link]
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 169, in _make_candidate_from_link
    name=name, version=version,
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 306, in __init__
    version=version,
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 144, in __init__
    self.dist = self._prepare()
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 226, in _prepare
    dist = self._prepare_distribution()
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 312, in _prepare_distribution
    self._ireq, parallel_builds=True,
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/operations/prepare.py", line 457, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/operations/prepare.py", line 501, in _prepare_linked_requirement
    req, self.req_tracker, self.finder, self.build_isolation,
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/operations/prepare.py", line 66, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/distributions/sdist.py", line 41, in prepare_distribution_metadata
    self.req.prepare_metadata()
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/req/req_install.py", line 549, in prepare_metadata
    self.metadata_directory = self._generate_metadata()
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/req/req_install.py", line 529, in _generate_metadata
    details=self.name or f"from {self.link}"
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 73, in generate_metadata
    command_desc='python setup.py egg_info',
  File "/home/scratch2/dimpase/sage/sage/local/lib64/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 258, in call_subprocess
    raise InstallationSubprocessError(proc.returncode, command_desc)
pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Removed file:///home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/mpmath-1.2.0/src from build tracker '/home/scratch2/dimpase/tmp/pip-req-tracker-1jcod24o'
Removed build tracker: '/home/scratch2/dimpase/tmp/pip-req-tracker-1jcod24o'
********************************************************************************************************************************************************************************************************************************************************************************************
Error building a wheel for mpmath-1.2.0

comment:9 Changed 21 months ago by git

Commit: 88d43cf69133344b59bb7a546fac2e84391f259aed5289033e26b2f06a3afe9c548a4ee5ed3aceed

Branch pushed to git repo; I updated commit sha1. New commits:

ed52890disable scm use by setuptools

comment:10 Changed 21 months ago by Dima Pasechnik

Status: needs_workneeds_review

OK, so this is an upstream bug, fixed by the latest commit.

comment:12 in reply to:  3 Changed 21 months ago by Matthias Köppe

Replying to dimpase:

Replying to gh-rocky:

mpmath 1.2.1 (not 1.2.0) seems to be the latest mpmath

mpmath homepage says 1.2.0

I've openened https://github.com/fredrik-johansson/mpmath/issues/584 to clarify.

Generally I think the releases on PyPI should be taken as authoritative. After all, they are what Python users get when they use pip.

comment:13 Changed 21 months ago by Matthias Köppe

Status: needs_reviewneeds_info

comment:14 Changed 21 months ago by Matthias Köppe

Also please expand the description. What is the purpose of the update? Does it address the issues raised in #25445? Or is it preparation for that?

comment:15 in reply to:  14 Changed 21 months ago by R. Bernstein

Replying to mkoeppe:

Also please expand the description. What is the purpose of the update? Does it address the issues raised in #25445? Or is it preparation for that?

Don't take this as authoritative, but based on the experience in https://github.com/mathics/Mathics/issues/1169#issuecomment-806532433 mpmath 1.2.x may be necessary. (Or it that seemed to be the case for mpmath on the Fedora distribution.)

But I also suspect it is not sufficient because mpmath has code, which seems to go back for a long time, that special cases when the "backend" is sage.

Last edited 21 months ago by R. Bernstein (previous) (diff)

comment:16 Changed 21 months ago by François Bissey

Cc: François Bissey added

comment:17 Changed 21 months ago by R. Bernstein

Cc: François Bissey removed
Summary: update mpmath to 1.2.0update mpmath to 1.2.1

comment:18 Changed 21 months ago by R. Bernstein

For what it is worth the differences between 1.2.0 and 1.2.1 are administrative and packaging rather than code or functional changes.

See https://github.com/fredrik-johansson/mpmath/compare/1.2.0...1.2.1 for the changes.

comment:19 Changed 21 months ago by Dima Pasechnik

Cc: François Bissey added

attention shoud be paid to updating just updated ticket, it can revert edits.

comment:20 in reply to:  18 Changed 21 months ago by Dima Pasechnik

Replying to gh-rocky:

For what it is worth the differences between 1.2.0 and 1.2.1 are administrative and packaging rather than code or functional changes.

See https://github.com/fredrik-johansson/mpmath/compare/1.2.0...1.2.1 for the changes.

perhaps it removed the need for ​the patch in ed52890.

comment:21 Changed 21 months ago by git

Commit: ed5289033e26b2f06a3afe9c548a4ee5ed3aceedf4a60740a7d6f47ec0cbf609b56d596f41a769f9

Branch pushed to git repo; I updated commit sha1. New commits:

f4a6074update mpmath to 1.2.1

comment:22 Changed 21 months ago by Dima Pasechnik

OK, 1.2.1 at least fixes the setuptools bug I had to patch for 1.2.0.

comment:23 Changed 21 months ago by Dima Pasechnik

Description: modified (diff)
Status: needs_infoneeds_review

comment:24 Changed 20 months ago by Matthias Köppe

Milestone: sage-9.3sage-9.4

comment:25 Changed 18 months ago by Isuru Fernando

Reviewers: Isuru Fernando
Status: needs_reviewpositive_review

comment:26 Changed 18 months ago by Volker Braun

Branch: u/dimpase/packages/mpmath/v112f4a60740a7d6f47ec0cbf609b56d596f41a769f9
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.