{"id":7280,"date":"2019-06-25T13:19:28","date_gmt":"2019-06-25T21:19:28","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/python\/?p=7280"},"modified":"2020-06-03T10:53:27","modified_gmt":"2020-06-03T18:53:27","slug":"python-in-visual-studio-code-june-2019-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/python\/python-in-visual-studio-code-june-2019-release\/","title":{"rendered":"Python in Visual Studio Code \u2013 June 2019 Release"},"content":{"rendered":"<p>We are pleased to announce that the June 2019 release of the Python Extension for Visual Studio Code is now available. You can\u00a0<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.python\">download the Python extension\u00a0<\/a>from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can learn more about <a href=\"https:\/\/code.visualstudio.com\/docs\/python\/python-tutorial\">Python support in Visual Studio Code<\/a>\u00a0in the documentation.<\/p>\n<p>In this release we made improvements that are listed in our\u00a0<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/blob\/master\/CHANGELOG.md\">changelog<\/a>, closing a total of 70 issues including a plot viewer with the Python Interactive window, parallel tests with pytest, and indentation of run selection in the terminal.<\/p>\n<h2>Plot Viewer with the Python window<\/h2>\n<p>Plots are commonly used for data visualization. One of the top requested features for the Python Interactive window is to enable deeper inspection of the generated plots, e.g. zooming, panning, and exporting images. The June 2019 update included a brand-new Plot Viewer that can be used to manipulate any image plots, such as the popular matplotlib plots.<\/p>\n<p>You can try it out by double-clicking on the plots or clicking on the \u201cexpand image\u201d button that is displayed when you hover over plot images in the Python Interactive Window:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-7282\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2019\/06\/June19-PlotViewer.gif\" alt=\"\" width=\"1599\" height=\"882\" \/><\/p>\n<p>With the plot viewer, you can pan, zoom in\/out, navigate through plots in the current session, and export plots to PDF, SVG, or PNG formats.<\/p>\n<h2>Parallel tests with pytest<\/h2>\n<p>We made enhancements to reliability of statistics displayed for tests run, in particular for running tests in parallel with pytest.<\/p>\n<p>You can try out running tests in parallel with pytest by installing the pytest-xdist package and add \u201c-n&lt;number of CPUs&gt;\u201d to a configuration file. For example, for 4 CPUs you can create a pytest.ini file in the project folder and add the below content to it:<\/p>\n<pre class=\"lang:default decode:true\">[pytest]\r\naddopts=-n4<\/pre>\n<p>Now when you run and debug tests, they&#8217;ll be executed in parallel.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-7291\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2019\/06\/June19-ParallelTests-2.gif\" alt=\"\" width=\"1361\" height=\"774\" \/><\/p>\n<p>You can refer to our <a href=\"https:\/\/code.visualstudio.com\/docs\/python\/unit-testing\">documentation<\/a> to learn more about testing support in the Python extension.<\/p>\n<h2>Indentation of run selection in the terminal<\/h2>\n<p>A <a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/2837\">highly requested VS Code Python feature<\/a> on our GitHub repository was to dedent code selections before sending it to the terminal when running the \u201cRun Selection\/Line in Python Terminal\u201d command. Starting in this release, the command will send to the terminal a de-indentation of the selection, based on its first non-empty line.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-7281\" src=\"https:\/\/devblogs.microsoft.com\/python\/wp-content\/uploads\/sites\/12\/2019\/06\/June2019_RunSelection.gif\" alt=\"\" width=\"1372\" height=\"777\" \/><\/p>\n<h2>Other Changes and Enhancements<\/h2>\n<p>We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python in Visual Studio Code. Some notable changes include:<\/p>\n<ul>\n<li>Allow password for remote authentication with jupyter. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/3624\">#3624<\/a>)<\/li>\n<li>Data Viewer now properly handles large data frames and supports filtering with expressions on numeric columns (greater than, less than, equals to) (<a href=\"https:\/\/github.com\/microsoft\/vscode-python\/issues\/5469\">#5469<\/a>)<\/li>\n<li>Show preview of imported notebook in the Python Interactive window. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/5675\">#5675<\/a>)<\/li>\n<li>Add support for sub process debugging, when debugging tests. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/4525\">#4525<\/a>)<\/li>\n<li>Added support for activation of conda environments in powershell. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/668\">#668<\/a>)<\/li>\n<li>Add &#8216;ctrl+enter&#8217; as a keyboard shortcut for run current cell. (<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\/issues\/5673\">#5673<\/a>)<\/li>\n<\/ul>\n<p>Be sure to\u00a0<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-python.python\">download the Python extension<\/a>\u00a0for Visual Studio Code now to try out the above improvements. If you run into any problems, please file an issue on the\u00a0<a href=\"https:\/\/github.com\/Microsoft\/vscode-python\">Python VS Code GitHub<\/a>\u00a0page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are pleased to announce that the June 2019 release of the Python Extension for Visual Studio Code is now available. In this release we closed a total of 70 issues including a plot viewer with the Python Interactive window, parallel tests with pytest, and indentation of run selection in the terminal.<\/p>\n","protected":false},"author":1064,"featured_media":7282,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,6],"tags":[],"class_list":["post-7280","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-visual-studio-code"],"acf":[],"blog_post_summary":"<p>We are pleased to announce that the June 2019 release of the Python Extension for Visual Studio Code is now available. In this release we closed a total of 70 issues including a plot viewer with the Python Interactive window, parallel tests with pytest, and indentation of run selection in the terminal.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/7280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/users\/1064"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/comments?post=7280"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/posts\/7280\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media\/7282"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/media?parent=7280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/categories?post=7280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/python\/wp-json\/wp\/v2\/tags?post=7280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}