Skip to content

Commit 452a6f5

Browse files
Bump conjure-python-client upper bound to <4 (#1036)
1 parent 4a6c2ab commit 452a6f5

File tree

10 files changed

+20
-8
lines changed

10 files changed

+20
-8
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type: improvement
2+
improvement:
3+
description: Bump conjure-python-client upper bound to <4
4+
links:
5+
- https://github.com/palantir/conjure-python/pull/1036

conjure-python-core/src/test/java/com/palantir/conjure/python/ConjurePythonGeneratorTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public final class ConjurePythonGeneratorTest {
4040
.packageVersion("0.0.0")
4141
.packageDescription("project description")
4242
.minConjureClientVersion("2.8.0")
43+
.maxConjureClientVersion("4")
4344
.generatorVersion("0.0.0")
4445
.shouldWriteCondaRecipe(true)
4546
.generateRawSource(false)
@@ -60,7 +61,7 @@ private void assertFoldersEqual(Path expected) throws IOException {
6061
Set<Path> generatedButNotExpected = pythonFileWriter.getPythonFiles().keySet();
6162
long count = 0;
6263
try (Stream<Path> walk = Files.walk(expected)) {
63-
for (Path path : walk.collect(Collectors.toList())) {
64+
for (Path path : walk.toList()) {
6465
if (!path.toFile().isFile()) {
6566
continue;
6667
}
@@ -76,7 +77,7 @@ private void assertFoldersEqual(Path expected) throws IOException {
7677
}
7778

7879
private void maybeResetExpectedDirectory(Path expected, ConjureDefinition definition) throws IOException {
79-
if (Boolean.valueOf(System.getProperty("recreate", "false"))
80+
if (Boolean.parseBoolean(System.getProperty("recreate", "false"))
8081
|| !expected.toFile().isDirectory()) {
8182
Files.createDirectories(expected);
8283
try (Stream<Path> walk = Files.walk(expected)) {

conjure-python-core/src/test/resources/services/expected/conda_recipe/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ requirements:
1515
- python
1616
- setuptools
1717
- requests
18-
- conjure-python-client >=2.8.0,<3
18+
- conjure-python-client >=2.8.0,<4
1919

2020
run:
2121
- python
2222
- requests
23-
- conjure-python-client >=2.8.0,<3
23+
- conjure-python-client >=2.8.0,<4

conjure-python-core/src/test/resources/services/expected/setup.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conjure-python-core/src/test/resources/types/expected/conda_recipe/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ requirements:
1515
- python
1616
- setuptools
1717
- requests
18-
- conjure-python-client >=2.8.0,<3
18+
- conjure-python-client >=2.8.0,<4
1919

2020
run:
2121
- python
2222
- requests
23-
- conjure-python-client >=2.8.0,<3
23+
- conjure-python-client >=2.8.0,<4

conjure-python-core/src/test/resources/types/expected/setup.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conjure-python/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ dependencies {
4242
task generateBuildConfiguration {
4343
doLast {
4444
def minConjureClientVersion = conjurePythonClientVersion
45+
def maxConjureClientVersion = maxConjurePythonClientVersion
4546
def props = new File("$projectDir/src/main/resources/buildConfiguration.yml")
4647
props.getParentFile().mkdirs()
4748
props.text = "generatorVersion: ${project.version}\n"
4849
props.text += "minConjureClientVersion: $minConjureClientVersion\n"
50+
props.text += "maxConjureClientVersion: $maxConjureClientVersion\n"
4951
}
5052
}
5153

conjure-python/src/main/java/com/palantir/conjure/python/cli/BuildConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public abstract class BuildConfiguration {
3434

3535
abstract String minConjureClientVersion();
3636

37+
abstract String maxConjureClientVersion();
38+
3739
static BuildConfiguration load() {
3840
try {
3941
return OBJECT_MAPPER.readValue(

conjure-python/src/main/java/com/palantir/conjure/python/cli/ConjurePythonCli.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ static GeneratorConfiguration resolveGeneratorConfiguration(
126126
return GeneratorConfiguration.builder()
127127
.generatorVersion(buildConfig.generatorVersion())
128128
.minConjureClientVersion(buildConfig.minConjureClientVersion())
129+
.maxConjureClientVersion(buildConfig.maxConjureClientVersion())
129130
.packageAuthor(cliConfig.packageAuthor())
130131
.packageDescription(cliConfig.packageDescription())
131132
.packageName(cliConfig.packageName())

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
org.gradle.parallel=true
22
conjurePythonClientVersion=2.8.0
3+
maxConjurePythonClientVersion=4
34
org.gradle.jvmargs = --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
45
palantir.jdk.setup.enabled=true
56
palantir.native.formatter=true

0 commit comments

Comments
 (0)