I was just editing my Dockerfile and suddenly IntelliJ showed me the message “No” without any context.

    • mickkc@lmy.ndu.wtfOP
      link
      fedilink
      arrow-up
      8
      ·
      19 hours ago

      What should I use instead? pyproject.toml?

      I am pretty new to Python so I’m not very familiar with the ecosystem yet…

          • Eager Eagle@lemmy.world
            link
            fedilink
            English
            arrow-up
            13
            ·
            17 hours ago

            I used poetry for years before uv, but uv is just a better tool. If openai enshittifies it, I have no doubt it’ll be forked instantly.

            • BlameTheAntifa@lemmy.world
              link
              fedilink
              arrow-up
              3
              arrow-down
              3
              ·
              16 hours ago

              Think about what they get by controlling a popular package manager. Think about what you give them.

              You will not feel the consequences directly.

              • Hetare King@piefed.social
                link
                fedilink
                English
                arrow-up
                5
                ·
                11 hours ago

                Doesn’t uv just use PyPI for its packages (i.e. it’s not talking to any servers owned by them)? There’s the possibility of hijinks on the client side, of course, but it would be hard to do without anyone noticing and causing a huge stink about it.

                I’d say the more worrying aspects of uv is the use of AI in its development even before OpenAI bought them out and what’s going to happen to it after OpenAI eventually goes under.

                • NotSteve_@lemmy.ca
                  link
                  fedilink
                  arrow-up
                  3
                  ·
                  6 hours ago

                  Yeah I used to be a huge advocate for Poetry and convinced my previous company to switch to it but it’s painfully slow when compared to UV so I can’t go back

        • mickkc@lmy.ndu.wtfOP
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          19 hours ago

          That looks really convenient, especially when installing and switching Python versions. I’ll keep that in mind. Thanks!

      • bamboo@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        5
        ·
        19 hours ago

        Curious what others have to say, but my go to is to have a requirements.in with direct packages I need for the project, and then run pip-compile to generate all the dependencies with their exact version at the time so that deployments are repeatable. This works well for deployment, but if I were writing a library for others to use, I think you put the direct dependencies in setup.py

          • bamboo@lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            3
            ·
            17 hours ago

            Well if the requirements.txt is pinned to a specific version of a dependency of a dependency, you might not know or really care why that’s set. But then this becomes a nightmare and dependency hell laterif you want a newer version of some package, and that newer version requires a bunch of newer packages and loses the others. At that point you probably will toss your old file and start a new one from scratch piecing together all the requirements with like pip freeze in a new virtual environment.

            Sure you could omit the versions, but then everytime you deploy, you don’t know what you’re going to get and a deployment today would be very different next week with a whole bunch of different versions of dependencies.

        • mickkc@lmy.ndu.wtfOP
          link
          fedilink
          arrow-up
          1
          ·
          19 hours ago

          I don’t quite understand that. I did some research, and I read that the requirements.txt is somehow generated from requirements.in. But what is the difference between the two files then? Could you give me an example of what a requirements.in file would look like?

          Thank you!

          • scrion@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            17 hours ago

            Please use a pyproject.toml file for both project setup and dependency management. It actually is standardized now in PEPs.

            uv is a great tool, now comes with a build tool as well. It has become a de-facto standard.

          • mickkc@lmy.ndu.wtfOP
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            19 hours ago

            Ohhh now I get it. It’s basically like package.json and package-lock.json in node, but for Python.

            It’s a bit strange to me that this isn’t the default in Python…

            • bamboo@lemmy.blahaj.zone
              link
              fedilink
              English
              arrow-up
              2
              ·
              18 hours ago

              Yes exactly, like if I know my app needs the requests library, I will just put that in requirements.in but after compile requirements.txt will include the exact version of requests and every version of each dependency. So that every time pip install is run, all dependencies are always the same despite what happens upstream