Audit the use of unsupported Python versions

Answer the Question:
  • Are there content items that do not meet the minimum Python version requirements on this server?

Posit removes Connect support for versions of Python that have reached end-of-life status and are approaching the end of their security support window. This is a good reference for upcoming Python version support changes: endoflife.date/python. Posit plans and communicates Python version support removal up to six months in advance in the Connect release notes. Minimum version requirements are documented in the Admin Guide.

Instructions for installing and managing versions of Python on Posit Connect can also be found in the Admin Guide.

Before upgrading your Posit Connect server, consider the following recommended actions:

  1. Set a System Message on the server to warn Publishers about your upgrade timeline and the breaking change.
  2. Use this Audit Report to identify all content using an unsupported Python version.
  3. Contact any users who have content that will break due to this upgrade.

Publishers and Content Owners should be made aware that:

Step 1 - Get the report code

Step 2 - Run & Customize the report

This R Markdown report uses the /v1/content and /v1/users API endpoints available in Connect 1.8.6 and later. Visit the Connect API Reference documentation for more information.

Requirements: Administrator API Key

Create an .Renviron file to store your API key and Connect server URL.

Your Connect server URL is the same URL you use to access the Connect dashboard, minus the connect path. If you access the dashboard at https://rsc.company.com/connect/, the server URL is https://rsc.company.com/.

# ~/.Renviron
# The CONNECT_SERVER URL must have a trailing slash.
CONNECT_SERVER="https://rsc.company.com/"
CONNECT_API_KEY="mysupersecretapikey"

Restart your R session to pick up on the new environment variables.

Step 3 (optional) - Publish the report to Connect

If you are push-button publishing from the RStudio IDE, we recommend the selection “Publish document with source code” so that the report can be re-executed on a schedule.1

Connect deployment dialog box showing publication options

Step 4 (optional) - Set the report to update on a schedule

Automate a data refresh of your report by setting it up to run on a schedule. Open the Schedule content management pane to get started.

Read more about Scheduling in the Connect User Guide.

Back to top

Footnotes

  1. Connect will automatically provide these environment variables for you when you publish. If you are on an older version of Connect, or if this feature has been disabled by your admin, you should reference https://docs.posit.co/connect/user/api-keys/ for how to create an API key and https://docs.posit.co/connect/user/content-settings/#content-vars for how to input environment variables into the Vars pane of Connect.↩︎