Posit Connect 2023.01.0 Python Version Requirements and Breaking Changes

The Posit Connect January 2023 release includes breaking changes. This blog post details information that administrators and publishers should know.
Text says Posit Connect plus Python. Above the text is a minimalistic image of a cartoon snake .

What Administrators and Publishers should know


The Posit Connect January 2023 release includes breaking changes. The minimum version of Python is now 3.7, a legacy hosting option for TensorFlow version 1.x Saved Models has been removed, and a deprecated workaround for obtaining packages from private GitHub repositories has been replaced with a new feature.


Python Minimum Version Update to 3.7


Support for Python versions 3.5 and 3.6 has been removed in Posit Connect. These releases are no longer receiving security updates from the Python maintainers; see the Python releases page for details.


What action needs to be taken?


Verify that your configuration file does not include Python 2 or Python 3 versions prior to 3.7. If older Python versions are included, remove them. Configuration files that include Python versions prior to 3.7 will cause an error during Connect startup. This is a breaking change. 


The configuration file should only contain Python 3 versions that meet the minimum requirements:


; /etc/rstudio-connect/rstudio-connect.gcfg
Enabled = true
Executable = /shared/Python/3.7.6/bin/python3
Executable = /shared/Python/3.8.1/bin/python3


Note: Posit Workbench does not document minimum version requirements for Python, but you may want to schedule time to check or update the versions available there as well to avoid publishing errors due to environment mismatches.


What will happen to content that uses an unsupported version of Python?

  • Existing R Markdown reports and Jupyter Notebooks that use older Python versions can still be viewed. However, they cannot be re-rendered. Scheduled reports that continue to run will send error message emails.
  • Existing applications and APIs that use older Python versions will no longer run. An HTTP 502 error will be returned for all requests to these applications.
  • Content can be re-published to the same location with Python 3.7+, preserving existing settings like environment variables, access permissions, or runtime settings.


How can you identify content that will break?


Conduct a Python runtime audit of your server and the deployed content. This video overview provides tips for auditing Python usage on Posit Connect depending on the level of detail you need. 

  • Start by executing the script in /opt/rstudio-connect/scripts/find-python-envs which will list all Python virtual environments and the applications that use them.
  • If you require a more detailed audit, use the Posit Connect Server API to create a custom report:


TensorFlow Saved Model Support


Support for TensorFlow Saved Model deployments has been removed. This support was limited to legacy versions of TensorFlow (up to version 1.13.1) and has been deprecated since the September 2022 edition release of Connect.


What action needs to be taken?


Verify that your configuration file does not include Server.TensorFlowEnabled. If it does, remove this setting before performing an upgrade to 2023.01.0.


Moving forward, Connect Publishers should be made aware that TensorFlow models can be deployed as a Plumber API (example), Shiny application (example), Python API, or other supported content type. 


The underlying “app_mode” of a content item deployed to Connect cannot be changed. This means you cannot wrap your TensorFlow model in a Shiny application and publish it to the same content location as the original TensorFlow model. The Shiny application must be treated as a brand-new piece of content.


What will happen to existing TensorFlow Model content on Connect?

  • Existing TensorFlow Saved Model content will no longer run. An HTTP 502 error will be returned for all requests.
  • Visiting this content in Connect opens an error page that states “TensorFlow Model APIs are not supported.” 


How can you identify content that will break?  


Conduct a TensorFlow app_mode audit of all the content published to your server. Before upgrading to 2023.01.0, use the Content Type filter in your Connect dashboard UI, to see if there is any TensorFlow Model content on your server. Make sure to do this from an Admin account, and select the All Server Content Visibility filter:


Content Type filter in your Connect dashboard UI with ensorFlow Model content selected.

Once you upgrade to 2023.01.0 the TensorFlow Model APIs Content Type filter option will be removed. 


If you have many TensorFlow Model results, we recommend using the Connect Server API to create a custom audit report. This example (R Markdown) produces a report and CSV file which enumerates each piece of unsupported TensorFlow content along with Publisher/Owner contact information:


An R Markdown document that shows  unsupported TensorFlow content.


Source Package Directory


The setting Server.SourcePackageDir has been removed. This feature has been deprecated since Posit Connect 1.8.6 due to its significant limitations. R Packages can be installed from an R package repository or Git repositories. 


What action needs to be taken?


Configuration files that include Server.SourcePackageDir will cause an error during Connect startup. This configuration setting should be removed before you attempt to upgrade. Review the Admin Guide for details on how R packages are installed and to evaluate the currently supported configuration options.


The Connect 2022.11.0 edition release added support for restoring R packages installed from private Git repositories hosted on GitHub (github.com), GitLab (gitlab.com), and Bitbucket (bitbucket.com) using configured Git credentials. To enable this behavior, set the R.RestoreUsesGitCredentials setting to true. Posit Connect and Packrat will then use configured Git credentials when making requests to compatible Git providers, enabling the installation of R packages from private repositories. See the Admin Guide section on installing private R packages from private Git repositories.


New Support for RHEL 9


Posit Connect 2023.01.0 has added support for Red Hat Enterprise Linux 9.0. There are multiple Linux distribution options that state they are 1:1 binary compatible with RHEL 8/9, such as Rocky Linux and AlmaLinux. These distributions can be used as long as they stay 1:1 binary compatible with RHEL 8/9. 


The Posit Platform Support page explains the support period for each Linux distribution.


Upgrade Posit Connect


Before upgrading, please review the full release notes.


Upgrading Posit Connect typically requires less than five minutes. This release contains a breaking change that may require an update to the Connect configuration file.


The rstudio-connect service will fail to start if the configuration file includes any of the following: 

  • Python.Executable properties that do not meet the new minimum version requirements.
  • Server.TensorFlowEnabled
  • Server.SourcePackageDir


If you are upgrading from a version earlier than the December 2022 edition, be sure to consult the release notes for changes in intermediate releases that may not be mentioned in this blog post.


To perform a Posit Connect upgrade, download and run the installation script. The script installs a new version of Connect on top of the earlier one. Existing configuration settings are respected. 


Standard upgrade documentation can be found here.