Coverage for pygeodesy/deprecated/consterns.py: 100%
20 statements
« prev ^ index » next coverage.py v7.10.7, created at 2026-03-25 15:01 -0400
« prev ^ index » next coverage.py v7.10.7, created at 2026-03-25 15:01 -0400
2# -*- coding: utf-8 -*-
4u'''DEPRECATED constants, interns and singletons kept for backward compatibility.
5'''
7from pygeodesy.constants import EPS_2, MANT_DIG, _1_0
8from pygeodesy.ellipses import Ellipse
9from pygeodesy.lazily import _ALL_DEPRECATED, _FOR_DOCS
10from pygeodesy.props import deprecated_method
11from pygeodesy.units import Float, Int, Str
13__all__ = _ALL_DEPRECATED.deprecated_consterns
14__version__ = '26.02.12'
17class _Deprecated_Float(Float):
18 '''DEPRECATED on 2023.09.12, I{don't use}.'''
19 pass
22class _Deprecated_Int(Int):
23 '''DEPRECATED on 2023.09.12, I{don't use}.'''
24 pass
27class _Deprecated_Str(Str):
28 '''DEPRECATED on 2023.09.12, I{don't use}.'''
29 pass
32class Elliperim(object):
33 '''DEPRECATED on 2026.02.06, use class L{Ellipse}.'''
35 @deprecated_method
36 def AGM(self, a, b, **unused): # PYCHOK no cover
37 '''DEPRECATED on 2026.02.12, use property L{Ellipse}{C(a, b).perimeterAGM}.'''
38 return Ellipse(a, b).perimeterAGM
40 @deprecated_method
41 def Arc43(self, a, b): # PYCHOK no cover
42 '''DEPRECATED on 2026.02.12, use property L{Ellipse}{C(a, b).perimeter4Arc3}.'''
43 return Ellipse(a, b).perimeter4Arc3
45 @deprecated_method
46 def E2k(self, a, b): # PYCHOK no cover
47 '''DEPRECATED on 2026.02.12, use property L{Ellipse}{C(a, b).perimeter2k}.'''
48 return Ellipse(a, b).perimeter2k
50 @deprecated_method
51 def e2k(self, a, b, **unused): # PYCHOK no cover
52 '''DEPRECATED on 2026.02.12, use property L{Ellipse}{C(a, b).perimeter2k_}.'''
53 return Ellipse(a, b).perimeter2k_
55 @deprecated_method
56 def GK(self, a, b): # PYCHOK no cover
57 '''DEPRECATED on 2026.02.12, use property L{Ellipse}{C(a, b).perimeterGK}.'''
58 return Ellipse(a, b).perimeterGK
60 @deprecated_method
61 def HG(self, a, b, **unused): # PYCHOK no cover
62 '''DEPRECATED on 2026.02.12, use property L{Ellipse}{C(a, b).perimeterHGK}.'''
63 return Ellipse(a, b).perimeterHGK
65 @deprecated_method
66 def R2(self, a, b): # PYCHOK no cover
67 '''DEPRECATED on 2026.02.12, use property L{Ellipse}{C(a, b).perimeter2R}.'''
68 return Ellipse(a, b).perimeter2R
70if not _FOR_DOCS: # PYCHOK force epydoc
71 Elliperim = Elliperim() # singleton
72del _FOR_DOCS
74EPS1_2 = _Deprecated_Float(EPS1_2=_1_0 - EPS_2)
75MANTIS = _Deprecated_Int(MANTIS=MANT_DIG)
76OK = _Deprecated_Str(OK='OK')
78# **) MIT License
79#
80# Copyright (C) 2018-2026 -- mrJean1 at Gmail -- All Rights Reserved.
81#
82# Permission is hereby granted, free of charge, to any person obtaining a
83# copy of this software and associated documentation files (the "Software"),
84# to deal in the Software without restriction, including without limitation
85# the rights to use, copy, modify, merge, publish, distribute, sublicense,
86# and/or sell copies of the Software, and to permit persons to whom the
87# Software is furnished to do so, subject to the following conditions:
88#
89# The above copyright notice and this permission notice shall be included
90# in all copies or substantial portions of the Software.
91#
92# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
93# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
94# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
95# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
96# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
97# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
98# OTHER DEALINGS IN THE SOFTWARE.