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

Commit

Permalink
Merge pull request #174 from scikit-hep/issue171
Browse files Browse the repository at this point in the history
Removed explicit localsource
  • Loading branch information
jpivarski authored Oct 29, 2018
2 parents a27dcf1 + b98c348 commit 2ff2e99
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions uproot/rootio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ def __str__(self):
return self.decode("utf-8", "replace")

class TNamed(TObject):
_fields = ["_fName", "_fTitle"]
_fields = ["fName", "fTitle"]

@classmethod
def _recarray(cls):
Expand Down Expand Up @@ -1296,16 +1296,16 @@ class TArrayD(TArray):
# I'm also reasonably certain that the last byte is the fIOBits data.
# That leaves 4 bytes unaccounted for.
class ROOT_3a3a_TIOFeatures(ROOTStreamedObject):
_fields = [u'fIOBits']
_classname = b'ROOT::TIOFeatures'
_fields = ["fIOBits"]
_classname = b"ROOT::TIOFeatures"
@classmethod
def _readinto(cls, self, source, cursor, context, parent):
start, cnt, self._classversion = _startcheck(source, cursor)
cursor.skip(4)
self._fIOBits = cursor.field(source, ROOT_3a3a_TIOFeatures._format1)
_endcheck(start, cursor, cnt)
return self
_format1 = struct.Struct('>B')
_format1 = struct.Struct(">B")

class Undefined(ROOTStreamedObject):
_classname = None
Expand Down
4 changes: 1 addition & 3 deletions uproot/source/memmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ class MemmapSource(uproot.source.source.Source):
# makes __doc__ attribute mutable before Python 3.3
__metaclass__ = type.__new__(type, "type", (uproot.source.source.Source.__metaclass__,), {})

@staticmethod
def defaults(path):
return MemmapSource(path)
defaults = {}

def __init__(self, path):
self.path = os.path.expanduser(path)
Expand Down
2 changes: 1 addition & 1 deletion uproot/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import re

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

Expand Down
2 changes: 1 addition & 1 deletion uproot/write/TFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __delitem__(self, where):
raise KeyError("ROOT directory does not contain key {0}".format(where))

def _reopen(self):
return uproot.open(self._path, localsource=uproot.source.file.FileSource.defaults)
return uproot.open(self._path, localsource=lambda path: uproot.source.file.FileSource(path, **uproot.source.file.FileSource.defaults))

@property
def compression(self):
Expand Down

0 comments on commit 2ff2e99

Please sign in to comment.