Repository: pypa/pipenv

Issue:
`pipenv upgrade` and `pipenv update` do not respect `--dev` flag
### Issue description

pumped for the release of this PR https://github.com/pypa/pipenv/pull/5617 , pulled it today to test it out and think i found an issue

When I run `pipenv upgrade --dev $MY_PKG` the `--dev` flag is not respected and pipenv installs another instance of the pkg under the default packages of Pipfile. Same for `pipenv update`. Hopefully i'm not doing something wrong here, but this seems to be what the docs suggest

### Expected result

`$MY_PKG` should be upgraded and not installed twice

### Actual result

`pipenv` installs the dev pkg under the default packages and write the pkg deps to lockfile as default pkg instead of using the existing dev pkg install

### Steps to replicate

```shell
# set up virtualenv for testing
$ pyenv shell 3.7.9
$ pyenv virtualenv 3.7.9 pipenvtest
$ pyenv activate pipenvtest
$ pip install "pipenv @ git+https://github.com/pypa/pipenv@main"

$ cd $HOME
$ mkdir pipenvtest && cd pipenvtest
$ pipenv install "flask~=2.1.1"
$ cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "~=2.1.1"

[dev-packages]

[requires]
python_version = "3.7"
$ pipenv upgrade flask
$ cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "*"

[dev-packages]

[requires]
python_version = "3.7"

# non dev pkgs is working as above
# dev example next:
$ pipenv install --dev "black~=22.12.0"
$ cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "*"

[dev-packages]
black = "~=22.12.0"

[requires]
python_version = "3.7"
$ pipenv upgrade --dev black
$ cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "*"
black = "*"

[dev-packages]
black = "~=22.12.0"

[requires]
python_version = "3.7"
```

-------------------------------------------------------------------------------

Please run `$ pipenv --support`, and paste the results here. Don't put backticks (`` ` ``) around it! The output already contains Markdown formatting.

<details><summary>$ pipenv --support</summary>

Pipenv version: `'2023.2.19.dev0'`

Pipenv location: `'/Users/jt.schelling/.pyenv/versions/3.7.9/envs/pipenvtest2/lib/python3.7/site-packages/pipenv'`

Python location: `'/Users/jt.schelling/.pyenv/versions/3.7.9/envs/pipenvtest2/bin/python'`

OS Name: `'posix'`

User pip version: `'23.0.1'`

user Python installations found:

  - `3.10.9`: `/usr/local/bin/python3`
  - `3.9.14`: `/Users/jt.schelling/.pyenv/versions/3.9.14/bin/python3`
  - `3.9.13`: `/Users/jt.schelling/.pyenv/versions/3.9.13/bin/python3`
  - `3.9.9`: `/Users/jt.schelling/.pyenv/versions/3.9.9/bin/python3`
  - `3.9.6`: `/usr/bin/python3`
  - `3.7.9`: `/Users/jt.schelling/.pyenv/versions/3.7.9/envs/pipenvtest2/bin/python3`
  - `3.7.9`: `/Users/jt.schelling/.pyenv/versions/3.7.9/envs/pipenvtest2/bin/python`
  - `3.7.9`: `/Users/jt.schelling/.pyenv/versions/3.7.9/envs/pipenvtest2/bin/python3.7`
  - `3.7.9`: `/Users/jt.schelling/.pyenv/versions/pipenvtest2/bin/python3`
  - `3.7.9`: `/Users/jt.schelling/.pyenv/versions/pipenvtest2/bin/python`
  - `3.7.9`: `/Users/jt.schelling/.pyenv/versions/pipenvtest2/bin/python3.7`
  - `3.7.9`: `/Users/jt.schelling/.pyenv/versions/3.7.9/bin/python3`
  - `3.7.9`: `/Users/jt.schelling/.pyenv/versions/pipenvtest2/bin/python3`
  - `3.7.9`: `/Users/jt.schelling/.pyenv/versions/pipenvtest/bin/python3`

PEP 508 Information:

```
{'implementation_name': 'cpython',
 'implementation_version': '3.7.9',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '22.3.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST '
                     '2023; root:xnu-8792.81.3~2/RELEASE_X86_64',
 'python_full_version': '3.7.9',
 'python_version': '3.7',
 'sys_platform': 'darwin'}
```

System environment variables:

  - `NVM_INC`
  - `TERM_PROGRAM`
  - `NVM_CD_FLAGS`
  - `PYENV_ROOT`
  - `ASDF_DIR`
  - `TERM`
  - `SHELL`
  - `TMPDIR`
  - `GOENV_ROOT`
  - `TERM_PROGRAM_VERSION`
  - `TERM_SESSION_ID`
  - `PYENV_VERSION`
  - `ZSH`
  - `NVM_DIR`
  - `USER`
  - `COMMAND_MODE`
  - `SSH_AUTH_SOCK`
  - `PYENV_DIR`
  - `__CF_USER_TEXT_ENCODING`
  - `PYENV_VIRTUALENV_INIT`
  - `VIRTUAL_ENV`
  - `PAGER`
  - `PYENV_VIRTUAL_ENV`
  - `LSCOLORS`
  - `PATH`
  - `__CFBundleIdentifier`
  - `PWD`
  - `LANG`
  - `ITERM_PROFILE`
  - `PYENV_HOOK_PATH`
  - `_OLD_VIRTUAL_PS1`
  - `XPC_FLAGS`
  - `XPC_SERVICE_NAME`
  - `PYENV_SHELL`
  - `SHLVL`
  - `HOME`
  - `COLORFGBG`
  - `GOROOT`
  - `LC_TERMINAL_VERSION`
  - `ITERM_SESSION_ID`
  - `LESS`
  - `LOGNAME`
  - `GOENV_SHELL`
  - `NVM_BIN`
  - `GOPATH`
  - `LC_TERMINAL`
  - `PYENV_ACTIVATE_SHELL`
  - `COLORTERM`
  - `PIP_DISABLE_PIP_VERSION_CHECK`
  - `PIP_PYTHON_PATH`
  - `PYTHONDONTWRITEBYTECODE`
  - `PYTHONFINDER_IGNORE_UNSUPPORTED`

Pipenv–specific environment variables:


Debug–specific environment variables:

  - `PATH`: `/Users/jt.schelling/.pyenv/versions/pipenvtest2/bin:/Users/jt.schelling/.pyenv/libexec:/Users/jt.schelling/.pyenv/plugins/python-build/bin:/Users/jt.schelling/.pyenv/plugins/pyenv-virtualenv/bin:/Users/jt.schelling/.pyenv/plugins/pyenv-update/bin:/Users/jt.schelling/.pyenv/plugins/pyenv-installer/bin:/Users/jt.schelling/.pyenv/plugins/pyenv-doctor/bin:/usr/local/opt/mysql@5.7/bin:/Users/jt.schelling/.nvm/versions/node/v16.17.1/bin:/Users/jt.schelling/.krew/bin:/Users/jt.schelling/.asdf/shims:/usr/local/opt/asdf/libexec/bin:/Users/jt.schelling/.pyenv/plugins/pyenv-virtualenv/shims:/Users/jt.schelling/.pyenv/shims:/Users/jt.schelling/.pyenv/bin:/Users/jt.schelling/git/external/goenv/versions/1.18.6/bin:/Users/jt.schelling/git/external/goenv/shims:/Users/jt.schelling/git/external/goenv/bin:/Users/jt.schelling/.local/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jt.schelling/go/1.18.6/bin`
  - `SHELL`: `/bin/zsh`
  - `LANG`: `en_US.UTF-8`
  - `PWD`: `/Users/jt.schelling/pipenvtest`
  - `VIRTUAL_ENV`: `/Users/jt.schelling/.pyenv/versions/3.7.9/envs/pipenvtest2`


---------------------------

Contents of `Pipfile` ('/Users/jt.schelling/pipenvtest/Pipfile'):

```toml
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = "*"
black = "*"

[dev-packages]
black = "~=22.12.0"

[requires]
python_version = "3.7"

```


Contents of `Pipfile.lock` ('/Users/jt.schelling/pipenvtest/Pipfile.lock'):

```json
{
    "_meta": {
        "hash": {
            "sha256": "eeb97c1b472ef11319af66ebb104f31627a77004d36ab85913ecc5d0c93a8608"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.7"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "black": {
            "hashes": [
                "sha256:0052dba51dec07ed029ed61b18183942043e00008ec65d5028814afaab9a22fd",
                "sha256:0680d4380db3719ebcfb2613f34e86c8e6d15ffeabcf8ec59355c5e7b85bb555",
                "sha256:121ca7f10b4a01fd99951234abdbd97728e1240be89fde18480ffac16503d481",
                "sha256:162e37d49e93bd6eb6f1afc3e17a3d23a823042530c37c3c42eeeaf026f38468",
                "sha256:2a951cc83ab535d248c89f300eccbd625e80ab880fbcfb5ac8afb5f01a258ac9",
                "sha256:2bf649fda611c8550ca9d7592b69f0637218c2369b7744694c5e4902873b2f3a",
                "sha256:382998821f58e5c8238d3166c492139573325287820963d2f7de4d518bd76958",
                "sha256:49f7b39e30f326a34b5c9a4213213a6b221d7ae9d58ec70df1c4a307cf2a1580",
                "sha256:57c18c5165c1dbe291d5306e53fb3988122890e57bd9b3dcb75f967f13411a26",
                "sha256:7a0f701d314cfa0896b9001df70a530eb2472babb76086344e688829efd97d32",
                "sha256:8178318cb74f98bc571eef19068f6ab5613b3e59d4f47771582f04e175570ed8",
                "sha256:8b70eb40a78dfac24842458476135f9b99ab952dd3f2dab738c1881a9b38b753",
                "sha256:9880d7d419bb7e709b37e28deb5e68a49227713b623c72b2b931028ea65f619b",
                "sha256:9afd3f493666a0cd8f8df9a0200c6359ac53940cbde049dcb1a7eb6ee2dd7074",
                "sha256:a29650759a6a0944e7cca036674655c2f0f63806ddecc45ed40b7b8aa314b651",
                "sha256:a436e7881d33acaf2536c46a454bb964a50eff59b21b51c6ccf5a40601fbef24",
                "sha256:a59db0a2094d2259c554676403fa2fac3473ccf1354c1c63eccf7ae65aac8ab6",
                "sha256:a8471939da5e824b891b25751955be52ee7f8a30a916d570a5ba8e0f2eb2ecad",
                "sha256:b0bd97bea8903f5a2ba7219257a44e3f1f9d00073d6cc1add68f0beec69692ac",
                "sha256:b6a92a41ee34b883b359998f0c8e6eb8e99803aa8bf3123bf2b2e6fec505a221",
                "sha256:bb460c8561c8c1bec7824ecbc3ce085eb50005883a6203dcfb0122e95797ee06",
                "sha256:bfffba28dc52a58f04492181392ee380e95262af14ee01d4bc7bb1b1c6ca8d27",
                "sha256:c1c476bc7b7d021321e7d93dc2cbd78ce103b84d5a4cf97ed535fbc0d6660648",
                "sha256:c91dfc2c2a4e50df0026f88d2215e166616e0c80e86004d0003ece0488db2739",
                "sha256:e6663f91b6feca5d06f2ccd49a10f254f9298cc1f7f49c46e498a0771b507104"
            ],
            "index": "pypi",
            "version": "==23.1.0"
        },
        "click": {
            "hashes": [
                "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e",
                "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==8.1.3"
        },
        "flask": {
            "hashes": [
                "sha256:7eb373984bf1c770023fce9db164ed0c3353cd0b53f130f4693da0ca756a2e6d",
                "sha256:c0bec9477df1cb867e5a67c9e1ab758de9cb4a3e52dd70681f59fa40a62b3f2d"
            ],
            "index": "pypi",
            "version": "==2.2.3"
        },
        "importlib-metadata": {
            "hashes": [
                "sha256:7efb448ec9a5e313a57655d35aa54cd3e01b7e1fbcf72dce1bf06119420f5bad",
                "sha256:e354bedeb60efa6affdcc8ae121b73544a7aa74156d047311948f6d711cd378d"
            ],
            "markers": "python_version < '3.10'",
            "version": "==6.0.0"
        },
        "itsdangerous": {
            "hashes": [
                "sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44",
                "sha256:5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==2.1.2"
        },
        "jinja2": {
            "hashes": [
                "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852",
                "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==3.1.2"
        },
        "markupsafe": {
            "hashes": [
                "sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed",
                "sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc",
                "sha256:090376d812fb6ac5f171e5938e82e7f2d7adc2b629101cec0db8b267815c85e2",
                "sha256:0b462104ba25f1ac006fdab8b6a01ebbfbce9ed37fd37fd4acd70c67c973e460",
                "sha256:137678c63c977754abe9086a3ec011e8fd985ab90631145dfb9294ad09c102a7",
                "sha256:1bea30e9bf331f3fef67e0a3877b2288593c98a21ccb2cf29b74c581a4eb3af0",
                "sha256:22152d00bf4a9c7c83960521fc558f55a1adbc0631fbb00a9471e097b19d72e1",
                "sha256:22731d79ed2eb25059ae3df1dfc9cb1546691cc41f4e3130fe6bfbc3ecbbecfa",
                "sha256:2298c859cfc5463f1b64bd55cb3e602528db6fa0f3cfd568d3605c50678f8f03",
                "sha256:28057e985dace2f478e042eaa15606c7efccb700797660629da387eb289b9323",
                "sha256:2e7821bffe00aa6bd07a23913b7f4e01328c3d5cc0b40b36c0bd81d362faeb65",
                "sha256:2ec4f2d48ae59bbb9d1f9d7efb9236ab81429a764dedca114f5fdabbc3788013",
                "sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036",
                "sha256:40627dcf047dadb22cd25ea7ecfe9cbf3bbbad0482ee5920b582f3809c97654f",
                "sha256:40dfd3fefbef579ee058f139733ac336312663c6706d1163b82b3003fb1925c4",
                "sha256:4cf06cdc1dda95223e9d2d3c58d3b178aa5dacb35ee7e3bbac10e4e1faacb419",
                "sha256:50c42830a633fa0cf9e7d27664637532791bfc31c731a87b202d2d8ac40c3ea2",
                "sha256:55f44b440d491028addb3b88f72207d71eeebfb7b5dbf0643f7c023ae1fba619",
                "sha256:608e7073dfa9e38a85d38474c082d4281f4ce276ac0010224eaba11e929dd53a",
                "sha256:63ba06c9941e46fa389d389644e2d8225e0e3e5ebcc4ff1ea8506dce646f8c8a",
                "sha256:65608c35bfb8a76763f37036547f7adfd09270fbdbf96608be2bead319728fcd",
                "sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7",
                "sha256:6d6607f98fcf17e534162f0709aaad3ab7a96032723d8ac8750ffe17ae5a0666",
                "sha256:7313ce6a199651c4ed9d7e4cfb4aa56fe923b1adf9af3b420ee14e6d9a73df65",
                "sha256:7668b52e102d0ed87cb082380a7e2e1e78737ddecdde129acadb0eccc5423859",
                "sha256:7df70907e00c970c60b9ef2938d894a9381f38e6b9db73c5be35e59d92e06625",
                "sha256:7e007132af78ea9df29495dbf7b5824cb71648d7133cf7848a2a5dd00d36f9ff",
                "sha256:835fb5e38fd89328e9c81067fd642b3593c33e1e17e2fdbf77f5676abb14a156",
                "sha256:8bca7e26c1dd751236cfb0c6c72d4ad61d986e9a41bbf76cb445f69488b2a2bd",
                "sha256:8db032bf0ce9022a8e41a22598eefc802314e81b879ae093f36ce9ddf39ab1ba",
                "sha256:99625a92da8229df6d44335e6fcc558a5037dd0a760e11d84be2260e6f37002f",
                "sha256:9cad97ab29dfc3f0249b483412c85c8ef4766d96cdf9dcf5a1e3caa3f3661cf1",
                "sha256:a4abaec6ca3ad8660690236d11bfe28dfd707778e2442b45addd2f086d6ef094",
                "sha256:a6e40afa7f45939ca356f348c8e23048e02cb109ced1eb8420961b2f40fb373a",
                "sha256:a6f2fcca746e8d5910e18782f976489939d54a91f9411c32051b4aab2bd7c513",
                "sha256:a806db027852538d2ad7555b203300173dd1b77ba116de92da9afbc3a3be3eed",
                "sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d",
                "sha256:b8526c6d437855442cdd3d87eede9c425c4445ea011ca38d937db299382e6fa3",
                "sha256:bb06feb762bade6bf3c8b844462274db0c76acc95c52abe8dbed28ae3d44a147",
                "sha256:c0a33bc9f02c2b17c3ea382f91b4db0e6cde90b63b296422a939886a7a80de1c",
                "sha256:c4a549890a45f57f1ebf99c067a4ad0cb423a05544accaf2b065246827ed9603",
                "sha256:ca244fa73f50a800cf8c3ebf7fd93149ec37f5cb9596aa8873ae2c1d23498601",
                "sha256:cf877ab4ed6e302ec1d04952ca358b381a882fbd9d1b07cccbfd61783561f98a",
                "sha256:d9d971ec1e79906046aa3ca266de79eac42f1dbf3612a05dc9368125952bd1a1",
                "sha256:da25303d91526aac3672ee6d49a2f3db2d9502a4a60b55519feb1a4c7714e07d",
                "sha256:e55e40ff0cc8cc5c07996915ad367fa47da6b3fc091fdadca7f5403239c5fec3",
                "sha256:f03a532d7dee1bed20bc4884194a16160a2de9ffc6354b3878ec9682bb623c54",
                "sha256:f1cd098434e83e656abf198f103a8207a8187c0fc110306691a2e94a78d0abb2",
                "sha256:f2bfb563d0211ce16b63c7cb9395d2c682a23187f54c3d79bfec33e6705473c6",
                "sha256:f8ffb705ffcf5ddd0e80b65ddf7bed7ee4f5a441ea7d3419e861a12eaf41af58"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==2.1.2"
        },
        "mypy-extensions": {
            "hashes": [
                "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d",
                "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"
            ],
            "markers": "python_version >= '3.5'",
            "version": "==1.0.0"
        },
        "packaging": {
            "hashes": [
                "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2",
                "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==23.0"
        },
        "pathspec": {
            "hashes": [
                "sha256:3a66eb970cbac598f9e5ccb5b2cf58930cd8e3ed86d393d541eaf2d8b1705229",
                "sha256:64d338d4e0914e91c1792321e6907b5a593f1ab1851de7fc269557a21b30ebbc"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==0.11.0"
        },
        "platformdirs": {
            "hashes": [
                "sha256:13b08a53ed71021350c9e300d4ea8668438fb0046ab3937ac9a29913a1a1350a",
                "sha256:accc3665857288317f32c7bebb5a8e482ba717b474f3fc1d18ca7f9214be0cef"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==3.1.0"
        },
        "tomli": {
            "hashes": [
                "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
                "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
            ],
            "markers": "python_version < '3.11'",
            "version": "==2.0.1"
        },
        "typed-ast": {
            "hashes": [
                "sha256:0261195c2062caf107831e92a76764c81227dae162c4f75192c0d489faf751a2",
                "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1",
                "sha256:183afdf0ec5b1b211724dfef3d2cad2d767cbefac291f24d69b00546c1837fb6",
                "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62",
                "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac",
                "sha256:2efae9db7a8c05ad5547d522e7dbe62c83d838d3906a3716d1478b6c1d61388d",
                "sha256:370788a63915e82fd6f212865a596a0fefcbb7d408bbbb13dea723d971ed8bdc",
                "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2",
                "sha256:3e123d878ba170397916557d31c8f589951e353cc95fb7f24f6bb69adc1a8a97",
                "sha256:4879da6c9b73443f97e731b617184a596ac1235fe91f98d279a7af36c796da35",
                "sha256:4e964b4ff86550a7a7d56345c7864b18f403f5bd7380edf44a3c1fb4ee7ac6c6",
                "sha256:639c5f0b21776605dd6c9dbe592d5228f021404dafd377e2b7ac046b0349b1a1",
                "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4",
                "sha256:6778e1b2f81dfc7bc58e4b259363b83d2e509a65198e85d5700dfae4c6c8ff1c",
                "sha256:683407d92dc953c8a7347119596f0b0e6c55eb98ebebd9b23437501b28dcbb8e",
                "sha256:79b1e0869db7c830ba6a981d58711c88b6677506e648496b1f64ac7d15633aec",
                "sha256:7d5d014b7daa8b0bf2eaef684295acae12b036d79f54178b92a2b6a56f92278f",
                "sha256:98f80dee3c03455e92796b58b98ff6ca0b2a6f652120c263efdba4d6c5e58f72",
                "sha256:a94d55d142c9265f4ea46fab70977a1944ecae359ae867397757d836ea5a3f47",
                "sha256:a9916d2bb8865f973824fb47436fa45e1ebf2efd920f2b9f99342cb7fab93f72",
                "sha256:c542eeda69212fa10a7ada75e668876fdec5f856cd3d06829e6aa64ad17c8dfe",
                "sha256:cf4afcfac006ece570e32d6fa90ab74a17245b83dfd6655a6f68568098345ff6",
                "sha256:ebd9d7f80ccf7a82ac5f88c521115cc55d84e35bf8b446fcd7836eb6b98929a3",
                "sha256:ed855bbe3eb3715fca349c80174cfcfd699c2f9de574d40527b8429acae23a66"
            ],
            "markers": "python_version < '3.8' and implementation_name == 'cpython'",
            "version": "==1.5.4"
        },
        "typing-extensions": {
            "hashes": [
                "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb",
                "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"
            ],
            "markers": "python_version < '3.10'",
            "version": "==4.5.0"
        },
        "werkzeug": {
            "hashes": [
                "sha256:2e1ccc9417d4da358b9de6f174e3ac094391ea1d4fbef2d667865d819dfd0afe",
                "sha256:56433961bc1f12533306c624f3be5e744389ac61d722175d543e1751285da612"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==2.2.3"
        },
        "zipp": {
            "hashes": [
                "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b",
                "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==3.15.0"
        }
    },
    "develop": {
        "black": {
            "hashes": [
                "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320",
                "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351",
                "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350",
                "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f",
                "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf",
                "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148",
                "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4",
                "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d",
                "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc",
                "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d",
                "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2",
                "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"
            ],
            "index": "pypi",
            "version": "==22.12.0"
        },
        "click": {
            "hashes": [
                "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e",
                "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==8.1.3"
        },
        "importlib-metadata": {
            "hashes": [
                "sha256:7efb448ec9a5e313a57655d35aa54cd3e01b7e1fbcf72dce1bf06119420f5bad",
                "sha256:e354bedeb60efa6affdcc8ae121b73544a7aa74156d047311948f6d711cd378d"
            ],
            "markers": "python_version < '3.10'",
            "version": "==6.0.0"
        },
        "mypy-extensions": {
            "hashes": [
                "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d",
                "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"
            ],
            "markers": "python_version >= '3.5'",
            "version": "==1.0.0"
        },
        "pathspec": {
            "hashes": [
                "sha256:3a66eb970cbac598f9e5ccb5b2cf58930cd8e3ed86d393d541eaf2d8b1705229",
                "sha256:64d338d4e0914e91c1792321e6907b5a593f1ab1851de7fc269557a21b30ebbc"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==0.11.0"
        },
        "platformdirs": {
            "hashes": [
                "sha256:13b08a53ed71021350c9e300d4ea8668438fb0046ab3937ac9a29913a1a1350a",
                "sha256:accc3665857288317f32c7bebb5a8e482ba717b474f3fc1d18ca7f9214be0cef"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==3.1.0"
        },
        "tomli": {
            "hashes": [
                "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
                "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"
            ],
            "markers": "python_full_version < '3.11.0a7'",
            "version": "==2.0.1"
        },
        "typed-ast": {
            "hashes": [
                "sha256:0261195c2062caf107831e92a76764c81227dae162c4f75192c0d489faf751a2",
                "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1",
                "sha256:183afdf0ec5b1b211724dfef3d2cad2d767cbefac291f24d69b00546c1837fb6",
                "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62",
                "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac",
                "sha256:2efae9db7a8c05ad5547d522e7dbe62c83d838d3906a3716d1478b6c1d61388d",
                "sha256:370788a63915e82fd6f212865a596a0fefcbb7d408bbbb13dea723d971ed8bdc",
                "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2",
                "sha256:3e123d878ba170397916557d31c8f589951e353cc95fb7f24f6bb69adc1a8a97",
                "sha256:4879da6c9b73443f97e731b617184a596ac1235fe91f98d279a7af36c796da35",
                "sha256:4e964b4ff86550a7a7d56345c7864b18f403f5bd7380edf44a3c1fb4ee7ac6c6",
                "sha256:639c5f0b21776605dd6c9dbe592d5228f021404dafd377e2b7ac046b0349b1a1",
                "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4",
                "sha256:6778e1b2f81dfc7bc58e4b259363b83d2e509a65198e85d5700dfae4c6c8ff1c",
                "sha256:683407d92dc953c8a7347119596f0b0e6c55eb98ebebd9b23437501b28dcbb8e",
                "sha256:79b1e0869db7c830ba6a981d58711c88b6677506e648496b1f64ac7d15633aec",
                "sha256:7d5d014b7daa8b0bf2eaef684295acae12b036d79f54178b92a2b6a56f92278f",
                "sha256:98f80dee3c03455e92796b58b98ff6ca0b2a6f652120c263efdba4d6c5e58f72",
                "sha256:a94d55d142c9265f4ea46fab70977a1944ecae359ae867397757d836ea5a3f47",
                "sha256:a9916d2bb8865f973824fb47436fa45e1ebf2efd920f2b9f99342cb7fab93f72",
                "sha256:c542eeda69212fa10a7ada75e668876fdec5f856cd3d06829e6aa64ad17c8dfe",
                "sha256:cf4afcfac006ece570e32d6fa90ab74a17245b83dfd6655a6f68568098345ff6",
                "sha256:ebd9d7f80ccf7a82ac5f88c521115cc55d84e35bf8b446fcd7836eb6b98929a3",
                "sha256:ed855bbe3eb3715fca349c80174cfcfd699c2f9de574d40527b8429acae23a66"
            ],
            "markers": "python_version < '3.8' and implementation_name == 'cpython'",
            "version": "==1.5.4"
        },
        "typing-extensions": {
            "hashes": [
                "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb",
                "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"
            ],
            "markers": "python_version < '3.8'",
            "version": "==4.5.0"
        },
        "zipp": {
            "hashes": [
                "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b",
                "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==3.15.0"
        }
    }
}

```
</details>




