Skip to content

Commit

Permalink
Remove old .other package which I have no intentions of supporting in…
Browse files Browse the repository at this point in the history
… pypi
  • Loading branch information
scasagrande committed Apr 15, 2016
1 parent 8fe3195 commit 6170523
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 47 deletions.
25 changes: 0 additions & 25 deletions instruments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
from . import units
from .config import load_instruments

# Replace instruments.other with a deprecation warning.
import instruments.other as _other

# VERSION METADATA ###########################################################
# In keeping with PEP-396, we define a version number of the form
# {major}.{minor}[.{postrelease}]{prerelease-tag}
Expand All @@ -50,25 +47,3 @@

__license__ = "AGPLv3"
__copyright__ = "Copyright (c) 2012-2016 Steven Casagrande"


class _Other(object):

def __getattr__(self, name):
import warnings
attr = getattr(_other, name)

msg = (
"The instruments.other package is deprecated. "
"Please use the {} package instead.".format(
".".join(attr.__module__.split(".")[:2])
)
)

# This really should be a DeprecationWarning, except those are silenced
# by default. Why?
warnings.warn(msg, UserWarning)

return attr

other = _Other()
20 changes: 0 additions & 20 deletions instruments/other/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion instruments/oxford/oxforditc503.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def sensor(self):
For instance, this would query the temperature of the first sensor::
>>> itc = ik.other.OxfordITC503.open_gpibusb('/dev/ttyUSB0', 1)
>>> itc = ik.oxford.OxfordITC503.open_gpibusb('/dev/ttyUSB0', 1)
>>> print(itc.sensor[0].temperature)
:type: `OxfordITC503.Sensor`
Expand Down
2 changes: 1 addition & 1 deletion instruments/yokogawa/yokogawa7651.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def channel(self):
This (single) channel is accessed as a list in the following manner::
>>> import instruments as ik
>>> yoko = ik.other.Yokogawa7651.open_gpibusb('/dev/ttyUSB0', 10)
>>> yoko = ik.yokogawa.Yokogawa7651.open_gpibusb('/dev/ttyUSB0', 10)
>>> yoko.channel[0].voltage = 1 # Sets output voltage to 1V
:rtype: `~Yokogawa7651.Channel`
Expand Down

0 comments on commit 6170523

Please sign in to comment.