Skip to content

Commit

Permalink
better handling of pickle5 backport (#1566)
Browse files Browse the repository at this point in the history
* better handling of pickle5 backport

* blackify

* move pickle5 to I/O section

* remove duplicated dep
  • Loading branch information
epassaro authored May 12, 2021
1 parent 92b7e1d commit 6e31dc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions tardis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
logging.getLogger("py.warnings").addHandler(console_handler)

# ----------------------------------------------------------------------------
import pickle5
# pyne holds Python 3.7 on macOS, but refdata is pickled with protocol 5 (3.8)

sys.modules["pickle"] = pickle5
if sys.version_info < (3, 8):
import pickle5

sys.modules["pickle"] = pickle5
5 changes: 2 additions & 3 deletions tardis_env3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies:
- tqdm
- beautifulsoup4
- lxml
- pickle5

# Analysis
- jupyter
Expand All @@ -44,7 +45,7 @@ dependencies:
- sphinx
- nbconvert
- numpydoc
- docutils>=0.16,<0.17
- docutils=0.16
- nbformat
- nbsphinx
- sphinx_bootstrap_theme
Expand All @@ -59,7 +60,6 @@ dependencies:
- pytest-html
- pytest-cov
- coverage
- requests
- docopt

# Code quality
Expand All @@ -75,4 +75,3 @@ dependencies:
- dot2tex
- sphinx-jsonschema
- git+https://github.com/Naereen/dot2tex.git
- pickle5

0 comments on commit 6e31dc4

Please sign in to comment.