Skip to content

Commit

Permalink
Remove support of python3.10 since urllib3 not supported yet
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed May 31, 2022
1 parent c536639 commit c08ca10
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.8', '3.9']
backend: ['psql_dos']

services:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10
FROM python:3.9

WORKDIR /app

Expand Down
37 changes: 1 addition & 36 deletions aiida_optimade/translators/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,42 +147,7 @@ def _store_attributes_node_extra(self) -> None:
optimade.update(self.new_attributes)
else:
optimade = self.new_attributes
# extras = (
# self._get_unique_node_property("extras")
# if self._get_unique_node_property("extras")
# else {}
# )
# extras[self.EXTRAS_KEY] = optimade

# profile = get_manager().get_profile()

# if profile.storage_backend == "psql_dos":
# # TODO: this can be `set_extra` directly? is there performance issue?
# # from aiida.storage.psql_dos.models.node import DbNode
# LOGGER.debug(f"{self._node.extras}")
# # LOGGER.debug(f"extras: {extras}")

# # self._node.reset_extras(extras)
# node = orm.load_node(self._pk)
# node.set_extra(self.EXTRAS_KEY, optimade)
# LOGGER.debug(f"{self._node.extras}")
# # LOGGER.debug(f"extras: {extras}")

# # with get_manager().get_backend().transaction() as session:
# # session.query(DbNode).filter(DbNode.id == self._pk).update(
# # values={"extras": extras}
# # )

# else:
# raise AiidaError(
# f'Unknown AiiDA backend "{profile.database_backend}" for profile'
# f"{profile}"
# )

LOGGER.debug("Updating Node %s in AiiDA DB!", self._pk)
node = orm.load_node(self._pk)
node.set_extra(self.EXTRAS_KEY, optimade)

# For posterity, this is how to do the same, going through AiiDA's API:
# self._node.set_extra_many(extras)
# self._node.set_extra(self.EXTRAS_KEY, optimade)
node.set_extra(self.EXTRAS_KEY, optimade)
1 change: 0 additions & 1 deletion setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Intended Audience :: Developers",
"Topic :: Database",
"Topic :: Database :: Database Engines/Servers",
Expand Down

0 comments on commit c08ca10

Please sign in to comment.