Skip to content

Commit 8a06262

Browse files
fix: Use uproot3 namespace for patch release v0.5.4
* Install uproot3 in xmlio extra * import uproot3 as uproot
1 parent 1e3f729 commit 8a06262

File tree

5 files changed

+20
-23
lines changed

5 files changed

+20
-23
lines changed

setup.py

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
],
99
'torch': ['torch~=1.2'],
1010
'jax': ['jax~=0.2.4', 'jaxlib~=0.1.56'],
11-
'xmlio': ['uproot~=3.6'], # Future proof against uproot4 API changes
12-
'minuit': ['iminuit~=1.4.3'], # v1.5.0 breaks pyhf for 32b TensorFlow and PyTorch
11+
'xmlio': ['uproot3~=3.14'], # Future proof against uproot4 API changes
12+
'minuit': ['iminuit~=1.5.3'],
1313
}
1414
extras_require['backends'] = sorted(
1515
set(
@@ -19,8 +19,8 @@
1919
+ extras_require['minuit']
2020
)
2121
)
22-
extras_require['contrib'] = sorted(set(['matplotlib', 'requests']))
23-
extras_require['lint'] = sorted(set(['pyflakes', 'black']))
22+
extras_require['contrib'] = sorted({'matplotlib', 'requests'})
23+
extras_require['lint'] = sorted({'flake8', 'black'})
2424

2525
extras_require['test'] = sorted(
2626
set(
@@ -40,25 +40,22 @@
4040
'papermill~=2.0',
4141
'nteract-scrapbook~=0.2',
4242
'jupyter',
43-
'uproot~=3.3',
4443
'graphviz',
4544
'jsonpatch',
4645
]
4746
)
4847
)
4948
extras_require['docs'] = sorted(
50-
set(
51-
[
52-
'sphinx>=3.1.2',
53-
'sphinxcontrib-bibtex',
54-
'sphinx-click',
55-
'sphinx_rtd_theme',
56-
'nbsphinx',
57-
'ipywidgets',
58-
'sphinx-issues',
59-
'sphinx-copybutton>0.2.9',
60-
]
61-
)
49+
{
50+
'sphinx>=3.1.2',
51+
'sphinxcontrib-bibtex',
52+
'sphinx-click',
53+
'sphinx_rtd_theme',
54+
'nbsphinx',
55+
'ipywidgets',
56+
'sphinx-issues',
57+
'sphinx-copybutton>0.2.9',
58+
}
6259
)
6360
extras_require['develop'] = sorted(
6461
set(

src/pyhf/cli/rootio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def cli():
3232
def xml2json(entrypoint_xml, basedir, output_file, track_progress):
3333
"""Entrypoint XML: The top-level XML file for the PDF definition."""
3434
try:
35-
import uproot
35+
import uproot3 as uproot
3636

3737
assert uproot
3838
except ImportError:
@@ -61,7 +61,7 @@ def xml2json(entrypoint_xml, basedir, output_file, track_progress):
6161
def json2xml(workspace, output_dir, specroot, dataroot, resultprefix, patch):
6262
"""Convert pyhf JSON back to XML + ROOT files."""
6363
try:
64-
import uproot
64+
import uproot3 as uproot
6565

6666
assert uproot
6767
except ImportError:

src/pyhf/readxml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import xml.etree.ElementTree as ET
77
import numpy as np
88
import tqdm
9-
import uproot
9+
import uproot3 as uproot
1010
import re
1111

1212
log = logging.getLogger(__name__)

src/pyhf/writexml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import pkg_resources
66
import xml.etree.cElementTree as ET
77
import numpy as np
8-
import uproot
9-
from uproot_methods.classes import TH1
8+
import uproot3 as uproot
9+
from uproot3_methods.classes import TH1
1010

1111
from .mixins import _ChannelSummaryMixin
1212

tests/test_import.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pyhf
22
import pyhf.readxml
33
import numpy as np
4-
import uproot
4+
import uproot3 as uproot
55
from pathlib import Path
66
import pytest
77
import xml.etree.cElementTree as ET

0 commit comments

Comments
 (0)