Coverage for pygeodesy/deprecated/consterns.py: 100%

1

2# -*- coding: utf-8 -*-

3

4 u'''DEPRECATED constants, interns and singletons kept for backward compatibility.

5'''

6

7 from pygeodesy.constants import EPS_2, MANT_DIG, _1_0

8 from pygeodesy.ellipses import Ellipse

9 from pygeodesy.lazily import _ALL_DEPRECATED, _FOR_DOCS

10 from pygeodesy.props import deprecated_method

11 from pygeodesy.units import Float, Int, Str

12

13 __all__ = _ALL_DEPRECATED.deprecated_consterns

14 __version__ = '26.02.12'

15

16

17 class _Deprecated_Float(Float):

18 '''DEPRECATED on 2023.09.12, I{don't use}.'''

19 pass

20

21

22 class _Deprecated_Int(Int):

23 '''DEPRECATED on 2023.09.12, I{don't use}.'''

24 pass

25

26

27 class _Deprecated_Str(Str):

28 '''DEPRECATED on 2023.09.12, I{don't use}.'''

29 pass

30

31

32 class Elliperim(object):

33 '''DEPRECATED on 2026.02.06, use class L{Ellipse}.'''

34

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

39

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

44

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

49

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_

54

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

59

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

64

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

69

70 if not _FOR_DOCS: # PYCHOK force epydoc

71 Elliperim = Elliperim() # singleton

72 del _FOR_DOCS

73

74 EPS1_2 = _Deprecated_Float(EPS1_2=_1_0 - EPS_2)

75 MANTIS = _Deprecated_Int(MANTIS=MANT_DIG)

76 OK = _Deprecated_Str(OK='OK')

77

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.