1 |
commit: 9bcd4968886491185cbca449e5860cbde642774a |
2 |
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at> |
3 |
AuthorDate: Sun Jan 2 15:48:58 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 4 14:55:53 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bcd4968 |
7 |
|
8 |
dev-python/python-lsp-server: remove unused patch(es) |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/23634 |
13 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
14 |
|
15 |
.../python-lsp-server-1.2.4-unpin-pylint.patch | 254 --------------------- |
16 |
1 file changed, 254 deletions(-) |
17 |
|
18 |
diff --git a/dev-python/python-lsp-server/files/python-lsp-server-1.2.4-unpin-pylint.patch b/dev-python/python-lsp-server/files/python-lsp-server-1.2.4-unpin-pylint.patch |
19 |
deleted file mode 100644 |
20 |
index 8c849720447e..000000000000 |
21 |
--- a/dev-python/python-lsp-server/files/python-lsp-server-1.2.4-unpin-pylint.patch |
22 |
+++ /dev/null |
23 |
@@ -1,254 +0,0 @@ |
24 |
-diff --git a/.pylintrc b/.pylintrc |
25 |
-index 4249ac5..326751f 100644 |
26 |
---- a/.pylintrc |
27 |
-+++ b/.pylintrc |
28 |
-@@ -16,7 +16,8 @@ disable = |
29 |
- too-few-public-methods, |
30 |
- too-many-arguments, |
31 |
- too-many-instance-attributes, |
32 |
-- import-error |
33 |
-+ import-error, |
34 |
-+ consider-using-f-string, |
35 |
- |
36 |
- [REPORTS] |
37 |
- |
38 |
-diff --git a/pylsp/__main__.py b/pylsp/__main__.py |
39 |
-index a480823..4698d5c 100644 |
40 |
---- a/pylsp/__main__.py |
41 |
-+++ b/pylsp/__main__.py |
42 |
-@@ -92,7 +92,7 @@ def _configure_logger(verbose=0, log_config=None, log_file=None): |
43 |
- root_logger = logging.root |
44 |
- |
45 |
- if log_config: |
46 |
-- with open(log_config, 'r') as f: |
47 |
-+ with open(log_config, 'r', encoding='utf-8') as f: |
48 |
- logging.config.dictConfig(json.load(f)) |
49 |
- else: |
50 |
- formatter = logging.Formatter(LOG_FORMAT) |
51 |
-diff --git a/pylsp/_utils.py b/pylsp/_utils.py |
52 |
-index 92376f6..9ac30cf 100644 |
53 |
---- a/pylsp/_utils.py |
54 |
-+++ b/pylsp/_utils.py |
55 |
-@@ -144,8 +144,8 @@ def format_docstring(contents): |
56 |
- Until we can find a fast enough way of discovering and parsing each format, |
57 |
- we can do a little better by at least preserving indentation. |
58 |
- """ |
59 |
-- contents = contents.replace('\t', u'\u00A0' * 4) |
60 |
-- contents = contents.replace(' ', u'\u00A0' * 2) |
61 |
-+ contents = contents.replace('\t', '\u00A0' * 4) |
62 |
-+ contents = contents.replace(' ', '\u00A0' * 2) |
63 |
- return contents |
64 |
- |
65 |
- |
66 |
-diff --git a/pylsp/plugins/flake8_lint.py b/pylsp/plugins/flake8_lint.py |
67 |
-index 7ac8c62..aefd09e 100644 |
68 |
---- a/pylsp/plugins/flake8_lint.py |
69 |
-+++ b/pylsp/plugins/flake8_lint.py |
70 |
-@@ -79,7 +79,7 @@ def run_flake8(flake8_executable, args, document): |
71 |
- try: |
72 |
- cmd = [flake8_executable] |
73 |
- cmd.extend(args) |
74 |
-- p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) # pylint: disable=consider-using-with |
75 |
-+ p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) |
76 |
- except IOError: |
77 |
- log.debug("Can't execute %s. Trying with 'python -m flake8'", flake8_executable) |
78 |
- cmd = ['python', '-m', 'flake8'] |
79 |
-diff --git a/pylsp/plugins/pylint_lint.py b/pylsp/plugins/pylint_lint.py |
80 |
-index bdb65fe..69bad1c 100644 |
81 |
---- a/pylsp/plugins/pylint_lint.py |
82 |
-+++ b/pylsp/plugins/pylint_lint.py |
83 |
-@@ -236,7 +236,7 @@ def _run_pylint_stdio(pylint_executable, document, flags): |
84 |
- cmd = [pylint_executable] |
85 |
- cmd.extend(flags) |
86 |
- cmd.extend(['--from-stdin', document.path]) |
87 |
-- p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) # pylint: disable=consider-using-with |
88 |
-+ p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) |
89 |
- except IOError: |
90 |
- log.debug("Can't execute %s. Trying with 'python -m pylint'", pylint_executable) |
91 |
- cmd = ['python', '-m', 'pylint'] |
92 |
-diff --git a/pylsp/workspace.py b/pylsp/workspace.py |
93 |
-index ec031b6..bf312f6 100644 |
94 |
---- a/pylsp/workspace.py |
95 |
-+++ b/pylsp/workspace.py |
96 |
-@@ -76,7 +76,7 @@ def root_uri(self): |
97 |
- return self._root_uri |
98 |
- |
99 |
- def is_local(self): |
100 |
-- return (self._root_uri_scheme == '' or self._root_uri_scheme == 'file') and os.path.exists(self._root_path) |
101 |
-+ return (self._root_uri_scheme in ['', 'file']) and os.path.exists(self._root_path) |
102 |
- |
103 |
- def get_document(self, doc_uri): |
104 |
- """Return a managed document if-present, else create one pointing at disk. |
105 |
-diff --git a/setup.py b/setup.py |
106 |
-index 3f79774..14ade20 100755 |
107 |
---- a/setup.py |
108 |
-+++ b/setup.py |
109 |
-@@ -52,7 +52,7 @@ def get_version(module='pylsp'): |
110 |
- 'pycodestyle>=2.7.0', |
111 |
- 'pydocstyle>=2.0.0', |
112 |
- 'pyflakes>=2.3.0,<2.4.0', |
113 |
-- 'pylint>=2.5.0,<2.10.0', |
114 |
-+ 'pylint>=2.5.0', |
115 |
- 'rope>=0.10.5', |
116 |
- 'yapf', |
117 |
- ], |
118 |
-@@ -62,10 +62,10 @@ def get_version(module='pylsp'): |
119 |
- 'pycodestyle': ['pycodestyle>=2.7.0'], |
120 |
- 'pydocstyle': ['pydocstyle>=2.0.0'], |
121 |
- 'pyflakes': ['pyflakes>=2.3.0,<2.4.0'], |
122 |
-- 'pylint': ['pylint>=2.5.0,<2.10.0'], |
123 |
-+ 'pylint': ['pylint>=2.5.0'], |
124 |
- 'rope': ['rope>0.10.5'], |
125 |
- 'yapf': ['yapf'], |
126 |
-- 'test': ['pylint>=2.5.0,<2.10.0', 'pytest', 'pytest-cov', 'coverage', |
127 |
-+ 'test': ['pylint>=2.5.0', 'pytest', 'pytest-cov', 'coverage', |
128 |
- 'numpy', 'pandas', 'matplotlib', 'pyqt5', 'flaky'], |
129 |
- }, |
130 |
- entry_points={ |
131 |
-diff --git a/test/fixtures.py b/test/fixtures.py |
132 |
-index 3ced0d5..e57bda6 100644 |
133 |
---- a/test/fixtures.py |
134 |
-+++ b/test/fixtures.py |
135 |
-@@ -101,7 +101,7 @@ def temp_workspace_factory(workspace): # pylint: disable=redefined-outer-name |
136 |
- def fn(files): |
137 |
- def create_file(name, content): |
138 |
- fn = os.path.join(workspace.root_path, name) |
139 |
-- with open(fn, 'w') as f: |
140 |
-+ with open(fn, 'w', encoding='utf-8') as f: |
141 |
- f.write(content) |
142 |
- workspace.put_document(uris.from_fs_path(fn), content) |
143 |
- |
144 |
-diff --git a/test/plugins/test_flake8_lint.py b/test/plugins/test_flake8_lint.py |
145 |
-index 046127c..e82a226 100644 |
146 |
---- a/test/plugins/test_flake8_lint.py |
147 |
-+++ b/test/plugins/test_flake8_lint.py |
148 |
-@@ -93,7 +93,7 @@ def get_flake8_cfg_settings(workspace, config_str): |
149 |
- This function creates a ``setup.cfg``; you'll have to delete it yourself. |
150 |
- """ |
151 |
- |
152 |
-- with open(os.path.join(workspace.root_path, "setup.cfg"), "w+") as f: |
153 |
-+ with open(os.path.join(workspace.root_path, "setup.cfg"), "w+", encoding='utf-8') as f: |
154 |
- f.write(config_str) |
155 |
- |
156 |
- workspace.update_config({"pylsp": {"configurationSources": ["flake8"]}}) |
157 |
-diff --git a/test/plugins/test_pycodestyle_lint.py b/test/plugins/test_pycodestyle_lint.py |
158 |
-index c0d1d7e..e238147 100644 |
159 |
---- a/test/plugins/test_pycodestyle_lint.py |
160 |
-+++ b/test/plugins/test_pycodestyle_lint.py |
161 |
-@@ -91,7 +91,7 @@ def test_pycodestyle_config(workspace): |
162 |
- |
163 |
- for conf_file, (content, working) in list(content.items()): |
164 |
- # Now we'll add config file to ignore it |
165 |
-- with open(os.path.join(workspace.root_path, conf_file), 'w+') as f: |
166 |
-+ with open(os.path.join(workspace.root_path, conf_file), 'w+', encoding='utf-8') as f: |
167 |
- f.write(content) |
168 |
- workspace._config.settings.cache_clear() |
169 |
- |
170 |
-diff --git a/test/plugins/test_pyflakes_lint.py b/test/plugins/test_pyflakes_lint.py |
171 |
-index 494cb63..d52ac63 100644 |
172 |
---- a/test/plugins/test_pyflakes_lint.py |
173 |
-+++ b/test/plugins/test_pyflakes_lint.py |
174 |
-@@ -21,7 +21,7 @@ def hello(): |
175 |
- DOC_UNDEFINED_NAME_ERR = "a = b" |
176 |
- |
177 |
- |
178 |
--DOC_ENCODING = u"""# encoding=utf-8 |
179 |
-+DOC_ENCODING = """# encoding=utf-8 |
180 |
- import sys |
181 |
- """ |
182 |
- |
183 |
-diff --git a/test/plugins/test_pylint_lint.py b/test/plugins/test_pylint_lint.py |
184 |
-index cf7a7e4..5b5b99c 100644 |
185 |
---- a/test/plugins/test_pylint_lint.py |
186 |
-+++ b/test/plugins/test_pylint_lint.py |
187 |
-@@ -37,7 +37,7 @@ def temp_document(doc_text, workspace): |
188 |
- |
189 |
- |
190 |
- def write_temp_doc(document, contents): |
191 |
-- with open(document.path, 'w') as temp_file: |
192 |
-+ with open(document.path, 'w', encoding='utf-8') as temp_file: |
193 |
- temp_file.write(contents) |
194 |
- |
195 |
- |
196 |
-diff --git a/test/test_document.py b/test/test_document.py |
197 |
-index b543a40..3dcabb6 100644 |
198 |
---- a/test/test_document.py |
199 |
-+++ b/test/test_document.py |
200 |
-@@ -16,7 +16,7 @@ def test_document_lines(doc): |
201 |
- |
202 |
- |
203 |
- def test_document_source_unicode(workspace): |
204 |
-- document_mem = Document(DOC_URI, workspace, u'my source') |
205 |
-+ document_mem = Document(DOC_URI, workspace, 'my source') |
206 |
- document_disk = Document(DOC_URI, workspace) |
207 |
- assert isinstance(document_mem.source, type(document_disk.source)) |
208 |
- |
209 |
-@@ -44,27 +44,27 @@ def test_word_at_position(doc): |
210 |
- |
211 |
- |
212 |
- def test_document_empty_edit(workspace): |
213 |
-- doc = Document('file:///uri', workspace, u'') |
214 |
-+ doc = Document('file:///uri', workspace, '') |
215 |
- doc.apply_change({ |
216 |
- 'range': { |
217 |
- 'start': {'line': 0, 'character': 0}, |
218 |
- 'end': {'line': 0, 'character': 0} |
219 |
- }, |
220 |
-- 'text': u'f' |
221 |
-+ 'text': 'f' |
222 |
- }) |
223 |
-- assert doc.source == u'f' |
224 |
-+ assert doc.source == 'f' |
225 |
- |
226 |
- |
227 |
- def test_document_line_edit(workspace): |
228 |
-- doc = Document('file:///uri', workspace, u'itshelloworld') |
229 |
-+ doc = Document('file:///uri', workspace, 'itshelloworld') |
230 |
- doc.apply_change({ |
231 |
-- 'text': u'goodbye', |
232 |
-+ 'text': 'goodbye', |
233 |
- 'range': { |
234 |
- 'start': {'line': 0, 'character': 3}, |
235 |
- 'end': {'line': 0, 'character': 8} |
236 |
- } |
237 |
- }) |
238 |
-- assert doc.source == u'itsgoodbyeworld' |
239 |
-+ assert doc.source == 'itsgoodbyeworld' |
240 |
- |
241 |
- |
242 |
- def test_document_multiline_edit(workspace): |
243 |
-@@ -73,8 +73,8 @@ def test_document_multiline_edit(workspace): |
244 |
- " print a\n", |
245 |
- " print b\n" |
246 |
- ] |
247 |
-- doc = Document('file:///uri', workspace, u''.join(old)) |
248 |
-- doc.apply_change({'text': u'print a, b', 'range': { |
249 |
-+ doc = Document('file:///uri', workspace, ''.join(old)) |
250 |
-+ doc.apply_change({'text': 'print a, b', 'range': { |
251 |
- 'start': {'line': 1, 'character': 4}, |
252 |
- 'end': {'line': 2, 'character': 11} |
253 |
- }}) |
254 |
-@@ -89,8 +89,8 @@ def test_document_end_of_file_edit(workspace): |
255 |
- "print 'a'\n", |
256 |
- "print 'b'\n" |
257 |
- ] |
258 |
-- doc = Document('file:///uri', workspace, u''.join(old)) |
259 |
-- doc.apply_change({'text': u'o', 'range': { |
260 |
-+ doc = Document('file:///uri', workspace, ''.join(old)) |
261 |
-+ doc.apply_change({'text': 'o', 'range': { |
262 |
- 'start': {'line': 2, 'character': 0}, |
263 |
- 'end': {'line': 2, 'character': 0} |
264 |
- }}) |
265 |
-diff --git a/test/test_workspace.py b/test/test_workspace.py |
266 |
-index a008e7e..44d754b 100644 |
267 |
---- a/test/test_workspace.py |
268 |
-+++ b/test/test_workspace.py |
269 |
-@@ -51,7 +51,7 @@ def test_non_root_project(pylsp, metafiles): |
270 |
- os.mkdir(project_root) |
271 |
- |
272 |
- for metafile in metafiles: |
273 |
-- with open(os.path.join(project_root, metafile), 'w+') as f: |
274 |
-+ with open(os.path.join(project_root, metafile), 'w+', encoding='utf-8') as f: |
275 |
- f.write('# ' + metafile) |
276 |
- |
277 |
- test_uri = uris.from_fs_path(os.path.join(project_root, 'hello/test.py')) |