Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdm sync fails with version >= 1.12 #841

Closed
1 task done
pasmon opened this issue Jan 4, 2022 · 3 comments
Closed
1 task done

pdm sync fails with version >= 1.12 #841

pasmon opened this issue Jan 4, 2022 · 3 comments
Labels
🐛 bug Something isn't working

Comments

@pasmon
Copy link

pasmon commented Jan 4, 2022

  • I have searched the issue tracker and believe that this is not a duplicate.

pdm-1.12-issue.zip

Steps to reproduce

Use latest version of pdm and run:
pdm sync -v --no-self --no-editable --dev --group lint

Actual behavior

Using pdm version >= 1.12 causes pdm sync to fail.

What's weird is also this text which doesn't appear with version 1.11.3:
Lock file hash doesn't match pyproject.toml, packages may be outdated

Expected behavior

pdm sync should work as it did with pdm version <= 1.11.3.

Environment Information

PDM version:        1.12.2
Python Interpreter: /usr/local/bin/python (3.8)
Project Root:       /builds/work/ansible
Project Packages:   /builds/work/ansible/__pypackages__/3.8
@pasmon pasmon added the 🐛 bug Something isn't working label Jan 4, 2022
@frostming
Copy link
Collaborator

It didn't fail, just a warning, run pdm lock --refresh to update the hashes.

For the auto update check failure, have you configured any index server in pip config?

@pasmon
Copy link
Author

pasmon commented Jan 4, 2022

Got rid of the lock hash warning with your instructions, thanks!

We are running the pdm sync in GitLab CI and the job does fail to some pdm operation before we get to the actual linting part which is the purpose of the job:

Traceback (most recent call last):
  File "/usr/local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/pdm/core.py", line 219, in main
    return Core().main(args)
  File "/usr/local/lib/python3.8/site-packages/pdm/core.py", line 173, in main
    check_update(options.project)
  File "/usr/local/lib/python3.8/site-packages/pdm/cli/actions.py", line 808, in check_update
    latest_version = parse_version(get_latest_version(project))
  File "/usr/local/lib/python3.8/site-packages/pdm/cli/actions.py", line 788, in get_latest_version
    latest_version = str(candidate.best_candidate.version)
AttributeError: 'NoneType' object has no attribute 'version'
Uploading artifacts...
00:02
log.txt: found 1 matching files                    
Uploading artifacts to coordinator... ok            id=8542365 responseStatus=201 Created token=NNCff1b-
ERROR: Job failed: exit code 1

This doesn't happen with the 1.11.3 version.

Not sure what is meant with "auto update check failure", but we haven't configured any index server in pip config. We do install pdm from our internal PyPI mirror with pip.

@frostming
Copy link
Collaborator

pdm config check_update false to turn it off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants