Skip to content

Commit

Permalink
Update to Python >= 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanElsner committed Oct 11, 2023
1 parent 7bf4227 commit ef260c6
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ These libraries are distributed on PyPI, the packages are:
* `dm_robotics-moma`
* `dm_robotics-controllers`

Python versions 3.7, 3.8, 3.9 and 3.10 are supported.
Python versions 3.8, 3.9, 3.10, and 3.11 are supported.

## Dependencies
`MoMa`, `Manipulation` and `Controllers` depend on MuJoCo, the other packages do not.
Expand All @@ -38,7 +38,7 @@ To build and test the libraries, run `build.sh`. This script assumes:
* MuJoCo is installed.
* [`dm_control`](https://github.com/deepmind/dm_control) is installed.
* cmake version >= 3.20.2 is installed.
* Python 3.7, 3.8, 3.9 or 3.10 and system headers are installed.
* Python 3.8, 3.9, 3.10 or 3.11 and system headers are installed.
* GCC version 9 or later is installed.
* numpy is installed.

Expand Down
2 changes: 0 additions & 2 deletions cpp/mujoco/include/dm_robotics/mujoco/mjlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,6 @@ class MjLib {
MjLib(const std::string& libmujoco_path, int dlopen_flags);
~MjLib();

MjActivateFunc* const mj_activate; // NOLINT
MjDeactivateFunc* const mj_deactivate; // NOLINT
MjDefaultVFSFunc* const mj_defaultVFS; // NOLINT
MjAddFileVFSFunc* const mj_addFileVFS; // NOLINT
MjMakeEmptyFileVFSFunc* const mj_makeEmptyFileVFS; // NOLINT
Expand Down
2 changes: 0 additions & 2 deletions cpp/mujoco/src/mjlib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ struct MjLib::Impl {

MjLib::MjLib(const std::string& libmujoco_path, int dlopen_flags)
: pimpl_(absl::make_unique<Impl>(libmujoco_path, dlopen_flags)),
INIT_WITH_DLSYM(mj_activate),
INIT_WITH_DLSYM(mj_deactivate),
INIT_WITH_DLSYM(mj_defaultVFS),
INIT_WITH_DLSYM(mj_addFileVFS),
INIT_WITH_DLSYM(mj_makeEmptyFileVFS),
Expand Down
2 changes: 1 addition & 1 deletion cpp/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _parse_line(s):
long_description=open("controllers_py/README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/deepmind/dm_robotics/tree/main/cpp/controllers_py",
python_requires=">=3.7, <3.11",
python_requires=">=3.8",
setup_requires=["wheel >= 0.31.0"],
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down
3 changes: 2 additions & 1 deletion py/agentflow/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def _parse_line(s):
"dm_robotics.agentflow",
"dm_robotics.agentflow.loggers",
"dm_robotics.agentflow.meta_options.control_flow",
"dm_robotics.agentflow.meta_options.control_flow.examples",
"dm_robotics.agentflow.options",
"dm_robotics.agentflow.preprocessors",
"dm_robotics.agentflow.rendering",
Expand All @@ -59,7 +60,7 @@ def _parse_line(s):
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/deepmind/dm_robotics/tree/main/py/agentflow",
python_requires=">=3.7, <3.11",
python_requires=">=3.8",
setup_requires=["wheel >= 0.31.0"],
install_requires=(_get_requirements("requirements.txt") +
_get_requirements("requirements_external.txt")),
Expand Down
11 changes: 9 additions & 2 deletions py/geometry/geometry_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import itertools
import operator
import sys

from absl.testing import absltest
from absl.testing import parameterized
Expand Down Expand Up @@ -242,11 +243,17 @@ def test_pose_property_cannot_set(self):
pose = geometry.Pose(list(range(3)), list(range(4)))
with self.assertRaises(AttributeError) as expected:
pose.position = list(range(10, 13, 1))
self.assertIn('can\'t set attribute', str(expected.exception))
if sys.version_info < (3, 11):
self.assertIn('can\'t set attribute', str(expected.exception))
else:
self.assertIn('object has no setter', str(expected.exception))

with self.assertRaises(AttributeError) as expected:
pose.quaternion = list(range(10, 14, 1))
self.assertIn('can\'t set attribute', str(expected.exception))
if sys.version_info < (3, 11):
self.assertIn('can\'t set attribute', str(expected.exception))
else:
self.assertIn('object has no setter', str(expected.exception))

def test_pose_property_cannot_setitem(self):
pose = geometry.Pose(list(range(3)), list(range(4)))
Expand Down
2 changes: 1 addition & 1 deletion py/geometry/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _parse_line(s):
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/deepmind/dm_robotics/tree/main/py/geometry",
python_requires=">=3.7, <3.11",
python_requires=">=3.8",
setup_requires=["wheel >= 0.31.0"],
install_requires=(_get_requirements("requirements.txt") +
_get_requirements("requirements_external.txt")),
Expand Down
2 changes: 1 addition & 1 deletion py/manipulation/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _parse_line(s):
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/deepmind/dm_robotics/tree/main/py/manipulation",
python_requires=">=3.7, <3.11",
python_requires=">=3.8",
setup_requires=["wheel >= 0.31.0"],
install_requires=(_get_requirements("requirements.txt") +
_get_requirements("requirements_external.txt")),
Expand Down
2 changes: 1 addition & 1 deletion py/moma/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _parse_line(s):
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/deepmind/dm_robotics/tree/main/py/moma",
python_requires=">=3.7, <3.11",
python_requires=">=3.8",
setup_requires=["wheel >= 0.31.0"],
install_requires=(_get_requirements("requirements.txt") +
_get_requirements("requirements_external.txt")),
Expand Down

0 comments on commit ef260c6

Please sign in to comment.