Audit the use of unsupported Python versions
- 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:
- Set a System Message on the server to warn Publishers about your upgrade timeline and the breaking change.
- Use this Audit Report to identify all content using an unsupported Python version.
- Contact any users who have content that will break due to this upgrade.
Publishers and Content Owners should be made aware that:
- Content can be re-published to the same location with new Python version requirements, preserving existing settings like environment variables, access permissions, or runtime settings.
- Scheduled reports that continue to run with an unsupported version of Python will send error emails. We recommend turning off the scheduler or re-publishing the content with a supported version.
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
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.
Footnotes
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.↩︎