Skip to content

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Jan 16, 2026

Continuation of #136729.

Original description:


Notes

Please see #136728. Changes to build.yml are directly adapted from @hugovk's proof-of-concept here.

Testing

  • this PR's CI
  • PR CI on my fork.

build-ubuntu-ssltests-awslc,
build-ubuntu-ssltests-openssl,
build-ubuntu-ssltests,
build-wasi,
Copy link
Member

Choose a reason for hiding this comment

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

wasi? why is this a part of the patch?

Copy link
Member

Choose a reason for hiding this comment

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

Could be because of conflicts or out-of-date PR?

run: |
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
- name: Configure CPython
run: |
Copy link
Member

Choose a reason for hiding this comment

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

>- makes EOL escaping redundant while allowing for nice line separation of long/logically self-contained components:

Suggested change
run: |
env:
CONFIGURE_TRAILING_ARGS: >-
${{
matrix.ssl != 'openssl'
&& '--with-builtin-hashlib-hashes=blake2 --with-ssl-default-suites=openssl'
|| ''
}}
run: >-

Copy link
Member

Choose a reason for hiding this comment

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

I prefer \ becauseI find them easier to read. I find the >- harder to read honestly.

Comment on lines +312 to +317
CMD=(./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$SSL_DIR")
if [ "${{ matrix.ssl }}" = "openssl" ]; then
"${CMD[@]}"
else
"${CMD[@]}" --with-builtin-hashlib-hashes=blake2 --with-ssl-default-suites=openssl
fi
Copy link
Member

@webknjaz webknjaz Jan 16, 2026

Choose a reason for hiding this comment

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

Suggested change
CMD=(./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$SSL_DIR")
if [ "${{ matrix.ssl }}" = "openssl" ]; then
"${CMD[@]}"
else
"${CMD[@]}" --with-builtin-hashlib-hashes=blake2 --with-ssl-default-suites=openssl
fi
./configure
CFLAGS="-fdiagnostics-format=json"
--config-cache
--enable-slower-safety
--with-pydebug
--with-openssl="$SSL_DIR"
${CONFIGURE_TRAILING_ARGS}

Copy link
Member

Choose a reason for hiding this comment

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

I prefer the if/else approach. I do not like the notion of 'trailing' args.

@webknjaz webknjaz moved this to 🧐 @webknjaz's review queue 📋 in 📅 Procrastinating in public Jan 16, 2026

@property
@abstractmethod
def library(self=None):
Copy link
Member

@picnixz picnixz Jan 17, 2026

Choose a reason for hiding this comment

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

So as I said previously, we should just have annotated properties. It will complain at runtime if we are missing one.

assert len(libs) == 1
cls = libs.pop()
if args.ssl_versions:
versions.extend((cls, v) for v in args.ssl_versions])
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
versions.extend((cls, v) for v in args.ssl_versions])
versions.extend((cls, v) for v in args.ssl_versions)

if args.ssl_versions:
versions.extend((cls, v) for v in args.ssl_versions])
else:
versions.extend([(cls, v) for v in cls.recent_versions.fget()])
Copy link
Member

Choose a reason for hiding this comment

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

No need for the additional list constructor. You can just tuse the generator directly in extend()

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

Labels

infra CI, GitHub Actions, buildbots, Dependabot, etc. skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants