diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 619b3419884..8f4b1e10119 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -650,6 +650,7 @@ peps/pep-0768.rst @pablogsal peps/pep-0769.rst @facundobatista peps/pep-0770.rst @sethmlarson @brettcannon peps/pep-0771.rst @pradyunsg +peps/pep-0772.rst @warsaw @pradyunsg peps/pep-0773.rst @zooba peps/pep-0774.rst @savannahostrowski # ... diff --git a/peps/pep-0772.rst b/peps/pep-0772.rst new file mode 100644 index 00000000000..c69da79b91f --- /dev/null +++ b/peps/pep-0772.rst @@ -0,0 +1,464 @@ +PEP: 772 +Title: Packaging governance process +Author: Barry Warsaw , + Deb Nicholson , + Pradyun Gedam +Status: Draft +Type: Process +Topic: Governance, Packaging +Created: 21-Jan-2025 +Replaces: 609 + + +======== +Abstract +======== + +This PEP proposes a Python Packaging Council with broad authority over +packaging standards, tools, and implementations. Like the Python Steering +Council, the Packaging Council seeks to exercise this authority as rarely as +possible; instead, they use this power to establish standard processes. + +Like :pep:`8016`, instead of trying to do everything in one PEP, this PEP +focuses on providing a minimal-but-solid foundation for further governance +decisions. + +======================== +Motivation and Rationale +======================== + +As Python packaging has matured, several interrelated problems with the current +way of managing the technical development, decision making and processes have +become apparent. + +---- +PyPA +---- + +The `Python Packaging Authority (PyPA)`_ was created to take over the +maintenance of `pip`_ and `virtualenv`_ from Ian Bicking, led by Brian Rosner, +Carl Meyer and Jannis Leidel. Over the years, additional projects got added to +the PyPA and the tooling maintained by the PyPA became the baseline tooling for +Python packaging, with additional package ecosystems using and building on top +of the tools and interoperability standards maintained by the PyPA. + +:pep:`609` formalised PyPA's authority over the existing packaging tools, the +interoperability standards and their operation as a group of independent +projects under the same umbrella that aim to be interoperable. It also stated +that PyPA should be expected to provide opinions, insight and experience when +ecosystem-wide changes are being proposed. In particular, the work to support +existing projects and maintain a user guide has been excellent. + +At the time of writing, PyPA does not have a community elected body and +individuals within the group meet ad hoc, rather than on a regular cadence. The +PyPA itself is defined by a group of projects rather than as a group of +individuals, with no direct oversight over its individuals. + +------------ +Packaging-WG +------------ + +The PSF's `Packaging Workgroup`_ was created to support the larger efforts of +improving and maintaining the packaging ecosystem in Python through fundraising +and disbursement of raised funds. It was expected to largely focus on efforts +such as Python Package Index (PyPI), pip, packaging.python.org, Setuptools, and +cross-project efforts. + +The group made very good progress here in the past, but the scope and scale of +supporting Python's packaging ecosystem has grown considerably in the last few +years. There is both more work to be done and more stakeholders than ever +before. The Packaging Workgroup is also not a community elected body and does +not have a regular mechanism for changing, adding or removing members. + +-------------------------- +Interoperability Standards +-------------------------- + +The PyPA is responsible for creating and maintaining the interoperability +standards for Python packaging tools. The decision making for updating these +standards involves a standing delegation from the Python Steering Council to +specific individuals based on specific topics, and these individuals have the +ability to further delegate the decision making on the changes to other +individuals. + +We know that this process is not sustainable and there has been a desire +expressed by many to have a designated body to make these decisions (including +the individuals with the standing delegations). + +----------------------- +Python Steering Council +----------------------- + +While there is overlap between the PyPA, Packaging-WG, and the Python core +team, the Steering Council is not well-placed to make decisions over Python +packaging matters directly. Packaging only tangentially intersects with Python +language evolution, packaging requires specialised expertise and deep domain +knowledge (much like typing or the C API), and there is a different cohort of +potential electors for a Packaging Council than the Steering Council. + +------------ +Expectations +------------ + +An elected Packaging Council would have authority over the interoperability +standards, would guide the packaging tooling provided with CPython, and have +the mandate to coordinate Python packaging efforts. This would provide a +better, more consistent experience to packagers, package consumers, tool +developers, PyPI, and other index maintainers. With greater transparency and +clearer goals via an elected Packaging Council, the PSF will also be able to +offer more tactical work, longer term strategic vision, and fundraising support +to all parts of this ecosystem. + +Some expectations around the formation of a Packaging Council are that they +will facilitate: + +* Work with PSF staff and the newly formed `User Success Workgroup`_ toward + improving the user experience around packaging. +* A more stable packaging ecosystem that is more responsive to community input. +* Increased transparency and clearer shared goals for the packaging ecosystem. +* Increased tactical and fundraising support from the PSF, to increase capacity + and funding available to packaging tools. + +============= +Specification +============= + +----------------- +Packaging Council +----------------- + +The Packaging Council will be composed of five individuals. + +Mandate +======= + +The council shall work to: + +* Maintain the quality and stability of the Python packaging standards. +* Formalise and maintain the relationship with the core team as well as the + PSF. +* Establish appropriate decision-making processes. +* Improve Python packaging's user experience. +* Make contributing as accessible, inclusive, and sustainable as possible. +* Strive to seek consensus among contributors before acting in a formal capacity. + +Responsibilities +================ + +The council shall: + +* Have broad authority over the Python packaging standards and Python Packaging + User Guide, that are maintained on https://packaging.python.org. +* Establish processes for making binding decisions regarding packaging + standards, tools and implementations as well as for considering + ecosystem-wide changes. +* Look for ways to use their direct authority as little as possible - seeking + consensus and consent over voting. + +To use its powers, the council votes. Every council member must either vote or +explicitly abstain. Members with conflicts of interest on a particular vote +must abstain. Passing requires support from a majority of non-abstaining +council members. + +Whenever possible, the council is expected to share its decisions and processes +publicly in a timely fashion. + +Delegations +----------- + +The Python Steering Council is expected to delegate decision making to +the Packaging Council for PEPs related to the Python packaging. The bodies +would work together on issues that intersect the packaging domain and language +stewardship (including the CPython implementation, standard library, and +distribution). + +The PSF Board is encouraged to formally deprecate the Packaging Workgroup +and the Packaging Council would take on the responsibilities of the +PSF's Packaging Workgroup. + +The PyPA is expected to work with the Packaging Council to establish a +decision making process that governs the technical projects under the PyPA +umbrella. + +Processes +========= + +Election of the council +----------------------- + +A council election consists of two phases: + +* Phase 1: A member of the Packaging community (defined later in this document) + can self-nominate themselves for the council elections. +* Phase 2: Each Packaging community member can assign zero to five stars to + each candidate. Voting is performed anonymously. The outcome of the vote is + determined using the `STAR voting system`_, modified to use the `Multi-winner + Bloc STAR`_ approach. If a tie occurs, it may be resolved by mutual agreement + among the candidates, or else the winner will be chosen at random. + +Each phase should last two weeks. + +The election process is managed by one Returning Officer nominated by the +outgoing Packaging Council. For the initial election, the Returning Officer +will be nominated by the PSF Executive Director. + +The PSF shall maintain records of the elections as well as run the annual +election for the council. + +Term +---- + +There shall be two cohorts of council members: Cohort A composed of two +members and Cohort B composed of three members. + +Each council member shall be elected for a two-year term, unless they are +replacing a council member that resigned, was removed, or otherwise becomes +vacant, in which case such replacement members shall be elected to a term +sufficient to complete a two-year term as measured from the term of the +original cohort. + +Each council member's term will be two years, from when their elections are +finalised until the next elections for their cohort are finalised. + +Only for elections involving the entire council (like the initial council +election), the two candidates receiving the highest number of votes shall be +designated Cohort A with a two year term, and the three candidates +receiving the highest number of votes after shall be designated Cohort B with a +one year term. + +There are no term limits for individual council members. + +Vacancies +--------- + +Council members may resign their position at any time. + +Whenever there is a vacancy during the regular council term, the council may +vote to appoint a replacement to serve out the rest of the term. + +If a council member drops out of touch and cannot be contacted for a month or +longer, then the rest of the council may vote to replace them (with a simple +majority vote, where the missing member is recorded as an abstention). + +Conflicts of interest +--------------------- + +No more than two Packaging Council members should be employed by or +significantly affiliated with the same entity. An entity would be a company, +a company and its subsidiaries, or another incorporated entity such as a +non-profit or educational institution with its own mission and goals. PSF members are explicitly exempt from this restriction, but _not_ PSF employees, directors, or officers. + +While we trust council members to act in the best interests of Python rather +than themselves or their employers, the mere appearance of any one company +dominating Python development could itself be harmful and erode trust. + +In a council election, if more than two of the top five vote-getters work for +the same employer, then whichever of them ranked lowest is disqualified and the +6th-ranking candidate moves up into 5th place; this is repeated until a valid +council is formed. + +During a council term, if changing circumstances cause this rule to be broken +(for instance, due to a council member changing employment), then one or more +council members must resign to remedy the issue, and the resulting vacancies +can then be filled as normal. + +------------------- +Packaging community +------------------- + +Responsibility +============== + +Packaging community members participate in formal votes to elect the Packaging +Council. + +Processes +========= + +Initial membership +------------------ + +Initial membership in the Packaging community will include anyone who has taken +the time to formalise their participation in the Packaging community. This +includes: + +* PyPA members: Anyone with the triage bit or commit bit, or at least one + project in the PyPA organisation. +* Packaging workgroup members: Anyone who is listed on the Packaging WG charter + will be moved into the Packaging community. +* Interested core team members: Any Python core team member who is willing to + participate is welcome. +* Wider community members: Non-profit organisations that participate in + packaging or working with new packagers. For example, PyOpenSci, NumFocus, + Django, are encouraged to initially nominate up to seven members by sending + an email to \[todo\]. + +Adding a new member +------------------- + +Members are added to the Packaging community by a simple majority vote by the +current membership. Quorum for adding new members is 50%. + +A vote to add a new member is triggered when a Packaging community member calls +for one publicly on an appropriate communication channel, and another Packaging +community member seconds the call within two weeks. + +The vote lasts for two weeks. Packaging community members vote for or against. + +Removal of a member +------------------- + +In order to maintain a reasonable expectation of quorum, failure to participate +in Packaging Council elections for two consecutive council elections +automatically removes a person from the list of voting members, until they +re-submit their intention to resume their participation to the Packaging +Council in writing. + +In exceptional circumstances, it may be necessary to remove someone from the +Packaging community against their will (for example: egregious and ongoing code +of conduct violations). A Packaging community member may be removed by a +two-thirds majority vote by the Packaging Council (in practice: 4:1 for a +council with five members). + +If the relevant Packaging community member is also on the Packaging Council, +then they can participate in the vote. They are removed from the Packaging +Council if the vote removes them from the Packaging community. The vacancy is +filled as per the process for filling vacancies in the Packaging Council. + +Vote of no confidence +--------------------- + +In exceptional circumstances, the Packaging community may remove a sitting +council member, or the entire council, via a vote of no confidence. + +A no-confidence vote is triggered when a Packaging community member calls for +one publicly on an appropriate public communication channel, and another +Packaging community member seconds the call within two weeks. + +The vote lasts for two weeks. Packaging community members vote for or against. +If at least two thirds of voters express a lack of confidence, then the vote +succeeds. Quorum for a vote of no confidence is 50%. + +There are two forms of no-confidence votes: those targeting a single member, +and those targeting the council as a whole. The initial call for a +no-confidence vote must specify which type is intended. If a single-member vote +succeeds, then that member is removed from the council and the resulting +vacancy can be handled in the usual way. If a whole-council vote succeeds, the +council is dissolved and a new council election is triggered immediately. + +----------------------- +Changing the governance +----------------------- + +Changes to this governance model, once it is accepted, will require at least a +two-thirds majority of votes cast in a Packaging community vote which should be +open for two weeks. + +============== +Rejected Ideas +============== + +---------------------------------------- +Annual elections for all council members +---------------------------------------- + +An annual term for council members is the approach taken for the Python +Steering Council's elections. This PEP uses a cohort-based model, derived from +the PSF Board's elections which enables continuity of members across a changing +council. + +There is a trade-off between continuity of the council and reshuffles. This PEP +takes the position that continuity will be more valuable for the Python +Packaging space, especially combined with the vote of no confidence, automatic +removal of inactive voters and regular elections. + +------------------------------- +Term limits for council members +------------------------------- + +While this is viewed as valuable for boards in general, this was rejected +because of the size of the pool of interested and qualified people who might +serve. + +------------------------------- +Approval voting in the election +------------------------------- + +An earlier non-public draft of this PEP used an approval voting process, which +aligned with what :pep:`13` stated at the time of writing. The Python core team +has changed their governance to use Bloc STAR and this PEP was updated to align +with that for the same reasons as the core team's move to Bloc STAR: it better +captures voter intention in the results. + +------------------------------------------------------------------ +Disallow multiple people from the same organisation on the council +------------------------------------------------------------------ + +This PEP currently mirrors the Python Steering Council's limit, that at most +two individuals related to a single organisation can be on the council. + +Limiting it to one is workable; although it hasn't come up in the SC, people do +move around, and we wouldn't want good candidates to either make employment +decisions based on PC membership, or have to resign based on an employment +change. Limiting it to a maximum of two, plus votes of no confidence is +probably sufficient safety from any undue employer influence. + +--------------------------------------------------------------------------- +Establishing specific processes for Packaging Council and PyPA relationship +--------------------------------------------------------------------------- + +As noted in the abstract, the focus of this PEP is on providing a +minimal-but-solid foundation for further governance decisions. The specifics of +this relationship would be figured out by the inaugural council. + +======================================= +Appendix: Approval process for this PEP +======================================= + +This PEP would likely require an atypical process for approval given that it +requires changes to PyPA's governance (which involves a PyPA-committers vote) +and it requires the Python Steering Council to change their delegations. + +To that end, the process for approval for this PEP will be: + +* Submit this PEP for a vote on the pypa-committers mailing list, in accordance + with the process outlined in :pep:`609`. +* Submit this PEP for the Python Steering Council's comments and approval. +* Reconcile any outstanding variances in text and repeat, if necessary. + +================================================= +Appendix: Operational suggestions for the council +================================================= + +This section is based on what the PEP's authors view as things that would be +beneficial for the Packaging Council to establish operational processes for. +These are non-binding yet strongly encouraged. + +The PSF will designate a staff person to be the Packaging Council's official +liaison who will regularly attend meetings, since it is expected that the +Packaging Council will meet on a regular basis (twice a month). + +* Coordinate with the Steering Council on PEPs that need input from both + groups. +* Coordinate with PyPA on their ongoing work to support individual projects. +* Delegate to domain experts or working groups in the Packaging community, for + initiatives/PEPs with a niche focus (analogous to how the Steering Council + sends certain PEPs to the C API working group). +* Scope out work that might best be done by hiring someone and then work with + PSF to establish outcomes and a reasonable budget. +* The Packaging Council (similar to the Steering Council) is encouraged to + communicate with and when necessary seek advice from the PSF's Conduct + Working Group. +* Regularly synchronize with the Steering Council on a mutually agreed cadence, + with a recommended frequency of no less than once per quarter. +* Publish public agendas and minutes in a timely fashion. +* Provide casual real-time opportunities for people to bring topics that are + not PEPs, like office hours, a forum channel, or panels at Python events. + +.. _Python Packaging Authority (PyPA): https://packaging.python.org/en/latest/glossary/#term-Python-Packaging-Authority-PyPA +.. _pip: https://packaging.python.org/en/latest/key_projects/#pip +.. _virtualenv: https://packaging.python.org/en/latest/key_projects/#virtualenv +.. _Packaging Workgroup: https://wiki.python.org/psf/PackagingWG +.. _User Success Workgroup: https://github.com/psf/user-success-wg/ +.. _STAR voting system: https://www.starvoting.org/ +.. _Multi-winner Bloc STAR: https://www.starvoting.org/multi_winner