Skip to content

obs-scripting: Replace PySys_SetArgv with recent Python method#13536

Open
tytan652 wants to merge 1 commit into
obsproject:masterfrom
tytan652:replace_pysys_argv
Open

obs-scripting: Replace PySys_SetArgv with recent Python method#13536
tytan652 wants to merge 1 commit into
obsproject:masterfrom
tytan652:replace_pysys_argv

Conversation

@tytan652

@tytan652 tytan652 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Description

Warning

Only tested on Linux so no runtime link test
Tests on Windows and macOS with various Python is needed

Replace deprecated PySys_SetArgv with recent Python method

TODO:

  • Import symbols for runtime link

Closes #13014

Motivation and Context

Gave a try a while ago, now I cleaned it up

How Has This Been Tested?

Only quickly tested on Arch Linux with Python 3.14.5

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@tytan652 tytan652 added Seeking Testers Build artifacts on CI kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. platform/windows Categorizes issue or PR as affecting Windows specifically platform/macos Categorizes issue or PR as affecting macOS specifically platform/linux Categorizes issue or PR as affecting Linux specifically labels Jun 10, 2026
@tytan652 tytan652 force-pushed the replace_pysys_argv branch 5 times, most recently from 75c0f40 to 209ba4f Compare June 10, 2026 10:47
@tytan652 tytan652 marked this pull request as draft June 10, 2026 10:59
@tytan652 tytan652 force-pushed the replace_pysys_argv branch 2 times, most recently from 8c850f7 to 0bb21cb Compare June 10, 2026 15:11
@tytan652 tytan652 marked this pull request as ready for review June 10, 2026 15:21
@tytan652 tytan652 force-pushed the replace_pysys_argv branch 2 times, most recently from 557831f to ba28781 Compare June 10, 2026 15:41
@RytoEX

RytoEX commented Jun 10, 2026

Copy link
Copy Markdown
Member

This is a different attempt at #13014 ? If so, my same questions apply.

@tytan652

tytan652 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator Author

This is a different attempt at #13014 ?

I forgot about that PR, yes but with proper support for the runtime codepath.

For run time dependencies, we in theory support Python 3.6+, so it would need to be confirmed if a user can still load/use Python 3.6/3.7 with the original changes. If it is the case that users cannot use Python 3.6/3.7 at runtime with the original changes, then my comment was a note to mergers that "this cannot be merged until we're in a merge window for a major release as this would be a breaking change".

The open question is: does the code in this PR as it was originally or as it is now affect compile-time Python, run-time Python, or both?

In the runtime codepath, if Python < 3.8 is found, python_pre38_init() will be used (with python_pre37_init_threads() if < 3.7).

@tytan652 tytan652 force-pushed the replace_pysys_argv branch from ba28781 to d5002a9 Compare June 10, 2026 17:59
@RytoEX RytoEX force-pushed the replace_pysys_argv branch from d5002a9 to 03b5b4e Compare June 12, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. platform/linux Categorizes issue or PR as affecting Linux specifically platform/macos Categorizes issue or PR as affecting macOS specifically platform/windows Categorizes issue or PR as affecting Windows specifically Seeking Testers Build artifacts on CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants