Code Monkey home page Code Monkey logo

Comments (4)

deronnax avatar deronnax commented on June 2, 2024

Ironically, I also noticed that if you pass the --verbose flag to publish, you actually get less informations:

➜ pdm publish --no-build
Uploading ourpackage-4.9.0a0-py3-none-any.whl
 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 145.0/145.0 kB • 00:00 • 504.2 MB/s
See /var/folders/js/42fyz4mx6hzddmngv9t7mj7m0000gn/T/pdm-publish-_lj550hi.log for detailed debug log.
[PublishError]: 400 Client Error: Bad Request for url: https://gitlab.ourcompany.com/api/v4/projects/435/packages/pypi
➜ 
➜ pdm publish --no-build --verbose
Uploading ourpackage-4.9.0a0-py3-none-any.whl
[PublishError]: 400 Client Error: Bad Request for url: https://gitlab.ourcompany.com/api/v4/projects/435/packages/pypi
➜

from pdm.

frostming avatar frostming commented on June 2, 2024

we do emit errors with response text under verbose mode. also write to a log file under normal verbosity. I am on mobile But you can check it in cli/commands/publish/init.py and you'll know I'm not lying

from pdm.

frostming avatar frostming commented on June 2, 2024

I made a mock service and did a quick test. Under normal mode:

❯ pdm publish -r http://localhost:8000/ --no-build
Username: sdfsd
Password: 
Uploading marko-2.0.2-py3-none-any.whl
 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.7/51.7 kB • 00:00 • 340.4 MB/s
See /var/folders/4d/r05n15jx1yv7yd4z7qrtmdm00000gn/T/pdm-publish-n84curhw.log for detailed debug log.
[PublishError]: 400 Client Error: Bad Request for url: http://localhost:8000/

The error can be seen in the log file.

And under debug mode(with -vv):

❯ pdm publish -r http://localhost:8000/ --no-build -vv
Username: fdsf
Password: 
Uploading marko-2.0.2-py3-none-any.whl
pdm.termui: Response from http://localhost:8000/:
400 Bad Request
pdm.termui: {"message":"Hello","error":"error"}
[PublishError]: 400 Client Error: Bad Request for url: http://localhost:8000/

from pdm.

deronnax avatar deronnax commented on June 2, 2024

OK. Would you merge a PR that make the server's answer displayed with verbose mode rather than debug mode? I think that's what an user would expect.

from pdm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.