pygeodesy 25.4.25__py2.py3-none-any.whl → 25.5.25__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pygeodesy/__init__.py +191 -189
- pygeodesy/__main__.py +2 -2
- pygeodesy/albers.py +4 -4
- pygeodesy/auxilats/_CX_Rs.py +3 -3
- pygeodesy/auxilats/auxAngle.py +2 -2
- pygeodesy/auxilats/auxDLat.py +2 -2
- pygeodesy/auxilats/auxDST.py +2 -2
- pygeodesy/auxilats/auxLat.py +2 -2
- pygeodesy/auxilats/auxily.py +2 -2
- pygeodesy/azimuthal.py +2 -2
- pygeodesy/basics.py +1 -1
- pygeodesy/booleans.py +8 -8
- pygeodesy/cartesianBase.py +7 -6
- pygeodesy/clipy.py +2 -2
- pygeodesy/constants.py +2 -2
- pygeodesy/datums.py +2 -2
- pygeodesy/deprecated/__init__.py +8 -8
- pygeodesy/deprecated/bases.py +2 -2
- pygeodesy/deprecated/rhumbBase.py +2 -2
- pygeodesy/deprecated/rhumbaux.py +2 -2
- pygeodesy/deprecated/rhumbsolve.py +2 -2
- pygeodesy/deprecated/rhumbx.py +2 -2
- pygeodesy/ecef.py +15 -26
- pygeodesy/ecefLocals.py +186 -0
- pygeodesy/ellipsoidalBase.py +2 -2
- pygeodesy/ellipsoidalBaseDI.py +7 -6
- pygeodesy/ellipsoidalExact.py +3 -3
- pygeodesy/ellipsoidalNvector.py +4 -4
- pygeodesy/ellipsoidalVincenty.py +15 -14
- pygeodesy/ellipsoids.py +23 -30
- pygeodesy/elliptic.py +2 -2
- pygeodesy/errors.py +1 -1
- pygeodesy/etm.py +2 -2
- pygeodesy/fmath.py +28 -13
- pygeodesy/formy.py +2 -2
- pygeodesy/frechet.py +5 -5
- pygeodesy/fstats.py +2 -2
- pygeodesy/fsums.py +38 -29
- pygeodesy/gars.py +2 -3
- pygeodesy/geodesici.py +4 -4
- pygeodesy/geodesicx/__init__.py +3 -3
- pygeodesy/geodesicx/gx.py +2 -2
- pygeodesy/geodesicx/gxarea.py +2 -2
- pygeodesy/geodesicx/gxline.py +2 -2
- pygeodesy/geoids.py +5 -5
- pygeodesy/hausdorff.py +4 -4
- pygeodesy/heights.py +2 -2
- pygeodesy/iters.py +1 -1
- pygeodesy/karney.py +2 -2
- pygeodesy/ktm.py +2 -2
- pygeodesy/latlonBase.py +10 -8
- pygeodesy/lazily.py +46 -22
- pygeodesy/lcc.py +2 -2
- pygeodesy/ltp.py +54 -57
- pygeodesy/ltpTuples.py +34 -35
- pygeodesy/mgrs.py +3 -3
- pygeodesy/named.py +2 -147
- pygeodesy/namedTuples.py +3 -3
- pygeodesy/nvectorBase.py +2 -2
- pygeodesy/osgr.py +2 -2
- pygeodesy/points.py +2 -3
- pygeodesy/props.py +16 -16
- pygeodesy/resections.py +90 -82
- pygeodesy/rhumb/aux_.py +2 -2
- pygeodesy/rhumb/bases.py +3 -3
- pygeodesy/rhumb/ekx.py +3 -4
- pygeodesy/rhumb/solve.py +2 -2
- pygeodesy/simplify.py +2 -2
- pygeodesy/solveBase.py +2 -2
- pygeodesy/sphericalBase.py +6 -6
- pygeodesy/sphericalNvector.py +2 -2
- pygeodesy/sphericalTrigonometry.py +6 -5
- pygeodesy/trf.py +4 -4
- pygeodesy/triaxials.py +2 -2
- pygeodesy/units.py +7 -8
- pygeodesy/utily.py +2 -2
- pygeodesy/utmupsBase.py +55 -33
- pygeodesy/vector2d.py +16 -10
- pygeodesy/vector3d.py +3 -3
- pygeodesy/webmercator.py +2 -2
- {pygeodesy-25.4.25.dist-info → pygeodesy-25.5.25.dist-info}/METADATA +20 -19
- pygeodesy-25.5.25.dist-info/RECORD +119 -0
- pygeodesy-25.4.25.dist-info/RECORD +0 -118
- {pygeodesy-25.4.25.dist-info → pygeodesy-25.5.25.dist-info}/WHEEL +0 -0
- {pygeodesy-25.4.25.dist-info → pygeodesy-25.5.25.dist-info}/top_level.txt +0 -0
pygeodesy/named.py
CHANGED
|
@@ -28,16 +28,14 @@ from pygeodesy.interns import MISSING, NN, _AT_, _COLON_, _COLONSPACE_, _COMMA_,
|
|
|
28
28
|
_EQUAL_, _exists_, _immutable_, _name_, _NL_, _NN_, \
|
|
29
29
|
_no_, _other_, _s_, _SPACE_, _std_, _UNDER_, _vs_
|
|
30
30
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
|
|
31
|
-
# from pygeodesy.ltp import Ltp, _toLocal, _toLtp # _MODS
|
|
32
|
-
# from pygeodesy.ltpTuples import Aer, Enu, Ned # _MODS
|
|
33
31
|
from pygeodesy.props import _allPropertiesOf_n, deprecated_method, _hasProperty, \
|
|
34
32
|
_update_all, property_doc_, Property_RO, property_RO, \
|
|
35
|
-
_update_attrs
|
|
33
|
+
_update_attrs
|
|
36
34
|
from pygeodesy.streprs import attrs, Fmt, lrstrip, pairs, reprs, unstr
|
|
37
35
|
# from pygeodesy.units import _toUnit # _MODS
|
|
38
36
|
|
|
39
37
|
__all__ = _ALL_LAZY.named
|
|
40
|
-
__version__ = '25.04.
|
|
38
|
+
__version__ = '25.04.28'
|
|
41
39
|
|
|
42
40
|
_COMMANL_ = _COMMA_ + _NL_
|
|
43
41
|
_COMMASPACEDOT_ = _COMMASPACE_ + _DOT_
|
|
@@ -915,148 +913,6 @@ class _NamedEnumItem(_NamedBase):
|
|
|
915
913
|
raise _AssertionError(t)
|
|
916
914
|
|
|
917
915
|
|
|
918
|
-
class _NamedLocal(object):
|
|
919
|
-
'''(INTERNAL) Base class for C{CartesianBase}, C{Ecef9Tuple} and C{LatLonBase}.
|
|
920
|
-
'''
|
|
921
|
-
|
|
922
|
-
@property_ROver
|
|
923
|
-
def Ecef(self):
|
|
924
|
-
'''Get the ECEF I{class} (L{EcefKarney}), I{once}.
|
|
925
|
-
'''
|
|
926
|
-
return _MODS.ecef.EcefKarney
|
|
927
|
-
|
|
928
|
-
@property_RO
|
|
929
|
-
def _ecef9(self):
|
|
930
|
-
'''I{Must be overloaded}.'''
|
|
931
|
-
notOverloaded(self)
|
|
932
|
-
|
|
933
|
-
@Property_RO
|
|
934
|
-
def _Ltp(self):
|
|
935
|
-
'''(INTERNAL) Cache this instance' LTP (L{Ltp}).
|
|
936
|
-
'''
|
|
937
|
-
return self._ltp.Ltp(self._ecef9, ecef=self.Ecef(self.datum), name=self.name)
|
|
938
|
-
|
|
939
|
-
@property_ROver
|
|
940
|
-
def _ltp(self):
|
|
941
|
-
'''(INTERNAL) Get module L{pygeodesy.ltp}, I{once}.
|
|
942
|
-
'''
|
|
943
|
-
return _MODS.ltp
|
|
944
|
-
|
|
945
|
-
def _ltp_toLocal(self, ltp, Xyz_kwds, **Xyz): # overloaded in C{Ecef9Tuple}
|
|
946
|
-
'''(INTERNAL) Invoke C{ltp._toLocal}.
|
|
947
|
-
'''
|
|
948
|
-
Xyz_ = self._ltp_toLocal2(Xyz_kwds, **Xyz)
|
|
949
|
-
return self._ltp._toLocal(self, ltp, *Xyz_) # self._ecef9
|
|
950
|
-
|
|
951
|
-
def _ltp_toLocal2(self, Xyz_kwds, _None=None, **Xyz):
|
|
952
|
-
'''(INTERNAL) Return 2-tuple C{(Xyz_Class, Xyz_kwds)}.
|
|
953
|
-
'''
|
|
954
|
-
C, _ = Xyz_ = _xkwds_pop2(Xyz_kwds, **Xyz)
|
|
955
|
-
if C is not _None: # validate C
|
|
956
|
-
n, X = _xkwds_item2(Xyz)
|
|
957
|
-
if X is not C:
|
|
958
|
-
_xsubclassof(X, **{n: C})
|
|
959
|
-
return Xyz_
|
|
960
|
-
|
|
961
|
-
@property_ROver
|
|
962
|
-
def _ltpTuples(self):
|
|
963
|
-
'''(INTERNAL) Get module L{pygeodesy.ltpTuples}, I{once}.
|
|
964
|
-
'''
|
|
965
|
-
return _MODS.ltpTuples
|
|
966
|
-
|
|
967
|
-
def toAer(self, ltp=None, **Aer_and_kwds):
|
|
968
|
-
'''Convert this instance to I{local} I{Azimuth, Elevation, slant Range} (AER) components.
|
|
969
|
-
|
|
970
|
-
@kwarg ltp: The I{local tangent plane} (LTP) to use (L{Ltp}), overriding this
|
|
971
|
-
instance' L{LTP<pygeodesy.named._NamedLocal.toLtp>}.
|
|
972
|
-
@kwarg Aer_and_kwds: Optional AER class C{B{Aer}=}L{Aer<pygeodesy.ltpTuples.Aer>}
|
|
973
|
-
to use and optionally, additional B{C{Aer}} keyword arguments.
|
|
974
|
-
|
|
975
|
-
@return: An B{C{Aer}} instance.
|
|
976
|
-
|
|
977
|
-
@raise TypeError: Invalid B{C{ltp}}.
|
|
978
|
-
|
|
979
|
-
@see: Method L{toLocal<pygeodesy.named._NamedLocal.toLocal>}.
|
|
980
|
-
'''
|
|
981
|
-
return self._ltp_toLocal(ltp, Aer_and_kwds, Aer=self._ltpTuples.Aer)
|
|
982
|
-
|
|
983
|
-
def toEnu(self, ltp=None, **Enu_and_kwds):
|
|
984
|
-
'''Convert this instance to I{local} I{East, North, Up} (ENU) components.
|
|
985
|
-
|
|
986
|
-
@kwarg ltp: The I{local tangent plane} (LTP) to use (L{Ltp}), overriding this
|
|
987
|
-
instance' L{LTP<pygeodesy.named._NamedLocal.toLtp>}.
|
|
988
|
-
@kwarg Enu_and_kwds: Optional ENU class C{B{Enu}=}L{Enu<pygeodesy.ltpTuples.Enu>}
|
|
989
|
-
to use and optionally, additional B{C{Enu}} keyword arguments.
|
|
990
|
-
|
|
991
|
-
@return: An B{C{Enu}} instance.
|
|
992
|
-
|
|
993
|
-
@raise TypeError: Invalid B{C{ltp}}.
|
|
994
|
-
|
|
995
|
-
@see: Method L{toLocal<pygeodesy.named._NamedLocal.toLocal>}.
|
|
996
|
-
'''
|
|
997
|
-
return self._ltp_toLocal(ltp, Enu_and_kwds, Enu=self._ltpTuples.Enu)
|
|
998
|
-
|
|
999
|
-
def toLocal(self, Xyz=None, ltp=None, **Xyz_kwds):
|
|
1000
|
-
'''Convert this instance to I{local} components in a I{local tangent plane} (LTP)
|
|
1001
|
-
|
|
1002
|
-
@kwarg Xyz: Optional I{local} components class (L{XyzLocal}, L{Aer},
|
|
1003
|
-
L{Enu}, L{Ned}) or C{None}.
|
|
1004
|
-
@kwarg ltp: The I{local tangent plane} (LTP) to use (L{Ltp}), overriding this
|
|
1005
|
-
cartesian's L{LTP<pygeodesy.named._NamedLocal.toLtp>}.
|
|
1006
|
-
@kwarg Xyz_kwds: Optionally, additional B{C{Xyz}} keyword arguments, ignored
|
|
1007
|
-
if C{B{Xyz} is None}.
|
|
1008
|
-
|
|
1009
|
-
@return: An B{C{Xyz}} instance or a L{Local9Tuple}C{(x, y, z, lat, lon,
|
|
1010
|
-
height, ltp, ecef, M)} if C{B{Xyz} is None} (with C{M=None}).
|
|
1011
|
-
|
|
1012
|
-
@raise TypeError: Invalid B{C{ltp}}.
|
|
1013
|
-
'''
|
|
1014
|
-
return self._ltp_toLocal(ltp, Xyz_kwds, Xyz=Xyz, _None=Xyz)
|
|
1015
|
-
|
|
1016
|
-
def toLtp(self, Ecef=None, **name):
|
|
1017
|
-
'''Return the I{local tangent plane} (LTP) for this instance.
|
|
1018
|
-
|
|
1019
|
-
@kwarg Ecef: Optional ECEF I{class} (L{EcefKarney}, ... L{EcefYou}), overriding
|
|
1020
|
-
this instance' L{Ecef<pygeodesy.named._NamedLocal.Ecef>}.
|
|
1021
|
-
@kwarg name: Optional C{B{name}=NN} (C{str}).
|
|
1022
|
-
|
|
1023
|
-
@return: An B{C{Ltp}} instance.
|
|
1024
|
-
'''
|
|
1025
|
-
return self._ltp._toLtp(self, Ecef, self._ecef9, name) # needs self.Ecef and self._Ltp
|
|
1026
|
-
|
|
1027
|
-
def toNed(self, ltp=None, **Ned_and_kwds):
|
|
1028
|
-
'''Convert this instance to I{local} I{North, East, Down} (NED) components.
|
|
1029
|
-
|
|
1030
|
-
@kwarg ltp: The I{local tangent plane} (LTP) to use (L{Ltp}), overriding this
|
|
1031
|
-
instance' L{LTP<pygeodesy.named._NamedLocal.toLtp>}.
|
|
1032
|
-
@kwarg Ned_and_kwds: Optional NED class C{B{Ned}=}L{Ned<pygeodesy.ltpTuples.Ned>}
|
|
1033
|
-
to use and optionally, additional B{C{Ned}} keyword arguments.
|
|
1034
|
-
|
|
1035
|
-
@return: An B{C{Ned}} instance.
|
|
1036
|
-
|
|
1037
|
-
@raise TypeError: Invalid B{C{ltp}}.
|
|
1038
|
-
|
|
1039
|
-
@see: Method L{toLocal<pygeodesy.named._NamedLocal.toLocal>}.
|
|
1040
|
-
'''
|
|
1041
|
-
return self._ltp_toLocal(ltp, Ned_and_kwds, Ned=self._ltpTuples.Ned)
|
|
1042
|
-
|
|
1043
|
-
def toXyz(self, ltp=None, **Xyz_and_kwds):
|
|
1044
|
-
'''Convert this instance to I{local} I{X, Y, Z} (XYZ) components.
|
|
1045
|
-
|
|
1046
|
-
@kwarg ltp: The I{local tangent plane} (LTP) to use (L{Ltp}), overriding this
|
|
1047
|
-
instance' L{LTP<pygeodesy.named._NamedLocal.toLtp>}.
|
|
1048
|
-
@kwarg Xyz_and_kwds: Optional XYZ class C{B{Xyz}=}L{Xyz<pygeodesy.ltpTuples.XyzLocal>}
|
|
1049
|
-
to use and optionally, additional B{C{Xyz}} keyword arguments.
|
|
1050
|
-
|
|
1051
|
-
@return: An B{C{Xyz}} instance.
|
|
1052
|
-
|
|
1053
|
-
@raise TypeError: Invalid B{C{ltp}}.
|
|
1054
|
-
|
|
1055
|
-
@see: Method L{toLocal<pygeodesy.named._NamedLocal.toLocal>}.
|
|
1056
|
-
'''
|
|
1057
|
-
return self._ltp_toLocal(ltp, Xyz_and_kwds, Xyz=self._ltpTuples.XyzLocal)
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
916
|
# from pygeodesy.props import _NamedProperty
|
|
1061
917
|
|
|
1062
918
|
|
|
@@ -1611,7 +1467,6 @@ def _xvalid(name, underOK=False):
|
|
|
1611
1467
|
__all__ += _ALL_DOCS(_Named,
|
|
1612
1468
|
_NamedBase, # _NamedDict,
|
|
1613
1469
|
_NamedEnum, _NamedEnumItem,
|
|
1614
|
-
_NamedLocal,
|
|
1615
1470
|
_NamedTuple)
|
|
1616
1471
|
|
|
1617
1472
|
# **) MIT License
|
pygeodesy/namedTuples.py
CHANGED
|
@@ -10,7 +10,7 @@ of C{_NamedTuple} defined in C{pygeodesy.named}.
|
|
|
10
10
|
|
|
11
11
|
from pygeodesy.basics import isinstanceof, issubclassof, map1, _xinstanceof
|
|
12
12
|
# from pygeodesy.cartesianBase import CartesianBase # _MODS
|
|
13
|
-
|
|
13
|
+
from pygeodesy.constants import INT0
|
|
14
14
|
# from pygeodesy.dms import toDMS # _MODS
|
|
15
15
|
from pygeodesy.errors import _TypeError, _xattr, _xkwds, _xkwds_not
|
|
16
16
|
from pygeodesy.interns import NN, _1_, _2_, _a_, _A_, _area_, _angle_, _b_, _B_, \
|
|
@@ -26,10 +26,10 @@ from pygeodesy.props import deprecated_property_RO, property_RO
|
|
|
26
26
|
from pygeodesy.units import Band, Bearing, Degrees, Degrees2, Easting, FIx, \
|
|
27
27
|
Height, Int, Lam, Lat, Lon, Meter, Meter2, \
|
|
28
28
|
Northing, Number_, Phi, Precision_, Radians, \
|
|
29
|
-
Radius, Scalar, Str
|
|
29
|
+
Radius, Scalar, Str
|
|
30
30
|
|
|
31
31
|
__all__ = _ALL_LAZY.namedTuples
|
|
32
|
-
__version__ = '
|
|
32
|
+
__version__ = '25.05.12'
|
|
33
33
|
|
|
34
34
|
# __DUNDER gets mangled in class
|
|
35
35
|
_closest_ = 'closest'
|
pygeodesy/nvectorBase.py
CHANGED
|
@@ -16,7 +16,7 @@ from pygeodesy.constants import EPS, EPS0, EPS1, EPS_2, R_M, \
|
|
|
16
16
|
# from pygeodesy.datums import _spherical_datum # from .formy
|
|
17
17
|
from pygeodesy.errors import IntersectionError, _ValueError, VectorError, \
|
|
18
18
|
_xattrs, _xkwds, _xkwds_pop2
|
|
19
|
-
from pygeodesy.fmath import
|
|
19
|
+
from pygeodesy.fmath import fidw, hypot
|
|
20
20
|
from pygeodesy.fsums import Fsum, fsumf_
|
|
21
21
|
from pygeodesy.formy import _isequalTo, _spherical_datum
|
|
22
22
|
# from pygeodesy.internals import _under # from .named
|
|
@@ -38,7 +38,7 @@ from pygeodesy.vector3d import Vector3d, _xyzhdlln4
|
|
|
38
38
|
from math import degrees, fabs, sqrt
|
|
39
39
|
|
|
40
40
|
__all__ = _ALL_LAZY.nvectorBase
|
|
41
|
-
__version__ = '25.
|
|
41
|
+
__version__ = '25.05.12'
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
class NvectorBase(Vector3d): # XXX kept private
|
pygeodesy/osgr.py
CHANGED
|
@@ -24,7 +24,7 @@ U{A Guide<https://www.OrdnanceSurvey.co.UK/documents/resources/guide-coordinate-
|
|
|
24
24
|
and U{Ordnance Survey National Grid<https://WikiPedia.org/wiki/Ordnance_Survey_National_Grid>}.
|
|
25
25
|
'''
|
|
26
26
|
# make sure int/int division yields float quotient, see .basics
|
|
27
|
-
from __future__ import division as _; del _ #
|
|
27
|
+
from __future__ import division as _; del _ # noqa: E702 ;
|
|
28
28
|
|
|
29
29
|
from pygeodesy.basics import halfs2, isbool, isfloat, map1, \
|
|
30
30
|
_splituple, _xsubclassof, typename
|
|
@@ -54,7 +54,7 @@ from pygeodesy.utily import degrees90, degrees180, sincostan3, truncate
|
|
|
54
54
|
from math import cos, fabs, radians, sin, sqrt
|
|
55
55
|
|
|
56
56
|
__all__ = _ALL_LAZY.osgr
|
|
57
|
-
__version__ = '25.
|
|
57
|
+
__version__ = '25.05.12'
|
|
58
58
|
|
|
59
59
|
_equivalent_ = 'equivalent'
|
|
60
60
|
_OSGR_ = 'OSGR'
|
pygeodesy/points.py
CHANGED
|
@@ -52,8 +52,7 @@ from pygeodesy.named import classname, _NamedTuple, nameof, \
|
|
|
52
52
|
notImplemented, notOverloaded
|
|
53
53
|
from pygeodesy.namedTuples import Bounds2Tuple, Bounds4Tuple, LatLon2Tuple, \
|
|
54
54
|
NearestOn3Tuple, NearestOn5Tuple, \
|
|
55
|
-
Point3Tuple, Vector3Tuple
|
|
56
|
-
PhiLam2Tuple # PYCHOK shared
|
|
55
|
+
Point3Tuple, Vector3Tuple
|
|
57
56
|
from pygeodesy.props import Property_RO, property_doc_, property_RO
|
|
58
57
|
from pygeodesy.streprs import Fmt, instr
|
|
59
58
|
from pygeodesy.units import Number_, Radius, Scalar, Scalar_
|
|
@@ -63,7 +62,7 @@ from pygeodesy.utily import atan2b, degrees90, degrees180, degrees2m, \
|
|
|
63
62
|
from math import cos, fabs, fmod as _fmod, radians, sin
|
|
64
63
|
|
|
65
64
|
__all__ = _ALL_LAZY.points
|
|
66
|
-
__version__ = '25.
|
|
65
|
+
__version__ = '25.05.12'
|
|
67
66
|
|
|
68
67
|
_ilat_ = 'ilat'
|
|
69
68
|
_ilon_ = 'ilon'
|
pygeodesy/props.py
CHANGED
|
@@ -26,7 +26,7 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, \
|
|
|
26
26
|
from functools import wraps as _wraps
|
|
27
27
|
|
|
28
28
|
__all__ = _ALL_LAZY.props
|
|
29
|
-
__version__ = '25.
|
|
29
|
+
__version__ = '25.05.21'
|
|
30
30
|
|
|
31
31
|
_class_ = 'class'
|
|
32
32
|
_DNL_ = _NL_ * 2 # PYCHOK used!
|
|
@@ -460,7 +460,7 @@ def _deprecated(call, kind, qual_d):
|
|
|
460
460
|
@see: Brett Slatkin, "Effective Python", 2019 page 105, 2nd
|
|
461
461
|
ed, Addison-Wesley.
|
|
462
462
|
'''
|
|
463
|
-
doc =
|
|
463
|
+
doc = _DEPRECATEDof(call)
|
|
464
464
|
|
|
465
465
|
@_wraps(call) # PYCHOK self?
|
|
466
466
|
def _deprecated_call(*args, **kwds):
|
|
@@ -517,6 +517,17 @@ def _deprecated_module(name): # PYCHOK no cover
|
|
|
517
517
|
_throwarning(_module_, name, _dont_use_)
|
|
518
518
|
|
|
519
519
|
|
|
520
|
+
def _DEPRECATEDof(obj):
|
|
521
|
+
'''(INTERNAL) Get uniform DEPRECATED __doc__ string.
|
|
522
|
+
'''
|
|
523
|
+
try:
|
|
524
|
+
d = obj.__doc__.strip()
|
|
525
|
+
i = d.find(_DEPRECATED_)
|
|
526
|
+
except AttributeError:
|
|
527
|
+
i = -1
|
|
528
|
+
return _DOT_(_DEPRECATED_, NN) if i < 0 else d[i:]
|
|
529
|
+
|
|
530
|
+
|
|
520
531
|
if _WARNINGS_X_DEV:
|
|
521
532
|
class deprecated_property(_PropertyBase):
|
|
522
533
|
'''Decorator for a DEPRECATED C{property} or C{Property}.
|
|
@@ -524,7 +535,7 @@ if _WARNINGS_X_DEV:
|
|
|
524
535
|
def __init__(self, method):
|
|
525
536
|
'''Decorator for a DEPRECATED C{property} or C{Property} getter.
|
|
526
537
|
'''
|
|
527
|
-
doc =
|
|
538
|
+
doc = _DEPRECATEDof(method)
|
|
528
539
|
|
|
529
540
|
def _fget(inst): # PYCHOK no cover
|
|
530
541
|
'''Get the C{property} or C{Property} value.
|
|
@@ -554,7 +565,7 @@ if _WARNINGS_X_DEV:
|
|
|
554
565
|
'''Set the C{property} or C{Property} value.
|
|
555
566
|
'''
|
|
556
567
|
q = _qualified(inst, self.name)
|
|
557
|
-
_throwarning(typename(property), q,
|
|
568
|
+
_throwarning(typename(property), q, _DEPRECATEDof(method))
|
|
558
569
|
method(inst, val)
|
|
559
570
|
# self._update(inst) # un-cache this item
|
|
560
571
|
|
|
@@ -594,7 +605,7 @@ def deprecated_property_RO(method):
|
|
|
594
605
|
def _deprecated_RO(method, _RO):
|
|
595
606
|
'''(INTERNAL) Create a DEPRECATED C{property_RO} or C{Property_RO}.
|
|
596
607
|
'''
|
|
597
|
-
doc =
|
|
608
|
+
doc = _DEPRECATEDof(method)
|
|
598
609
|
|
|
599
610
|
if _WARNINGS_X_DEV:
|
|
600
611
|
|
|
@@ -614,17 +625,6 @@ def _deprecated_RO(method, _RO):
|
|
|
614
625
|
return _RO(method, doc=doc)
|
|
615
626
|
|
|
616
627
|
|
|
617
|
-
def _DOCof(obj):
|
|
618
|
-
'''(INTERNAL) Get uniform DEPRECATED __doc__ string.
|
|
619
|
-
'''
|
|
620
|
-
try:
|
|
621
|
-
d = obj.__doc__.strip()
|
|
622
|
-
i = d.find(_DEPRECATED_)
|
|
623
|
-
except AttributeError:
|
|
624
|
-
i = -1
|
|
625
|
-
return _DOT_(_DEPRECATED_, NN) if i < 0 else d[i:]
|
|
626
|
-
|
|
627
|
-
|
|
628
628
|
def _qualified(inst, name):
|
|
629
629
|
'''(INTERNAL) Fully qualify a name.
|
|
630
630
|
'''
|