Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noarch variant blog post #2332

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

isuruf
Copy link
Member

@isuruf isuruf commented Oct 15, 2024

PR Checklist:

  • note any issues closed by this PR with closing keywords
  • if you are adding a new page under docs/ or community/, you have added it to the sidebar in the corresponding _sidebar.json file
  • put any other relevant information below

cc @ocefpaf @h-vetinari

@isuruf isuruf requested a review from a team as a code owner October 15, 2024 16:04
Copy link

netlify bot commented Oct 15, 2024

Deploy Preview for conda-forge-previews ready!

Name Link
🔨 Latest commit 1c63480
🔍 Latest deploy log https://app.netlify.com/sites/conda-forge-previews/deploys/671007fe2539af0008e91116
😎 Deploy Preview https://deploy-preview-2332--conda-forge-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@isuruf
Copy link
Member Author

isuruf commented Oct 15, 2024

pre-commit.ci auto-fix

Copy link
Member

@jaimergp jaimergp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the noise, just tried to capitalize Python in all its ocurrences. Also suggested to add a TLDR at the beginning so we can have a self-contained intro broken by the "Read more" link introduced by the <!-- truncate --> magic.

blog/2024-10-15-python-noarch-variants.md Outdated Show resolved Hide resolved
blog/2024-10-15-python-noarch-variants.md Outdated Show resolved Hide resolved
blog/2024-10-15-python-noarch-variants.md Outdated Show resolved Hide resolved
blog/2024-10-15-python-noarch-variants.md Outdated Show resolved Hide resolved
blog/2024-10-15-python-noarch-variants.md Outdated Show resolved Hide resolved
blog/2024-10-15-python-noarch-variants.md Outdated Show resolved Hide resolved
blog/2024-10-15-python-noarch-variants.md Outdated Show resolved Hide resolved
blog/2024-10-15-python-noarch-variants.md Outdated Show resolved Hide resolved
blog/2024-10-15-python-noarch-variants.md Outdated Show resolved Hide resolved
blog/2024-10-15-python-noarch-variants.md Show resolved Hide resolved
Copy link
Member

@ocefpaf ocefpaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do you have a list of packages where you want to implement that? Just curious.

Co-authored-by: Filipe <[email protected]>
@isuruf
Copy link
Member Author

isuruf commented Oct 15, 2024

LGTM. Do you have a list of packages where you want to implement that? Just curious.

Not really. I was looking at packages in my dev environment that had compiled extensions.

@isuruf
Copy link
Member Author

isuruf commented Oct 15, 2024

I'll keep this open for a couple of days for comments and merge. Thanks for the reviews.

Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small nit/question, rest looks good!

Possible improvements:

  • I think it would be helpful to provide some things to look for for contributors to tell whether a given package has a pure python fallback implementation, because not all do...
  • We might want to reference the efforts around abi3 & limited ABI, which are kind of adjacent in terms of thrust (while they are compiled, they'd still be usable immediately when a new python implementation/variant comes out).

Comment on lines 21 to 23
In the Python world, some packages are written in C/C++/Cython
to get the most performance out of a package. However these packages
have a reference implementation written in Python. The Python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing "often"?

Suggested change
In the Python world, some packages are written in C/C++/Cython
to get the most performance out of a package. However these packages
have a reference implementation written in Python. The Python
In the Python world, some packages are written in C/C++/Cython
to get the most performance out of a package. However these packages
often have a reference implementation written in Python. The Python

@isuruf
Copy link
Member Author

isuruf commented Oct 16, 2024

We might want to reference the efforts around abi3 & limited ABI, which are kind of adjacent in terms of thrust (while they are compiled, they'd still be usable immediately when a new python implementation/variant comes out).

I don't want to start announcing those things until they are ready.

@isuruf
Copy link
Member Author

isuruf commented Oct 16, 2024

@jaimergp any idea on the CI failure?

@jaimergp
Copy link
Member

We don't use Go for anything. Push an empty commit to see if it was a flaky thing on Netlify's side and if not I'll check tomorrow.

Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Isuru! 🙏

Had a few suggestions below

Think it would be nice to embed an example from your work with a little discussion about how you added it. This may help others pick up this effort and carry it forward

code against a much simpler python implementation and is also
useful for platforms like PyPy where the C/C++/Cython implementation
can be slower than the Python reference implementation due to the
emulation of the Python C/C++ API by PyPy. For eg: for the Cython
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would just spell this out (particularly for non-native English readers)

Suggested change
emulation of the Python C/C++ API by PyPy. For eg: for the Cython
emulation of the Python C/C++ API by PyPy. For example for the Cython

Comment on lines +32 to +34
reference implementation is to look at `setup.py` on packages that
provide such a file to see if `extensions` are built always or
with a switch.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As some projects are moving away from setup.py, these details may be elsewhere

Also suggested a more succinct rewording

Suggested change
reference implementation is to look at `setup.py` on packages that
provide such a file to see if `extensions` are built always or
with a switch.
reference implementation is to look at the library's source code
to see if `extensions` are optional.

Comment on lines +45 to +47
no reference implementation. This makes early adopters of new Python
versions to wait for the conda-forge bot managed by @conda-forge/bot
team to start the migration and rebuild the packages. For eg: the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
no reference implementation. This makes early adopters of new Python
versions to wait for the conda-forge bot managed by @conda-forge/bot
team to start the migration and rebuild the packages. For eg: the
no reference implementation. This means early adopters of new Python
versions need to wait for the conda-forge bot managed by @conda-forge/bot
team to start the migration and rebuild the packages. For example the

Comment on lines +48 to +51
free-threading Python 3.13 build is still not under way because
conda-forge has decided to wait until the default (GIL enabled)
Python 3.13 build has migrated enough and upstream packages have added
support for free-threading builds.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be a cleaner way to write this. Tried a first pass below

Suggested change
free-threading Python 3.13 build is still not under way because
conda-forge has decided to wait until the default (GIL enabled)
Python 3.13 build has migrated enough and upstream packages have added
support for free-threading builds.
free-threading Python 3.13 build is still paused as
conda-forge has decided to focus on the default (GIL enabled)
Python 3.13 build first while upstream packages work on
supporting free-threading.

Comment on lines +53 to +54
or test time and this requires manual handling to reduce dependencies
before the migration and add the dependencies later on.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
or test time and this requires manual handling to reduce dependencies
before the migration and add the dependencies later on.
or test time and this requires some manual handling.

Comment on lines +70 to +75
We list some PRs here as a reference for conda-forge maintainers who
want to help out with this effort.

- [coverage](https:/conda-forge/coverage-feedstock/pull/123)
- [cython](https:/conda-forge/cython-feedstock/pull/147)
- [aiohttp](https:/conda-forge/aiohttp-feedstock/pull/99)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice for readers to include an example from a simple one in the blogpost itself. Perhaps could use a diff format to highlight relevant changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants