question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Preserve order of Pipfile

See original GitHub issue

Every time the Pipfile is changed the Pipfile section arrangement might, too. Which is a pain if you have to review such changes. Especially if it’s the case for Pipfile and Pipfile.lock.

I’m not very familiar with TOML and the Python package used but maybe it’s possible to preserve the order when writing to the Pipfile? (Using OrderedDicts internally or something).


TODO (this section by Kenneth Reitz)

  • determine if TOML library supports dumping OrderedDicts.
  • determine if TOML library supports loading OrderedDicts.
  • implement preserve order in Pipfile
  • implement preserve order in Pipfile.lock

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
kennethreitzcommented, Jan 26, 2017

It does support ordered dicts for loading!

print toml.loads(toml.dumps(d), _dict=OrderedDict)
1reaction
kennethreitzcommented, Jan 26, 2017

I will have to investigate ordering of the lockfile and, most likely, the order of the resulting requirements.txt.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to specify install order for python pip? - Stack Overflow
Is there a way to specify install order for pip as it doesn't seem to do it properly by itself? This can be...
Read more >
Basic Usage of Pipenv - Read the Docs
Generally, keep both Pipfile and Pipfile.lock in version control. Do not keep Pipfile.lock in version control if multiple versions of Python are being...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
Dependencies of wheels provided in a Pipfile will not be captured by $ pipenv lock . ... This feature was requested as a...
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
Pipfile won't lock when it tries to install packages that don't exist, i.e., typos. ... Pipenv looks for the package you specify, whether...
Read more >
pipenv Documentation - Read the Docs
Do not keep Pipfile.lock in version control if multiple versions of Python are ... pipenv install -e, in order to ensure that dependency...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found