-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Deprecate log directory #1824
Open
DonJayamanne
wants to merge
336
commits into
DonJayamanne:main
Choose a base branch
from
microsoft:deprecateLogDirectory
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Deprecate log directory #1824
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closes #21215 #14094 Added the option to assign a dedicated terminal for each Python file: ![image](https://github.com/microsoft/vscode-python/assets/13199757/b01248e4-c826-4de0-b15f-cde959965e68)
Solves partially #8542
#21219) Resolves #20881 . Testing: Behaves as expected when testing with Extension Development Host: ![image](https://github.com/microsoft/vscode-python/assets/30149293/d114d9ab-f2d8-4273-877b-d7dd030cfe76)
switch back to using a socket instead of an output file for use in the plugin communication during testing. This should work now that we resolved the issue with python path for windows.
fixes #21147 --------- Co-authored-by: Aidos Kanapyanov <65722512+aidoskanapyanov@users.noreply.github.com> Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
Fix error in tests, updating pyright version
allows new testing rewrite to handle 500+ tests and load and run these tests. High limit tested was 10,000 tests.
removed extra steps to wrap data since this creates duplicate folders in the controller and only keeps the most recent instead of all the roots from different workspaces.
fix debugging for run_pytest_script.py setup
is the beginning of this issue: #21150, in that it will start the process of implementing the setting in the extension
As part of the switch to allow for dynamic run- the pytest discovery and execution tests are now switched to be take lists of dicts where the dicts are the payloads.
this will partially remediate #21339 in regards to the duplicate IDs being run.
These logs print errors and other bits of information which will be helpful for debugging workflows of users where we need to get information such as args or which step in the process they got to.
allow people to opt in and out of the pythonTestAdapter rewrite via the settings `python.experiment.optInto` or `python.experiment.optOutfrom`
follows the same steps as making pytest compatible with large workspaces with many tests. Now test_ids are sent over a port as a json instead of in the exec function which can hit a cap on # of characters. Should fix #21339.
Co-authored-by: Anthony Kim <anthonykim@microsoft.com>
Bumps [typing-extensions](https://github.com/python/typing_extensions) from 4.5.0 to 4.6.3. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python/typing_extensions/blob/main/CHANGELOG.md">typing-extensions's changelog</a>.</em></p> <blockquote> <h1>Release 4.6.3 (June 1, 2023)</h1> <ul> <li>Fix a regression introduced in v4.6.0 in the implementation of runtime-checkable protocols. The regression meant that doing <code>class Foo(X, typing_extensions.Protocol)</code>, where <code>X</code> was a class that had <code>abc.ABCMeta</code> as its metaclass, would then cause subsequent <code>isinstance(1, X)</code> calls to erroneously raise <code>TypeError</code>. Patch by Alex Waygood (backporting the CPython PR <a href="https://redirect.github.com/python/cpython/pull/105152">python/cpython#105152</a>).</li> <li>Sync the repository's LICENSE file with that of CPython. <code>typing_extensions</code> is distributed under the same license as CPython itself.</li> <li>Skip a problematic test on Python 3.12.0b1. The test fails on 3.12.0b1 due to a bug in CPython, which will be fixed in 3.12.0b2. The <code>typing_extensions</code> test suite now passes on 3.12.0b1.</li> </ul> <h1>Release 4.6.2 (May 25, 2023)</h1> <ul> <li>Fix use of <code>@deprecated</code> on classes with <code>__new__</code> but no <code>__init__</code>. Patch by Jelle Zijlstra.</li> <li>Fix regression in version 4.6.1 where comparing a generic class against a runtime-checkable protocol using <code>isinstance()</code> would cause <code>AttributeError</code> to be raised if using Python 3.7.</li> </ul> <h1>Release 4.6.1 (May 23, 2023)</h1> <ul> <li>Change deprecated <code>@runtime</code> to formal API <code>@runtime_checkable</code> in the error message. Patch by Xuehai Pan.</li> <li>Fix regression in 4.6.0 where attempting to define a <code>Protocol</code> that was generic over a <code>ParamSpec</code> or a <code>TypeVarTuple</code> would cause <code>TypeError</code> to be raised. Patch by Alex Waygood.</li> </ul> <h1>Release 4.6.0 (May 22, 2023)</h1> <ul> <li> <p><code>typing_extensions</code> is now documented at <a href="https://typing-extensions.readthedocs.io/en/latest/">https://typing-extensions.readthedocs.io/en/latest/</a>. Patch by Jelle Zijlstra.</p> </li> <li> <p>Add <code>typing_extensions.Buffer</code>, a marker class for buffer types, as proposed by PEP 688. Equivalent to <code>collections.abc.Buffer</code> in Python 3.12. Patch by Jelle Zijlstra.</p> </li> <li> <p>Backport two CPython PRs fixing various issues with <code>typing.Literal</code>: <a href="https://redirect.github.com/python/cpython/pull/23294">python/cpython#23294</a> and <a href="https://redirect.github.com/python/cpython/pull/23383">python/cpython#23383</a>. Both CPython PRs were originally by Yurii Karabas, and both were backported to Python >=3.9.1, but no earlier. Patch by Alex Waygood.</p> <p>A side effect of one of the changes is that equality comparisons of <code>Literal</code> objects will now raise a <code>TypeError</code> if one of the <code>Literal</code> objects being compared has a mutable parameter. (Using mutable parameters with <code>Literal</code> is not supported by PEP 586 or by any major static type checkers.)</p> </li> <li> <p><code>Literal</code> is now reimplemented on all Python versions <= 3.10.0. The</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python/typing_extensions/commit/c57333b77603298e2d79fdaf7632e09e40d11f54"><code>c57333b</code></a> Update version to 4.6.3</li> <li><a href="https://github.com/python/typing_extensions/commit/22c0e70f34e9feffc0c04b8cb213a5d3f4dbbdec"><code>22c0e70</code></a> Backport CPython PR 105152 (<a href="https://redirect.github.com/python/typing_extensions/issues/208">#208</a>)</li> <li><a href="https://github.com/python/typing_extensions/commit/b8a2ece6c09ed72e962b5b4a2166262c5b3190d2"><code>b8a2ece</code></a> Third-party tests: cattrs has switched to pdm (<a href="https://redirect.github.com/python/typing_extensions/issues/209">#209</a>)</li> <li><a href="https://github.com/python/typing_extensions/commit/b0be88cdede662b1404e7ba52d6a55d1bf1fefff"><code>b0be88c</code></a> Add a cron job for testing third-party users of typing_extensions (<a href="https://redirect.github.com/python/typing_extensions/issues/206">#206</a>)</li> <li><a href="https://github.com/python/typing_extensions/commit/32887d3315326a6cfeb7b710f379328345209cec"><code>32887d3</code></a> Sync LICENSE with CPython (<a href="https://redirect.github.com/python/typing_extensions/issues/205">#205</a>)</li> <li><a href="https://github.com/python/typing_extensions/commit/252a4a4f52d498019774f0cedd21bccaa19d0d65"><code>252a4a4</code></a> Add more detailed versioning policy (<a href="https://redirect.github.com/python/typing_extensions/issues/197">#197</a>)</li> <li><a href="https://github.com/python/typing_extensions/commit/3c630b92b2a0ef1aa2910a0b7b496e9093f1241b"><code>3c630b9</code></a> Backport some new protocol tests from CPython (<a href="https://redirect.github.com/python/typing_extensions/issues/202">#202</a>)</li> <li><a href="https://github.com/python/typing_extensions/commit/06f73609ffea80780c9418af24daa624427a837d"><code>06f7360</code></a> Minor improvements to CI workflows (<a href="https://redirect.github.com/python/typing_extensions/issues/201">#201</a>)</li> <li><a href="https://github.com/python/typing_extensions/commit/5d51455cf9edfa06d629269274b2f128741300b4"><code>5d51455</code></a> Skip a problematic test on CPython 3.12.0b1 (<a href="https://redirect.github.com/python/typing_extensions/issues/200">#200</a>)</li> <li><a href="https://github.com/python/typing_extensions/commit/e84f909f6a9e8e03ef444a3a3c7e506e8e3b19e4"><code>e84f909</code></a> Prepare release 4.6.2 (<a href="https://redirect.github.com/python/typing_extensions/issues/195">#195</a>)</li> <li>Additional commits viewable in <a href="https://github.com/python/typing_extensions/compare/4.5.0...4.6.3">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=typing-extensions&package-manager=pip&previous-version=4.5.0&new-version=4.6.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Edited readme to accurately represent exclusion of Jupyter ext installation
Closed #20941 - Add enableTelemetry in package.json - Add function that updates the 'enableTelemetry' value in package.json - Update release pipelines
add in tests which are randomized to provide more testing for the issue that created `https://github.com/microsoft/vscode-python/issues/22104`
the traceback object was incorrectly printed as just the reference to the object in the error message. Ended up just removing it since it is correctly printed in the traceback object which is where it should ultimately belong. closes: #22181 --------- Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
There are two Feature Requests from: #18105 #21838 They are grouped together to provide the smoothest experience: when user wants to press shift+enter and smoothly move between each executable Python code block without having to manually move their cursor. #19955 (For Execute line/selection and advance to next line, referred to as dynamic smart cursor hereby) Open Issue: #21778 #21838 Steps in implementing REPL Smart Send (smart shift+enter to the REPL) and dynamic cursor move aka. Move to Next Line (next executable line of code to be more precise): 1. Figure out the workflow of where things start and run when user clicks on run selection/line 2. Send the content of selection & document to the Python Side from Typescript side. 3. Respect and follow previous logic/code for EXPLICIT selection (user has highlighting particular text they want to send to REPL), but otherwise, use newly created smart send code. 4. Receive content of document & selection in Python Side 5. Use AST (From Python standard library) to figure out if selection if selection is part of, for example, dictionary, but look for nodes and how each relates to the top level. If some selection is, for example part of a dictionary, we should run the whole dictionary. Look at how to do this for all top level, so that we run the Minimum Viable Block possible. (For example, if user selects part of a dictionary to run in REPL, it will select and send only the dictionary not the whole class or file, etc) 6. Receive the commands to run in typescript side and send it to the REPL 7. After the user has ran shift+enter(non highlight, meaning there was no explicit highlight of text), thus the incurring of smart send, and we have processed the smart selection, figure out the "next" executable line of code in the currently opened Python file. 8. After figuring out the "next" line number, we will move user's cursor to that line number. - [x] Additional scope for telemetry EventName.EXECUTION_CODE with the scope of 'line' in addition to differentiate the explicit selection usage compared to line or executable block. - [x] Drop 3.7 support before merging since end_line attribute of the AST module is only supported for Python version 3.8 and above. - [x] Python tests for both smart selection, dynamic cursor move. - [x] TypeScript tests for smart selection, dynamic cursor move. Notes: * To be shipped after dropping Python3.7 support, since end_lineno, which is critical in smart shift+enter logic, is only for Python version GREATER than 3.7 Update (9/14/23: Python 3.7 support is dropped from the VS Code Python extension: #21962) * Code in regards to this feature(s) should be wrapped in standard experiment (not setting based experiment) * Respective Telemetry should also be attached * EXPLICIT (highlight) selection of the text, and shift+enter/run selection should respect user's selection and send AS IT IS. (When the user selects/highlight specifically what they want to send, we should respect user's selection and send the selection as they are selected) * Smart Shift+Enter should be shipped together with dynamic smart cursor movement for smoothest experience. This way user could shift+enter line by line (or more accurately top block after another top block) as they shift+enter their code. * Be careful with line_no usage between vscode and python as vscode counts line number starting from 0 and python ast start as normal (starts from line 1)) So vscode_lineno + 1 = python_ast_lineno --------- Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
Dirk added this feature here: microsoft/vscode-languageserver-node@0b7acc1 We want to use this in Pylance in order to speedup completions. For the degenerate case, this can speedup completion results by 30%. See microsoft/pyrx#4113 and microsoft/pylance-release#4919
closes #21861 and related issues --------- Co-authored-by: Courtney Webster <60238438+cwebster-99@users.noreply.github.com>
* No need of experiments (if users install extension, then it works) * If tensorboard extension is installed the we rely on tensorboard extension to handle everything * For final deplayment we can decide whether to just remove this feature altogether or prompt users to install tensorboard extension or to go with an experiment, for now I wanted to keep this super simple (this shoudl not affect anyone as no one will have a tensorboard extension except us) * Simple private API for tensorboard extension, untill Python ext exposes a stable API * API is similar to Jupyter, scoped to Tensorboard ext
Legacy normalization script leaves unnecessary white spaces for dictionary as well as list. While there are multiple correct usage of it such as for after a function, for more intuitive REPL experience. We want to keep previous normalization style and white space format EXCEPT for dictionary and list case. Dictionary case is handled, but this is the PR to handle the elimination of extra white spaces for list as well. Closes: #22208
Bumps [microvenv](https://github.com/brettcannon/microvenv) from 2023.2.0 to 2023.3.post1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/brettcannon/microvenv/releases">microvenv's releases</a>.</em></p> <blockquote> <h2>2023.3.post1</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>⚠️ Breaking Changes</h3> <ul> <li>Add support for <code>scm_ignore_files</code> (and restructure project) by <a href="https://github.com/brettcannon"><code>@brettcannon</code></a> in <a href="https://redirect.github.com/brettcannon/microvenv/pull/44">brettcannon/microvenv#44</a></li> </ul> <h3>🎉 New Features</h3> <ul> <li>Add <code>IN_VIRTUAL_ENV</code> by <a href="https://github.com/brettcannon"><code>@brettcannon</code></a> in <a href="https://redirect.github.com/brettcannon/microvenv/pull/47">brettcannon/microvenv#47</a></li> <li>Add <code>parse_config()</code> by <a href="https://github.com/brettcannon"><code>@brettcannon</code></a> in <a href="https://redirect.github.com/brettcannon/microvenv/pull/48">brettcannon/microvenv#48</a></li> <li>Add <code>activation()</code> by <a href="https://github.com/brettcannon"><code>@brettcannon</code></a> in <a href="https://redirect.github.com/brettcannon/microvenv/pull/49">brettcannon/microvenv#49</a></li> <li>Add type annotations by <a href="https://github.com/brettcannon"><code>@brettcannon</code></a> in <a href="https://redirect.github.com/brettcannon/microvenv/pull/50">brettcannon/microvenv#50</a></li> <li>Add docs by <a href="https://github.com/brettcannon"><code>@brettcannon</code></a> in <a href="https://redirect.github.com/brettcannon/microvenv/pull/51">brettcannon/microvenv#51</a></li> <li>Add support for Windows (except for <code>create()</code>) by <a href="https://github.com/brettcannon"><code>@brettcannon</code></a> in <a href="https://redirect.github.com/brettcannon/microvenv/pull/55">brettcannon/microvenv#55</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/brettcannon/microvenv/compare/v2023.2.0...v2023.3.post1">https://github.com/brettcannon/microvenv/compare/v2023.2.0...v2023.3.post1</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/brettcannon/microvenv/commit/bf19f920060bd636ce15a992a118ee6a255d15ac"><code>bf19f92</code></a> Update the docs due to Windows support</li> <li><a href="https://github.com/brettcannon/microvenv/commit/0c5436dcd8718ba353140e0b2c73327f247d3737"><code>0c5436d</code></a> Fix <code>docs.yml</code></li> <li><a href="https://github.com/brettcannon/microvenv/commit/00d43b4188867d407387f314444d2f0b557383ea"><code>00d43b4</code></a> Update the version for release</li> <li><a href="https://github.com/brettcannon/microvenv/commit/2e8d62ec1b9a4bdf57f32bf5aac807b661f176be"><code>2e8d62e</code></a> Add a <code>release.yml</code> workflow</li> <li><a href="https://github.com/brettcannon/microvenv/commit/7b9ca8aff40eda2495a130453b8586646398d157"><code>7b9ca8a</code></a> Add support for Windows (except for <code>create()</code>) (<a href="https://redirect.github.com/brettcannon/microvenv/issues/55">#55</a>)</li> <li><a href="https://github.com/brettcannon/microvenv/commit/7085e42a4b8df4706a4395ff520617801726db22"><code>7085e42</code></a> Drop CI path requirements</li> <li><a href="https://github.com/brettcannon/microvenv/commit/f9dc600ebf4feb08486e406688297ce6d61734ab"><code>f9dc600</code></a> Add mypy's stubtest to linting</li> <li><a href="https://github.com/brettcannon/microvenv/commit/54e08f8b35b920b4211b706404f55075e9d16b09"><code>54e08f8</code></a> Clarify that <code>_create.py</code> is self-contained</li> <li><a href="https://github.com/brettcannon/microvenv/commit/3145fcbaa4a0bc36d832d155d17f34389b8a398e"><code>3145fcb</code></a> Merge branch 'main' of github.com:brettcannon/microvenv</li> <li><a href="https://github.com/brettcannon/microvenv/commit/6c0529e2b49469544829dbb50008c933e08cb44b"><code>6c0529e</code></a> Drop the static HTML directory</li> <li>Additional commits viewable in <a href="https://github.com/brettcannon/microvenv/compare/v2023.2.0...v2023.3.post1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=microvenv&package-manager=pip&previous-version=2023.2.0&new-version=2023.3.post1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
some asserts were inside functions / mocking and with this then the extension code catches the exception and doesn't error out as the test. Bring the asserts out of the functions into the test so the asserts work as expected.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.