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

pipenv sync unexpected behavior when Pipfile missing #1977

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

pipenv sync unexpected behavior when Pipfile missing #1977

pikeas opened this issue Apr 12, 2018 · 6 comments
Labels
good first issue Issues suitable as a newcomer to get familiar with Pipenv! Type: Bug 🐛 This issue is a bug.

Comments

@pikeas
Copy link

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
Copy link
Contributor

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
Copy link
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 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 <[email protected]>
techalchemy added a commit that referenced this issue Apr 14, 2018
- 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 <[email protected]>
@techalchemy techalchemy added the Type: Bug 🐛 This issue is a bug. label Apr 14, 2018
techalchemy added a commit that referenced this issue Apr 14, 2018
- 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 <[email protected]>
techalchemy added a commit that referenced this issue Apr 16, 2018
- 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 <[email protected]>
techalchemy added a commit that referenced this issue Apr 16, 2018
- 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 <[email protected]>
techalchemy added a commit that referenced this issue Apr 17, 2018
- 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 <[email protected]>
techalchemy added a commit that referenced this issue Apr 17, 2018
- 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 <[email protected]>
@techalchemy
Copy link
Member

Closed by #1980

@butla
Copy link

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
Copy link

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
Copy link
Member

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
Labels
good first issue Issues suitable as a newcomer to get familiar with Pipenv! Type: Bug 🐛 This issue is a bug.
Projects
None yet
Development

No branches or pull requests

5 participants