-
Notifications
You must be signed in to change notification settings - Fork 3
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
#39 ⬆️ update default python version from 3.9.16 to 3.11.4 to… #42
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,27 +21,35 @@ public class InitializeHabushuMojo extends AbstractHabushuMojo { | |
@Override | ||
public void execute() throws MojoExecutionException, MojoFailureException { | ||
|
||
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. I (Informational): recommend hiding whitespace |
||
getLog().info("Validating Poetry-based project structure..."); | ||
PoetryCommandHelper poetryHelper = createPoetryCommandHelper(); | ||
poetryHelper.execute(Arrays.asList("check")); | ||
|
||
String currentPythonPackageVersion = poetryHelper.execute(Arrays.asList("version", "-s")); | ||
String pomVersion = project.getVersion(); | ||
String expectedPythonPackageVersion = getPythonPackageVersion(pomVersion, false, null); | ||
|
||
if (!StringUtils.equals(currentPythonPackageVersion, expectedPythonPackageVersion)) { | ||
if (overridePackageVersion) { | ||
getLog().info(String.format("Setting Poetry package version to %s", expectedPythonPackageVersion)); | ||
getLog().info( | ||
"If you do *not* want the Poetry package version to be automatically synced with the POM version, set <overridePackageVersion>false</overridePackageVersion> in the plugin's <configuration>"); | ||
poetryHelper.executeAndLogOutput(Arrays.asList("version", expectedPythonPackageVersion)); | ||
} else { | ||
getLog().debug(String.format( | ||
"Poetry package version set to %s in pyproject.toml does not align with expected POM-derived version of %s", | ||
currentPythonPackageVersion, expectedPythonPackageVersion)); | ||
} | ||
|
||
} | ||
getLog().info("Validating Poetry-based project structure..."); | ||
PoetryCommandHelper poetryHelper = createPoetryCommandHelper(); | ||
try { | ||
poetryHelper.execute(Arrays.asList("check")); | ||
} catch (HabushuException e) { | ||
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. Seems to occur when you update the minimum python version in your |
||
getLog().debug("Failure encountered while running 'poetry check'!", e); | ||
getLog().warn("poetry check failed (debug contains more details) - this is likely due to a " | ||
+ "mismatch between your pyproject.toml and poetry.lock file - attempting to correct..."); | ||
poetryHelper.execute(Arrays.asList("lock", "--no-update")); | ||
getLog().warn("Corrected - pyproject.toml and poetry.lock now synced"); | ||
} | ||
|
||
String currentPythonPackageVersion = poetryHelper.execute(Arrays.asList("version", "-s")); | ||
String pomVersion = project.getVersion(); | ||
String expectedPythonPackageVersion = getPythonPackageVersion(pomVersion, false, null); | ||
|
||
if (!StringUtils.equals(currentPythonPackageVersion, expectedPythonPackageVersion)) { | ||
if (overridePackageVersion) { | ||
getLog().info(String.format("Setting Poetry package version to %s", expectedPythonPackageVersion)); | ||
getLog().info( | ||
"If you do *not* want the Poetry package version to be automatically synced with the POM version, set <overridePackageVersion>false</overridePackageVersion> in the plugin's <configuration>"); | ||
poetryHelper.executeAndLogOutput(Arrays.asList("version", expectedPythonPackageVersion)); | ||
} else { | ||
getLog().debug(String.format( | ||
"Poetry package version set to %s in pyproject.toml does not align with expected POM-derived version of %s", | ||
currentPythonPackageVersion, expectedPythonPackageVersion)); | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ authors = ["Eric Konieczny <[email protected]>"] | |
license = "MIT License" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
python = "^3.11" | ||
habushu-mixology = {path = "../habushu-mixology", develop = true} | ||
|
||
[tool.poetry.dev-dependencies] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ authors = ["Eric Konieczny <[email protected]>"] | |
license = "MIT License" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
python = "^3.11" | ||
krausening = "17" | ||
cryptography = "^41.0.3" | ||
uvicorn = {version = "^0.18.0", extras = ["standard"]} | ||
|
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.
I (Informational): Need newer version of pyenv to install python 3.11.4