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 install: TypeError: 'NoneType' object is not callable #4829

Closed
RolandColored opened this issue Nov 5, 2021 · 13 comments
Closed

pipenv install: TypeError: 'NoneType' object is not callable #4829

RolandColored opened this issue Nov 5, 2021 · 13 comments

Comments

@RolandColored
Copy link

RolandColored commented Nov 5, 2021

Issue description

We had 2 pipeline runs using the same settings within a timeframe of 30 minutes. The first run went fine while the second failed suddenly. Turns out that in the meantime the new version 2021.11.5 was released.

After pinning pipenv to 2021.5.29 it works again.

Expected result

All packages got installed.

Actual result

$ python3 --version
Python 3.8.10
$ pip3 install pipenv && pipenv install --system --deploy
Collecting pipenv
  Downloading pipenv-2021.11.5-py2.py3-none-any.whl (3.9 MB)
Collecting virtualenv
  Downloading virtualenv-20.10.0-py2.py3-none-any.whl (5.6 MB)
Requirement already satisfied: setuptools>=36.2.1 in /usr/lib/python3/dist-packages (from pipenv) (45.2.0)
Collecting virtualenv-clone>=0.2.5
  Downloading virtualenv_clone-0.5.7-py3-none-any.whl (6.6 kB)
Requirement already satisfied: pip>=18.0 in /usr/lib/python3/dist-packages (from pipenv) (20.0.2)
Collecting certifi
  Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting filelock<4,>=3.2
  Downloading filelock-3.3.2-py3-none-any.whl (9.7 kB)
Collecting backports.entry-points-selectable>=1.0.4
  Downloading backports.entry_points_selectable-1.1.0-py2.py3-none-any.whl (6.2 kB)
Collecting distlib<1,>=0.3.1
  Downloading distlib-0.3.3-py2.py3-none-any.whl (496 kB)
Collecting platformdirs<3,>=2
  Downloading platformdirs-2.4.0-py3-none-any.whl (14 kB)
Collecting six<2,>=1.9.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: filelock, backports.entry-points-selectable, distlib, platformdirs, six, virtualenv, virtualenv-clone, certifi, pipenv
Successfully installed backports.entry-points-selectable-1.1.0 certifi-2021.10.8 distlib-0.3.3 filelock-3.3.2 pipenv-2021.11.5 platformdirs-2.4.0 six-1.16.0 virtualenv-20.10.0 virtualenv-clone-0.5.7
/usr/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn't match a supported version!
Installing dependencies from Pipfile.lock (5264b9)...
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/cli/command.py", line 220, in install
    do_install(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 1991, in do_install
    do_init(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 1255, in do_init
    do_install_dependencies(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 818, in do_install_dependencies
    batch_install(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 725, in batch_install
    c = pip_install(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 1427, in pip_install
    r = write_requirement_to_file(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 1359, in write_requirement_to_file
    line = requirement.line_instance.get_line(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2553, in line_instance
    self.line_instance = self.get_line_instance()
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2547, in get_line_instance
    return Line(line)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requirementslib/models/requirements.py", line 171, in __init__
    self.parse()
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1289, in parse
    self.parse_extras()
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requirementslib/models/requirements.py", line 577, in parse_extras
    self.line, extras = pip_shims.shims._strip_extras(self.line)
TypeError: 'NoneType' object is not callable

Steps to replicate

$ pipenv --support

Pipenv version: '2021.11.5'
Pipenv location: '/usr/local/lib/python3.8/dist-packages/pipenv'
Python location: '/usr/bin/python3'
Python installations found:

  • 3.8.10: /usr/bin/python3
  • 3.8.10: /usr/bin/python3.8
  • 3.8.10: /bin/python3
  • 3.8.10: /bin/python3.8

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.8.10',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.18.0-305.19.1.el8_4.x86_64',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP Tue Sep 7 07:07:31 EDT 2021',
 'python_full_version': '3.8.10',
 'python_version': '3.8',
 'sys_platform': 'linux'}

System environment variables:

  • KUBERNETES_SERVICE_PORT_HTTPS
  • CI_PROJECT_NAMESPACE
  • GITLAB_USER_ID
  • SAST_EXCLUDED_ANALYZERS
  • CI_RUNNER_VERSION
  • KEY_VAULT_ID
  • FF_SKIP_NOOP_BUILD_STAGES
  • KUBERNETES_SERVICE_PORT
  • CI_SERVER_NAME
  • CI_RUNNER_DESCRIPTION
  • GITLAB_USER_EMAIL
  • PWC_CA_BUNDLE
  • CI_SERVER_REVISION
  • FF_USE_WINDOWS_LEGACY_PROCESS_STRATEGY
  • CI_RUNNER_EXECUTABLE_ARCH
  • CI_REGISTRY_USER
  • CI_REGISTRY_PASSWORD
  • CI_API_V4_URL
  • CI_RUNNER_SHORT_TOKEN
  • CI_JOB_NAME
  • LOG_LEVEL
  • HOSTNAME
  • GITLAB_USER_LOGIN
  • FF_SKIP_DOCKER_MACHINE_PROVISION_ON_CREATION_FAILURE
  • CI_PROJECT_NAME
  • CI_PIPELINE_SOURCE
  • CI_BUILD_REF_NAME
  • DS_DEFAULT_ANALYZERS
  • CI_JOB_STATUS
  • CI_PIPELINE_ID
  • CI_BUILD_REF_SLUG
  • CI_COMMIT_REF_SLUG
  • CI_SERVER
  • SECRETS_ANALYZER_VERSION
  • SAST_SEMGREP_METRICS
  • FF_GITLAB_REGISTRY_HELPER_IMAGE
  • CI_COMMIT_SHORT_SHA
  • FF_CMD_DISABLE_DELAYED_ERROR_LEVEL_EXPANSION
  • CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX
  • SECRET_DETECTION_EXCLUDED_PATHS
  • PWD
  • CI_RUNNER_TAGS
  • CI_PROJECT_PATH
  • FF_USE_NEW_BASH_EVAL_STRATEGY
  • DS_EXCLUDED_PATHS
  • CI_SERVER_TLS_CA_FILE
  • CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX
  • ADDITIONAL_CA_CERT_BUNDLE
  • DS_MAJOR_VERSION
  • CI_COMMIT_REF_PROTECTED
  • FF_USE_POWERSHELL_PATH_RESOLVER
  • VAULT_CACERT
  • CI_SERVER_VERSION_MINOR
  • CI_COMMIT_SHA
  • HOME
  • FF_NETWORK_PER_BUILD
  • KEY_NAME
  • CI_DEPENDENCY_PROXY_PASSWORD
  • KUBERNETES_PORT_443_TCP
  • CI_PROJECT_VISIBILITY
  • CI_CONCURRENT_PROJECT_ID
  • CI_COMMIT_MESSAGE
  • SECURE_ANALYZERS_PREFIX
  • CI_BUILD_NAME
  • FF_USE_DIRECT_DOWNLOAD
  • CI_SERVER_VERSION
  • CI_REGISTRY
  • CI_SERVER_PORT
  • CUSTOMER_USER_EMAIL
  • CI_PIPELINE_IID
  • CI_REPOSITORY_URL
  • CI_SERVER_URL
  • FF_ENABLE_BASH_EXIT_CODE_CHECK
  • GITLAB_FEATURES
  • CI_COMMIT_DESCRIPTION
  • CI_JOB_STAGE
  • CI_PIPELINE_URL
  • CI_DEFAULT_BRANCH
  • CI_BUILD_REF
  • SCAN_KUBERNETES_MANIFESTS
  • CI_SERVER_VERSION_PATCH
  • CI_COMMIT_TITLE
  • VAULT_ADDR
  • CI_PROJECT_ROOT_NAMESPACE
  • ENVIRONMENT
  • LICENSE_MANAGEMENT_SETUP_CMD
  • GITLAB_USER_NAME
  • CI_PROJECT_DIR
  • SHLVL
  • CI_RUNNER_ID
  • CI_PIPELINE_CREATED_AT
  • CI_COMMIT_TIMESTAMP
  • CI_DISPOSABLE_ENVIRONMENT
  • CI_JOB_JWT
  • KUBERNETES_PORT_443_TCP_PROTO
  • CI_BUILD_ID
  • DS_EXCLUDED_ANALYZERS
  • CI_SERVER_PROTOCOL
  • CI_COMMIT_AUTHOR
  • KUBERNETES_PORT_443_TCP_ADDR
  • CI_COMMIT_REF_NAME
  • CI_SERVER_HOST
  • CI_JOB_URL
  • CI_JOB_TOKEN
  • SAST_EXCLUDED_PATHS
  • CI_JOB_STARTED_AT
  • CI_CONCURRENT_ID
  • CI_BUILD_TOKEN
  • CI_COMMIT_BRANCH
  • CI_PROJECT_CLASSIFICATION_LABEL
  • FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY
  • CI_RUNNER_REVISION
  • LICENSE_MANAGEMENT_VERSION
  • CI_BUILD_BEFORE_SHA
  • CI_DEPENDENCY_PROXY_USER
  • FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR
  • CI_PROJECT_PATH_SLUG
  • CI_NODE_TOTAL
  • KUBERNETES_SERVICE_HOST
  • KUBERNETES_PORT
  • KUBERNETES_PORT_443_TCP_PORT
  • CI_BUILDS_DIR
  • CI_JOB_ID
  • CI_PROJECT_REPOSITORY_LANGUAGES
  • PATH
  • CI_PROJECT_ID
  • CI
  • GITLAB_CI
  • CI_JOB_IMAGE
  • CI_COMMIT_BEFORE_SHA
  • CI_PROJECT_TITLE
  • CI_SERVER_VERSION_MAJOR
  • VAULT_NAMESPACE
  • CI_CONFIG_PATH
  • FF_USE_FASTZIP
  • CI_BUILD_STAGE
  • CI_DEPENDENCY_PROXY_SERVER
  • KEY_LENGTH
  • ACTION
  • CI_PROJECT_URL
  • OLDPWD
  • _
  • LC_CTYPE
  • PIP_SHIMS_BASE_MODULE
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:
Debug–specific environment variables:

  • PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • PWD: /builds/VqLQkzTA/4/pwc-de/team-the-forge/cloud-melter/cloud-melter-key-management

Contents of Pipfile ('/builds/VqLQkzTA/4/pwc-de/team-the-forge/cloud-melter/cloud-melter-key-management/Pipfile'):

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
python-slugify = "*"
hvac = "*"
logging-formatter-anticrlf = "*"
[dev-packages]
[requires]
python_version = "3.8"

Contents of Pipfile.lock ('/builds/VqLQkzTA/4/pwc-de/team-the-forge/cloud-melter/cloud-melter-key-management/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "259c38054ef2e2340e283cee83b35e947651d969a2f2f3ceff5814a3365264b9"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.8"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.python.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "certifi": {
            "hashes": [
                "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872",
                "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"
            ],
            "version": "==2021.10.8"
        },
        "charset-normalizer": {
            "hashes": [
                "sha256:e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0",
                "sha256:f7af805c321bfa1ce6714c51f254e0d5bb5e5834039bc17db7ebe3a4cec9492b"
            ],
            "markers": "python_version >= '3'",
            "version": "==2.0.7"
        },
        "hvac": {
            "hashes": [
                "sha256:3e8a34804b1e20954a2b4991cc13ed9c09b32e50dadd9d3438224481150f6568",
                "sha256:f905c59d32d88d3f67571fe5a8a78de4659e04798ad809de439f667247d13626"
            ],
            "index": "pypi",
            "version": "==0.11.2"
        },
        "idna": {
            "hashes": [
                "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff",
                "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"
            ],
            "markers": "python_version >= '3'",
            "version": "==3.3"
        },
        "logging-formatter-anticrlf": {
            "hashes": [
                "sha256:1d5b9b208938d637263d4d40f7841aa84164fd3fa128b633df55602c04fba60b"
            ],
            "index": "pypi",
            "version": "==1.2"
        },
        "python-slugify": {
            "hashes": [
                "sha256:6d8c5df75cd4a7c3a2d21e257633de53f52ab0265cd2d1dc62a730e8194a7380",
                "sha256:f13383a0b9fcbe649a1892b9c8eb4f8eab1d6d84b84bb7a624317afa98159cab"
            ],
            "index": "pypi",
            "version": "==5.0.2"
        },
        "requests": {
            "hashes": [
                "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24",
                "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"
            ],
            "index": "pypi",
            "version": "==2.26.0"
        },
        "six": {
            "hashes": [
                "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
                "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
            ],
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
            "version": "==1.16.0"
        },
        "text-unidecode": {
            "hashes": [
                "sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8",
                "sha256:bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93"
            ],
            "version": "==1.3"
        },
        "urllib3": {
            "hashes": [
                "sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece",
                "sha256:c4fdf4019605b6e5423637e01bc9fe4daef873709a7973e195ceba0a62bbc844"
            ],
            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'",
            "version": "==1.26.7"
        }
    },
    "develop": {}
}
@RolandColored RolandColored changed the title pipenv install: TypeError: 'NoneType' object is not callable pipenv install: TypeError: 'NoneType' object is not callable Nov 5, 2021
frostming added a commit that referenced this issue Nov 5, 2021
Bug Fixes
---------

- Fix a regression that ``pipenv shell`` fails to start a subshell.  `#4828 <https://github.com/pypa/pipenv/issues/4828>`_
- Fix a regression that ``pip_shims`` object isn't imported correctly.  `#4829 <https://github.com/pypa/pipenv/issues/4829>`_
@delwaterman
Copy link

Still seeing this bug in the most recent release:

pipenv install
/usr/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn't match a supported version!
Installing dependencies from Pipfile.lock (459de7)...
Traceback (most recent call last):▉▉▉▉▉ 0/25 — 00:00:00
  File "/usr/local/bin/pipenv", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/cli/command.py", line 220, in install
    do_install(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 1991, in do_install
    do_init(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 1255, in do_init
    do_install_dependencies(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 818, in do_install_dependencies
    batch_install(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 725, in batch_install
    c = pip_install(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 1427, in pip_install
    r = write_requirement_to_file(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/core.py", line 1359, in write_requirement_to_file
    line = requirement.line_instance.get_line(
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2553, in line_instance
    self.line_instance = self.get_line_instance()
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2547, in get_line_instance
    return Line(line)
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requirementslib/models/requirements.py", line 171, in __init__
    self.parse()
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1289, in parse
    self.parse_extras()
  File "/usr/local/lib/python3.8/dist-packages/pipenv/vendor/requirementslib/models/requirements.py", line 577, in parse_extras
    self.line, extras = pip_shims.shims._strip_extras(self.line)
TypeError: 'NoneType' object is not callable

user@ip-XXX-XXX-XXX-XXX ~/etl-process
 % pipenv --version
/usr/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn't match a supported version!
pipenv, version 2021.11.5.post0

@Nek-12
Copy link

Nek-12 commented Nov 8, 2021

Having the same issue

@jblom
Copy link

jblom commented Nov 8, 2021

Also had this issue (in our GH actions flow) and just fixed it like @RolandColored mentioned (pinning the previous version):

    - name: Install pipenv
      uses: dschep/install-pipenv-action@v1
      with:
        version: 2021.5.29

@delwaterman
Copy link

Yeah that's what I reverted to as well.

@OlmoBarberis
Copy link

Having the same issue. With version 2021.5.29 it works

@kucera-lukas
Copy link

Just had the same issue with CircleCI and environment caching. In our case we had to change our cache key combined with pinning version to 2021.5.29 to reset the cache:

- save_cache:
    key: deps-v2021-11-18-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- save_cache:
    key: deps-{{ .Branch }}-{{ checksum "Pipfile.lock" }}

Or you can explicitly uninstall pipenv without altering your cache key:

command: |
	sudo pip install pipenv
	pipenv install --dev --deploy
command: |
	sudo pip uninstall pipenv -y
	sudo pip install pipenv==2021.5.29
	pipenv install --dev --deploy

@revolter
Copy link

@Relequestual
Copy link

Cross referencing an issue in the Netlify support forum, for which this seems to be the root cause https://answers.netlify.com/t/issues-with-netlify-python-requests/48018

wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this issue Jan 21, 2022
2022.1.8 (2022-01-08)
=====================

Bug Fixes
---------

- Remove the extra parentheses around the venv prompt.  `#4877 <https://github.com/pypa/pipenv/issues/4877>`_
- Fix a bug of installation fails when extra index url is given.  `#4881 <https://github.com/pypa/pipenv/issues/4881>`_
- Fix regression where lockfiles would only include the hashes for releases for the platform generating the lockfile  `#4885 <https://github.com/pypa/pipenv/issues/4885>`_
- Fix the index parsing to reject illegal requirements.txt.  `#4899 <https://github.com/pypa/pipenv/issues/4899>`_

2021.11.23 (2021-11-23)
=======================

Bug Fixes
---------

- Update ``charset-normalizer`` from ``2.0.3`` to ``2.0.7``, this fixes an import error on Python 3.6.  `#4865 <https://github.com/pypa/pipenv/issues/4865>`_
- Fix a bug of deleting a virtualenv that is not managed by Pipenv.  `#4867 <https://github.com/pypa/pipenv/issues/4867>`_
- Fix a bug that source is not added to ``Pipfile`` when index url is given with ``pipenv install``.  `#4873 <https://github.com/pypa/pipenv/issues/4873>`_

2021.11.15 (2021-11-15)
=======================

Bug Fixes
---------

- Return an empty dict when ``PIPENV_DONT_LOAD_ENV`` is set.  `#4851 <https://github.com/pypa/pipenv/issues/4851>`_
- Don't use ``sys.executable`` when inside an activated venv.  `#4852 <https://github.com/pypa/pipenv/issues/4852>`_

Vendored Libraries
------------------

- Drop the vendored ``jinja2`` dependency as it is not needed any more.  `#4858 <https://github.com/pypa/pipenv/issues/4858>`_
- Update ``click`` from ``8.0.1`` to ``8.0.3``, to fix a problem with bash completion.  `#4860 <https://github.com/pypa/pipenv/issues/4860>`_
- Drop unused vendor ``chardet``.  `#4862 <https://github.com/pypa/pipenv/issues/4862>`_

Improved Documentation
----------------------

- Fix the documentation to reflect the fact that special characters must be percent-encoded in the URL.  `#4856 <https://github.com/pypa/pipenv/issues/4856>`_

2021.11.9 (2021-11-09)
======================

Features & Improvements
-----------------------

- Replace ``click-completion`` with ``click``'s own completion implementation.  `#4786 <https://github.com/pypa/pipenv/issues/4786>`_

Bug Fixes
---------

- Fix a bug that ``pipenv run`` doesn't set environment variables correctly.  `#4831 <https://github.com/pypa/pipenv/issues/4831>`_
- Fix a bug that certifi can't be loaded within ``notpip``'s vendor library. This makes several objects of ``pip`` fail to be imported.  `#4833 <https://github.com/pypa/pipenv/issues/4833>`_
- Fix a bug that ``3.10.0`` can be found be python finder.  `#4837 <https://github.com/pypa/pipenv/issues/4837>`_

Vendored Libraries
------------------

- Update ``pythonfinder`` from ``1.2.8`` to ``1.2.9``.  `#4837 <https://github.com/pypa/pipenv/issues/4837>`_

2021.11.5.post0 (2021-11-05)
============================

Bug Fixes
---------

- Fix a regression that ``pipenv shell`` fails to start a subshell.  `#4828 <https://github.com/pypa/pipenv/issues/4828>`_
- Fix a regression that ``pip_shims`` object isn't imported correctly.  `#4829 <https://github.com/pypa/pipenv/issues/4829>`_

2021.11.5 (2021-11-05)
======================

Features & Improvements
-----------------------

- Avoid sharing states but create project objects on demand. So that most integration test cases are able to switch to a in-process execution method.  `#4757 <https://github.com/pypa/pipenv/issues/4757>`_
- Shell-quote ``pip`` commands when logging.  `#4760 <https://github.com/pypa/pipenv/issues/4760>`_

Bug Fixes
---------

- Ignore empty .venv in rood dir and create project name base virtual environment  `#4790 <https://github.com/pypa/pipenv/issues/4790>`_

Vendored Libraries
------------------

- Update vendored dependencies
  - ``attrs`` from ``20.3.0`` to ``21.2.0``
  - ``cerberus`` from ``1.3.2`` to ``1.3.4``
  - ``certifi`` from ``2020.11.8`` to ``2021.5.30``
  - ``chardet`` from ``3.0.4`` to ``4.0.0``
  - ``click`` from ``7.1.2`` to ``8.0.1``
  - ``distlib`` from ``0.3.1`` to ``0.3.2``
  - ``idna`` from ``2.10`` to ``3.2``
  - ``importlib-metadata`` from ``2.0.0`` to ``4.6.1``
  - ``importlib-resources`` from ``3.3.0`` to ``5.2.0``
  - ``jinja2`` from ``2.11.2`` to ``3.0.1``
  - ``markupsafe`` from ``1.1.1`` to ``2.0.1``
  - ``more-itertools`` from ``5.0.0`` to ``8.8.0``
  - ``packaging`` from ``20.8`` to ``21.0``
  - ``pep517`` from ``0.9.1`` to ``0.11.0``
  - ``pipdeptree`` from ``1.0.0`` to ``2.0.0``
  - ``ptyprocess`` from ``0.6.0`` to ``0.7.0``
  - ``python-dateutil`` from ``2.8.1`` to ``2.8.2``
  - ``python-dotenv`` from ``0.15.0`` to ``0.19.0``
  - ``pythonfinder`` from ``1.2.5`` to ``1.2.8``
  - ``requests`` from ``2.25.0`` to ``2.26.0``
  - ``shellingham`` from ``1.3.2`` to ``1.4.0``
  - ``six`` from ``1.15.0`` to ``1.16.0``
  - ``tomlkit`` from ``0.7.0`` to ``0.7.2``
  - ``urllib3`` from ``1.26.1`` to ``1.26.6``
  - ``zipp`` from ``1.2.0`` to ``3.5.0``

  Add new vendored dependencies
  - ``charset-normalizer 2.0.3``
  - ``termcolor 1.1.0``
  - ``tomli 1.1.0``
  - ``wheel 0.36.2``  `#4747 <https://github.com/pypa/pipenv/issues/4747>`_
- Drop the dependencies for Python 2.7 compatibility purpose.  `#4751 <https://github.com/pypa/pipenv/issues/4751>`_
- Switch the dependency resolver from ``pip-tools`` to `pip`.

  Update vendor libraries:
  - Update ``requirementslib`` from ``1.5.16`` to ``1.6.1``
  - Update ``pip-shims`` from ``0.5.6`` to ``0.6.0``
  - New vendor ``platformdirs 2.4.0``  `#4759 <https://github.com/pypa/pipenv/issues/4759>`_

Improved Documentation
----------------------

- remove prefixes on install commands for easy copy/pasting  `#4792 <https://github.com/pypa/pipenv/issues/4792>`_
- Officially drop support for Python 2.7 and Python 3.5.  `#4261 <https://github.com/pypa/pipenv/issues/4261>`_

2021.5.29 (2021-05-29)
======================

Bug Fixes
---------

- Fix a bug where passing --skip-lock when PIPFILE has no [SOURCE] section throws the error: "tomlkit.exceptions.NonExistentKey: 'Key "source" does not exist.'"  `#4141 <https://github.com/pypa/pipenv/issues/4141>`_
- Fix bug where environment wouldn't activate in paths containing & and $ symbols  `#4538 <https://github.com/pypa/pipenv/issues/4538>`_
- Fix a bug that ``importlib-metadata`` from the project's dependencies conflicts with that from ``pipenv``'s.  `#4549 <https://github.com/pypa/pipenv/issues/4549>`_
- Fix a bug where ``pep508checker.py`` did not expect double-digit Python minor versions (e.g. "3.10").  `#4602 <https://github.com/pypa/pipenv/issues/4602>`_
- Fix bug where environment wouldn't activate in paths containing () and [] symbols  `#4615 <https://github.com/pypa/pipenv/issues/4615>`_
- Fix bug preventing use of pipenv lock --pre  `#4642 <https://github.com/pypa/pipenv/issues/4642>`_

Vendored Libraries
------------------

- Update ``packaging`` from ``20.4`` to ``20.8``.  `#4591 <https://github.com/pypa/pipenv/issues/4591>`_

2020.11.15 (2020-11-15)
=======================

Features & Improvements
-----------------------

- Support expanding environment variables in requirement URLs.  `#3516 <https://github.com/pypa/pipenv/issues/3516>`_
- Show warning message when a dependency is skipped in locking due to the mismatch of its markers.  `#4346 <https://github.com/pypa/pipenv/issues/4346>`_

Bug Fixes
---------

- Fix a bug that executable scripts with leading backslash can't be executed via ``pipenv run``.  `#4368 <https://github.com/pypa/pipenv/issues/4368>`_
- Fix a bug that VCS dependencies always satisfy even if the ref has changed.  `#4387 <https://github.com/pypa/pipenv/issues/4387>`_
- Restrict the acceptable hash type to SHA256 only.  `#4517 <https://github.com/pypa/pipenv/issues/4517>`_
- Fix the output of ``pipenv scripts`` under Windows platform.  `#4523 <https://github.com/pypa/pipenv/issues/4523>`_
- Fix a bug that the resolver takes wrong section to validate constraints.  `#4527 <https://github.com/pypa/pipenv/issues/4527>`_

Vendored Libraries
------------------

- Update vendored dependencies:
    - ``colorama`` from ``0.4.3`` to ``0.4.4``
    - ``python-dotenv`` from ``0.10.3`` to ``0.15.0``
    - ``first`` from ``2.0.1`` to ``2.0.2``
    - ``iso8601`` from ``0.1.12`` to ``0.1.13``
    - ``parse`` from ``1.15.0`` to ``1.18.0``
    - ``pipdeptree`` from ``0.13.2`` to ``1.0.0``
    - ``requests`` from ``2.23.0`` to ``2.25.0``
    - ``idna`` from ``2.9`` to ``2.10``
    - ``urllib3`` from ``1.25.9`` to ``1.26.1``
    - ``certifi`` from ``2020.4.5.1`` to ``2020.11.8``
    - ``requirementslib`` from ``1.5.15`` to ``1.5.16``
    - ``attrs`` from ``19.3.0`` to ``20.3.0``
    - ``distlib`` from ``0.3.0`` to ``0.3.1``
    - ``packaging`` from ``20.3`` to ``20.4``
    - ``six`` from ``1.14.0`` to ``1.15.0``
    - ``semver`` from ``2.9.0`` to ``2.13.0``
    - ``toml`` from ``0.10.1`` to ``0.10.2``
    - ``cached-property`` from ``1.5.1`` to ``1.5.2``
    - ``yaspin`` from ``0.14.3`` to ``1.2.0``
    - ``resolvelib`` from ``0.3.0`` to ``0.5.2``
    - ``pep517`` from ``0.8.2`` to ``0.9.1``
    - ``zipp`` from ``0.6.0`` to ``1.2.0``
    - ``importlib-metadata`` from ``1.6.0`` to ``2.0.0``
    - ``importlib-resources`` from ``1.5.0`` to ``3.3.0``  `#4533 <https://github.com/pypa/pipenv/issues/4533>`_

Improved Documentation
----------------------

- Fix suggested pyenv setup to avoid using shimmed interpreter  `#4534 <https://github.com/pypa/pipenv/issues/4534>`_

2020.11.4 (2020-11-04)
======================

Features & Improvements
-----------------------

- Add a new command ``pipenv scripts`` to display shortcuts from Pipfile.  `#3686 <https://github.com/pypa/pipenv/issues/3686>`_
- Retrieve package file hash from URL to accelerate the locking process.  `#3827 <https://github.com/pypa/pipenv/issues/3827>`_
- Add the missing ``--system`` option to ``pipenv sync``.  `#4441 <https://github.com/pypa/pipenv/issues/4441>`_
- Add a new option pair ``--header/--no-header`` to ``pipenv lock`` command,
  which adds a header to the generated requirements.txt  `#4443 <https://github.com/pypa/pipenv/issues/4443>`_

Bug Fixes
---------

- Fix a bug that percent encoded characters will be unquoted incorrectly in the file URL.  `#4089 <https://github.com/pypa/pipenv/issues/4089>`_
- Fix a bug where setting PIPENV_PYTHON to file path breaks environment name  `#4225 <https://github.com/pypa/pipenv/issues/4225>`_
- Fix a bug that paths are not normalized before comparison.  `#4330 <https://github.com/pypa/pipenv/issues/4330>`_
- Handle Python major and minor versions correctly in Pipfile creation.  `#4379 <https://github.com/pypa/pipenv/issues/4379>`_
- Fix a bug that non-wheel file requirements can be resolved successfully.  `#4386 <https://github.com/pypa/pipenv/issues/4386>`_
- Fix a bug that ``pexept.exceptions.TIMEOUT`` is not caught correctly because of the wrong import path.  `#4424 <https://github.com/pypa/pipenv/issues/4424>`_
- Fix a bug that compound TOML table is not parsed correctly.  `#4433 <https://github.com/pypa/pipenv/issues/4433>`_
- Fix a bug that invalid Python paths from Windows registry break ``pipenv install``.  `#4436 <https://github.com/pypa/pipenv/issues/4436>`_
- Fix a bug that function calls in ``setup.py`` can't be parsed rightly.  `#4446 <https://github.com/pypa/pipenv/issues/4446>`_
- Fix a bug that dist-info inside ``venv`` directory will be mistaken as the editable package's metadata.  `#4480 <https://github.com/pypa/pipenv/issues/4480>`_
- Make the order of hashes in resolution result stable.  `#4513 <https://github.com/pypa/pipenv/issues/4513>`_

Vendored Libraries
------------------

- Update ``tomlkit`` from ``0.5.11`` to ``0.7.0``.  `#4433 <https://github.com/pypa/pipenv/issues/4433>`_
- Update ``requirementslib`` from ``1.5.13`` to ``1.5.14``.  `#4480 <https://github.com/pypa/pipenv/issues/4480>`_

Improved Documentation
----------------------

- Discourage homebrew installation in installation guides.  `#4013 <https://github.com/pypa/pipenv/issues/4013>`_
@d33kayyy
Copy link

this seems to happen again in the latest version 2022.4.20 which was released earlier today

@ss-yogi
Copy link

ss-yogi commented Apr 21, 2022

I got same problem using version 2022.4.20 and using python3.6 in Ubuntu18.04.
but the problem did not happen both of following case

  • using version 2022.4.8 and using python3.6
  • using version 2022.4.20 and using python3.8

@matteius
Copy link
Member

Python 3.6 support was dropped. We missed the setup.py which is why it thinks that it's fine release for python 3.6 but it's not because pip dropped support and we vendored in the latest pip. So we drop support too. Python 3.6 was EOL 6 months ago.

@ss-yogi
Copy link

ss-yogi commented Apr 21, 2022

Thank you for your reply.
I got it.

Then, which python version does the Pipenv support now?
README.md says "v3.6 or above". it may be old information.

https://github.com/pypa/pipenv#installation

Pipenv can be installed with Python 3.6 and above.

@jiachua
Copy link

jiachua commented Apr 25, 2022

In my app-test-buildspec.yml file, we had a config like below. One of the commands is pip install --upgrade pip pipenv and I have changed it to pip install 'pipenv==2021.5.29' as instructed above. It works well on the DEV stack but for some reasons the QA stack is still using the latest pipenv. Does anyone know what did I miss?

phases:
  pre_build:
    commands:
      - pip install --upgrade pip pipenv

TheSableCZ pushed a commit to CESNET/lbr-testsuite that referenced this issue Nov 13, 2023
The newer versions of pipenv > 2022.4.20 dropped support
of Python v3.6 [1] which we still rely on. This causes the
following error when installing dependencies using the newer
version of pipenv:

  Installing dependencies from Pipfile.lock (8c6e1b)...
  Traceback (most recent call last):
    File "/usr/local/bin/pipenv", line 11, in <module>
      sys.exit(cli())
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1128, in __call__
      return self.main(*args, **kwargs)
    File "/usr/local/lib/python3.6/site-packages/pipenv/cli/options.py", line 56, in main
      return super().main(*args, **kwargs, windows_expand_args=False)
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1053, in main
      rv = self.invoke(ctx)
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
      return ctx.invoke(self.callback, **ctx.params)
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
      return __callback(*args, **kwargs)
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
      return ctx.invoke(f, obj, *args, **kwargs)
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
      return __callback(*args, **kwargs)
    File "/usr/local/lib/python3.6/site-packages/pipenv/cli/command.py", line 241, in install
      site_packages=state.site_packages,
    File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 2102, in do_install
      keep_outdated=keep_outdated,
    File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 1343, in do_init
      pypi_mirror=pypi_mirror,
    File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 870, in do_install_dependencies
      project, normal_deps, procs, failed_deps_queue, requirements_dir, **install_kwargs
    File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 728, in batch_install
      dep for dep in deps_to_install if not project.environment.is_satisfied(dep)
    File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 728, in <listcomp>
      dep for dep in deps_to_install if not project.environment.is_satisfied(dep)
    File "/usr/local/lib/python3.6/site-packages/pipenv/environment.py", line 859, in is_satisfied
      elif req.line_instance.specifiers is not None:
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2553, in line_instance
      self.line_instance = self.get_line_instance()
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2547, in get_line_instance
      return Line(line)
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 171, in __init__
      self.parse()
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1289, in parse
      self.parse_extras()
    File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 577, in parse_extras
      self.line, extras = pip_shims.shims._strip_extras(self.line)
  TypeError: 'NoneType' object is not callable

We thus enforce downgrading the pipenv to the latest working
version <= 2022.4.8. This is more a temporary fix then a satisfying
solution. The core of the problem is the EOL of Python 3.6
(security support ended on 23 Dec 2021). It is still maintained
in current versions by CentOS 7 and Oracle Linux 8 distributions,
however it still prevents us to install other Python dependencies
unavailable in RPM reporitories using pip, so we should upgrade
ASAP.

[1] pypa/pipenv#4829

Commit originally created by Jan Kucera <jan.kucera@cesnet.cz> in
dcpro project.
TheSableCZ pushed a commit to CESNET/FlowTest that referenced this issue Dec 18, 2023
Recent pipenv version 2022.4.20 dropped support for Python3.6[1].
Installation from Pipfile on Oracle Linux 8 then fails with following error:

  ...
  File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 577, in parse_extras
       self.line, extras = pip_shims.shims._strip_extras(self.line)
  TypeError: 'NoneType' object is not callable

This commit fixes pipenv version to 2022.4.8, thus resolving the problem.
Default repo on CentOS8 variants contains only python3.6 so upgrade
to python3.8 (or other version) isn't straightforward.

[1] pypa/pipenv#4829
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests