Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use variable annotations instead of type comments on Python 3.8 #2450

Merged
merged 18 commits into from
Apr 20, 2024

Conversation

jwortmann
Copy link
Member

https://peps.python.org/pep-0526/

I used this regex to replace them:

regex

But I did a little bit of fine tuning by hand afterwards, because the regex didn't catch multi-line expressions, and a few type comments were not valid syntax.

I can change the target branch if we want to wait for the Python 3.8 release first.

predragnikolic and others added 16 commits February 11, 2024 23:04
This reverts commit c70cd57.
* main:
  Cut 1.29.0
  Fix usage of sublime.score_selector (sublimelsp#2427)
  docs: add info about typst-lsp commands (sublimelsp#2424)
This commit adopts `unittesting.ViewTestCase` to run view related test cases.

ViewTestCase ...

1. provides `view` and `window` members pointing to a dedicated view, being
   created for testing.
2. ensures not to close empty windows, which was probably the most likely
   reason for unittests failing before on MacOS.
plugin/core/transports.py Show resolved Hide resolved
plugin/documents.py Show resolved Hide resolved
@predragnikolic
Copy link
Member

I can change the target branch if we want to wait for the Python 3.8 release first.

LSP v2.0.0 will be released tomorrow
No need to change the target branch, Github will automatically update it to main after sublimelsp:feat/py38 is merged.

I do plan to merge your py38 PRs at the beginning of next week. Tuesday.

I plan to release python 3.8 tomorrow,
but give it a few days, till Monday (just in case if something unexpected bad happens, to easily revert to pyton 3.3 without reverting much... This option shouldn't happen, but if it happens, I will be ready (: )

After that I plan to continue with merging the new PR's.

@predragnikolic predragnikolic deleted the branch sublimelsp:main April 19, 2024 16:14
@jwortmann jwortmann changed the base branch from feat/py38 to main April 19, 2024 17:40
@predragnikolic
Copy link
Member

Test fail on Windows :)

======================================================================
ERROR: test_did_change_before_did_close (test_single_document.SingleDocumentTestCase3)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\st\Data\Packages\UnitTesting\unittesting\core\py38\case.py", line 80, in run
    yield from deferred
  File "C:\st\Data\Packages\UnitTesting\unittesting\core\py38\case.py", line 23, in _callTestMethod
    yield from deferred
  File "C:\st\Data\Packages\LSP\tests\test_single_document.py", line 392, in test_did_change_before_did_close
    yield from self.await_message('textDocument/didChange')
  File "C:\st\Data\Packages\LSP\tests\setup.py", line 184, in await_message
    yield from cls.await_promise(promise)
  File "C:\st\Data\Packages\LSP\tests\setup.py", line 207, in await_promise
    yield {"condition": yielder, "timeout": TIMEOUT_TIME}
TimeoutError: Condition not fulfilled within 10.00 seconds

@predragnikolic predragnikolic merged commit 0fabb7d into sublimelsp:main Apr 20, 2024
8 checks passed
@jwortmann jwortmann deleted the pep-526 branch April 20, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants