#76 Unable to build using Python 3.7.0

Closed
opened 5 months ago by jbravo · 7 comments
jbravo commented 5 months ago

Running pip install borgmatic on Python 3.7.0 fails to build due to an issue with the ruamel.yaml package, which is pinned at <0.15. This was raised with the project as issue #207 and they recommended testing against a newer version of the package, despite their guidance that production software should use <0.15.

I don’t have time to test this right now, but it would be good to get this fixed soon as Python 3.7.0 is now the default version of Python installed by Homebrew.

Running `pip install borgmatic` on Python 3.7.0 fails to build due to an issue with the ruamel.yaml package, which is pinned at <0.15. This was raised with the project as issue [#207](https://bitbucket.org/ruamel/yaml/issues/207/0412-fails-to-install-with-python-37#comment-46744248) and they recommended testing against a newer version of the package, despite their guidance that production software should use <0.15. I don't have time to test this right now, but it would be good to get this fixed soon as Python 3.7.0 is now the [default version of Python installed by Homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb#L4).
witten commented 5 months ago
Owner

Thanks for reporting this. Sounds like #38 may be the solution? What’s the issue you’re seeing with the pinned ruamel.yaml?

Thanks for reporting this. Sounds like #38 may be the solution? What's the issue you're seeing with the pinned `ruamel.yaml`?
jbravo commented 5 months ago
Poster

Yup, #38 would appear to be the solution.

Here’s the output from the build:

$ pip3 --version
pip 10.0.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)

$ pip3 install borgmatic
Collecting borgmatic
  Using cached https://files.pythonhosted.org/packages/77/92/1017f40877b10b64a02130c3052ad40685179853cd1b28d302ac64f071ff/borgmatic-1.2.0-py3-none-any.whl
Collecting ruamel.yaml<=0.15 (from borgmatic)
  Using cached https://files.pythonhosted.org/packages/10/aa/f31c8a858e23fe5b14c59e6a03ae80b4cb76353c184df48a582a55eb2674/ruamel.yaml-0.15.0.tar.gz
    Complete output from command python setup.py egg_info:
    /var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/tmp_ruamel_0dorq8vr/test_ruamel_yaml.c:6:8: warning: explicitly assigning value of variable of type 'yaml_parser_t' (aka 'struct yaml_parser_s') to itself [-Wself-assign]
    parser = parser;  /* prevent warning */
    ~~~~~~ ^ ~~~~~~
    /var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/tmp_ruamel_0dorq8vr/test_ruamel_yaml.c:6:10: warning: variable 'parser' is uninitialized when used here [-Wuninitialized]
    parser = parser;  /* prevent warning */
             ^~~~~~
    /var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/tmp_ruamel_0dorq8vr/test_ruamel_yaml.c:5:1: note: variable 'parser' is declared here
    yaml_parser_t parser;
    ^
    2 warnings generated.
    Warning: 'keywords' should be a list, got type 'NoneType'
    sys.argv ['-c', 'egg_info', '--egg-base', 'pip-egg-info']
    test compiling test_ruamel_yaml
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/pip-install-j2yu8bz8/ruamel.yaml/setup.py", line 858, in <module>
        main()
      File "/private/var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/pip-install-j2yu8bz8/ruamel.yaml/setup.py", line 847, in main
        setup(**kw)
      File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 370, in __init__
        k: v for k, v in attrs.items()
      File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 267, in __init__
        getattr(self.metadata, "set_" + key)(val)
      File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 1203, in set_keywords
        self.keywords = _ensure_list(value, 'keywords')
      File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 40, in _ensure_list
        value = list(value)
    TypeError: 'NoneType' object is not iterable

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/pip-install-j2yu8bz8/ruamel.yaml/
Yup, https://projects.torsion.org/witten/borgmatic/issues/38 would appear to be the solution. Here's the output from the build: ``` $ pip3 --version pip 10.0.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7) $ pip3 install borgmatic Collecting borgmatic Using cached https://files.pythonhosted.org/packages/77/92/1017f40877b10b64a02130c3052ad40685179853cd1b28d302ac64f071ff/borgmatic-1.2.0-py3-none-any.whl Collecting ruamel.yaml<=0.15 (from borgmatic) Using cached https://files.pythonhosted.org/packages/10/aa/f31c8a858e23fe5b14c59e6a03ae80b4cb76353c184df48a582a55eb2674/ruamel.yaml-0.15.0.tar.gz Complete output from command python setup.py egg_info: /var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/tmp_ruamel_0dorq8vr/test_ruamel_yaml.c:6:8: warning: explicitly assigning value of variable of type 'yaml_parser_t' (aka 'struct yaml_parser_s') to itself [-Wself-assign] parser = parser; /* prevent warning */ ~~~~~~ ^ ~~~~~~ /var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/tmp_ruamel_0dorq8vr/test_ruamel_yaml.c:6:10: warning: variable 'parser' is uninitialized when used here [-Wuninitialized] parser = parser; /* prevent warning */ ^~~~~~ /var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/tmp_ruamel_0dorq8vr/test_ruamel_yaml.c:5:1: note: variable 'parser' is declared here yaml_parser_t parser; ^ 2 warnings generated. Warning: 'keywords' should be a list, got type 'NoneType' sys.argv ['-c', 'egg_info', '--egg-base', 'pip-egg-info'] test compiling test_ruamel_yaml Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/pip-install-j2yu8bz8/ruamel.yaml/setup.py", line 858, in <module> main() File "/private/var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/pip-install-j2yu8bz8/ruamel.yaml/setup.py", line 847, in main setup(**kw) File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 108, in setup _setup_distribution = dist = klass(attrs) File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 370, in __init__ k: v for k, v in attrs.items() File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 267, in __init__ getattr(self.metadata, "set_" + key)(val) File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 1203, in set_keywords self.keywords = _ensure_list(value, 'keywords') File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 40, in _ensure_list value = list(value) TypeError: 'NoneType' object is not iterable ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/tb/0fy391z92lz8tr0dc473wmlm0000gn/T/pip-install-j2yu8bz8/ruamel.yaml/ ```
witten added the
bug
label 4 months ago
witten commented 4 months ago
Owner

I was able to reproduce traceback this within the python:3.7 Docker image.

I was able to reproduce traceback this within the `python:3.7` Docker image.
witten commented 4 months ago
Owner

Just fixed in master. The fix will go out in the next release.

Just fixed in master. The fix will go out in the next release.
jbravo commented 4 months ago
Poster

Thanks for this. Would be great if you could cut a new release soon :smile:

Thanks for this. Would be great if you could cut a new release soon :smile:
witten commented 4 months ago
Owner

Just released in borgmatic 1.2.1! Enjoy.

Just released in borgmatic 1.2.1! Enjoy.
jbravo commented 4 months ago
Poster

Awesome. Thanks 👍

Awesome. Thanks 👍
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.