Audit the use of unsupported Python versions#
Answer the Question:
- Are there content items that do not meet the minimum version requirements (Python 3.5+) on this server?
Python 2.7 has reached end of life maintenance status. Support from the Python language governing body ended on January 1, 2020 and it is no longer receiving security patches.
RStudio Connect has continued to support Python 2.7 beyond its EOL status, but will join the community in ending support as of March 2022 (Release 2022.03.0). Learn more here about the minimum version of Python supported in RStudio Connect.
Before upgrading to RStudio Connect 2022.03.0+, 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 Python 3.5+, 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 Python 3.5+.
Step 1 - Get the report code#
Step 2 - Run & Customize the report#
This R Markdown report uses the
/v1/users API endpoints available in RStudio Connect 1.8.6 and later. Visit the RStudio Connect API Reference documentation for more information.
Requirements: Administrator API Key
.Renviron file to store your API key and RStudio Connect server URL.
Your RStudio Connect server URL is the same URL you use to access the RStudio Connect dashboard, minus the connect path. If you access the dashboard at
https://rsc.company.com/connect/, the server URL is
# ~/.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 RStudio 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 RStudio Connect User Guide.
If you are using RStudio v 1.8.8 or higher, RStudio 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.rstudio.com/connect/user/api-keys/ for how to create an API key and https://docs.rstudio.com/connect/user/content-settings/#content-vars for how to input environment variables into the Vars pane of Connect. ↩