Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Contributing to Core Python

Contributing to Core Python

Contributing to Core Python: An Opinionated Guide for Scientists and Data Scientists

Presented to Data Umbrella Meetup on November 10, 2020.

Carol Willing

November 10, 2020

More Decks by Carol Willing

Other Decks in Programming


  1. Contributing to Core Python
    An Opinionated Guide for Scientists and Data Scientists
    Carol Willing
    Twitter: @WillingCarol

    GitHub: @willingc
    Data Umbrella Meetup
    November 10, 2020

    View full-size slide

  2. Core Python = CPython

    View full-size slide

  3. Data and Science
    • Primary Audience

    • Data scientists

    • Scientists

    • Data Engineers

    • Folks who may get value but are not the
    focus of this talk

    • Computer scientists

    • Compiler engineers

    • Operating system experts
    Contributing to CPython
    Climate Change

    View full-size slide

  4. Contributing to Core Python
    An opinionated approach for scientists and data scientists
    Core Python Today

    Comparing Core Python to Data / Science Projects

    Getting Started

    View full-size slide

  5. Steering Council
    Barry Warsaw
    Brett Cannon
    Carol Willing
    Thomas Wouters
    Victor Stinner

    View full-size slide

  6. PEP 13: Python Language Governance
    ‣ Quality and Stability
    ‣ Contributing accessible, inclusive, sustainable
    ‣ Core team and PSF relationship
    ‣ Decision making processes for PEPs
    ‣ Seek consensus

    View full-size slide

  7. Which contributions are needed

    View full-size slide

  8. Python Software Foundation (python.org)
    The mission of the Python Software Foundation is to promote,
    protect, and advance the Python programming language,
    and to support and facilitate the growth of a diverse and
    international community of Python programmers.

    View full-size slide

  9. Ways to Contribute
    More ways than writing new code
    • Add new code with backward compatibility

    • Maintain security and improve core development workflow

    • Writing and running tests

    • Writing and editing documentation

    • Triaging bugs for reproducibility

    • Reviewing PRs

    • Share your knowledge with the community (talks, blog posts, and meetups)

    View full-size slide

  10. Comparing

    View full-size slide

  11. CPython and Data/Scientific Projects
    • GitHub workflow

    • Pull requests

    • Code Review

    • Automated Testing / CI
    What's similar

    View full-size slide

  12. CPython and Data/Scientific Projects
    • New feature velocity

    • Use beyond data / science

    • Project Age and Lifecycle (30
    years vs <10 years)

    • Stability and backward

    • Context of use: CPython is a
    foundation for projects to be built
    What differs

    View full-size slide

  13. Getting
    and continuing to contribute

    View full-size slide

  14. First time contributors to open source
    Consider Python projects in the Scientific / Data community

    View full-size slide

  15. Mindset
    Getting set for success
    • Check your intent or why you want to contribute

    • Set a goal

    • Limit scope of your initial impact

    • Practice patience

    • Be persistent

    View full-size slide

  16. Common reasons for contributing
    These are just a few of the many reasons.
    • Fix a possible bug

    • Improve the documentation for the next person

    • Thought it would be cool

    • Wanted to understand more about how things work

    • Strengthen development skills

    View full-size slide

  17. Dev Guide

    View full-size slide

  18. Helpful prerequisites
    This will improve your contribution experience.
    • Take time to understand CPython's culture

    • Understand difference between core language and standard library

    • Remember most core developers are volunteers

    • Understand Git and GitHub workflow

    • Familiarity with Python (C is not necessary)

    View full-size slide

  19. Build CPython
    Dev Guide Quick Reference Steps 1 - 3
    • Fork and clone source code from https://github.com/python/cpython

    • Use the C compiler to configure and build Python

    • Unix/Linux/macOS

    • Windows
    ./configure --with-pydebug && make -j
    PCbuild\build.bat -e -d

    View full-size slide

  20. Run the tests
    Dev Guide Quick Reference Step 4
    • From the command line, run the tests

    • Unix/Linux

    • Mac

    • Windows
    python.exe -m test
    python.bat -m test
    python -m test

    View full-size slide

  21. Congrats on building and testing
    Dev Guide will help answer additional questions on contributing
    • Changes are submitted as GitHub pull requests

    • CI will run the automated tests

    • Wait for review

    • Address feedback

    • Core dev review and hopefully merge

    View full-size slide

  22. Learn about CPython Internals

    View full-size slide

  23. Resources
    • Anthony Shaw's blog post and/
    or book on CPython internals

    • Core developer websites

    • Guido

    • Victor Stinner

    • Brett Cannon

    • CPython sprints

    • PyCon talks by core developers

    • My PyCon 2015 talk

    • Mariatta

    • Victor

    • AsyncIO: Lukasz on YouTube

    View full-size slide

  24. Our time is limited so...

    View full-size slide

  25. Community is key
    Python Brasil official photo.
    The sign represents Python in BSL (Brazilian Sign Language),
    made by Amanda and Sávio at Python Sul 2018
    PyLadiesBRConf official photo
    PyLadiesBRConf official photo

    View full-size slide

  26. Happy contributing!
    Join the discussion:

    View full-size slide