Skip to content

Update dependencies #342

Closed
Closed

Description

@thetric

As mentioned in #169 (comment) and #157 (comment) it is preferrable if team members update dependencies:

The following dependencies have later milestone versions:

Activity

  1. Stewori commented on Jul 19, 2024

    @Stewori
    Member

    I am a bit hesistent to do these updates for 2.7.4 because beta phase is already somewhat through. There will be an rc phase though and these updates are not really changes to Jython. Given the long Jython release cycle, third party libs bundled with 2.7.4 should IMO be indeed as new as possible at release time, especially security-relevant ones like bouncycastle. @jeff5 if you consent I can tackle the third party libs update, but let's agree on a date to avoid repeated effort due to further new releases. My suggestion would be right before rc release (like one day before), to include all updates that pass regrtests. I assume it is okay to take the jars from maven central, because it is an annoying hassle to work through the individual homepages.

  2. jeff5 commented on Jul 19, 2024

    @jeff5
    Member

    Left to myself, I'd freeze dependencies at the beta. I did a round of updating then, but beta phase has run on a bit. I think accepting dependency changes into a release candidate, on condition they don't create a regression is a fair suggestion. If we have to make code changes of our own to adjust to them, that's a beta.

    @thetric thanks for the comprehensive list. I know I tried to advance a few of of these at b1, and they caused problems. I can see I tried netty 4.1.80 and rejected it.

    We don't bundle the Oracle and Informix JARs, but of course we specify versions.

  3. Stewori commented on Jul 19, 2024

    @Stewori
    Member

    Thanks, @jeff5 for the clarification. I was not aware that a netty update would cause problems (perhaps you pointed it out somewhere but I forgot or overlooked). Perhaps it would be good to directly open issues for such failures to keep track (may be a "won't fix", that would also be fine, but it should be tracked).

  4. added this to the Jython 2.7.4rc1 milestone on Jul 19, 2024
  5. jeff5 commented on Jul 19, 2024

    @jeff5
    Member

    I would have said I'd noted it in the build files, but not when I look. (Maybe on a branch I dropped.)

  6. jeff5 commented on Jul 20, 2024

    @jeff5
    Member

    I'll work through these and see how they treat us.

  7. jeff5 commented on Jul 21, 2024

    @jeff5
    Member

    JARs for jdbc and ojdbc are citations in our build, but not bundled.

    Ant is used in the build (including for a custom plug-in) but not bundled.

  8. Stewori commented on Jul 21, 2024

    @Stewori
    Member

    Not bundling ant appears a bit dubious to me, because I get plenty of missing symbol and missing package errors if ant is not on the classpath, e.g. like this one:

    .../jython/2.7.3/src/org/python/util/GlobMatchingTask.java:12: error: cannot find symbol
    public abstract class GlobMatchingTask extends MatchingTask {
                                                   ^
      symbol: class MatchingTask
    

    This does not look like code that can never execute on runtime, does it?

    See org.apache.tools.ant occurring in the imports of
    ExposeTask
    GlobMatchingTask
    JythoncAntTask
    JycompileAntTask

    Maybe the org.python.util package needs some cleanup (for the runtime distribution). No need to handle this now before the release, but maybe we should track it in an issue. JythoncAnTask is probably obsolete and I agree that JycompileAntTask sounds like only build-time. But ExposeTask?

  9. jeff5 commented on Jul 21, 2024

    @jeff5
    Member

    Not bundling ant appears a bit dubious to me

    I believe it is what this is about:

    includeantruntime="true"
    although it is only there to compile the custom Ant tasks. ExposeTask processes Java classes and JycompileAntTask compiles the stdlib.

    Ideally, build tools would be in a separate tree, not mixed in with the delivered code, and filtered out later.

    excludes="org/python/expose/generate/**,org/python/version.properties"/>

  10. Stewori commented on Jul 21, 2024

    @Stewori
    Member

    After some reading on the topic I learned that it is quite more usual for Java programs/libs to omit dependencies as "compile-time only" than I thought. Seemingly, there is no systematic/general/reliable/automatic way to decide which libs are runtime dependencies and which are not (I know, the dependencies in pom files may indicate the dependency types, but I found it unreliable, at least for determining compile-time dependencies). So it's often a bit dubious, perhaps dependent on the use case, and some unfortunate user may still find a way to use a lib such that a missing runtime-lib/thought-to-be compile-time lib crashes the thing. (but of course you know all this)
    Given that issue, I suppose some cleanup would be good. What can safely be sorted out should be, to minimize the issue at least.

    build tools would be in a separate tree, not mixed in with the delivered code

    Yes, that's also my thinking. Probably, the first step would be to move everything ant-dependent out of org.python.util into a new folder and package, e.g. org.python.ant which can then be added to excludes in build.xml. Perhaps, we can attempt that refactoring for 2.7.5. Would be good to have the separation for Jython 3 at least. Can Java modularization be of any help for that? (Note: For Java modularization compile-time-only dependencies are referenced as requires static.) Or maybe the problem is obsolete in Gradle.

  11. jeff5 commented on Jul 22, 2024

    @jeff5
    Member

    My appetite for improvements to Jython 2 is limited. I looked into the Ant plug-ins for a few hours and decided to leave them alone.

    I'm writing from knowledge of Jython 3 (or VSJ) and struggling with Gradle, which has a specific feature for tool-building before the build proper. Done right, it should cut down the build time by recognising when artefacts are up to date. I made it work once in Java, but I can't figure it out when the tool is in Python. I've spent more time trying than it will ever save.

    Or maybe the problem is obsolete in Gradle.

    No. It needs you to tell it, but how you do that makes reasonable sense.

  12. jeff5 commented on Jul 22, 2024

    @jeff5
    Member

    I tried updating Netty to 4.1.112, but it gives me errors in test_httplib and test_ssl_jy. The error is always:

    SSLError: [Errno 1] SslHandler removed before handshake completed
    

    I smell concurrency/async, which is Netty's selling point, but I believe we do not need it for the library and have not used it correctly.

  13. Stewori commented on Jul 22, 2024

    @Stewori
    Member

    No. It needs you to tell it,

    At least there won't be AntTasks.

  14. jeff5 commented on Jul 28, 2024

    @jeff5
    Member

    I think we have updated all we can in response to this, so it looks like we have an rc1. @Stewori : am I missing something you really wanted to be in?

  15. Stewori commented on Jul 29, 2024

    @Stewori
    Member

    Thank you Jeff, for all this work. I have nothing more to add here. The Netty situation is not ideal, but apparently not solvable in short term. So, feel free to proceed!

  16. jeff5 commented on Aug 2, 2024

    @jeff5
    Member

    As the Netty shortfall is documented in #349 I'll close this.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions