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

replace python3Packages with python310Packages #646

Draft
wants to merge 2 commits into
base: released
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions ofborg/src/tasks/eval/nixpkgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const TITLE_LABELS: [(&str, &str); 4] = [
("cross", "6.topic: cross-compilation"),
];

const TITLE_REPLACEMENTS: [(&str, &str); 1] = [
("python3Packages", "python310Packages"),
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
("python3Packages", "python310Packages"),
("python3Packages", "python3.pkgs"),

That is less of a moving target and references the default python version.

Copy link
Member Author

Choose a reason for hiding this comment

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

Won't work for the same reason why python3Packages won't work https://gist.github.com/GrahamcOfBorg/f9eea356a93c92631f3d2b4304070282

Copy link
Member

Choose a reason for hiding this comment

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

So we need to bump the version here every year, when we move the default python version? Will be 3.11 in a few weeks.

Copy link
Member

Choose a reason for hiding this comment

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

Is python311Packages now on python-updates and soon on staging.

];

fn label_from_title(title: &str) -> Vec<String> {
let labels: Vec<_> = TITLE_LABELS
.iter()
Expand Down Expand Up @@ -639,6 +643,18 @@ fn parse_commit_messages(messages: &[String]) -> Vec<String> {
let pkgs: Vec<&str> = line.split(',').collect();
pkgs
})
.map(|pkg| {
TITLE_REPLACEMENTS
.iter()
.map(move |(word, replacement)| {
if pkg.contains(word) {
pkg.replace(word, replacement)
} else {
pkg.to_string()
}
})
})
.flatten()
.map(|line| line.trim().to_owned())
.collect()
}
Expand All @@ -657,6 +673,7 @@ mod tests {
"buildkite-agent",
"python.pkgs.ptyprocess",
"python.pkgs.ptyprocess",
"python310Packages.surepy",
"android-studio-preview",
"foo",
"bar",
Expand All @@ -671,6 +688,7 @@ mod tests {
buildkite-agent: enable building on darwin
python.pkgs.ptyprocess: 0.5 -> 0.5.2
python.pkgs.ptyprocess: move expression
python3Packages.surepy: 0.7.1 -> 0.7.2
Merge pull request #34465 from steveeJ/steveej-attempt-qtile-bump-0.10.7
android-studio-preview: 3.1.0.8 -> 3.1.0.9
Merge pull request #34188 from dotlambda/home-assistant
Expand Down