-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Dead batteries packages: standard-aifc, standard-sunau, standard-chunk, and audioop-lts #29400
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% set name = "audioop-lts" %} | ||
{% set version = "0.2.1" %} | ||
{% set python_min = "3.13" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/audioop_lts-{{ version }}.tar.gz | ||
sha256: e81268da0baa880431b68b1308ab7257eb33f356e57a5f9b1f915dfb13dd1387 | ||
|
||
build: | ||
noarch: python | ||
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation | ||
number: 0 | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('c') }} | ||
- {{ stdlib('c') }} | ||
host: | ||
- python {{ python_min }} | ||
- setuptools | ||
- pip | ||
run: | ||
- python >={{ python_min }} | ||
|
||
test: | ||
imports: | ||
- audioop | ||
commands: | ||
- pip check | ||
requires: | ||
- python {{ python_min }} | ||
- pip | ||
|
||
about: | ||
summary: LTS Port of Python audioop | ||
license: EPL-2.0 | ||
license_file: LICENSE | ||
home: https://github.com/AbstractUmbra/audioop | ||
|
||
extra: | ||
recipe-maintainers: | ||
- bmcfee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{% set name = "standard-aifc" %} | ||
{% set version = "3.13.0" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/standard_aifc-{{ version }}.tar.gz | ||
sha256: 64e249c7cb4b3daf2fdba4e95721f811bde8bdfc43ad9f936589b7bb2fae2e43 | ||
|
||
build: | ||
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation | ||
number: 0 | ||
|
||
requirements: | ||
host: | ||
- python | ||
- setuptools >=61.0 | ||
- pip | ||
run: | ||
- python | ||
|
||
test: | ||
imports: | ||
- aifc | ||
commands: | ||
- pip check | ||
requires: | ||
- pip | ||
|
||
about: | ||
summary: Standard library aifc redistribution. "dead battery". | ||
license: BSD-4-Clause | ||
license_file: LICENSE | ||
home: https://github.com/youknowone/python-deadlib | ||
|
||
extra: | ||
recipe-maintainers: | ||
- bmcfee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{% set name = "standard-chunk" %} | ||
{% set version = "3.13.0" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/standard_chunk-{{ version }}.tar.gz | ||
sha256: 4ac345d37d7e686d2755e01836b8d98eda0d1a3ee90375e597ae43aaf064d654 | ||
|
||
build: | ||
noarch: python | ||
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation | ||
number: 0 | ||
|
||
requirements: | ||
host: | ||
- python {{ python_min }} | ||
- setuptools >=75.0 | ||
- pip | ||
run: | ||
- python >={{ python_min }} | ||
|
||
test: | ||
imports: | ||
- chunk | ||
commands: | ||
- pip check | ||
requires: | ||
- python {{ python_min }} | ||
- pip | ||
|
||
about: | ||
summary: Standard library chunk redistribution. "dead battery". | ||
license: BSD-4-Clause | ||
license_file: LICENSE | ||
home: https://github.com/youknowone/python-deadlib | ||
|
||
extra: | ||
recipe-maintainers: | ||
- bmcfee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{% set name = "standard-sunau" %} | ||
{% set version = "3.13.0" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/standard_sunau-{{ version }}.tar.gz | ||
sha256: b319a1ac95a09a2378a8442f403c66f4fd4b36616d6df6ae82b8e536ee790908 | ||
|
||
build: | ||
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this one can be noarch too. |
||
number: 0 | ||
|
||
requirements: | ||
host: | ||
- python | ||
- setuptools >=75.0 | ||
- pip | ||
run: | ||
- python | ||
|
||
test: | ||
imports: | ||
- sunau | ||
commands: | ||
- pip check | ||
requires: | ||
- pip | ||
|
||
about: | ||
summary: Standard library sunau redistribution. "dead battery". | ||
license: BSD-4-Clause | ||
license_file: LICENSE | ||
home: https://github.com/youknowone/python-deadlib | ||
|
||
extra: | ||
recipe-maintainers: | ||
- bmcfee |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one can probably be noarch, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle yes, but see my comment/question in the main PR thread about noarch vs selectors #29400 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed that, you need to set the min python variable, add
{% set python_min = "3.13" %}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I misread. OK. If this module is done "right" you probably can install it without clobbering, it will become a stub. If not, you will have to keep this as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify, do you mean the implementation of the module, or the packaging of the module?
My understanding is that the module code itself is a direct extraction from old standard lib code, and doesn't have the smarts to stub itself out. At the same time, I don't think the deadlib maintainers are open to contributions that would add the stub logic, since they want to keep the code essentially as archival.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick follow-up:
import aifc
hits the standard lib module first and does not try to load the deadlib version. I expect that even if it did hit the deadlib version, it would still work, but I'd rather not chance it.This then raises the question: is it legit to package these deadlibs as noarch that can be installed on any python version? Maybe that's a question for the deadlib maintainers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Giving the fact that is clobbers existing files? No. It is better too sacrifice noarch advantages here. Let's keep these as is. Thanks for the clarifications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clobbering the existing files, but "correct" behavior (ie using the standard lib implementation instead of the external package) depends on the module import search order. While this is (to my knowledge) well-defined, it does make me a little nervous.
For these packages, that's fine. I'm more concerned about the downstream packages that may want to stay noarch and have these deadlibs as dependencies if needed. This is where I'm stuck, and I don't see a simple path forward with the usual packaging pipeline.
I do wonder if it's possible to do something clever here: what if these deadlibs are not built as noarch, and we create stub packages for python <=3.12 that do not install anything? For 3.13+ the packages would install as we currently have them in this PR.
This would make it so that the downstream dependents could still be noarch and depend on these libs, but installing, say,
standard-aifc
in a 3.12 environment would act as a no-op.Is such a thing possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
Yeah, better this one "arched" and many other noarch.
Probably. Not sure if it is worth it though. IMO, we should fix the "semi-arch" concept so we can do things like this as noarch moving on. However, that is a fix on recipe format and conda itself.