Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

Commit e0fbe75

Browse files
committed
Deprecation warning for Uproot, too.
1 parent 634667f commit e0fbe75

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

README.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22
:alt: uproot
33
:target: http://uproot.readthedocs.io/en/latest/
44

5+
This is a deprecated version of Uproot
6+
======================================
7+
8+
See `scikit-hep/uproot4 <https://github.com/scikit-hep/uproot4>`__ for the latest version of Uproot. Old and new versions are available as separate packages,
9+
10+
.. code-block:: bash
11+
12+
pip install uproot # old
13+
pip install uproot4 # new
14+
15+
because the interface has changed. Later this year, "Uproot 4" will simply become the `uproot` package with version number 4.0. Then the two packages will shift to
16+
17+
.. code-block:: bash
18+
19+
pip install uproot # new
20+
pip install uproot3 # old
21+
22+
You can adopt the new library gradually by importing both in Python, switching to the old version as a contingency (missing feature or bug in the new version). Note that Uproot 3 returns old-style `Awkward 0 <https://github.com/scikit-hep/awkward-array#readme>`__ arrays and Uproot 4 returns new-style `Awkward 1 <https://github.com/scikit-hep/awkward-1.0#readme>`__ arrays. (The new version of Uproot was motivated by the new version of Awkward, to make a clear distinction.)
23+
524
uproot
625
======
726

uproot/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,21 @@
123123

124124
from __future__ import absolute_import
125125

126+
import warnings
127+
warnings.warn(
128+
"""Consider switching from 'uproot' to 'uproot4', since the new interface will become the default later this year (2020).
129+
130+
pip install -U uproot4
131+
132+
In Python:
133+
134+
>>> import uproot4
135+
>>> with uproot4.open(...) as file:
136+
...
137+
""",
138+
DeprecationWarning
139+
)
140+
126141
# high-level entry points
127142
from uproot.rootio import open, xrootd, http
128143
from uproot.tree import iterate, numentries, lazyarray, lazyarrays, daskarray, daskframe

uproot/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import re
88

9-
__version__ = "3.11.7"
9+
__version__ = "3.12.0"
1010
version = __version__
1111
version_info = tuple(re.split(r"[-\.]", __version__))
1212

0 commit comments

Comments
 (0)