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

pipenv sync unexpected behavior when Pipfile missing #1977

Closed
pikeas opened this Issue Apr 12, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@pikeas

pikeas commented Apr 12, 2018

Pipfile:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
aioredis = "*"

[dev-packages]
ipython = "*"

[requires]
python_version = "3.6"

Generate Pipefile.lock for the above, delete Pipfile, and then:

$ pipenv sync
...
$ cat Pipfile.lock
{
    "_meta": {
        "hash": {
            "sha256": "4e55147db217bb4120f6e68cb8cad7bc37011457441ce0eb9d97308315625834"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.6"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.python.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {},
    "develop": {}
}
Expected result

pipenv installs the packages in Pipfile.lock.

Actual result

pipenv installs no packages and replaces Pipfile.lock with a new file containing no packages.

@frostming

This comment has been minimized.

Collaborator

frostming commented Apr 13, 2018

I can send a PR to fix this quickly but I would like to go further into the missing features of pipenv sync, such as dry_run, dont_upgrade. It seems far from complete. Thanks

@techalchemy

This comment has been minimized.

Member

techalchemy commented Apr 13, 2018

There are some bugs in here that should get sorted out, so that would be appreciated!

techalchemy added a commit that referenced this issue Apr 14, 2018

Handle indexes, extra indexes, uncached sources
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>

techalchemy added a commit that referenced this issue Apr 14, 2018

Handle indexes, extra indexes, uncached sources
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>

techalchemy added a commit that referenced this issue Apr 14, 2018

Handle indexes, extra indexes, uncached sources
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>

techalchemy added a commit that referenced this issue Apr 16, 2018

Handle indexes, extra indexes, uncached sources
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>

techalchemy added a commit that referenced this issue Apr 16, 2018

Handle indexes, extra indexes, uncached sources
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>

techalchemy added a commit that referenced this issue Apr 17, 2018

Handle indexes, extra indexes, uncached sources
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>

techalchemy added a commit that referenced this issue Apr 17, 2018

Handle indexes, extra indexes, uncached sources
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy

This comment has been minimized.

Member

techalchemy commented Apr 17, 2018

Closed by #1980

@butla

This comment has been minimized.

butla commented Jul 3, 2018

@techalchemy I think this should be reopened. When I put Pipfile.lock without the Pipfile in a Docker image and run pipenv sync in the directory with Pipfile.lock I'm getting: Error: Pipfile.lock is missing! You need to run $ pipenv lock first.. When I copy the Pipfile as well the problem disappears.

@marlonjan

This comment has been minimized.

marlonjan commented Jul 19, 2018

Just had the same issue as @butla. Took me a while to understand that the error message was incorrect. Pipfile was missing, Pipfile.lock was present, and I got
Error: Pipfile.lock is missing! You need to run $ pipenv lock first.

@techalchemy techalchemy reopened this Jul 19, 2018

@techalchemy

This comment has been minimized.

Member

techalchemy commented Jul 19, 2018

Sorry about that, error message seems to be pretty clearly wrong on this one!

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