Discussion:
@jtschelling I believe the `--categories` argument is working, and develop or dev-packages is another category.  That being said, I suppose some folks like the `--dev` argument.   As `pipenv` gets to a point where we can re-think some of the interfaces I have been pondering about the `--dev` flag.  An argument could be made its another named category so why support it, but its also a special case like `default` where the Pipfile and Pipfile.lock category names don't match (I hate this fact).  Anyway, that's my two cents, but we can look at continuing to support the dev flag here.

Resolving patch:
diff --git a/pipenv/cli/command.py b/pipenv/cli/command.py
--- a/pipenv/cli/command.py
+++ b/pipenv/cli/command.py
@@ -282,6 +282,7 @@ def upgrade(state, **kwargs):
         packages=state.installstate.packages,
         editable_packages=state.installstate.editables,
         categories=state.installstate.categories,
+        dev=state.installstate.dev,
         system=state.system,
         lock_only=state.installstate.lock_only,
     )
diff --git a/pipenv/routines/update.py b/pipenv/routines/update.py
--- a/pipenv/routines/update.py
+++ b/pipenv/routines/update.py
@@ -7,6 +7,7 @@
     convert_deps_to_pip,
     get_pipfile_category_using_lockfile_section,
     is_star,
+    pep423_name,
 )
 from pipenv.utils.project import ensure_project
 from pipenv.utils.resolver import venv_resolve_deps
