pyinstaller / pyinstaller/pyinstaller

Get rid of multiple compat.exec_command* variants

Open
#3,089 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

@low / cleanup pull-request wanted
Dominant language
Python
Stars
13.1k
Forks
2k
Avg merge
1d 3h
Merged PRs (30d)
11

Description

This is a good first issue: No PyInstaller-spefic knowledge is required, but you need to have a good understanding of encodings and different implementations between Python 2 and Python3 (and maybe between different versions of subprocess).

In compat there are several variants of exec_command:

  • exec_command_rc: used twice (plus once int the old test-suite)
  • exec_command_stdout: used twice (in hooks)
  • exec_command_all: used once
  • exec_command: used about 15 times.

The aim is to remove some of these or make them slim layers around each other. Unfortunately these are not building on top of each other, but are wrapping different subprocess.* functions.

Todo:

  • Carefully read the documentation (in the code) and notice differences.
  • Read all commit messages related to these functions.
  • Check if some may trivially be merged.
  • Try to build test-cases
  • Clean them up.

Prior to providing a pull-request, please drop a note and we will prepare an extra branch for this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the compat module by reading the in-code documentation for exec_command_rc, exec_command_stdout, exec_command_all, and exec_command, then inspect their uses in hooks and the old test suite. Read all related commit messages and build test cases covering their encoding, subprocess, and return-value differences; done means redundant variants are removed or reduced to thin layers and the tests are cleaned up.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.