text:
Add support for Windows tasks

Problem:
Running tasks in Windows® is needed.
Solution:
A TES task can be submitted to a TES server (with a backend parameter of platform set to the value windows) and the task will run on a windows server host. For backward compatibility purposes, the default value of platform will be linux.
Describe alternatives you've considered
Possibly use the docker image to select the platform and not require the backend parameter.
Code dependencies
Will this require code changes in:

CoA, for new and/or existing deployments? no
TES standalone, for new and/or existing deployments? yes
Terra, for new and/or existing deployments? no?
Build pipeline? yes
Integration tests? yes

Additional context
TBD

In no particular order:

Publish Tes.Runner project for windows in addition to linux in the build.
Modify the two current filenames related to the tes-runner in the TesApi.Web project to be four (two for each runner binary) and update BatchScheduler to upload both binaries as needed as well as change the content of IBatchScheduler.PoolMetadata.RunnerMD5 to include both runner binary hashes
Create config-disks.cmd, config-docker.cmd, config-x-gpu.cmd (where x = a and/or n), & config-nvme.cmd scripts in the scripts folder
Add the platform backend parameter as described above. Possibly detect windows docker images and set it accordingly (when not explicitly set).
Format the Path property of both FileInput and FileOutput per Windows conventions.
Generate Batch Environment Variable Names as appropriate for Windows (there are some differences).
Investigate automatically injecting both 32-bit and 64-bit Program Files system folders into the containers based on the docker image specified.
Investigate the ability to restrict IMDS from containers running in Windows.

I think this is it.


text:
Setup.py syntax error

Setup.py contains a syntax error :
File "/Users/Jon_1/graphing/setup.py", line 9
description='Add static script_dir() method to Path',
^
SyntaxError: positional argument follows keyword argument
setup(name='graphing',
version='0.0.8',
url='https://github.com/microsoft/graphing',
license='MIT',
author='Rohit Pandey',
author_email='rohitpandey576@gmail.com', 'ropandey@microsoft.com'
description='Add static script_dir() method to Path',
packages=find_packages(exclude=['tests']),
long_description=open('README.md').read(),
zip_safe=False)
Error occurs in variable "author_email" because 2 strings are defined for the variable which throws the 'positional argument follows keyword argument' error. This can be quickly fixed by removing one of the email addresses on the variable "author_email" or defining the variable in another way.

Thanks Jon. I will fix it tonight and let you know. In the meantime, I am
in the process of migrating the code from here:
https://github.com/ryu577/graphing to that repository under the Microsoft
account. The former will be bereft of errors and is a superset of the
latter.
On Fri, Nov 25, 2022 at 7:35 AM jon7797 @.***> wrote:

Setup.py contains a syntax error :
File "/Users/Jon_1/graphing/setup.py", line 9
description='Add static script_dir() method to Path',
^
SyntaxError: positional argument follows keyword argument
setup(name='graphing',
version='0.0.8',
url='https://github.com/microsoft/graphing',
license='MIT',
author='Rohit Pandey',
@.', @.'
description='Add static script_dir() method to Path',
packages=find_packages(exclude=['tests']),
long_description=open('README.md').read(),
zip_safe=False)
Error occurs in variable "author_email" because 2 strings are defined for
the variable which throws the 'positional argument follows keyword
argument' error. This can be quickly fixed by removing one of the email
addresses on the variable "author_email" or defining the variable in
another way.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/graphing/issues/1, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACWICHRJOD5MRA7NHXAGMJTWKDMFTANCNFSM6AAAAAASLNUZQQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
Thanks,
Rohit

Thank you so much for your prompt response! I will see if that other repository works for my project and I will let you know if I run into anything else. Please feel free to close the issue when you think it is appropriate.

Fixed the issue by removing one of the email addresses.

source: gharchive/issue

repo: microsoft/graphing

license: MIT

license_type: permissive

license_source: github-api


text:
Add basis for allowing the creation of configuration enforcement in gcs

This commit is the minimal set of functionality needed to allow users
to create a configuration policy that gcs can enforce.
Policy enforcement will allow users to state "only these containers, with these
command lines, etc etc" should be run. If anything in gcs doesn't match the
user supplied policy, it will end container run and report an error.
Currently, only container filesystem policy is enforced. This is done at
two points. When a pmem device is mounted, its dm-verity root hash is checked
against policy to see if it is allowed.
At the time of overlay creation, the order of layers is compared to policy to
make sure that the container is being constructed as the user expected.
Additional policy enforcement that is coming in future commits includes:

enforce policy for scsi mounts
enforce container command line
enforce environment variables

LGTM

I got two LGTMs. Can I get a merge?

source: gharchive/pull-request

authors: SeanTAllen msscotb

repo: microsoft/hcsshim


text:
Make GEMMTreeImpl strictly follows scikit-learn's behavior at decision boundary

Closes #30.

Codecov Report

Merging #169 into master will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #169   +/-   ##
=======================================
  Coverage   93.49%   93.49%
=======================================
  Files          24       24
  Lines        1538     1538
  Branches      285      285
=======================================
  Hits         1438     1438
  Misses         60       60
  Partials       40       40

Flag
Coverage Δ

#unittests
93.49% <100.00%> (ø)

Impacted Files
Coverage Δ

...rd/ml/operator_converters/_tree_implementations.py
98.10% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15ed644...4619591. Read the comment docs.

This will be addressed in #511.

authors: codecov-commenter gyeongin interesaaat

repo: microsoft/hummingbird


text:
ModuleNotFoundError: No module named 'MalmoPython'; pip install python 3.7 macOS Mojave

Thanks for your work on malmo! I am trying to do a clean install with pip using python 3.7 on macOS Mojave. I am following these instructions.
When attempting to run the example script, I encounter the following error:
ModuleNotFoundError: No module named 'MalmoPython'
Here are steps to reproduce what I am seeing after doing the prerequisites.
Toms-MacBook-Pro-3:phd tom$ mkdir minecraft_clean
Toms-MacBook-Pro-3:phd tom$ cd minecraft_clean/
Toms-MacBook-Pro-3:minecraft_clean tom$ pyenv local 3.7.0
Toms-MacBook-Pro-3:minecraft_clean tom$ virtualenv venv --no-site-packages
Using base prefix '/Users/tom/.pyenv/versions/3.7.0'
New python executable in /Users/tom/phd/minecraft_clean/venv/bin/python3.7
Also creating executable in /Users/tom/phd/minecraft_clean/venv/bin/python
Installing setuptools, pip, wheel...
done.
Toms-MacBook-Pro-3:minecraft_clean tom$ source venv/bin/activate
(venv) Toms-MacBook-Pro-3:minecraft_clean tom$ pip install malmo
Collecting malmo
  Using cached https://files.pythonhosted.org/packages/a5/12/71cfbf665a6b4c98e329691d738884721412072d08006e71367e3963dc4b/malmo-0.36.0.0-cp37-cp37m-macosx_10_13_x86_64.whl
Installing collected packages: malmo
Successfully installed malmo-0.36.0.0
(venv) Toms-MacBook-Pro-3:minecraft_clean tom$ python -c 'import malmo.minecraftbootstrap; malmo.minecraftbootstrap.download()'
Cloning into 'MalmoPlatform'...
remote: Enumerating objects: 44, done.
remote: Counting objects: 100% (44/44), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 15280 (delta 18), reused 34 (delta 15), pack-reused 15236
Receiving objects: 100% (15280/15280), 28.14 MiB | 9.85 MiB/s, done.
Resolving deltas: 100% (9888/9888), done.
Please make sure you set the MALMO_XSD_PATH environment variable to "/Users/tom/phd/minecraft_clean/MalmoPlatform/Schemas"!
(venv) Toms-MacBook-Pro-3:minecraft_clean tom$ export MALMO_XSD_PATH=/Users/tom/phd/minecraft_clean/MalmoPlatform/Schemas
(venv) Toms-MacBook-Pro-3:minecraft_clean tom$ python -c 'import malmo.minecraftbootstrap; malmo.minecraftbootstrap.launch_minecraft()'
Nothing is listening on port 10000 - will attempt to launch Minecraft from a new terminal.
Giving Minecraft some time to launch...
(venv) Toms-MacBook-Pro-3:minecraft_clean tom$ python -c 'from malmo.run_mission import run; run()'
Traceback (most recent call last):
  File "/Users/tom/phd/minecraft_clean/venv/lib/python3.7/site-packages/malmo/run_mission.py", line 32, in <module>
    import MalmoPython
ModuleNotFoundError: No module named 'MalmoPython'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/tom/phd/minecraft_clean/venv/lib/python3.7/site-packages/malmo/run_mission.py", line 35, in <module>
    import malmo.MalmoPython as MalmoPython
ImportError: dlopen(/Users/tom/phd/minecraft_clean/venv/lib/python3.7/site-packages/malmo/MalmoPython.so, 2): Library not loaded: /usr/local/opt/boost-python3/lib/libboost_python37-mt.dylib
  Referenced from: /Users/tom/phd/minecraft_clean/venv/lib/python3.7/site-packages/malmo/MalmoPython.so
  Reason: image not found

I understand from the documentation that this error can occur when attempting to build from source, but I am not -- I am installing with pip.
Thanks for your help!

I recently built a new binary release which may work for you: https://github.com/microsoft/malmo/releases/download/0.37.0/Malmo-0.37.0-Mac-64bit_withBoost_Python3.7.zip. The wheel seems to no longer find dependencies that used to be installed with boost.

Thanks! I am making do with malmoenv for now. It would be good to put a note in the documentation in case others try to pip install malmo in the meantime.

There's a new native wheel for MacOS for Python 3.7. It may work for you - if not some investigation of missing dependencies (boost python most likely), for example running ldd on MalmoPython.so would be helpful.

I'm closing this due to inactivity - if there is still an issue that needs resolving, please reopen and provide more details, thanks!

authors: AndKram DaveyBiggers tomsilver

repo: microsoft/malmo


text:
Add Web API for MarkItDown

Related to #133

In Testing

Thank you very much, we need api interface access in order to utilize automated processes, we are very optimistic about this project, thanks again to the great developers.

repo: microsoft/markitdown


text:
Discussion: [Title Bar Consistency]

** Discussion: [Title Bar Consistency]**
I have been looking at various title bar sizes and each one of them are not consistent in either: title bar size, fon't size, vertical alignment of the text as well as the vertical alignment of the minimize, maximize, or close buttons. I think some work needs to be done to keep these things consistent here is a photo of three four different applications. Notepad - a Win32 app, Xbox (beta) An Electron app, Calculator which is a UWP app, Edge Chromium, and Grove Music.
@bitcrazed spoke on the issues an challenges involved with this process,

@mdtauk Depending on what UI framework an app is built, you may see system buttons of slightly different sizes and shapes. For example:
Win32 apps like Notepad rely on the OS (GDI/DComp) to draw system controls and so get a standard sized title bar
Chrome / Edgeium draws its own non-client area in order to get its tabs up into the title bar, and draws its own system buttons ... aligned to the top edge of its Window for ... 'reasons'
Terminal also draws its own non-client area to get its tabs up into the title bar region, and in order to make the tabs fit, we have a taller title/tab bar.
In Terminal, we chose to scale & center the system buttons in the available title bar space, which results in them being a little bigger, but still square and in proportion:

I think going forward, these differences need to be eliminated by using the same control or the appearance of the same control to create the exact same result.

Related Links
https://github.com/microsoft/terminal/issues/1375#issuecomment-526275909
https://github.com/microsoft/terminal/issues/1375#issuecomment-526284633

I wouldn't say that any difference "needs" to be "eliminated", in your screenshot on the left the caption buttons were intentionally centered. At the end of the day the caption buttons are also an item of design for the app developer.
Imo, UWP has already made it easy to customize the title bar with ExtendViewIntoTitleBar that retains the caption buttons, whereas doing the same thing in win32 is exceedingly hard. So I'm not sure what this issue is about. Is this a request to standardize caption buttons across inbox Windows apps?

There are a number of different Frameworks being used, and each of those does handle its own Titlebar drawing.
Win32 frameworks, like MFC or WinForms - will most likely not make any changes, so as not to introduce compatibility problems with classic apps running on Windows 10/Core/Modern OS.
Apps that use the Ribbon control, also override the window controls because the ribbon interacts with that region.
WPF has a Window object, and the community could opt to make any changes to their TitleBars, but many apps opt out of the standard window controls, and "roll their own".
UWP apps can extend into the TitleBar, and re-colour the window controls - the sizing of which is designed for High DPI and the 4px grid.
Then there is Edge, Electron Apps, which all do their own thing.
WinUI Desktop may be able to use the new Windowing APIs, a XAML Window object, and updated shell Interops - to provide easier ways for users of these frameworks, to update their TitleBars to use the default control sizes, glyphs, but with the ability to customise or extend into the TitleBar area, so these customised versions can be replaced, and consistency brought in over time

I wouldn't say that any difference "needs" to be "eliminated", in your screenshot on the left the caption buttons were intentionally centered. At the end of the day the caption buttons are also an item of design for the app developer.
Imo, UWP has already made it easy to customize the title bar with ExtendViewIntoTitleBar that retains the caption buttons, whereas doing the same thing in win32 is exceedingly hard. So I'm not sure what this issue is about. Is this a request to standardize caption buttons across inbox Windows apps?

Well, that is part of the reason I am bringing it up. All of these are Microsoft apps. Each one of these are inconsistent in some way or form with the list in the original post. It wasn't just a case of the one all the way to left being centered and others aren't. Each one is different.
We know that a Win32 programs won't be updated, but at the same time a program like Notepad was put in the Microsoft Store, so things might change for that particular app.
At the same time, as posted in the related links, a new program like Terminal is having issues with having a consistent experience.
Of course third parties are going to do what ever they want, but if everything is consistent, they really shouldn't have to unless they want to.
This all about consistency,  which is why I bought it up.

This is a discussion topic @adrientetar  Not strictly a Feature Request.  But I would be happy to see formalised Window objects and APIs for WinUI Desktop apps (be they XAML, Win32, or MFC) frameworks, which make it easy and simple to customise the TitleBar in a consistent and robust way.

I think the most consistent way to make app titlebars consistent is to allow easy creation of the Windows Runtime's CoreWindow from non-UWP project types.

There is design guidance, but the WinAppSDK Titlebar does not yet contain all the properties to make these consistent with what is suggested.

Specific call outs:

Tall mode for the Window Caption Buttons
App Icon toggle, along with Release/Preview subtext
There are no windowing events for styling the TitleBar control when Inactive.

authors: adrientetar duke7553 mdtauk shaheedmalik

repo: microsoft/microsoft-ui-xaml


text:
Unable to launch WinUI 3 app after installing from .appxbundle

Describe the bug

I created a WinUI 3 for desktop app more or less following the template given here. Today I reached the point where I'd like to start distributing it for to get some user feedback, and with that in mind, I created an .appxbundle and installed my app via said .appxbundle. However, after installing, clicking my application in the start menu to run it had zero effect. My app simply doesn't launch.
Note: If rather than deploying my application from the .appxbundle, I instead build it from Visual Studio, then I am able to run the identical Start menu entry created by Visual Studio with no issue. The problem only occurs when trying to run the start menu entry created by installing from the .appxbundle.

Steps to reproduce the bug

Steps to reproduce the behavior:

Check out the code from this repo, master branch.
Load the solution in Visual Studio.
a. Visual Studio should be at least version 2019 16.9 Preview
b. You'll also need to have followed all the steps listed here under Install WinUI 3 Preview 4 to run everything properly.
Right-click on the "GHelper (Package)" project.
Click Publish → Create App Packages....
In the "Select distribution method" dialogue choose "Sideloading".
(I'm not sure what you'll see on the next page, but I assume it'll prompt you for a certificate. Mine might be included but you may prefer to use your own.)
Once you've selected a signing method, on the next dialogue "Select and configure packages":
a. choose your preferred location for the output (I chose my Downloads folder).
b. "Version" should be ok to leave as it is (but if it's blank just put in something like "1.0.1.0").
c. Set "Generate app bundle" to "Always" if it's not already.
d. Under "Select the packages to create and the solution configuration mappings:", under "Architecture" check "x64", and under "Solution Configuration" select "DebugRelease (x64)" (you could also try "Release", it doesn't seem to matter as both lead to the same outcome).
e. Check "Include public symbol files...".
Click "Create".
Once the .appxbundle is created in your chosen destination folder, open the directory, find the file starting in "GHelper" and ending in ".appxbundle", and run it. Install the GHelper application.
(If you have trouble installing because the certificate is untrusted, you should be able to find the certificate you used in the same directory as the .appxbundle. Try right-clicking it, clicking "Install", choosing the "Store Location" of "Local Machine" and explicitly placing the cert in the "Trusted Publishers" store. That fixed the issue for me anyway.)
Locate "GHelper (Package)" in your Start menu and run it.

Expected behavior
I expect to see my main application window, the same that I'm able to see when I run my app from within Visual Studio.
Screenshots

Version Info

NuGet package version:
Microsoft.WinUI 3.0.0-preview4.210210.4

Windows app type:

UWP
Win32

No
Yes

Windows 10 version
Saw the problem?

Insider Build (xxxxx)

October 2020 Update (19042)
Yes

May 2020 Update (19041)

November 2019 Update (18363)

May 2019 Update (18362)

October 2018 Update (17763)

April 2018 Update (17134)

Fall Creators Update (16299)

Creators Update (15063)

Device form factor
Saw the problem?

Desktop
Yes

Xbox

Surface Hub

IoT

Additional context

@codendone or @Austin-Lamb FYI

Could be tooling as well, @fabiant3

It looks like https://github.com/microsoft/microsoft-ui-xaml/issues/3749 , which is already fixed in preview 4.

Well, for whatever reason, it seems to be working now. I don't think I changed anything but I tried to publish it again today, following the same steps as before, and now it works. I'll just go ahead and close this.

authors: AJLeuer StephenLPeters huoyaoyuan


text:
If the ItemsView scrolls the scrollbar, the memory of the item will not be released.

Describe the bug
page

item

source code
TestApp.zip
Steps to reproduce the bug
https://github.com/user-attachments/assets/e6b99cdf-2b84-4091-ac5d-961673707ccf
Expected behavior
After leaving the page, memory should be freed
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.6.0: 1.6.240829007
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response

By the way, if the class inherits from itemsview, it will prompt 'Microsoft.UI.Xaml.dll! 00007FFF170F77C8: 80004002: no such interface supported'
 runtimeclass TableView : Microsoft.UI.Xaml.Controls.ItemsView
 {
     TableView();
 }

https://github.com/user-attachments/assets/8dd29c8c-868a-4d81-ba22-14bffe7fcef2

In these cases, Reference count is always 1 before the program ends.


text:
HTML support in hover (inline HTML in IMarkdownString)

monaco-editor version: latest
Browser:chrome
OS: win10
Steps or JS usage snippet reproducing the issue:
I want my completion item documentation or hover documentation have inline html.
For example, signature should be colorized, such as:

Here is what I've tried:

As the above image shows,  the inline html is santinized,.

@ryanlin1986 I also opened a separate #802 to describe the problem where the hover behaviour doesn't match VS Code's.

Not sure if it's related, but this feature seems to be broken in general since 0.11.x. One good example is if you go to https://microsoft.github.io/monaco-editor/playground.html#interacting-with-the-editor-rendering-glyphs-in-the-margin, switch to the CSS tab and hover over one of the rules. The content of the tooltip used to be colorised in previous versions, now it's printed as plain text with strange tick marks around them:

@mofux That's a bug with monaco-css. I've opened #805 as that's a different problem.

@ryanlin1986 do you happen to have that code example which you used in describing the issue? I have a problem displaying the hover message, as it cannot find IMarkdownString for some reason, although it's clearly exported.

I think we could settle for having a link that opens in the same tab but the current IMarkdownString pattern doesn't seem to support this either (just opening links in new tabs).

I did some experimenting and was able to achieve this via commands inside the IMarkdownString. I couldn't get this to work in the Monaco Editor Playground but maybe it's because it's inside of an iframe?
declare var monaco: any

// create the Monaco editor
const editor = monaco.editor.create(document.getElementById("container")!, {
    language: "plaintext",
    value: "hover here"
});

const cmdId = editor.addCommand(0, () => {
    window.location.href = "https://github.com/microsoft/monaco-editor/";
}, "")

monaco.languages.registerHoverProvider("plaintext", {
    provideHover() {
        return {
            contents: [
                {
                    value: `[Run Command](command:${cmdId})`,
                    isTrusted: true
                },
            ]
        }
    }
});

@alexdima Thanks, IMarkdownString.supportHTML seems to be what I'm looking for but I haven't been able to get it working in the playground with the below sample:

@dehoward Your code is a little off because your supportHtml and isTrusted is in the wrong place. Unfortunately, putting it in the right place seems doesn't seem to help outside of actually rendering it as a hyperlink. May or may not be because of the playground being embedded...?
monaco.languages.register({ id: 'mySpecialLanguage' });

monaco.languages.registerHoverProvider('mySpecialLanguage', {
	provideHover: function (model) {
        return {
            range: new monaco.Range(1, 1, model.getLineCount(), model.getLineMaxColumn(model.getLineCount())),
            contents: [
                {
                    value: "Link!",
                    supportHtml: true,
                    isTrusted: true
                },
            ]
        }
	}
});

monaco.editor.create(document.getElementById("container"), {
	value: '\n\nHover over this text',
	language: 'mySpecialLanguage'
});

@rcjsuen When I try your snippet, I actually see the correct HTML, so the lack of navigation might be some limitation of the playground's :

@rcjsuen thanks for catching my mistake. I see the link now with no navigation as you mentioned.
does a <button> work for you? I just see text on my end.
monaco.languages.register({ id: 'mySpecialLanguage' });

monaco.languages.registerHoverProvider('mySpecialLanguage', {
	provideHover: function (model) {
        return {
            range: new monaco.Range(1, 1, model.getLineCount(), model.getLineMaxColumn(model.getLineCount())),
            contents: [
                {
                    value: "<button onclick='alert(1)'>button!</button>",
                    supportHtml: true,
                    isTrusted: true
                },
            ]
        }
	}
});

monaco.editor.create(document.getElementById("container"), {
	value: '\n\nHover over this text',
	language: 'mySpecialLanguage'
});

@alexdima @mjbvz it may be helpful to have some documentation around which "subset of HTML elements" are allowed if there isn't some already.

authors: alexdima dehoward mofux nikita-fuchs rcjsuen ryanlin1986

repo: microsoft/monaco-editor


text:
error when inserting null in varbinary column

PHP Driver version or file name
pdo_sqlsrv 5.6.1+11919
SQL Server version
14.0.2027
Client operating system
windows 10
PHP version
7.3.13
Table schema
CREATE TABLE [dbo].[tableName] (
   [Id] int NOT NULL DEFAULT ((0)) ,
   [Doc_Blob] varbinary(MAX) NULL DEFAULT NULL
)

Problem description
When executing the following code to insert new record with null in the varbinary column:
$sql = "INSERT INTO tableName(Id, Doc_Blob) VALUES (?,?)";
$stmt= $pdo->prepare($sql);
$stmt->execute([1, null]);

Then the following error occurred

[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Implicit conversion from data type char to varbinary(max) is not allowed. Use the CONVERT function to run this query.

Expected behavior and actual behavior
The same query without parameters works fine
the same query with parameters works also fine in another environment (php 7.2.16 and pdo sql srv 5.4.0-preview)

@anthonymorel do note that this is by design, as indicated in our PDO documentation for binding parameters
This should not have worked in previous versions, as you have mentioned. I just double checked it myself:

Perhaps in your other environment, the column is of type varchar(max), not varbinary(max)?

The same query without parameters works fine

Because it is a generic query sent to the server, so no binding necessary.
To bind a null value to any binary field (varbinary, binary, or varbinary(max)), please do something like this:
$v1 = 1;
$v2 = null;
$sql = "INSERT INTO $tableName(Id, Doc_Blob) VALUES (?, ?)";
$stmt = $conn->prepare($sql);
$stmt->bindParam(1, $v1);
$stmt->bindParam(2, $v2, PDO::PARAM_LOB, 0, PDO::SQLSRV_ENCODING_BINARY);
$result = $stmt->execute();

You can see the values with SSMS afterwards, like this:

Hello
Thanks for your reply.
We have try your solution above.
However, we obtain the same error as previously.
Are there any parameters to set ? When opening the connection for example or elsewhere ?

authors: anthonymorel yitam

repo: microsoft/msphpsql


text:
Upgrade osgi jdbc add tck

This includes:

https://github.com/microsoft/mssql-jdbc/pull/2064
https://github.com/microsoft/mssql-jdbc/pull/2065

@Jeffery-Wasty I don't really understand how to get more details about the testfailure can you give me a hint?

@laeubi, we'll have to look into this. Previously the errors were caused by eclipse.osgi dependency, but now I'm not seeing that in our tests, I'll get back to you with more information. Regardless, we'll look at the upgrade to osgi.service and the new properties and see if we can get that merged first, those two changes look fine. Thank you for your work on this.

Can you please confirm for us the necessity and use of the test? Is implementation of this test required by spec, or is this just a confirmation that the properties have been added correctly. It looks like the issues are all caused by the added test, so if it can be omitted, that would help us.

It is not strictly required, this just ensures that the implementation is fulfilling the spec.
So if it can even be omitted, it would still be interesting why this fails (I can't really get an idea from the checks output), and I was not able to run the tests locally.

Thanks for the explanation. We're still looking into it, its not readily apparent from the logs why this is failing, but we'll keep you updated on progress regarding this pr.

Hi @laeubi,
The issue is that the test is that its using Junit5, and when this is invoked, causes issues in other tests in the project. If the tests can be rewritten only using features of Junit4 or below, that will allow it to pass and be included as part of the changes.
Comparing the test styles from this PR and #2017, I think the one in 2017 fits the project better, as opposed to the additional test information in the pom. Let's move forward with 2017 being the only PR for this change. We'll close the others, but thank you for this layered approach, it really helped in narrowing down on the problem.

authors: Jeffery-Wasty laeubi

repo: microsoft/mssql-jdbc


text:
Publish-BuildOutputToStorage: AuthenticationErrorDetail Signature fields not well formed

Description
Since the first of February the Publish-BuildOutputToStorage fails to deploy .app files to Azure Storage.
The error message is:
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. HTTP Status Code: 403 - HTTP Error Message: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
We are using BcContainerHelper 4.0.11. We also updated the Az PowerShell Module from version 7.4 to the latest 9.3.0, but that didn't help either.
We recreated a new SAS token for the Azure Storage and updated the Key Vault with that value.
Scripts used that cause the issue
Write-Host "Installing BcContainerHelper"
Install-Module BcContainerHelper -Force

Write-Host "Setting Azure Storage Container"
$projectName = "$($ENV:BUILD_REPOSITORY_NAME)"
Write-Host "$projectName"

Write-Host "Publishing to Storage"
Publish-BuildOutputToStorage -storageConnectionString "$(StorageConnectionString)" -projectName $projectName  -appVersion "$ENV:BUILD_BUILDNUMBER" -path "Artifacts\output" -setLatest

Full output of scripts
2023-02-02T10:05:05.3422169Z ##[section]Starting: PowerShell Script
2023-02-02T10:05:05.3498574Z ==============================================================================
2023-02-02T10:05:05.3498859Z Task         : PowerShell
2023-02-02T10:05:05.3499087Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2023-02-02T10:05:05.3499300Z Version      : 2.212.0
2023-02-02T10:05:05.3499479Z Author       : Microsoft Corporation
2023-02-02T10:05:05.3499755Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2023-02-02T10:05:05.3500085Z ==============================================================================
2023-02-02T10:05:07.2324416Z Generating script.
2023-02-02T10:05:07.2539405Z ========================== Starting Command Output ===========================
2023-02-02T10:05:07.2676718Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\BuildAgent\_work\_temp\46b6c2eb-2619-40b7-9fbc-ae76326d8f7b.ps1'"
2023-02-02T10:05:07.6831434Z Installing BcContainerHelper
2023-02-02T10:05:22.2029590Z Setting Azure Storage Container
2023-02-02T10:05:22.2048555Z pbl-core-library-preview
2023-02-02T10:05:22.2052141Z Publishing to Storage
2023-02-02T10:05:22.3441147Z BcContainerHelper version 4.0.11
2023-02-02T10:05:22.4857010Z BC.HelperFunctions emits usage statistics telemetry to Microsoft
2023-02-02T10:05:32.6371538Z Publish-BuildOutputToStorage Telemetry Correlation Id: 9729417c-000a-45e4-816e-911060164f26
2023-02-02T10:05:32.7097831Z Set-AzureStorageBlobContent : Server failed to authenticate the request. Make sure the value of Authorization header is
2023-02-02T10:05:32.7098533Z  formed correctly including the signature. HTTP Status Code: 403 - HTTP Error Message: Server failed to authenticate th
2023-02-02T10:05:32.7100317Z e request. Make sure the value of Authorization header is formed correctly including the signature.
2023-02-02T10:05:32.7100974Z ErrorCode: AuthenticationFailed
2023-02-02T10:05:32.7101561Z ErrorMessage: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctl
2023-02-02T10:05:32.7102100Z y including the signature.
2023-02-02T10:05:32.7102550Z RequestId:86f5d4d7-901e-0008-20ed-365674000000
2023-02-02T10:05:32.7103005Z Time:2023-02-02T10:05:31.5224142Z
2023-02-02T10:05:32.7103476Z AuthenticationErrorDetail: Signature fields not well formed.
2023-02-02T10:05:32.7104066Z At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.11\PackageHandling\Publish-BuildOutputToStorage.ps1
2023-02-02T10:05:32.7104583Z :81 char:21
2023-02-02T10:05:32.7105028Z + ...             Set-AzureStorageBlobContent -File $tempFile -Context $sto ...
2023-02-02T10:05:32.7105589Z +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-02-02T10:05:32.7106181Z     + CategoryInfo          : CloseError: (:) [Set-AzStorageBlobContent], StorageException
2023-02-02T10:05:32.7106756Z     + FullyQualifiedErrorId : StorageException,Microsoft.WindowsAzure.Commands.Storage.Blob.SetAzureBlobContentCommand
2023-02-02T10:05:32.7107381Z
2023-02-02T10:05:32.7810663Z ##[error]PowerShell exited with code '1'.
2023-02-02T10:05:32.8164706Z ##[section]Finishing: PowerShell Script

Additional context

It worked for more than 2 years, without any issue
Stopped working 01/02/2023

Apparently there is an issue with the SAS tokens. If you use the SAS token directly with the Azure PowerShell commands, I receive the same error. So it's not BcContainerHelper related.
If you use a normal Access Key Connection String instead of a SAS connection string it works. The original CICD HOL documentation specified using a SAS token.. And that worked for years., but not anymore.

repo: microsoft/navcontainerhelper


text:
Rewrite rules implementation for LLaMA-2/ LLaMA-3

Summary
This PR introduces the implementation of LLaMA 3 and LLaMA 2 rewrite rules for the MLP and LLaMAAttention layers in transformers. The rules are designed to work with transformer versions 4.39 to 4.42, and they handle the optimization and fusion operations.
Key Changes
MLP RewriteRule:
A new rewrite rule for optimizing the LLaMA MLP layer (LlamaMLP) in transformer versions 4.39 to 4.42.
The optimization includes handling different input sizes (5 or 6) and performing matrix multiplication and activation operations to produce an optimized output.
GQA Llama RewriteRule:
Introduces a rewrite rule for the LLaMAAttention layer as well as the first attention (LlamaAttention) with support for specified number of inputs.
Two methods are implemented for handling 2D and 4D cache configurations during the Group Query Attention (GQA) process, enabling optimized matrix multiplication and attention operations.

Congrats on your first PR! 🎉 For autofix-able lint errors, you can follow https://github.com/microsoft/onnxscript#coding-style to run the autofix.

repo: microsoft/onnxscript


text:
Minecraft Loading Issue

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006227c153, pid=8460, tid=7940

JRE version: OpenJDK Runtime Environment Microsoft-22300 (16.0.1+9) (build 16.0.1+9)
Java VM: OpenJDK 64-Bit Server VM Microsoft-22300 (16.0.1+9, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
Problematic frame:
C  [atio6axx.dll+0x14c153]

No core dump will be written. Minidumps are not enabled by default on client versions of Windows

If you would like to submit a bug report, please visit:
https://github.com/microsoft/openjdk/issues
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.

@elance02 - Thanks for posting this to us! Are you able to tell us:

Which version of Minecraft you're using
Do you have any Minecraft Mods installed?
Which exact version of Windows are you using?
Does this crash repeatedly happen or only on occasion?

Just wanted to mention I was looking for JDK for Minecraft and after seeing this post figured I would try it. It seems to work fine for me with minecraft server version 1.16.5.
Command line options:
javaw.exe -Xms512M -Xmx4G -XX:SoftMaxHeapSize=1G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:G1HeapRegionSize=32M -Xbatch -jar server.jar

authors: elance02 karianna rednnnno

repo: microsoft/openjdk


text:
Optimize register saving code across VP.ENTER in the kernel

Today, we save/restore many registers in what may be more conservative than required. It would be good to see if some registers (like the syscall MSRs) could only be save restored as necessary depending on the state of the guest. KVM has some optimizations around this path that perhaps we could follow.
(migrated from https://github.com/microsoft/HvLite/issues/433)

Items to consider:
tenraja29 referred to the new RDMSRLIST/WRMSRLIST instruction for optimization https://software.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html
yjiang5 looked into the handling of MSR_LSTAR/MSR_STAR for potential optimization. This work is along the lines of https://lore.kernel.org/all/1253105134-8862-1-git-send-email-avi@redhat.com/. This optimization considers various scenarios for context switch that can make register-saving lazier.

TSC_AUX saving can be deferred as KVM does.
Besides STAR and LTAR, EFER and TSK_CTL can also be optimized in a similar manner. (See vmx_setup_uret_msrs())
Another potential area of optimization is the FPU state as done in kvm_load_[guest, host]_xsave_state. I need to look closer on whether it is applicable.

Another potential area of optimization is the state of the FPU. Perhaps this is not need since, again, we know that the kernel does not use, and we can know whether OHCL L1 user space uses it now (or in the future).

repo: microsoft/openvmm


text:
自动检测然后分配足够的内存

华南理工在使用过程中提出的建议：
**现状：**提交作业时需要指定内存大小
**难点：**不同的代码跑起来不能完全确定内存的需求，希望OpenPAI可以有个自适应的管理方式，由OpenPAI自动检测然后分配足够的内存。

figure out the right amount of resource for each job and optimize the resource allocation among jobs is a multi-dimension bin packing problem (NP hard). We do not recommend to go along this direction.  Right now, the cluster divides all the resources into a fix amount of "slice", a job can choose the right amount of slices to fit its need. This is what most of the cluster scheduler does.

repo: microsoft/pai


text:
[Web Portal] fix retry count's margin-top #2845

#2845

Coverage remained the same at 53.313% when pulling a036a95f1e6fb39c332f3664da6dbe124f53cf22 on qinsu/portal/retry-2 into 631924f48887e8566923847e5f796481f19d1e4d on pai-0.13.y.

authors: coveralls sunqinzheng


text:
Allow users to access IP/TCP/UDP headers

This will allow users to access packet metadata without needing to parse
the "parsedPacket" string, and will also allow them to access the packet
data present after the headers for further computation, because the
header addresses are now exposed.
The IPHeader, TCPHeader, UDPHeader structs have been moved outside
PacketFragmentArgs to allow definition of properties with the same name.
They have been converted from structs to class to make them into
reference types and therefore have the homonymic properties return null
if the corresponding header was not successfully parsed by
ParsePacket().
I am proposing this change because I need to parse DNS request/response
in packets, and it is almost impossible to do it with the current class
structure without duplicating the code of FIndIpHeader(), and I think
that it's much cleaner to expose the headers themselves rather than just
exposing FindIpHeader() and having the users duplicate the parsing
logic.

@brianrob could you please review? This is the last bit I need for my own ETL parsing tool which interprets DNS data. Thanks! :)

@lupino3 thanks for submitting.  I will need a bit of time to look through this, but consider this an ack.

repo: microsoft/perfview


text:
[core]: relax pin on stac-validator

Description
Relaxes the pin on stac-validator, to make it possible to solve in an environment with stactools / stac-check. xref https://github.com/stac-utils/stac-check/issues/88, which discusses the pin in stac-check to 3.2.0.

I suspect this pin wasn't deliberate, so I'll merge this after CI passes.

repo: microsoft/planetary-computer-tasks


text:
Error: Configuration file not found. Either pass --config, or create folio.config.(js|ts) file

Why need create configuration file?
"dependencies": {
    "@playwright/test": "^0.1101.0"
  },

run: npx folio --tag=chromium
Error: Configuration file not found. Either pass --config, or create folio.config.(js|ts) file
    at runTests (/Users/name/projects/playwright-test/examples/basic-ts/node_modules/folio/out/cli.js:116:15)
    at Command.<anonymous> (/Users/name/projects/playwright-test/examples/basic-ts/node_modules/folio/out/cli.js:87:15)
    at Command.listener [as _actionHandler] (/Users/name/projects/playwright-test/examples/basic-ts/node_modules/commander/index.js:426:31)
    at Command._parseCommand (/Users/name/projects/playwright-test/examples/basic-ts/node_modules/commander/index.js:1002:14)
    at Command.parse (/Users/name/projects/playwright-test/examples/basic-ts/node_modules/commander/index.js:801:10)
    at Object.<anonymous> (/Users/name/projects/playwright-test/examples/basic-ts/node_modules/folio/out/cli.js:94:13)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:996:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/name/projects/playwright-test/examples/basic-ts/node_modules/folio/cli.js:19:1)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)```

This requirement is needed in the most recent version of Playwright-Test and Folio. They developers make each test environment flexible to their needs, while consistent. Writing a config.ts file is easy. Have you checked out the documentation  for writing a configuration file yet? There's more information about how flexible config files can be here too.
When you write one, put it in the root of your directory and it should work. Give it a try and if you have problems, post back. :)

Closing since the new test-runner is quite different. If its still reproducible for you, please create a new issue.

authors: BillyBolton avevlad mxschmitt

repo: microsoft/playwright-test


text:
Make assumptions about type of objects in array when adding new objects

Is your feature request related to a problem? Please describe.
Adding a new item to an array starts off with a null variable.
I am adding a new image to an array of images

Pressing plus adds a blank

Pressing + would ideally check that all the items in the array are the same type, and if so start with an empty version of the same type of variable
Describe the solution you'd like
The blank variable is an empty image
Describe alternatives you've considered
Alternative, duplicating an object inside an array could add it into the array? Seems less of a win though

We already do this for shadow blocks, right @jwunderl? We should generalize it for non-shadows

Yeah, currently just adds another one of whatever shadow it started with when you pulled the block out, worked with (non-decompiled) image arrays back when the animation editor didn't have the field editor if I remember right. Definitely an issue I've noticed before and forgotten to file after I finished making a game

authors: jwunderl orta riknoll

repo: microsoft/pxt-arcade


text:
Link sharing problem

Hi there,
We are working on a quite intense project for next week and currently rehearsing.
When we do Share > Publish > Copy we get a page missing.
It seems to be working on the very same computer that has originated the link, but not anything else. There are currently 3 of us working, sharing the links via Zoom, etc.
The behaviour is very erratic - it seems sometimes it's opening it, sometimes not. Is there an issue with your server?
Please let us know as we have 370 students starting on Tuesday!!!

Yesterday some Microsoft services experienced DNS issues, and this impacted our shared game storage. That issue has been mitigated and everything should be back online now. If you're still seeing this problem let us know and we'll investigate further.

This should be fixed. If not let us know.

authors: abchatra eanders-MS enricoconductive


text:
EXPLANATION.md

-
💠
(put the explanations here
e.g.FAQ, the so whats, and etc.)

Could you give more details?

authors: AnonAmazing pelikhan

repo: microsoft/pxt


text:
Get rid of extraneous dependencies to resurrect the ---asseteditor page

This looks way, way, scarier than it actually is! All this PR does is move things around a bit to make our dependency graph a little less complicated. Basically, the /---asseteditor page broke a while back when the cloudsync stuff went in. Obviously the cloudsync stuff shouldn't even be in the  /---asseteditor page at all, so I had to untangle our imports a bit.
The big culprit was fireClickOnEnter which we use all over the place and is exported by sui.tsx (which itself requires app.tsx). I factored that out into a new file along with some of the asset editor utils that were also drawing in package.ts for no good reason.
To fix this, I wrote a script to trace the dependency graph and figure out the culprit. Here's how the dependency graph looked for the package.ts issues:
cloudsync-> /dialogs.js-> /container.js-> /headerbar.js-> /app.js-> /cloud.js-> /auth.js-> /core.js->
/compiler.js-> /workspace.js-> /package.js-> /components/assetEditor/store/assetEditorReducer.js->
/components/assetEditor/assetCard.js-> /components/ImageFieldEditor.js-> /assetEditor.js

@riknoll what is the status of this?

I need to resolve the conflicts, but i've been busy.
I'll close this and resurrect it later

authors: abchatra riknoll


text:
How to get imports generated across project roots?

Environment data

Language Server version: 2021.7.5-pre.1
OS and version: linux x64
Python version: 3.9.6
python.analysis.indexing: undefined
python.analysis.typeCheckingMode: off

Expected behavior
If I write main_function in a/test_plugin_a/__init__.py and ask for autocompletion or import generation, I expect this function to be suggested with from main_project import main_function.
Actual behavior
It doesn't happen. However, Pylance clearly understands the import location, because if I manually add the import, "Go to definition" works fine. "Go to references" on the other hand does not find a reference to that function in the plugin root.
Logs
Python Language Server Log
[Info  - 2:47:23 PM] Pylance language server 2021.7.5-pre.1 (pyright 209f9621) starting
[Info  - 2:47:23 PM] Server root directory: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist
[Info  - 2:47:23 PM] No configuration file found.
[Info  - 2:47:23 PM] No pyproject.toml file found.
[Info  - 2:47:23 PM] Setting pythonPath for service "mainproject": "/home/adrian/dev/vscode-python-roots-test/.venv/bin/python"
[Warn  - 2:47:23 PM] stubPath /home/adrian/dev/vscode-python-roots-test/mainproject/typings is not a valid directory.
[Info  - 2:47:23 PM] Assuming Python version 3.9
[Info  - 2:47:23 PM] Assuming Python platform Linux
Search paths for /home/adrian/dev/vscode-python-roots-test/mainproject
  /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stdlib
  /home/adrian/dev/vscode-python-roots-test/mainproject
  /home/adrian/dev/vscode-python-roots-test/mainproject
  /home/adrian/dev/vscode-python-roots-test/mainproject/typings
  /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stubs/...
  /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/bundled/stubs
  /home/adrian/.pyenv/versions/3.9.6/lib/python3.9
  /home/adrian/.pyenv/versions/3.9.6/lib/python3.9/lib-dynload
  /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages
  /home/adrian/dev/vscode-python-roots-test/plugins/a
  /home/adrian/dev/vscode-python-roots-test/mainproject
[Warn  - 2:47:24 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 2:47:24 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 2:47:24 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Info  - 2:47:24 PM] Searching for source files
[Info  - 2:47:24 PM] Found 2 source files
[Info  - 2:47:24 PM] Background analysis(1) root directory: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist
[Info  - 2:47:24 PM] Background analysis(1) started
Background analysis message: setConfigOptions
Background analysis message: ensurePartialStubPackages
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
[Info  - 2:47:24 PM] Background analysis(2) root directory: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist
[Info  - 2:47:24 PM] Background analysis(2) started
[Info  - 2:47:24 PM] No configuration file found.
[Info  - 2:47:24 PM] No pyproject.toml file found.
[Info  - 2:47:24 PM] Setting pythonPath for service "plugins": "/home/adrian/dev/vscode-python-roots-test/.venv/bin/python"
[Warn  - 2:47:24 PM] stubPath /home/adrian/dev/vscode-python-roots-test/plugins/typings is not a valid directory.
[Info  - 2:47:24 PM] Assuming Python version 3.9
[Info  - 2:47:24 PM] Assuming Python platform Linux
Search paths for /home/adrian/dev/vscode-python-roots-test/plugins
  /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stdlib
  /home/adrian/dev/vscode-python-roots-test/plugins
  /home/adrian/dev/vscode-python-roots-test/mainproject
  /home/adrian/dev/vscode-python-roots-test/plugins/typings
  /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stubs/...
  /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/bundled/stubs
  /home/adrian/.pyenv/versions/3.9.6/lib/python3.9
  /home/adrian/.pyenv/versions/3.9.6/lib/python3.9/lib-dynload
  /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages
  /home/adrian/dev/vscode-python-roots-test/plugins/a
  /home/adrian/dev/vscode-python-roots-test/mainproject
[Warn  - 2:47:24 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 2:47:24 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 2:47:24 PM] Exception received when installing recursive file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Info  - 2:47:24 PM] Searching for source files
[Info  - 2:47:24 PM] Found 2 source files
Background analysis message: setConfigOptions
Background analysis message: ensurePartialStubPackages
Background analysis message: analyze
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
Background analysis message: analyze
[BG(1)] parsing: /home/adrian/dev/vscode-python-roots-test/mainproject/setup.py [fs read 0ms] (18ms)
[BG(2)] parsing: /home/adrian/dev/vscode-python-roots-test/plugins/a/setup.py [fs read 1ms] (14ms)
[BG(1)] parsing: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 2ms] (83ms)
[BG(2)] parsing: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 2ms] (77ms)
[Info  - 2:47:24 PM] Indexer background runner(3) root directory: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist
[Info  - 2:47:24 PM] Indexing(3) started
[BG(1)] binding: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stdlib/builtins.pyi (38ms)
[BG(1)] binding: /home/adrian/dev/vscode-python-roots-test/mainproject/setup.py (0ms)
[BG(1)] indexing: /home/adrian/dev/vscode-python-roots-test/mainproject/setup.py [found 0] (1ms)
Indexing Done: /home/adrian/dev/vscode-python-roots-test/mainproject/setup.py
[BG(1)] parsing: /home/adrian/dev/vscode-python-roots-test/mainproject/main_project/__init__.py [fs read 1ms] (2ms)
[BG(1)] binding: /home/adrian/dev/vscode-python-roots-test/mainproject/main_project/__init__.py (0ms)
[BG(1)] indexing: /home/adrian/dev/vscode-python-roots-test/mainproject/main_project/__init__.py [found 2] (0ms)
Indexing Done: /home/adrian/dev/vscode-python-roots-test/mainproject/main_project/__init__.py
[BG(2)] binding: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stdlib/builtins.pyi (37ms)
[BG(2)] binding: /home/adrian/dev/vscode-python-roots-test/plugins/a/setup.py (0ms)
[BG(2)] indexing: /home/adrian/dev/vscode-python-roots-test/plugins/a/setup.py [found 0] (1ms)
Indexing Done: /home/adrian/dev/vscode-python-roots-test/plugins/a/setup.py
[BG(2)] parsing: /home/adrian/dev/vscode-python-roots-test/plugins/a/test_plugin_a/__init__.py [fs read 1ms] (3ms)
[BG(2)] binding: /home/adrian/dev/vscode-python-roots-test/plugins/a/test_plugin_a/__init__.py (0ms)
[BG(2)] indexing: /home/adrian/dev/vscode-python-roots-test/plugins/a/test_plugin_a/__init__.py [found 0] (0ms)
Indexing Done: /home/adrian/dev/vscode-python-roots-test/plugins/a/test_plugin_a/__init__.py
[Info  - 2:47:24 PM] Indexer background runner(4) root directory: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist
[Info  - 2:47:24 PM] Indexing(4) started
[IDX(3)] index libraries /home/adrian/dev/vscode-python-roots-test/mainproject ...
[IDX(3)]   read stdlib indices (77ms)
[IDX(4)] index libraries /home/adrian/dev/vscode-python-roots-test/plugins ...
[IDX(4)]   read stdlib indices (75ms)
[IDX(3)]   scan packages [found 15 modules over 1 exec env] (139ms)
[IDX(3)]   index execution environment /home/adrian/dev/vscode-python-roots-test/mainproject ...
[IDX(3)]     parsing: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi [fs read 1ms] (44ms)
[IDX(4)]   scan packages [found 16 modules over 1 exec env] (142ms)
[IDX(3)]     parsing: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 1ms] (45ms)
[IDX(3)]     binding: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stdlib/builtins.pyi (8ms)
[IDX(3)]     binding: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi (2ms)
[IDX(3)]     indexing: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi [found 70] (1ms)
[IDX(3)]     parsing: /home/adrian/.pyenv/versions/3.9.6/lib/python3.9/xml/__init__.py [fs read 1ms] (6ms)
[IDX(3)]     binding: /home/adrian/.pyenv/versions/3.9.6/lib/python3.9/xml/__init__.py (0ms)
[IDX(3)]     indexing: /home/adrian/.pyenv/versions/3.9.6/lib/python3.9/xml/__init__.py [found 0] (0ms)
[IDX(3)]     parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/pip/__init__.py [fs read 0ms] (0ms)
[IDX(3)]     binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/pip/__init__.py (0ms)
[IDX(3)]     indexing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/pip/__init__.py [found 2] (0ms)
[IDX(4)]   index execution environment /home/adrian/dev/vscode-python-roots-test/plugins ...
[IDX(4)]     parsing: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi [fs read 1ms] (47ms)
[IDX(3)]     parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/__init__.py [fs read 0ms] (11ms)
[IDX(3)]     binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/__init__.py (1ms)
[IDX(3)]     indexing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/__init__.py ...
[IDX(3)]       parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/_deprecation_warning.py [fs read 0ms] (1ms)
[IDX(3)]       binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/_deprecation_warning.py (0ms)
[IDX(3)]       parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/extension.py [fs read 0ms] (1ms)
[IDX(3)]       binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/extension.py (0ms)
[IDX(3)]       parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/dist.py [fs read 0ms] (27ms)
[IDX(3)]       binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/dist.py (1ms)
[IDX(3)]       parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/depends.py [fs read 0ms] (4ms)
[IDX(3)]       binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/depends.py (0ms)
[IDX(3)]     indexing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/__init__.py [found 8] (34ms)
[IDX(3)]   index execution environment /home/adrian/dev/vscode-python-roots-test/mainproject [found 7937 in 408 files] (155ms)
[IDX(3)] index libraries /home/adrian/dev/vscode-python-roots-test/mainproject [found 7937 in 1 exec envs] (372ms)
[Info  - 2:47:24 PM] Indexer done(3). indexed 408 files
[IDX(4)]     parsing: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 1ms] (44ms)
[IDX(4)]     binding: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stdlib/builtins.pyi (9ms)
[IDX(4)]     binding: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi (1ms)
[IDX(4)]     indexing: /home/adrian/.vscode-server-insiders/extensions/ms-python.vscode-pylance-2021.7.5-pre.1/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi [found 70] (1ms)
[IDX(4)]     parsing: /home/adrian/.pyenv/versions/3.9.6/lib/python3.9/xml/__init__.py [fs read 1ms] (5ms)
[IDX(4)]     binding: /home/adrian/.pyenv/versions/3.9.6/lib/python3.9/xml/__init__.py (0ms)
[IDX(4)]     indexing: /home/adrian/.pyenv/versions/3.9.6/lib/python3.9/xml/__init__.py [found 0] (0ms)
[IDX(4)]     parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/pip/__init__.py [fs read 0ms] (1ms)
[IDX(4)]     binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/pip/__init__.py (0ms)
[IDX(4)]     indexing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/pip/__init__.py [found 2] (0ms)
[IDX(4)]     parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/__init__.py [fs read 0ms] (10ms)
[IDX(4)]     binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/__init__.py (1ms)
[IDX(4)]     indexing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/__init__.py ...
[IDX(4)]       parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/_deprecation_warning.py [fs read 0ms] (0ms)
[IDX(4)]       binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/_deprecation_warning.py (1ms)
[IDX(4)]       parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/extension.py [fs read 0ms] (1ms)
[IDX(4)]       binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/extension.py (0ms)
[IDX(4)]       parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/dist.py [fs read 0ms] (24ms)
[IDX(4)]       binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/dist.py (0ms)
[IDX(4)]       parsing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/depends.py [fs read 0ms] (3ms)
[IDX(4)]       binding: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/depends.py (0ms)
[IDX(4)]     indexing: /home/adrian/dev/vscode-python-roots-test/.venv/lib/python3.9/site-packages/setuptools/__init__.py [found 8] (30ms)
[IDX(4)]   index execution environment /home/adrian/dev/vscode-python-roots-test/plugins [found 7937 in 408 files] (154ms)
[IDX(4)] index libraries /home/adrian/dev/vscode-python-roots-test/plugins [found 7937 in 1 exec envs] (372ms)
[Info  - 2:47:24 PM] Indexer done(4). indexed 408 files

and the log from when I use ctrl-period to attempt to generate the import via code actions:
Background analysis message: getDiagnosticsForRange

from ctrl-space for autocompletion:
[FG] completion at /home/adrian/dev/vscode-python-roots-test/plugins/a/test_plugin_a/__init__.py:0:13 [found 0 items] (5ms)

Code Snippet / Additional information
Here's a Git repo with my minimal example project where I tested it: https://github.com/ThiefMaster/vscode-python-roots-test
As you can see in the workspace settings, I already tried using the python.*.extraPaths options, but to no avail. I also installed both of the packages in the Python virtualenv via pip install -e ... in case it made a difference - but nope.
In my main project I have indexing enabled btw, but it doesn't seem to make a difference.

It sounds like you're describing #1055. If you haven't already imported the file from your workspace (either directly or via some other file), then we won't have analyzed the file, so won't suggest anything. The indexer is currently disabled for user code except in the case of quick fixes, which is #1055, so having the file already be analyzed is what makes it work.

Can you try opening that file you want auto-imports from, then see if the auto import works in the other file?

I'm pretty sure that was already the case when I tested it earlier today - but I just tested again and I didn't get the completions suggested either..

Did you already have the opportunity to have a closer look into this problem?

I am having the same issue also

@ThiefMaster assuming you have indexing option set "python.analysis.indexing": true in settings.json, if you open "vscode-python-roots-test" as root folder, you will see code actions for add imports.

we currently don't show symbols defined in user files in completion to reduce number items in the completion.
in case you are using multi root workspace with pip install -e, we only supports top level symbols by default in completion. you will need to use our hidden options in settings.json to make us to discover symbols in sub modules.
see this https://github.com/microsoft/pylance-release/issues/2312#issuecomment-1065637710

I also opened this issue to improve multi root workspace UX - https://github.com/microsoft/pylance-release/issues/2601

authors: ThiefMaster heejaechang jakebailey xiaolongjiangkolena

repo: microsoft/pylance-release


text:
Check file open mode

It would be great if Pylance can help check whether a file is opened with an appropriate (writable) mode. For example,
with open("hello.txt") as w:
    w.write("hello!")  # <-- Oops, it should have been opened with a writable file mode, e.g. "w".

Thanks for the suggestion.
The file open mode is an internal detail of the return object, and it's unfortunately not reflected in the type. The same type is returned regardless of the open mode, so a type checker like Pylance doesn't (nor should) have the knowledge to emit a diagnostic in this case.

Uh, I see. Thanks for the quick response.

authors: erictraut yzhang-gh


text:
[Bug] Function parentheses autocomplete does not recognize existing parentheses

If completeFunctionParens is true, existing parentheses for function calls are not recognized and new ones are added.
Workaround is to deactivate completeFunctionParens, but then this very helpful functionality is lost.
Environment data

Language Server version: v2022.7.20
OS and version: Windows 10
Python version (& distribution if applicable, e.g. Anaconda): 3.8.10
"python.analysis.completeFunctionParens": true

Code Snippet
See "Repro Steps", but basically any Python code when completeFunctionParens is true.
Repro Steps

Have existing function call (doesn't matter if the call has parameters).
Try to replace function call (to trigger autocomplete)
Observed additional parentheses

Expected behavior
No additional parentheses added (see Pycharm example below)

Actual behavior
Parentheses added:

Hi @danrauch. We're unable to reproduce this issue using the latest version of Pylance, v2023.12.1. However, if you are able to still reproduce this, let us know and we can reopen it.

@luabud, this repros for me in both 2023.12.1 and latest prerelease.

Thanks for looking into this. @luabud, I, too, can still reproduce this with v2024.1.100

Repro steps:

Set "python.analysis.completeFunctionParens": true
Create file with this code (as an example):

def oneFunction():
    pass

def anotherFunction():
    pass

oneFunction()

Select the oneFunction portion of the oneFunction() call.
Type anot
Select anotherFunction from the completion suggestions.
Press Tab

Result:
def oneFunction():
    pass

def anotherFunction():
    pass

anotherFunction()()

Can repro on 1.88.0!
... and it's annoying me for ages 🙈

Could even be a little smarter 🤔
When the expected type in the current place is a callable and you're completing a callable: No parenthesis!

import typing

def somefunc():
    return 'muppets'

def function_consumer(func_obj : typing.Callable) -> None:
    print(func_obj())

function_consumer(somefun) # <-- complete here

I resolved https://github.com/microsoft/pylance-release/issues/5696 as dup.

authors: danrauch debonte ewerybody heejaechang luabud


text:
way to convert string to f-string

Discussed in https://github.com/microsoft/vscode-python/discussions/15549

Originally posted by zcutlip March  3, 2021
I waste so many keystrokes by starting a string, realizing I want to format an object in the middle of it, skipping back to the beginning to prepend f, then returning to my typing position.
It'd be awesome if there was a keyboard shortcut for this, or, even better, if the need for an f-string could be automatically detected (e.g., the presence of curly braces and an in-scope object is referenced).

rgov on 3 Mar
I like the idea of just typing a curly bracket inside a string to convert it to an f-string, as long as this is pushed to the undo stack and I can Cmd-Z quickly to undo it. I type literal curly brackets in my strings infrequently enough it wouldn't bug me much (no more than other kinds of quote/bracket auto-complete).
I think the best way to do this would be to trigger on } and apply a few rules:

Scan backwards for a matching { in the same string. If none is found, do not convert to an f-string. This avoids a number of false positives like print("int main() { return ", code, "}").

Scan forwards and backwards for another } in the same string. If one is found, this probably means the string is not meant to be an f-string, and it guarantees that conversion will be attempted at most once per string.

Plus two heuristics for avoiding conversion of strings that are formatted with str.format():

Do not convert if the sequence {} appears, because this is an invalid f-string specified and may indicate the use of str.format().

Try to detect if str.format() is being called on the string. This is imperfect because if the user is typing a new line of code, it may not have been written yet. For existing code the user is editing, one could just see if .format( comes directly after the closing quote -- by far the most common pattern.
But note that, as long as you are targeting a version of Python with f-strings, the user probably won't be writing new code that uses str.format().

We actually already have an item for this:
https://github.com/microsoft/pylance-release/discussions/2615

authors: brettcannon rchiodo


text:
Choosing object or values shouldn't make a difference for calculations

Switching between the object and value representation should be purely a different view without having an impact on the results of further calculation steps. Right now, switching from object to values breaks this sheet:
Formulas:

Object:

Values:

I don't think I understand why you expect that changing from by val to by ref would not break the sheet? In one case we are storing an object reference in a single cell; in the other case we are spilling the contents of a DataFrame across many cells.
What would you have it do instead?

@fzumstein
At the point the data are displayed, the content of D1 is no longer a data frame, it's a value: "a".
If you put this in D1 instead, you can have both:
df = xl("A1:B3", headers=True)
This can display as values (spill to the sheet) and retain the ability for other cells to refer to df.

@jflam It's still a spreadsheet, isn't it? So if the formula doesn't change (and if it's a deterministic function), I don't expect it to have an influence on the calculations.
The (outdated?) docs https://support.microsoft.com/en-us/office/py-function-31d1c523-fb13-46ab-96a4-d1a90a9e512f seem to suggest that PY requires a return_type (0 - Excel value, 1 - Python object.): =PY(python_code,return_type), which would improve the situation, but that's not how the formula works in my version of Excel (it doesn't have the return_type).
Objects in cells have been around for decades in about every single bank on this planet, and they always work the same: you can only return an object OR values to a cell. Consequently, if you want to view the values of the object, you'd do something like =A1.values, assuming that A1 holds your object reference (that's how Excel data types like stocks work, anyway).

This seems like a trivial point. You could easily write a formula similar to the one you wrote on cell G1 like xl("D1") in Python Object mode. And from there just use the Excel Value option on that instead without breaking the references in G1 and H1.

@b-gonzalez That's close to my suggestion, only that is has to happen via formula (=D1.values), not via dropdown in the formula bar that can be changed by anybody without leaving a trace in the formula view.

I understand the confusion now. In reality the formula in the sheet is =PY(, {0,1}). The UI in the formula editor toggles that last parameter, so it's also consistent with what our documentation says.
I think you perceive this as changing a formatting setting as opposed to changing the formula?

Yes, that's correct, that parameter is hidden in the formula, which is very confusing.

Agree we should improve the documentation here. Tagging as a documentation issue.

I've just discovered that you can do =A1.arrayPreview, assuming that A1 has a DataFrame. That's basically what I'd want, but in the generic case, i.e., covering scalars as well. This makes it so much cleaner to understand that you're outside of the PY environment again, facing normal Excel cell values.

So having worked with PiE for a while, my conclusion is that referencing PY cells from other PY cells -- while possible and sort of a natural excel workflow -- should best be avoided. Instead, as @ncalm mentioned, just work with variables like you'd do in real Jupyter notebooks, too.

authors: b-gonzalez fzumstein jflam keyur32 ncalm

repo: microsoft/python-in-excel


text:
"Go to Definition" on logging module breaks Python definition lookups

Environment data

VS Code version: 1.35.1
Extension version (available under the Extensions sidebar): 2019.6.22090
OS and version: Windows 10 Enterprise N
Python version (& distribution if applicable, e.g. Anaconda): 3.7.3
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
Relevant/affected Python packages and their versions: logging, comes with Python
Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): Language Server

Expected behaviour
Note that this happens inside and outside the virtualenv, and with or without Jedi. All other extensions have been disabled.
Pressing F12, while over a function call, right clicking and clicking "Go to Definition", or Ctrl+Clicking the function call name should bring you to where the function is defined. Hovering over the name should give you a preview.
Actual behaviour
This works for most functions. However, when trying to do so for any aspect of the logging module, it works the first time, and then fails every other time, for all Python items in the editor. Hovering over a name will just show "Loading...", and pressing F12, Ctrl+Clicking, or right clicking and clicking "Go to Definition" all do nothing while a blue progress bar at the top goes on forever. Sometimes, at the bottom, it says "Analyzing in background, 141 items left" or some number like that, and the number does not change.
Steps to reproduce:

Open a Python file.
Hover over any function call, package name, variable name, constant, etc. to see that the preview works. Hold Ctrl while hovering to see that a preview of the code works. Invoke "Go to Definition" and see that it works.
Import the logging package, and type something like logging.info('Test'). Press F12 on the .info() call. Close the resulting tab (if it even opens). Press F12 again.
The blue loading bar on top appears, nothing happens, and hovering over any names in the editor just produces "Loading".
Reload the window to resolve the issue.

Sometimes, it doesn't even open the definition once. Sometimes, it does so multiple times before breaking. It's finicky.
GIF:

Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Starting Microsoft Python language server.
[Info  - 12:13:39 PM] Analysis cache path: C:\Users\MKolber\AppData\Local\Microsoft\Python Language Server
[Info  - 12:13:39 PM] GetCurrentSearchPaths C:\Users\MKolber\AppData\Local\Programs\Python\Python37\python.exe
[Info  - 12:13:40 PM] Interpreter search paths:
[Info  - 12:13:40 PM]     c:\users\mkolber\appdata\local\programs\python\python37\dlls
[Info  - 12:13:40 PM]     c:\users\mkolber\appdata\local\programs\python\python37\lib
[Info  - 12:13:40 PM]     c:\users\mkolber\appdata\local\programs\python\python37
[Info  - 12:13:40 PM]     c:\users\mkolber\appdata\roaming\python\python37\site-packages
[Info  - 12:13:40 PM]     c:\users\mkolber\appdata\local\programs\python\python37\lib\site-packages
[Info  - 12:13:40 PM] User search paths:
[Info  - 12:13:41 PM] Microsoft Python Language Server version 0.3.20.0
[Info  - 12:13:41 PM] Initializing for C:\Users\MKolber\AppData\Local\Programs\Python\Python37\python.exe

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: setGlobalInterpreter, Class name = f, completed in 37ms, Arg 1: {"architecture":3,"path":"C:\\Users\\MKolber\\AppData\\Local\\Programs\\Python\\Python37\\python.exe","version":{"raw":"3.7.3-final","major":3,"minor":7,"patch":3,"prerelease":["final"],"build":[],"version":"3.7.3-final"},"sysPrefix":"C:\\Users\\MKolber\\AppData\\Local\\Programs\\Python\\Python37","fileHash":"09cfe309156d66f9776965f9ae68ce0c7b12b2e80fa2a8e083f1df88c8a280950d1b26ed87b77edcd0587839f31d14af55135426c7befddb8692733afb361c2f","companyDisplayName":"Python Software Foundation","type":"Unknown","cachedEntry":true,"displayName":"Python 3.7.3 64-bit"}, Arg 2: undefined, Return Value: false
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Rule = system, result = runNextRule
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Executing next rule from system
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: autoSelectInterpreter, Class name = f, completed in 667ms, Arg 1: undefined, Return Value: undefined
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Get language server folder name, Class name = f, completed in 11ms, Arg 1: <Uri:c:\Users\MKolber\Documents\test.py>, Return Value: "languageServer.0.3.20"
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Cached data exists getEnvironmentVariables, c:\Users\MKolber\Documents\test.py
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Cached data exists getEnvironmentVariables, <No Resource>
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Cached data exists getEnvironmentVariables, c:\Users\MKolber\Documents\test.py
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Activation Commands received undefined for shell cmd
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: getActivatedEnvironmentVariables, Class name = b, completed in 3ms, Arg 1: <Uri:c:\Users\MKolber\Documents\test.py>
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Cached data exists getEnvironmentVariables, c:\Users\MKolber\Documents\test.py
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Interpreters returned by CurrentPathService are of count 4
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Get language server folder name, Class name = f, completed in 3ms, Arg 1: <Uri:c:\Users\MKolber\Documents\test.py>, Return Value: "languageServer.0.3.20"
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Interpreters returned by WindowsRegistryService are of count 1
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Checking whether locactors have completed locating, Class name = p, completed in 0ms, , Return Value: true
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: Hide locator refreshing progress, Class name = p, completed in 0ms, , Return Value: undefined
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:29: All locators have completed locating, Class name = p, completed in 0ms, , Return Value: undefined
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:32: Starting Language Server, Class name = d, completed in 3051ms, , Return Value: undefined
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:32: Cached data exists getEnvironmentVariables, c:\Users\MKolber\Documents\test.py
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:32: Shell path 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe'
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:32: Shell path identified as shell 'powershell'
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:32: Shell path from user settings 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe'
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:32: Shell identified as 'powershell'
3
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:32: Cached data exists getEnvironmentVariables, <No Resource>
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:32: Current value for rule workspaceEnvs is nothing
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:47: Cached data exists getEnvironmentVariables, c:\users\mkolber\appdata\local\programs\python\python37\lib\logging\__init__.py
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:48: Cached data exists getEnvironmentVariables, c:\Users\MKolber\Documents\test.py
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:50: Cached data exists getEnvironmentVariables, c:\users\mkolber\appdata\local\programs\python\python37\lib\logging\__init__.py
workbench.main.js:238 [Extension Host] Info Python Extension: 2019-07-02 12:22:53: Cached data exists getEnvironmentVariables, c:\Users\MKolber\Documents\test.py
workbench.main.js:3311 Extension Host
workbench.main.js:3311 Debugger attached.

The issue with VSC hanging is reproducible on opening simple file:
import traceback, warnings, weakref, collections.abc

from string import Template

@DonJayamanne, this breaks VSC so that I can't even rename the file. However, if I wait for a couple of minutes, it returns back to normal. If I close and open file, it hangs for a couple of minutes again. LS during that time does nothing, so I'm transferring this issue back to vscode-python

I've modified LS so it ignores all messages if event contains file in question, issue is still reproducible. VSC hangs after sending these two events:
textDocument/didOpen
{
  "uri": "file:///d%3A/Work/Temp/Issues/1267/test2.py",
  "languageId": "python",
  "version": 1,
  "text": "import traceback, warnings, weakref, collections.abc\r\n\r\nfrom string import Template"
}

textDocument/documentSymbol
{
  "uri": "file:///d%3A/Work/Temp/Issues/1267/test2.py"
}

authors: AlexanderSher michaelkolber

repo: microsoft/python-language-server


text:
Language server shows warnings for unreachable code

I'm currently using the latest beta and the language server shows warnings for code that is unreachable. The behavior is the same for any other unreachable code, whether it is because of a returns statement, if false or anything else.

Does the variable actually exist?

No it does not exist but I wouldn't expect to receive warnings for code that is unreachable, ie. it will never be executed.

So basically this amounts to enhancement to detect unreachable code. Generally compilers and analyzers look into all code, including unreachable. I.e. even if code is unreachable, but has syntax errors, you'd still get an error message since parsers don't do branch analysis, they must parse everything.

authors: MikhailArkhipov Nufflee


text:
Loss starts to increase during BERT model training

Hi, I'm trying to reproduce your results with the BERT model. After ~14000 training steps, loss started to increase. I tried rerun, but it didn't help me. Have you faced this problem? This situation looks similar to #3, #7.
Log:
[2020-07-28T15:25:54] Logging to logdir/bert_run/bs=6,lr=7.4e-04,bert_lr=3.0e-06,end_lr=0e0,att=1
...
[2020-07-29T13:59:21] Step 14100 stats, train: loss = 1.1323808431625366
[2020-07-29T13:59:27] Step 14100 stats, val: loss = 3.3228100538253784
...
[2020-07-29T14:08:51] Step 14200 stats, train: loss = 0.9168887138366699
[2020-07-29T14:08:57] Step 14200 stats, val: loss = 3.5443124771118164
...
[2020-07-29T14:18:30] Step 14300 stats, train: loss = 2.303567111492157
[2020-07-29T14:18:37] Step 14300 stats, val: loss = 4.652050733566284
...
[2020-07-29T14:28:01] Step 14400 stats, train: loss = 95.80101776123047
[2020-07-29T14:28:08] Step 14400 stats, val: loss = 112.55300903320312

We also faced the same issue in our training. Our best guess is that it occurred because of gradient explosion. Even when you try to run the model from the previous checkpoint, you will get the same issue sometime down the line. Right now the only choice is to start training from scratch. If you solved the issue with some other techniques please do share.

@senthurRam33 I also think the problem is somewhere in gradients. I changed the loss to 'label_smooth' (see #10) and got more stable training.

repo: microsoft/rat-sql


text:
Cherry-pick: Replace SharedProps with Props::Shared

Please select one of the following

[ ] I am removing an existing difference between facebook/react-native and microsoft/react-native-macos :thumbsup:
[x] I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos :thumbsup:
[ ] I am making a fix / change for the macOS implementation of react-native
[ ] I am making a change required for Microsoft usage of react-native

Summary
Cherry-pick a react-native@0.70 commit into the current main branch:
https://github.com/facebook/react-native/commit/a42170e0f8d
Similarly to https://github.com/facebook/react-native/commit/13a0556aaa3976245ec065b0da68ef865bd03b70, standardize on one type to refer to this.
Changelog
Changelog: [Internal]
Test Plan
CircleCI

Do we also need to cherrypick  https://github.com/facebook/react-native/commit/13a0556aaa3976245ec065b0da68ef865bd03b70 ?

Do we also need to cherrypick facebook@13a0556 ?

We can - but we don't have too.
I have left it out so far as I only want to decrease the changes in React/Fabric - the ObjC files.

authors: Saadnajmi christophpurrer

repo: microsoft/react-native-macos