@@ -80,6 +81,7 @@ def do_update(
             editable_packages=editable,
             pypi_mirror=pypi_mirror,
             categories=categories,
+            dev=dev,
             lock_only=lock_only,
         )
 
@@ -106,13 +108,16 @@ def upgrade(
     editable_packages=None,
     pypi_mirror=None,
     categories=None,
+    dev=False,
     lock_only=False,
 ):
 
     lockfile = project._lockfile()
     if not pre:
         pre = project.settings.get("allow_prereleases")
-    if not categories:
+    if dev:
+        categories = ["develop"]
+    elif not categories:
         categories = ["default"]
 
     package_args = [p for p in packages] + [f"-e {pkg}" for pkg in editable_packages]
@@ -124,6 +129,7 @@ def upgrade(
         section = {}
         package = Requirement.from_line(package)
         package_name, package_val = package.pipfile_entry
+        package_name = pep423_name(package_name)
         requested_packages[package_name] = package
         try:
             if not is_star(section[package_name]) and is_star(package_val):
@@ -184,8 +190,9 @@ def upgrade(
         )
         # Mutate the existing lockfile with the upgrade data for the categories
         for package_name, _ in upgrade_lock_data.items():
-            correct_package_lock = full_lock_resolution[package_name]
-            lockfile[category][package_name] = correct_package_lock
+            correct_package_lock = full_lock_resolution.get(package_name)
+            if correct_package_lock:
+                lockfile[category][package_name] = correct_package_lock
 
     lockfile.update({"_meta": project.get_lockfile_meta()})
     project.write_lockfile(lockfile)


Test patch: