File: Use-system-ply-instead-of-local-copy.patch

package info (click to toggle)
astropy 7.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 34,028 kB
  • sloc: python: 237,403; ansic: 55,195; lex: 8,621; sh: 3,317; xml: 2,399; makefile: 191
file content (111 lines) | stat: -rw-r--r-- 3,949 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
From: Ole Streicher <olebole@debian.org>
Date: Fri, 12 Jun 2020 17:13:16 +0200
Subject: Use system ply instead of local copy

---
 astropy/units/format/base.py    | 2 +-
 astropy/units/format/cds.py     | 2 +-
 astropy/units/format/generic.py | 2 +-
 astropy/units/format/ogip.py    | 2 +-
 astropy/units/format/vounit.py  | 2 +-
 astropy/utils/parsing.py        | 8 ++++----
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/astropy/units/format/base.py b/astropy/units/format/base.py
index 08437f8..e7b11ce 100644
--- a/astropy/units/format/base.py
+++ b/astropy/units/format/base.py
@@ -6,7 +6,7 @@ from typing import ClassVar, Literal
 
 import numpy as np
 
-from astropy.extern.ply.lex import LexToken
+from ply.lex import LexToken
 from astropy.units.core import (
     CompositeUnit,
     NamedUnit,
diff --git a/astropy/units/format/cds.py b/astropy/units/format/cds.py
index 13bd67e..5e79515 100644
--- a/astropy/units/format/cds.py
+++ b/astropy/units/format/cds.py
@@ -15,7 +15,7 @@
 import re
 from typing import ClassVar, Literal
 
-from astropy.extern.ply.lex import Lexer
+from ply.lex import Lexer
 from astropy.units.core import CompositeUnit, Unit, UnitBase
 from astropy.units.utils import is_effectively_unity
 from astropy.utils import classproperty, parsing
diff --git a/astropy/units/format/generic.py b/astropy/units/format/generic.py
index 3e9b3ed..45e6d22 100644
--- a/astropy/units/format/generic.py
+++ b/astropy/units/format/generic.py
@@ -23,7 +23,7 @@ from typing import ClassVar, Final
 
 import numpy as np
 
-from astropy.extern.ply.lex import Lexer
+from ply.lex import Lexer
 from astropy.units.core import CompositeUnit, Unit, UnitBase, get_current_unit_registry
 from astropy.units.errors import UnitsWarning
 from astropy.units.typing import UnitScale
diff --git a/astropy/units/format/ogip.py b/astropy/units/format/ogip.py
index 58f6156..b1dc187 100644
--- a/astropy/units/format/ogip.py
+++ b/astropy/units/format/ogip.py
@@ -23,7 +23,7 @@ from typing import ClassVar, Literal
 
 import numpy as np
 
-from astropy.extern.ply.lex import Lexer
+from ply.lex import Lexer
 from astropy.units.core import CompositeUnit, UnitBase
 from astropy.units.errors import UnitParserWarning, UnitsWarning
 from astropy.units.typing import UnitScale
diff --git a/astropy/units/format/vounit.py b/astropy/units/format/vounit.py
index cf01042..7f2532b 100644
--- a/astropy/units/format/vounit.py
+++ b/astropy/units/format/vounit.py
@@ -10,7 +10,7 @@ from typing import ClassVar, Literal
 
 import numpy as np
 
-from astropy.extern.ply.lex import LexToken
+from ply.lex import LexToken
 from astropy.units.core import (
     CompositeUnit,
     NamedUnit,
diff --git a/astropy/utils/parsing.py b/astropy/utils/parsing.py
index 6f8e194..c04599c 100644
--- a/astropy/utils/parsing.py
+++ b/astropy/utils/parsing.py
@@ -11,8 +11,8 @@ from collections.abc import Generator
 from pathlib import Path
 from types import ModuleType
 
-from astropy.extern.ply.lex import Lexer
-from astropy.extern.ply.yacc import LRParser
+from ply.lex import Lexer
+from ply.yacc import LRParser
 
 __all__ = ["ThreadSafeParser", "lex", "yacc"]
 
@@ -84,7 +84,7 @@ def lex(lextab: str, package: str, reflags: int = int(re.VERBOSE)) -> Lexer:
     reflags : int
         Passed to ``ply.lex``.
     """
-    from astropy.extern.ply import lex
+    from ply import lex
 
     caller_dir = Path(lex.get_caller_module_dict(2)["__file__"]).parent
     with _LOCK, _patch_ply_module(lex, caller_dir / (lextab + ".py"), package):
@@ -131,7 +131,7 @@ def yacc(tabmodule: str, package: str) -> ThreadSafeParser:
         the output file. This is inserted into a comment in the generated
         file.
     """
-    from astropy.extern.ply import yacc
+    from ply import yacc
 
     caller_dir = Path(yacc.get_caller_module_dict(2)["__file__"]).parent
     with _LOCK, _patch_ply_module(yacc, caller_dir / (tabmodule + ".py"), package):