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

Commit

Permalink
Deprecation warning for Uproot, too.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpivarski committed Jul 20, 2020
1 parent 634667f commit e0fbe75
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
19 changes: 19 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
:alt: uproot
:target: http://uproot.readthedocs.io/en/latest/

This is a deprecated version of Uproot
======================================

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,

.. code-block:: bash
pip install uproot # old
pip install uproot4 # new
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

.. code-block:: bash
pip install uproot # new
pip install uproot3 # old
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.)

uproot
======

Expand Down
15 changes: 15 additions & 0 deletions uproot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,21 @@

from __future__ import absolute_import

import warnings
warnings.warn(
"""Consider switching from 'uproot' to 'uproot4', since the new interface will become the default later this year (2020).
pip install -U uproot4
In Python:
>>> import uproot4
>>> with uproot4.open(...) as file:
...
""",
DeprecationWarning
)

# high-level entry points
from uproot.rootio import open, xrootd, http
from uproot.tree import iterate, numentries, lazyarray, lazyarrays, daskarray, daskframe
Expand Down
2 changes: 1 addition & 1 deletion uproot/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import re

__version__ = "3.11.7"
__version__ = "3.12.0"
version = __version__
version_info = tuple(re.split(r"[-\.]", __version__))

Expand Down

0 comments on commit e0fbe75

Please sign in to comment.