in_source_id
stringlengths
13
58
issue
stringlengths
3
241k
before_files
listlengths
0
3
after_files
listlengths
0
3
pr_diff
stringlengths
109
107M
pytorch__torchdynamo-1205
debug saving pre- and post-fusion IR doesn't work Running repro in #1178 with TORCHINDUCTOR_TRACE=1 results in ``` File "/scratch/ngimel/work/repos/torchdynamo/torchinductor/debug.py", line 304, in ir_post_fusion self._write_ir("ir_post_fusion.txt", nodes) File "/scratch/ngimel/work/repos/torchdynamo/torchinductor/debug.py", line 309, in _write_ir fd.write(node.debug_str()) File "/scratch/ngimel/work/repos/torchdynamo/torchinductor/scheduler.py", line 83, in debug_str f"{name}.met_dependencies = {pformat(self.read_writes.reads - self.unmet_dependencies)}", File "/scratch/ngimel/work/repos/torchdynamo/torchinductor/scheduler.py", line 38, in pformat result = pprint.pformat(obj, indent=4) File "/scratch/ngimel/work/env/lib/python3.9/pprint.py", line 58, in pformat return PrettyPrinter(indent=indent, width=width, depth=depth, File "/scratch/ngimel/work/env/lib/python3.9/pprint.py", line 153, in pformat self._format(object, sio, 0, 0, {}, 0) File "/scratch/ngimel/work/env/lib/python3.9/pprint.py", line 176, in _format p(self, object, stream, indent, allowance, context, level + 1) File "/scratch/ngimel/work/env/lib/python3.9/pprint.py", line 248, in _pprint_set object = sorted(object, key=_safe_key) File "/scratch/ngimel/work/env/lib/python3.9/site-packages/sympy/core/relational.py", line 511, in __bool__ raise TypeError("cannot determine truth value of Relational") TypeError: cannot determine truth value of Relational ``` (similar for pre_fusion)
[ { "content": "import collections\nimport dataclasses\nimport functools\nimport itertools\nimport logging\nimport os\nimport pprint\nimport textwrap\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Set\nfrom typing import Union\n\nimport numpy as np\nimport sympy...
[ { "content": "import collections\nimport dataclasses\nimport functools\nimport itertools\nimport logging\nimport os\nimport pprint\nimport textwrap\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Set\nfrom typing import Union\n\nimport numpy as np\nimport sympy...
diff --git a/torchinductor/scheduler.py b/torchinductor/scheduler.py index 24588a9484..fa0d5e5bda 100644 --- a/torchinductor/scheduler.py +++ b/torchinductor/scheduler.py @@ -35,6 +35,9 @@ def pformat(obj): + if isinstance(obj, set): + # pformat has trouble with sets of sympy exprs + obj = sorted(obj, key=str) result = pprint.pformat(obj, indent=4) if "\n" in result: return f"\n{textwrap.indent(result, ' '*4)}"
ray-project__ray-5169
[autoscaler] GCP error missing required parameter body <!-- General questions should be asked on the mailing list ray-dev@googlegroups.com. Questions about how to use Ray should be asked on [StackOverflow](https://stackoverflow.com/questions/tagged/ray). Before submitting an issue, please fill out the following form. --> ### System information - **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Linux - **Ray installed from (source or binary)**: - **Ray version**: 0.6.2 - **Python version**: 3.6 - **Exact command to reproduce**: ray up gcp_trainer.yaml <!-- You can obtain the Ray version with python -c "import ray; print(ray.__version__)" --> ### Describe the problem <!-- Describe the problem clearly here. --> Code worked well until today (no update). I got an error at the beginning after the getIamPolicy function in /autoscaler/gcp/config.py. I have all the rights / permissions in my GCP. The yaml file is similar to the example-full.yaml ### Source code / logs <!-- Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem. --> file_cache is unavailable when using oauth2client >= 4.0.0 Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/__init__.py", line 36, in autodetect from google.appengine.api import memcache ModuleNotFoundError: No module named 'google.appengine' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/file_cache.py", line 33, in <module> from oauth2client.contrib.locked_file import LockedFile ModuleNotFoundError: No module named 'oauth2client.contrib.locked_file' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/file_cache.py", line 37, in <module> from oauth2client.locked_file import LockedFile ModuleNotFoundError: No module named 'oauth2client.locked_file' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/__init__.py", line 41, in autodetect from . import file_cache File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/file_cache.py", line 41, in <module> 'file_cache is unavailable when using oauth2client >= 4.0.0') ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 URL being requested: GET https://www.googleapis.com/discovery/v1/apis/cloudresourcemanager/v1/rest /opt/tools/anaconda3/lib/python3.6/site-packages/google/auth/_default.py:66: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that most server applications use service accounts instead. If your application continues to use end user credentials from Cloud SDK, you might receive a "quota exceeded" or "API not enabled" error. For more information about service accounts, see https://cloud.google.com/docs/authentication/ warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING) file_cache is unavailable when using oauth2client >= 4.0.0 Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/__init__.py", line 36, in autodetect from google.appengine.api import memcache ModuleNotFoundError: No module named 'google.appengine' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/file_cache.py", line 33, in <module> from oauth2client.contrib.locked_file import LockedFile ModuleNotFoundError: No module named 'oauth2client.contrib.locked_file' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/file_cache.py", line 37, in <module> from oauth2client.locked_file import LockedFile ModuleNotFoundError: No module named 'oauth2client.locked_file' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/__init__.py", line 41, in autodetect from . import file_cache File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/file_cache.py", line 41, in <module> 'file_cache is unavailable when using oauth2client >= 4.0.0') ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 URL being requested: GET https://www.googleapis.com/discovery/v1/apis/iam/v1/rest /opt/tools/anaconda3/lib/python3.6/site-packages/google/auth/_default.py:66: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that most server applications use service accounts instead. If your application continues to use end user credentials from Cloud SDK, you might receive a "quota exceeded" or "API not enabled" error. For more information about service accounts, see https://cloud.google.com/docs/authentication/ warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING) file_cache is unavailable when using oauth2client >= 4.0.0 Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/__init__.py", line 36, in autodetect from google.appengine.api import memcache ModuleNotFoundError: No module named 'google.appengine' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/file_cache.py", line 33, in <module> from oauth2client.contrib.locked_file import LockedFile ModuleNotFoundError: No module named 'oauth2client.contrib.locked_file' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/file_cache.py", line 37, in <module> from oauth2client.locked_file import LockedFile ModuleNotFoundError: No module named 'oauth2client.locked_file' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/__init__.py", line 41, in autodetect from . import file_cache File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery_cache/file_cache.py", line 41, in <module> 'file_cache is unavailable when using oauth2client >= 4.0.0') ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 URL being requested: GET https://www.googleapis.com/discovery/v1/apis/compute/v1/rest /opt/tools/anaconda3/lib/python3.6/site-packages/google/auth/_default.py:66: UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that most server applications use service accounts instead. If your application continues to use end user credentials from Cloud SDK, you might receive a "quota exceeded" or "API not enabled" error. For more information about service accounts, see https://cloud.google.com/docs/authentication/ warnings.warn(_CLOUD_SDK_CREDENTIALS_WARNING) URL being requested: GET https://cloudresourcemanager.googleapis.com/v1/projects/d-dls-dlsi?alt=json URL being requested: GET https://iam.googleapis.com/v1/projects/d-dls-dlsi/serviceAccounts/ray-autoscaler-sa-v1@d-dls-dlsi.iam.gserviceaccount.com?alt=json Traceback (most recent call last): File "/opt/tools/anaconda3/bin/ray", line 10, in <module> sys.exit(main()) File "/opt/tools/anaconda3/lib/python3.6/site-packages/ray/scripts/scripts.py", line 744, in main return cli() File "/opt/tools/anaconda3/lib/python3.6/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/opt/tools/anaconda3/lib/python3.6/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/opt/tools/anaconda3/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/tools/anaconda3/lib/python3.6/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/opt/tools/anaconda3/lib/python3.6/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/opt/tools/anaconda3/lib/python3.6/site-packages/ray/scripts/scripts.py", line 463, in create_or_update no_restart, restart_only, yes, cluster_name) File "/opt/tools/anaconda3/lib/python3.6/site-packages/ray/autoscaler/commands.py", line 43, in create_or_update_cluster config = _bootstrap_config(config) File "/opt/tools/anaconda3/lib/python3.6/site-packages/ray/autoscaler/commands.py", line 65, in _bootstrap_config resolved_config = bootstrap_config(config) File "/opt/tools/anaconda3/lib/python3.6/site-packages/ray/autoscaler/gcp/config.py", line 109, in bootstrap_gcp config = _configure_iam_role(config) File "/opt/tools/anaconda3/lib/python3.6/site-packages/ray/autoscaler/gcp/config.py", line 169, in _configure_iam_role _add_iam_policy_binding(service_account, DEFAULT_SERVICE_ACCOUNT_ROLES) File "/opt/tools/anaconda3/lib/python3.6/site-packages/ray/autoscaler/gcp/config.py", line 381, in _add_iam_policy_binding policy = crm.projects().getIamPolicy(resource=project_id).execute() File "/opt/tools/anaconda3/lib/python3.6/site-packages/googleapiclient/discovery.py", line 730, in method raise TypeError('Missing required parameter "%s"' % name) TypeError: Missing required parameter "body"
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport logging\nimport time\n\nfrom cryptography.hazmat.primitives import serialization\nfrom cryptography.hazmat.primitives.asymmetric import rsa\nfrom cryptography.hazmat....
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport logging\nimport time\n\nfrom cryptography.hazmat.primitives import serialization\nfrom cryptography.hazmat.primitives.asymmetric import rsa\nfrom cryptography.hazmat....
diff --git a/python/ray/autoscaler/gcp/config.py b/python/ray/autoscaler/gcp/config.py index d165fb8b7b09..ba5026700e51 100644 --- a/python/ray/autoscaler/gcp/config.py +++ b/python/ray/autoscaler/gcp/config.py @@ -383,7 +383,8 @@ def _add_iam_policy_binding(service_account, roles): email = service_account["email"] member_id = "serviceAccount:" + email - policy = crm.projects().getIamPolicy(resource=project_id).execute() + policy = crm.projects().getIamPolicy( + resource=project_id, body={}).execute() already_configured = True
googleapis__google-auth-library-python-913
Setuptools as dependency is problematic w/ pip-tools https://github.com/googleapis/google-auth-library-python/commit/908da752d01fef728bd5cb3eb5b13f2b5c335e51 (#322) added `setuptools` as a dependency in this package. However, the [pip-tools](https://github.com/jazzband/pip-tools) package that's commonly used for pinning dependencies considers `setuptools` an unsafe dependency to have in a project at all (as discussed in #492), and as such doesn't save it in the pinned requirements file at all. Since `google-auth` depends on Setuptools but a version couldn't have been pinned in the requirements, we're seeing ``` Collecting setuptools>=40.3.0 (from google-auth==1.19.1->our-proprietary-package==0.31.1) Downloading https://files.pythonhosted.org/packages/b0/8b/379494d7dbd3854aa7b85b216cb0af54edcb7fce7d086ba3e35522a713cf/setuptools-50.0.0-py3-none-any.whl (783kB) ``` which wreaks havoc on Ubuntu 16.04 + Python 3.5 machines due to https://github.com/pypa/setuptools/issues/2352 / https://github.com/pypa/setuptools/issues/2350 / https://github.com/pypa/setuptools/issues/2356 ... The workaround is to add `--allow-unsafe` or manually pin `setuptools`, but is the requirement _actually_ necessary in this package? No other package in the 48-line `requirements.txt` for this particular project would have required a version of `setuptools`. #### Environment details - OS: Ubuntu 16.04 - Python version: 3.5 - pip version: irrelevant - `google-auth` version: 1.19.1 #### Steps to reproduce 1. Install `google-auth` on an Ubuntu 16.04 machine 2. It installs `setuptools==50.0.0` 3. https://github.com/pypa/setuptools/issues/2352 and friends
[ { "content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica...
[ { "content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica...
diff --git a/setup.py b/setup.py index 301e99643..44c512128 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,6 @@ 'rsa>=3.1.4,<5; python_version >= "3.6"', # install enum34 to support 2.7. enum34 only works up to python version 3.3. 'enum34>=1.1.10; python_version < "3.4"', - "setuptools>=40.3.0", "six>=1.9.0", )
encode__uvicorn-1269
Shutdown process is broken in 0.15 ### Checklist <!-- Please make sure you check all these items before submitting your bug report. --> - [x] The bug is reproducible against the latest release and/or `master`. - [x] There are no similar issues or pull requests to fix it yet. ### Describe the bug My FastAPI ASGI server cannot shutdown properly with uvicorn==0.15 while it can with 0.14 ### To reproduce Setup minimal FastAPI app and add some functions with logs(prints) to shutdown event ### Expected behavior You see all logs(prints) from functions on shutdown ### Actual behavior Get `ASGI 'lifespan' protocol appears unsupported.` without --lifespan on Get error trace with --lifespan on ### Debugging material uvicorn scheduler.main:app --host=0.0.0.0 --port ${WEB_PORT:-8000} --reload --lifespan on INFO: Will watch for changes in these directories: ['/home/dmytro/storage/chimplie/projects/raok-main/raok-scheduler'] INFO: Uvicorn running on http://0.0.0.0:8004 (Press CTRL+C to quit) INFO: Started reloader process [177653] using statreload INFO: Started server process [177655] INFO: Waiting for application startup. INFO: Tortoise-ORM started, {'default': <tortoise.backends.asyncpg.client.AsyncpgDBClient object at 0x7f63d4a10e50>}, {'models': {'Task': <class 'scheduler.models.task.Task'>, 'Aerich': <class 'aerich.models.Aerich'>}} INFO: Application startup complete. ^CINFO: Shutting down INFO: Finished server process [177655] ERROR: Exception in 'lifespan' protocol Traceback (most recent call last): File "/home/dmytro/.local/share/virtualenvs/raok-scheduler-hpGGYNLi/lib/python3.8/site-packages/uvicorn/lifespan/on.py", line 84, in main await app(scope, self.receive, self.send) File "/home/dmytro/.local/share/virtualenvs/raok-scheduler-hpGGYNLi/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__ return await self.app(scope, receive, send) File "/home/dmytro/.local/share/virtualenvs/raok-scheduler-hpGGYNLi/lib/python3.8/site-packages/fastapi/applications.py", line 199, in __call__ await super().__call__(scope, receive, send) File "/home/dmytro/.local/share/virtualenvs/raok-scheduler-hpGGYNLi/lib/python3.8/site-packages/starlette/applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "/home/dmytro/.local/share/virtualenvs/raok-scheduler-hpGGYNLi/lib/python3.8/site-packages/starlette/middleware/errors.py", line 146, in __call__ await self.app(scope, receive, send) File "/home/dmytro/.local/share/virtualenvs/raok-scheduler-hpGGYNLi/lib/python3.8/site-packages/starlette/middleware/cors.py", line 70, in __call__ await self.app(scope, receive, send) File "/home/dmytro/.local/share/virtualenvs/raok-scheduler-hpGGYNLi/lib/python3.8/site-packages/starlette/exceptions.py", line 58, in __call__ await self.app(scope, receive, send) File "/home/dmytro/.local/share/virtualenvs/raok-scheduler-hpGGYNLi/lib/python3.8/site-packages/starlette/routing.py", line 569, in __call__ await self.lifespan(scope, receive, send) File "/home/dmytro/.local/share/virtualenvs/raok-scheduler-hpGGYNLi/lib/python3.8/site-packages/starlette/routing.py", line 544, in lifespan await receive() File "/home/dmytro/.local/share/virtualenvs/raok-scheduler-hpGGYNLi/lib/python3.8/site-packages/uvicorn/lifespan/on.py", line 135, in receive return await self.receive_queue.get() File "/usr/lib64/python3.8/asyncio/queues.py", line 163, in get await getter asyncio.exceptions.CancelledError INFO: Stopping reloader process [177653] ![image](https://user-images.githubusercontent.com/29193926/129881063-c363dcd2-ed99-45cd-9cda-271d78c05ce8.png) ### Environment - Fedora 34 / Python 3.8 / Uvicorn version: 0.15 - bug, 0.14 - ok - command to run: `uvicorn main:app --host=0.0.0.0 --port 8000 --reload` Revert "When receiving a SIGTERM supervisors should terminate their processes before joining them" Reverts encode/uvicorn#1069 Closes #1160 I've taken my time to understand the situation. I'm going to explain it and then suggest a solution to the previous issue. Right now, the issue on #1160 (`CancelledError`) is caused because the `CTRL + C` sends a `SIGINT (2)` to both parent and child processes, and given that we merged #1069, we have that the parent is also sending a `SIGTERM (15)` to the child. In other words, the child is receiving two signals, and the way `uvicorn` deals with multiple signals (two) is to forcefully exit the process. To be more precise, when we press `CTRL + C` we send a `kill` signal to the process group, not to a single process. Ok. Now, let's go back to the original issue: if we send `SIGINT` to the parent process, it doesn't terminate the children. And that's expected, because `kill -2 <uvicorn_pid>` will only send a signal to the `<uvicorn_pid>`. The solution here would be to use `kill -2 -<uvicorn_pid>`, which sends a signal to the process group instead of only the parent. That being said, this solves the issue that #1069 (`process.terminate()`) solved, but we also avoid #1160 (`CancelledError`). Reference: https://stackoverflow.com/a/392155
[ { "content": "import asyncio\nimport logging\nimport os\nimport platform\nimport signal\nimport socket\nimport sys\nimport threading\nimport time\nfrom email.utils import formatdate\nfrom types import FrameType\nfrom typing import TYPE_CHECKING, Any, List, Optional, Set, Tuple, Union\n\nimport click\n\nfrom uvi...
[ { "content": "import asyncio\nimport logging\nimport os\nimport platform\nimport signal\nimport socket\nimport sys\nimport threading\nimport time\nfrom email.utils import formatdate\nfrom types import FrameType\nfrom typing import TYPE_CHECKING, Any, List, Optional, Set, Tuple, Union\n\nimport click\n\nfrom uvi...
diff --git a/uvicorn/server.py b/uvicorn/server.py index 6aa694cae..bc5a4fddf 100644 --- a/uvicorn/server.py +++ b/uvicorn/server.py @@ -310,7 +310,7 @@ def install_signal_handlers(self) -> None: def handle_exit(self, sig: signal.Signals, frame: FrameType) -> None: - if self.should_exit: + if self.should_exit and sig == signal.SIGINT: self.force_exit = True else: self.should_exit = True
projectmesa__mesa-989
Color patches takes a long time to load When you hit "reset" to load the color patches example, it takes a long time to load. Not sure why. As a result, I thought it was broken. To recreate... ``` cd examples/color_patches python run.py ``` Wait for patches to load when browser window pops up. OR hit reset and wait for color patches to load. This is what it should look something like... <img width="407" alt="screen shot 2018-04-01 at 10 03 33 pm" src="https://user-images.githubusercontent.com/166734/38180194-95c2acb0-35f8-11e8-8c1b-8bd7a6d25098.png"> Color patches takes a long time to load When you hit "reset" to load the color patches example, it takes a long time to load. Not sure why. As a result, I thought it was broken. To recreate... ``` cd examples/color_patches python run.py ``` Wait for patches to load when browser window pops up. OR hit reset and wait for color patches to load. This is what it should look something like... <img width="407" alt="screen shot 2018-04-01 at 10 03 33 pm" src="https://user-images.githubusercontent.com/166734/38180194-95c2acb0-35f8-11e8-8c1b-8bd7a6d25098.png">
[ { "content": "\"\"\"\nhandles the definition of the canvas parameters and\nthe drawing of the model representation on the canvas\n\"\"\"\n# import webbrowser\n\nfrom mesa.visualization.modules import CanvasGrid\nfrom mesa.visualization.ModularVisualization import ModularServer\n\nfrom .model import ColorPatches...
[ { "content": "\"\"\"\nhandles the definition of the canvas parameters and\nthe drawing of the model representation on the canvas\n\"\"\"\n# import webbrowser\n\nfrom mesa.visualization.modules import CanvasGrid\nfrom mesa.visualization.ModularVisualization import ModularServer\n\nfrom .model import ColorPatches...
diff --git a/examples/color_patches/color_patches/server.py b/examples/color_patches/color_patches/server.py index 711c31304bb..e0636c2492b 100644 --- a/examples/color_patches/color_patches/server.py +++ b/examples/color_patches/color_patches/server.py @@ -62,7 +62,7 @@ def color_patch_draw(cell): ColorPatches, [canvas_element], "Color Patches", - {"width": canvas_width, "height": canvas_height}, + {"width": grid_rows, "height": grid_cols}, ) # webbrowser.open('http://127.0.0.1:8521') # TODO: make this configurable
getnikola__nikola-2363
output of 'nikola auto' not visible with light themes I use solarized-light theme in my(gnome) terminal and when I e.g. run 'nikola build', most of the output is not clearly visible - see the shot: http://pasteboard.co/1pIJ9kw9.png, so wonder if something can be done to make it more ui-friendly for light color themes?
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2016 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2016 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
diff --git a/CHANGES.txt b/CHANGES.txt index b51bf68dd6..c221b36f34 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,7 @@ New in master Features -------- +* Option to disable color output using NIKOLA_MONO envvar (Issue #2360) * Improved locale detection in Windows (Issue #2343) * Added ``enclosure_length`` meta field for better interop (Issue #2338) * New Lithuanian translation by Antanas Lasys diff --git a/nikola/__main__.py b/nikola/__main__.py index 92a009f557..f002768a4f 100644 --- a/nikola/__main__.py +++ b/nikola/__main__.py @@ -68,7 +68,7 @@ def main(args=None): """Run Nikola.""" colorful = False - if sys.stderr.isatty() and os.name != 'nt': + if sys.stderr.isatty() and os.name != 'nt' and os.getenv('NIKOLA_MONO') is None: colorful = True ColorfulStderrHandler._colorful = colorful
django-json-api__django-rest-framework-json-api-831
Drop end of life Django versions (2.1, 1.11) This has been discussed but it is good to have its own single issue for dropping and adding features :smile: See https://www.djangoproject.com/download/ for release schedule.
[ { "content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\nneeds_wheel = {'bdist_wheel'}.intersection(sys.argv)\nwheel = ['wheel'] if needs_wheel else []\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from paths an...
[ { "content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\nneeds_wheel = {'bdist_wheel'}.intersection(sys.argv)\nwheel = ['wheel'] if needs_wheel else []\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from paths an...
diff --git a/.travis.yml b/.travis.yml index 301ed0cc..ad495df9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,6 @@ cache: pip # Favor explicit over implicit and use an explicit build matrix. matrix: allow_failures: - - env: TOXENV=py35-django111-drfmaster - - env: TOXENV=py36-django111-drfmaster - - env: TOXENV=py35-django21-drfmaster - - env: TOXENV=py36-django21-drfmaster - - env: TOXENV=py37-django21-drfmaster - env: TOXENV=py35-django22-drfmaster - env: TOXENV=py36-django22-drfmaster - env: TOXENV=py37-django22-drfmaster @@ -24,18 +19,6 @@ matrix: - python: 3.6 env: TOXENV=docs - - python: 3.5 - env: TOXENV=py35-django111-drf310 - - python: 3.5 - env: TOXENV=py35-django111-drf311 - - python: 3.5 - env: TOXENV=py35-django111-drfmaster - - python: 3.5 - env: TOXENV=py35-django21-drf310 - - python: 3.5 - env: TOXENV=py35-django21-drf311 - - python: 3.5 - env: TOXENV=py35-django21-drfmaster - python: 3.5 env: TOXENV=py35-django22-drf310 - python: 3.5 @@ -43,18 +26,6 @@ matrix: - python: 3.5 env: TOXENV=py35-django22-drfmaster - - python: 3.6 - env: TOXENV=py36-django111-drf310 - - python: 3.6 - env: TOXENV=py36-django111-drf311 - - python: 3.6 - env: TOXENV=py36-django111-drfmaster - - python: 3.6 - env: TOXENV=py36-django21-drf310 - - python: 3.6 - env: TOXENV=py36-django21-drf311 - - python: 3.6 - env: TOXENV=py36-django21-drfmaster - python: 3.6 env: TOXENV=py36-django22-drf310 - python: 3.6 @@ -66,12 +37,6 @@ matrix: - python: 3.6 env: TOXENV=py36-django30-drfmaster - - python: 3.7 - env: TOXENV=py37-django21-drf310 - - python: 3.7 - env: TOXENV=py37-django21-drf311 - - python: 3.7 - env: TOXENV=py37-django21-drfmaster - python: 3.7 env: TOXENV=py37-django22-drf310 - python: 3.7 diff --git a/CHANGELOG.md b/CHANGELOG.md index dcd05605..f4b110ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Note that in line with [Django REST Framework policy](http://www.django-rest-framework.org/topics/release-notes/), any parts of the framework not mentioned in the documentation should generally be considered private API, and may be subject to change. +## [Unreleased] + +### Removed + +* Removed support for Django 1.11. +* Removed support for Django 2.1. + ## [3.2.0] - 2020-08-26 +This is the last release supporting Django 1.11 and Django 2.1. + ### Added * Added support for serializing nested serializers as attribute json value introducing setting `JSON_API_SERIALIZE_NESTED_SERIALIZERS_AS_ATTRIBUTE` diff --git a/README.rst b/README.rst index bc52bbf5..07f18a8d 100644 --- a/README.rst +++ b/README.rst @@ -88,7 +88,7 @@ Requirements ------------ 1. Python (3.5, 3.6, 3.7, 3.8) -2. Django (1.11, 2.1, 2.2, 3.0) +2. Django (2.2, 3.0) 3. Django REST Framework (3.10, 3.11) We **highly** recommend and only officially support the latest patch release of each Python, Django and REST Framework series. diff --git a/docs/getting-started.md b/docs/getting-started.md index 58768e39..39ef6a88 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -52,7 +52,7 @@ like the following: ## Requirements 1. Python (3.5, 3.6, 3.7, 3.8) -2. Django (1.11, 2.1, 2.2, 3.0) +2. Django (2.2, 3.0) 3. Django REST Framework (3.10, 3.11) We **highly** recommend and only officially support the latest patch release of each Python, Django and REST Framework series. diff --git a/setup.py b/setup.py index d37c66f3..42d7d8c4 100755 --- a/setup.py +++ b/setup.py @@ -91,7 +91,7 @@ def get_package_data(package): install_requires=[ 'inflection>=0.3.0', 'djangorestframework>=3.10,<3.12', - 'django>=1.11,<3.1', + 'django>=2.2,<3.1', ], extras_require={ 'django-polymorphic': ['django-polymorphic>=2.0'], diff --git a/tox.ini b/tox.ini index 04b970ac..58956ee5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,12 @@ [tox] envlist = - py{35,36}-django{111}-drf{310,311,master}, - py{35,36,37}-django{21,22}-drf{310,311,master}, + py{35,36,37}-django22-drf{310,311,master}, py38-django22-drf{311,master}, - py{36,37,38}-django{30}-drf{311,master}, + py{36,37,38}-django30-drf{311,master}, lint,docs [testenv] deps = - django111: Django>=1.11,<1.12 - django21: Django>=2.1,<2.2 django22: Django>=2.2,<2.3 django30: Django>=3.0,<3.1 drf310: djangorestframework>=3.10.2,<3.11
googleapis__python-bigquery-648
chore: use paths for --cov arguments in noxfile https://github.com/googleapis/python-bigquery/blob/6a48e80bc7d347f381b181f4cf81fef105d0ad0d/noxfile.py#L80-L81 To pull https://github.com/googleapis/synthtool/pull/859 from templates.
[ { "content": "# Copyright 2016 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ { "content": "# Copyright 2016 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
diff --git a/noxfile.py b/noxfile.py index 7ba081660..654bbd093 100644 --- a/noxfile.py +++ b/noxfile.py @@ -77,8 +77,8 @@ def default(session, install_extras=True): session.run( "py.test", "--quiet", - "--cov=google.cloud.bigquery", - "--cov=tests.unit", + "--cov=google/cloud/bigquery", + "--cov=tests/unit", "--cov-append", "--cov-config=.coveragerc", "--cov-report=",
bookwyrm-social__bookwyrm-695
Remove the "Cover" text from the alt text of book covers if one is present Currently, when a book cover is present and is displayed, it's alt text consists of the book title, the text *Cover*, edition name, and the first published date. For example, via VoiceOver under Safari: ``` image The Night Circus cover (Hardcover, 2011) ``` The fact that this is a cover image is redundant, because users are already notified about the presence of an image. In this case, the textual data is actually more important, e.g. book title and edition name, since the presence of a cover does not add more information when using a screen reader. The expected result, via VoiceOver (and possibly other screen readers as well) is: ``` image The Night Circus (Hardcover, 2011) ```
[ { "content": "''' database schema for books and shelves '''\nimport re\n\nfrom django.db import models\nfrom model_utils.managers import InheritanceManager\n\nfrom bookwyrm import activitypub\nfrom bookwyrm.settings import DOMAIN\n\nfrom .activitypub_mixin import OrderedCollectionPageMixin, ObjectMixin\nfrom .b...
[ { "content": "''' database schema for books and shelves '''\nimport re\n\nfrom django.db import models\nfrom model_utils.managers import InheritanceManager\n\nfrom bookwyrm import activitypub\nfrom bookwyrm.settings import DOMAIN\n\nfrom .activitypub_mixin import OrderedCollectionPageMixin, ObjectMixin\nfrom .b...
diff --git a/bookwyrm/models/book.py b/bookwyrm/models/book.py index f1f2083033..6a1a18b1ea 100644 --- a/bookwyrm/models/book.py +++ b/bookwyrm/models/book.py @@ -91,7 +91,7 @@ def edition_info(self): @property def alt_text(self): ''' image alt test ''' - text = '%s cover' % self.title + text = '%s' % self.title if self.edition_info: text += ' (%s)' % self.edition_info return text diff --git a/bookwyrm/tests/models/test_book_model.py b/bookwyrm/tests/models/test_book_model.py index 98d6d446ef..b4a099d050 100644 --- a/bookwyrm/tests/models/test_book_model.py +++ b/bookwyrm/tests/models/test_book_model.py @@ -81,7 +81,7 @@ def test_get_edition_info(self): book.save() self.assertEqual(book.edition_info, 'worm, Glorbish language, 2020') self.assertEqual( - book.alt_text, 'Test Edition cover (worm, Glorbish language, 2020)') + book.alt_text, 'Test Edition (worm, Glorbish language, 2020)') def test_get_rank(self): diff --git a/bookwyrm/tests/models/test_status_model.py b/bookwyrm/tests/models/test_status_model.py index c6911b6df9..29be5c0724 100644 --- a/bookwyrm/tests/models/test_status_model.py +++ b/bookwyrm/tests/models/test_status_model.py @@ -150,7 +150,7 @@ def test_generated_note_to_pure_activity(self, _): self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \ (settings.DOMAIN, self.book.cover.url)) self.assertEqual( - activity['attachment'][0].name, 'Test Edition cover') + activity['attachment'][0].name, 'Test Edition') def test_comment_to_activity(self, _): ''' subclass of the base model version with a "pure" serializer ''' @@ -177,7 +177,7 @@ def test_comment_to_pure_activity(self, _): self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \ (settings.DOMAIN, self.book.cover.url)) self.assertEqual( - activity['attachment'][0].name, 'Test Edition cover') + activity['attachment'][0].name, 'Test Edition') def test_quotation_to_activity(self, _): ''' subclass of the base model version with a "pure" serializer ''' @@ -207,7 +207,7 @@ def test_quotation_to_pure_activity(self, _): self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \ (settings.DOMAIN, self.book.cover.url)) self.assertEqual( - activity['attachment'][0].name, 'Test Edition cover') + activity['attachment'][0].name, 'Test Edition') def test_review_to_activity(self, _): ''' subclass of the base model version with a "pure" serializer ''' @@ -238,7 +238,7 @@ def test_review_to_pure_activity(self, _): self.assertEqual(activity['attachment'][0].url, 'https://%s%s' % \ (settings.DOMAIN, self.book.cover.url)) self.assertEqual( - activity['attachment'][0].name, 'Test Edition cover') + activity['attachment'][0].name, 'Test Edition') def test_favorite(self, _): ''' fav a status '''
apache__airflow-16108
Could not get scheduler_job_id **Apache Airflow version:** 2.0.0 **Kubernetes version (if you are using kubernetes) (use kubectl version):** 1.18.3 **Environment:** Cloud provider or hardware configuration: AWS **What happened:** When trying to run a DAG, it gets scheduled, but task is never run. When attempting to run task manually, it shows an error: ``` Something bad has happened. Please consider letting us know by creating a bug report using GitHub. Python version: 3.8.7 Airflow version: 2.0.0 Node: airflow-web-ffdd89d6-h98vj ------------------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.8/site-packages/airflow/www/auth.py", line 34, in decorated return func(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/airflow/www/decorators.py", line 60, in wrapper return f(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/airflow/www/views.py", line 1366, in run executor.start() File "/usr/local/lib/python3.8/site-packages/airflow/executors/kubernetes_executor.py", line 493, in start raise AirflowException("Could not get scheduler_job_id") airflow.exceptions.AirflowException: Could not get scheduler_job_id ``` **What you expected to happen:** The task to be run successfully without **How to reproduce it:** Haven't pinpointed what causes the issue, besides an attempted upgrade from Airflow 1.10.14 to Airflow 2.0.0 **Anything else we need to know:** This error is encountered in an upgrade of Airflow from 1.10.14 to Airflow 2.0.0 EDIT: Formatted to fit the issue template
[ { "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th...
[ { "content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th...
diff --git a/airflow/cli/commands/task_command.py b/airflow/cli/commands/task_command.py index 6c05d7776d3ea..c0cfb03f66258 100644 --- a/airflow/cli/commands/task_command.py +++ b/airflow/cli/commands/task_command.py @@ -88,6 +88,7 @@ def _run_task_by_executor(args, dag, ti): print(e) raise e executor = ExecutorLoader.get_default_executor() + executor.job_id = "manual" executor.start() print("Sending to executor.") executor.queue_task_instance(
LMFDB__lmfdb-5179
PIP dependencies We have several deprecated dependencies that we should fix ASAP ``` flask<=1.1.4 markupsafe<=2.0.1 itsdangerous<=2.0.1 ``` in particular, this prevents using lmfdb in an environment with jupyterlab installed, which is something we would like to have working on a short time basis.
[ { "content": "# -*- coding: utf-8 -*-\nfrom lmfdb.app import app\nfrom lmfdb.logger import make_logger\nfrom flask import Blueprint, request, redirect\n\nlocal_fields_page = Blueprint(\"local_fields\", __name__, template_folder='templates', static_folder=\"static\")\nlogger = make_logger(local_fields_page)\n\n\...
[ { "content": "# -*- coding: utf-8 -*-\nfrom lmfdb.app import app\nfrom lmfdb.logger import make_logger\nfrom flask import Blueprint, request, redirect\n\nlocal_fields_page = Blueprint(\"local_fields\", __name__, template_folder='templates', static_folder=\"static\")\nlogger = make_logger(local_fields_page)\n\n\...
diff --git a/lmfdb/local_fields/__init__.py b/lmfdb/local_fields/__init__.py index fbb8b9cb60..d7f659084b 100644 --- a/lmfdb/local_fields/__init__.py +++ b/lmfdb/local_fields/__init__.py @@ -27,7 +27,6 @@ def redirect_local(): app.register_blueprint(local_fields_page, url_prefix="/padicField") -app.register_blueprint(local_fields_page, url_prefix="/LocalNumberField") # API2 has been disabled for now #from lmfdb.api2.searchers import register_search_function diff --git a/requirements.txt b/requirements.txt index d50709e588..b226f06ebd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ bcrypt cython -flask<=1.1.4 +flask flask-cache flask-login flask-markdown -markupsafe<=2.0.1 -itsdangerous<=2.0.1 +markupsafe +itsdangerous psycopg2-binary pyflakes pytest
ansible-collections__community.general-6695
read_csv - Key 'Name' was not found in the CSV header fields ##### SUMMARY The `read_csv` module fails to identify a field, yet displaces the field in the list of available fields. ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME read_csv ##### ANSIBLE VERSION ``` ansible 2.9.10 config file = /home/anton/git/ansible-deploy-vmware-vm/ansible.cfg configured module search path = ['/home/anton/git/ansible-deploy-vmware-vm/library'] ansible python module location = /home/anton/.local/lib/python3.6/site-packages/ansible executable location = /home/anton/.local/bin/ansible python version = 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0] ``` ##### CONFIGURATION ``` # config file for ansible -- http://ansible.com/ # ============================================== # nearly all parameters can be overridden in ansible-playbook # or with command line flags. ansible will read ANSIBLE_CONFIG, # ansible.cfg in the current working directory, .ansible.cfg in # the home directory or /etc/ansible/ansible.cfg, whichever it # finds first [defaults] host_key_checking = False host_key_check = False ansible_python_interpreter=/usr/bin/python3 log_path = ./ansible.log #bin_ansible_callbacks=True #stdout_callback = debug # some basic default values... library = ./library # additional paths to search for roles in, colon separated roles_path = ./roles [ssh_connection] # ssh arguments to use ssh_args = -o StrictHostKeyChecking=no timeout=60 ``` ##### OS / ENVIRONMENT Ubuntu 20:04 ##### STEPS TO REPRODUCE <!--- Describe exactly how to reproduce the problem, using a minimal test-case --> <!--- Paste example playbooks or commands between quotes below --> ``` --- - name: Right-size VMs gather_facts: false hosts: all connection: local tasks: # Read a CSV file and access the first item - name: Read users from CSV file and return a list read_csv: path: "files/vms/6-19-20 Optimization Report - Oversized Virtual Machines Prod2.csv" key: Name register: users - debug: msg: 'User {{ users.list.2.Name}}' # msg: 'User {{ users.list.2.Name}} has UID {{ users.list.2.ReclaimablevCPUs}} and GID {{ users.list.2.ReclaimableMemory}}' # msg: "{{ users }}" ``` <!--- HINT: You can paste gist.github.com links for larger files --> ##### EXPECTED RESULTS Expect to be able to read CSV values by col name (field) as based on module documentation. ##### ACTUAL RESULTS ``` fatal: [localhost]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "Key 'Name' was not found in the CSV header fields: Name, Configured-vCPU, ReclaimablevCPUs, ConfiguredMemory, ReclaimableMemory, ParentvCenter"} ```
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2021, Andrew Pantuso (@ajpantuso) <ajpantuso@gmail.com>\n# Copyright (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Ide...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2021, Andrew Pantuso (@ajpantuso) <ajpantuso@gmail.com>\n# Copyright (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Ide...
diff --git a/changelogs/fragments/6662-csv-bom.yml b/changelogs/fragments/6662-csv-bom.yml new file mode 100644 index 00000000000..e9c617219c8 --- /dev/null +++ b/changelogs/fragments/6662-csv-bom.yml @@ -0,0 +1,2 @@ +bugfixes: + - csv module utils - detects and remove unicode BOM markers from incoming CSV content (https://github.com/ansible-collections/community.general/pull/6662). diff --git a/plugins/module_utils/csv.py b/plugins/module_utils/csv.py index 50d2cb38686..200548a46da 100644 --- a/plugins/module_utils/csv.py +++ b/plugins/module_utils/csv.py @@ -55,8 +55,10 @@ class unix_dialect(csv.Dialect): def read_csv(data, dialect, fieldnames=None): - + BOM = to_native(u'\ufeff') data = to_native(data, errors='surrogate_or_strict') + if data.startswith(BOM): + data = data[len(BOM):] if PY3: fake_fh = StringIO(data) diff --git a/tests/integration/targets/read_csv/meta/main.yml b/tests/integration/targets/read_csv/meta/main.yml new file mode 100644 index 00000000000..982de6eb035 --- /dev/null +++ b/tests/integration/targets/read_csv/meta/main.yml @@ -0,0 +1,7 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +dependencies: + - setup_remote_tmp_dir diff --git a/tests/integration/targets/read_csv/tasks/main.yml b/tests/integration/targets/read_csv/tasks/main.yml index a21af95182e..c09349dd5b8 100644 --- a/tests/integration/targets/read_csv/tasks/main.yml +++ b/tests/integration/targets/read_csv/tasks/main.yml @@ -11,16 +11,16 @@ # Create basic CSV file - name: Create unique CSV file copy: - content: | + content: &users_content | name,uid,gid,gecos dag,500,500,Dag Wieërs jeroen,501,500,Jeroen Hoekx - dest: users_unique.csv + dest: "{{ remote_tmp_dir }}/users_unique.csv" # Read a CSV file and access user 'dag' - name: Read users from CSV file and return a dictionary read_csv: - path: users_unique.csv + path: "{{ remote_tmp_dir }}/users_unique.csv" key: name register: users_unique @@ -35,10 +35,10 @@ - users_unique.dict.jeroen.uid == '501' - users_unique.dict.jeroen.gid == '500' - # Read a CSV file and access the first item +# Read a CSV file and access the first item - name: Read users from CSV file and return a list read_csv: - path: users_unique.csv + path: "{{ remote_tmp_dir }}/users_unique.csv" register: users_unique - assert: @@ -61,12 +61,12 @@ dag;500;500;Dag Wieërs jeroen;501;500;Jeroen Hoekx dag;502;500;Dag Wieers - dest: users_nonunique.csv + dest: "{{ remote_tmp_dir }}/users_nonunique.csv" # Read a CSV file and access user 'dag' - name: Read users from CSV file and return a dictionary read_csv: - path: users_nonunique.csv + path: "{{ remote_tmp_dir }}/users_nonunique.csv" key: name unique: false delimiter: ';' @@ -87,7 +87,7 @@ # Read a CSV file using an non-existing dialect - name: Read users from CSV file and return a dictionary read_csv: - path: users_nonunique.csv + path: "{{ remote_tmp_dir }}/users_nonunique.csv" dialect: placebo register: users_placebo ignore_errors: true @@ -104,12 +104,12 @@ content: | dag,500,500,Dag Wieërs jeroen,501,500,Jeroen Hoekx - dest: users_noheader.csv + dest: "{{ remote_tmp_dir }}/users_noheader.csv" # Read a CSV file and access user 'dag' - name: Read users from CSV file and return a dictionary read_csv: - path: users_noheader.csv + path: "{{ remote_tmp_dir }}/users_noheader.csv" key: name fieldnames: name,uid,gid,gecos register: users_noheader @@ -133,12 +133,12 @@ name,uid,gid,gecos dag,500,500,Dag Wieërs jeroen,501,500,"Jeroen"Hoekx" - dest: users_broken.csv + dest: "{{ remote_tmp_dir }}/users_broken.csv" # Read a broken CSV file using strict - name: Read users from a broken CSV file read_csv: - path: users_broken.csv + path: "{{ remote_tmp_dir }}/users_broken.csv" key: name strict: true register: users_broken @@ -148,3 +148,29 @@ that: - users_broken is failed - "'Unable to process file' in users_broken.msg" + +# Create basic CSV file with BOM +- name: Create unique CSV file with BOM + copy: + content: "{{ bom + content }}" + dest: "{{ remote_tmp_dir }}/users_bom.csv" + vars: + content: *users_content + bom: "{{ '\ufeff' }}" + + # Read a CSV file and access the first item +- name: Read users from CSV file and return a list + read_csv: + path: "{{ remote_tmp_dir }}/users_bom.csv" + register: users_bom + +- assert: + that: + - users_bom.list.0.name == 'dag' + - users_bom.list.0.gecos == 'Dag Wieërs' + - users_bom.list.0.uid == '500' + - users_bom.list.0.gid == '500' + - users_bom.list.1.name == 'jeroen' + - users_bom.list.1.gecos == 'Jeroen Hoekx' + - users_bom.list.1.uid == '501' + - users_bom.list.1.gid == '500'
netbox-community__netbox-12012
Support for multiple remote auth backends ### NetBox version v3.4.6 ### Feature type New functionality ### Proposed functionality Currently, [REMOTE_AUTH_BACKEND](https://docs.netbox.dev/en/stable/configuration/remote-authentication/#remote_auth_backend) only supports a single auth backend. Modify REMOTE_AUTH_BACKEND to accept an iterable, which may reference one or more Django authentication backends. Backends would then be attempted in sequence when authenticating a user. ### Use case Valid NetBox users may not all exist in the same authentication directory or service, e.g. multiple AD forests. **Note**: For multiple AD domains within a single forest, point `AUTH_LDAP_SERVER_URI` to the AD Global Catalog port 3269 as described in the [docs](https://docs.netbox.dev/en/stable/installation/6-ldap/#general-server-configuration). As Django [supports multiple auth backends](https://django-auth-ldap.readthedocs.io/en/latest/multiconfig.html), extending this functionality to NetBox seems feasible. This has come up several times in discussion: - [Multiple Authentication methods at the same time, meaning Ldap OR SSO possible?](https://github.com/netbox-community/netbox/discussions/10733) - [Multiple LDAP sources Docker](https://github.com/netbox-community/netbox/discussions/5457) - [Multiple remote auth backends](https://github.com/netbox-community/netbox/discussions/9479) - [Multiple LDAP error](https://github.com/netbox-community/netbox/discussions/9360) ### Database changes None ### External dependencies None Support for multiple remote auth backends ### NetBox version v3.4.6 ### Feature type New functionality ### Proposed functionality Currently, [REMOTE_AUTH_BACKEND](https://docs.netbox.dev/en/stable/configuration/remote-authentication/#remote_auth_backend) only supports a single auth backend. Modify REMOTE_AUTH_BACKEND to accept an iterable, which may reference one or more Django authentication backends. Backends would then be attempted in sequence when authenticating a user. ### Use case Valid NetBox users may not all exist in the same authentication directory or service, e.g. multiple AD forests. **Note**: For multiple AD domains within a single forest, point `AUTH_LDAP_SERVER_URI` to the AD Global Catalog port 3269 as described in the [docs](https://docs.netbox.dev/en/stable/installation/6-ldap/#general-server-configuration). As Django [supports multiple auth backends](https://django-auth-ldap.readthedocs.io/en/latest/multiconfig.html), extending this functionality to NetBox seems feasible. This has come up several times in discussion: - [Multiple Authentication methods at the same time, meaning Ldap OR SSO possible?](https://github.com/netbox-community/netbox/discussions/10733) - [Multiple LDAP sources Docker](https://github.com/netbox-community/netbox/discussions/5457) - [Multiple remote auth backends](https://github.com/netbox-community/netbox/discussions/9479) - [Multiple LDAP error](https://github.com/netbox-community/netbox/discussions/9360) ### Database changes None ### External dependencies None
[ { "content": "import hashlib\nimport importlib\nimport importlib.util\nimport os\nimport platform\nimport sys\nimport warnings\nfrom urllib.parse import urlsplit\n\nimport django\nimport sentry_sdk\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import ImproperlyConfigure...
[ { "content": "import hashlib\nimport importlib\nimport importlib.util\nimport os\nimport platform\nimport sys\nimport warnings\nfrom urllib.parse import urlsplit\n\nimport django\nimport sentry_sdk\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import ImproperlyConfigure...
diff --git a/docs/configuration/remote-authentication.md b/docs/configuration/remote-authentication.md index 07adf5c6a24..1fda8d0d35d 100644 --- a/docs/configuration/remote-authentication.md +++ b/docs/configuration/remote-authentication.md @@ -16,7 +16,7 @@ If true, NetBox will automatically create local accounts for users authenticated Default: `'netbox.authentication.RemoteUserBackend'` -This is the Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication. NetBox provides two built-in backends (listed below), though custom authentication backends may also be provided by other packages or plugins. +This is the Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication. NetBox provides two built-in backends (listed below), though custom authentication backends may also be provided by other packages or plugins. Provide a string for a single backend, or an iterable for multiple backends, which will be attempted in the order given. * `netbox.authentication.RemoteUserBackend` * `netbox.authentication.LDAPBackend` diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 45fe3284104..cf2b06a8b25 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -396,8 +396,10 @@ def _setting(name, default=None): ] # Set up authentication backends +if type(REMOTE_AUTH_BACKEND) not in (list, tuple): + REMOTE_AUTH_BACKEND = [REMOTE_AUTH_BACKEND] AUTHENTICATION_BACKENDS = [ - REMOTE_AUTH_BACKEND, + *REMOTE_AUTH_BACKEND, 'netbox.authentication.ObjectPermissionBackend', ]
sbi-dev__sbi-674
small bug about the variable clipped_batch_size in SNRE I believe this line of code https://github.com/mackelab/sbi/blob/4bcba0568ba408156eab28328a562425fb8ba89d/sbi/inference/snre/snre_base.py#L172 should read `clipped_batch_size = min(training_batch_size, val_loader.batch_size)`. Is that correct or am I fundamentally misunderstanding something about what this variable does?
[ { "content": "from abc import ABC, abstractmethod\nfrom copy import deepcopy\nfrom typing import Any, Callable, Dict, Optional, Union\n\nimport torch\nfrom torch import Tensor, eye, nn, ones, optim\nfrom torch.distributions import Distribution\nfrom torch.nn.utils.clip_grad import clip_grad_norm_\nfrom torch.ut...
[ { "content": "from abc import ABC, abstractmethod\nfrom copy import deepcopy\nfrom typing import Any, Callable, Dict, Optional, Union\n\nimport torch\nfrom torch import Tensor, eye, nn, ones, optim\nfrom torch.distributions import Distribution\nfrom torch.nn.utils.clip_grad import clip_grad_norm_\nfrom torch.ut...
diff --git a/sbi/inference/snre/snre_base.py b/sbi/inference/snre/snre_base.py index cc9be42d4..09898527e 100644 --- a/sbi/inference/snre/snre_base.py +++ b/sbi/inference/snre/snre_base.py @@ -169,7 +169,7 @@ def train( dataloader_kwargs=dataloader_kwargs, ) - clipped_batch_size = min(training_batch_size, len(val_loader)) + clipped_batch_size = min(training_batch_size, val_loader.batch_size) # type: ignore num_atoms = int( clamp_and_warn(
getredash__redash-1119
User should be able to delete an Alert Can't remove Alert with UI. Directly run sql as below. ``` sql delete from alerts where id = 〜 ```
[ { "content": "import time\n\nfrom flask import request\nfrom funcy import project\n\nfrom redash import models\nfrom redash.permissions import require_access, require_admin_or_owner, view_only, require_permission\nfrom redash.handlers.base import BaseResource, require_fields, get_object_or_404\n\n\nclass AlertR...
[ { "content": "import time\n\nfrom flask import request\nfrom funcy import project\n\nfrom redash import models\nfrom redash.permissions import require_access, require_admin_or_owner, view_only, require_permission\nfrom redash.handlers.base import BaseResource, require_fields, get_object_or_404\n\n\nclass AlertR...
diff --git a/rd_ui/app/scripts/controllers/alerts.js b/rd_ui/app/scripts/controllers/alerts.js index 342792785a..c444e388e1 100644 --- a/rd_ui/app/scripts/controllers/alerts.js +++ b/rd_ui/app/scripts/controllers/alerts.js @@ -67,10 +67,12 @@ if ($scope.alertId === "new") { $scope.alert = new Alert({options: {}}); + $scope.canEdit = true; } else { $scope.alert = Alert.get({id: $scope.alertId}, function(alert) { $scope.onQuerySelected(new Query($scope.alert.query)); }); + $scope.canEdit = currentUser.canEdit($scope.alert); } $scope.ops = ['greater than', 'less than', 'equals']; @@ -110,6 +112,15 @@ }); }; + $scope.delete = function() { + $scope.alert.$delete(function() { + $location.path('/alerts'); + growl.addSuccessMessage("Alert deleted."); + }, function() { + growl.addErrorMessage("Failed deleting alert."); + }); + } + }; angular.module('redash.directives').directive('alertSubscriptions', ['$q', '$sce', 'AlertSubscription', 'Destination', 'growl', function ($q, $sce, AlertSubscription, Destination, growl) { diff --git a/rd_ui/app/views/alerts/edit.html b/rd_ui/app/views/alerts/edit.html index 79b439a258..fbc6c5021a 100644 --- a/rd_ui/app/views/alerts/edit.html +++ b/rd_ui/app/views/alerts/edit.html @@ -7,10 +7,10 @@ <div class="container"> <div class="row bg-white p-10"> <div class="col-md-8"> - <form name="alertForm" ng-submit="saveChanges()" class="form"> + <form name="alertForm" class="form"> <div class="form-group"> <label>Query</label> - <ui-select ng-model="alert.query" reset-search-input="false" on-select="onQuerySelected($item)"> + <ui-select ng-model="alert.query" reset-search-input="false" on-select="onQuerySelected($item)" ng-disabled="!canEdit"> <ui-select-match placeholder="Search a query by name">{{$select.selected.name}}</ui-select-match> <ui-select-choices repeat="q in queries" refresh="searchQueries($select.search)" @@ -22,7 +22,7 @@ <div class="form-group" ng-show="selectedQuery"> <label>Name</label> - <input type="string" placeholder="{{getDefaultName()}}" class="form-control" ng-model="alert.name"> + <input type="string" placeholder="{{getDefaultName()}}" class="form-control" ng-model="alert.name" ng-disabled="!canEdit"> </div> <div ng-show="queryResult" class="form-horizontal"> @@ -30,7 +30,7 @@ <label class="control-label col-md-2">Value column</label> <div class="col-md-4"> <select ng-options="name for name in queryResult.getColumnNames()" ng-model="alert.options.column" - class="form-control"></select> + class="form-control" ng-disabled="!canEdit"></select> </div> <label class="control-label col-md-2">Value</label> <div class="col-md-4"> @@ -40,24 +40,25 @@ <div class="form-group"> <label class="control-label col-md-2">Op</label> <div class="col-md-4"> - <select ng-options="name for name in ops" ng-model="alert.options.op" class="form-control"></select> + <select ng-options="name for name in ops" ng-model="alert.options.op" class="form-control" ng-disabled="!canEdit"></select> </div> <label class="control-label col-md-2">Reference</label> <div class="col-md-4"> - <input type="number" step="any" class="form-control" ng-model="alert.options.value" placeholder="reference value" + <input type="number" step="any" class="form-control" ng-model="alert.options.value" placeholder="reference value" ng-disabled="!canEdit" required/> </div> </div> <div class="form-group"> <label class="control-label col-md-2">Rearm seconds</label> <div class="col-md-4"> - <input type="number" class="form-control" ng-model="alert.rearm"/> + <input type="number" class="form-control" ng-model="alert.rearm" ng-disabled="!canEdit"/> </div> </div> </div> - <div class="form-group"> - <button class="btn btn-primary" ng-disabled="!alertForm.$valid">Save</button> + <div class="form-group" ng-if="canEdit"> + <button class="btn btn-primary" ng-disabled="!alertForm.$valid" ng-click="saveChanges()">Save</button> + <button class="btn btn-danger" ng-if="alert.id" ng-click="delete()">Delete</button> </div> </form> </div> diff --git a/redash/handlers/alerts.py b/redash/handlers/alerts.py index 8b066d11a7..714dc8f730 100644 --- a/redash/handlers/alerts.py +++ b/redash/handlers/alerts.py @@ -34,6 +34,11 @@ def post(self, alert_id): return alert.to_dict() + def delete(self, alert_id): + alert = get_object_or_404(models.Alert.get_by_id_and_org, alert_id, self.current_org) + require_admin_or_owner(alert.user.id) + alert.delete_instance(recursive=True) + class AlertListResource(BaseResource): def post(self): diff --git a/tests/factories.py b/tests/factories.py index c91c584293..b6d7cf3055 100644 --- a/tests/factories.py +++ b/tests/factories.py @@ -187,7 +187,8 @@ def create_alert(self, **kwargs): def create_alert_subscription(self, **kwargs): args = { - 'user': self.user + 'user': self.user, + 'alert': self.create_alert() } args.update(**kwargs) diff --git a/tests/handlers/test_alerts.py b/tests/handlers/test_alerts.py index 46c10e310a..0053fbc10c 100644 --- a/tests/handlers/test_alerts.py +++ b/tests/handlers/test_alerts.py @@ -1,8 +1,5 @@ from tests import BaseTestCase -from tests.factories import org_factory -from tests.handlers import authenticated_user, json_request -from redash.wsgi import app -from redash.models import AlertSubscription +from redash.models import AlertSubscription, Alert class TestAlertResourceGet(BaseTestCase): @@ -30,6 +27,36 @@ def test_returns_404_if_admin_from_another_org(self): self.assertEqual(rv.status_code, 404) +class TestAlertResourceDelete(BaseTestCase): + def test_removes_alert_and_subscriptions(self): + subscription = self.factory.create_alert_subscription() + alert = subscription.alert + + rv = self.make_request('delete', "/api/alerts/{}".format(alert.id)) + self.assertEqual(rv.status_code, 200) + + self.assertRaises(Alert.DoesNotExist, Alert.get_by_id, subscription.alert.id) + self.assertRaises(AlertSubscription.DoesNotExist, AlertSubscription.get_by_id, subscription.id) + + def test_returns_403_if_not_allowed(self): + alert = self.factory.create_alert() + + user = self.factory.create_user() + rv = self.make_request('delete', "/api/alerts/{}".format(alert.id), user=user) + self.assertEqual(rv.status_code, 403) + + rv = self.make_request('delete', "/api/alerts/{}".format(alert.id), user=self.factory.create_admin()) + self.assertEqual(rv.status_code, 200) + + def test_returns_404_for_unauthorized_users(self): + alert = self.factory.create_alert() + + second_org = self.factory.create_org() + second_org_admin = self.factory.create_admin(org=second_org) + rv = self.make_request('delete', "/api/alerts/{}".format(alert.id), user=second_org_admin) + self.assertEqual(rv.status_code, 404) + + class TestAlertListPost(BaseTestCase): def test_returns_200_if_has_access_to_query(self): query = self.factory.create_query()
microsoft__torchgeo-1755
SustainBenchCropYield download doesn't work ### Description Downloading the SustainBenchCropYield dataset doesn't work as expected ### Steps to reproduce ``` ds = SustainBenchCropYield("data/", download=True) ``` This downloads a file called `soybeans` then fails unzipping `soybeans.zip`. Works if you rename to .zip and unzip manually. ### Version 0.6.0.dev0
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"SustainBench Crop Yield dataset.\"\"\"\n\nimport os\nfrom typing import Any, Callable, Optional\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport torch\nfrom matplotlib.figure impor...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"SustainBench Crop Yield dataset.\"\"\"\n\nimport os\nfrom typing import Any, Callable, Optional\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport torch\nfrom matplotlib.figure impor...
diff --git a/torchgeo/datasets/sustainbench_crop_yield.py b/torchgeo/datasets/sustainbench_crop_yield.py index 5dca4e6d969..564524f9479 100644 --- a/torchgeo/datasets/sustainbench_crop_yield.py +++ b/torchgeo/datasets/sustainbench_crop_yield.py @@ -211,7 +211,7 @@ def _download(self) -> None: download_url( self.url, self.root, - filename=self.dir, + filename=self.dir + ".zip", md5=self.md5 if self.checksum else None, ) self._extract()
geopandas__geopandas-28
Minor typo? It looks like line 121 in geoseries.py (in function `_series_unary_op`) should read: ``` python return Series([getattr(geom, op) for geom in self], ``` rather than ``` python return GeoSeries([getattr(geom, op) for geom in self], ``` This is a very minor bug, so I didn't bother with a PR, but am happy to do one if that helps.
[ { "content": "from warnings import warn\nfrom functools import partial\n\nimport numpy as np\nfrom pandas import Series, DataFrame\n\nimport pyproj\nfrom shapely.geometry import shape, Polygon, Point\nfrom shapely.geometry.collection import GeometryCollection\nfrom shapely.geometry.base import BaseGeometry\nfro...
[ { "content": "from warnings import warn\nfrom functools import partial\n\nimport numpy as np\nfrom pandas import Series, DataFrame\n\nimport pyproj\nfrom shapely.geometry import shape, Polygon, Point\nfrom shapely.geometry.collection import GeometryCollection\nfrom shapely.geometry.base import BaseGeometry\nfro...
diff --git a/geopandas/geoseries.py b/geopandas/geoseries.py index 6f95b08f43..30de157553 100644 --- a/geopandas/geoseries.py +++ b/geopandas/geoseries.py @@ -118,7 +118,7 @@ def _geo_unary_op(self, op): def _series_unary_op(self, op): """Unary operation that returns a Series""" - return GeoSeries([getattr(geom, op) for geom in self], + return Series([getattr(geom, op) for geom in self], index=self.index) # diff --git a/tests/test_geoseries.py b/tests/test_geoseries.py index 7d9b4abf9e..f0298d6095 100644 --- a/tests/test_geoseries.py +++ b/tests/test_geoseries.py @@ -1,6 +1,7 @@ import unittest import numpy as np from numpy.testing import assert_array_equal +from pandas import Series from shapely.geometry import Polygon, Point, LineString from shapely.geometry.base import BaseGeometry from geopandas import GeoSeries @@ -38,6 +39,7 @@ def setUp(self): crs={'init': 'epsg:4326', 'no_defs': True}) def test_area(self): + assert type(self.g1.area) is Series assert_array_equal(self.g1.area.values, np.array([0.5, 1.0])) def test_in(self):
nautobot__nautobot-5051
GraphiQL interface save query function giving error <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reporting reproducible bugs. If you need assistance with Nautobot installation, or if you have a general question, please start a discussion instead: https://github.com/nautobot/nautobot/discussions Please describe the environment in which you are running Nautobot. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Nautobot version (Docker tag too if applicable): 1.6.2 * Python version: 3.9.16 * Database platform, version: postgres * Middleware(s): n/a <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of Nautobot. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynautobot. --> ### Steps to Reproduce 1. Have an existing saved Graphql query (initially from an earlier version of Nautobot) 2. Using the Graphiql interface 3. Update the query with a new value or delete a value 4. Attempt to save the query and observe the error *note* the saved query editor in the primary Nautobot GUI works <!-- What did you expect to happen? --> ### Expected Behavior Query to save <!-- What happened instead? --> ### Observed Behavior An error: <img width="815" alt="Screenshot 2023-10-04 at 21 26 48" src="https://github.com/nautobot/nautobot/assets/10200477/2f1f2b2e-f94e-412e-9be4-d2e5c6b8a9c1">
[ { "content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom drf_spectacular.utils import extend_schema_field\nfrom rest_framework import serializers\n\nfrom nautobot.core.api import (\n ...
[ { "content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom drf_spectacular.utils import extend_schema_field\nfrom rest_framework import serializers\n\nfrom nautobot.core.api import (\n ...
diff --git a/changes/4606.fixed b/changes/4606.fixed new file mode 100644 index 00000000000..c60342ca12c --- /dev/null +++ b/changes/4606.fixed @@ -0,0 +1,4 @@ +Fixed an error when attempting to "Save Changes" to an existing GraphQL saved query via the GraphiQL UI. +Fixed incorrect positioning of the "Save Changes" button in the "Queries" menu in the GraphiQL UI. +Fixed incorrect specification of the "variables" field in the GraphQL saved query REST API. +Fixed a display glitch in the detail view for GraphQL saved queries. diff --git a/nautobot/core/templates/graphene/graphiql.html b/nautobot/core/templates/graphene/graphiql.html index 24043895570..5403a76f4ae 100644 --- a/nautobot/core/templates/graphene/graphiql.html +++ b/nautobot/core/templates/graphene/graphiql.html @@ -53,6 +53,10 @@ margin: 0; width: 100%; } + .toolbar .dropdown-menu > li > a { + clear: left; + margin-right: 120px; /* leave room for the "Save Changes" button if present */ + } </style> <!-- As Nautobot may be run without internet access, we source these files locally rather than from an online CDN --> <link rel="stylesheet" @@ -163,7 +167,6 @@ } function save() { - graphql_data = getHashParams(); var url = new URL(window.location.href); var id = url.searchParams.get("id"); var result_window = $(".result-window").find(".CodeMirror-code"); @@ -179,10 +182,13 @@ return }; + var graphql_data = JSON.stringify({"query": getHashParams().query}); + $.ajax({ url: `{% url 'extras-api:graphqlquery-list' %}${id}/`, method: "PATCH", headers: {"X-CSRFTOKEN": "{{ csrf_token }}"}, + contentType: "application/json", dataType: "json", data: graphql_data, success: function(data) { diff --git a/nautobot/extras/api/serializers.py b/nautobot/extras/api/serializers.py index 574482f598f..2f2c484c47d 100644 --- a/nautobot/extras/api/serializers.py +++ b/nautobot/extras/api/serializers.py @@ -342,7 +342,7 @@ class Meta: class GraphQLQuerySerializer(ValidatedModelSerializer, NotesSerializerMixin): - variables = serializers.DictField(required=False, allow_null=True, default={}) + variables = serializers.DictField(read_only=True) class Meta: model = GraphQLQuery diff --git a/nautobot/extras/templates/extras/graphqlquery.html b/nautobot/extras/templates/extras/graphqlquery.html index ce50510688f..0e194a00b06 100644 --- a/nautobot/extras/templates/extras/graphqlquery.html +++ b/nautobot/extras/templates/extras/graphqlquery.html @@ -37,9 +37,11 @@ </tr> </table> {% endif %} - <pre id="query_output"> + <div class="panel-footer"> + <pre id="query_output"> - </pre> + </pre> + </div> </div> {% endblock content_right_page %}
zigpy__zha-device-handlers-1205
Support for LIDL Livarno home staande led lamp zigbee **Feature request.** This LED Lamp is discovered in HA as a generic light (no Quirk). - ON/OFF works Okay - DIM/Level works Okay - RGB color capability is reported, but not supported by this lamp. it only CCT. - Color temperaturedoes not work correct. When i change the color temperature, the LED does change. but not correct. when putting it to minimal it is cold white (with little bit warm) and putting it to MAX, it become full cold. While i expect it to be warm (yellow, orange). LAMP website: https://www.lidl.nl/p/livarno-home-staande-led-lamp-zigbee-smart-home/p100335194 **Describe the solution you'd like** 1. I like to have the RGB detection removed, so it does not show to change the color. 2. I like to have the Color temperature working as it should be. For solution (1. I have added in the file **/zhaquirks/lidl/cct.py** the following signature: signature = { MODELS_INFO: [ ("_TZ3000_8uaoilu9", "TS0502A") That solves the RGB problem. For solution (2, i have no idea where to even start. **Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line.** ```{ "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x010c", "in_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0008", "0x0300", "0x1000" ], "out_clusters": [ "0x000a", "0x0019" ] }, "242": { "profile_id": 41440, "device_type": "0x0061", "in_clusters": [], "out_clusters": [ "0x0021" ] } }, "manufacturer": "_TZ3000_8uaoilu9", "model": "TS0502A", "class": "zhaquirks.lidl.cct.CCTLight" }``` **Additional context** If you need any other info / logging, just let me know.
[ { "content": "\"\"\"Quirk for LIDL CCT bulb.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n GreenPowerProxy,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n Scenes,\n Time,\n)\nfr...
[ { "content": "\"\"\"Quirk for LIDL CCT bulb.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n GreenPowerProxy,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n Scenes,\n Time,\n)\nfr...
diff --git a/zhaquirks/lidl/cct.py b/zhaquirks/lidl/cct.py index b45bbed83a..de1d9769b6 100644 --- a/zhaquirks/lidl/cct.py +++ b/zhaquirks/lidl/cct.py @@ -44,6 +44,7 @@ class CCTLight(CustomDevice): ("_TZ3000_rylaozuc", "TS0502A"), ("_TZ3000_el5kt5im", "TS0502A"), ("_TZ3000_oh7jddmx", "TS0502A"), + ("_TZ3000_8uaoilu9", "TS0502A"), ], ENDPOINTS: { 1: {
googleapis__google-cloud-python-2379
'_AsyncQuery.cancel' fails to update from returned resource E.g.: ``` python Traceback (most recent call last): File ... job.cancel() File ".../google/cloud/bigquery/job.py", line 378, in cancel self._set_properties(api_response) File ".../google/cloud/bigquery/job.py", line 262, in _set_properties self._scrub_local_properties(cleaned) File ".../google/cloud/bigquery/job.py", line 1050, in _scrub_local_properties configuration = cleaned['configuration']['query'] KeyError: 'configuration' ``` The [docs for `job.cancel`](https://cloud.google.com/bigquery/docs/reference/v2/jobs/cancel#response) show that the job resource is in a `job` subkey of the response.
[ { "content": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless...
[ { "content": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless...
diff --git a/google/cloud/bigquery/job.py b/google/cloud/bigquery/job.py index a4eb745b4942..5a88f8316fdb 100644 --- a/google/cloud/bigquery/job.py +++ b/google/cloud/bigquery/job.py @@ -375,7 +375,7 @@ def cancel(self, client=None): api_response = client.connection.api_request( method='POST', path='%s/cancel' % (self.path,)) - self._set_properties(api_response) + self._set_properties(api_response['job']) class _LoadConfiguration(object): diff --git a/system_tests/bigquery.py b/system_tests/bigquery.py index c417e0538b54..1c566b4e4e0d 100644 --- a/system_tests/bigquery.py +++ b/system_tests/bigquery.py @@ -435,3 +435,37 @@ def _job_done(instance): by_age = operator.itemgetter(1) self.assertEqual(sorted(rows, key=by_age), sorted(ROWS, key=by_age)) + + def test_job_cancel(self): + DATASET_NAME = _make_dataset_name('job_cancel') + JOB_NAME = 'fetch_' + DATASET_NAME + TABLE_NAME = 'test_table' + QUERY = 'SELECT * FROM %s.%s' % (DATASET_NAME, TABLE_NAME) + + dataset = Config.CLIENT.dataset(DATASET_NAME) + + retry_403(dataset.create)() + self.to_delete.append(dataset) + + full_name = bigquery.SchemaField('full_name', 'STRING', + mode='REQUIRED') + age = bigquery.SchemaField('age', 'INTEGER', mode='REQUIRED') + table = dataset.table(TABLE_NAME, schema=[full_name, age]) + table.create() + self.to_delete.insert(0, table) + + job = Config.CLIENT.run_async_query(JOB_NAME, QUERY) + job.begin() + job.cancel() + + def _job_done(instance): + return instance.state in ('DONE', 'done') + + retry = RetryInstanceState(_job_done, max_tries=8) + retry(job.reload)() + + # The `cancel` API doesn't leave any reliable traces on + # the status of the job resource, so we can't really assert for + # them here. The best we can do is not that the API call didn't + # raise an error, and that the job completed (in the `retry()` + # above). diff --git a/unit_tests/bigquery/test_job.py b/unit_tests/bigquery/test_job.py index f4add8d8f7be..2d63f7b5bada 100644 --- a/unit_tests/bigquery/test_job.py +++ b/unit_tests/bigquery/test_job.py @@ -601,8 +601,9 @@ def test_reload_w_alternate_client(self): def test_cancel_w_bound_client(self): PATH = 'projects/%s/jobs/%s/cancel' % (self.PROJECT, self.JOB_NAME) - RESOURCE = self._makeResource() - conn = _Connection(RESOURCE) + RESOURCE = self._makeResource(ended=True) + RESPONSE = {'job': RESOURCE} + conn = _Connection(RESPONSE) client = _Client(project=self.PROJECT, connection=conn) table = _Table() job = self._makeOne(self.JOB_NAME, table, [self.SOURCE1], client) @@ -617,10 +618,11 @@ def test_cancel_w_bound_client(self): def test_cancel_w_alternate_client(self): PATH = 'projects/%s/jobs/%s/cancel' % (self.PROJECT, self.JOB_NAME) - RESOURCE = self._makeResource() + RESOURCE = self._makeResource(ended=True) + RESPONSE = {'job': RESOURCE} conn1 = _Connection() client1 = _Client(project=self.PROJECT, connection=conn1) - conn2 = _Connection(RESOURCE) + conn2 = _Connection(RESPONSE) client2 = _Client(project=self.PROJECT, connection=conn2) table = _Table() job = self._makeOne(self.JOB_NAME, table, [self.SOURCE1], client1)
borgbackup__borg-5109
`pathconf(..., _PC_NAME_MAX) == 0` in borg mount When I use `pathconf(..., _PC_NAME_MAX)` to allocate space for `struct dirent` as described in [`man 3 readdir`](https://linux.die.net/man/3/readdir), I get back 0. [`man 3 pathconf`](https://linux.die.net/man/3/pathconf) says it should return -1 on error. Original bindfs bug: https://github.com/mpartel/bindfs/issues/54 by @mengelmann
[ { "content": "import errno\nimport io\nimport os\nimport stat\nimport struct\nimport sys\nimport tempfile\nimport time\nfrom collections import defaultdict\nfrom signal import SIGINT\nfrom distutils.version import LooseVersion\n\nimport llfuse\n\nfrom .logger import create_logger\nlogger = create_logger()\n\nfr...
[ { "content": "import errno\nimport io\nimport os\nimport stat\nimport struct\nimport sys\nimport tempfile\nimport time\nfrom collections import defaultdict\nfrom signal import SIGINT\nfrom distutils.version import LooseVersion\n\nimport llfuse\n\nfrom .logger import create_logger\nlogger = create_logger()\n\nfr...
diff --git a/src/borg/fuse.py b/src/borg/fuse.py index f0933ddbe6..429790e43d 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -518,6 +518,8 @@ def statfs(self, ctx=None): stat_.f_files = 0 stat_.f_ffree = 0 stat_.f_favail = 0 + if hasattr(stat_, 'f_namemax'): # since llfuse 1.3.0 + stat_.f_namemax = 255 # == NAME_MAX (depends on archive source OS / FS) return stat_ def get_item(self, inode):
ietf-tools__datatracker-4145
v1 api crashes on some content when serializing to xml See the very old ticket at https://github.com/django-tastypie/django-tastypie/issues/1107. submission.first_two_pages can contain formfeeds. These break tastypie's xml serialization. Json serialization succeeds. The quick fix is to stop exposing first_two_pages through the API.
[ { "content": "# Copyright The IETF Trust 2014-2019, All Rights Reserved\n# -*- coding: utf-8 -*-\n# Autogenerated by the mkresources management command 2014-11-13 23:53\n\n\nfrom ietf.api import ModelResource\nfrom tastypie.fields import ToOneField, ToManyField\nfrom tastypie.constants import ALL, ALL_WITH_RELA...
[ { "content": "# Copyright The IETF Trust 2014-2019, All Rights Reserved\n# -*- coding: utf-8 -*-\n# Autogenerated by the mkresources management command 2014-11-13 23:53\n\n\nfrom ietf.api import ModelResource\nfrom tastypie.fields import ToOneField, ToManyField\nfrom tastypie.constants import ALL, ALL_WITH_RELA...
diff --git a/ietf/submit/resources.py b/ietf/submit/resources.py index bf4959f240..98de27aa62 100644 --- a/ietf/submit/resources.py +++ b/ietf/submit/resources.py @@ -68,6 +68,7 @@ class Meta: "group": ALL_WITH_RELATIONS, "draft": ALL_WITH_RELATIONS, } + excludes = ('first_two_pages',) api.submit.register(SubmissionResource()) from ietf.person.resources import PersonResource
biolab__orange3-text-239
Preprocess Text: empty Tagger (Stanford) results in segfault Corpus (bookexcerpts) - Preprocess Text - turn on POS Tagger - select Tagger (window opens) - don't select any tagger, just use cancel). Procedure results in segfault. Perhaps disable Tagger if Model empty or otherwise prevent segfaulting.
[ { "content": "import os\n\nfrom AnyQt.QtWidgets import (QComboBox, QWidget, QHBoxLayout,\n QSizePolicy, QLineEdit, QDoubleSpinBox,\n QSpinBox, QTextEdit, QDateEdit, QGroupBox,\n QPushButton, QStyle, QFileDialog, QLabel,\n ...
[ { "content": "import os\n\nfrom AnyQt.QtWidgets import (QComboBox, QWidget, QHBoxLayout,\n QSizePolicy, QLineEdit, QDoubleSpinBox,\n QSpinBox, QTextEdit, QDateEdit, QGroupBox,\n QPushButton, QStyle, QFileDialog, QLabel,\n ...
diff --git a/orangecontrib/text/widgets/utils/widgets.py b/orangecontrib/text/widgets/utils/widgets.py index 6c27435a2..4528c9421 100644 --- a/orangecontrib/text/widgets/utils/widgets.py +++ b/orangecontrib/text/widgets/utils/widgets.py @@ -293,7 +293,8 @@ def browse(self, start_dir=None): self.recent_files.insert(0, path) self.update_combo() - self.open_file(path) + if path: + self.open_file(path) def select(self, n): name = self.file_combo.currentText()
zigpy__zha-device-handlers-891
[Device Support Request] Lidl _TZ3000_oh7jddmx TS0502A **Is your feature request related to a problem? Please describe.** Very similar to #808 I have a LIDL ceiling light panel, which only supports CCT but is incorrectly reported to HA. **Describe the solution you'd like** Only exposing the color temperature. **Device signature** ``` { "node_descriptor": "NodeDescriptor(byte1=1, byte2=64, mac_capability_flags=142, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.Router: 1>, *user_descriptor_available=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x010c", "in_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0x0008", "0x0300", "0x1000" ], "out_clusters": [ "0x000a", "0x0019" ] }, "242": { "profile_id": 41440, "device_type": "0x0061", "in_clusters": [], "out_clusters": [ "0x0021" ] } }, "manufacturer": "_TZ3000_oh7jddmx", "model": "TS0502A", "class": "zigpy.device.Device" } ``` **Additional context** I'm assuming adding the signature into https://github.com/zigpy/zha-device-handlers/blob/b180e4f7ab4a096688f4d4ad9b47ac1b3efa9fe2/zhaquirks/lidl/cct.py#L40-L46 will fix this. ~~I'll test it and open a PR if I find time for it.~~ Update: Successfully tested. PR opened.
[ { "content": "\"\"\"Quirk for LIDL CCT bulb.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n GreenPowerProxy,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n Scenes,\n Time,\n)\nfr...
[ { "content": "\"\"\"Quirk for LIDL CCT bulb.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n GreenPowerProxy,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n Scenes,\n Time,\n)\nfr...
diff --git a/zhaquirks/lidl/cct.py b/zhaquirks/lidl/cct.py index 633323a952..b45bbed83a 100644 --- a/zhaquirks/lidl/cct.py +++ b/zhaquirks/lidl/cct.py @@ -43,6 +43,7 @@ class CCTLight(CustomDevice): ("_TZ3000_9evm3otq", "TS0502A"), ("_TZ3000_rylaozuc", "TS0502A"), ("_TZ3000_el5kt5im", "TS0502A"), + ("_TZ3000_oh7jddmx", "TS0502A"), ], ENDPOINTS: { 1: {
Lightning-AI__torchmetrics-2430
Can't access metrics in a MetricCollection via keys returned in MetricCollection.keys ## 🐛 Bug print(list(self.val_metrics_macro.keys())) # prints "['val/MulticlassAccuracy/macro', 'val/MulticlassF1Score/macro', 'val/MulticlassPrecision/macro', 'val/MulticlassRecall/macro']" print( f'val/accuracy/macro: {self.val_metrics_macro["val/MulticlassAccuracy/macro"].compute():.4}' ) # throws error: KeyError: 'val/MulticlassAccuracy/macro' ### Expected behavior If a key shows up in `.keys` it should be a valid key in `__getitem__`. ### Environment - TorchMetrics version (and how you installed TM, e.g. `conda`, `pip`, build from source): 1.3.1 - Python & PyTorch Version (e.g., 1.0): torch 2.2.0, python 3.10.12 - Any other relevant information such as OS (e.g., Linux): MacOS
[ { "content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
[ { "content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 537d5cf61f7..dd66310e14a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fix getitem for metric collection when prefix/postfix is set ([#2430](https://github.com/Lightning-AI/torchmetrics/pull/2430)) + + - Fixed axis names with Precision-Recall curve ([#2462](https://github.com/Lightning-AI/torchmetrics/pull/2462)) diff --git a/src/torchmetrics/collections.py b/src/torchmetrics/collections.py index d6ad1287c58..e4b0dbafd2a 100644 --- a/src/torchmetrics/collections.py +++ b/src/torchmetrics/collections.py @@ -547,6 +547,10 @@ def __getitem__(self, key: str, copy_state: bool = True) -> Metric: """ self._compute_groups_create_state_ref(copy_state) + if self.prefix: + key = key.removeprefix(self.prefix) + if self.postfix: + key = key.removesuffix(self.postfix) return self._modules[key] @staticmethod diff --git a/tests/unittests/bases/test_collections.py b/tests/unittests/bases/test_collections.py index 0e124125509..a677c92ddb1 100644 --- a/tests/unittests/bases/test_collections.py +++ b/tests/unittests/bases/test_collections.py @@ -33,6 +33,7 @@ MultilabelAveragePrecision, ) from torchmetrics.utilities.checks import _allclose_recursive +from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_2_0 from unittests._helpers import seed_all from unittests._helpers.testers import DummyMetricDiff, DummyMetricMultiOutputDict, DummyMetricSum @@ -150,6 +151,7 @@ def test_metric_collection_args_kwargs(tmpdir): assert metric_collection["DummyMetricDiff"].x == -20 +@pytest.mark.skipif(not _TORCH_GREATER_EQUAL_2_0, reason="Test requires torch 2.0 or higher") @pytest.mark.parametrize( ("prefix", "postfix"), [ @@ -204,6 +206,10 @@ def test_metric_collection_prefix_postfix_args(prefix, postfix): for name in names: assert f"new_prefix_{name}_new_postfix" in out, "postfix argument not working as intended with clone method" + keys = list(new_metric_collection.keys()) + for k in keys: + assert new_metric_collection[k] # check that the keys are valid even with prefix and postfix + def test_metric_collection_repr(): """Test MetricCollection."""
ckan__ckan-7125
Is ckan.datasets_per_page not being used? **CKAN version** CKAN 2.9.5 **Describe the bug** I set the _ckan.datasets_per_page_ configuration options to 10 and this is working fine on routes: - /dataset/id - /group - /organization But is not working in the routes* - /group/id - /organization/id where it always shows 20 results per page. Reading through the source code I noticed that the _read_ function called in *those routes receives a _limit_ parameter with a default value of 20, but it is not updated in the function body with something like ```python the_limit = config.get('ckan.datasets_per_page', limit) ``` I added this change in my local installation and it worked. Is this by design or is it a bug? I just want to be sure that this is a bug before opening a PR. https://github.com/ckan/ckan/blob/dc49cece33e447858d0008bc71b9a4ab724602ee/ckan/views/group.py#L408-L411 Thanks.
[ { "content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport logging\nimport re\nfrom collections import OrderedDict\nfrom typing import Any, Optional, Union, cast\nfrom typing_extensions import Literal\n\nfrom urllib.parse import urlencode\n\nimport ckan.lib.base as base\nimport ckan.lib.helpe...
[ { "content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport logging\nimport re\nfrom collections import OrderedDict\nfrom typing import Any, Optional, Union, cast\nfrom typing_extensions import Literal\n\nfrom urllib.parse import urlencode\n\nimport ckan.lib.base as base\nimport ckan.lib.helpe...
diff --git a/ckan/views/group.py b/ckan/views/group.py index 39154d95035..235e337f790 100644 --- a/ckan/views/group.py +++ b/ckan/views/group.py @@ -425,6 +425,8 @@ def read(group_type: str, extra_vars["q"] = q + limit = config.get(u'ckan.datasets_per_page', limit) + try: # Do not query for the group datasets when dictizing, as they will # be ignored and get requested on the controller anyway
Cog-Creators__Red-DiscordBot-3294
[V3/develop] "owner" config field is ignored # Other bugs #### What were you trying to do? Start bot with owner permissions on me. #### What were you expecting to happen? I have owner permissions #### What actually happened? I don't have owner permissions, but owner is set in config. #### How can we reproduce this issue? 1. Setup bot, token of which doesn't belongs directly to you (i.e. other user or just a team) 2. Set an owner through config (via `redbot --edit`) 3. Run bot: config is ignored, owner used from application's data
[ { "content": "import asyncio\nimport inspect\nimport logging\nimport os\nimport platform\nimport shutil\nimport sys\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom enum import IntEnum\nfrom importlib.machinery import ModuleSpec\nfrom pathlib import Path\nfrom typing import Optional, Uni...
[ { "content": "import asyncio\nimport inspect\nimport logging\nimport os\nimport platform\nimport shutil\nimport sys\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom enum import IntEnum\nfrom importlib.machinery import ModuleSpec\nfrom pathlib import Path\nfrom typing import Optional, Uni...
diff --git a/changelog.d/3293.misc.rst b/changelog.d/3293.misc.rst new file mode 100644 index 00000000000..c51b07a7b54 --- /dev/null +++ b/changelog.d/3293.misc.rst @@ -0,0 +1 @@ +Properly set owner from config during bot's pre-flight. diff --git a/redbot/core/bot.py b/redbot/core/bot.py index 4ea8a90559a..4264bd940fc 100644 --- a/redbot/core/bot.py +++ b/redbot/core/bot.py @@ -404,6 +404,9 @@ async def pre_flight(self, cli_flags): init_global_checks(self) init_events(self, cli_flags) + if self.owner_id is None: + self.owner_id = await self._config.owner() + i18n_locale = await self._config.locale() i18n.set_locale(i18n_locale)
OCHA-DAP__hdx-ckan-1887
Please allow markdown to the organization description field Right now markdown is not allowed in that field. I believe that this is preventing me from adding paragraphs and other particular styles to the text in question. ![screen shot 2014-10-17 at 12 27 34 pm](https://cloud.githubusercontent.com/assets/953118/4682223/b9992900-561a-11e4-9cec-7f450c6909dc.png)
[ { "content": "'''\nCreated on Nov 3, 2014\n\n@author: alexandru-m-g\n'''\n\nimport logging\n\nimport ckan.lib.base as base\nimport ckan.logic as logic\nimport ckan.model as model\nimport ckan.common as common\nimport ckan.lib.helpers as h\n\nimport ckanext.hdx_crisis.dao.data_access as data_access\nimport ckane...
[ { "content": "'''\nCreated on Nov 3, 2014\n\n@author: alexandru-m-g\n'''\n\nimport logging\n\nimport ckan.lib.base as base\nimport ckan.logic as logic\nimport ckan.model as model\nimport ckan.common as common\nimport ckan.lib.helpers as h\n\nimport ckanext.hdx_crisis.dao.data_access as data_access\nimport ckane...
diff --git a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py index d41a13b03e..70261e9f43 100644 --- a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py +++ b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py @@ -46,7 +46,7 @@ def show(self): self._generate_other_links(search_term) - return render('crisis/crisis.html') + return render('crisis/crisis-ebola.html') def _generate_dataset_results(self, context, search_term): limit = 25 diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-base/crisis-base.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-base/crisis-base.css new file mode 100644 index 0000000000..7f46ae6138 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-base/crisis-base.css @@ -0,0 +1,23 @@ +#crisis-map { + height: 350px; +} + +.crisis-map-title { + height:50px; + background-color: rgba(255, 255, 255, 0.4); + position: absolute; + top: 300px; + width: 100%; +} + +.crisisTitle{ + color: #000000; + margin-top: 80px; + font-family: 'Source Sans Pro', sans-serif; + font-weight: bold; + font-size: 28px; + letter-spacing: 0.01em; + line-height: 50px; + text-transform: capitalize; +} + diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-base/crisis-base.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-base/crisis-base.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-colombia/crisis-colombia.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-colombia/crisis-colombia.css new file mode 100644 index 0000000000..88d2454c10 --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-colombia/crisis-colombia.css @@ -0,0 +1,55 @@ +.item-info { + border-top: 1px solid #cccccc; + border-bottom: 1px solid #cccccc; + padding: 20px 0; + margin-top: -1px; + color: #333333; +} + +.item-info-title{ + font-family: 'Gotham-Bold', sans-serif; + font-weight: 400; + font-size: 14px; + letter-spacing: 0.01em; + /*margin-bottom: 10px;*/ + color: #333333; +} +.item-info .item-info-extra { + /*margin-top: 10px;*/ +} +.item-info .item-info-number { + font-family: 'Gotham-Light', sans-serif; + font-size: 47px; + line-height: 1; + letter-spacing: 0.01em; + /*margin-bottom: 10px;*/ +} + +.item-info .item-info-number span.small { + font-family: 'Gotham-Light', sans-serif; + font-size: 25px; + line-height: 1; + letter-spacing: 0.01em; + margin-bottom: 10px; + margin-left: -15px; +} + +.item-info-source-title-text{ + font-family: 'Source Sans Pro', sans-serif; + font-size: 14px; + color: #333333; + letter-spacing: 0.01em; +} + +.item-info .item-info-source-title{ + font-family: 'Source Sans Pro', sans-serif; + font-size: 12px; + letter-spacing: 0.01em; +} +.item-info .item-info-source-date { + font-family: 'Source Sans Pro', sans-serif; + font-size: 12px; + letter-spacing: 0.01em; + color: #888888; +} + diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-colombia/crisis-colombia.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-colombia/crisis-colombia.js new file mode 100644 index 0000000000..8d2cdb3a5a --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-colombia/crisis-colombia.js @@ -0,0 +1,14 @@ +$(document).ready(function() { + map = L.map('crisis-map', { attributionControl: false }); + map.scrollWheelZoom.disable(); + L.tileLayer($('#crisis-map-url-div').text(), { + attribution: ' © <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors', + maxZoom: 10 + }).addTo(map); + + L.control.attribution({position: 'topright'}).addTo(map); + map.setView([5, -70], 5); + +// drawDistricts(map); +// c3Sparklines(); +}); diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/crisis-page.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/crisis-ebola.css similarity index 84% rename from ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/crisis-page.css rename to ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/crisis-ebola.css index cca656e421..617c28b6e9 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/crisis-page.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/crisis-ebola.css @@ -1,15 +1,3 @@ -#ebola-map { - height: 350px; -} - -.ebola-map-title { - height:50px; - background-color: rgba(255, 255, 255, 0.4); - position: absolute; - top: 300px; - width: 100%; -} - .item-info { border-top: 1px solid #cccccc; border-bottom: 1px solid #cccccc; @@ -65,16 +53,6 @@ color: #888888; } -.crisisTitle{ - color: #000000; - margin-top: 80px; - font-family: 'Source Sans Pro', sans-serif; - font-weight: bold; - font-size: 28px; - letter-spacing: 0.01em; - line-height: 50px; - text-transform: capitalize; -} /* Dataset search results on crisis page */ .crisis-list-header.list-header { /*background-color: inherit; */ diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/crisis-page.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/crisis-ebola.js similarity index 99% rename from ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/crisis-page.js rename to ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/crisis-ebola.js index cf2b659ecb..49edba734d 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/crisis-page.js +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/crisis-ebola.js @@ -1,5 +1,5 @@ $(document).ready(function() { - map = L.map('ebola-map', { attributionControl: false }); + map = L.map('crisis-map', { attributionControl: false }); map.scrollWheelZoom.disable(); L.tileLayer($('#crisis-map-url-div').text(), { attribution: ' © <a href="http://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors', diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/data.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/data.js similarity index 100% rename from ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/data.js rename to ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/data.js diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/ebola_crisis_page_graph.css b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/ebola_crisis_page_graph.css similarity index 100% rename from ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/ebola_crisis_page_graph.css rename to ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/ebola_crisis_page_graph.css diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/ebola_crisis_page_graph.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/ebola_crisis_page_graph.js similarity index 100% rename from ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/ebola_crisis_page_graph.js rename to ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/ebola_crisis_page_graph.js diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/medical_centres.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/medical_centres.js similarity index 100% rename from ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/medical_centres.js rename to ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/medical_centres.js diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/regions.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/regions.js similarity index 100% rename from ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis_page/regions.js rename to ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/crisis-ebola/regions.js diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/indicator_graph.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/indicator_graph.js index 2e5c6ef9b0..35724f9e2e 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/indicator_graph.js +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/indicator_graph.js @@ -212,11 +212,12 @@ ckan.module('hdx-indicator-graph', function ($, _) { if (json.success){ this.data = json.result.results; - //#1595 - fix not active until datateam will clean the data -// var unitName = this.data[0].unitName; -// if (unitName){ -// this.c3_chart.axis.labels({y: unitName}); -// } + var unitName = this.data[0].unitName; + if (unitName){ + if (unitName.length > 40) + unitName = unitName.slice(0, 37) + '...'; + this.c3_chart.axis.labels({y: unitName}); + } //Call all callbacks that new data was loaded for (var i = 0; i < this.dataCallbacks.length; i++){ this.dataCallbacks[i](); diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/resource.config b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/resource.config index bfa6702573..eb5eedc903 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/resource.config +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/resource.config @@ -16,8 +16,8 @@ css/search.css = 99 highlight.js=99 css/indicator.css = 99 css/filter.css = 99 -crisis_page/crisis-page.css = 99 -crisis_page/ebola_crisis_page_graph.css = 99 +crisis-ebola/crisis-ebola.css = 99 +crisis-ebola/ebola_crisis_page_graph.css = 99 [depends] @@ -39,15 +39,26 @@ c3 = vendor/c3/c3.css -crisis-page = - crisis_page/crisis-page.css - crisis_page/ebola_crisis_page_graph.css - crisis_page/crisis-page.js - crisis_page/ebola_crisis_page_graph.js +crisis-base = + crisis-base/crisis-base.css + crisis-base/crisis-base.js - crisis_page/data.js - crisis_page/medical_centres.js - crisis_page/regions.js +crisis-colombia = + crisis-colombia/crisis-colombia.css + crisis-colombia/crisis-colombia.js + crisis-ebola/ebola_crisis_page_graph.css + crisis-ebola/ebola_crisis_page_graph.js + + +crisis-ebola = + crisis-ebola/crisis-ebola.css + crisis-ebola/ebola_crisis_page_graph.css + crisis-ebola/crisis-ebola.js + crisis-ebola/ebola_crisis_page_graph.js + + crisis-ebola/data.js + crisis-ebola/medical_centres.js + crisis-ebola/regions.js google-analytics = google-analytics.js diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/public/hdx_theme.css b/ckanext-hdx_theme/ckanext/hdx_theme/public/hdx_theme.css index 6db42587f4..298155c9b7 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/public/hdx_theme.css +++ b/ckanext-hdx_theme/ckanext/hdx_theme/public/hdx_theme.css @@ -849,6 +849,7 @@ span.clear { clear: left; display: block; } .org-control textarea{ max-height:70px; + margin-bottom: 0; } diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/country.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/country.html index c84f9716ee..dfbdf4ad5f 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/country.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/country.html @@ -1 +1,77 @@ -{% extends "crisis/crisis.html" %} \ No newline at end of file +{% extends "crisis-base.html" %} + +{% block subtitle %}{{ _("Colombia crisis page") }}{% endblock %} +{% block crisis_title %} {{ _("Colombia") }} {% endblock %} +{% block breadcrumb_content %} + <li class="active">{{ h.nav_link(_('Colombia'), controller='ckanext.hdx_crisis.controllers.country_controller:CountryController', + action='show', highlight_actions = 'new index') }}</li> +{% endblock %} + +{% block crisis_data %} + <div class="row mTop25"> + <div class="col-xs-4"> + <div class="row"> + {% block top_line_figures %} + {% for item in c.top_line_items %} + <div class="col-xs-12"> + <div class="item-info"> + <div class="row"> + <div class="col-xs-7"> + <div class="row"> + <div class="col-xs-12 item-info-title"> + {{ item.title }} + </div> + <div class="col-xs-12 item-info-extra"> + <div class="row"> + <div class="col-xs-12"> + <span class="item-info-source-title-text">{{ item.source }}</span> - + {% if item.source_link %} + <span class="item-info-source-title"><a href="{{ item.source_link }}" target="new">Data</a></span> - + {% endif %} + {% if item.explore %} + <span class="item-info-source-title"><a href="{{ item.explore }}" target="new">Explore</a></span> - + {% endif %} + <span class="item-info-source-date">{{ item.latest_date }}</span> + </div> + </div> + </div> + </div> + </div> + <div class="col-xs-5"> + <div class="row"> + <div class="col-xs-12 item-info-number text-right"> + <span title="{{ item.notes }}">{{ item.formatted_value }}</span> + {% if item.units == 'million' %} + <span class="small">{{ _('million') }} </span> + {% endif %} + {% if item.units == 'ratio' %} + <span class="small">%</span> + {% endif %} + </div> + </div> + </div> + </div> + </div> + </div> + {% endfor %} + {% endblock %} + </div> + </div> + <div class="col-xs-8"> + <div class="row"> + <div class="col-xs-12"> + <div id="ebola_graph"></div> + </div> + <div class="col-xs-12"> + <div id="ebola_graph"></div> + </div> + </div> + </div> + + </div> +{% endblock %} + +{% block scripts2 %} + {{ super() }} + {% resource 'hdx_theme/crisis-colombia' %} +{% endblock %} \ No newline at end of file diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/crisis/crisis-ebola.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/crisis/crisis-ebola.html new file mode 100644 index 0000000000..491761802f --- /dev/null +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/crisis/crisis-ebola.html @@ -0,0 +1,77 @@ +{% extends "crisis-base.html" %} +{% import 'macros/form.html' as form %} + +{% block subtitle %}{{ _("Ebola crisis page") }}{% endblock %} +{% block crisis_title %} {{ _("West Africa: Ebola outbreak") }} {% endblock %} +{% block breadcrumb_content %} + <li class="active">{{ h.nav_link(_('Ebola'), controller='ckanext.hdx_crisis.controllers.crisis_controller:CrisisController', + action='show', highlight_actions = 'new index') }}</li> +{% endblock %} + + +{% block crisis_data %} + <div class="row mTop25"> + {% block top_line_figures %} + {% for item in c.top_line_items %} + <div class="col-xs-4"> + <div class="item-info"> + <div class="row"> + <div class="col-xs-12 item-info-title"> + {{ item.title }} + </div> + <div class="col-xs-12 item-info-number"> + <span title="{{ item.notes }}">{{ item.formatted_value }}</span> + {% if item.units == 'million' %} + <span class="small">{{ _('million') }} </span> + {% endif %} + {% if item.units == 'ratio' %} + <span class="small">%</span> + {% endif %} + + </div> + {% if item.sparklines_json %} + <div class="col-xs-12"> + <div style="display: none;" class="sparkline">{{ item.sparklines_json }}</div> + </div> + {% endif %} + <div class="col-xs-12 item-info-extra"> + <div class="row"> + <div class="col-xs-12"> + <span class="item-info-source-title-text">{{ item.source }}</span> + </div> + </div> + <div class="row"> + <div class="col-xs-12"> + {% if item.source_link %} + <span class="item-info-source-title"><a href="{{ item.source_link }}" target="new">Data</a></span> - + {% endif %} + {% if item.explore %} + <span class="item-info-source-title"><a href="{{ item.explore }}" target="new">Explore</a></span> - + {% endif %} + <span class="item-info-source-date">{{ item.latest_date }}</span> + </div> + </div> + </div> + </div> + </div> + </div> + {% endfor %} + {% endblock %} + </div> + + <div class="row mTop25"> + <div class="col-xs-12 item-info-title"> + Week by Week Spread of Ebola in West Africa + </div> + <div class="col-xs-12"> + <div id="ebola_graph"></div> + </div> + </div> +{% endblock %} + + +{% block scripts2 %} + {{ super() }} + {% resource 'hdx_theme/crisis-ebola' %} + +{% endblock %} \ No newline at end of file diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/read.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/read.html index 719df17af9..98b7d3db2a 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/read.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/read.html @@ -48,8 +48,8 @@ <h1 class="itemTitle"> {% block package_notes %} {% if c.group_dict.description %} <div class="notes embedded-content mBottom15"> - {{ c.group_dict.description }} - {% set org_url = h.hdx_get_extras_element(c.group_dict.extras) %} + {{ h.render_markdown(c.group_dict.description) }} + {% set org_url = h.hdx_get_extras_element(c.group_dict.extras) %} {% if org_url != '' %} <span> &nbsp;&nbsp;&nbsp;{{ _('More info') }} diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/snippets/organization_form.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/snippets/organization_form.html index 4186a52285..eba781f168 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/snippets/organization_form.html +++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/snippets/organization_form.html @@ -28,7 +28,7 @@ </div> </div> <div class="org-control-container"> - {{ form.textarea('description', label=_('Description of Organisation'), id='field-description', value=data.description, error=errors.description, classes=['org-control', 'mandatory','field-with-info']) }} + {{ form.markdown('description', id='field-description', label=_('Description of Organisation'), value=data.description, error=errors.description, classes=['org-control', 'mandatory','field-with-info']) }} <div class="org-control-info-large info-field"> <div class="org-info-label-large"> {{_('Brief overview of what organisation is for.')}}</div>
ARM-DOE__ACT-673
Feedstock failing due to pandas datetime ### Description CI is failing due to datetime units not being set for csv reader ### What I Did See the PR here that was failing https://github.com/conda-forge/act-atmos-feedstock/pull/63
[ { "content": "\"\"\"\nThis module contains I/O operations for loading csv files.\n\n\"\"\"\n\nimport pathlib\n\nimport pandas as pd\n\nfrom .armfiles import check_arm_standards\n\n\ndef read_csv(filename, sep=',', engine='python', column_names=None, skipfooter=0, ignore_index=True, **kwargs):\n\n \"\"\"\n ...
[ { "content": "\"\"\"\nThis module contains I/O operations for loading csv files.\n\n\"\"\"\n\nimport pathlib\n\nimport pandas as pd\n\nfrom .armfiles import check_arm_standards\n\n\ndef read_csv(filename, sep=',', engine='python', column_names=None, skipfooter=0, ignore_index=True, **kwargs):\n\n \"\"\"\n ...
diff --git a/act/io/csvfiles.py b/act/io/csvfiles.py index f0d2fc36a4..32be0668b0 100644 --- a/act/io/csvfiles.py +++ b/act/io/csvfiles.py @@ -75,7 +75,7 @@ def read_csv(filename, sep=',', engine='python', column_names=None, skipfooter=0 # Set Coordinates if there's a variable date_time if 'date_time' in df: - df.date_time = df.date_time.astype('datetime64') + df.date_time = df.date_time.astype('datetime64[ns]') df.time = df.date_time df = df.set_index('time')
rasterio__rasterio-883
Single int indexes param in sample method According to docs the `indexes` param in the `sample` method can be a "list of ints or a single int". However passing a single int raises this exception: `IndexError: too many indices for array`.
[ { "content": "# Workaround for issue #378. A pure Python generator.\n\ndef sample_gen(dataset, xy, indexes=None):\n index = dataset.index\n read = dataset.read\n for x, y in xy:\n r, c = index(x, y)\n window = ((r, r+1), (c, c+1))\n data = read(indexes, window=window, masked=False,...
[ { "content": "# Workaround for issue #378. A pure Python generator.\n\ndef sample_gen(dataset, xy, indexes=None):\n index = dataset.index\n read = dataset.read\n\n if isinstance(indexes, int):\n indexes = [indexes]\n\n for x, y in xy:\n r, c = index(x, y)\n window = ((r, r+1), (...
diff --git a/rasterio/sample.py b/rasterio/sample.py index aad74ad10..bc718c765 100644 --- a/rasterio/sample.py +++ b/rasterio/sample.py @@ -3,6 +3,10 @@ def sample_gen(dataset, xy, indexes=None): index = dataset.index read = dataset.read + + if isinstance(indexes, int): + indexes = [indexes] + for x, y in xy: r, c = index(x, y) window = ((r, r+1), (c, c+1)) diff --git a/tests/test_sampling.py b/tests/test_sampling.py index 6d73737f4..470119744 100644 --- a/tests/test_sampling.py +++ b/tests/test_sampling.py @@ -19,6 +19,12 @@ def test_sampling_indexes(): assert list(data) == [25] +def test_sampling_single_index(): + with rasterio.open('tests/data/RGB.byte.tif') as src: + data = next(src.sample([(220650.0, 2719200.0)], indexes=2)) + assert list(data) == [25] + + def test_sampling_type(): """See https://github.com/mapbox/rasterio/issues/378.""" with rasterio.open('tests/data/RGB.byte.tif') as src:
edgedb__edgedb-2849
ISE: `unimplemented auth method: NoneType` when inserting new user on clean instance <!-- Please search existing issues to avoid creating duplicates. --> - EdgeDB Version: 1-beta3-451baf4 - OS Version: ubuntu 18.04 Steps to Reproduce: 1. initialize new project with new `EdgeDB` instance in docker with `edgedb project init` 2. login into EdgeDB shell using `edgedb` command and create new user with password: ``` CREATE SUPERUSER ROLE edgedb_scram { SET password := 'edgedb_scram_password' }; CONFIGURE INSTANCE INSERT Auth { user := 'edgedb_scram', method := (INSERT SCRAM), priority := 2 }; ``` 3. exit current shell session and try running `edgedb` command again to login into shell ``` $ edgedb edgedb error: Error authenticating: ERROR: InternalServerError: unimplemented auth method: NoneType Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket at https://github.com/edgedb/edgedb/issues/new?template=bug_report.md Server traceback: Traceback (most recent call last): File "edb/server/protocol/binary.pyx", line 1689, in edb.server.protocol.binary.EdgeConnection.main File "edb/server/protocol/binary.pyx", line 445, in auth edb.errors.InternalServerError: unimplemented auth method: NoneType ``` As I understand it, this is because the default user (`edgedb`) created by the EdgeDB bootstrap process is not being added to `cfg::Auth`. This can be verified by selecting the existing `cfg::Auth` objects before inserting a new one: ``` SELECT cfg::Auth { user, method, priority }; ``` The output will be an empty set (`{}`). But in any case, user should not receive such error from the EdgeDB server in case of authentication failure. I would rather expect something like `AuthenticationError: no authentication method configured for the "edgedb" role` or something similar. It's possible I missed something about roles configuration, but that part of EdgeDB is poorly documented right now, IMO.
[ { "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2016-present MagicStack Inc. and the EdgeDB authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy...
[ { "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2016-present MagicStack Inc. and the EdgeDB authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy...
diff --git a/edb/server/server.py b/edb/server/server.py index ace23ca2d02..c848c757f97 100644 --- a/edb/server/server.py +++ b/edb/server/server.py @@ -1191,6 +1191,10 @@ async def get_auth_method(self, user): if match: return auth.method + raise errors.AuthenticationError( + f"no authentication method configured for {user!r} role" + ) + def get_sys_query(self, key): return self._sys_queries[key] diff --git a/tests/test_server_auth.py b/tests/test_server_auth.py index 7db62127245..3ba4f49b2f7 100644 --- a/tests/test_server_auth.py +++ b/tests/test_server_auth.py @@ -158,6 +158,57 @@ async def test_server_auth_01(self): finally: await self.con.query("DROP ROLE bar") + async def test_server_auth_02(self): + try: + await self.con.query(''' + CREATE SUPERUSER ROLE foo { + SET password := 'foo-pass'; + } + ''') + + await self.con.query(''' + CREATE SUPERUSER ROLE bar { + SET password := 'bar-pass'; + } + ''') + + await self.con.query(''' + CONFIGURE INSTANCE INSERT Auth { + comment := 'test-02', + priority := 0, + method := (INSERT SCRAM), + user := 'foo', + } + ''') + + # good password with configured Auth + conn = await self.connect( + user='foo', + password='foo-pass', + ) + await conn.aclose() + + # good password but Auth is not configured + with self.assertRaisesRegex( + edgedb.AuthenticationError, + "no authentication method configured for 'bar' role"): + await self.connect( + user='bar', + password='bar-pass' + ) + finally: + await self.con.query(''' + CONFIGURE INSTANCE RESET Auth FILTER .comment = 'test-02' + ''') + + await self.con.query(''' + DROP ROLE foo; + ''') + + await self.con.query(''' + DROP ROLE bar; + ''') + async def test_long_role_name(self): with self.assertRaisesRegex( edgedb.SchemaDefinitionError,
goauthentik__authentik-5630
SMS Authenticator Setup Stage with generic provider does not work without mapping **Describe the bug** Setting up the stage and flow works but trying to set up an mfa device results in an error after entering the phone number **To Reproduce** Create a SMS Authenticator Setup Stage with a generic provider and without mapping **Expected behavior** sms should be send **Version and Deployment (please complete the following information):** - current main
[ { "content": "\"\"\"SMS Authenticator models\"\"\"\nfrom hashlib import sha256\nfrom typing import Optional\n\nfrom django.contrib.auth import get_user_model\nfrom django.db import models\nfrom django.utils.translation import gettext_lazy as _\nfrom django.views import View\nfrom django_otp.models import SideCh...
[ { "content": "\"\"\"SMS Authenticator models\"\"\"\nfrom hashlib import sha256\nfrom typing import Optional\n\nfrom django.contrib.auth import get_user_model\nfrom django.db import models\nfrom django.utils.translation import gettext_lazy as _\nfrom django.views import View\nfrom django_otp.models import SideCh...
diff --git a/authentik/stages/authenticator_sms/models.py b/authentik/stages/authenticator_sms/models.py index 9f2e117b4bf1..65e842d556f0 100644 --- a/authentik/stages/authenticator_sms/models.py +++ b/authentik/stages/authenticator_sms/models.py @@ -99,7 +99,7 @@ def send_generic(self, token: str, device: "SMSDevice"): "From": self.from_number, "To": device.phone_number, "Body": token, - "Message": self.get_message(token), + "Message": str(self.get_message(token)), } if self.mapping:
pypa__pipenv-5909
documentation is a mix of markdown and restructuredtext ### Issue description documentation is a mix of markdown and restructuredtext, but the [documentation says the documentation is restructuredtext](https://pipenv.pypa.io/en/latest/dev/contributing/#documentation-contributions). I found out commit 761a03d seemingly did a conversion to markdown which did not go all the way to the end. I would like to know what is the pursued direction (markdown + restructuredtext or full markdown), and if the direction is full markdown, try to help. ### Expected result * either the documentation says the documentation is both markdown and restructuredtext * either we clean out one of them (restructuredtext, I guess) ### Actual result mix of both ### Steps to replicate N/A
[ { "content": "#\n# pipenv documentation build configuration file, created by\n# sphinx-quickstart on Mon Jan 30 13:28:36 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\...
[ { "content": "#\n# pipenv documentation build configuration file, created by\n# sphinx-quickstart on Mon Jan 30 13:28:36 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\...
diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..e836f43dd6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,1875 @@ +# 2023.9.1 (2023-09-01) + +# Pipenv 2023.9.1 (2023-09-01) + +## Features & Improvements + +- Top level Pipfile sys_platform markers should be transitive; adds top level platform_machine entries that are also transitive. Marker entries continue to operate the same as before. [#5892](https://github.com/pypa/pipenv/issues/5892) + +## Bug Fixes + +- Apply patch for install_search_all_sources = True functionality. [#5895](https://github.com/pypa/pipenv/issues/5895) +- Relative paths improvements for editable installs. [#5896](https://github.com/pypa/pipenv/issues/5896) +- Set log level in resolver to WARN when verbose is not passed. [#5897](https://github.com/pypa/pipenv/issues/5897) +- Handle more variations in private index html to improve hash collection. [#5898](https://github.com/pypa/pipenv/issues/5898) + +# 2023.8.28 (2023-08-28) + +## Bug Fixes + +- Revert change that caused the credentials in source url issue. [#5878](https://github.com/pypa/pipenv/issues/5878) +- Do not treat named requirements as file installs just becacuse a match path exists; better handling of editable keyword for local file installs. + Handle additional edge cases in the setup.py ast parser logic for trying to determine local install package name. [#5885](https://github.com/pypa/pipenv/issues/5885) + +# 2023.8.26 (2023-08-26) + +## Bug Fixes + +- Additional property caching to avoid duplication of sources in the resolver. [#5863](https://github.com/pypa/pipenv/issues/5863) +- Fix recent regressions with local/editable file installs. [#5870](https://github.com/pypa/pipenv/issues/5870) +- Fixes the vcs subdirectory fragments regression; fixes sys_platform markers regression. [#5871](https://github.com/pypa/pipenv/issues/5871) +- Fix regression that caused printing non-printable ascii characters when help was called. [#5872](https://github.com/pypa/pipenv/issues/5872) + +# 2023.8.25 (2023-08-25) + +## Bug Fixes + +- Fix regression of hash collection when downloading package from private indexes when the hash is not found in the index href url fragment. [#5866](https://github.com/pypa/pipenv/issues/5866) + +# 2023.8.23 (2023-08-22) + +## Bug Fixes + +- More gracefully handle @ symbols in vcs URLs to address recent regression with vcs URLs. [#5849](https://github.com/pypa/pipenv/issues/5849) + +# 2023.8.22 (2023-08-22) + +## Bug Fixes + +- Fix regression with `ssh://` vcs URLs introduced in `2023.8.21` whereby ssh vcs URLs are expected to have at least one `@` symbol. [#5846](https://github.com/pypa/pipenv/issues/5846) + +# 2023.8.21 (2023-08-21) + +## Bug Fixes + +- Add back some relevant caching to increase performance after the major refactor released with `2023.8.19` [#5841](https://github.com/pypa/pipenv/issues/5841) +- Fix some edge cases around vcs dependencies without a ref, and older Pipfile/lockfile formats. [#5843](https://github.com/pypa/pipenv/issues/5843) + +## Vendored Libraries + +- Remove unused command line interface for vendored packages. [#5840](https://github.com/pypa/pipenv/issues/5840) + +# 2023.8.20 (2023-08-20) + +## Bug Fixes + +- Fix the expected output of the `version` command. [#5838](https://github.com/pypa/pipenv/issues/5838) + +# 2023.8.19 (2023-08-19) + +## Features & Improvements + +- The `--categories` option now works with requirements.txt file. [#5722](https://github.com/pypa/pipenv/issues/5722) + +## Bug Fixes + +- Drop requirementslib for managing pip lines and InstallRequirements, bring remaining requirementslib functionality into pipenv. + Fixes numerous reports about extras installs with vcs and file installs; format pip lines correctly to not generate deprecation warnings. [#5793](https://github.com/pypa/pipenv/issues/5793) + +## Vendored Libraries + +- Update pip 23.2 -> 23.2.1 [#5822](https://github.com/pypa/pipenv/issues/5822) + +## Improved Documentation + +- Added documentation on how to move or rename a project directory [#5129](https://github.com/pypa/pipenv/issues/5129) + +## Removals and Deprecations + +- The `--skip-lock` flag which was deprecated, has now been removed to unblock modernizing the pipenv resolver code. [#5805](https://github.com/pypa/pipenv/issues/5805) + +# 2023.7.23 (2023-07-23) + +## Features & Improvements + +- Upgrades `pip==23.2` which includes everything from the pip changelog. Drops the "install_compatatability_finder" pip internals patch. [#5808](https://github.com/pypa/pipenv/issues/5808) + +## Bug Fixes + +- Fix issue parsing some Pipfiles with separate packages.\<pkg> sections (tomlkit OutOfOrderTableProxy) [#5794](https://github.com/pypa/pipenv/issues/5794) +- Fix all ruff linter warnings [#5807](https://github.com/pypa/pipenv/issues/5807) +- Restore running Resolver in sub-process using the project python by default; maintains ability to run directly by setting `PIPENV_RESOLVER_PARENT_PYTHON` environment variable to 1 (useful for internal debugging). [#5809](https://github.com/pypa/pipenv/issues/5809) +- Fix error when a Windows path begins with a '' with `pythonfinder==2.0.5`. [#5812](https://github.com/pypa/pipenv/issues/5812) + +## Vendored Libraries + +- Remove usage of click.secho in some modules. [#5804](https://github.com/pypa/pipenv/issues/5804) + +2023.7.11 (2023-07-11) + +## Bug Fixes + +- Invoke the resolver in the same process as pipenv rather than utilizing subprocess. [#5787](https://github.com/pypa/pipenv/issues/5787) +- Fix regression markers being included as None/null in requirements command. [#5788](https://github.com/pypa/pipenv/issues/5788) + +# 2023.7.9 (2023-07-09) + +## Bug Fixes + +- Drop the --keep-outdated flag and --selective-upgrade flags that have been deprecated in favor of update/upgrade commands. [#5730](https://github.com/pypa/pipenv/issues/5730) +- Fix regressions in the `requirements` command related to standard index extras and handling of local file requirements. [#5784](https://github.com/pypa/pipenv/issues/5784) + +# 2023.7.4 (2023-07-04) + +## Bug Fixes + +- Fixes regression on Pipfile requirements syntax. Ensure default operator is provided to requirement lib to avoid crash. [#5765](https://github.com/pypa/pipenv/issues/5765) +- Ensure hashes included in a generated requirements file are after any markers. [#5777](https://github.com/pypa/pipenv/issues/5777) + +# 2023.7.3 (2023-07-02) + +## Bug Fixes + +- Fix regression with `--system` flag usage. [#5773](https://github.com/pypa/pipenv/issues/5773) + +# 2023.7.1 (2023-07-01) + +## Bug Fixes + +- Patch `_get_requests_session` method to consider `PIP_CLIENT_CERT` value when present. [#5746](https://github.com/pypa/pipenv/issues/5746) +- Fix regression in `requirements` command that was causing package installs after upgrade to `requirementslib==3.0.0`. [#5755](https://github.com/pypa/pipenv/issues/5755) +- Fix `error: invalid command 'egg_info'` edge case with requirementslib 3.0.0. It exposed pipenv resolver sometimes was using a different python than expected. [#5760](https://github.com/pypa/pipenv/issues/5760) +- Fix issue in requirementslib 3.0.0 where dependencies defined in pyproject.toml were not being included in the lock file. [#5766](https://github.com/pypa/pipenv/issues/5766) + +## Removals and Deprecations + +- Bump dparse to 0.6.3 [#5750](https://github.com/pypa/pipenv/issues/5750) + +# 2023.6.26 (2023-06-26) + +## Improved Documentation + +- Add missing environment variable descriptions back to documentation [#missing_env_var_desc](https://github.com/pypa/pipenv/issues/missing_env_var_desc) + +# 2023.6.18 (2023-06-18) + +## Bug Fixes + +- Fixes resolver to only consider the default index for packages when a secondary index is not specified. This brings the code into alignment with stated assumptions about index restricted packages behavior of `pipenv`. [#5737](https://github.com/pypa/pipenv/issues/5737) + +## Removals and Deprecations + +- Deprecation of `--skip-lock` flag as it bypasses the security benefits of pipenv. Plus it lacks proper deterministic support of installation from multiple package indexes. [#5737](https://github.com/pypa/pipenv/issues/5737) + +# 2023.6.12 (2023-06-11) + +## Bug Fixes + +- Remove the `sys.path` modifications and as a result fixes keyring support. [#5719](https://github.com/pypa/pipenv/issues/5719) + +# 2023.6.11 (2023-06-11) + +## Vendored Libraries + +- Upgrades to `pipdeptree==2.8.0` which fixes edge cases of the `pipenv graph` command. [#5720](https://github.com/pypa/pipenv/issues/5720) + +# 2023.6.2 (2023-06-02) + +## Features & Improvements + +- Resolver performance: package sources following PEP 503 will leverage package hashes from the URL fragment, without downloading the package. [#5701](https://github.com/pypa/pipenv/issues/5701) + +## Bug Fixes + +- Improve regex for python versions to handle hidden paths; handle relative paths to python better as well. [#4588](https://github.com/pypa/pipenv/issues/4588) +- Update `pythonfinder==2.0.4` with fix for "RecursionError: maximum recursion depth exceeded". [#5709](https://github.com/pypa/pipenv/issues/5709) + +## Vendored Libraries + +- Drop old vendored toml library. Use stdlib tomllib or tomli instead. [#5678](https://github.com/pypa/pipenv/issues/5678) +- Drop vendored library cerberus. This isn't actually used by pipenv. [#5699](https://github.com/pypa/pipenv/issues/5699) + +# 2023.5.19 (2023-05-19) + +## Bug Fixes + +- Consider `--index` argument in `update` and `upgrade` commands. [#5692](https://github.com/pypa/pipenv/issues/5692) + +## Vendored Libraries + +- Upgrade `pythonfinder==2.0.0` which also brings in `pydantic==1.10.7`. [#5677](https://github.com/pypa/pipenv/issues/5677) + +# 2023.4.29 (2023-04-29) + +## Vendored Libraries + +- Vendor in `pip==23.1.2` latest. [#5671](https://github.com/pypa/pipenv/issues/5671) +- Vendor in `requirementslib==2.3.0` which drops usage of `vistir`. [#5672](https://github.com/pypa/pipenv/issues/5672) + +# 2023.4.20 (2023-04-20) + +## Features & Improvements + +- Checks environment variable `PIP_TRUSTED_HOSTS` when evaluating an + index specified at the command line when adding to `Pipfile`. + + For example, this command line + + ``` + PIP_TRUSTED_HOSTS=internal.mycompany.com pipenv install pypkg --index=https://internal.mycompany.com/pypi/simple + ``` + + will add the following to the `Pipfile`: + + ``` + [[source]] + url = 'https://internal.mycompany.com/pypi/simple' + verify_ssl = false + name = 'Internalmycompany' + + [packages] + pypkg = {version="*", index="Internalmycompany"} + ``` + + This allows users with private indexes to add them to `Pipfile` + initially from command line with correct permissions using environment + variable `PIP_TRUSTED_HOSTS`. [#5572](https://github.com/pypa/pipenv/issues/5572) + +- Vendor in the updates, upgrades and fixes provided by `pip==23.1`. [#5655](https://github.com/pypa/pipenv/issues/5655) + +- Replace flake8 and isort with [ruff](https://beta.ruff.rs). [#ruff](https://github.com/pypa/pipenv/issues/ruff) + +## Bug Fixes + +- Fix regression with `--skip-lock` option with `install` command. [#5653](https://github.com/pypa/pipenv/issues/5653) + +## Vendored Libraries + +- Vendor in latest `python-dotenv==1.0.0` [#5656](https://github.com/pypa/pipenv/issues/5656) +- Vendor in latest available dependencies: `attrs==23.1.0` `click-didyoumean==0.3.0` `click==8.1.3` `markupsafe==2.1.2` `pipdeptree==2.7.0` `shellingham==1.5.0.post1` `tomlkit==0.11.7` [#5657](https://github.com/pypa/pipenv/issues/5657) +- Vendor in latest `requirementslib==2.2.5` which includes updates for pip 23.1 [#5659](https://github.com/pypa/pipenv/issues/5659) + +## Improved Documentation + +- Made documentation clear about tilde-equals operator for package versions. [#5594](https://github.com/pypa/pipenv/issues/5594) + +# 2023.3.20 (2023-03-19) + +No significant changes. + +# 2023.3.18 (2023-03-19) + +## Bug Fixes + +- Fix import error in virtualenv utility for creating new environments caused by `2023.3.18` release. [#5636](https://github.com/pypa/pipenv/issues/5636) + +# 2023.3.18 (2023-03-18) + +## Features & Improvements + +- Provide a more powerful solution than `--keep-outdated` and `--selective-upgrade` which are deprecated for removal. + Introducing the `pipenv upgrade` command which takes the same package specifiers as `pipenv install` and + updates the `Pipfile` and `Pipfile.lock` with a valid lock resolution that only effects the specified packages and their dependencies. + Additionally, the `pipenv update` command has been updated to use the `pipenv upgrade` routine when packages are provided, which will install sync the new lock file as well. [#5617](https://github.com/pypa/pipenv/issues/5617) + +## Vendored Libraries + +- Bump vistir to 0.8.0, requirementslib to 2.2.4. [#5635](https://github.com/pypa/pipenv/issues/5635) + +# 2023.2.18 (2023-02-18) + +## Features & Improvements + +- `pipenv` now reads the system `pip.conf` or `pip.ini` file in order to determine pre-defined indexes to use for package resolution and installation. [#5297](https://github.com/pypa/pipenv/issues/5297) +- Behavior change for `pipenv check` now checks the default packages group of the lockfile. + Specifying `--categories` to override which categories to check against. + Pass `--use-installed` to get the prior behavior of checking the packages actually installed into the environment. [#5600](https://github.com/pypa/pipenv/issues/5600) + +## Bug Fixes + +- Fix regression with detection of `CI` env variable being set to something other than a truthy value. [#5554](https://github.com/pypa/pipenv/issues/5554) +- Fix `--categories` argument inconsistency between requirements command and install/sync by allowing comma separated values or spaces. [#5570](https://github.com/pypa/pipenv/issues/5570) +- Use Nushell overlays when running `pipenv shell`. [#5603](https://github.com/pypa/pipenv/issues/5603) + +## Vendored Libraries + +- Vendor in the `pip==23.0` release. [#5586](https://github.com/pypa/pipenv/issues/5586) +- Vendor in `pip==23.0.1` minor pt release. Updates `pythonfinder==1.3.2`. [#5614](https://github.com/pypa/pipenv/issues/5614) + +## Improved Documentation + +- Make some improvements to the contributing guide. [#5611](https://github.com/pypa/pipenv/issues/5611) + +# 2023.2.4 (2023-02-04) + +## Bug Fixes + +- Fix overwriting of output in verbose mode [#5530](https://github.com/pypa/pipenv/issues/5530) +- Fix for resolution error when direct url includes an extras. [#5536](https://github.com/pypa/pipenv/issues/5536) + +## Removals and Deprecations + +- Remove pytest-pypi package since it's not used anymore [#5556](https://github.com/pypa/pipenv/issues/5556) +- Remove deprecated --three flag from the CLI. [#5576](https://github.com/pypa/pipenv/issues/5576) + +# 2022.12.19 (2022-12-19) + +## Bug Fixes + +- Fix for `requirementslib` hanging during install of remote wheels files. [#5546](https://github.com/pypa/pipenv/issues/5546) + +# 2022.12.17 (2022-12-17) + +## Bug Fixes + +- virtualenv creation no longer uses `--creator=venv` by default; introduced two environment variables: + `PIPENV_VIRTUALENV_CREATOR` -- May be specified to instruct virtualenv which `--creator=` to use. + `PIPENV_VIRTUALENV_COPIES` -- When specified as truthy, instructs virtualenv to not use symlinks. [#5477](https://github.com/pypa/pipenv/issues/5477) +- Fix regression where `path` is not propagated to the `Pipfile.lock`. [#5479](https://github.com/pypa/pipenv/issues/5479) +- Solve issue where null markers were getting added to lock file when extras were provided. [#5486](https://github.com/pypa/pipenv/issues/5486) +- Fix: `update --outdated` raises NonExistentKey with outdated dev packages [#5540](https://github.com/pypa/pipenv/issues/5540) + +## Vendored Libraries + +- Vendor in `pip==22.3.1` which is currently the latest version of `pip`. [#5520](https://github.com/pypa/pipenv/issues/5520) +- - Bump version of requirementslib to 2.2.1 + - Bump version of vistir to 0.7.5 + - Bump version of colorama to 0.4.6 [#5522](https://github.com/pypa/pipenv/issues/5522) +- Bump plette version to 0.4.4 [#5539](https://github.com/pypa/pipenv/issues/5539) + +# 2022.11.30 (2022-11-30) + +## Bug Fixes + +- Fix regression: pipenv does not sync indexes to lockfile. [#5508](https://github.com/pypa/pipenv/issues/5508) + +# 2022.11.25 (2022-11-24) + +## Bug Fixes + +- Solving issue where `pipenv check` command has been broken in the published wheel distribution. [#5493](https://github.com/pypa/pipenv/issues/5493) + +# 2022.11.24 (2022-11-24) + +## Bug Fixes + +- Stop building universal wheels since Python 2 is no longer supported. [#5496](https://github.com/pypa/pipenv/issues/5496) + +# 2022.11.23 (2022-11-23) + +## Features & Improvements + +- Find nushell activate scripts. [#5470](https://github.com/pypa/pipenv/issues/5470) + +## Vendored Libraries + +- - Drop unused code from cerberus + - Drop unused module wheel [#5467](https://github.com/pypa/pipenv/issues/5467) +- - Replace yaspin spinner with rich spinner. + - Bump vistir version to 0.7.4 [#5468](https://github.com/pypa/pipenv/issues/5468) +- Bump version of requirementslib to 2.2.0 + Drop yaspin which is no longer used. + Bump vistir to version 0.7.4 + Remove parse. + Remove termcolor. + Remove idna. [#5481](https://github.com/pypa/pipenv/issues/5481) + +# 2022.11.11 (2022-11-11) + +## Bug Fixes + +- Fix regression of lock generation that caused the keep-outdated behavior to be default. [#5456](https://github.com/pypa/pipenv/issues/5456) + +# 2022.11.5 (2022-11-05) + +## Bug Fixes + +- Rollback the change in version of `colorama` due to regressions in core functionality. [#5459](https://github.com/pypa/pipenv/issues/5459) + +# 2022.11.4 (2022-11-04) + +## Features & Improvements + +- Allow pipenv settings to be explicitly disabled more easily by assigning to the environment variable a falsy value. [#5451](https://github.com/pypa/pipenv/issues/5451) + +## Bug Fixes + +- Provide an install iteration per index when `install_search_all_sources` is `false` (default behavior). + This fixes regression where install phase was using unexpected index after updating `pip==22.3` [#5444](https://github.com/pypa/pipenv/issues/5444) + +## Vendored Libraries + +- Drop tomli, which is not used anymore. + Bump attrs version see #5449. + Drop distlib, colorama and platformdirs - use the ones from pip.\_vendor. [#5450](https://github.com/pypa/pipenv/issues/5450) + +# 2022.10.25 (2022-10-25) + +## Features & Improvements + +- Add support to export requirements file for a specified set of categories. [#5431](https://github.com/pypa/pipenv/issues/5431) + +## Vendored Libraries + +- Remove appdirs.py in favor of platformdirs. [#5420](https://github.com/pypa/pipenv/issues/5420) + +## Removals and Deprecations + +- Remove usage of vistir.cmdparse in favor of pipenv.cmdparse [#5419](https://github.com/pypa/pipenv/issues/5419) + +# 2022.10.12 (2022-10-12) + +## Improved Documentation + +- Update pipenv docs for with example for callabale package functions in Pipfile scripts [#5396](https://github.com/pypa/pipenv/issues/5396) + +# 2022.10.11 (2022-10-11) + +## Bug Fixes + +- Revert decision to change the default isolation level because it caused problems with existing workflows; solution is to recommend users that have issues requiring pre-requisites to pass --extra-pip-args="--no-build-isolation" in their install or sync commands. [#5399](https://github.com/pypa/pipenv/issues/5399) + +# 2022.10.10 (2022-10-10) + +## Features & Improvements + +- Add ability for callable scripts in Pipfile under \[scripts\]. Callables can now be added like: `<pathed.module>:<func>` and can also take arguments. For example: `func = {call = "package.module:func('arg1', 'arg2')"}` then this can be activated in the shell with `pipenv run func` [#5294](https://github.com/pypa/pipenv/issues/5294) + +## Bug Fixes + +- Fixes regression from `2022.10.9` where `Pipfile` with `pipenv` section began generating new hash, + and also fix regression where lock phase did not update the hash value. [#5394](https://github.com/pypa/pipenv/issues/5394) + +# 2022.10.9 (2022-10-09) + +## Behavior Changes + +- New pipfiles show python_full_version under \[requires\] if specified. Previously creating a new pipenv project would only specify in the Pipfile the major and minor version, i.e. "python_version = 3.7". Now if you create a new project with a fully named python version it will record both in the Pipfile. So: "python_version = 3.7" and "python_full_version = 3.7.2" [#5345](https://github.com/pypa/pipenv/issues/5345) + +## Relates to dev process changes + +- Silence majority of pytest.mark warnings by registering custom marks. Can view a list of custom marks by running `pipenv run pytest --markers` + +# 2022.10.4 (2022-10-04) + +## Bug Fixes + +- Use `--creator=venv` when creating virtual environments to avoid issue with sysconfig `posix_prefix` on some systems. [#5075](https://github.com/pypa/pipenv/issues/5075) +- Prefer to use the lockfile sources if available during the install phase. [#5380](https://github.com/pypa/pipenv/issues/5380) + +## Vendored Libraries + +- Drop vendored six - we no longer depend on this library, as we migrated from pipfile to plette. [#5187](https://github.com/pypa/pipenv/issues/5187) + +# 2022.9.24 (2022-09-24) + +## Bug Fixes + +- Update `requirementslib==2.0.3` to always evaluate the requirement markers fresh (without lru_cache) to fix marker determinism issue. [#4660](https://github.com/pypa/pipenv/issues/4660) + +# 2022.9.21 (2022-09-21) + +## Bug Fixes + +- Fix regression to `install --skip-lock` with update to `plette`. [#5368](https://github.com/pypa/pipenv/issues/5368) + +# 2022.9.20 (2022-09-20) + +## Behavior Changes + +- Remove usage of pipfile module in favour of Plette. + pipfile is not actively maintained anymore. Plette is actively maintained, + and has stricter checking of the Pipefile and Pipefile.lock. As a result, + Pipefile with unnamed package indices will fail to lock. If a Pipefile + was hand crafeted, and the source is anonymous an error will be thrown. + The solution is simple, add a name to your index, e.g, replace: + + ``` + [[source]] + url = "https://pypi.acme.com/simple" + verify_ssl = true + ``` + + With: + + ``` + [[source]] + url = "https://pypi.acme.com/simple" + verify_ssl = true + name = acmes_private_index `#5339 <https://github.com/pypa/pipenv/issues/5339>`_ + ``` + +## Bug Fixes + +- Modernize `pipenv` path patch with `importlib.util` to eliminate import of `pkg_resources` [#5349](https://github.com/pypa/pipenv/issues/5349) + +## Vendored Libraries + +- Remove iso8601 from vendored packages since it was not used. [#5346](https://github.com/pypa/pipenv/issues/5346) + +# 2022.9.8 (2022-09-08) + +## Features & Improvements + +- It is now possible to supply additional arguments to `pip` install by supplying `--extra-pip-args="<arg1> <arg2>"` + See the updated documentation `Supplying additional arguments to pip` for more details. [#5283](https://github.com/pypa/pipenv/issues/5283) + +## Bug Fixes + +- Make editable detection better because not everyone specifies editable entry in the Pipfile for local editable installs. [#4784](https://github.com/pypa/pipenv/issues/4784) +- Add error handling for when the installed package setup.py does not contain valid markers. [#5329](https://github.com/pypa/pipenv/issues/5329) +- Load the dot env earlier so that `PIPENV_CUSTOM_VENV_NAME` is more useful across projects. [#5334](https://github.com/pypa/pipenv/issues/5334) + +## Vendored Libraries + +- Bump version of shellingham to support nushell. [#5336](https://github.com/pypa/pipenv/issues/5336) +- Bump plette to version v0.3.0 [#5337](https://github.com/pypa/pipenv/issues/5337) +- Bump version of pipdeptree [#5343](https://github.com/pypa/pipenv/issues/5343) + +## Removals and Deprecations + +- Add deprecation warning to the --three flag. Pipenv now uses python3 by default. [#5328](https://github.com/pypa/pipenv/issues/5328) + +## Relates to dev process changes + +- Convert the test runner to use `pypiserver` as a standalone process for all tests that referencce internal `pypi` artifacts. + General refactoring of some test cases to create more variety in packages selected--preferring lighter weight packages--in existing test cases. + +# 2022.9.4 (2022-09-04) + +## Bug Fixes + +- Fix the issue from `2022.9.2` where tarball URL packages were being skipped on batch_install. [#5306](https://github.com/pypa/pipenv/issues/5306) + +# 2022.9.2 (2022-09-02) + +## Bug Fixes + +- Fix issue where unnamed constraints were provided but which are not allowed by `pip` resolver. [#5273](https://github.com/pypa/pipenv/issues/5273) + +# 2022.8.31 (2022-08-31) + +## Features & Improvements + +- Performance optimization to `batch_install` results in a faster and less CPU intensive `pipenv sync` or `pipenv install` experience. [#5301](https://github.com/pypa/pipenv/issues/5301) + +## Bug Fixes + +- `pipenv` now uses a `NamedTemporaryFile` for rsolver constraints and drops internal env var `PIPENV_PACKAGES`. [#4925](https://github.com/pypa/pipenv/issues/4925) + +## Removals and Deprecations + +- Remove no longer used method `which_pip`. [#5314](https://github.com/pypa/pipenv/issues/5314) +- Drop progress bar file due to recent performance optimization to combine `batch_install` requirements in at most two invocations of `pip install`. + To see progress of install pass `--verbose` flag and `pip` progress will be output in realtime. [#5315](https://github.com/pypa/pipenv/issues/5315) + +# 2022.8.30 (2022-08-30) + +## Bug Fixes + +- Fix an issue when using `pipenv install --system` on systems that having the `python` executable pointing to Python 2 and a Python 3 executable being `python3`. [#5296](https://github.com/pypa/pipenv/issues/5296) +- Sorting `constraints` before resolving, which fixes `pipenv lock` generates nondeterminism environment markers. [#5299](https://github.com/pypa/pipenv/issues/5299) +- Fix #5273, use our own method for checking if a package is a valid constraint. [#5309](https://github.com/pypa/pipenv/issues/5309) + +## Vendored Libraries + +- Vendor in `requirementslib==2.0.1` which fixes issue with local install not marked editable, and vendor in `vistir==0.6.1` which drops python2 support. + Drops `orderedmultidict` from vendoring. [#5308](https://github.com/pypa/pipenv/issues/5308) + +# 2022.8.24 (2022-08-24) + +## Bug Fixes + +- Remove eager and unnecessary importing of `setuptools` and `pkg_resources` to avoid conflict upgrading `setuptools`. + Roll back `sysconfig` patch of `pip` because it was problematic for some `--system` commands. [#5228](https://github.com/pypa/pipenv/issues/5228) + +## Vendored Libraries + +- Vendor in `requirementslib==2.0.0` and drop `pip-shims` entirely. [#5228](https://github.com/pypa/pipenv/issues/5228) +- Vendor in `pythonfinder==1.3.1` [#5292](https://github.com/pypa/pipenv/issues/5292) + +# 2022.8.19 (2022-08-19) + +## Bug Fixes + +- Fix issue where resolver is provided with `install_requires` constraints from `setup.py` that depend on editable dependencies and could not resolve them. [#5271](https://github.com/pypa/pipenv/issues/5271) +- Fix for `pipenv lock` fails for packages with extras as of `2022.8.13`. [#5274](https://github.com/pypa/pipenv/issues/5274) +- Revert the exclusion of `BAD_PACKAGES` from `batch_install` in order for `pipenv` to install specific versions of `setuptools`. + To prevent issue upgrading `setuptools` this patches `_USE_SYSCONFIG_DEFAULT` to use `sysconfig` for `3.7` and above whereas `pip` default behavior was `3.10` and above. [#5275](https://github.com/pypa/pipenv/issues/5275) + +# 2022.8.17 (2022-08-17) + +## Bug Fixes + +- Fix "The Python interpreter can't be found" error when running `pipenv install --system` with a python3 but no python. [#5261](https://github.com/pypa/pipenv/issues/5261) +- Revise pip import patch to include only `pipenv` from site-packages and removed `--ignore-installed` argument from pip install in order to fix regressions with `--use-site-packages`. [#5265](https://github.com/pypa/pipenv/issues/5265) + +# 2022.8.15 (2022-08-15) + +## Bug Fixes + +- `pip_install` method was using a different way of finding the python executable than other `pipenv` commands, which caused an issue with skipping package installation if it was already installed in site-packages. [#5254](https://github.com/pypa/pipenv/issues/5254) + +# 2022.8.14 (2022-08-14) + +## Bug Fixes + +- Removed `packaging` library from `BAD_PACKAGES` constant to allow it to be installed, which fixes regression from `pipenv==2022.8.13`. [#5247](https://github.com/pypa/pipenv/issues/5247) + +# 2022.8.13 (2022-08-13) + +## Bug Fixes + +- If environment variable `CI` or `TF_BUILD` is set but does not evaluate to `False` it is now treated as `True`. [#5128](https://github.com/pypa/pipenv/issues/5128) +- Fix auto-complete crashing on 'install' and 'uninstall' keywords [#5214](https://github.com/pypa/pipenv/issues/5214) +- Address remaining `pipenv` commands that were still referencing the user or system installed `pip` to use the vendored `pip` internal to `pipenv`. [#5229](https://github.com/pypa/pipenv/issues/5229) +- Use `packages` as constraints when locking `dev-packages` in Pipfile. + Use `packages` as constraints when installing new `dev-packages`. [#5234](https://github.com/pypa/pipenv/issues/5234) + +## Vendored Libraries + +- Vendor in minor `pip` update `22.2.2` [#5230](https://github.com/pypa/pipenv/issues/5230) + +## Improved Documentation + +- Add documentation for environment variables the configure pipenv. [#5235](https://github.com/pypa/pipenv/issues/5235) + +## Removals and Deprecations + +- The deprecated way of generating requirements `install -r` or `lock -r` has been removed in favor of the `pipenv requirements` command. [#5200](https://github.com/pypa/pipenv/issues/5200) + +# 2022.8.5 (2022-08-05) + +## Features & Improvements + +- support PIPENV_CUSTOM_VENV_NAME to be the venv name if specified, update relevant docs. [#4974](https://github.com/pypa/pipenv/issues/4974) + +## Bug Fixes + +- Remove usages of `pip_shims` from the non vendored `pipenv` code, but retain initialization for `requirementslib` still has usages. [#5204](https://github.com/pypa/pipenv/issues/5204) +- Fix case sensitivity of color name `red` in exception when getting hashes from pypi in `_get_hashes_from_pypi`. [#5206](https://github.com/pypa/pipenv/issues/5206) +- Write output from `subprocess_run` directly to `stdout` instead of creating temporary file. + Remove deprecated `distutils.sysconfig`, use `sysconfig`. [#5210](https://github.com/pypa/pipenv/issues/5210) + +## Vendored Libraries + +- - Rename patched `notpip` to `pip` in order to be clear that its a patched version of pip. + - Remove the part of \_post_pip_import.patch that overrode the standalone pip to be the user installed pip, now we fully rely on our vendored and patched `pip`, even for all types of installs. + - Vendor in the next newest version of `pip==22.2` + - Modify patch for `pipdeptree` to not use `pip-shims` [#5188](https://github.com/pypa/pipenv/issues/5188) + - Remove vendored `urllib3` in favor of using it from vendored version in `pip._vendor` [#5215](https://github.com/pypa/pipenv/issues/5215) + +## Removals and Deprecations + +- Remove tests that have been for a while been marked skipped and are no longer relevant. [#5165](https://github.com/pypa/pipenv/issues/5165) + +# 2022.7.24 (2022-07-24) + +## Bug Fixes + +- Re-enabled three installs tests again on the Windows CI as recent refactor work has fixed them. [#5064](https://github.com/pypa/pipenv/issues/5064) +- Support ANSI `NO_COLOR` environment variable and deprecate `PIPENV_COLORBLIND` variable, which will be removed after this release. [#5158](https://github.com/pypa/pipenv/issues/5158) +- Fixed edge case where a non-editable file, url or vcs would overwrite the value `no_deps` for all other requirements in the loop causing a retry condition. [#5164](https://github.com/pypa/pipenv/issues/5164) +- Vendor in latest `requirementslib` for fix to lock when using editable VCS module with specific `@` git reference. [#5179](https://github.com/pypa/pipenv/issues/5179) + +## Vendored Libraries + +- Remove crayons and replace with click.secho and click.styles per <https://github.com/pypa/pipenv/issues/3741> [#3741](https://github.com/pypa/pipenv/issues/3741) +- Vendor in latest version of `pip==22.1.2` which upgrades `pipenv` from `pip==22.0.4`. + Vendor in latest version of `requirementslib==1.6.7` which includes a fix for tracebacks on encountering Annotated variables. + Vendor in latest version of `pip-shims==0.7.3` such that imports could be rewritten to utilize `packaging` from vendor'd `pip`. + Drop the `packaging` requirement from the `vendor` directory in `pipenv`. [#5147](https://github.com/pypa/pipenv/issues/5147) +- Remove unused vendored dependency `normailze-charset`. [#5161](https://github.com/pypa/pipenv/issues/5161) +- Remove obsolete package `funcsigs`. [#5168](https://github.com/pypa/pipenv/issues/5168) +- Bump vendored dependency `pyparsing==3.0.9`. [#5170](https://github.com/pypa/pipenv/issues/5170) + +# 2022.7.4 (2022-07-04) + +## Behavior Changes + +- Adjust `pipenv requirements` to add markers and add an `--exclude-markers` option to allow the exclusion of markers. [#5092](https://github.com/pypa/pipenv/issues/5092) + +## Bug Fixes + +- Stopped expanding environment variables when using `pipenv requirements` [#5134](https://github.com/pypa/pipenv/issues/5134) + +## Vendored Libraries + +- Depend on `requests` and `certifi` from vendored `pip` and remove them as explicit vendor dependencies. [#5000](https://github.com/pypa/pipenv/issues/5000) +- Vendor in the latest version of `requirementslib==1.6.5` which includes bug fixes for beta python versions, projects with an at sign (@) in the path, and a `setuptools` deprecation warning. [#5132](https://github.com/pypa/pipenv/issues/5132) + +## Relates to dev process changes + +- Switch from using type comments to type annotations. + +# 2022.5.3.dev0 (2022-06-07) + +## Bug Fixes + +- Adjust pipenv to work with the newly added `venv` install scheme in Python. + First check if `venv` is among the available install schemes, and use it if it is. Otherwise fall back to the `nt` or `posix_prefix` install schemes as before. This should produce no change for environments where the install schemes were not redefined. [#5096](https://github.com/pypa/pipenv/issues/5096) + +# 2022.5.2 (2022-05-02) + +## Bug Fixes + +- Fixes issue of `pipenv lock -r` command printing to stdout instead of stderr. [#5091](https://github.com/pypa/pipenv/issues/5091) + +# 2022.4.30 (2022-04-30) + +## Bug Fixes + +- Fixes issue of `requirements` command problem by modifying to print `-e` and path of the editable package. [#5070](https://github.com/pypa/pipenv/issues/5070) +- Revert specifier of `setuptools` requirement in `setup.py` back to what it was in order to fix `FileNotFoundError: [Errno 2]` issue report. [#5075](https://github.com/pypa/pipenv/issues/5075) +- Fixes issue of requirements command where git requirements cause the command to fail, solved by using existing convert_deps_to_pip function. [#5076](https://github.com/pypa/pipenv/issues/5076) + +## Vendored Libraries + +- Vendor in `requirementslib==1.6.4` to Fix `SetuptoolsDeprecationWarning` `setuptools.config.read_configuration` became deprecated. [#5081](https://github.com/pypa/pipenv/issues/5081) + +## Removals and Deprecations + +- Remove more usage of misc functions of vistir. Many of this function are available in the STL or in another dependency of pipenv. [#5078](https://github.com/pypa/pipenv/issues/5078) + +# 2022.4.21 (2022-04-21) + +## Removals and Deprecations + +- Updated setup.py to remove support for python 3.6 from built `pipenv` packages' Metadata. [#5065](https://github.com/pypa/pipenv/issues/5065) + +# 2022.4.20 (2022-04-20) + +## Features & Improvements + +- Added new Pipenv option `install_search_all_sources` that allows installation of packages from an + existing `Pipfile.lock` to search all defined indexes for the constrained package version and hash signatures. [#5041](https://github.com/pypa/pipenv/issues/5041) + +## Bug Fixes + +- allow the user to disable the `no_input` flag, so the use of e.g Google Artifact Registry is possible. [#4706](https://github.com/pypa/pipenv/issues/4706) +- Fixes case where packages could fail to install and the exit code was successful. [#5031](https://github.com/pypa/pipenv/issues/5031) + +## Vendored Libraries + +- Updated vendor version of `pip` from `21.2.2` to `22.0.4` which fixes a number of bugs including + several reports of pipenv locking for an infinite amount of time when using certain package constraints. + This also drops support for python 3.6 as it is EOL and support was removed in pip 22.x [#4995](https://github.com/pypa/pipenv/issues/4995) + +## Removals and Deprecations + +- Removed the vendor dependency `more-itertools` as it was originally added for `zipp`, which since stopped using it. [#5044](https://github.com/pypa/pipenv/issues/5044) +- Removed all usages of `pipenv.vendor.vistir.compat.fs_str`, since this function was used for PY2-PY3 compatibility and is no longer needed. [#5062](https://github.com/pypa/pipenv/issues/5062) + +## Relates to dev process changes + +- Added pytest-cov and basic configuration to the project for generating html testing coverage reports. +- Make all CI jobs run only after the lint stage. Also added a makefile target for vendoring the packages. + +# 2022.4.8 (2022-04-08) + +## Features & Improvements + +- Implements a `pipenv requirements` command which generates a requirements.txt compatible output without locking. [#4959](https://github.com/pypa/pipenv/issues/4959) +- Internal to pipenv, the utils.py was split into a utils module with unused code removed. [#4992](https://github.com/pypa/pipenv/issues/4992) + +## Bug Fixes + +- Pipenv will now ignore `.venv` in the project when `PIPENV_VENV_IN_PROJECT` variable is False. + Unset variable maintains the existing behavior of preferring to use the project's `.venv` should it exist. [#2763](https://github.com/pypa/pipenv/issues/2763) +- Fix an edge case of hash collection in index restricted packages whereby the hashes for some packages would + be missing from the `Pipfile.lock` following package index restrictions added in `pipenv==2022.3.23`. [#5023](https://github.com/pypa/pipenv/issues/5023) + +## Improved Documentation + +- Pipenv CLI documentation generation has been fixed. It had broke when `click` was vendored into the project in + `2021.11.9` because by default `sphinx-click` could no longer determine the CLI inherited from click. [#4778](https://github.com/pypa/pipenv/issues/4778) +- Improve documentation around extra indexes and index restricted packages. [#5022](https://github.com/pypa/pipenv/issues/5022) + +## Removals and Deprecations + +- Removes the optional `install` argument `--extra-index-url` as it was not compatible with index restricted packages. + Using the `--index` argument is the correct way to specify a package should be pulled from the non-default index. [#5022](https://github.com/pypa/pipenv/issues/5022) + +## Relates to dev process changes + +- Added code linting using pre-commit-hooks, black, flake8, isort, pygrep-hooks, news-fragments and check-manifest. + Very similar to pip's configuration; adds a towncrier new's type `process` for change to Development processes. + +# 2022.3.28 (2022-03-27) + +## Bug Fixes + +- Environment variables were not being loaded when the `--quiet` flag was set [#5010](https://github.com/pypa/pipenv/issues/5010) +- It would appear that `requirementslib` was not fully specifying the subdirectory to `build_pep517` and + and when a new version of `setuptools` was released, the test `test_lock_nested_vcs_direct_url` + broke indicating the Pipfile.lock no longer contained the extra dependencies that should have been resolved. + This regression affected `pipenv>=2021.11.9` but has been fixed by a patch to `requirementslib`. [#5019](https://github.com/pypa/pipenv/issues/5019) + +## Vendored Libraries + +- Vendor in pip==21.2.4 (from 21.2.2) in order to bring in requested bug fix for python3.6. Note: support for 3.6 will be dropped in a subsequent release. [#5008](https://github.com/pypa/pipenv/issues/5008) + +# 2022.3.24 (2022-03-23) + +## Features & Improvements + +- It is now possible to silence the `Loading .env environment variables` message on `pipenv run` + with the `--quiet` flag or the `PIPENV_QUIET` environment variable. [#4027](https://github.com/pypa/pipenv/issues/4027) + +## Bug Fixes + +- Fixes issue with new index safety restriction, whereby an unnamed extra sources index + caused and error to be thrown during install. [#5002](https://github.com/pypa/pipenv/issues/5002) +- The text `Loading .env environment variables...` has been switched back to stderr as to not + break requirements.txt generation. Also it only prints now when a `.env` file is actually present. [#5003](https://github.com/pypa/pipenv/issues/5003) + +# 2022.3.23 (2022-03-22) + +## Features & Improvements + +- Use environment variable `PIPENV_SKIP_LOCK` to control the behaviour of lock skipping. [#4797](https://github.com/pypa/pipenv/issues/4797) +- New CLI command `verify`, checks the Pipfile.lock is up-to-date [#4893](https://github.com/pypa/pipenv/issues/4893) + +## Behavior Changes + +- Pattern expansion for arguments was disabled on Windows. [#4935](https://github.com/pypa/pipenv/issues/4935) + +## Bug Fixes + +- Python versions on Windows can now be installed automatically through pyenv-win [#4525](https://github.com/pypa/pipenv/issues/4525) +- Patched our vendored Pip to fix: Pipenv Lock (Or Install) Does Not Respect Index Specified For A Package. [#4637](https://github.com/pypa/pipenv/issues/4637) +- If `PIP_TARGET` is set to environment variables, Refer specified directory for calculate delta, instead default directory [#4775](https://github.com/pypa/pipenv/issues/4775) +- Remove remaining mention of python2 and --two flag from codebase. [#4938](https://github.com/pypa/pipenv/issues/4938) +- Use `CI` environment value, over mere existence of name [#4944](https://github.com/pypa/pipenv/issues/4944) +- Environment variables from dot env files are now properly expanded when included in scripts. [#4975](https://github.com/pypa/pipenv/issues/4975) + +## Vendored Libraries + +- Updated vendor version of `pythonfinder` from `1.2.9` to `1.2.10` which fixes a bug with WSL + (Windows Subsystem for Linux) when a path can not be read and Permission Denied error is encountered. [#4976](https://github.com/pypa/pipenv/issues/4976) + +## Removals and Deprecations + +- Removes long broken argument `--code` from `install` and `--unused` from `check`. + Check command no longer takes in arguments to ignore. + Removed the vendored dependencies: `pipreqs` and `yarg` [#4998](https://github.com/pypa/pipenv/issues/4998) + +# 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) + +# 2020.8.13 (2020-08-13) + +## Bug Fixes + +- Fixed behaviour of `pipenv uninstall --all-dev`. + From now on it does not uninstall regular packages. [#3722](https://github.com/pypa/pipenv/issues/3722) +- Fix a bug that incorrect Python path will be used when `--system` flag is on. [#4315](https://github.com/pypa/pipenv/issues/4315) +- Fix falsely flagging a Homebrew installed Python as a virtual environment [#4316](https://github.com/pypa/pipenv/issues/4316) +- Fix a bug that `pipenv uninstall` throws an exception that does not exist. [#4321](https://github.com/pypa/pipenv/issues/4321) +- Fix a bug that Pipenv can't locate the correct file of special directives in `setup.cfg` of an editable package. [#4335](https://github.com/pypa/pipenv/issues/4335) +- Fix a bug that `setup.py` can't be parsed correctly when the assignment is type-annotated. [#4342](https://github.com/pypa/pipenv/issues/4342) +- Fix a bug that `pipenv graph` throws an exception that PipenvCmdError(cmd_string, c.out, c.err, return_code). [#4388](https://github.com/pypa/pipenv/issues/4388) +- Do not copy the whole directory tree of local file package. [#4403](https://github.com/pypa/pipenv/issues/4403) +- Correctly detect whether Pipenv in run under an activated virtualenv. [#4412](https://github.com/pypa/pipenv/issues/4412) + +## Vendored Libraries + +- Update `requirementslib` to `1.5.12`. [#4385](https://github.com/pypa/pipenv/issues/4385) +- - Update `requirements` to `1.5.13`. + - Update `pip-shims` to `0.5.3`. [#4421](https://github.com/pypa/pipenv/issues/4421) + +# 2020.6.2 (2020-06-02) + +## Features & Improvements + +- Pipenv will now detect existing `venv` and `virtualenv` based virtual environments more robustly. [#4276](https://github.com/pypa/pipenv/issues/4276) + +## Bug Fixes + +- `+` signs in URL authentication fragments will no longer be incorrectly replaced with space ( \`\` \`\` ) characters. [#4271](https://github.com/pypa/pipenv/issues/4271) +- Fixed a regression which caused Pipenv to fail when running under `/`. [#4273](https://github.com/pypa/pipenv/issues/4273) +- `setup.py` files with `version` variables read from `os.environ` are now able to be parsed successfully. [#4274](https://github.com/pypa/pipenv/issues/4274) +- Fixed a bug which caused Pipenv to fail to install packages in a virtual environment if those packages were already present in the system global environment. [#4276](https://github.com/pypa/pipenv/issues/4276) +- Fix a bug that caused non-specific versions to be pinned in `Pipfile.lock`. [#4278](https://github.com/pypa/pipenv/issues/4278) +- Corrected a missing exception import and invalid function call invocations in `pipenv.cli.command`. [#4286](https://github.com/pypa/pipenv/issues/4286) +- Fixed an issue with resolving packages with names defined by function calls in `setup.py`. [#4292](https://github.com/pypa/pipenv/issues/4292) +- Fixed a regression with installing the current directory, or `.`, inside a `venv` based virtual environment. [#4295](https://github.com/pypa/pipenv/issues/4295) +- Fixed a bug with the discovery of python paths on Windows which could prevent installation of environments during `pipenv install`. [#4296](https://github.com/pypa/pipenv/issues/4296) +- Fixed an issue in the `requirementslib` AST parser which prevented parsing of `setup.py` files for dependency metadata. [#4298](https://github.com/pypa/pipenv/issues/4298) +- Fix a bug where Pipenv doesn't realize the session is interactive [#4305](https://github.com/pypa/pipenv/issues/4305) + +## Vendored Libraries + +- Updated requirementslib to version `1.5.11`. [#4292](https://github.com/pypa/pipenv/issues/4292) +- Updated vendored dependencies: + : - **pythonfinder**: `1.2.2` => `1.2.4` + - **requirementslib**: `1.5.9` => `1.5.10` [#4302](https://github.com/pypa/pipenv/issues/4302) + +# 2020.5.28 (2020-05-28) + +## Features & Improvements + +- `pipenv install` and `pipenv sync` will no longer attempt to install satisfied dependencies during installation. [#3057](https://github.com/pypa/pipenv/issues/3057), + [#3506](https://github.com/pypa/pipenv/issues/3506) + +- Added support for resolution of direct-url dependencies in `setup.py` files to respect `PEP-508` style URL dependencies. [#3148](https://github.com/pypa/pipenv/issues/3148) + +- Added full support for resolution of all dependency types including direct URLs, zip archives, tarballs, etc. + + - Improved error handling and formatting. + - Introduced improved cross platform stream wrappers for better `stdout` and `stderr` consistency. [#3298](https://github.com/pypa/pipenv/issues/3298) + +- For consistency with other commands and the `--dev` option + description, `pipenv lock --requirements --dev` now emits + both default and development dependencies. + The new `--dev-only` option requests the previous + behaviour (e.g. to generate a `dev-requirements.txt` file). [#3316](https://github.com/pypa/pipenv/issues/3316) + +- Pipenv will now successfully recursively lock VCS sub-dependencies. [#3328](https://github.com/pypa/pipenv/issues/3328) + +- Added support for `--verbose` output to `pipenv run`. [#3348](https://github.com/pypa/pipenv/issues/3348) + +- Pipenv will now discover and resolve the intrinsic dependencies of **all** VCS dependencies, whether they are editable or not, to prevent resolution conflicts. [#3368](https://github.com/pypa/pipenv/issues/3368) + +- Added a new environment variable, `PIPENV_RESOLVE_VCS`, to toggle dependency resolution off for non-editable VCS, file, and URL based dependencies. [#3577](https://github.com/pypa/pipenv/issues/3577) + +- Added the ability for Windows users to enable emojis by setting `PIPENV_HIDE_EMOJIS=0`. [#3595](https://github.com/pypa/pipenv/issues/3595) + +- Allow overriding PIPENV_INSTALL_TIMEOUT environment variable (in seconds). [#3652](https://github.com/pypa/pipenv/issues/3652) + +- Allow overriding PIP_EXISTS_ACTION environment variable (value is passed to pip install). + Possible values here: <https://pip.pypa.io/en/stable/reference/pip/#exists-action-option> + Useful when you need to `PIP_EXISTS_ACTION=i` (ignore existing packages) - great for CI environments, where you need really fast setup. [#3738](https://github.com/pypa/pipenv/issues/3738) + +- Pipenv will no longer forcibly override `PIP_NO_DEPS` on all vcs and file dependencies as resolution happens on these in a pre-lock step. [#3763](https://github.com/pypa/pipenv/issues/3763) + +- Improved verbose logging output during `pipenv lock` will now stream output to the console while maintaining a spinner. [#3810](https://github.com/pypa/pipenv/issues/3810) + +- Added support for automatic python installs via `asdf` and associated `PIPENV_DONT_USE_ASDF` environment variable. [#4018](https://github.com/pypa/pipenv/issues/4018) + +- Pyenv/asdf can now be used whether or not they are available on PATH. Setting PYENV_ROOT/ASDF_DIR in a Pipenv's .env allows Pipenv to install an interpreter without any shell customizations, so long as pyenv/asdf is installed. [#4245](https://github.com/pypa/pipenv/issues/4245) + +- Added `--key` command line parameter for including personal PyUp.io API tokens when running `pipenv check`. [#4257](https://github.com/pypa/pipenv/issues/4257) + +## Behavior Changes + +- Make conservative checks of known exceptions when subprocess returns output, so user won't see the whole traceback - just the error. [#2553](https://github.com/pypa/pipenv/issues/2553) +- Do not touch Pipfile early and rely on it so that one can do `pipenv sync` without a Pipfile. [#3386](https://github.com/pypa/pipenv/issues/3386) +- Re-enable `--help` option for `pipenv run` command. [#3844](https://github.com/pypa/pipenv/issues/3844) +- Make sure `pipenv lock -r --pypi-mirror {MIRROR_URL}` will respect the pypi-mirror in requirements output. [#4199](https://github.com/pypa/pipenv/issues/4199) + +## Bug Fixes + +- Raise `PipenvUsageError` when \[\[source\]\] does not contain url field. [#2373](https://github.com/pypa/pipenv/issues/2373) + +- Fixed a bug which caused editable package resolution to sometimes fail with an unhelpful setuptools-related error message. [#2722](https://github.com/pypa/pipenv/issues/2722) + +- Fixed an issue which caused errors due to reliance on the system utilities `which` and `where` which may not always exist on some systems. + \- Fixed a bug which caused periodic failures in python discovery when executables named `python` were not present on the target `$PATH`. [#2783](https://github.com/pypa/pipenv/issues/2783) + +- Dependency resolution now writes hashes for local and remote files to the lockfile. [#3053](https://github.com/pypa/pipenv/issues/3053) + +- Fixed a bug which prevented `pipenv graph` from correctly showing all dependencies when running from within `pipenv shell`. [#3071](https://github.com/pypa/pipenv/issues/3071) + +- Fixed resolution of direct-url dependencies in `setup.py` files to respect `PEP-508` style URL dependencies. [#3148](https://github.com/pypa/pipenv/issues/3148) + +- Fixed a bug which caused failures in warning reporting when running pipenv inside a virtualenv under some circumstances. + + - Fixed a bug with package discovery when running `pipenv clean`. [#3298](https://github.com/pypa/pipenv/issues/3298) + +- Quote command arguments with carets (`^`) on Windows to work around unintended shell escapes. [#3307](https://github.com/pypa/pipenv/issues/3307) + +- Handle alternate names for UTF-8 encoding. [#3313](https://github.com/pypa/pipenv/issues/3313) + +- Abort pipenv before adding the non-exist package to Pipfile. [#3318](https://github.com/pypa/pipenv/issues/3318) + +- Don't normalize the package name user passes in. [#3324](https://github.com/pypa/pipenv/issues/3324) + +- Fix a bug where custom virtualenv can not be activated with pipenv shell [#3339](https://github.com/pypa/pipenv/issues/3339) + +- Fix a bug that `--site-packages` flag is not recognized. [#3351](https://github.com/pypa/pipenv/issues/3351) + +- Fix a bug where pipenv --clear is not working [#3353](https://github.com/pypa/pipenv/issues/3353) + +- Fix unhashable type error during `$ pipenv install --selective-upgrade` [#3384](https://github.com/pypa/pipenv/issues/3384) + +- Dependencies with direct `PEP508` compliant VCS URLs specified in their `install_requires` will now be successfully locked during the resolution process. [#3396](https://github.com/pypa/pipenv/issues/3396) + +- Fixed a keyerror which could occur when locking VCS dependencies in some cases. [#3404](https://github.com/pypa/pipenv/issues/3404) + +- Fixed a bug that `ValidationError` is thrown when some fields are missing in source section. [#3427](https://github.com/pypa/pipenv/issues/3427) + +- Updated the index names in lock file when source name in Pipfile is changed. [#3449](https://github.com/pypa/pipenv/issues/3449) + +- Fixed an issue which caused `pipenv install --help` to show duplicate entries for `--pre`. [#3479](https://github.com/pypa/pipenv/issues/3479) + +- Fix bug causing `[SSL: CERTIFICATE_VERIFY_FAILED]` when Pipfile `[[source]]` has verify_ssl=false and url with custom port. [#3502](https://github.com/pypa/pipenv/issues/3502) + +- Fix `sync --sequential` ignoring `pip install` errors and logs. [#3537](https://github.com/pypa/pipenv/issues/3537) + +- Fix the issue that lock file can't be created when `PIPENV_PIPFILE` is not under working directory. [#3584](https://github.com/pypa/pipenv/issues/3584) + +- Pipenv will no longer inadvertently set `editable=True` on all vcs dependencies. [#3647](https://github.com/pypa/pipenv/issues/3647) + +- The `--keep-outdated` argument to `pipenv install` and `pipenv lock` will now drop specifier constraints when encountering editable dependencies. + \- In addition, `--keep-outdated` will retain specifiers that would otherwise be dropped from any entries that have not been updated. [#3656](https://github.com/pypa/pipenv/issues/3656) + +- Fixed a bug which sometimes caused pipenv to fail to respect the `--site-packages` flag when passed with `pipenv install`. [#3718](https://github.com/pypa/pipenv/issues/3718) + +- Normalize the package names to lowercase when comparing used and in-Pipfile packages. [#3745](https://github.com/pypa/pipenv/issues/3745) + +- `pipenv update --outdated` will now correctly handle comparisons between pre/post-releases and normal releases. [#3766](https://github.com/pypa/pipenv/issues/3766) + +- Fixed a `KeyError` which could occur when pinning outdated VCS dependencies via `pipenv lock --keep-outdated`. [#3768](https://github.com/pypa/pipenv/issues/3768) + +- Resolved an issue which caused resolution to fail when encountering poorly formatted `python_version` markers in `setup.py` and `setup.cfg` files. [#3786](https://github.com/pypa/pipenv/issues/3786) + +- Fix a bug that installation errors are displayed as a list. [#3794](https://github.com/pypa/pipenv/issues/3794) + +- Update `pythonfinder` to fix a problem that `python.exe` will be mistakenly chosen for + virtualenv creation under WSL. [#3807](https://github.com/pypa/pipenv/issues/3807) + +- Fixed several bugs which could prevent editable VCS dependencies from being installed into target environments, even when reporting successful installation. [#3809](https://github.com/pypa/pipenv/issues/3809) + +- `pipenv check --system` should find the correct Python interpreter when `python` does not exist on the system. [#3819](https://github.com/pypa/pipenv/issues/3819) + +- Resolve the symlinks when the path is absolute. [#3842](https://github.com/pypa/pipenv/issues/3842) + +- Pass `--pre` and `--clear` options to `pipenv update --outdated`. [#3879](https://github.com/pypa/pipenv/issues/3879) + +- Fixed a bug which prevented resolution of direct URL dependencies which have PEP508 style direct url VCS sub-dependencies with subdirectories. [#3976](https://github.com/pypa/pipenv/issues/3976) + +- Honor PIPENV_SPINNER environment variable [#4045](https://github.com/pypa/pipenv/issues/4045) + +- Fixed an issue with `pipenv check` failing due to an invalid API key from `pyup.io`. [#4188](https://github.com/pypa/pipenv/issues/4188) + +- Fixed a bug which caused versions from VCS dependencies to be included in `Pipfile.lock` inadvertently. [#4217](https://github.com/pypa/pipenv/issues/4217) + +- Fixed a bug which caused pipenv to search non-existent virtual environments for `pip` when installing using `--system`. [#4220](https://github.com/pypa/pipenv/issues/4220) + +- `Requires-Python` values specifying constraint versions of python starting from `1.x` will now be parsed successfully. [#4226](https://github.com/pypa/pipenv/issues/4226) + +- Fix a bug of `pipenv update --outdated` that can't print output correctly. [#4229](https://github.com/pypa/pipenv/issues/4229) + +- Fixed a bug which caused pipenv to prefer source distributions over wheels from `PyPI` during the dependency resolution phase. + Fixed an issue which prevented proper build isolation using `pep517` based builders during dependency resolution. [#4231](https://github.com/pypa/pipenv/issues/4231) + +- Don't fallback to system Python when no matching Python version is found. [#4232](https://github.com/pypa/pipenv/issues/4232) + +## Vendored Libraries + +- Updated vendored dependencies: + + > - **attrs**: `18.2.0` => `19.1.0` + > - **certifi**: `2018.10.15` => `2019.3.9` + > - **cached_property**: `1.4.3` => `1.5.1` + > - **cerberus**: `1.2.0` => `1.3.1` + > - **click-completion**: `0.5.0` => `0.5.1` + > - **colorama**: `0.3.9` => `0.4.1` + > - **distlib**: `0.2.8` => `0.2.9` + > - **idna**: `2.7` => `2.8` + > - **jinja2**: `2.10.0` => `2.10.1` + > - **markupsafe**: `1.0` => `1.1.1` + > - **orderedmultidict**: `(new)` => `1.0` + > - **packaging**: `18.0` => `19.0` + > - **parse**: `1.9.0` => `1.12.0` + > - **pathlib2**: `2.3.2` => `2.3.3` + > - **pep517**: `(new)` => `0.5.0` + > - **pexpect**: `4.6.0` => `4.7.0` + > - **pipdeptree**: `0.13.0` => `0.13.2` + > - **pyparsing**: `2.2.2` => `2.3.1` + > - **python-dotenv**: `0.9.1` => `0.10.2` + > - **pythonfinder**: `1.1.10` => `1.2.1` + > - **pytoml**: `(new)` => `0.1.20` + > - **requests**: `2.20.1` => `2.21.0` + > - **requirementslib**: `1.3.3` => `1.5.0` + > - **scandir**: `1.9.0` => `1.10.0` + > - **shellingham**: `1.2.7` => `1.3.1` + > - **six**: `1.11.0` => `1.12.0` + > - **tomlkit**: `0.5.2` => `0.5.3` + > - **urllib3**: `1.24` => `1.25.2` + > - **vistir**: `0.3.0` => `0.4.1` + > - **yaspin**: `0.14.0` => `0.14.3` + + - Removed vendored dependency **cursor**. [#3298](https://github.com/pypa/pipenv/issues/3298) + +- Updated `pip_shims` to support `--outdated` with new pip versions. [#3766](https://github.com/pypa/pipenv/issues/3766) + +- Update vendored dependencies and invocations + + - Update vendored and patched dependencies + - Update patches on `piptools`, `pip`, `pip-shims`, `tomlkit` + - Fix invocations of dependencies + - Fix custom `InstallCommand` instantiation + - Update `PackageFinder` usage + - Fix `Bool` stringify attempts from `tomlkit` + + Updated vendored dependencies: + : - **attrs**: `` `18.2.0 `` => `` `19.1.0 `` + - **certifi**: `` `2018.10.15 `` => `` `2019.3.9 `` + - **cached_property**: `` `1.4.3 `` => `` `1.5.1 `` + - **cerberus**: `` `1.2.0 `` => `` `1.3.1 `` + - **click**: `` `7.0.0 `` => `` `7.1.1 `` + - **click-completion**: `` `0.5.0 `` => `` `0.5.1 `` + - **colorama**: `` `0.3.9 `` => `` `0.4.3 `` + - **contextlib2**: `` `(new) `` => `` `0.6.0.post1 `` + - **distlib**: `` `0.2.8 `` => `` `0.2.9 `` + - **funcsigs**: `` `(new) `` => `` `1.0.2 `` + - **importlib_metadata** `` `1.3.0 `` => `` `1.5.1 `` + - **importlib-resources**: `` `(new) `` => `` `1.4.0 `` + - **idna**: `` `2.7 `` => `` `2.9 `` + - **jinja2**: `` `2.10.0 `` => `` `2.11.1 `` + - **markupsafe**: `` `1.0 `` => `` `1.1.1 `` + - **more-itertools**: `` `(new) `` => `` `5.0.0 `` + - **orderedmultidict**: `` `(new) `` => `` `1.0 `` + - **packaging**: `` `18.0 `` => `` `19.0 `` + - **parse**: `` `1.9.0 `` => `` `1.15.0 `` + - **pathlib2**: `` `2.3.2 `` => `` `2.3.3 `` + - **pep517**: `` `(new) `` => `` `0.5.0 `` + - **pexpect**: `` `4.6.0 `` => `` `4.8.0 `` + - **pip-shims**: `` `0.2.0 `` => `` `0.5.1 `` + - **pipdeptree**: `` `0.13.0 `` => `` `0.13.2 `` + - **pyparsing**: `` `2.2.2 `` => `` `2.4.6 `` + - **python-dotenv**: `` `0.9.1 `` => `` `0.10.2 `` + - **pythonfinder**: `` `1.1.10 `` => `` `1.2.2 `` + - **pytoml**: `` `(new) `` => `` `0.1.20 `` + - **requests**: `` `2.20.1 `` => `` `2.23.0 `` + - **requirementslib**: `` `1.3.3 `` => `` `1.5.4 `` + - **scandir**: `` `1.9.0 `` => `` `1.10.0 `` + - **shellingham**: `` `1.2.7 `` => `` `1.3.2 `` + - **six**: `` `1.11.0 `` => `` `1.14.0 `` + - **tomlkit**: `` `0.5.2 `` => `` `0.5.11 `` + - **urllib3**: `` `1.24 `` => `` `1.25.8 `` + - **vistir**: `` `0.3.0 `` => `` `0.5.0 `` + - **yaspin**: `` `0.14.0 `` => `` `0.14.3 `` + - **zipp**: `` `0.6.0 `` + + - Removed vendored dependency **cursor**. [#4169](https://github.com/pypa/pipenv/issues/4169) + +- Add and update vendored dependencies to accommodate `safety` vendoring: + \- **safety** `(none)` => `1.8.7` + \- **dparse** `(none)` => `0.5.0` + \- **pyyaml** `(none)` => `5.3.1` + \- **urllib3** `1.25.8` => `1.25.9` + \- **certifi** `2019.11.28` => `2020.4.5.1` + \- **pyparsing** `2.4.6` => `2.4.7` + \- **resolvelib** `0.2.2` => `0.3.0` + \- **importlib-metadata** `1.5.1` => `1.6.0` + \- **pip-shims** `0.5.1` => `0.5.2` + \- **requirementslib** `1.5.5` => `1.5.6` [#4188](https://github.com/pypa/pipenv/issues/4188) + +- Updated vendored `pip` => `20.0.2` and `pip-tools` => `5.0.0`. [#4215](https://github.com/pypa/pipenv/issues/4215) + +- Updated vendored dependencies to latest versions for security and bug fixes: + + - **requirementslib** `1.5.8` => `1.5.9` + - **vistir** `0.5.0` => `0.5.1` + - **jinja2** `2.11.1` => `2.11.2` + - **click** `7.1.1` => `7.1.2` + - **dateutil** `(none)` => `2.8.1` + - **backports.functools_lru_cache** `1.5.0` => `1.6.1` + - **enum34** `1.1.6` => `1.1.10` + - **toml** `0.10.0` => `0.10.1` + - **importlib_resources** `1.4.0` => `1.5.0` [#4226](https://github.com/pypa/pipenv/issues/4226) + +- Changed attrs import path in vendored dependencies to always import from `pipenv.vendor`. [#4267](https://github.com/pypa/pipenv/issues/4267) + +## Improved Documentation + +- Added documentation about variable expansion in `Pipfile` entries. [#2317](https://github.com/pypa/pipenv/issues/2317) +- Consolidate all contributing docs in the rst file [#3120](https://github.com/pypa/pipenv/issues/3120) +- Update the out-dated manual page. [#3246](https://github.com/pypa/pipenv/issues/3246) +- Move CLI docs to its own page. [#3346](https://github.com/pypa/pipenv/issues/3346) +- Replace (non-existent) video on docs index.rst with equivalent gif. [#3499](https://github.com/pypa/pipenv/issues/3499) +- Clarify wording in Basic Usage example on using double quotes to escape shell redirection [#3522](https://github.com/pypa/pipenv/issues/3522) +- Ensure docs show navigation on small-screen devices [#3527](https://github.com/pypa/pipenv/issues/3527) +- Added a link to the TOML Spec under General Recommendations & Version Control to clarify how Pipfiles should be written. [#3629](https://github.com/pypa/pipenv/issues/3629) +- Updated the documentation with the new `pytest` entrypoint. [#3759](https://github.com/pypa/pipenv/issues/3759) +- Fix link to GIF in README.md demonstrating Pipenv's usage, and add descriptive alt text. [#3911](https://github.com/pypa/pipenv/issues/3911) +- Added a line describing potential issues in fancy extension. [#3912](https://github.com/pypa/pipenv/issues/3912) +- Documental description of how Pipfile works and association with Pipenv. [#3913](https://github.com/pypa/pipenv/issues/3913) +- Clarify the proper value of `python_version` and `python_full_version`. [#3914](https://github.com/pypa/pipenv/issues/3914) +- Write description for --deploy extension and few extensions differences. [#3915](https://github.com/pypa/pipenv/issues/3915) +- More documentation for `.env` files [#4100](https://github.com/pypa/pipenv/issues/4100) +- Updated documentation to point to working links. [#4137](https://github.com/pypa/pipenv/issues/4137) +- Replace docs.pipenv.org with pipenv.pypa.io [#4167](https://github.com/pypa/pipenv/issues/4167) +- Added functionality to check spelling in documentation and cleaned up existing typographical issues. [#4209](https://github.com/pypa/pipenv/issues/4209) + +# 2018.11.26 (2018-11-26) + +## Bug Fixes + +- Environment variables are expanded correctly before running scripts on POSIX. [#3178](https://github.com/pypa/pipenv/issues/3178) +- Pipenv will no longer disable user-mode installation when the `--system` flag is passed in. [#3222](https://github.com/pypa/pipenv/issues/3222) +- Fixed an issue with attempting to render unicode output in non-unicode locales. [#3223](https://github.com/pypa/pipenv/issues/3223) +- Fixed a bug which could cause failures to occur when parsing python entries from global pyenv version files. [#3224](https://github.com/pypa/pipenv/issues/3224) +- Fixed an issue which prevented the parsing of named extras sections from certain `setup.py` files. [#3230](https://github.com/pypa/pipenv/issues/3230) +- Correctly detect the virtualenv location inside an activated virtualenv. [#3231](https://github.com/pypa/pipenv/issues/3231) +- Fixed a bug which caused spinner frames to be written to standard output during locking operations which could cause redirection pipes to fail. [#3239](https://github.com/pypa/pipenv/issues/3239) +- Fixed a bug that editable packages can't be uninstalled correctly. [#3240](https://github.com/pypa/pipenv/issues/3240) +- Corrected an issue with installation timeouts which caused dependency resolution to fail for longer duration resolution steps. [#3244](https://github.com/pypa/pipenv/issues/3244) +- Adding normal pep 508 compatible markers is now fully functional when using VCS dependencies. [#3249](https://github.com/pypa/pipenv/issues/3249) +- Updated `requirementslib` and `pythonfinder` for multiple bug fixes. [#3254](https://github.com/pypa/pipenv/issues/3254) +- Pipenv will now ignore hashes when installing with `--skip-lock`. [#3255](https://github.com/pypa/pipenv/issues/3255) +- Fixed an issue where pipenv could crash when multiple pipenv processes attempted to create the same directory. [#3257](https://github.com/pypa/pipenv/issues/3257) +- Fixed an issue which sometimes prevented successful creation of a project Pipfile. [#3260](https://github.com/pypa/pipenv/issues/3260) +- `pipenv install` will now unset the `PYTHONHOME` environment variable when not combined with `--system`. [#3261](https://github.com/pypa/pipenv/issues/3261) +- Pipenv will ensure that warnings do not interfere with the resolution process by suppressing warnings' usage of standard output and writing to standard error instead. [#3273](https://github.com/pypa/pipenv/issues/3273) +- Fixed an issue which prevented variables from the environment, such as `PIPENV_DEV` or `PIPENV_SYSTEM`, from being parsed and implemented correctly. [#3278](https://github.com/pypa/pipenv/issues/3278) +- Clear pythonfinder cache after Python install. [#3287](https://github.com/pypa/pipenv/issues/3287) +- Fixed a race condition in hash resolution for dependencies for certain dependencies with missing cache entries or fresh Pipenv installs. [#3289](https://github.com/pypa/pipenv/issues/3289) +- Pipenv will now respect top-level pins over VCS dependency locks. [#3296](https://github.com/pypa/pipenv/issues/3296) + +## Vendored Libraries + +- Update vendored dependencies to resolve resolution output parsing and python finding: + : - `pythonfinder 1.1.9 -> 1.1.10` + - `requirementslib 1.3.1 -> 1.3.3` + - `vistir 0.2.3 -> 0.2.5` [#3280](https://github.com/pypa/pipenv/issues/3280) + +# 2018.11.14 (2018-11-14) + +## Features & Improvements + +- Improved exceptions and error handling on failures. [#1977](https://github.com/pypa/pipenv/issues/1977) +- Added persistent settings for all CLI flags via `PIPENV_{FLAG_NAME}` environment variables by enabling `auto_envvar_prefix=PIPENV` in click (implements PEEP-0002). [#2200](https://github.com/pypa/pipenv/issues/2200) +- Added improved messaging about available but skipped updates due to dependency conflicts when running `pipenv update --outdated`. [#2411](https://github.com/pypa/pipenv/issues/2411) +- Added environment variable `PIPENV_PYUP_API_KEY` to add ability + to override the bundled PyUP.io API key. [#2825](https://github.com/pypa/pipenv/issues/2825) +- Added additional output to `pipenv update --outdated` to indicate that the operation succeeded and all packages were already up to date. [#2828](https://github.com/pypa/pipenv/issues/2828) +- Updated `crayons` patch to enable colors on native powershell but swap native blue for magenta. [#3020](https://github.com/pypa/pipenv/issues/3020) +- Added support for `--bare` to `pipenv clean`, and fixed `pipenv sync --bare` to actually reduce output. [#3041](https://github.com/pypa/pipenv/issues/3041) +- Added windows-compatible spinner via upgraded `vistir` dependency. [#3089](https://github.com/pypa/pipenv/issues/3089) +- - Added support for python installations managed by `asdf`. [#3096](https://github.com/pypa/pipenv/issues/3096) +- Improved runtime performance of no-op commands such as `pipenv --venv` by around 2/3. [#3158](https://github.com/pypa/pipenv/issues/3158) +- Do not show error but success for running `pipenv uninstall --all` in a fresh virtual environment. [#3170](https://github.com/pypa/pipenv/issues/3170) +- Improved asynchronous installation and error handling via queued subprocess parallelization. [#3217](https://github.com/pypa/pipenv/issues/3217) + +## Bug Fixes + +- Remote non-PyPI artifacts and local wheels and artifacts will now include their own hashes rather than including hashes from `PyPI`. [#2394](https://github.com/pypa/pipenv/issues/2394) +- Non-ascii characters will now be handled correctly when parsed by pipenv's `ToML` parsers. [#2737](https://github.com/pypa/pipenv/issues/2737) +- Updated `pipenv uninstall` to respect the `--skip-lock` argument. [#2848](https://github.com/pypa/pipenv/issues/2848) +- Fixed a bug which caused uninstallation to sometimes fail to successfully remove packages from `Pipfiles` with comments on preceding or following lines. [#2885](https://github.com/pypa/pipenv/issues/2885), + [#3099](https://github.com/pypa/pipenv/issues/3099) +- Pipenv will no longer fail when encountering python versions on Windows that have been uninstalled. [#2983](https://github.com/pypa/pipenv/issues/2983) +- Fixed unnecessary extras are added when translating markers [#3026](https://github.com/pypa/pipenv/issues/3026) +- Fixed a virtualenv creation issue which could cause new virtualenvs to inadvertently attempt to read and write to global site packages. [#3047](https://github.com/pypa/pipenv/issues/3047) +- Fixed an issue with virtualenv path derivation which could cause errors, particularly for users on WSL bash. [#3055](https://github.com/pypa/pipenv/issues/3055) +- Fixed a bug which caused `Unexpected EOF` errors to be thrown when `pip` was waiting for input from users who had put login credentials in environment variables. [#3088](https://github.com/pypa/pipenv/issues/3088) +- Fixed a bug in `requirementslib` which prevented successful installation from mercurial repositories. [#3090](https://github.com/pypa/pipenv/issues/3090) +- Fixed random resource warnings when using pyenv or any other subprocess calls. [#3094](https://github.com/pypa/pipenv/issues/3094) +- - Fixed a bug which sometimes prevented cloning and parsing `mercurial` requirements. [#3096](https://github.com/pypa/pipenv/issues/3096) +- Fixed an issue in `delegator.py` related to subprocess calls when using `PopenSpawn` to stream output, which sometimes threw unexpected `EOF` errors. [#3102](https://github.com/pypa/pipenv/issues/3102), + [#3114](https://github.com/pypa/pipenv/issues/3114), + [#3117](https://github.com/pypa/pipenv/issues/3117) +- Fix the path casing issue that makes `pipenv clean` fail on Windows [#3104](https://github.com/pypa/pipenv/issues/3104) +- Pipenv will avoid leaving build artifacts in the current working directory. [#3106](https://github.com/pypa/pipenv/issues/3106) +- Fixed issues with broken subprocess calls leaking resource handles and causing random and sporadic failures. [#3109](https://github.com/pypa/pipenv/issues/3109) +- Fixed an issue which caused `pipenv clean` to sometimes clean packages from the base `site-packages` folder or fail entirely. [#3113](https://github.com/pypa/pipenv/issues/3113) +- Updated `pythonfinder` to correct an issue with unnesting of nested paths when searching for python versions. [#3121](https://github.com/pypa/pipenv/issues/3121) +- Added additional logic for ignoring and replacing non-ascii characters when formatting console output on non-UTF-8 systems. [#3131](https://github.com/pypa/pipenv/issues/3131) +- Fix virtual environment discovery when `PIPENV_VENV_IN_PROJECT` is set, but the in-project `.venv` is a file. [#3134](https://github.com/pypa/pipenv/issues/3134) +- Hashes for remote and local non-PyPI artifacts will now be included in `Pipfile.lock` during resolution. [#3145](https://github.com/pypa/pipenv/issues/3145) +- Fix project path hashing logic in purpose to prevent collisions of virtual environments. [#3151](https://github.com/pypa/pipenv/issues/3151) +- Fix package installation when the virtual environment path contains parentheses. [#3158](https://github.com/pypa/pipenv/issues/3158) +- Azure Pipelines YAML files are updated to use the latest syntax and product name. [#3164](https://github.com/pypa/pipenv/issues/3164) +- Fixed new spinner success message to write only one success message during resolution. [#3183](https://github.com/pypa/pipenv/issues/3183) +- Pipenv will now correctly respect the `--pre` option when used with `pipenv install`. [#3185](https://github.com/pypa/pipenv/issues/3185) +- Fix a bug where exception is raised when run pipenv graph in a project without created virtualenv [#3201](https://github.com/pypa/pipenv/issues/3201) +- When sources are missing names, names will now be derived from the supplied URL. [#3216](https://github.com/pypa/pipenv/issues/3216) + +## Vendored Libraries + +- Updated `pythonfinder` to correct an issue with unnesting of nested paths when searching for python versions. [#3061](https://github.com/pypa/pipenv/issues/3061), + [#3121](https://github.com/pypa/pipenv/issues/3121) +- Updated vendored dependencies: + : - `certifi 2018.08.24 => 2018.10.15` + - `urllib3 1.23 => 1.24` + - `requests 2.19.1 => 2.20.0` + - ``` shellingham ``1.2.6 => 1.2.7 ``` + - `tomlkit 0.4.4. => 0.4.6` + - `vistir 0.1.6 => 0.1.8` + - `pythonfinder 0.1.2 => 0.1.3` + - `requirementslib 1.1.9 => 1.1.10` + - `backports.functools_lru_cache 1.5.0 (new)` + - `cursor 1.2.0 (new)` [#3089](https://github.com/pypa/pipenv/issues/3089) +- Updated vendored dependencies: + : - `requests 2.19.1 => 2.20.1` + - `tomlkit 0.4.46 => 0.5.2` + - `vistir 0.1.6 => 0.2.4` + - `pythonfinder 1.1.2 => 1.1.8` + - `requirementslib 1.1.10 => 1.3.0` [#3096](https://github.com/pypa/pipenv/issues/3096) +- Switch to `tomlkit` for parsing and writing. Drop `prettytoml` and `contoml` from vendors. [#3191](https://github.com/pypa/pipenv/issues/3191) +- Updated `requirementslib` to aid in resolution of local and remote archives. [#3196](https://github.com/pypa/pipenv/issues/3196) + +## Improved Documentation + +- Expanded development and testing documentation for contributors to get started. [#3074](https://github.com/pypa/pipenv/issues/3074) + +# 2018.10.13 (2018-10-13) + +## Bug Fixes + +- Fixed a bug in `pipenv clean` which caused global packages to sometimes be inadvertently targeted for cleanup. [#2849](https://github.com/pypa/pipenv/issues/2849) +- Fix broken backport imports for vendored vistir. [#2950](https://github.com/pypa/pipenv/issues/2950), + [#2955](https://github.com/pypa/pipenv/issues/2955), + [#2961](https://github.com/pypa/pipenv/issues/2961) +- Fixed a bug with importing local vendored dependencies when running `pipenv graph`. [#2952](https://github.com/pypa/pipenv/issues/2952) +- Fixed a bug which caused executable discovery to fail when running inside a virtualenv. [#2957](https://github.com/pypa/pipenv/issues/2957) +- Fix parsing of outline tables. [#2971](https://github.com/pypa/pipenv/issues/2971) +- Fixed a bug which caused `verify_ssl` to fail to drop through to `pip install` correctly as `trusted-host`. [#2979](https://github.com/pypa/pipenv/issues/2979) +- Fixed a bug which caused canonicalized package names to fail to resolve against PyPI. [#2989](https://github.com/pypa/pipenv/issues/2989) +- Enhanced CI detection to detect Azure Devops builds. [#2993](https://github.com/pypa/pipenv/issues/2993) +- Fixed a bug which prevented installing pinned versions which used redirection symbols from the command line. [#2998](https://github.com/pypa/pipenv/issues/2998) +- Fixed a bug which prevented installing the local directory in non-editable mode. [#3005](https://github.com/pypa/pipenv/issues/3005) + +## Vendored Libraries + +- Updated `requirementslib` to version `1.1.9`. [#2989](https://github.com/pypa/pipenv/issues/2989) +- Upgraded `pythonfinder => 1.1.1` and `vistir => 0.1.7`. [#3007](https://github.com/pypa/pipenv/issues/3007) + +# 2018.10.9 (2018-10-09) + +## Features & Improvements + +- Added environment variables `PIPENV_VERBOSE` and `PIPENV_QUIET` to control + output verbosity without needing to pass options. [#2527](https://github.com/pypa/pipenv/issues/2527) + +- Updated test-PyPI add-on to better support json-API access (forward compatibility). + Improved testing process for new contributors. [#2568](https://github.com/pypa/pipenv/issues/2568) + +- Greatly enhanced python discovery functionality: + + - Added pep514 (windows launcher/finder) support for python discovery. + - Introduced architecture discovery for python installations which support different architectures. [#2582](https://github.com/pypa/pipenv/issues/2582) + +- Added support for `pipenv shell` on msys and cygwin/mingw/git bash for Windows. [#2641](https://github.com/pypa/pipenv/issues/2641) + +- Enhanced resolution of editable and VCS dependencies. [#2643](https://github.com/pypa/pipenv/issues/2643) + +- Deduplicate and refactor CLI to use stateful arguments and object passing. See [this issue](https://github.com/pallets/click/issues/108) for reference. [#2814](https://github.com/pypa/pipenv/issues/2814) + +## Behavior Changes + +- Virtual environment activation for `run` is revised to improve interpolation + with other Python discovery tools. [#2503](https://github.com/pypa/pipenv/issues/2503) +- Improve terminal coloring to display better in Powershell. [#2511](https://github.com/pypa/pipenv/issues/2511) +- Invoke `virtualenv` directly for virtual environment creation, instead of depending on `pew`. [#2518](https://github.com/pypa/pipenv/issues/2518) +- `pipenv --help` will now include short help descriptions. [#2542](https://github.com/pypa/pipenv/issues/2542) +- Add `COMSPEC` to fallback option (along with `SHELL` and `PYENV_SHELL`) + if shell detection fails, improving robustness on Windows. [#2651](https://github.com/pypa/pipenv/issues/2651) +- Fallback to shell mode if `run` fails with Windows error 193 to handle non-executable commands. This should improve usability on Windows, where some users run non-executable files without specifying a command, relying on Windows file association to choose the current command. [#2718](https://github.com/pypa/pipenv/issues/2718) + +## Bug Fixes + +- Fixed a bug which prevented installation of editable requirements using `ssh://` style URLs [#1393](https://github.com/pypa/pipenv/issues/1393) +- VCS Refs for locked local editable dependencies will now update appropriately to the latest hash when running `pipenv update`. [#1690](https://github.com/pypa/pipenv/issues/1690) +- `.tar.gz` and `.zip` artifacts will now have dependencies installed even when they are missing from the Lockfile. [#2173](https://github.com/pypa/pipenv/issues/2173) +- The command line parser will now handle multiple `-e/--editable` dependencies properly via click's option parser to help mitigate future parsing issues. [#2279](https://github.com/pypa/pipenv/issues/2279) +- Fixed the ability of pipenv to parse `dependency_links` from `setup.py` when `PIP_PROCESS_DEPENDENCY_LINKS` is enabled. [#2434](https://github.com/pypa/pipenv/issues/2434) +- Fixed a bug which could cause `-i/--index` arguments to sometimes be incorrectly picked up in packages. This is now handled in the command line parser. [#2494](https://github.com/pypa/pipenv/issues/2494) +- Fixed non-deterministic resolution issues related to changes to the internal package finder in `pip 10`. [#2499](https://github.com/pypa/pipenv/issues/2499), + [#2529](https://github.com/pypa/pipenv/issues/2529), + [#2589](https://github.com/pypa/pipenv/issues/2589), + [#2666](https://github.com/pypa/pipenv/issues/2666), + [#2767](https://github.com/pypa/pipenv/issues/2767), + [#2785](https://github.com/pypa/pipenv/issues/2785), + [#2795](https://github.com/pypa/pipenv/issues/2795), + [#2801](https://github.com/pypa/pipenv/issues/2801), + [#2824](https://github.com/pypa/pipenv/issues/2824), + [#2862](https://github.com/pypa/pipenv/issues/2862), + [#2879](https://github.com/pypa/pipenv/issues/2879), + [#2894](https://github.com/pypa/pipenv/issues/2894), + [#2933](https://github.com/pypa/pipenv/issues/2933) +- Fix subshell invocation on Windows for Python 2. [#2515](https://github.com/pypa/pipenv/issues/2515) +- Fixed a bug which sometimes caused pipenv to throw a `TypeError` or to run into encoding issues when writing a Lockfile on python 2. [#2561](https://github.com/pypa/pipenv/issues/2561) +- Improve quoting logic for `pipenv run` so it works better with Windows + built-in commands. [#2563](https://github.com/pypa/pipenv/issues/2563) +- Fixed a bug related to parsing VCS requirements with both extras and subdirectory fragments. + Corrected an issue in the `requirementslib` parser which led to some markers being discarded rather than evaluated. [#2564](https://github.com/pypa/pipenv/issues/2564) +- Fixed multiple issues with finding the correct system python locations. [#2582](https://github.com/pypa/pipenv/issues/2582) +- Catch JSON decoding error to prevent exception when the lock file is of + invalid format. [#2607](https://github.com/pypa/pipenv/issues/2607) +- Fixed a rare bug which could sometimes cause errors when installing packages with custom sources. [#2610](https://github.com/pypa/pipenv/issues/2610) +- Update requirementslib to fix a bug which could raise an `UnboundLocalError` when parsing malformed VCS URIs. [#2617](https://github.com/pypa/pipenv/issues/2617) +- Fixed an issue which prevented passing multiple `--ignore` parameters to `pipenv check`. [#2632](https://github.com/pypa/pipenv/issues/2632) +- Fixed a bug which caused attempted hashing of `ssh://` style URIs which could cause failures during installation of private ssh repositories. + \- Corrected path conversion issues which caused certain editable VCS paths to be converted to `ssh://` URIs improperly. [#2639](https://github.com/pypa/pipenv/issues/2639) +- Fixed a bug which caused paths to be formatted incorrectly when using `pipenv shell` in bash for windows. [#2641](https://github.com/pypa/pipenv/issues/2641) +- Dependency links to private repositories defined via `ssh://` schemes will now install correctly and skip hashing as long as `PIP_PROCESS_DEPENDENCY_LINKS=1`. [#2643](https://github.com/pypa/pipenv/issues/2643) +- Fixed a bug which sometimes caused pipenv to parse the `trusted_host` argument to pip incorrectly when parsing source URLs which specify `verify_ssl = false`. [#2656](https://github.com/pypa/pipenv/issues/2656) +- Prevent crashing when a virtual environment in `WORKON_HOME` is faulty. [#2676](https://github.com/pypa/pipenv/issues/2676) +- Fixed virtualenv creation failure when a .venv file is present in the project root. [#2680](https://github.com/pypa/pipenv/issues/2680) +- Fixed a bug which could cause the `-e/--editable` argument on a dependency to be accidentally parsed as a dependency itself. [#2714](https://github.com/pypa/pipenv/issues/2714) +- Correctly pass `verbose` and `debug` flags to the resolver subprocess so it generates appropriate output. This also resolves a bug introduced by the fix to #2527. [#2732](https://github.com/pypa/pipenv/issues/2732) +- All markers are now included in `pipenv lock --requirements` output. [#2748](https://github.com/pypa/pipenv/issues/2748) +- Fixed a bug in marker resolution which could cause duplicate and non-deterministic markers. [#2760](https://github.com/pypa/pipenv/issues/2760) +- Fixed a bug in the dependency resolver which caused regular issues when handling `setup.py` based dependency resolution. [#2766](https://github.com/pypa/pipenv/issues/2766) +- Updated vendored dependencies: + : - `pip-tools` (updated and patched to latest w/ `pip 18.0` compatibility) + - `pip 10.0.1 => 18.0` + - `click 6.7 => 7.0` + - `toml 0.9.4 => 0.10.0` + - `pyparsing 2.2.0 => 2.2.2` + - `delegator 0.1.0 => 0.1.1` + - `attrs 18.1.0 => 18.2.0` + - `distlib 0.2.7 => 0.2.8` + - `packaging 17.1.0 => 18.0` + - `passa 0.2.0 => 0.3.1` + - `pip_shims 0.1.2 => 0.3.1` + - `plette 0.1.1 => 0.2.2` + - `pythonfinder 1.0.2 => 1.1.0` + - `pytoml 0.1.18 => 0.1.19` + - `requirementslib 1.1.16 => 1.1.17` + - `shellingham 1.2.4 => 1.2.6` + - `tomlkit 0.4.2 => 0.4.4` + - `vistir 0.1.4 => 0.1.6` + [#2802](https://github.com/pypa/pipenv/issues/2802), + [#2867](https://github.com/pypa/pipenv/issues/2867), + [#2880](https://github.com/pypa/pipenv/issues/2880) +- Fixed a bug where `pipenv` crashes when the `WORKON_HOME` directory does not exist. [#2877](https://github.com/pypa/pipenv/issues/2877) +- Fixed pip is not loaded from pipenv's patched one but the system one [#2912](https://github.com/pypa/pipenv/issues/2912) +- Fixed various bugs related to `pip 18.1` release which prevented locking, installation, and syncing, and dumping to a `requirements.txt` file. [#2924](https://github.com/pypa/pipenv/issues/2924) + +## Vendored Libraries + +- Pew is no longer vendored. Entry point `pewtwo`, packages `pipenv.pew` and + `pipenv.patched.pew` are removed. [#2521](https://github.com/pypa/pipenv/issues/2521) +- Update `pythonfinder` to major release `1.0.0` for integration. [#2582](https://github.com/pypa/pipenv/issues/2582) +- Update requirementslib to fix a bug which could raise an `UnboundLocalError` when parsing malformed VCS URIs. [#2617](https://github.com/pypa/pipenv/issues/2617) +- - Vendored new libraries `vistir` and `pip-shims`, `tomlkit`, `modutil`, and `plette`. + - Update vendored libraries: + \- `scandir` to `1.9.0` + \- `click-completion` to `0.4.1` + \- `semver` to `2.8.1` + \- `shellingham` to `1.2.4` + \- `pytoml` to `0.1.18` + \- `certifi` to `2018.8.24` + \- `ptyprocess` to `0.6.0` + \- `requirementslib` to `1.1.5` + \- `pythonfinder` to `1.0.2` + \- `pipdeptree` to `0.13.0` + \- `python-dotenv` to `0.9.1` [#2639](https://github.com/pypa/pipenv/issues/2639) +- Updated vendored dependencies: + : - `pip-tools` (updated and patched to latest w/ `pip 18.0` compatibility) + - `pip 10.0.1 => 18.0` + - `click 6.7 => 7.0` + - `toml 0.9.4 => 0.10.0` + - `pyparsing 2.2.0 => 2.2.2` + - `delegator 0.1.0 => 0.1.1` + - `attrs 18.1.0 => 18.2.0` + - `distlib 0.2.7 => 0.2.8` + - `packaging 17.1.0 => 18.0` + - `passa 0.2.0 => 0.3.1` + - `pip_shims 0.1.2 => 0.3.1` + - `plette 0.1.1 => 0.2.2` + - `pythonfinder 1.0.2 => 1.1.0` + - `pytoml 0.1.18 => 0.1.19` + - `requirementslib 1.1.16 => 1.1.17` + - `shellingham 1.2.4 => 1.2.6` + - `tomlkit 0.4.2 => 0.4.4` + - `vistir 0.1.4 => 0.1.6` + [#2902](https://github.com/pypa/pipenv/issues/2902), + [#2935](https://github.com/pypa/pipenv/issues/2935) + +## Improved Documentation + +- Simplified the test configuration process. [#2568](https://github.com/pypa/pipenv/issues/2568) +- Updated documentation to use working fortune cookie add-on. [#2644](https://github.com/pypa/pipenv/issues/2644) +- Added additional information about troubleshooting `pipenv shell` by using the the `$PIPENV_SHELL` environment variable. [#2671](https://github.com/pypa/pipenv/issues/2671) +- Added a link to `PEP-440` version specifiers in the documentation for additional detail. [#2674](https://github.com/pypa/pipenv/issues/2674) +- Added simple example to README.md for installing from git. [#2685](https://github.com/pypa/pipenv/issues/2685) +- Stopped recommending `--system` for Docker contexts. [#2762](https://github.com/pypa/pipenv/issues/2762) +- Fixed the example url for doing "pipenv install -e + some-repository-url#egg=something", it was missing the "egg=" in the fragment + identifier. [#2792](https://github.com/pypa/pipenv/issues/2792) +- Fixed link to the "be cordial" essay in the contribution documentation. [#2793](https://github.com/pypa/pipenv/issues/2793) +- Clarify `pipenv install` documentation [#2844](https://github.com/pypa/pipenv/issues/2844) +- Replace reference to uservoice with PEEP-000 [#2909](https://github.com/pypa/pipenv/issues/2909) + +# 2018.7.1 (2018-07-01) + +## Features & Improvements + +- All calls to `pipenv shell` are now implemented from the ground up using [shellingham](https://github.com/sarugaku/shellingham), a custom library which was purpose built to handle edge cases and shell detection. [#2371](https://github.com/pypa/pipenv/issues/2371) +- Added support for python 3.7 via a few small compatibility / bug fixes. [#2427](https://github.com/pypa/pipenv/issues/2427), + [#2434](https://github.com/pypa/pipenv/issues/2434), + [#2436](https://github.com/pypa/pipenv/issues/2436) +- Added new flag `pipenv --support` to replace the diagnostic command `python -m pipenv.help`. [#2477](https://github.com/pypa/pipenv/issues/2477), + [#2478](https://github.com/pypa/pipenv/issues/2478) +- Improved import times and CLI run times with minor tweaks. [#2485](https://github.com/pypa/pipenv/issues/2485) + +## Bug Fixes + +- Fixed an ongoing bug which sometimes resolved incompatible versions into the project Lockfile. [#1901](https://github.com/pypa/pipenv/issues/1901) +- Fixed a bug which caused errors when creating virtualenvs which contained leading dash characters. [#2415](https://github.com/pypa/pipenv/issues/2415) +- Fixed a logic error which caused `--deploy --system` to overwrite editable vcs packages in the Pipfile before installing, which caused any installation to fail by default. [#2417](https://github.com/pypa/pipenv/issues/2417) +- Updated requirementslib to fix an issue with properly quoting markers in VCS requirements. [#2419](https://github.com/pypa/pipenv/issues/2419) +- Installed new vendored jinja2 templates for `click-completion` which were causing template errors for users with completion enabled. [#2422](https://github.com/pypa/pipenv/issues/2422) +- Added support for python 3.7 via a few small compatibility / bug fixes. [#2427](https://github.com/pypa/pipenv/issues/2427) +- Fixed an issue reading package names from `setup.py` files in projects which imported utilities such as `versioneer`. [#2433](https://github.com/pypa/pipenv/issues/2433) +- Pipenv will now ensure that its internal package names registry files are written with unicode strings. [#2450](https://github.com/pypa/pipenv/issues/2450) +- Fixed a bug causing requirements input as relative paths to be output as absolute paths or URIs. + Fixed a bug affecting normalization of `git+git@host` URLs. [#2453](https://github.com/pypa/pipenv/issues/2453) +- Pipenv will now always use `pathlib2` for `Path` based filesystem interactions by default on `python<3.5`. [#2454](https://github.com/pypa/pipenv/issues/2454) +- Fixed a bug which prevented passing proxy PyPI indexes set with `--pypi-mirror` from being passed to pip during virtualenv creation, which could cause the creation to freeze in some cases. [#2462](https://github.com/pypa/pipenv/issues/2462) +- Using the `python -m pipenv.help` command will now use proper encoding for the host filesystem to avoid encoding issues. [#2466](https://github.com/pypa/pipenv/issues/2466) +- The new `jinja2` templates for `click_completion` will now be included in pipenv source distributions. [#2479](https://github.com/pypa/pipenv/issues/2479) +- Resolved a long-standing issue with re-using previously generated `InstallRequirement` objects for resolution which could cause `PKG-INFO` file information to be deleted, raising a `TypeError`. [#2480](https://github.com/pypa/pipenv/issues/2480) +- Resolved an issue parsing usernames from private PyPI URIs in `Pipfiles` by updating `requirementslib`. [#2484](https://github.com/pypa/pipenv/issues/2484) + +## Vendored Libraries + +- All calls to `pipenv shell` are now implemented from the ground up using [shellingham](https://github.com/sarugaku/shellingham), a custom library which was purpose built to handle edge cases and shell detection. [#2371](https://github.com/pypa/pipenv/issues/2371) +- Updated requirementslib to fix an issue with properly quoting markers in VCS requirements. [#2419](https://github.com/pypa/pipenv/issues/2419) +- Installed new vendored jinja2 templates for `click-completion` which were causing template errors for users with completion enabled. [#2422](https://github.com/pypa/pipenv/issues/2422) +- Add patch to `prettytoml` to support Python 3.7. [#2426](https://github.com/pypa/pipenv/issues/2426) +- Patched `prettytoml.AbstractTable._enumerate_items` to handle `StopIteration` errors in preparation of release of python 3.7. [#2427](https://github.com/pypa/pipenv/issues/2427) +- Fixed an issue reading package names from `setup.py` files in projects which imported utilities such as `versioneer`. [#2433](https://github.com/pypa/pipenv/issues/2433) +- Updated `requirementslib` to version `1.0.9` [#2453](https://github.com/pypa/pipenv/issues/2453) +- Unraveled a lot of old, unnecessary patches to `pip-tools` which were causing non-deterministic resolution errors. [#2480](https://github.com/pypa/pipenv/issues/2480) +- Resolved an issue parsing usernames from private PyPI URIs in `Pipfiles` by updating `requirementslib`. [#2484](https://github.com/pypa/pipenv/issues/2484) + +## Improved Documentation + +- Added instructions for installing using Fedora's official repositories. [#2404](https://github.com/pypa/pipenv/issues/2404) + +# 2018.6.25 (2018-06-25) + +## Features & Improvements + +- Pipenv-created virtualenvs will now be associated with a `.project` folder + (features can be implemented on top of this later or users may choose to use + `pipenv-pipes` to take full advantage of this.) [#1861](https://github.com/pypa/pipenv/issues/1861) +- Virtualenv names will now appear in prompts for most Windows users. [#2167](https://github.com/pypa/pipenv/issues/2167) +- Added support for cmder shell paths with spaces. [#2168](https://github.com/pypa/pipenv/issues/2168) +- Added nested JSON output to the `pipenv graph` command. [#2199](https://github.com/pypa/pipenv/issues/2199) +- Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. Updated + patched piptools version. [#2255](https://github.com/pypa/pipenv/issues/2255) +- PyPI mirror URLs can now be set to override instances of PyPI URLs by passing + the `--pypi-mirror` argument from the command line or setting the + `PIPENV_PYPI_MIRROR` environment variable. [#2281](https://github.com/pypa/pipenv/issues/2281) +- Virtualenv activation lines will now avoid being written to some shell + history files. [#2287](https://github.com/pypa/pipenv/issues/2287) +- Pipenv will now only search for `requirements.txt` files when creating new + projects, and during that time only if the user doesn't specify packages to + pass in. [#2309](https://github.com/pypa/pipenv/issues/2309) +- Added support for mounted drives via UNC paths. [#2331](https://github.com/pypa/pipenv/issues/2331) +- Added support for Windows Subsystem for Linux bash shell detection. [#2363](https://github.com/pypa/pipenv/issues/2363) +- Pipenv will now generate hashes much more quickly by resolving them in a + single pass during locking. [#2384](https://github.com/pypa/pipenv/issues/2384) +- `pipenv run` will now avoid spawning additional `COMSPEC` instances to + run commands in when possible. [#2385](https://github.com/pypa/pipenv/issues/2385) +- Massive internal improvements to requirements parsing codebase, resolver, and + error messaging. [#2388](https://github.com/pypa/pipenv/issues/2388) +- `pipenv check` now may take multiple of the additional argument + `--ignore` which takes a parameter `cve_id` for the purpose of ignoring + specific CVEs. [#2408](https://github.com/pypa/pipenv/issues/2408) + +## Behavior Changes + +- Pipenv will now parse & capitalize `platform_python_implementation` markers + .. warning:: This could cause an issue if you have an out of date `Pipfile` + which lower-cases the comparison value (e.g. `cpython` instead of + `CPython`). [#2123](https://github.com/pypa/pipenv/issues/2123) +- Pipenv will now only search for `requirements.txt` files when creating new + projects, and during that time only if the user doesn't specify packages to + pass in. [#2309](https://github.com/pypa/pipenv/issues/2309) + +## Bug Fixes + +- Massive internal improvements to requirements parsing codebase, resolver, and + error messaging. [#1962](https://github.com/pypa/pipenv/issues/1962), + [#2186](https://github.com/pypa/pipenv/issues/2186), + [#2263](https://github.com/pypa/pipenv/issues/2263), + [#2312](https://github.com/pypa/pipenv/issues/2312) +- Pipenv will now parse & capitalize `platform_python_implementation` + markers. [#2123](https://github.com/pypa/pipenv/issues/2123) +- Fixed a bug with parsing and grouping old-style `setup.py` extras during + resolution [#2142](https://github.com/pypa/pipenv/issues/2142) +- Fixed a bug causing pipenv graph to throw unhelpful exceptions when running + against empty or non-existent environments. [#2161](https://github.com/pypa/pipenv/issues/2161) +- Fixed a bug which caused `--system` to incorrectly abort when users were in + a virtualenv. [#2181](https://github.com/pypa/pipenv/issues/2181) +- Removed vendored `cacert.pem` which could cause issues for some users with + custom certificate settings. [#2193](https://github.com/pypa/pipenv/issues/2193) +- Fixed a regression which led to direct invocations of `virtualenv`, rather + than calling it by module. [#2198](https://github.com/pypa/pipenv/issues/2198) +- Locking will now pin the correct VCS ref during `pipenv update` runs. + Running `pipenv update` with a new vcs ref specified in the `Pipfile` + will now properly obtain, resolve, and install the specified dependency at + the specified ref. [#2209](https://github.com/pypa/pipenv/issues/2209) +- `pipenv clean` will now correctly ignore comments from `pip freeze` when + cleaning the environment. [#2262](https://github.com/pypa/pipenv/issues/2262) +- Resolution bugs causing packages for incompatible python versions to be + locked have been fixed. [#2267](https://github.com/pypa/pipenv/issues/2267) +- Fixed a bug causing pipenv graph to fail to display sometimes. [#2268](https://github.com/pypa/pipenv/issues/2268) +- Updated `requirementslib` to fix a bug in Pipfile parsing affecting + relative path conversions. [#2269](https://github.com/pypa/pipenv/issues/2269) +- Windows executable discovery now leverages `os.pathext`. [#2298](https://github.com/pypa/pipenv/issues/2298) +- Fixed a bug which caused `--deploy --system` to inadvertently create a + virtualenv before failing. [#2301](https://github.com/pypa/pipenv/issues/2301) +- Fixed an issue which led to a failure to unquote special characters in file + and wheel paths. [#2302](https://github.com/pypa/pipenv/issues/2302) +- VCS dependencies are now manually obtained only if they do not match the + requested ref. [#2304](https://github.com/pypa/pipenv/issues/2304) +- Added error handling functionality to properly cope with single-digit + `Requires-Python` metadata with no specifiers. [#2377](https://github.com/pypa/pipenv/issues/2377) +- `pipenv update` will now always run the resolver and lock before ensuring + dependencies are in sync with project Lockfile. [#2379](https://github.com/pypa/pipenv/issues/2379) +- Resolved a bug in our patched resolvers which could cause nondeterministic + resolution failures in certain conditions. Running `pipenv install` with no + arguments in a project with only a `Pipfile` will now correctly lock first + for dependency resolution before installing. [#2384](https://github.com/pypa/pipenv/issues/2384) +- Patched `python-dotenv` to ensure that environment variables always get + encoded to the filesystem encoding. [#2386](https://github.com/pypa/pipenv/issues/2386) + +## Improved Documentation + +- Update documentation wording to clarify Pipenv's overall role in the packaging ecosystem. [#2194](https://github.com/pypa/pipenv/issues/2194) +- Added contribution documentation and guidelines. [#2205](https://github.com/pypa/pipenv/issues/2205) +- Added instructions for supervisord compatibility. [#2215](https://github.com/pypa/pipenv/issues/2215) +- Fixed broken links to development philosophy and contribution documentation. [#2248](https://github.com/pypa/pipenv/issues/2248) + +## Vendored Libraries + +- Removed vendored `cacert.pem` which could cause issues for some users with + custom certificate settings. [#2193](https://github.com/pypa/pipenv/issues/2193) + +- Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. Updated + patched piptools version. [#2255](https://github.com/pypa/pipenv/issues/2255) + +- Updated `requirementslib` to fix a bug in Pipfile parsing affecting + relative path conversions. [#2269](https://github.com/pypa/pipenv/issues/2269) + +- Added custom shell detection library `shellingham`, a port of our changes + to `pew`. [#2363](https://github.com/pypa/pipenv/issues/2363) + +- Patched `python-dotenv` to ensure that environment variables always get + encoded to the filesystem encoding. [#2386](https://github.com/pypa/pipenv/issues/2386) + +- Updated vendored libraries. The following vendored libraries were updated: + + - distlib from version `0.2.6` to `0.2.7`. + - jinja2 from version `2.9.5` to `2.10`. + - pathlib2 from version `2.1.0` to `2.3.2`. + - parse from version `2.8.0` to `2.8.4`. + - pexpect from version `2.5.2` to `2.6.0`. + - requests from version `2.18.4` to `2.19.1`. + - idna from version `2.6` to `2.7`. + - certifi from version `2018.1.16` to `2018.4.16`. + - packaging from version `16.8` to `17.1`. + - six from version `1.10.0` to `1.11.0`. + - requirementslib from version `0.2.0` to `1.0.1`. + + In addition, scandir was vendored and patched to avoid importing host system binaries when falling back to pathlib2. [#2368](https://github.com/pypa/pipenv/issues/2368) diff --git a/CHANGELOG.rst b/CHANGELOG.rst deleted file mode 100644 index 613dd4f95c..0000000000 --- a/CHANGELOG.rst +++ /dev/null @@ -1,2375 +0,0 @@ -2023.9.1 (2023-09-01) -===================== -Pipenv 2023.9.1 (2023-09-01) -============================ - - -Features & Improvements ------------------------ - -- Top level Pipfile sys_platform markers should be transitive; adds top level platform_machine entries that are also transitive. Marker entries continue to operate the same as before. `#5892 <https://github.com/pypa/pipenv/issues/5892>`_ - -Bug Fixes ---------- - -- Apply patch for install_search_all_sources = True functionality. `#5895 <https://github.com/pypa/pipenv/issues/5895>`_ -- Relative paths improvements for editable installs. `#5896 <https://github.com/pypa/pipenv/issues/5896>`_ -- Set log level in resolver to WARN when verbose is not passed. `#5897 <https://github.com/pypa/pipenv/issues/5897>`_ -- Handle more variations in private index html to improve hash collection. `#5898 <https://github.com/pypa/pipenv/issues/5898>`_ - - -2023.8.28 (2023-08-28) -====================== - -Bug Fixes ---------- - -- Revert change that caused the credentials in source url issue. `#5878 <https://github.com/pypa/pipenv/issues/5878>`_ -- Do not treat named requirements as file installs just becacuse a match path exists; better handling of editable keyword for local file installs. - Handle additional edge cases in the setup.py ast parser logic for trying to determine local install package name. `#5885 <https://github.com/pypa/pipenv/issues/5885>`_ - - -2023.8.26 (2023-08-26) -====================== - -Bug Fixes ---------- - -- Additional property caching to avoid duplication of sources in the resolver. `#5863 <https://github.com/pypa/pipenv/issues/5863>`_ -- Fix recent regressions with local/editable file installs. `#5870 <https://github.com/pypa/pipenv/issues/5870>`_ -- Fixes the vcs subdirectory fragments regression; fixes sys_platform markers regression. `#5871 <https://github.com/pypa/pipenv/issues/5871>`_ -- Fix regression that caused printing non-printable ascii characters when help was called. `#5872 <https://github.com/pypa/pipenv/issues/5872>`_ - - -2023.8.25 (2023-08-25) -====================== - -Bug Fixes ---------- - -- Fix regression of hash collection when downloading package from private indexes when the hash is not found in the index href url fragment. `#5866 <https://github.com/pypa/pipenv/issues/5866>`_ - - -2023.8.23 (2023-08-22) -====================== - -Bug Fixes ---------- - -- More gracefully handle @ symbols in vcs URLs to address recent regression with vcs URLs. `#5849 <https://github.com/pypa/pipenv/issues/5849>`_ - - -2023.8.22 (2023-08-22) -====================== - -Bug Fixes ---------- - -- Fix regression with ``ssh://`` vcs URLs introduced in ``2023.8.21`` whereby ssh vcs URLs are expected to have at least one ``@`` symbol. `#5846 <https://github.com/pypa/pipenv/issues/5846>`_ - - -2023.8.21 (2023-08-21) -====================== - -Bug Fixes ---------- - -- Add back some relevant caching to increase performance after the major refactor released with ``2023.8.19`` `#5841 <https://github.com/pypa/pipenv/issues/5841>`_ -- Fix some edge cases around vcs dependencies without a ref, and older Pipfile/lockfile formats. `#5843 <https://github.com/pypa/pipenv/issues/5843>`_ - -Vendored Libraries ------------------- - -- Remove unused command line interface for vendored packages. `#5840 <https://github.com/pypa/pipenv/issues/5840>`_ - - -2023.8.20 (2023-08-20) -====================== - -Bug Fixes ---------- - -- Fix the expected output of the ``version`` command. `#5838 <https://github.com/pypa/pipenv/issues/5838>`_ - - -2023.8.19 (2023-08-19) -====================== - -Features & Improvements ------------------------ - -- The ``--categories`` option now works with requirements.txt file. `#5722 <https://github.com/pypa/pipenv/issues/5722>`_ - -Bug Fixes ---------- - -- Drop requirementslib for managing pip lines and InstallRequirements, bring remaining requirementslib functionality into pipenv. - Fixes numerous reports about extras installs with vcs and file installs; format pip lines correctly to not generate deprecation warnings. `#5793 <https://github.com/pypa/pipenv/issues/5793>`_ - -Vendored Libraries ------------------- - -- Update pip 23.2 -> 23.2.1 `#5822 <https://github.com/pypa/pipenv/issues/5822>`_ - -Improved Documentation ----------------------- - -- Added documentation on how to move or rename a project directory `#5129 <https://github.com/pypa/pipenv/issues/5129>`_ - -Removals and Deprecations -------------------------- - -- The ``--skip-lock`` flag which was deprecated, has now been removed to unblock modernizing the pipenv resolver code. `#5805 <https://github.com/pypa/pipenv/issues/5805>`_ - - -2023.7.23 (2023-07-23) -====================== - -Features & Improvements ------------------------ - -- Upgrades ``pip==23.2`` which includes everything from the pip changelog. Drops the "install_compatatability_finder" pip internals patch. `#5808 <https://github.com/pypa/pipenv/issues/5808>`_ - -Bug Fixes ---------- - -- Fix issue parsing some Pipfiles with separate packages.<pkg> sections (tomlkit OutOfOrderTableProxy) `#5794 <https://github.com/pypa/pipenv/issues/5794>`_ -- Fix all ruff linter warnings `#5807 <https://github.com/pypa/pipenv/issues/5807>`_ -- Restore running Resolver in sub-process using the project python by default; maintains ability to run directly by setting ``PIPENV_RESOLVER_PARENT_PYTHON`` environment variable to 1 (useful for internal debugging). `#5809 <https://github.com/pypa/pipenv/issues/5809>`_ -- Fix error when a Windows path begins with a '\' with ``pythonfinder==2.0.5``. `#5812 <https://github.com/pypa/pipenv/issues/5812>`_ - -Vendored Libraries ------------------- - -- Remove usage of click.secho in some modules. `#5804 <https://github.com/pypa/pipenv/issues/5804>`_ - - -2023.7.11 (2023-07-11) - -Bug Fixes ---------- - -- Invoke the resolver in the same process as pipenv rather than utilizing subprocess. `#5787 <https://github.com/pypa/pipenv/issues/5787>`_ -- Fix regression markers being included as None/null in requirements command. `#5788 <https://github.com/pypa/pipenv/issues/5788>`_ - - -2023.7.9 (2023-07-09) -===================== - -Bug Fixes ---------- - -- Drop the --keep-outdated flag and --selective-upgrade flags that have been deprecated in favor of update/upgrade commands. `#5730 <https://github.com/pypa/pipenv/issues/5730>`_ -- Fix regressions in the ``requirements`` command related to standard index extras and handling of local file requirements. `#5784 <https://github.com/pypa/pipenv/issues/5784>`_ - - -2023.7.4 (2023-07-04) -===================== - -Bug Fixes ---------- - -- Fixes regression on Pipfile requirements syntax. Ensure default operator is provided to requirement lib to avoid crash. `#5765 <https://github.com/pypa/pipenv/issues/5765>`_ -- Ensure hashes included in a generated requirements file are after any markers. `#5777 <https://github.com/pypa/pipenv/issues/5777>`_ - - -2023.7.3 (2023-07-02) -===================== - -Bug Fixes ---------- - -- Fix regression with ``--system`` flag usage. `#5773 <https://github.com/pypa/pipenv/issues/5773>`_ - - -2023.7.1 (2023-07-01) -===================== - -Bug Fixes ---------- - -- Patch ``_get_requests_session`` method to consider ``PIP_CLIENT_CERT`` value when present. `#5746 <https://github.com/pypa/pipenv/issues/5746>`_ -- Fix regression in ``requirements`` command that was causing package installs after upgrade to ``requirementslib==3.0.0``. `#5755 <https://github.com/pypa/pipenv/issues/5755>`_ -- Fix ``error: invalid command 'egg_info'`` edge case with requirementslib 3.0.0. It exposed pipenv resolver sometimes was using a different python than expected. `#5760 <https://github.com/pypa/pipenv/issues/5760>`_ -- Fix issue in requirementslib 3.0.0 where dependencies defined in pyproject.toml were not being included in the lock file. `#5766 <https://github.com/pypa/pipenv/issues/5766>`_ - -Removals and Deprecations -------------------------- - -- Bump dparse to 0.6.3 `#5750 <https://github.com/pypa/pipenv/issues/5750>`_ - - -2023.6.26 (2023-06-26) -====================== - -Improved Documentation ----------------------- - -- Add missing environment variable descriptions back to documentation `#missing_env_var_desc <https://github.com/pypa/pipenv/issues/missing_env_var_desc>`_ - - -2023.6.18 (2023-06-18) -====================== - -Bug Fixes ---------- - -- Fixes resolver to only consider the default index for packages when a secondary index is not specified. This brings the code into alignment with stated assumptions about index restricted packages behavior of ``pipenv``. `#5737 <https://github.com/pypa/pipenv/issues/5737>`_ - -Removals and Deprecations -------------------------- - -- Deprecation of ``--skip-lock`` flag as it bypasses the security benefits of pipenv. Plus it lacks proper deterministic support of installation from multiple package indexes. `#5737 <https://github.com/pypa/pipenv/issues/5737>`_ - - -2023.6.12 (2023-06-11) -====================== - -Bug Fixes ---------- - -- Remove the ``sys.path`` modifications and as a result fixes keyring support. `#5719 <https://github.com/pypa/pipenv/issues/5719>`_ - - -2023.6.11 (2023-06-11) -====================== - -Vendored Libraries ------------------- - -- Upgrades to ``pipdeptree==2.8.0`` which fixes edge cases of the ``pipenv graph`` command. `#5720 <https://github.com/pypa/pipenv/issues/5720>`_ - - -2023.6.2 (2023-06-02) -===================== - -Features & Improvements ------------------------ - -- Resolver performance: package sources following PEP 503 will leverage package hashes from the URL fragment, without downloading the package. `#5701 <https://github.com/pypa/pipenv/issues/5701>`_ - -Bug Fixes ---------- - -- Improve regex for python versions to handle hidden paths; handle relative paths to python better as well. `#4588 <https://github.com/pypa/pipenv/issues/4588>`_ -- Update ``pythonfinder==2.0.4`` with fix for "RecursionError: maximum recursion depth exceeded". `#5709 <https://github.com/pypa/pipenv/issues/5709>`_ - -Vendored Libraries ------------------- - -- Drop old vendored toml library. Use stdlib tomllib or tomli instead. `#5678 <https://github.com/pypa/pipenv/issues/5678>`_ -- Drop vendored library cerberus. This isn't actually used by pipenv. `#5699 <https://github.com/pypa/pipenv/issues/5699>`_ - - -2023.5.19 (2023-05-19) -====================== - -Bug Fixes ---------- - -- Consider ``--index`` argument in ``update`` and ``upgrade`` commands. `#5692 <https://github.com/pypa/pipenv/issues/5692>`_ - -Vendored Libraries ------------------- - -- Upgrade ``pythonfinder==2.0.0`` which also brings in ``pydantic==1.10.7``. `#5677 <https://github.com/pypa/pipenv/issues/5677>`_ - - -2023.4.29 (2023-04-29) -====================== - -Vendored Libraries ------------------- - -- Vendor in ``pip==23.1.2`` latest. `#5671 <https://github.com/pypa/pipenv/issues/5671>`_ -- Vendor in ``requirementslib==2.3.0`` which drops usage of ``vistir``. `#5672 <https://github.com/pypa/pipenv/issues/5672>`_ - - -2023.4.20 (2023-04-20) -====================== - -Features & Improvements ------------------------ - -- Checks environment variable ``PIP_TRUSTED_HOSTS`` when evaluating an - index specified at the command line when adding to ``Pipfile``. - - For example, this command line - - :: - - PIP_TRUSTED_HOSTS=internal.mycompany.com pipenv install pypkg --index=https://internal.mycompany.com/pypi/simple - - will add the following to the ``Pipfile``: - - :: - - [[source]] - url = 'https://internal.mycompany.com/pypi/simple' - verify_ssl = false - name = 'Internalmycompany' - - [packages] - pypkg = {version="*", index="Internalmycompany"} - - This allows users with private indexes to add them to ``Pipfile`` - initially from command line with correct permissions using environment - variable ``PIP_TRUSTED_HOSTS``. `#5572 <https://github.com/pypa/pipenv/issues/5572>`_ -- Vendor in the updates, upgrades and fixes provided by ``pip==23.1``. `#5655 <https://github.com/pypa/pipenv/issues/5655>`_ -- Replace flake8 and isort with `ruff <https://beta.ruff.rs>`_. `#ruff <https://github.com/pypa/pipenv/issues/ruff>`_ - -Bug Fixes ---------- - -- Fix regression with ``--skip-lock`` option with ``install`` command. `#5653 <https://github.com/pypa/pipenv/issues/5653>`_ - -Vendored Libraries ------------------- - -- Vendor in latest ``python-dotenv==1.0.0`` `#5656 <https://github.com/pypa/pipenv/issues/5656>`_ -- Vendor in latest available dependencies: ``attrs==23.1.0`` ``click-didyoumean==0.3.0`` ``click==8.1.3`` ``markupsafe==2.1.2`` ``pipdeptree==2.7.0`` ``shellingham==1.5.0.post1`` ``tomlkit==0.11.7`` `#5657 <https://github.com/pypa/pipenv/issues/5657>`_ -- Vendor in latest ``requirementslib==2.2.5`` which includes updates for pip 23.1 `#5659 <https://github.com/pypa/pipenv/issues/5659>`_ - -Improved Documentation ----------------------- - -- Made documentation clear about tilde-equals operator for package versions. `#5594 <https://github.com/pypa/pipenv/issues/5594>`_ - - -2023.3.20 (2023-03-19) -====================== - -No significant changes. - - -2023.3.18 (2023-03-19) -====================== - -Bug Fixes ---------- - -- Fix import error in virtualenv utility for creating new environments caused by ``2023.3.18`` release. `#5636 <https://github.com/pypa/pipenv/issues/5636>`_ - - -2023.3.18 (2023-03-18) -====================== - -Features & Improvements ------------------------ - -- Provide a more powerful solution than ``--keep-outdated`` and ``--selective-upgrade`` which are deprecated for removal. - Introducing the ``pipenv upgrade`` command which takes the same package specifiers as ``pipenv install`` and - updates the ``Pipfile`` and ``Pipfile.lock`` with a valid lock resolution that only effects the specified packages and their dependencies. - Additionally, the ``pipenv update`` command has been updated to use the ``pipenv upgrade`` routine when packages are provided, which will install sync the new lock file as well. `#5617 <https://github.com/pypa/pipenv/issues/5617>`_ - -Vendored Libraries ------------------- - -- Bump vistir to 0.8.0, requirementslib to 2.2.4. `#5635 <https://github.com/pypa/pipenv/issues/5635>`_ - - -2023.2.18 (2023-02-18) -============================= - - -Features & Improvements ------------------------ - -- ``pipenv`` now reads the system ``pip.conf`` or ``pip.ini`` file in order to determine pre-defined indexes to use for package resolution and installation. `#5297 <https://github.com/pypa/pipenv/issues/5297>`_ -- Behavior change for ``pipenv check`` now checks the default packages group of the lockfile. - Specifying ``--categories`` to override which categories to check against. - Pass ``--use-installed`` to get the prior behavior of checking the packages actually installed into the environment. `#5600 <https://github.com/pypa/pipenv/issues/5600>`_ - -Bug Fixes ---------- - -- Fix regression with detection of ``CI`` env variable being set to something other than a truthy value. `#5554 <https://github.com/pypa/pipenv/issues/5554>`_ -- Fix ``--categories`` argument inconsistency between requirements command and install/sync by allowing comma separated values or spaces. `#5570 <https://github.com/pypa/pipenv/issues/5570>`_ -- Use Nushell overlays when running ``pipenv shell``. `#5603 <https://github.com/pypa/pipenv/issues/5603>`_ - -Vendored Libraries ------------------- - -- Vendor in the ``pip==23.0`` release. `#5586 <https://github.com/pypa/pipenv/issues/5586>`_ -- Vendor in ``pip==23.0.1`` minor pt release. Updates ``pythonfinder==1.3.2``. `#5614 <https://github.com/pypa/pipenv/issues/5614>`_ - -Improved Documentation ----------------------- - -- Make some improvements to the contributing guide. `#5611 <https://github.com/pypa/pipenv/issues/5611>`_ - - -2023.2.4 (2023-02-04) -============================ - - -Bug Fixes ---------- - -- Fix overwriting of output in verbose mode `#5530 <https://github.com/pypa/pipenv/issues/5530>`_ -- Fix for resolution error when direct url includes an extras. `#5536 <https://github.com/pypa/pipenv/issues/5536>`_ - -Removals and Deprecations -------------------------- - -- Remove pytest-pypi package since it's not used anymore `#5556 <https://github.com/pypa/pipenv/issues/5556>`_ -- Remove deprecated --three flag from the CLI. `#5576 <https://github.com/pypa/pipenv/issues/5576>`_ - - -2022.12.19 (2022-12-19) -============================== - - -Bug Fixes ---------- - -- Fix for ``requirementslib`` hanging during install of remote wheels files. `#5546 <https://github.com/pypa/pipenv/issues/5546>`_ - - -2022.12.17 (2022-12-17) -============================== - - -Bug Fixes ---------- - -- virtualenv creation no longer uses ``--creator=venv`` by default; introduced two environment variables: - ``PIPENV_VIRTUALENV_CREATOR`` -- May be specified to instruct virtualenv which ``--creator=`` to use. - ``PIPENV_VIRTUALENV_COPIES`` -- When specified as truthy, instructs virtualenv to not use symlinks. `#5477 <https://github.com/pypa/pipenv/issues/5477>`_ -- Fix regression where ``path`` is not propagated to the ``Pipfile.lock``. `#5479 <https://github.com/pypa/pipenv/issues/5479>`_ -- Solve issue where null markers were getting added to lock file when extras were provided. `#5486 <https://github.com/pypa/pipenv/issues/5486>`_ -- Fix: ``update --outdated`` raises NonExistentKey with outdated dev packages `#5540 <https://github.com/pypa/pipenv/issues/5540>`_ - -Vendored Libraries ------------------- - -- Vendor in ``pip==22.3.1`` which is currently the latest version of ``pip``. `#5520 <https://github.com/pypa/pipenv/issues/5520>`_ -- * Bump version of requirementslib to 2.2.1 - * Bump version of vistir to 0.7.5 - * Bump version of colorama to 0.4.6 `#5522 <https://github.com/pypa/pipenv/issues/5522>`_ -- Bump plette version to 0.4.4 `#5539 <https://github.com/pypa/pipenv/issues/5539>`_ - - -2022.11.30 (2022-11-30) -============================== - - -Bug Fixes ---------- - -- Fix regression: pipenv does not sync indexes to lockfile. `#5508 <https://github.com/pypa/pipenv/issues/5508>`_ - - -2022.11.25 (2022-11-24) -============================== - - -Bug Fixes ---------- - -- Solving issue where ``pipenv check`` command has been broken in the published wheel distribution. `#5493 <https://github.com/pypa/pipenv/issues/5493>`_ - - -2022.11.24 (2022-11-24) -============================== - - -Bug Fixes ---------- - -- Stop building universal wheels since Python 2 is no longer supported. `#5496 <https://github.com/pypa/pipenv/issues/5496>`_ - - -2022.11.23 (2022-11-23) -============================== - - -Features & Improvements ------------------------ - -- Find nushell activate scripts. `#5470 <https://github.com/pypa/pipenv/issues/5470>`_ - -Vendored Libraries ------------------- - -- * Drop unused code from cerberus - * Drop unused module wheel `#5467 <https://github.com/pypa/pipenv/issues/5467>`_ -- * Replace yaspin spinner with rich spinner. - * Bump vistir version to 0.7.4 `#5468 <https://github.com/pypa/pipenv/issues/5468>`_ -- Bump version of requirementslib to 2.2.0 - Drop yaspin which is no longer used. - Bump vistir to version 0.7.4 - Remove parse. - Remove termcolor. - Remove idna. `#5481 <https://github.com/pypa/pipenv/issues/5481>`_ - - -2022.11.11 (2022-11-11) -============================== - - -Bug Fixes ---------- - -- Fix regression of lock generation that caused the keep-outdated behavior to be default. `#5456 <https://github.com/pypa/pipenv/issues/5456>`_ - - -2022.11.5 (2022-11-05) -============================= - - -Bug Fixes ---------- - -- Rollback the change in version of ``colorama`` due to regressions in core functionality. `#5459 <https://github.com/pypa/pipenv/issues/5459>`_ - - -2022.11.4 (2022-11-04) -============================= - - -Features & Improvements ------------------------ - -- Allow pipenv settings to be explicitly disabled more easily by assigning to the environment variable a falsy value. `#5451 <https://github.com/pypa/pipenv/issues/5451>`_ - -Bug Fixes ---------- - -- Provide an install iteration per index when ``install_search_all_sources`` is ``false`` (default behavior). - This fixes regression where install phase was using unexpected index after updating ``pip==22.3`` `#5444 <https://github.com/pypa/pipenv/issues/5444>`_ - -Vendored Libraries ------------------- - -- Drop tomli, which is not used anymore. - Bump attrs version see #5449. - Drop distlib, colorama and platformdirs - use the ones from pip._vendor. `#5450 <https://github.com/pypa/pipenv/issues/5450>`_ - - -2022.10.25 (2022-10-25) -============================== - - -Features & Improvements ------------------------ - -- Add support to export requirements file for a specified set of categories. `#5431 <https://github.com/pypa/pipenv/issues/5431>`_ - -Vendored Libraries ------------------- - -- Remove appdirs.py in favor of platformdirs. `#5420 <https://github.com/pypa/pipenv/issues/5420>`_ - -Removals and Deprecations -------------------------- - -- Remove usage of vistir.cmdparse in favor of pipenv.cmdparse `#5419 <https://github.com/pypa/pipenv/issues/5419>`_ - - -2022.10.12 (2022-10-12) -============================== - - -Improved Documentation ----------------------- - -- Update pipenv docs for with example for callabale package functions in Pipfile scripts `#5396 <https://github.com/pypa/pipenv/issues/5396>`_ - - -2022.10.11 (2022-10-11) -============================== - - -Bug Fixes ---------- - -- Revert decision to change the default isolation level because it caused problems with existing workflows; solution is to recommend users that have issues requiring pre-requisites to pass --extra-pip-args="--no-build-isolation" in their install or sync commands. `#5399 <https://github.com/pypa/pipenv/issues/5399>`_ - - -2022.10.10 (2022-10-10) -============================== - - -Features & Improvements ------------------------ - -- Add ability for callable scripts in Pipfile under [scripts]. Callables can now be added like: ``<pathed.module>:<func>`` and can also take arguments. For example: ``func = {call = "package.module:func('arg1', 'arg2')"}`` then this can be activated in the shell with ``pipenv run func`` `#5294 <https://github.com/pypa/pipenv/issues/5294>`_ - -Bug Fixes ---------- - -- Fixes regression from ``2022.10.9`` where ``Pipfile`` with ``pipenv`` section began generating new hash, - and also fix regression where lock phase did not update the hash value. `#5394 <https://github.com/pypa/pipenv/issues/5394>`_ - - -2022.10.9 (2022-10-09) -============================= - - -Behavior Changes ----------------- - -- New pipfiles show python_full_version under [requires] if specified. Previously creating a new pipenv project would only specify in the Pipfile the major and minor version, i.e. "python_version = 3.7". Now if you create a new project with a fully named python version it will record both in the Pipfile. So: "python_version = 3.7" and "python_full_version = 3.7.2" `#5345 <https://github.com/pypa/pipenv/issues/5345>`_ - -Relates to dev process changes ------------------------------- - -- Silence majority of pytest.mark warnings by registering custom marks. Can view a list of custom marks by running ``pipenv run pytest --markers`` - - -2022.10.4 (2022-10-04) -============================= - - -Bug Fixes ---------- - -- Use ``--creator=venv`` when creating virtual environments to avoid issue with sysconfig ``posix_prefix`` on some systems. `#5075 <https://github.com/pypa/pipenv/issues/5075>`_ -- Prefer to use the lockfile sources if available during the install phase. `#5380 <https://github.com/pypa/pipenv/issues/5380>`_ - -Vendored Libraries ------------------- - -- Drop vendored six - we no longer depend on this library, as we migrated from pipfile to plette. `#5187 <https://github.com/pypa/pipenv/issues/5187>`_ - - -2022.9.24 (2022-09-24) -============================= - - -Bug Fixes ---------- - -- Update ``requirementslib==2.0.3`` to always evaluate the requirement markers fresh (without lru_cache) to fix marker determinism issue. `#4660 <https://github.com/pypa/pipenv/issues/4660>`_ - - -2022.9.21 (2022-09-21) -============================= - - -Bug Fixes ---------- - -- Fix regression to ``install --skip-lock`` with update to ``plette``. `#5368 <https://github.com/pypa/pipenv/issues/5368>`_ - - -2022.9.20 (2022-09-20) -============================= - - -Behavior Changes ----------------- - -- Remove usage of pipfile module in favour of Plette. - pipfile is not actively maintained anymore. Plette is actively maintained, - and has stricter checking of the Pipefile and Pipefile.lock. As a result, - Pipefile with unnamed package indices will fail to lock. If a Pipefile - was hand crafeted, and the source is anonymous an error will be thrown. - The solution is simple, add a name to your index, e.g, replace:: - - [[source]] - url = "https://pypi.acme.com/simple" - verify_ssl = true - - With:: - - [[source]] - url = "https://pypi.acme.com/simple" - verify_ssl = true - name = acmes_private_index `#5339 <https://github.com/pypa/pipenv/issues/5339>`_ - -Bug Fixes ---------- - -- Modernize ``pipenv`` path patch with ``importlib.util`` to eliminate import of ``pkg_resources`` `#5349 <https://github.com/pypa/pipenv/issues/5349>`_ - -Vendored Libraries ------------------- - -- Remove iso8601 from vendored packages since it was not used. `#5346 <https://github.com/pypa/pipenv/issues/5346>`_ - - -2022.9.8 (2022-09-08) -============================ - - -Features & Improvements ------------------------ - -- It is now possible to supply additional arguments to ``pip`` install by supplying ``--extra-pip-args="<arg1> <arg2>"`` - See the updated documentation ``Supplying additional arguments to pip`` for more details. `#5283 <https://github.com/pypa/pipenv/issues/5283>`_ - -Bug Fixes ---------- - -- Make editable detection better because not everyone specifies editable entry in the Pipfile for local editable installs. `#4784 <https://github.com/pypa/pipenv/issues/4784>`_ -- Add error handling for when the installed package setup.py does not contain valid markers. `#5329 <https://github.com/pypa/pipenv/issues/5329>`_ -- Load the dot env earlier so that ``PIPENV_CUSTOM_VENV_NAME`` is more useful across projects. `#5334 <https://github.com/pypa/pipenv/issues/5334>`_ - -Vendored Libraries ------------------- - -- Bump version of shellingham to support nushell. `#5336 <https://github.com/pypa/pipenv/issues/5336>`_ -- Bump plette to version v0.3.0 `#5337 <https://github.com/pypa/pipenv/issues/5337>`_ -- Bump version of pipdeptree `#5343 <https://github.com/pypa/pipenv/issues/5343>`_ - -Removals and Deprecations -------------------------- - -- Add deprecation warning to the --three flag. Pipenv now uses python3 by default. `#5328 <https://github.com/pypa/pipenv/issues/5328>`_ - -Relates to dev process changes ------------------------------- - -- Convert the test runner to use ``pypiserver`` as a standalone process for all tests that referencce internal ``pypi`` artifacts. - General refactoring of some test cases to create more variety in packages selected--preferring lighter weight packages--in existing test cases. - - -2022.9.4 (2022-09-04) -===================== - - -Bug Fixes ---------- - -- Fix the issue from ``2022.9.2`` where tarball URL packages were being skipped on batch_install. `#5306 <https://github.com/pypa/pipenv/issues/5306>`_ - - -2022.9.2 (2022-09-02) -===================== - - -Bug Fixes ---------- - -- Fix issue where unnamed constraints were provided but which are not allowed by ``pip`` resolver. `#5273 <https://github.com/pypa/pipenv/issues/5273>`_ - - -2022.8.31 (2022-08-31) -====================== - - -Features & Improvements ------------------------ - -- Performance optimization to ``batch_install`` results in a faster and less CPU intensive ``pipenv sync`` or ``pipenv install`` experience. `#5301 <https://github.com/pypa/pipenv/issues/5301>`_ - -Bug Fixes ---------- - -- ``pipenv`` now uses a ``NamedTemporaryFile`` for rsolver constraints and drops internal env var ``PIPENV_PACKAGES``. `#4925 <https://github.com/pypa/pipenv/issues/4925>`_ - -Removals and Deprecations -------------------------- - -- Remove no longer used method ``which_pip``. `#5314 <https://github.com/pypa/pipenv/issues/5314>`_ -- Drop progress bar file due to recent performance optimization to combine ``batch_install`` requirements in at most two invocations of ``pip install``. - To see progress of install pass ``--verbose`` flag and ``pip`` progress will be output in realtime. `#5315 <https://github.com/pypa/pipenv/issues/5315>`_ - - -2022.8.30 (2022-08-30) -====================== - - -Bug Fixes ---------- - -- Fix an issue when using ``pipenv install --system`` on systems that having the ``python`` executable pointing to Python 2 and a Python 3 executable being ``python3``. `#5296 <https://github.com/pypa/pipenv/issues/5296>`_ -- Sorting ``constraints`` before resolving, which fixes ``pipenv lock`` generates nondeterminism environment markers. `#5299 <https://github.com/pypa/pipenv/issues/5299>`_ -- Fix #5273, use our own method for checking if a package is a valid constraint. `#5309 <https://github.com/pypa/pipenv/issues/5309>`_ - -Vendored Libraries ------------------- - -- Vendor in ``requirementslib==2.0.1`` which fixes issue with local install not marked editable, and vendor in ``vistir==0.6.1`` which drops python2 support. - Drops ``orderedmultidict`` from vendoring. `#5308 <https://github.com/pypa/pipenv/issues/5308>`_ - - -2022.8.24 (2022-08-24) -====================== - - -Bug Fixes ---------- - -- Remove eager and unnecessary importing of ``setuptools`` and ``pkg_resources`` to avoid conflict upgrading ``setuptools``. - Roll back ``sysconfig`` patch of ``pip`` because it was problematic for some ``--system`` commands. `#5228 <https://github.com/pypa/pipenv/issues/5228>`_ - -Vendored Libraries ------------------- - -- Vendor in ``requirementslib==2.0.0`` and drop ``pip-shims`` entirely. `#5228 <https://github.com/pypa/pipenv/issues/5228>`_ -- Vendor in ``pythonfinder==1.3.1`` `#5292 <https://github.com/pypa/pipenv/issues/5292>`_ - - -2022.8.19 (2022-08-19) -====================== - - -Bug Fixes ---------- - -- Fix issue where resolver is provided with ``install_requires`` constraints from ``setup.py`` that depend on editable dependencies and could not resolve them. `#5271 <https://github.com/pypa/pipenv/issues/5271>`_ -- Fix for ``pipenv lock`` fails for packages with extras as of ``2022.8.13``. `#5274 <https://github.com/pypa/pipenv/issues/5274>`_ -- Revert the exclusion of ``BAD_PACKAGES`` from ``batch_install`` in order for ``pipenv`` to install specific versions of ``setuptools``. - To prevent issue upgrading ``setuptools`` this patches ``_USE_SYSCONFIG_DEFAULT`` to use ``sysconfig`` for ``3.7`` and above whereas ``pip`` default behavior was ``3.10`` and above. `#5275 <https://github.com/pypa/pipenv/issues/5275>`_ - - -2022.8.17 (2022-08-17) -====================== - - -Bug Fixes ---------- - -- Fix "The Python interpreter can't be found" error when running ``pipenv install --system`` with a python3 but no python. `#5261 <https://github.com/pypa/pipenv/issues/5261>`_ -- Revise pip import patch to include only ``pipenv`` from site-packages and removed ``--ignore-installed`` argument from pip install in order to fix regressions with ``--use-site-packages``. `#5265 <https://github.com/pypa/pipenv/issues/5265>`_ - - -2022.8.15 (2022-08-15) -====================== - - -Bug Fixes ---------- - -- ``pip_install`` method was using a different way of finding the python executable than other ``pipenv`` commands, which caused an issue with skipping package installation if it was already installed in site-packages. `#5254 <https://github.com/pypa/pipenv/issues/5254>`_ - - -2022.8.14 (2022-08-14) -====================== - - -Bug Fixes ---------- - -- Removed ``packaging`` library from ``BAD_PACKAGES`` constant to allow it to be installed, which fixes regression from ``pipenv==2022.8.13``. `#5247 <https://github.com/pypa/pipenv/issues/5247>`_ - - -2022.8.13 (2022-08-13) -====================== - - -Bug Fixes ---------- - -- If environment variable ``CI`` or ``TF_BUILD`` is set but does not evaluate to ``False`` it is now treated as ``True``. `#5128 <https://github.com/pypa/pipenv/issues/5128>`_ -- Fix auto-complete crashing on 'install' and 'uninstall' keywords `#5214 <https://github.com/pypa/pipenv/issues/5214>`_ -- Address remaining ``pipenv`` commands that were still referencing the user or system installed ``pip`` to use the vendored ``pip`` internal to ``pipenv``. `#5229 <https://github.com/pypa/pipenv/issues/5229>`_ -- Use ``packages`` as constraints when locking ``dev-packages`` in Pipfile. - Use ``packages`` as constraints when installing new ``dev-packages``. `#5234 <https://github.com/pypa/pipenv/issues/5234>`_ - -Vendored Libraries ------------------- - -- Vendor in minor ``pip`` update ``22.2.2`` `#5230 <https://github.com/pypa/pipenv/issues/5230>`_ - -Improved Documentation ----------------------- - -- Add documentation for environment variables the configure pipenv. `#5235 <https://github.com/pypa/pipenv/issues/5235>`_ - -Removals and Deprecations -------------------------- - -- The deprecated way of generating requirements ``install -r`` or ``lock -r`` has been removed in favor of the ``pipenv requirements`` command. `#5200 <https://github.com/pypa/pipenv/issues/5200>`_ - - -2022.8.5 (2022-08-05) -===================== - - -Features & Improvements ------------------------ - -- support PIPENV_CUSTOM_VENV_NAME to be the venv name if specified, update relevant docs. `#4974 <https://github.com/pypa/pipenv/issues/4974>`_ - -Bug Fixes ---------- - -- Remove usages of ``pip_shims`` from the non vendored ``pipenv`` code, but retain initialization for ``requirementslib`` still has usages. `#5204 <https://github.com/pypa/pipenv/issues/5204>`_ -- Fix case sensitivity of color name ``red`` in exception when getting hashes from pypi in ``_get_hashes_from_pypi``. `#5206 <https://github.com/pypa/pipenv/issues/5206>`_ -- Write output from ``subprocess_run`` directly to ``stdout`` instead of creating temporary file. - Remove deprecated ``distutils.sysconfig``, use ``sysconfig``. `#5210 <https://github.com/pypa/pipenv/issues/5210>`_ - -Vendored Libraries ------------------- - -- * Rename patched ``notpip`` to ``pip`` in order to be clear that its a patched version of pip. - * Remove the part of _post_pip_import.patch that overrode the standalone pip to be the user installed pip, now we fully rely on our vendored and patched ``pip``, even for all types of installs. - * Vendor in the next newest version of ``pip==22.2`` - * Modify patch for ``pipdeptree`` to not use ``pip-shims`` `#5188 <https://github.com/pypa/pipenv/issues/5188>`_ - * Remove vendored ``urllib3`` in favor of using it from vendored version in ``pip._vendor`` `#5215 <https://github.com/pypa/pipenv/issues/5215>`_ - -Removals and Deprecations -------------------------- - -- Remove tests that have been for a while been marked skipped and are no longer relevant. `#5165 <https://github.com/pypa/pipenv/issues/5165>`_ - - -2022.7.24 (2022-07-24) -====================== - - -Bug Fixes ---------- - -- Re-enabled three installs tests again on the Windows CI as recent refactor work has fixed them. `#5064 <https://github.com/pypa/pipenv/issues/5064>`_ -- Support ANSI ``NO_COLOR`` environment variable and deprecate ``PIPENV_COLORBLIND`` variable, which will be removed after this release. `#5158 <https://github.com/pypa/pipenv/issues/5158>`_ -- Fixed edge case where a non-editable file, url or vcs would overwrite the value ``no_deps`` for all other requirements in the loop causing a retry condition. `#5164 <https://github.com/pypa/pipenv/issues/5164>`_ -- Vendor in latest ``requirementslib`` for fix to lock when using editable VCS module with specific ``@`` git reference. `#5179 <https://github.com/pypa/pipenv/issues/5179>`_ - -Vendored Libraries ------------------- - -- Remove crayons and replace with click.secho and click.styles per https://github.com/pypa/pipenv/issues/3741 `#3741 <https://github.com/pypa/pipenv/issues/3741>`_ -- Vendor in latest version of ``pip==22.1.2`` which upgrades ``pipenv`` from ``pip==22.0.4``. - Vendor in latest version of ``requirementslib==1.6.7`` which includes a fix for tracebacks on encountering Annotated variables. - Vendor in latest version of ``pip-shims==0.7.3`` such that imports could be rewritten to utilize ``packaging`` from vendor'd ``pip``. - Drop the ``packaging`` requirement from the ``vendor`` directory in ``pipenv``. `#5147 <https://github.com/pypa/pipenv/issues/5147>`_ -- Remove unused vendored dependency ``normailze-charset``. `#5161 <https://github.com/pypa/pipenv/issues/5161>`_ -- Remove obsolete package ``funcsigs``. `#5168 <https://github.com/pypa/pipenv/issues/5168>`_ -- Bump vendored dependency ``pyparsing==3.0.9``. `#5170 <https://github.com/pypa/pipenv/issues/5170>`_ - - -2022.7.4 (2022-07-04) -===================== - - -Behavior Changes ----------------- - -- Adjust ``pipenv requirements`` to add markers and add an ``--exclude-markers`` option to allow the exclusion of markers. `#5092 <https://github.com/pypa/pipenv/issues/5092>`_ - -Bug Fixes ---------- - -- Stopped expanding environment variables when using ``pipenv requirements`` `#5134 <https://github.com/pypa/pipenv/issues/5134>`_ - -Vendored Libraries ------------------- - -- Depend on ``requests`` and ``certifi`` from vendored ``pip`` and remove them as explicit vendor dependencies. `#5000 <https://github.com/pypa/pipenv/issues/5000>`_ -- Vendor in the latest version of ``requirementslib==1.6.5`` which includes bug fixes for beta python versions, projects with an at sign (@) in the path, and a ``setuptools`` deprecation warning. `#5132 <https://github.com/pypa/pipenv/issues/5132>`_ - -Relates to dev process changes ------------------------------- - -- Switch from using type comments to type annotations. - - -2022.5.3.dev0 (2022-06-07) -========================== - - -Bug Fixes ---------- - -- Adjust pipenv to work with the newly added ``venv`` install scheme in Python. - First check if ``venv`` is among the available install schemes, and use it if it is. Otherwise fall back to the ``nt`` or ``posix_prefix`` install schemes as before. This should produce no change for environments where the install schemes were not redefined. `#5096 <https://github.com/pypa/pipenv/issues/5096>`_ - - -2022.5.2 (2022-05-02) -===================== - - -Bug Fixes ---------- - -- Fixes issue of ``pipenv lock -r`` command printing to stdout instead of stderr. `#5091 <https://github.com/pypa/pipenv/issues/5091>`_ - - -2022.4.30 (2022-04-30) -====================== - - -Bug Fixes ---------- - -- Fixes issue of ``requirements`` command problem by modifying to print ``-e`` and path of the editable package. `#5070 <https://github.com/pypa/pipenv/issues/5070>`_ -- Revert specifier of ``setuptools`` requirement in ``setup.py`` back to what it was in order to fix ``FileNotFoundError: [Errno 2]`` issue report. `#5075 <https://github.com/pypa/pipenv/issues/5075>`_ -- Fixes issue of requirements command where git requirements cause the command to fail, solved by using existing convert_deps_to_pip function. `#5076 <https://github.com/pypa/pipenv/issues/5076>`_ - -Vendored Libraries ------------------- - -- Vendor in ``requirementslib==1.6.4`` to Fix ``SetuptoolsDeprecationWarning`` ``setuptools.config.read_configuration`` became deprecated. `#5081 <https://github.com/pypa/pipenv/issues/5081>`_ - -Removals and Deprecations -------------------------- - -- Remove more usage of misc functions of vistir. Many of this function are available in the STL or in another dependency of pipenv. `#5078 <https://github.com/pypa/pipenv/issues/5078>`_ - - -2022.4.21 (2022-04-21) -====================== - - -Removals and Deprecations -------------------------- - -- Updated setup.py to remove support for python 3.6 from built ``pipenv`` packages' Metadata. `#5065 <https://github.com/pypa/pipenv/issues/5065>`_ - - -2022.4.20 (2022-04-20) -====================== - - -Features & Improvements ------------------------ - -- Added new Pipenv option ``install_search_all_sources`` that allows installation of packages from an - existing ``Pipfile.lock`` to search all defined indexes for the constrained package version and hash signatures. `#5041 <https://github.com/pypa/pipenv/issues/5041>`_ - -Bug Fixes ---------- - -- allow the user to disable the ``no_input`` flag, so the use of e.g Google Artifact Registry is possible. `#4706 <https://github.com/pypa/pipenv/issues/4706>`_ -- Fixes case where packages could fail to install and the exit code was successful. `#5031 <https://github.com/pypa/pipenv/issues/5031>`_ - -Vendored Libraries ------------------- - -- Updated vendor version of ``pip`` from ``21.2.2`` to ``22.0.4`` which fixes a number of bugs including - several reports of pipenv locking for an infinite amount of time when using certain package constraints. - This also drops support for python 3.6 as it is EOL and support was removed in pip 22.x `#4995 <https://github.com/pypa/pipenv/issues/4995>`_ - -Removals and Deprecations -------------------------- - -- Removed the vendor dependency ``more-itertools`` as it was originally added for ``zipp``, which since stopped using it. `#5044 <https://github.com/pypa/pipenv/issues/5044>`_ -- Removed all usages of ``pipenv.vendor.vistir.compat.fs_str``, since this function was used for PY2-PY3 compatibility and is no longer needed. `#5062 <https://github.com/pypa/pipenv/issues/5062>`_ - -Relates to dev process changes ------------------------------- - -- Added pytest-cov and basic configuration to the project for generating html testing coverage reports. -- Make all CI jobs run only after the lint stage. Also added a makefile target for vendoring the packages. - - -2022.4.8 (2022-04-08) -===================== - - -Features & Improvements ------------------------ - -- Implements a ``pipenv requirements`` command which generates a requirements.txt compatible output without locking. `#4959 <https://github.com/pypa/pipenv/issues/4959>`_ -- Internal to pipenv, the utils.py was split into a utils module with unused code removed. `#4992 <https://github.com/pypa/pipenv/issues/4992>`_ - -Bug Fixes ---------- - -- Pipenv will now ignore ``.venv`` in the project when ``PIPENV_VENV_IN_PROJECT`` variable is False. - Unset variable maintains the existing behavior of preferring to use the project's ``.venv`` should it exist. `#2763 <https://github.com/pypa/pipenv/issues/2763>`_ -- Fix an edge case of hash collection in index restricted packages whereby the hashes for some packages would - be missing from the ``Pipfile.lock`` following package index restrictions added in ``pipenv==2022.3.23``. `#5023 <https://github.com/pypa/pipenv/issues/5023>`_ - -Improved Documentation ----------------------- - -- Pipenv CLI documentation generation has been fixed. It had broke when ``click`` was vendored into the project in - ``2021.11.9`` because by default ``sphinx-click`` could no longer determine the CLI inherited from click. `#4778 <https://github.com/pypa/pipenv/issues/4778>`_ -- Improve documentation around extra indexes and index restricted packages. `#5022 <https://github.com/pypa/pipenv/issues/5022>`_ - -Removals and Deprecations -------------------------- - -- Removes the optional ``install`` argument ``--extra-index-url`` as it was not compatible with index restricted packages. - Using the ``--index`` argument is the correct way to specify a package should be pulled from the non-default index. `#5022 <https://github.com/pypa/pipenv/issues/5022>`_ - -Relates to dev process changes ------------------------------- - -- Added code linting using pre-commit-hooks, black, flake8, isort, pygrep-hooks, news-fragments and check-manifest. - Very similar to pip's configuration; adds a towncrier new's type ``process`` for change to Development processes. - - -2022.3.28 (2022-03-27) -====================== - - -Bug Fixes ---------- - -- Environment variables were not being loaded when the ``--quiet`` flag was set `#5010 <https://github.com/pypa/pipenv/issues/5010>`_ -- It would appear that ``requirementslib`` was not fully specifying the subdirectory to ``build_pep517`` and - and when a new version of ``setuptools`` was released, the test ``test_lock_nested_vcs_direct_url`` - broke indicating the Pipfile.lock no longer contained the extra dependencies that should have been resolved. - This regression affected ``pipenv>=2021.11.9`` but has been fixed by a patch to ``requirementslib``. `#5019 <https://github.com/pypa/pipenv/issues/5019>`_ - -Vendored Libraries ------------------- - -- Vendor in pip==21.2.4 (from 21.2.2) in order to bring in requested bug fix for python3.6. Note: support for 3.6 will be dropped in a subsequent release. `#5008 <https://github.com/pypa/pipenv/issues/5008>`_ - - -2022.3.24 (2022-03-23) -====================== - - -Features & Improvements ------------------------ - -- It is now possible to silence the ``Loading .env environment variables`` message on ``pipenv run`` - with the ``--quiet`` flag or the ``PIPENV_QUIET`` environment variable. `#4027 <https://github.com/pypa/pipenv/issues/4027>`_ - -Bug Fixes ---------- - -- Fixes issue with new index safety restriction, whereby an unnamed extra sources index - caused and error to be thrown during install. `#5002 <https://github.com/pypa/pipenv/issues/5002>`_ -- The text ``Loading .env environment variables...`` has been switched back to stderr as to not - break requirements.txt generation. Also it only prints now when a ``.env`` file is actually present. `#5003 <https://github.com/pypa/pipenv/issues/5003>`_ - - -2022.3.23 (2022-03-22) -====================== - - -Features & Improvements ------------------------ - -- Use environment variable ``PIPENV_SKIP_LOCK`` to control the behaviour of lock skipping. `#4797 <https://github.com/pypa/pipenv/issues/4797>`_ -- New CLI command ``verify``, checks the Pipfile.lock is up-to-date `#4893 <https://github.com/pypa/pipenv/issues/4893>`_ - -Behavior Changes ----------------- - -- Pattern expansion for arguments was disabled on Windows. `#4935 <https://github.com/pypa/pipenv/issues/4935>`_ - -Bug Fixes ---------- - -- Python versions on Windows can now be installed automatically through pyenv-win `#4525 <https://github.com/pypa/pipenv/issues/4525>`_ -- Patched our vendored Pip to fix: Pipenv Lock (Or Install) Does Not Respect Index Specified For A Package. `#4637 <https://github.com/pypa/pipenv/issues/4637>`_ -- If ``PIP_TARGET`` is set to environment variables, Refer specified directory for calculate delta, instead default directory `#4775 <https://github.com/pypa/pipenv/issues/4775>`_ -- Remove remaining mention of python2 and --two flag from codebase. `#4938 <https://github.com/pypa/pipenv/issues/4938>`_ -- Use ``CI`` environment value, over mere existence of name `#4944 <https://github.com/pypa/pipenv/issues/4944>`_ -- Environment variables from dot env files are now properly expanded when included in scripts. `#4975 <https://github.com/pypa/pipenv/issues/4975>`_ - -Vendored Libraries ------------------- - -- Updated vendor version of ``pythonfinder`` from ``1.2.9`` to ``1.2.10`` which fixes a bug with WSL - (Windows Subsystem for Linux) when a path can not be read and Permission Denied error is encountered. `#4976 <https://github.com/pypa/pipenv/issues/4976>`_ - -Removals and Deprecations -------------------------- - -- Removes long broken argument ``--code`` from ``install`` and ``--unused`` from ``check``. - Check command no longer takes in arguments to ignore. - Removed the vendored dependencies: ``pipreqs`` and ``yarg`` `#4998 <https://github.com/pypa/pipenv/issues/4998>`_ - - -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>`_ - - -2020.8.13 (2020-08-13) -====================== - -Bug Fixes ---------- - -- Fixed behaviour of ``pipenv uninstall --all-dev``. - From now on it does not uninstall regular packages. `#3722 <https://github.com/pypa/pipenv/issues/3722>`_ -- Fix a bug that incorrect Python path will be used when ``--system`` flag is on. `#4315 <https://github.com/pypa/pipenv/issues/4315>`_ -- Fix falsely flagging a Homebrew installed Python as a virtual environment `#4316 <https://github.com/pypa/pipenv/issues/4316>`_ -- Fix a bug that ``pipenv uninstall`` throws an exception that does not exist. `#4321 <https://github.com/pypa/pipenv/issues/4321>`_ -- Fix a bug that Pipenv can't locate the correct file of special directives in ``setup.cfg`` of an editable package. `#4335 <https://github.com/pypa/pipenv/issues/4335>`_ -- Fix a bug that ``setup.py`` can't be parsed correctly when the assignment is type-annotated. `#4342 <https://github.com/pypa/pipenv/issues/4342>`_ -- Fix a bug that ``pipenv graph`` throws an exception that PipenvCmdError(cmd_string, c.out, c.err, return_code). `#4388 <https://github.com/pypa/pipenv/issues/4388>`_ -- Do not copy the whole directory tree of local file package. `#4403 <https://github.com/pypa/pipenv/issues/4403>`_ -- Correctly detect whether Pipenv in run under an activated virtualenv. `#4412 <https://github.com/pypa/pipenv/issues/4412>`_ - -Vendored Libraries ------------------- - -- Update ``requirementslib`` to ``1.5.12``. `#4385 <https://github.com/pypa/pipenv/issues/4385>`_ -- * Update ``requirements`` to ``1.5.13``. - * Update ``pip-shims`` to ``0.5.3``. `#4421 <https://github.com/pypa/pipenv/issues/4421>`_ - - -2020.6.2 (2020-06-02) -===================== - -Features & Improvements ------------------------ - -- Pipenv will now detect existing ``venv`` and ``virtualenv`` based virtual environments more robustly. `#4276 <https://github.com/pypa/pipenv/issues/4276>`_ - -Bug Fixes ---------- - -- ``+`` signs in URL authentication fragments will no longer be incorrectly replaced with space ( `` `` ) characters. `#4271 <https://github.com/pypa/pipenv/issues/4271>`_ -- Fixed a regression which caused Pipenv to fail when running under ``/``. `#4273 <https://github.com/pypa/pipenv/issues/4273>`_ -- ``setup.py`` files with ``version`` variables read from ``os.environ`` are now able to be parsed successfully. `#4274 <https://github.com/pypa/pipenv/issues/4274>`_ -- Fixed a bug which caused Pipenv to fail to install packages in a virtual environment if those packages were already present in the system global environment. `#4276 <https://github.com/pypa/pipenv/issues/4276>`_ -- Fix a bug that caused non-specific versions to be pinned in ``Pipfile.lock``. `#4278 <https://github.com/pypa/pipenv/issues/4278>`_ -- Corrected a missing exception import and invalid function call invocations in ``pipenv.cli.command``. `#4286 <https://github.com/pypa/pipenv/issues/4286>`_ -- Fixed an issue with resolving packages with names defined by function calls in ``setup.py``. `#4292 <https://github.com/pypa/pipenv/issues/4292>`_ -- Fixed a regression with installing the current directory, or ``.``, inside a ``venv`` based virtual environment. `#4295 <https://github.com/pypa/pipenv/issues/4295>`_ -- Fixed a bug with the discovery of python paths on Windows which could prevent installation of environments during ``pipenv install``. `#4296 <https://github.com/pypa/pipenv/issues/4296>`_ -- Fixed an issue in the ``requirementslib`` AST parser which prevented parsing of ``setup.py`` files for dependency metadata. `#4298 <https://github.com/pypa/pipenv/issues/4298>`_ -- Fix a bug where Pipenv doesn't realize the session is interactive `#4305 <https://github.com/pypa/pipenv/issues/4305>`_ - -Vendored Libraries ------------------- - -- Updated requirementslib to version ``1.5.11``. `#4292 <https://github.com/pypa/pipenv/issues/4292>`_ -- Updated vendored dependencies: - - **pythonfinder**: ``1.2.2`` => ``1.2.4`` - - **requirementslib**: ``1.5.9`` => ``1.5.10`` `#4302 <https://github.com/pypa/pipenv/issues/4302>`_ - - -2020.5.28 (2020-05-28) -====================== - -Features & Improvements ------------------------ - -- ``pipenv install`` and ``pipenv sync`` will no longer attempt to install satisfied dependencies during installation. `#3057 <https://github.com/pypa/pipenv/issues/3057>`_, - `#3506 <https://github.com/pypa/pipenv/issues/3506>`_ -- Added support for resolution of direct-url dependencies in ``setup.py`` files to respect ``PEP-508`` style URL dependencies. `#3148 <https://github.com/pypa/pipenv/issues/3148>`_ -- Added full support for resolution of all dependency types including direct URLs, zip archives, tarballs, etc. - - - Improved error handling and formatting. - - - Introduced improved cross platform stream wrappers for better ``stdout`` and ``stderr`` consistency. `#3298 <https://github.com/pypa/pipenv/issues/3298>`_ -- For consistency with other commands and the ``--dev`` option - description, ``pipenv lock --requirements --dev`` now emits - both default and development dependencies. - The new ``--dev-only`` option requests the previous - behaviour (e.g. to generate a ``dev-requirements.txt`` file). `#3316 <https://github.com/pypa/pipenv/issues/3316>`_ -- Pipenv will now successfully recursively lock VCS sub-dependencies. `#3328 <https://github.com/pypa/pipenv/issues/3328>`_ -- Added support for ``--verbose`` output to ``pipenv run``. `#3348 <https://github.com/pypa/pipenv/issues/3348>`_ -- Pipenv will now discover and resolve the intrinsic dependencies of **all** VCS dependencies, whether they are editable or not, to prevent resolution conflicts. `#3368 <https://github.com/pypa/pipenv/issues/3368>`_ -- Added a new environment variable, ``PIPENV_RESOLVE_VCS``, to toggle dependency resolution off for non-editable VCS, file, and URL based dependencies. `#3577 <https://github.com/pypa/pipenv/issues/3577>`_ -- Added the ability for Windows users to enable emojis by setting ``PIPENV_HIDE_EMOJIS=0``. `#3595 <https://github.com/pypa/pipenv/issues/3595>`_ -- Allow overriding PIPENV_INSTALL_TIMEOUT environment variable (in seconds). `#3652 <https://github.com/pypa/pipenv/issues/3652>`_ -- Allow overriding PIP_EXISTS_ACTION environment variable (value is passed to pip install). - Possible values here: https://pip.pypa.io/en/stable/reference/pip/#exists-action-option - Useful when you need to ``PIP_EXISTS_ACTION=i`` (ignore existing packages) - great for CI environments, where you need really fast setup. `#3738 <https://github.com/pypa/pipenv/issues/3738>`_ -- Pipenv will no longer forcibly override ``PIP_NO_DEPS`` on all vcs and file dependencies as resolution happens on these in a pre-lock step. `#3763 <https://github.com/pypa/pipenv/issues/3763>`_ -- Improved verbose logging output during ``pipenv lock`` will now stream output to the console while maintaining a spinner. `#3810 <https://github.com/pypa/pipenv/issues/3810>`_ -- Added support for automatic python installs via ``asdf`` and associated ``PIPENV_DONT_USE_ASDF`` environment variable. `#4018 <https://github.com/pypa/pipenv/issues/4018>`_ -- Pyenv/asdf can now be used whether or not they are available on PATH. Setting PYENV_ROOT/ASDF_DIR in a Pipenv's .env allows Pipenv to install an interpreter without any shell customizations, so long as pyenv/asdf is installed. `#4245 <https://github.com/pypa/pipenv/issues/4245>`_ -- Added ``--key`` command line parameter for including personal PyUp.io API tokens when running ``pipenv check``. `#4257 <https://github.com/pypa/pipenv/issues/4257>`_ - -Behavior Changes ----------------- - -- Make conservative checks of known exceptions when subprocess returns output, so user won't see the whole traceback - just the error. `#2553 <https://github.com/pypa/pipenv/issues/2553>`_ -- Do not touch Pipfile early and rely on it so that one can do ``pipenv sync`` without a Pipfile. `#3386 <https://github.com/pypa/pipenv/issues/3386>`_ -- Re-enable ``--help`` option for ``pipenv run`` command. `#3844 <https://github.com/pypa/pipenv/issues/3844>`_ -- Make sure ``pipenv lock -r --pypi-mirror {MIRROR_URL}`` will respect the pypi-mirror in requirements output. `#4199 <https://github.com/pypa/pipenv/issues/4199>`_ - -Bug Fixes ---------- - -- Raise ``PipenvUsageError`` when [[source]] does not contain url field. `#2373 <https://github.com/pypa/pipenv/issues/2373>`_ -- Fixed a bug which caused editable package resolution to sometimes fail with an unhelpful setuptools-related error message. `#2722 <https://github.com/pypa/pipenv/issues/2722>`_ -- Fixed an issue which caused errors due to reliance on the system utilities ``which`` and ``where`` which may not always exist on some systems. - - Fixed a bug which caused periodic failures in python discovery when executables named ``python`` were not present on the target ``$PATH``. `#2783 <https://github.com/pypa/pipenv/issues/2783>`_ -- Dependency resolution now writes hashes for local and remote files to the lockfile. `#3053 <https://github.com/pypa/pipenv/issues/3053>`_ -- Fixed a bug which prevented ``pipenv graph`` from correctly showing all dependencies when running from within ``pipenv shell``. `#3071 <https://github.com/pypa/pipenv/issues/3071>`_ -- Fixed resolution of direct-url dependencies in ``setup.py`` files to respect ``PEP-508`` style URL dependencies. `#3148 <https://github.com/pypa/pipenv/issues/3148>`_ -- Fixed a bug which caused failures in warning reporting when running pipenv inside a virtualenv under some circumstances. - - - Fixed a bug with package discovery when running ``pipenv clean``. `#3298 <https://github.com/pypa/pipenv/issues/3298>`_ -- Quote command arguments with carets (``^``) on Windows to work around unintended shell escapes. `#3307 <https://github.com/pypa/pipenv/issues/3307>`_ -- Handle alternate names for UTF-8 encoding. `#3313 <https://github.com/pypa/pipenv/issues/3313>`_ -- Abort pipenv before adding the non-exist package to Pipfile. `#3318 <https://github.com/pypa/pipenv/issues/3318>`_ -- Don't normalize the package name user passes in. `#3324 <https://github.com/pypa/pipenv/issues/3324>`_ -- Fix a bug where custom virtualenv can not be activated with pipenv shell `#3339 <https://github.com/pypa/pipenv/issues/3339>`_ -- Fix a bug that ``--site-packages`` flag is not recognized. `#3351 <https://github.com/pypa/pipenv/issues/3351>`_ -- Fix a bug where pipenv --clear is not working `#3353 <https://github.com/pypa/pipenv/issues/3353>`_ -- Fix unhashable type error during ``$ pipenv install --selective-upgrade`` `#3384 <https://github.com/pypa/pipenv/issues/3384>`_ -- Dependencies with direct ``PEP508`` compliant VCS URLs specified in their ``install_requires`` will now be successfully locked during the resolution process. `#3396 <https://github.com/pypa/pipenv/issues/3396>`_ -- Fixed a keyerror which could occur when locking VCS dependencies in some cases. `#3404 <https://github.com/pypa/pipenv/issues/3404>`_ -- Fixed a bug that ``ValidationError`` is thrown when some fields are missing in source section. `#3427 <https://github.com/pypa/pipenv/issues/3427>`_ -- Updated the index names in lock file when source name in Pipfile is changed. `#3449 <https://github.com/pypa/pipenv/issues/3449>`_ -- Fixed an issue which caused ``pipenv install --help`` to show duplicate entries for ``--pre``. `#3479 <https://github.com/pypa/pipenv/issues/3479>`_ -- Fix bug causing ``[SSL: CERTIFICATE_VERIFY_FAILED]`` when Pipfile ``[[source]]`` has verify_ssl=false and url with custom port. `#3502 <https://github.com/pypa/pipenv/issues/3502>`_ -- Fix ``sync --sequential`` ignoring ``pip install`` errors and logs. `#3537 <https://github.com/pypa/pipenv/issues/3537>`_ -- Fix the issue that lock file can't be created when ``PIPENV_PIPFILE`` is not under working directory. `#3584 <https://github.com/pypa/pipenv/issues/3584>`_ -- Pipenv will no longer inadvertently set ``editable=True`` on all vcs dependencies. `#3647 <https://github.com/pypa/pipenv/issues/3647>`_ -- The ``--keep-outdated`` argument to ``pipenv install`` and ``pipenv lock`` will now drop specifier constraints when encountering editable dependencies. - - In addition, ``--keep-outdated`` will retain specifiers that would otherwise be dropped from any entries that have not been updated. `#3656 <https://github.com/pypa/pipenv/issues/3656>`_ -- Fixed a bug which sometimes caused pipenv to fail to respect the ``--site-packages`` flag when passed with ``pipenv install``. `#3718 <https://github.com/pypa/pipenv/issues/3718>`_ -- Normalize the package names to lowercase when comparing used and in-Pipfile packages. `#3745 <https://github.com/pypa/pipenv/issues/3745>`_ -- ``pipenv update --outdated`` will now correctly handle comparisons between pre/post-releases and normal releases. `#3766 <https://github.com/pypa/pipenv/issues/3766>`_ -- Fixed a ``KeyError`` which could occur when pinning outdated VCS dependencies via ``pipenv lock --keep-outdated``. `#3768 <https://github.com/pypa/pipenv/issues/3768>`_ -- Resolved an issue which caused resolution to fail when encountering poorly formatted ``python_version`` markers in ``setup.py`` and ``setup.cfg`` files. `#3786 <https://github.com/pypa/pipenv/issues/3786>`_ -- Fix a bug that installation errors are displayed as a list. `#3794 <https://github.com/pypa/pipenv/issues/3794>`_ -- Update ``pythonfinder`` to fix a problem that ``python.exe`` will be mistakenly chosen for - virtualenv creation under WSL. `#3807 <https://github.com/pypa/pipenv/issues/3807>`_ -- Fixed several bugs which could prevent editable VCS dependencies from being installed into target environments, even when reporting successful installation. `#3809 <https://github.com/pypa/pipenv/issues/3809>`_ -- ``pipenv check --system`` should find the correct Python interpreter when ``python`` does not exist on the system. `#3819 <https://github.com/pypa/pipenv/issues/3819>`_ -- Resolve the symlinks when the path is absolute. `#3842 <https://github.com/pypa/pipenv/issues/3842>`_ -- Pass ``--pre`` and ``--clear`` options to ``pipenv update --outdated``. `#3879 <https://github.com/pypa/pipenv/issues/3879>`_ -- Fixed a bug which prevented resolution of direct URL dependencies which have PEP508 style direct url VCS sub-dependencies with subdirectories. `#3976 <https://github.com/pypa/pipenv/issues/3976>`_ -- Honor PIPENV_SPINNER environment variable `#4045 <https://github.com/pypa/pipenv/issues/4045>`_ -- Fixed an issue with ``pipenv check`` failing due to an invalid API key from ``pyup.io``. `#4188 <https://github.com/pypa/pipenv/issues/4188>`_ -- Fixed a bug which caused versions from VCS dependencies to be included in ``Pipfile.lock`` inadvertently. `#4217 <https://github.com/pypa/pipenv/issues/4217>`_ -- Fixed a bug which caused pipenv to search non-existent virtual environments for ``pip`` when installing using ``--system``. `#4220 <https://github.com/pypa/pipenv/issues/4220>`_ -- ``Requires-Python`` values specifying constraint versions of python starting from ``1.x`` will now be parsed successfully. `#4226 <https://github.com/pypa/pipenv/issues/4226>`_ -- Fix a bug of ``pipenv update --outdated`` that can't print output correctly. `#4229 <https://github.com/pypa/pipenv/issues/4229>`_ -- Fixed a bug which caused pipenv to prefer source distributions over wheels from ``PyPI`` during the dependency resolution phase. - Fixed an issue which prevented proper build isolation using ``pep517`` based builders during dependency resolution. `#4231 <https://github.com/pypa/pipenv/issues/4231>`_ -- Don't fallback to system Python when no matching Python version is found. `#4232 <https://github.com/pypa/pipenv/issues/4232>`_ - -Vendored Libraries ------------------- - -- Updated vendored dependencies: - - - **attrs**: ``18.2.0`` => ``19.1.0`` - - **certifi**: ``2018.10.15`` => ``2019.3.9`` - - **cached_property**: ``1.4.3`` => ``1.5.1`` - - **cerberus**: ``1.2.0`` => ``1.3.1`` - - **click-completion**: ``0.5.0`` => ``0.5.1`` - - **colorama**: ``0.3.9`` => ``0.4.1`` - - **distlib**: ``0.2.8`` => ``0.2.9`` - - **idna**: ``2.7`` => ``2.8`` - - **jinja2**: ``2.10.0`` => ``2.10.1`` - - **markupsafe**: ``1.0`` => ``1.1.1`` - - **orderedmultidict**: ``(new)`` => ``1.0`` - - **packaging**: ``18.0`` => ``19.0`` - - **parse**: ``1.9.0`` => ``1.12.0`` - - **pathlib2**: ``2.3.2`` => ``2.3.3`` - - **pep517**: ``(new)`` => ``0.5.0`` - - **pexpect**: ``4.6.0`` => ``4.7.0`` - - **pipdeptree**: ``0.13.0`` => ``0.13.2`` - - **pyparsing**: ``2.2.2`` => ``2.3.1`` - - **python-dotenv**: ``0.9.1`` => ``0.10.2`` - - **pythonfinder**: ``1.1.10`` => ``1.2.1`` - - **pytoml**: ``(new)`` => ``0.1.20`` - - **requests**: ``2.20.1`` => ``2.21.0`` - - **requirementslib**: ``1.3.3`` => ``1.5.0`` - - **scandir**: ``1.9.0`` => ``1.10.0`` - - **shellingham**: ``1.2.7`` => ``1.3.1`` - - **six**: ``1.11.0`` => ``1.12.0`` - - **tomlkit**: ``0.5.2`` => ``0.5.3`` - - **urllib3**: ``1.24`` => ``1.25.2`` - - **vistir**: ``0.3.0`` => ``0.4.1`` - - **yaspin**: ``0.14.0`` => ``0.14.3`` - - - Removed vendored dependency **cursor**. `#3298 <https://github.com/pypa/pipenv/issues/3298>`_ -- Updated ``pip_shims`` to support ``--outdated`` with new pip versions. `#3766 <https://github.com/pypa/pipenv/issues/3766>`_ -- Update vendored dependencies and invocations - - - Update vendored and patched dependencies - - Update patches on ``piptools``, ``pip``, ``pip-shims``, ``tomlkit`` - - Fix invocations of dependencies - - Fix custom ``InstallCommand`` instantiation - - Update ``PackageFinder`` usage - - Fix ``Bool`` stringify attempts from ``tomlkit`` - - Updated vendored dependencies: - - **attrs**: ```18.2.0`` => ```19.1.0`` - - **certifi**: ```2018.10.15`` => ```2019.3.9`` - - **cached_property**: ```1.4.3`` => ```1.5.1`` - - **cerberus**: ```1.2.0`` => ```1.3.1`` - - **click**: ```7.0.0`` => ```7.1.1`` - - **click-completion**: ```0.5.0`` => ```0.5.1`` - - **colorama**: ```0.3.9`` => ```0.4.3`` - - **contextlib2**: ```(new)`` => ```0.6.0.post1`` - - **distlib**: ```0.2.8`` => ```0.2.9`` - - **funcsigs**: ```(new)`` => ```1.0.2`` - - **importlib_metadata** ```1.3.0`` => ```1.5.1`` - - **importlib-resources**: ```(new)`` => ```1.4.0`` - - **idna**: ```2.7`` => ```2.9`` - - **jinja2**: ```2.10.0`` => ```2.11.1`` - - **markupsafe**: ```1.0`` => ```1.1.1`` - - **more-itertools**: ```(new)`` => ```5.0.0`` - - **orderedmultidict**: ```(new)`` => ```1.0`` - - **packaging**: ```18.0`` => ```19.0`` - - **parse**: ```1.9.0`` => ```1.15.0`` - - **pathlib2**: ```2.3.2`` => ```2.3.3`` - - **pep517**: ```(new)`` => ```0.5.0`` - - **pexpect**: ```4.6.0`` => ```4.8.0`` - - **pip-shims**: ```0.2.0`` => ```0.5.1`` - - **pipdeptree**: ```0.13.0`` => ```0.13.2`` - - **pyparsing**: ```2.2.2`` => ```2.4.6`` - - **python-dotenv**: ```0.9.1`` => ```0.10.2`` - - **pythonfinder**: ```1.1.10`` => ```1.2.2`` - - **pytoml**: ```(new)`` => ```0.1.20`` - - **requests**: ```2.20.1`` => ```2.23.0`` - - **requirementslib**: ```1.3.3`` => ```1.5.4`` - - **scandir**: ```1.9.0`` => ```1.10.0`` - - **shellingham**: ```1.2.7`` => ```1.3.2`` - - **six**: ```1.11.0`` => ```1.14.0`` - - **tomlkit**: ```0.5.2`` => ```0.5.11`` - - **urllib3**: ```1.24`` => ```1.25.8`` - - **vistir**: ```0.3.0`` => ```0.5.0`` - - **yaspin**: ```0.14.0`` => ```0.14.3`` - - **zipp**: ```0.6.0`` - - - Removed vendored dependency **cursor**. `#4169 <https://github.com/pypa/pipenv/issues/4169>`_ -- Add and update vendored dependencies to accommodate ``safety`` vendoring: - - **safety** ``(none)`` => ``1.8.7`` - - **dparse** ``(none)`` => ``0.5.0`` - - **pyyaml** ``(none)`` => ``5.3.1`` - - **urllib3** ``1.25.8`` => ``1.25.9`` - - **certifi** ``2019.11.28`` => ``2020.4.5.1`` - - **pyparsing** ``2.4.6`` => ``2.4.7`` - - **resolvelib** ``0.2.2`` => ``0.3.0`` - - **importlib-metadata** ``1.5.1`` => ``1.6.0`` - - **pip-shims** ``0.5.1`` => ``0.5.2`` - - **requirementslib** ``1.5.5`` => ``1.5.6`` `#4188 <https://github.com/pypa/pipenv/issues/4188>`_ -- Updated vendored ``pip`` => ``20.0.2`` and ``pip-tools`` => ``5.0.0``. `#4215 <https://github.com/pypa/pipenv/issues/4215>`_ -- Updated vendored dependencies to latest versions for security and bug fixes: - - - **requirementslib** ``1.5.8`` => ``1.5.9`` - - **vistir** ``0.5.0`` => ``0.5.1`` - - **jinja2** ``2.11.1`` => ``2.11.2`` - - **click** ``7.1.1`` => ``7.1.2`` - - **dateutil** ``(none)`` => ``2.8.1`` - - **backports.functools_lru_cache** ``1.5.0`` => ``1.6.1`` - - **enum34** ``1.1.6`` => ``1.1.10`` - - **toml** ``0.10.0`` => ``0.10.1`` - - **importlib_resources** ``1.4.0`` => ``1.5.0`` `#4226 <https://github.com/pypa/pipenv/issues/4226>`_ -- Changed attrs import path in vendored dependencies to always import from ``pipenv.vendor``. `#4267 <https://github.com/pypa/pipenv/issues/4267>`_ - -Improved Documentation ----------------------- - -- Added documentation about variable expansion in ``Pipfile`` entries. `#2317 <https://github.com/pypa/pipenv/issues/2317>`_ -- Consolidate all contributing docs in the rst file `#3120 <https://github.com/pypa/pipenv/issues/3120>`_ -- Update the out-dated manual page. `#3246 <https://github.com/pypa/pipenv/issues/3246>`_ -- Move CLI docs to its own page. `#3346 <https://github.com/pypa/pipenv/issues/3346>`_ -- Replace (non-existent) video on docs index.rst with equivalent gif. `#3499 <https://github.com/pypa/pipenv/issues/3499>`_ -- Clarify wording in Basic Usage example on using double quotes to escape shell redirection `#3522 <https://github.com/pypa/pipenv/issues/3522>`_ -- Ensure docs show navigation on small-screen devices `#3527 <https://github.com/pypa/pipenv/issues/3527>`_ -- Added a link to the TOML Spec under General Recommendations & Version Control to clarify how Pipfiles should be written. `#3629 <https://github.com/pypa/pipenv/issues/3629>`_ -- Updated the documentation with the new ``pytest`` entrypoint. `#3759 <https://github.com/pypa/pipenv/issues/3759>`_ -- Fix link to GIF in README.md demonstrating Pipenv's usage, and add descriptive alt text. `#3911 <https://github.com/pypa/pipenv/issues/3911>`_ -- Added a line describing potential issues in fancy extension. `#3912 <https://github.com/pypa/pipenv/issues/3912>`_ -- Documental description of how Pipfile works and association with Pipenv. `#3913 <https://github.com/pypa/pipenv/issues/3913>`_ -- Clarify the proper value of ``python_version`` and ``python_full_version``. `#3914 <https://github.com/pypa/pipenv/issues/3914>`_ -- Write description for --deploy extension and few extensions differences. `#3915 <https://github.com/pypa/pipenv/issues/3915>`_ -- More documentation for ``.env`` files `#4100 <https://github.com/pypa/pipenv/issues/4100>`_ -- Updated documentation to point to working links. `#4137 <https://github.com/pypa/pipenv/issues/4137>`_ -- Replace docs.pipenv.org with pipenv.pypa.io `#4167 <https://github.com/pypa/pipenv/issues/4167>`_ -- Added functionality to check spelling in documentation and cleaned up existing typographical issues. `#4209 <https://github.com/pypa/pipenv/issues/4209>`_ - - -2018.11.26 (2018-11-26) -======================= - -Bug Fixes ---------- - -- Environment variables are expanded correctly before running scripts on POSIX. `#3178 <https://github.com/pypa/pipenv/issues/3178>`_ -- Pipenv will no longer disable user-mode installation when the ``--system`` flag is passed in. `#3222 <https://github.com/pypa/pipenv/issues/3222>`_ -- Fixed an issue with attempting to render unicode output in non-unicode locales. `#3223 <https://github.com/pypa/pipenv/issues/3223>`_ -- Fixed a bug which could cause failures to occur when parsing python entries from global pyenv version files. `#3224 <https://github.com/pypa/pipenv/issues/3224>`_ -- Fixed an issue which prevented the parsing of named extras sections from certain ``setup.py`` files. `#3230 <https://github.com/pypa/pipenv/issues/3230>`_ -- Correctly detect the virtualenv location inside an activated virtualenv. `#3231 <https://github.com/pypa/pipenv/issues/3231>`_ -- Fixed a bug which caused spinner frames to be written to standard output during locking operations which could cause redirection pipes to fail. `#3239 <https://github.com/pypa/pipenv/issues/3239>`_ -- Fixed a bug that editable packages can't be uninstalled correctly. `#3240 <https://github.com/pypa/pipenv/issues/3240>`_ -- Corrected an issue with installation timeouts which caused dependency resolution to fail for longer duration resolution steps. `#3244 <https://github.com/pypa/pipenv/issues/3244>`_ -- Adding normal pep 508 compatible markers is now fully functional when using VCS dependencies. `#3249 <https://github.com/pypa/pipenv/issues/3249>`_ -- Updated ``requirementslib`` and ``pythonfinder`` for multiple bug fixes. `#3254 <https://github.com/pypa/pipenv/issues/3254>`_ -- Pipenv will now ignore hashes when installing with ``--skip-lock``. `#3255 <https://github.com/pypa/pipenv/issues/3255>`_ -- Fixed an issue where pipenv could crash when multiple pipenv processes attempted to create the same directory. `#3257 <https://github.com/pypa/pipenv/issues/3257>`_ -- Fixed an issue which sometimes prevented successful creation of a project Pipfile. `#3260 <https://github.com/pypa/pipenv/issues/3260>`_ -- ``pipenv install`` will now unset the ``PYTHONHOME`` environment variable when not combined with ``--system``. `#3261 <https://github.com/pypa/pipenv/issues/3261>`_ -- Pipenv will ensure that warnings do not interfere with the resolution process by suppressing warnings' usage of standard output and writing to standard error instead. `#3273 <https://github.com/pypa/pipenv/issues/3273>`_ -- Fixed an issue which prevented variables from the environment, such as ``PIPENV_DEV`` or ``PIPENV_SYSTEM``, from being parsed and implemented correctly. `#3278 <https://github.com/pypa/pipenv/issues/3278>`_ -- Clear pythonfinder cache after Python install. `#3287 <https://github.com/pypa/pipenv/issues/3287>`_ -- Fixed a race condition in hash resolution for dependencies for certain dependencies with missing cache entries or fresh Pipenv installs. `#3289 <https://github.com/pypa/pipenv/issues/3289>`_ -- Pipenv will now respect top-level pins over VCS dependency locks. `#3296 <https://github.com/pypa/pipenv/issues/3296>`_ - -Vendored Libraries ------------------- - -- Update vendored dependencies to resolve resolution output parsing and python finding: - - ``pythonfinder 1.1.9 -> 1.1.10`` - - ``requirementslib 1.3.1 -> 1.3.3`` - - ``vistir 0.2.3 -> 0.2.5`` `#3280 <https://github.com/pypa/pipenv/issues/3280>`_ - - -2018.11.14 (2018-11-14) -======================= - -Features & Improvements ------------------------ - -- Improved exceptions and error handling on failures. `#1977 <https://github.com/pypa/pipenv/issues/1977>`_ -- Added persistent settings for all CLI flags via ``PIPENV_{FLAG_NAME}`` environment variables by enabling ``auto_envvar_prefix=PIPENV`` in click (implements PEEP-0002). `#2200 <https://github.com/pypa/pipenv/issues/2200>`_ -- Added improved messaging about available but skipped updates due to dependency conflicts when running ``pipenv update --outdated``. `#2411 <https://github.com/pypa/pipenv/issues/2411>`_ -- Added environment variable ``PIPENV_PYUP_API_KEY`` to add ability - to override the bundled PyUP.io API key. `#2825 <https://github.com/pypa/pipenv/issues/2825>`_ -- Added additional output to ``pipenv update --outdated`` to indicate that the operation succeeded and all packages were already up to date. `#2828 <https://github.com/pypa/pipenv/issues/2828>`_ -- Updated ``crayons`` patch to enable colors on native powershell but swap native blue for magenta. `#3020 <https://github.com/pypa/pipenv/issues/3020>`_ -- Added support for ``--bare`` to ``pipenv clean``, and fixed ``pipenv sync --bare`` to actually reduce output. `#3041 <https://github.com/pypa/pipenv/issues/3041>`_ -- Added windows-compatible spinner via upgraded ``vistir`` dependency. `#3089 <https://github.com/pypa/pipenv/issues/3089>`_ -- - Added support for python installations managed by ``asdf``. `#3096 <https://github.com/pypa/pipenv/issues/3096>`_ -- Improved runtime performance of no-op commands such as ``pipenv --venv`` by around 2/3. `#3158 <https://github.com/pypa/pipenv/issues/3158>`_ -- Do not show error but success for running ``pipenv uninstall --all`` in a fresh virtual environment. `#3170 <https://github.com/pypa/pipenv/issues/3170>`_ -- Improved asynchronous installation and error handling via queued subprocess parallelization. `#3217 <https://github.com/pypa/pipenv/issues/3217>`_ - -Bug Fixes ---------- - -- Remote non-PyPI artifacts and local wheels and artifacts will now include their own hashes rather than including hashes from ``PyPI``. `#2394 <https://github.com/pypa/pipenv/issues/2394>`_ -- Non-ascii characters will now be handled correctly when parsed by pipenv's ``ToML`` parsers. `#2737 <https://github.com/pypa/pipenv/issues/2737>`_ -- Updated ``pipenv uninstall`` to respect the ``--skip-lock`` argument. `#2848 <https://github.com/pypa/pipenv/issues/2848>`_ -- Fixed a bug which caused uninstallation to sometimes fail to successfully remove packages from ``Pipfiles`` with comments on preceding or following lines. `#2885 <https://github.com/pypa/pipenv/issues/2885>`_, - `#3099 <https://github.com/pypa/pipenv/issues/3099>`_ -- Pipenv will no longer fail when encountering python versions on Windows that have been uninstalled. `#2983 <https://github.com/pypa/pipenv/issues/2983>`_ -- Fixed unnecessary extras are added when translating markers `#3026 <https://github.com/pypa/pipenv/issues/3026>`_ -- Fixed a virtualenv creation issue which could cause new virtualenvs to inadvertently attempt to read and write to global site packages. `#3047 <https://github.com/pypa/pipenv/issues/3047>`_ -- Fixed an issue with virtualenv path derivation which could cause errors, particularly for users on WSL bash. `#3055 <https://github.com/pypa/pipenv/issues/3055>`_ -- Fixed a bug which caused ``Unexpected EOF`` errors to be thrown when ``pip`` was waiting for input from users who had put login credentials in environment variables. `#3088 <https://github.com/pypa/pipenv/issues/3088>`_ -- Fixed a bug in ``requirementslib`` which prevented successful installation from mercurial repositories. `#3090 <https://github.com/pypa/pipenv/issues/3090>`_ -- Fixed random resource warnings when using pyenv or any other subprocess calls. `#3094 <https://github.com/pypa/pipenv/issues/3094>`_ -- - Fixed a bug which sometimes prevented cloning and parsing ``mercurial`` requirements. `#3096 <https://github.com/pypa/pipenv/issues/3096>`_ -- Fixed an issue in ``delegator.py`` related to subprocess calls when using ``PopenSpawn`` to stream output, which sometimes threw unexpected ``EOF`` errors. `#3102 <https://github.com/pypa/pipenv/issues/3102>`_, - `#3114 <https://github.com/pypa/pipenv/issues/3114>`_, - `#3117 <https://github.com/pypa/pipenv/issues/3117>`_ -- Fix the path casing issue that makes ``pipenv clean`` fail on Windows `#3104 <https://github.com/pypa/pipenv/issues/3104>`_ -- Pipenv will avoid leaving build artifacts in the current working directory. `#3106 <https://github.com/pypa/pipenv/issues/3106>`_ -- Fixed issues with broken subprocess calls leaking resource handles and causing random and sporadic failures. `#3109 <https://github.com/pypa/pipenv/issues/3109>`_ -- Fixed an issue which caused ``pipenv clean`` to sometimes clean packages from the base ``site-packages`` folder or fail entirely. `#3113 <https://github.com/pypa/pipenv/issues/3113>`_ -- Updated ``pythonfinder`` to correct an issue with unnesting of nested paths when searching for python versions. `#3121 <https://github.com/pypa/pipenv/issues/3121>`_ -- Added additional logic for ignoring and replacing non-ascii characters when formatting console output on non-UTF-8 systems. `#3131 <https://github.com/pypa/pipenv/issues/3131>`_ -- Fix virtual environment discovery when ``PIPENV_VENV_IN_PROJECT`` is set, but the in-project ``.venv`` is a file. `#3134 <https://github.com/pypa/pipenv/issues/3134>`_ -- Hashes for remote and local non-PyPI artifacts will now be included in ``Pipfile.lock`` during resolution. `#3145 <https://github.com/pypa/pipenv/issues/3145>`_ -- Fix project path hashing logic in purpose to prevent collisions of virtual environments. `#3151 <https://github.com/pypa/pipenv/issues/3151>`_ -- Fix package installation when the virtual environment path contains parentheses. `#3158 <https://github.com/pypa/pipenv/issues/3158>`_ -- Azure Pipelines YAML files are updated to use the latest syntax and product name. `#3164 <https://github.com/pypa/pipenv/issues/3164>`_ -- Fixed new spinner success message to write only one success message during resolution. `#3183 <https://github.com/pypa/pipenv/issues/3183>`_ -- Pipenv will now correctly respect the ``--pre`` option when used with ``pipenv install``. `#3185 <https://github.com/pypa/pipenv/issues/3185>`_ -- Fix a bug where exception is raised when run pipenv graph in a project without created virtualenv `#3201 <https://github.com/pypa/pipenv/issues/3201>`_ -- When sources are missing names, names will now be derived from the supplied URL. `#3216 <https://github.com/pypa/pipenv/issues/3216>`_ - -Vendored Libraries ------------------- - -- Updated ``pythonfinder`` to correct an issue with unnesting of nested paths when searching for python versions. `#3061 <https://github.com/pypa/pipenv/issues/3061>`_, - `#3121 <https://github.com/pypa/pipenv/issues/3121>`_ -- Updated vendored dependencies: - - ``certifi 2018.08.24 => 2018.10.15`` - - ``urllib3 1.23 => 1.24`` - - ``requests 2.19.1 => 2.20.0`` - - ``shellingham ``1.2.6 => 1.2.7`` - - ``tomlkit 0.4.4. => 0.4.6`` - - ``vistir 0.1.6 => 0.1.8`` - - ``pythonfinder 0.1.2 => 0.1.3`` - - ``requirementslib 1.1.9 => 1.1.10`` - - ``backports.functools_lru_cache 1.5.0 (new)`` - - ``cursor 1.2.0 (new)`` `#3089 <https://github.com/pypa/pipenv/issues/3089>`_ -- Updated vendored dependencies: - - ``requests 2.19.1 => 2.20.1`` - - ``tomlkit 0.4.46 => 0.5.2`` - - ``vistir 0.1.6 => 0.2.4`` - - ``pythonfinder 1.1.2 => 1.1.8`` - - ``requirementslib 1.1.10 => 1.3.0`` `#3096 <https://github.com/pypa/pipenv/issues/3096>`_ -- Switch to ``tomlkit`` for parsing and writing. Drop ``prettytoml`` and ``contoml`` from vendors. `#3191 <https://github.com/pypa/pipenv/issues/3191>`_ -- Updated ``requirementslib`` to aid in resolution of local and remote archives. `#3196 <https://github.com/pypa/pipenv/issues/3196>`_ - -Improved Documentation ----------------------- - -- Expanded development and testing documentation for contributors to get started. `#3074 <https://github.com/pypa/pipenv/issues/3074>`_ - - -2018.10.13 (2018-10-13) -======================= - -Bug Fixes ---------- - -- Fixed a bug in ``pipenv clean`` which caused global packages to sometimes be inadvertently targeted for cleanup. `#2849 <https://github.com/pypa/pipenv/issues/2849>`_ - -- Fix broken backport imports for vendored vistir. `#2950 <https://github.com/pypa/pipenv/issues/2950>`_, - `#2955 <https://github.com/pypa/pipenv/issues/2955>`_, - `#2961 <https://github.com/pypa/pipenv/issues/2961>`_ - -- Fixed a bug with importing local vendored dependencies when running ``pipenv graph``. `#2952 <https://github.com/pypa/pipenv/issues/2952>`_ - -- Fixed a bug which caused executable discovery to fail when running inside a virtualenv. `#2957 <https://github.com/pypa/pipenv/issues/2957>`_ - -- Fix parsing of outline tables. `#2971 <https://github.com/pypa/pipenv/issues/2971>`_ - -- Fixed a bug which caused ``verify_ssl`` to fail to drop through to ``pip install`` correctly as ``trusted-host``. `#2979 <https://github.com/pypa/pipenv/issues/2979>`_ - -- Fixed a bug which caused canonicalized package names to fail to resolve against PyPI. `#2989 <https://github.com/pypa/pipenv/issues/2989>`_ - -- Enhanced CI detection to detect Azure Devops builds. `#2993 <https://github.com/pypa/pipenv/issues/2993>`_ - -- Fixed a bug which prevented installing pinned versions which used redirection symbols from the command line. `#2998 <https://github.com/pypa/pipenv/issues/2998>`_ - -- Fixed a bug which prevented installing the local directory in non-editable mode. `#3005 <https://github.com/pypa/pipenv/issues/3005>`_ - - -Vendored Libraries ------------------- - -- Updated ``requirementslib`` to version ``1.1.9``. `#2989 <https://github.com/pypa/pipenv/issues/2989>`_ - -- Upgraded ``pythonfinder => 1.1.1`` and ``vistir => 0.1.7``. `#3007 <https://github.com/pypa/pipenv/issues/3007>`_ - - -2018.10.9 (2018-10-09) -====================== - -Features & Improvements ------------------------ - -- Added environment variables ``PIPENV_VERBOSE`` and ``PIPENV_QUIET`` to control - output verbosity without needing to pass options. `#2527 <https://github.com/pypa/pipenv/issues/2527>`_ - -- Updated test-PyPI add-on to better support json-API access (forward compatibility). - Improved testing process for new contributors. `#2568 <https://github.com/pypa/pipenv/issues/2568>`_ - -- Greatly enhanced python discovery functionality: - - - Added pep514 (windows launcher/finder) support for python discovery. - - Introduced architecture discovery for python installations which support different architectures. `#2582 <https://github.com/pypa/pipenv/issues/2582>`_ - -- Added support for ``pipenv shell`` on msys and cygwin/mingw/git bash for Windows. `#2641 <https://github.com/pypa/pipenv/issues/2641>`_ - -- Enhanced resolution of editable and VCS dependencies. `#2643 <https://github.com/pypa/pipenv/issues/2643>`_ - -- Deduplicate and refactor CLI to use stateful arguments and object passing. See `this issue <https://github.com/pallets/click/issues/108>`_ for reference. `#2814 <https://github.com/pypa/pipenv/issues/2814>`_ - - -Behavior Changes ----------------- - -- Virtual environment activation for ``run`` is revised to improve interpolation - with other Python discovery tools. `#2503 <https://github.com/pypa/pipenv/issues/2503>`_ - -- Improve terminal coloring to display better in Powershell. `#2511 <https://github.com/pypa/pipenv/issues/2511>`_ - -- Invoke ``virtualenv`` directly for virtual environment creation, instead of depending on ``pew``. `#2518 <https://github.com/pypa/pipenv/issues/2518>`_ - -- ``pipenv --help`` will now include short help descriptions. `#2542 <https://github.com/pypa/pipenv/issues/2542>`_ - -- Add ``COMSPEC`` to fallback option (along with ``SHELL`` and ``PYENV_SHELL``) - if shell detection fails, improving robustness on Windows. `#2651 <https://github.com/pypa/pipenv/issues/2651>`_ - -- Fallback to shell mode if ``run`` fails with Windows error 193 to handle non-executable commands. This should improve usability on Windows, where some users run non-executable files without specifying a command, relying on Windows file association to choose the current command. `#2718 <https://github.com/pypa/pipenv/issues/2718>`_ - - -Bug Fixes ---------- - -- Fixed a bug which prevented installation of editable requirements using ``ssh://`` style URLs `#1393 <https://github.com/pypa/pipenv/issues/1393>`_ - -- VCS Refs for locked local editable dependencies will now update appropriately to the latest hash when running ``pipenv update``. `#1690 <https://github.com/pypa/pipenv/issues/1690>`_ - -- ``.tar.gz`` and ``.zip`` artifacts will now have dependencies installed even when they are missing from the Lockfile. `#2173 <https://github.com/pypa/pipenv/issues/2173>`_ - -- The command line parser will now handle multiple ``-e/--editable`` dependencies properly via click's option parser to help mitigate future parsing issues. `#2279 <https://github.com/pypa/pipenv/issues/2279>`_ - -- Fixed the ability of pipenv to parse ``dependency_links`` from ``setup.py`` when ``PIP_PROCESS_DEPENDENCY_LINKS`` is enabled. `#2434 <https://github.com/pypa/pipenv/issues/2434>`_ - -- Fixed a bug which could cause ``-i/--index`` arguments to sometimes be incorrectly picked up in packages. This is now handled in the command line parser. `#2494 <https://github.com/pypa/pipenv/issues/2494>`_ - -- Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``. `#2499 <https://github.com/pypa/pipenv/issues/2499>`_, - `#2529 <https://github.com/pypa/pipenv/issues/2529>`_, - `#2589 <https://github.com/pypa/pipenv/issues/2589>`_, - `#2666 <https://github.com/pypa/pipenv/issues/2666>`_, - `#2767 <https://github.com/pypa/pipenv/issues/2767>`_, - `#2785 <https://github.com/pypa/pipenv/issues/2785>`_, - `#2795 <https://github.com/pypa/pipenv/issues/2795>`_, - `#2801 <https://github.com/pypa/pipenv/issues/2801>`_, - `#2824 <https://github.com/pypa/pipenv/issues/2824>`_, - `#2862 <https://github.com/pypa/pipenv/issues/2862>`_, - `#2879 <https://github.com/pypa/pipenv/issues/2879>`_, - `#2894 <https://github.com/pypa/pipenv/issues/2894>`_, - `#2933 <https://github.com/pypa/pipenv/issues/2933>`_ - -- Fix subshell invocation on Windows for Python 2. `#2515 <https://github.com/pypa/pipenv/issues/2515>`_ - -- Fixed a bug which sometimes caused pipenv to throw a ``TypeError`` or to run into encoding issues when writing a Lockfile on python 2. `#2561 <https://github.com/pypa/pipenv/issues/2561>`_ - -- Improve quoting logic for ``pipenv run`` so it works better with Windows - built-in commands. `#2563 <https://github.com/pypa/pipenv/issues/2563>`_ - -- Fixed a bug related to parsing VCS requirements with both extras and subdirectory fragments. - Corrected an issue in the ``requirementslib`` parser which led to some markers being discarded rather than evaluated. `#2564 <https://github.com/pypa/pipenv/issues/2564>`_ - -- Fixed multiple issues with finding the correct system python locations. `#2582 <https://github.com/pypa/pipenv/issues/2582>`_ - -- Catch JSON decoding error to prevent exception when the lock file is of - invalid format. `#2607 <https://github.com/pypa/pipenv/issues/2607>`_ - -- Fixed a rare bug which could sometimes cause errors when installing packages with custom sources. `#2610 <https://github.com/pypa/pipenv/issues/2610>`_ - -- Update requirementslib to fix a bug which could raise an ``UnboundLocalError`` when parsing malformed VCS URIs. `#2617 <https://github.com/pypa/pipenv/issues/2617>`_ - -- Fixed an issue which prevented passing multiple ``--ignore`` parameters to ``pipenv check``. `#2632 <https://github.com/pypa/pipenv/issues/2632>`_ - -- Fixed a bug which caused attempted hashing of ``ssh://`` style URIs which could cause failures during installation of private ssh repositories. - - Corrected path conversion issues which caused certain editable VCS paths to be converted to ``ssh://`` URIs improperly. `#2639 <https://github.com/pypa/pipenv/issues/2639>`_ - -- Fixed a bug which caused paths to be formatted incorrectly when using ``pipenv shell`` in bash for windows. `#2641 <https://github.com/pypa/pipenv/issues/2641>`_ - -- Dependency links to private repositories defined via ``ssh://`` schemes will now install correctly and skip hashing as long as ``PIP_PROCESS_DEPENDENCY_LINKS=1``. `#2643 <https://github.com/pypa/pipenv/issues/2643>`_ - -- Fixed a bug which sometimes caused pipenv to parse the ``trusted_host`` argument to pip incorrectly when parsing source URLs which specify ``verify_ssl = false``. `#2656 <https://github.com/pypa/pipenv/issues/2656>`_ - -- Prevent crashing when a virtual environment in ``WORKON_HOME`` is faulty. `#2676 <https://github.com/pypa/pipenv/issues/2676>`_ - -- Fixed virtualenv creation failure when a .venv file is present in the project root. `#2680 <https://github.com/pypa/pipenv/issues/2680>`_ - -- Fixed a bug which could cause the ``-e/--editable`` argument on a dependency to be accidentally parsed as a dependency itself. `#2714 <https://github.com/pypa/pipenv/issues/2714>`_ - -- Correctly pass ``verbose`` and ``debug`` flags to the resolver subprocess so it generates appropriate output. This also resolves a bug introduced by the fix to #2527. `#2732 <https://github.com/pypa/pipenv/issues/2732>`_ - -- All markers are now included in ``pipenv lock --requirements`` output. `#2748 <https://github.com/pypa/pipenv/issues/2748>`_ - -- Fixed a bug in marker resolution which could cause duplicate and non-deterministic markers. `#2760 <https://github.com/pypa/pipenv/issues/2760>`_ - -- Fixed a bug in the dependency resolver which caused regular issues when handling ``setup.py`` based dependency resolution. `#2766 <https://github.com/pypa/pipenv/issues/2766>`_ - -- Updated vendored dependencies: - - ``pip-tools`` (updated and patched to latest w/ ``pip 18.0`` compatibility) - - ``pip 10.0.1 => 18.0`` - - ``click 6.7 => 7.0`` - - ``toml 0.9.4 => 0.10.0`` - - ``pyparsing 2.2.0 => 2.2.2`` - - ``delegator 0.1.0 => 0.1.1`` - - ``attrs 18.1.0 => 18.2.0`` - - ``distlib 0.2.7 => 0.2.8`` - - ``packaging 17.1.0 => 18.0`` - - ``passa 0.2.0 => 0.3.1`` - - ``pip_shims 0.1.2 => 0.3.1`` - - ``plette 0.1.1 => 0.2.2`` - - ``pythonfinder 1.0.2 => 1.1.0`` - - ``pytoml 0.1.18 => 0.1.19`` - - ``requirementslib 1.1.16 => 1.1.17`` - - ``shellingham 1.2.4 => 1.2.6`` - - ``tomlkit 0.4.2 => 0.4.4`` - - ``vistir 0.1.4 => 0.1.6`` - - `#2802 <https://github.com/pypa/pipenv/issues/2802>`_, - `#2867 <https://github.com/pypa/pipenv/issues/2867>`_, - `#2880 <https://github.com/pypa/pipenv/issues/2880>`_ - -- Fixed a bug where ``pipenv`` crashes when the ``WORKON_HOME`` directory does not exist. `#2877 <https://github.com/pypa/pipenv/issues/2877>`_ - -- Fixed pip is not loaded from pipenv's patched one but the system one `#2912 <https://github.com/pypa/pipenv/issues/2912>`_ - -- Fixed various bugs related to ``pip 18.1`` release which prevented locking, installation, and syncing, and dumping to a ``requirements.txt`` file. `#2924 <https://github.com/pypa/pipenv/issues/2924>`_ - - -Vendored Libraries ------------------- - -- Pew is no longer vendored. Entry point ``pewtwo``, packages ``pipenv.pew`` and - ``pipenv.patched.pew`` are removed. `#2521 <https://github.com/pypa/pipenv/issues/2521>`_ - -- Update ``pythonfinder`` to major release ``1.0.0`` for integration. `#2582 <https://github.com/pypa/pipenv/issues/2582>`_ - -- Update requirementslib to fix a bug which could raise an ``UnboundLocalError`` when parsing malformed VCS URIs. `#2617 <https://github.com/pypa/pipenv/issues/2617>`_ - -- - Vendored new libraries ``vistir`` and ``pip-shims``, ``tomlkit``, ``modutil``, and ``plette``. - - - Update vendored libraries: - - ``scandir`` to ``1.9.0`` - - ``click-completion`` to ``0.4.1`` - - ``semver`` to ``2.8.1`` - - ``shellingham`` to ``1.2.4`` - - ``pytoml`` to ``0.1.18`` - - ``certifi`` to ``2018.8.24`` - - ``ptyprocess`` to ``0.6.0`` - - ``requirementslib`` to ``1.1.5`` - - ``pythonfinder`` to ``1.0.2`` - - ``pipdeptree`` to ``0.13.0`` - - ``python-dotenv`` to ``0.9.1`` `#2639 <https://github.com/pypa/pipenv/issues/2639>`_ - -- Updated vendored dependencies: - - ``pip-tools`` (updated and patched to latest w/ ``pip 18.0`` compatibility) - - ``pip 10.0.1 => 18.0`` - - ``click 6.7 => 7.0`` - - ``toml 0.9.4 => 0.10.0`` - - ``pyparsing 2.2.0 => 2.2.2`` - - ``delegator 0.1.0 => 0.1.1`` - - ``attrs 18.1.0 => 18.2.0`` - - ``distlib 0.2.7 => 0.2.8`` - - ``packaging 17.1.0 => 18.0`` - - ``passa 0.2.0 => 0.3.1`` - - ``pip_shims 0.1.2 => 0.3.1`` - - ``plette 0.1.1 => 0.2.2`` - - ``pythonfinder 1.0.2 => 1.1.0`` - - ``pytoml 0.1.18 => 0.1.19`` - - ``requirementslib 1.1.16 => 1.1.17`` - - ``shellingham 1.2.4 => 1.2.6`` - - ``tomlkit 0.4.2 => 0.4.4`` - - ``vistir 0.1.4 => 0.1.6`` - - `#2902 <https://github.com/pypa/pipenv/issues/2902>`_, - `#2935 <https://github.com/pypa/pipenv/issues/2935>`_ - - -Improved Documentation ----------------------- - -- Simplified the test configuration process. `#2568 <https://github.com/pypa/pipenv/issues/2568>`_ - -- Updated documentation to use working fortune cookie add-on. `#2644 <https://github.com/pypa/pipenv/issues/2644>`_ - -- Added additional information about troubleshooting ``pipenv shell`` by using the the ``$PIPENV_SHELL`` environment variable. `#2671 <https://github.com/pypa/pipenv/issues/2671>`_ - -- Added a link to ``PEP-440`` version specifiers in the documentation for additional detail. `#2674 <https://github.com/pypa/pipenv/issues/2674>`_ - -- Added simple example to README.md for installing from git. `#2685 <https://github.com/pypa/pipenv/issues/2685>`_ - -- Stopped recommending ``--system`` for Docker contexts. `#2762 <https://github.com/pypa/pipenv/issues/2762>`_ - -- Fixed the example url for doing "pipenv install -e - some-repository-url#egg=something", it was missing the "egg=" in the fragment - identifier. `#2792 <https://github.com/pypa/pipenv/issues/2792>`_ - -- Fixed link to the "be cordial" essay in the contribution documentation. `#2793 <https://github.com/pypa/pipenv/issues/2793>`_ - -- Clarify ``pipenv install`` documentation `#2844 <https://github.com/pypa/pipenv/issues/2844>`_ - -- Replace reference to uservoice with PEEP-000 `#2909 <https://github.com/pypa/pipenv/issues/2909>`_ - - -2018.7.1 (2018-07-01) -===================== - -Features & Improvements ------------------------ - -- All calls to ``pipenv shell`` are now implemented from the ground up using `shellingham <https://github.com/sarugaku/shellingham>`_, a custom library which was purpose built to handle edge cases and shell detection. `#2371 <https://github.com/pypa/pipenv/issues/2371>`_ - -- Added support for python 3.7 via a few small compatibility / bug fixes. `#2427 <https://github.com/pypa/pipenv/issues/2427>`_, - `#2434 <https://github.com/pypa/pipenv/issues/2434>`_, - `#2436 <https://github.com/pypa/pipenv/issues/2436>`_ - -- Added new flag ``pipenv --support`` to replace the diagnostic command ``python -m pipenv.help``. `#2477 <https://github.com/pypa/pipenv/issues/2477>`_, - `#2478 <https://github.com/pypa/pipenv/issues/2478>`_ - -- Improved import times and CLI run times with minor tweaks. `#2485 <https://github.com/pypa/pipenv/issues/2485>`_ - - -Bug Fixes ---------- - -- Fixed an ongoing bug which sometimes resolved incompatible versions into the project Lockfile. `#1901 <https://github.com/pypa/pipenv/issues/1901>`_ - -- Fixed a bug which caused errors when creating virtualenvs which contained leading dash characters. `#2415 <https://github.com/pypa/pipenv/issues/2415>`_ - -- Fixed a logic error which caused ``--deploy --system`` to overwrite editable vcs packages in the Pipfile before installing, which caused any installation to fail by default. `#2417 <https://github.com/pypa/pipenv/issues/2417>`_ - -- Updated requirementslib to fix an issue with properly quoting markers in VCS requirements. `#2419 <https://github.com/pypa/pipenv/issues/2419>`_ - -- Installed new vendored jinja2 templates for ``click-completion`` which were causing template errors for users with completion enabled. `#2422 <https://github.com/pypa/pipenv/issues/2422>`_ - -- Added support for python 3.7 via a few small compatibility / bug fixes. `#2427 <https://github.com/pypa/pipenv/issues/2427>`_ - -- Fixed an issue reading package names from ``setup.py`` files in projects which imported utilities such as ``versioneer``. `#2433 <https://github.com/pypa/pipenv/issues/2433>`_ - -- Pipenv will now ensure that its internal package names registry files are written with unicode strings. `#2450 <https://github.com/pypa/pipenv/issues/2450>`_ - -- Fixed a bug causing requirements input as relative paths to be output as absolute paths or URIs. - Fixed a bug affecting normalization of ``git+git@host`` URLs. `#2453 <https://github.com/pypa/pipenv/issues/2453>`_ - -- Pipenv will now always use ``pathlib2`` for ``Path`` based filesystem interactions by default on ``python<3.5``. `#2454 <https://github.com/pypa/pipenv/issues/2454>`_ - -- Fixed a bug which prevented passing proxy PyPI indexes set with ``--pypi-mirror`` from being passed to pip during virtualenv creation, which could cause the creation to freeze in some cases. `#2462 <https://github.com/pypa/pipenv/issues/2462>`_ - -- Using the ``python -m pipenv.help`` command will now use proper encoding for the host filesystem to avoid encoding issues. `#2466 <https://github.com/pypa/pipenv/issues/2466>`_ - -- The new ``jinja2`` templates for ``click_completion`` will now be included in pipenv source distributions. `#2479 <https://github.com/pypa/pipenv/issues/2479>`_ - -- Resolved a long-standing issue with re-using previously generated ``InstallRequirement`` objects for resolution which could cause ``PKG-INFO`` file information to be deleted, raising a ``TypeError``. `#2480 <https://github.com/pypa/pipenv/issues/2480>`_ - -- Resolved an issue parsing usernames from private PyPI URIs in ``Pipfiles`` by updating ``requirementslib``. `#2484 <https://github.com/pypa/pipenv/issues/2484>`_ - - -Vendored Libraries ------------------- - -- All calls to ``pipenv shell`` are now implemented from the ground up using `shellingham <https://github.com/sarugaku/shellingham>`_, a custom library which was purpose built to handle edge cases and shell detection. `#2371 <https://github.com/pypa/pipenv/issues/2371>`_ - -- Updated requirementslib to fix an issue with properly quoting markers in VCS requirements. `#2419 <https://github.com/pypa/pipenv/issues/2419>`_ - -- Installed new vendored jinja2 templates for ``click-completion`` which were causing template errors for users with completion enabled. `#2422 <https://github.com/pypa/pipenv/issues/2422>`_ - -- Add patch to ``prettytoml`` to support Python 3.7. `#2426 <https://github.com/pypa/pipenv/issues/2426>`_ - -- Patched ``prettytoml.AbstractTable._enumerate_items`` to handle ``StopIteration`` errors in preparation of release of python 3.7. `#2427 <https://github.com/pypa/pipenv/issues/2427>`_ - -- Fixed an issue reading package names from ``setup.py`` files in projects which imported utilities such as ``versioneer``. `#2433 <https://github.com/pypa/pipenv/issues/2433>`_ - -- Updated ``requirementslib`` to version ``1.0.9`` `#2453 <https://github.com/pypa/pipenv/issues/2453>`_ - -- Unraveled a lot of old, unnecessary patches to ``pip-tools`` which were causing non-deterministic resolution errors. `#2480 <https://github.com/pypa/pipenv/issues/2480>`_ - -- Resolved an issue parsing usernames from private PyPI URIs in ``Pipfiles`` by updating ``requirementslib``. `#2484 <https://github.com/pypa/pipenv/issues/2484>`_ - - -Improved Documentation ----------------------- - -- Added instructions for installing using Fedora's official repositories. `#2404 <https://github.com/pypa/pipenv/issues/2404>`_ - - -2018.6.25 (2018-06-25) -====================== - -Features & Improvements ------------------------ - -- Pipenv-created virtualenvs will now be associated with a ``.project`` folder - (features can be implemented on top of this later or users may choose to use - ``pipenv-pipes`` to take full advantage of this.) `#1861 - <https://github.com/pypa/pipenv/issues/1861>`_ - -- Virtualenv names will now appear in prompts for most Windows users. `#2167 - <https://github.com/pypa/pipenv/issues/2167>`_ - -- Added support for cmder shell paths with spaces. `#2168 - <https://github.com/pypa/pipenv/issues/2168>`_ - -- Added nested JSON output to the ``pipenv graph`` command. `#2199 - <https://github.com/pypa/pipenv/issues/2199>`_ - -- Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. Updated - patched piptools version. `#2255 - <https://github.com/pypa/pipenv/issues/2255>`_ - -- PyPI mirror URLs can now be set to override instances of PyPI URLs by passing - the ``--pypi-mirror`` argument from the command line or setting the - ``PIPENV_PYPI_MIRROR`` environment variable. `#2281 - <https://github.com/pypa/pipenv/issues/2281>`_ - -- Virtualenv activation lines will now avoid being written to some shell - history files. `#2287 <https://github.com/pypa/pipenv/issues/2287>`_ - -- Pipenv will now only search for ``requirements.txt`` files when creating new - projects, and during that time only if the user doesn't specify packages to - pass in. `#2309 <https://github.com/pypa/pipenv/issues/2309>`_ - -- Added support for mounted drives via UNC paths. `#2331 - <https://github.com/pypa/pipenv/issues/2331>`_ - -- Added support for Windows Subsystem for Linux bash shell detection. `#2363 - <https://github.com/pypa/pipenv/issues/2363>`_ - -- Pipenv will now generate hashes much more quickly by resolving them in a - single pass during locking. `#2384 - <https://github.com/pypa/pipenv/issues/2384>`_ - -- ``pipenv run`` will now avoid spawning additional ``COMSPEC`` instances to - run commands in when possible. `#2385 - <https://github.com/pypa/pipenv/issues/2385>`_ - -- Massive internal improvements to requirements parsing codebase, resolver, and - error messaging. `#2388 <https://github.com/pypa/pipenv/issues/2388>`_ - -- ``pipenv check`` now may take multiple of the additional argument - ``--ignore`` which takes a parameter ``cve_id`` for the purpose of ignoring - specific CVEs. `#2408 <https://github.com/pypa/pipenv/issues/2408>`_ - - -Behavior Changes ----------------- - -- Pipenv will now parse & capitalize ``platform_python_implementation`` markers - .. warning:: This could cause an issue if you have an out of date ``Pipfile`` - which lower-cases the comparison value (e.g. ``cpython`` instead of - ``CPython``). `#2123 <https://github.com/pypa/pipenv/issues/2123>`_ - -- Pipenv will now only search for ``requirements.txt`` files when creating new - projects, and during that time only if the user doesn't specify packages to - pass in. `#2309 <https://github.com/pypa/pipenv/issues/2309>`_ - - -Bug Fixes ---------- - -- Massive internal improvements to requirements parsing codebase, resolver, and - error messaging. `#1962 <https://github.com/pypa/pipenv/issues/1962>`_, - `#2186 <https://github.com/pypa/pipenv/issues/2186>`_, - `#2263 <https://github.com/pypa/pipenv/issues/2263>`_, - `#2312 <https://github.com/pypa/pipenv/issues/2312>`_ - -- Pipenv will now parse & capitalize ``platform_python_implementation`` - markers. `#2123 <https://github.com/pypa/pipenv/issues/2123>`_ - -- Fixed a bug with parsing and grouping old-style ``setup.py`` extras during - resolution `#2142 <https://github.com/pypa/pipenv/issues/2142>`_ - -- Fixed a bug causing pipenv graph to throw unhelpful exceptions when running - against empty or non-existent environments. `#2161 - <https://github.com/pypa/pipenv/issues/2161>`_ - -- Fixed a bug which caused ``--system`` to incorrectly abort when users were in - a virtualenv. `#2181 <https://github.com/pypa/pipenv/issues/2181>`_ - -- Removed vendored ``cacert.pem`` which could cause issues for some users with - custom certificate settings. `#2193 - <https://github.com/pypa/pipenv/issues/2193>`_ - -- Fixed a regression which led to direct invocations of ``virtualenv``, rather - than calling it by module. `#2198 - <https://github.com/pypa/pipenv/issues/2198>`_ - -- Locking will now pin the correct VCS ref during ``pipenv update`` runs. - Running ``pipenv update`` with a new vcs ref specified in the ``Pipfile`` - will now properly obtain, resolve, and install the specified dependency at - the specified ref. `#2209 <https://github.com/pypa/pipenv/issues/2209>`_ - -- ``pipenv clean`` will now correctly ignore comments from ``pip freeze`` when - cleaning the environment. `#2262 - <https://github.com/pypa/pipenv/issues/2262>`_ - -- Resolution bugs causing packages for incompatible python versions to be - locked have been fixed. `#2267 - <https://github.com/pypa/pipenv/issues/2267>`_ - -- Fixed a bug causing pipenv graph to fail to display sometimes. `#2268 - <https://github.com/pypa/pipenv/issues/2268>`_ - -- Updated ``requirementslib`` to fix a bug in Pipfile parsing affecting - relative path conversions. `#2269 - <https://github.com/pypa/pipenv/issues/2269>`_ - -- Windows executable discovery now leverages ``os.pathext``. `#2298 - <https://github.com/pypa/pipenv/issues/2298>`_ - -- Fixed a bug which caused ``--deploy --system`` to inadvertently create a - virtualenv before failing. `#2301 - <https://github.com/pypa/pipenv/issues/2301>`_ - -- Fixed an issue which led to a failure to unquote special characters in file - and wheel paths. `#2302 <https://github.com/pypa/pipenv/issues/2302>`_ - -- VCS dependencies are now manually obtained only if they do not match the - requested ref. `#2304 <https://github.com/pypa/pipenv/issues/2304>`_ - -- Added error handling functionality to properly cope with single-digit - ``Requires-Python`` metadata with no specifiers. `#2377 - <https://github.com/pypa/pipenv/issues/2377>`_ - -- ``pipenv update`` will now always run the resolver and lock before ensuring - dependencies are in sync with project Lockfile. `#2379 - <https://github.com/pypa/pipenv/issues/2379>`_ - -- Resolved a bug in our patched resolvers which could cause nondeterministic - resolution failures in certain conditions. Running ``pipenv install`` with no - arguments in a project with only a ``Pipfile`` will now correctly lock first - for dependency resolution before installing. `#2384 - <https://github.com/pypa/pipenv/issues/2384>`_ - -- Patched ``python-dotenv`` to ensure that environment variables always get - encoded to the filesystem encoding. `#2386 - <https://github.com/pypa/pipenv/issues/2386>`_ - - -Improved Documentation ----------------------- - -- Update documentation wording to clarify Pipenv's overall role in the packaging ecosystem. `#2194 <https://github.com/pypa/pipenv/issues/2194>`_ - -- Added contribution documentation and guidelines. `#2205 <https://github.com/pypa/pipenv/issues/2205>`_ - -- Added instructions for supervisord compatibility. `#2215 <https://github.com/pypa/pipenv/issues/2215>`_ - -- Fixed broken links to development philosophy and contribution documentation. `#2248 <https://github.com/pypa/pipenv/issues/2248>`_ - - -Vendored Libraries ------------------- - -- Removed vendored ``cacert.pem`` which could cause issues for some users with - custom certificate settings. `#2193 - <https://github.com/pypa/pipenv/issues/2193>`_ - -- Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. Updated - patched piptools version. `#2255 - <https://github.com/pypa/pipenv/issues/2255>`_ - -- Updated ``requirementslib`` to fix a bug in Pipfile parsing affecting - relative path conversions. `#2269 - <https://github.com/pypa/pipenv/issues/2269>`_ - -- Added custom shell detection library ``shellingham``, a port of our changes - to ``pew``. `#2363 <https://github.com/pypa/pipenv/issues/2363>`_ - -- Patched ``python-dotenv`` to ensure that environment variables always get - encoded to the filesystem encoding. `#2386 - <https://github.com/pypa/pipenv/issues/2386>`_ - -- Updated vendored libraries. The following vendored libraries were updated: - - * distlib from version ``0.2.6`` to ``0.2.7``. - * jinja2 from version ``2.9.5`` to ``2.10``. - * pathlib2 from version ``2.1.0`` to ``2.3.2``. - * parse from version ``2.8.0`` to ``2.8.4``. - * pexpect from version ``2.5.2`` to ``2.6.0``. - * requests from version ``2.18.4`` to ``2.19.1``. - * idna from version ``2.6`` to ``2.7``. - * certifi from version ``2018.1.16`` to ``2018.4.16``. - * packaging from version ``16.8`` to ``17.1``. - * six from version ``1.10.0`` to ``1.11.0``. - * requirementslib from version ``0.2.0`` to ``1.0.1``. - - In addition, scandir was vendored and patched to avoid importing host system binaries when falling back to pathlib2. `#2368 <https://github.com/pypa/pipenv/issues/2368>`_ diff --git a/docs/advanced.rst b/docs/advanced.md similarity index 53% rename from docs/advanced.rst rename to docs/advanced.md index 3abc8b9b33..4c10ce803a 100644 --- a/docs/advanced.rst +++ b/docs/advanced.md @@ -1,80 +1,66 @@ -.. _advanced: - -Other Topics -======================== +# Other topics This document is current in the process of being broken apart into more granular sections so that we may provide better overall documentation. +## ☤ Supplying additional arguments to pip -☤ Supplying additional arguments to pip ------------------------------------------------- - -There may be cases where you wish to supply additional arguments to pip to be used during the install phase. -For example, you may want to enable the pip feature for using -`system certificate stores <https://pip.pypa.io/en/latest/topics/https-certificates/#using-system-certificate-stores>`_ +There may be cases where you wish to supply additional arguments to pip to be used during the install phase. For example, you may want to enable the pip feature for using [system certificate stores](https://pip.pypa.io/en/latest/topics/https-certificates/#using-system-certificate-stores) -In this case you can supply these additional arguments to ``pipenv sync`` or ``pipenv install`` by passing additional -argument ``--extra-pip-args="--use-feature=truststore"``. It is possible to supply multiple arguments in the ``--extra-pip-args``. -Example usage:: +In this case you can supply these additional arguments to `pipenv sync` or `pipenv install` by passing additional +argument `--extra-pip-args="--use-feature=truststore"`. It is possible to supply multiple arguments in the `--extra-pip-args`. Example usage: pipenv sync --extra-pip-args="--use-feature=truststore --proxy=127.0.0.1" +## ☤ Using pipenv for Deployments +You may want to use `pipenv` as part of a deployment process. -☤ Using pipenv for Deployments ------------------------------- - -You may want to use ``pipenv`` as part of a deployment process. - -You can enforce that your ``Pipfile.lock`` is up to date using the ``--deploy`` flag:: +You can enforce that your `Pipfile.lock` is up to date using the `--deploy` flag: $ pipenv install --deploy -This will fail a build if the ``Pipfile.lock`` is out–of–date, instead of generating a new one. +This will fail a build if the `Pipfile.lock` is out–of–date, instead of generating a new one. -Or you can install packages exactly as specified in ``Pipfile.lock`` using the ``sync`` command:: +Or you can install packages exactly as specified in `Pipfile.lock` using the `sync` command: $ pipenv sync -.. note:: +Note ``pipenv install --ignore-pipfile`` is nearly equivalent to ``pipenv sync``, but ``pipenv sync`` will *never* attempt to re-lock your dependencies as it is considered an atomic operation. ``pipenv install`` by default does attempt to re-lock unless using the ``--deploy`` flag. -You may only wish to verify your ``Pipfile.lock`` is up-to-date with dependencies specified in the ``Pipfile``, without installing:: +You may only wish to verify your `Pipfile.lock` is up-to-date with dependencies specified in the `Pipfile`, without installing: $ pipenv verify -The command will perform a verification, and return an exit code ``1`` when dependency locking is needed. This may be useful for cases when the ``Pipfile.lock`` file is subject to version control, so this command can be used within your CI/CD pipelines. +The command will perform a verification, and return an exit code `1` when dependency locking is needed. This may be useful for cases when the `Pipfile.lock` file is subject to version control, so this command can be used within your CI/CD pipelines. -Deploying System Dependencies -///////////////////////////// +### Deploying System Dependencies -You can tell Pipenv to install a Pipfile's contents into its parent system with the ``--system`` flag:: +You can tell Pipenv to install a Pipfile's contents into its parent system with the `--system` flag: $ pipenv install --system This is useful for managing the system Python, and deployment infrastructure (e.g. Heroku does this). -☤ Pipenv and Other Python Distributions ---------------------------------------- +## ☤ Pipenv and Other Python Distributions -To use Pipenv with a third-party Python distribution (e.g. Anaconda), you simply provide the path to the Python binary:: +To use Pipenv with a third-party Python distribution (e.g. Anaconda), you simply provide the path to the Python binary: $ pipenv install --python=/path/to/python -Anaconda uses Conda to manage packages. To reuse Conda–installed Python packages, use the ``--site-packages`` flag:: +Anaconda uses Conda to manage packages. To reuse Conda–installed Python packages, use the `--site-packages` flag: $ pipenv --python=/path/to/python --site-packages -☤ Generating a ``requirements.txt`` ------------------------------------ +## ☤ Generating a `requirements.txt` Sometimes, you would want to generate a requirements file based on your current environment, for example to include tooling that only supports requirements.txt. -You can convert a ``Pipfile.lock`` into a ``requirements.txt`` +You can convert a `Pipfile.lock` into a `requirements.txt` file very easily. -Let's take this ``Pipfile``:: +Let's take this `Pipfile`: [[source]] name = "pypi" @@ -87,7 +73,7 @@ Let's take this ``Pipfile``:: [dev-packages] pytest = {version="==3.2.3"} -Which generates a ``Pipfile.lock`` upon completion of running ``pipenv lock``` similar to:: +Which generates a `Pipfile.lock` upon completion of running ``pipenv lock``` similar to: { "_meta": { @@ -105,7 +91,7 @@ Which generates a ``Pipfile.lock`` upon completion of running ``pipenv lock``` s ] }, "default": { - ... snipped ... + ... snipped ... "requests": { "hashes": [ "sha256:6a1b267aa90cac58ac3a765d067950e7dbbf75b1da07e895d1f594193a40a38b", @@ -114,7 +100,7 @@ Which generates a ``Pipfile.lock`` upon completion of running ``pipenv lock``` s "index": "pypi", "version": "==2.18.4" }, - ... snipped ... + ... snipped ... }, "develop": { ... snipped ... @@ -129,7 +115,7 @@ Which generates a ``Pipfile.lock`` upon completion of running ``pipenv lock``` s ... snipped ... } -Given the ``Pipfile.lock`` exists, you may generate a set of requirements out of it with the default dependencies:: +Given the `Pipfile.lock` exists, you may generate a set of requirements out of it with the default dependencies: $ pipenv requirements -i https://pypi.org/simple @@ -139,10 +125,10 @@ Given the ``Pipfile.lock`` exists, you may generate a set of requirements out of requests==2.18.4 urllib3==1.22 -As with other commands, passing ``--dev`` will include both the default and -development dependencies:: +As with other commands, passing `--dev` will include both the default and +development dependencies: - $ pipenv requirements --dev + $ pipenv requirements --dev -i https://pypi.org/simple colorama==0.4.5 ; sys_platform == 'win32' py==1.11.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' @@ -154,9 +140,7 @@ development dependencies:: requests==2.18.4 urllib3==1.22 -If you wish to generate a requirements file with only the -development requirements you can do that too, using the ``--dev-only`` -flag:: +If you wish to generate a requirements file with only the development requirements you can do that too, using the `--dev-only` flag: $ pipenv requirements --dev-only -i https://pypi.org/simple @@ -165,11 +149,11 @@ flag:: pytest==3.2.3 setuptools==65.4.1 ; python_version >= '3.7' -Adding the ``--hash`` flag adds package hashes to the output for extra security. -Adding the ``--exclude-markers`` flag excludes the markers from the output. +Adding the `--hash` flag adds package hashes to the output for extra security. +Adding the `--exclude-markers` flag excludes the markers from the output. The locked requirements are written to stdout, with shell output redirection -used to write them to a file:: +used to write them to a file: $ pipenv requirements > requirements.txt $ pipenv requirements --dev-only > dev-requirements.txt @@ -189,7 +173,7 @@ used to write them to a file:: If you have multiple categories in your Pipfile and wish to generate a requirements file for only some categories, you can do that too, -using the ``--categories`` option:: +using the `--categories` option: $ pipenv requirements --categories="tests" > requirements-tests.txt $ pipenv requirements --categories="docs" > requirements-docs.txt @@ -208,19 +192,17 @@ It can be used to specify multiple categories also. $ pipenv requirements --categories="tests,docs" -☤ Detection of Security Vulnerabilities ---------------------------------------- +## ☤ Detection of Security Vulnerabilities -Pipenv includes the `safety <https://github.com/pyupio/safety>`_ package, and will use it to scan your dependency graph -for known security vulnerabilities! +Pipenv includes the [safety](https://github.com/pyupio/safety) package, and will use it to scan your dependency graph for known security vulnerabilities! -By default ``pipenv check`` will scan the Pipfile.lock default packages group and use this as the input to the safety command. -To scan other package categories pass the specific ``--categories`` you want to check against. -To have ``pipenv check`` scan the virtualenv packages for what is installed and use this as the input to the safety command, -run``pipenv check --use-installed``. -Note: ``--use-installed`` was the default behavior in ``pipenv<=2023.2.4`` +By default `pipenv check` will scan the Pipfile.lock default packages group and use this as the input to the safety command. +To scan other package categories pass the specific `--categories` you want to check against. +To have `pipenv check` scan the virtualenv packages for what is installed and use this as the input to the safety command, +run`pipenv check --use-installed`. +Note: `--use-installed` was the default behavior in `pipenv<=2023.2.4`. -Example:: +Example: $ pipenv install wheel==0.37.1 $ cat Pipfile.lock @@ -250,38 +232,28 @@ Example:: Scan was completed. 1 vulnerability was found. ... +Note -.. note:: - - Each month, `PyUp.io <https://pyup.io>`_ updates the ``safety`` database of - insecure Python packages and `makes it available to the open source - community for free <https://pyup.io/safety/>`__. Each time - you run ``pipenv check`` to show you vulnerable dependencies, - Pipenv makes an API call to retrieve and use those results. - - For more up-to-date vulnerability data, you may also use your own safety - API key by setting the environment variable ``PIPENV_PYUP_API_KEY``. +Each month, [PyUp.io](https://pyup.io>)updates the `safety` database of insecure Python packages and [makes it available to the open source community for free](https://pyup.io/safety/). Each time you run `pipenv check` to show you vulnerable dependencies, +Pipenv makes an API call to retrieve and use those results. +For more up-to-date vulnerability data, you may also use your own safety API key by setting the environment variable `PIPENV_PYUP_API_KEY`. -☤ Community Integrations ------------------------- +## ☤ Community Integrations -There are a range of community-maintained plugins and extensions available for a range of editors and IDEs, as well as -different products which integrate with Pipenv projects: +There are a range of community-maintained plugins and extensions available for a range of editors and IDEs, as well as different products which integrate with Pipenv projects: -- `Heroku <https://heroku.com/python>`_ (Cloud Hosting) -- `Platform.sh <https://platform.sh/hosting/python>`_ (Cloud Hosting) -- `PyUp <https://pyup.io>`_ (Security Notification) -- `Emacs <https://github.com/pwalsh/pipenv.el>`_ (Editor Integration) -- `Fish Shell <https://github.com/fisherman/pipenv>`_ (Automatic ``$ pipenv shell``!) -- `VS Code <https://code.visualstudio.com/docs/python/environments>`_ (Editor Integration) -- `PyCharm <https://www.jetbrains.com/pycharm/download/>`_ (Editor Integration) +- [Heroku](https://heroku.com/python) (Cloud Hosting) +- [Platform.sh](https://platform.sh/hosting/python)(Cloud Hosting) +- [PyUp](https://pyup.io) (Security Notification) +- [Emacs](https://github.com/pwalsh/pipenv.el) (Editor Integration) +- [Fish Shell](https://github.com/fisherman/pipenv) (Automatic `$ pipenv shell`!) +- [VS Code](https://code.visualstudio.com/docs/python/environments) (Editor Integration) +- [PyCharm](https://www.jetbrains.com/pycharm/download/) (Editor Integration) +## ☤ Open a Module in Your Editor -☤ Open a Module in Your Editor ------------------------------- - -Pipenv allows you to open any Python module that is installed (including ones in your codebase), with the ``$ pipenv open`` command:: +Pipenv allows you to open any Python module that is installed (including ones in your codebase), with the `$ pipenv open` command: $ pipenv install -e git+https://github.com/kennethreitz/background.git#egg=background Installing -e git+https://github.com/kennethreitz/background.git#egg=background... @@ -293,14 +265,11 @@ Pipenv allows you to open any Python module that is installed (including ones in This allows you to easily read the code you're consuming, instead of looking it up on GitHub. -.. note:: The standard ``EDITOR`` environment variable is used for this. If you're using VS Code, for example, you'll want to ``export EDITOR=code`` (if you're on macOS you will want to `install the command <https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line>`_ on to your ``PATH`` first). - -☤ Automatic Python Installation -------------------------------- +Note -If you have `pyenv <https://github.com/pyenv/pyenv#simple-python-version-management-pyenv>`_ installed and configured, Pipenv will automatically ask you if you want to install a required version of Python if you don't already have it available. +The standard `EDITOR` environment variable is used for this. If you're using VS Code, for example, you'll want to `export EDITOR=code` (if you're on macOS you will want to [install the command](https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line) on to your `PATH` first). -This is a very fancy feature, and we're very proud of it:: +This is a very fancy feature, and we're very proud of it: $ cat Pipfile [[source]] @@ -332,19 +301,17 @@ This is a very fancy feature, and we're very proud of it:: To activate this project's virtualenv, run the following: $ pipenv shell -Pipenv automatically honors both the ``python_full_version`` and ``python_version`` `PEP 508 <https://www.python.org/dev/peps/pep-0508/>`_ specifiers. +Pipenv automatically honors both the `python_full_version` and `python_version` [PEP 508](https://www.python.org/dev/peps/pep-0508/) specifiers. 💫✨🍰✨💫 -☤ Testing Projects ------------------- +## ☤ Testing Projects -Pipenv is being used in projects like `Requests`_ for declaring development dependencies and running the test suite. +Pipenv is being used in projects like [Requests](https://github.com/psf/requests) for declaring development dependencies and running the test suite. -Tox Automation Project -////////////////////// +### Tox Automation Project -Here's an example ``tox.ini`` for both local and external testing:: +Here's an example `tox.ini` for both local and external testing: [tox] envlist = py37, py38, py39, py310, py311, pypy3, ruff @@ -362,45 +329,27 @@ Here's an example ``tox.ini`` for both local and external testing:: pipenv run ruff --version pipenv run ruff . -Pipenv will automatically use the virtualenv provided by ``tox``. If ``pipenv install --dev`` installs e.g. ``pytest``, then installed command ``pytest`` will be present in given virtualenv and can be called directly by ``pytest tests`` instead of ``pipenv run pytest tests``. - -You might also want to add ``--ignore-pipfile`` to ``pipenv install``, as to -not accidentally modify the lock-file on each test run. This causes Pipenv -to ignore changes to the ``Pipfile`` and (more importantly) prevents it from -adding the current environment to ``Pipfile.lock``. This might be important as -the current environment (i.e. the virtualenv provisioned by tox) will usually -contain the current project (which may or may not be desired) and additional -dependencies from ``tox``'s ``deps`` directive. The initial provisioning may -alternatively be disabled by adding ``skip_install = True`` to tox.ini. - -This method requires you to be explicit about updating the lock-file, which is -probably a good idea in any case. - -A 3rd party plugin, `tox-pipenv`_ is also available to use Pipenv natively with tox. +Pipenv will automatically use the virtualenv provided by `tox`. If `pipenv install --dev` installs e.g. `pytest`, then installed command `pytest` will be present in given virtualenv and can be called directly by `pytest tests` instead of `pipenv run pytest tests`. -.. _Requests: https://github.com/psf/requests -.. _tox: https://tox.readthedocs.io/en/latest/ -.. _tox-pipenv: https://tox-pipenv.readthedocs.io/en/latest/ -.. _Travis-CI: https://travis-ci.org/ +You might also want to add `--ignore-pipfile` to `pipenv install`, as to not accidentally modify the lock-file on each test run. This causes Pipenv +to ignore changes to the `Pipfile` and (more importantly) prevents it from adding the current environment to `Pipfile.lock`. This might be important as the current environment (i.e. the virtualenv provisioned by tox) will usually +contain the current project (which may or may not be desired) and additional dependencies from `tox`'s `deps` directive. The initial provisioning may +alternatively be disabled by adding `skip_install = True` to tox.ini. +This method requires you to be explicit about updating the lock-file, which is probably a good idea in any case. +A 3rd party plugin, [tox-pipenv](https://tox-pipenv.readthedocs.io/en/latest/) is also available to use Pipenv natively with tox. ✨🍰✨ -☤ Working with Platform-Provided Python Components --------------------------------------------------- +## ☤ Working with Platform-Provided Python Components -It's reasonably common for platform specific Python bindings for -operating system interfaces to only be available through the system -package manager, and hence unavailable for installation into virtual -environments with ``pip``. In these cases, the virtual environment can -be created with access to the system ``site-packages`` directory:: +It's reasonably common for platform specific Python bindings for operating system interfaces to only be available through the system package manager, and hence unavailable for installation into virtual +environments with `pip`. In these cases, the virtual environment can be created with access to the system `site-packages` directory: $ pipenv --site-packages -To ensure that all ``pip``-installable components actually are installed -into the virtual environment and system packages are only used for -interfaces that don't participate in Python-level dependency resolution -at all, use the ``PIP_IGNORE_INSTALLED`` setting:: +To ensure that all `pip`-installable components actually are installed into the virtual environment and system packages are only used for interfaces that don't participate in Python-level dependency resolution +at all, use the `PIP_IGNORE_INSTALLED` setting: $ PIP_IGNORE_INSTALLED=1 pipenv install --dev diff --git a/docs/changelog.md b/docs/changelog.md new file mode 100644 index 0000000000..e836f43dd6 --- /dev/null +++ b/docs/changelog.md @@ -0,0 +1,1875 @@ +# 2023.9.1 (2023-09-01) + +# Pipenv 2023.9.1 (2023-09-01) + +## Features & Improvements + +- Top level Pipfile sys_platform markers should be transitive; adds top level platform_machine entries that are also transitive. Marker entries continue to operate the same as before. [#5892](https://github.com/pypa/pipenv/issues/5892) + +## Bug Fixes + +- Apply patch for install_search_all_sources = True functionality. [#5895](https://github.com/pypa/pipenv/issues/5895) +- Relative paths improvements for editable installs. [#5896](https://github.com/pypa/pipenv/issues/5896) +- Set log level in resolver to WARN when verbose is not passed. [#5897](https://github.com/pypa/pipenv/issues/5897) +- Handle more variations in private index html to improve hash collection. [#5898](https://github.com/pypa/pipenv/issues/5898) + +# 2023.8.28 (2023-08-28) + +## Bug Fixes + +- Revert change that caused the credentials in source url issue. [#5878](https://github.com/pypa/pipenv/issues/5878) +- Do not treat named requirements as file installs just becacuse a match path exists; better handling of editable keyword for local file installs. + Handle additional edge cases in the setup.py ast parser logic for trying to determine local install package name. [#5885](https://github.com/pypa/pipenv/issues/5885) + +# 2023.8.26 (2023-08-26) + +## Bug Fixes + +- Additional property caching to avoid duplication of sources in the resolver. [#5863](https://github.com/pypa/pipenv/issues/5863) +- Fix recent regressions with local/editable file installs. [#5870](https://github.com/pypa/pipenv/issues/5870) +- Fixes the vcs subdirectory fragments regression; fixes sys_platform markers regression. [#5871](https://github.com/pypa/pipenv/issues/5871) +- Fix regression that caused printing non-printable ascii characters when help was called. [#5872](https://github.com/pypa/pipenv/issues/5872) + +# 2023.8.25 (2023-08-25) + +## Bug Fixes + +- Fix regression of hash collection when downloading package from private indexes when the hash is not found in the index href url fragment. [#5866](https://github.com/pypa/pipenv/issues/5866) + +# 2023.8.23 (2023-08-22) + +## Bug Fixes + +- More gracefully handle @ symbols in vcs URLs to address recent regression with vcs URLs. [#5849](https://github.com/pypa/pipenv/issues/5849) + +# 2023.8.22 (2023-08-22) + +## Bug Fixes + +- Fix regression with `ssh://` vcs URLs introduced in `2023.8.21` whereby ssh vcs URLs are expected to have at least one `@` symbol. [#5846](https://github.com/pypa/pipenv/issues/5846) + +# 2023.8.21 (2023-08-21) + +## Bug Fixes + +- Add back some relevant caching to increase performance after the major refactor released with `2023.8.19` [#5841](https://github.com/pypa/pipenv/issues/5841) +- Fix some edge cases around vcs dependencies without a ref, and older Pipfile/lockfile formats. [#5843](https://github.com/pypa/pipenv/issues/5843) + +## Vendored Libraries + +- Remove unused command line interface for vendored packages. [#5840](https://github.com/pypa/pipenv/issues/5840) + +# 2023.8.20 (2023-08-20) + +## Bug Fixes + +- Fix the expected output of the `version` command. [#5838](https://github.com/pypa/pipenv/issues/5838) + +# 2023.8.19 (2023-08-19) + +## Features & Improvements + +- The `--categories` option now works with requirements.txt file. [#5722](https://github.com/pypa/pipenv/issues/5722) + +## Bug Fixes + +- Drop requirementslib for managing pip lines and InstallRequirements, bring remaining requirementslib functionality into pipenv. + Fixes numerous reports about extras installs with vcs and file installs; format pip lines correctly to not generate deprecation warnings. [#5793](https://github.com/pypa/pipenv/issues/5793) + +## Vendored Libraries + +- Update pip 23.2 -> 23.2.1 [#5822](https://github.com/pypa/pipenv/issues/5822) + +## Improved Documentation + +- Added documentation on how to move or rename a project directory [#5129](https://github.com/pypa/pipenv/issues/5129) + +## Removals and Deprecations + +- The `--skip-lock` flag which was deprecated, has now been removed to unblock modernizing the pipenv resolver code. [#5805](https://github.com/pypa/pipenv/issues/5805) + +# 2023.7.23 (2023-07-23) + +## Features & Improvements + +- Upgrades `pip==23.2` which includes everything from the pip changelog. Drops the "install_compatatability_finder" pip internals patch. [#5808](https://github.com/pypa/pipenv/issues/5808) + +## Bug Fixes + +- Fix issue parsing some Pipfiles with separate packages.\<pkg> sections (tomlkit OutOfOrderTableProxy) [#5794](https://github.com/pypa/pipenv/issues/5794) +- Fix all ruff linter warnings [#5807](https://github.com/pypa/pipenv/issues/5807) +- Restore running Resolver in sub-process using the project python by default; maintains ability to run directly by setting `PIPENV_RESOLVER_PARENT_PYTHON` environment variable to 1 (useful for internal debugging). [#5809](https://github.com/pypa/pipenv/issues/5809) +- Fix error when a Windows path begins with a '' with `pythonfinder==2.0.5`. [#5812](https://github.com/pypa/pipenv/issues/5812) + +## Vendored Libraries + +- Remove usage of click.secho in some modules. [#5804](https://github.com/pypa/pipenv/issues/5804) + +2023.7.11 (2023-07-11) + +## Bug Fixes + +- Invoke the resolver in the same process as pipenv rather than utilizing subprocess. [#5787](https://github.com/pypa/pipenv/issues/5787) +- Fix regression markers being included as None/null in requirements command. [#5788](https://github.com/pypa/pipenv/issues/5788) + +# 2023.7.9 (2023-07-09) + +## Bug Fixes + +- Drop the --keep-outdated flag and --selective-upgrade flags that have been deprecated in favor of update/upgrade commands. [#5730](https://github.com/pypa/pipenv/issues/5730) +- Fix regressions in the `requirements` command related to standard index extras and handling of local file requirements. [#5784](https://github.com/pypa/pipenv/issues/5784) + +# 2023.7.4 (2023-07-04) + +## Bug Fixes + +- Fixes regression on Pipfile requirements syntax. Ensure default operator is provided to requirement lib to avoid crash. [#5765](https://github.com/pypa/pipenv/issues/5765) +- Ensure hashes included in a generated requirements file are after any markers. [#5777](https://github.com/pypa/pipenv/issues/5777) + +# 2023.7.3 (2023-07-02) + +## Bug Fixes + +- Fix regression with `--system` flag usage. [#5773](https://github.com/pypa/pipenv/issues/5773) + +# 2023.7.1 (2023-07-01) + +## Bug Fixes + +- Patch `_get_requests_session` method to consider `PIP_CLIENT_CERT` value when present. [#5746](https://github.com/pypa/pipenv/issues/5746) +- Fix regression in `requirements` command that was causing package installs after upgrade to `requirementslib==3.0.0`. [#5755](https://github.com/pypa/pipenv/issues/5755) +- Fix `error: invalid command 'egg_info'` edge case with requirementslib 3.0.0. It exposed pipenv resolver sometimes was using a different python than expected. [#5760](https://github.com/pypa/pipenv/issues/5760) +- Fix issue in requirementslib 3.0.0 where dependencies defined in pyproject.toml were not being included in the lock file. [#5766](https://github.com/pypa/pipenv/issues/5766) + +## Removals and Deprecations + +- Bump dparse to 0.6.3 [#5750](https://github.com/pypa/pipenv/issues/5750) + +# 2023.6.26 (2023-06-26) + +## Improved Documentation + +- Add missing environment variable descriptions back to documentation [#missing_env_var_desc](https://github.com/pypa/pipenv/issues/missing_env_var_desc) + +# 2023.6.18 (2023-06-18) + +## Bug Fixes + +- Fixes resolver to only consider the default index for packages when a secondary index is not specified. This brings the code into alignment with stated assumptions about index restricted packages behavior of `pipenv`. [#5737](https://github.com/pypa/pipenv/issues/5737) + +## Removals and Deprecations + +- Deprecation of `--skip-lock` flag as it bypasses the security benefits of pipenv. Plus it lacks proper deterministic support of installation from multiple package indexes. [#5737](https://github.com/pypa/pipenv/issues/5737) + +# 2023.6.12 (2023-06-11) + +## Bug Fixes + +- Remove the `sys.path` modifications and as a result fixes keyring support. [#5719](https://github.com/pypa/pipenv/issues/5719) + +# 2023.6.11 (2023-06-11) + +## Vendored Libraries + +- Upgrades to `pipdeptree==2.8.0` which fixes edge cases of the `pipenv graph` command. [#5720](https://github.com/pypa/pipenv/issues/5720) + +# 2023.6.2 (2023-06-02) + +## Features & Improvements + +- Resolver performance: package sources following PEP 503 will leverage package hashes from the URL fragment, without downloading the package. [#5701](https://github.com/pypa/pipenv/issues/5701) + +## Bug Fixes + +- Improve regex for python versions to handle hidden paths; handle relative paths to python better as well. [#4588](https://github.com/pypa/pipenv/issues/4588) +- Update `pythonfinder==2.0.4` with fix for "RecursionError: maximum recursion depth exceeded". [#5709](https://github.com/pypa/pipenv/issues/5709) + +## Vendored Libraries + +- Drop old vendored toml library. Use stdlib tomllib or tomli instead. [#5678](https://github.com/pypa/pipenv/issues/5678) +- Drop vendored library cerberus. This isn't actually used by pipenv. [#5699](https://github.com/pypa/pipenv/issues/5699) + +# 2023.5.19 (2023-05-19) + +## Bug Fixes + +- Consider `--index` argument in `update` and `upgrade` commands. [#5692](https://github.com/pypa/pipenv/issues/5692) + +## Vendored Libraries + +- Upgrade `pythonfinder==2.0.0` which also brings in `pydantic==1.10.7`. [#5677](https://github.com/pypa/pipenv/issues/5677) + +# 2023.4.29 (2023-04-29) + +## Vendored Libraries + +- Vendor in `pip==23.1.2` latest. [#5671](https://github.com/pypa/pipenv/issues/5671) +- Vendor in `requirementslib==2.3.0` which drops usage of `vistir`. [#5672](https://github.com/pypa/pipenv/issues/5672) + +# 2023.4.20 (2023-04-20) + +## Features & Improvements + +- Checks environment variable `PIP_TRUSTED_HOSTS` when evaluating an + index specified at the command line when adding to `Pipfile`. + + For example, this command line + + ``` + PIP_TRUSTED_HOSTS=internal.mycompany.com pipenv install pypkg --index=https://internal.mycompany.com/pypi/simple + ``` + + will add the following to the `Pipfile`: + + ``` + [[source]] + url = 'https://internal.mycompany.com/pypi/simple' + verify_ssl = false + name = 'Internalmycompany' + + [packages] + pypkg = {version="*", index="Internalmycompany"} + ``` + + This allows users with private indexes to add them to `Pipfile` + initially from command line with correct permissions using environment + variable `PIP_TRUSTED_HOSTS`. [#5572](https://github.com/pypa/pipenv/issues/5572) + +- Vendor in the updates, upgrades and fixes provided by `pip==23.1`. [#5655](https://github.com/pypa/pipenv/issues/5655) + +- Replace flake8 and isort with [ruff](https://beta.ruff.rs). [#ruff](https://github.com/pypa/pipenv/issues/ruff) + +## Bug Fixes + +- Fix regression with `--skip-lock` option with `install` command. [#5653](https://github.com/pypa/pipenv/issues/5653) + +## Vendored Libraries + +- Vendor in latest `python-dotenv==1.0.0` [#5656](https://github.com/pypa/pipenv/issues/5656) +- Vendor in latest available dependencies: `attrs==23.1.0` `click-didyoumean==0.3.0` `click==8.1.3` `markupsafe==2.1.2` `pipdeptree==2.7.0` `shellingham==1.5.0.post1` `tomlkit==0.11.7` [#5657](https://github.com/pypa/pipenv/issues/5657) +- Vendor in latest `requirementslib==2.2.5` which includes updates for pip 23.1 [#5659](https://github.com/pypa/pipenv/issues/5659) + +## Improved Documentation + +- Made documentation clear about tilde-equals operator for package versions. [#5594](https://github.com/pypa/pipenv/issues/5594) + +# 2023.3.20 (2023-03-19) + +No significant changes. + +# 2023.3.18 (2023-03-19) + +## Bug Fixes + +- Fix import error in virtualenv utility for creating new environments caused by `2023.3.18` release. [#5636](https://github.com/pypa/pipenv/issues/5636) + +# 2023.3.18 (2023-03-18) + +## Features & Improvements + +- Provide a more powerful solution than `--keep-outdated` and `--selective-upgrade` which are deprecated for removal. + Introducing the `pipenv upgrade` command which takes the same package specifiers as `pipenv install` and + updates the `Pipfile` and `Pipfile.lock` with a valid lock resolution that only effects the specified packages and their dependencies. + Additionally, the `pipenv update` command has been updated to use the `pipenv upgrade` routine when packages are provided, which will install sync the new lock file as well. [#5617](https://github.com/pypa/pipenv/issues/5617) + +## Vendored Libraries + +- Bump vistir to 0.8.0, requirementslib to 2.2.4. [#5635](https://github.com/pypa/pipenv/issues/5635) + +# 2023.2.18 (2023-02-18) + +## Features & Improvements + +- `pipenv` now reads the system `pip.conf` or `pip.ini` file in order to determine pre-defined indexes to use for package resolution and installation. [#5297](https://github.com/pypa/pipenv/issues/5297) +- Behavior change for `pipenv check` now checks the default packages group of the lockfile. + Specifying `--categories` to override which categories to check against. + Pass `--use-installed` to get the prior behavior of checking the packages actually installed into the environment. [#5600](https://github.com/pypa/pipenv/issues/5600) + +## Bug Fixes + +- Fix regression with detection of `CI` env variable being set to something other than a truthy value. [#5554](https://github.com/pypa/pipenv/issues/5554) +- Fix `--categories` argument inconsistency between requirements command and install/sync by allowing comma separated values or spaces. [#5570](https://github.com/pypa/pipenv/issues/5570) +- Use Nushell overlays when running `pipenv shell`. [#5603](https://github.com/pypa/pipenv/issues/5603) + +## Vendored Libraries + +- Vendor in the `pip==23.0` release. [#5586](https://github.com/pypa/pipenv/issues/5586) +- Vendor in `pip==23.0.1` minor pt release. Updates `pythonfinder==1.3.2`. [#5614](https://github.com/pypa/pipenv/issues/5614) + +## Improved Documentation + +- Make some improvements to the contributing guide. [#5611](https://github.com/pypa/pipenv/issues/5611) + +# 2023.2.4 (2023-02-04) + +## Bug Fixes + +- Fix overwriting of output in verbose mode [#5530](https://github.com/pypa/pipenv/issues/5530) +- Fix for resolution error when direct url includes an extras. [#5536](https://github.com/pypa/pipenv/issues/5536) + +## Removals and Deprecations + +- Remove pytest-pypi package since it's not used anymore [#5556](https://github.com/pypa/pipenv/issues/5556) +- Remove deprecated --three flag from the CLI. [#5576](https://github.com/pypa/pipenv/issues/5576) + +# 2022.12.19 (2022-12-19) + +## Bug Fixes + +- Fix for `requirementslib` hanging during install of remote wheels files. [#5546](https://github.com/pypa/pipenv/issues/5546) + +# 2022.12.17 (2022-12-17) + +## Bug Fixes + +- virtualenv creation no longer uses `--creator=venv` by default; introduced two environment variables: + `PIPENV_VIRTUALENV_CREATOR` -- May be specified to instruct virtualenv which `--creator=` to use. + `PIPENV_VIRTUALENV_COPIES` -- When specified as truthy, instructs virtualenv to not use symlinks. [#5477](https://github.com/pypa/pipenv/issues/5477) +- Fix regression where `path` is not propagated to the `Pipfile.lock`. [#5479](https://github.com/pypa/pipenv/issues/5479) +- Solve issue where null markers were getting added to lock file when extras were provided. [#5486](https://github.com/pypa/pipenv/issues/5486) +- Fix: `update --outdated` raises NonExistentKey with outdated dev packages [#5540](https://github.com/pypa/pipenv/issues/5540) + +## Vendored Libraries + +- Vendor in `pip==22.3.1` which is currently the latest version of `pip`. [#5520](https://github.com/pypa/pipenv/issues/5520) +- - Bump version of requirementslib to 2.2.1 + - Bump version of vistir to 0.7.5 + - Bump version of colorama to 0.4.6 [#5522](https://github.com/pypa/pipenv/issues/5522) +- Bump plette version to 0.4.4 [#5539](https://github.com/pypa/pipenv/issues/5539) + +# 2022.11.30 (2022-11-30) + +## Bug Fixes + +- Fix regression: pipenv does not sync indexes to lockfile. [#5508](https://github.com/pypa/pipenv/issues/5508) + +# 2022.11.25 (2022-11-24) + +## Bug Fixes + +- Solving issue where `pipenv check` command has been broken in the published wheel distribution. [#5493](https://github.com/pypa/pipenv/issues/5493) + +# 2022.11.24 (2022-11-24) + +## Bug Fixes + +- Stop building universal wheels since Python 2 is no longer supported. [#5496](https://github.com/pypa/pipenv/issues/5496) + +# 2022.11.23 (2022-11-23) + +## Features & Improvements + +- Find nushell activate scripts. [#5470](https://github.com/pypa/pipenv/issues/5470) + +## Vendored Libraries + +- - Drop unused code from cerberus + - Drop unused module wheel [#5467](https://github.com/pypa/pipenv/issues/5467) +- - Replace yaspin spinner with rich spinner. + - Bump vistir version to 0.7.4 [#5468](https://github.com/pypa/pipenv/issues/5468) +- Bump version of requirementslib to 2.2.0 + Drop yaspin which is no longer used. + Bump vistir to version 0.7.4 + Remove parse. + Remove termcolor. + Remove idna. [#5481](https://github.com/pypa/pipenv/issues/5481) + +# 2022.11.11 (2022-11-11) + +## Bug Fixes + +- Fix regression of lock generation that caused the keep-outdated behavior to be default. [#5456](https://github.com/pypa/pipenv/issues/5456) + +# 2022.11.5 (2022-11-05) + +## Bug Fixes + +- Rollback the change in version of `colorama` due to regressions in core functionality. [#5459](https://github.com/pypa/pipenv/issues/5459) + +# 2022.11.4 (2022-11-04) + +## Features & Improvements + +- Allow pipenv settings to be explicitly disabled more easily by assigning to the environment variable a falsy value. [#5451](https://github.com/pypa/pipenv/issues/5451) + +## Bug Fixes + +- Provide an install iteration per index when `install_search_all_sources` is `false` (default behavior). + This fixes regression where install phase was using unexpected index after updating `pip==22.3` [#5444](https://github.com/pypa/pipenv/issues/5444) + +## Vendored Libraries + +- Drop tomli, which is not used anymore. + Bump attrs version see #5449. + Drop distlib, colorama and platformdirs - use the ones from pip.\_vendor. [#5450](https://github.com/pypa/pipenv/issues/5450) + +# 2022.10.25 (2022-10-25) + +## Features & Improvements + +- Add support to export requirements file for a specified set of categories. [#5431](https://github.com/pypa/pipenv/issues/5431) + +## Vendored Libraries + +- Remove appdirs.py in favor of platformdirs. [#5420](https://github.com/pypa/pipenv/issues/5420) + +## Removals and Deprecations + +- Remove usage of vistir.cmdparse in favor of pipenv.cmdparse [#5419](https://github.com/pypa/pipenv/issues/5419) + +# 2022.10.12 (2022-10-12) + +## Improved Documentation + +- Update pipenv docs for with example for callabale package functions in Pipfile scripts [#5396](https://github.com/pypa/pipenv/issues/5396) + +# 2022.10.11 (2022-10-11) + +## Bug Fixes + +- Revert decision to change the default isolation level because it caused problems with existing workflows; solution is to recommend users that have issues requiring pre-requisites to pass --extra-pip-args="--no-build-isolation" in their install or sync commands. [#5399](https://github.com/pypa/pipenv/issues/5399) + +# 2022.10.10 (2022-10-10) + +## Features & Improvements + +- Add ability for callable scripts in Pipfile under \[scripts\]. Callables can now be added like: `<pathed.module>:<func>` and can also take arguments. For example: `func = {call = "package.module:func('arg1', 'arg2')"}` then this can be activated in the shell with `pipenv run func` [#5294](https://github.com/pypa/pipenv/issues/5294) + +## Bug Fixes + +- Fixes regression from `2022.10.9` where `Pipfile` with `pipenv` section began generating new hash, + and also fix regression where lock phase did not update the hash value. [#5394](https://github.com/pypa/pipenv/issues/5394) + +# 2022.10.9 (2022-10-09) + +## Behavior Changes + +- New pipfiles show python_full_version under \[requires\] if specified. Previously creating a new pipenv project would only specify in the Pipfile the major and minor version, i.e. "python_version = 3.7". Now if you create a new project with a fully named python version it will record both in the Pipfile. So: "python_version = 3.7" and "python_full_version = 3.7.2" [#5345](https://github.com/pypa/pipenv/issues/5345) + +## Relates to dev process changes + +- Silence majority of pytest.mark warnings by registering custom marks. Can view a list of custom marks by running `pipenv run pytest --markers` + +# 2022.10.4 (2022-10-04) + +## Bug Fixes + +- Use `--creator=venv` when creating virtual environments to avoid issue with sysconfig `posix_prefix` on some systems. [#5075](https://github.com/pypa/pipenv/issues/5075) +- Prefer to use the lockfile sources if available during the install phase. [#5380](https://github.com/pypa/pipenv/issues/5380) + +## Vendored Libraries + +- Drop vendored six - we no longer depend on this library, as we migrated from pipfile to plette. [#5187](https://github.com/pypa/pipenv/issues/5187) + +# 2022.9.24 (2022-09-24) + +## Bug Fixes + +- Update `requirementslib==2.0.3` to always evaluate the requirement markers fresh (without lru_cache) to fix marker determinism issue. [#4660](https://github.com/pypa/pipenv/issues/4660) + +# 2022.9.21 (2022-09-21) + +## Bug Fixes + +- Fix regression to `install --skip-lock` with update to `plette`. [#5368](https://github.com/pypa/pipenv/issues/5368) + +# 2022.9.20 (2022-09-20) + +## Behavior Changes + +- Remove usage of pipfile module in favour of Plette. + pipfile is not actively maintained anymore. Plette is actively maintained, + and has stricter checking of the Pipefile and Pipefile.lock. As a result, + Pipefile with unnamed package indices will fail to lock. If a Pipefile + was hand crafeted, and the source is anonymous an error will be thrown. + The solution is simple, add a name to your index, e.g, replace: + + ``` + [[source]] + url = "https://pypi.acme.com/simple" + verify_ssl = true + ``` + + With: + + ``` + [[source]] + url = "https://pypi.acme.com/simple" + verify_ssl = true + name = acmes_private_index `#5339 <https://github.com/pypa/pipenv/issues/5339>`_ + ``` + +## Bug Fixes + +- Modernize `pipenv` path patch with `importlib.util` to eliminate import of `pkg_resources` [#5349](https://github.com/pypa/pipenv/issues/5349) + +## Vendored Libraries + +- Remove iso8601 from vendored packages since it was not used. [#5346](https://github.com/pypa/pipenv/issues/5346) + +# 2022.9.8 (2022-09-08) + +## Features & Improvements + +- It is now possible to supply additional arguments to `pip` install by supplying `--extra-pip-args="<arg1> <arg2>"` + See the updated documentation `Supplying additional arguments to pip` for more details. [#5283](https://github.com/pypa/pipenv/issues/5283) + +## Bug Fixes + +- Make editable detection better because not everyone specifies editable entry in the Pipfile for local editable installs. [#4784](https://github.com/pypa/pipenv/issues/4784) +- Add error handling for when the installed package setup.py does not contain valid markers. [#5329](https://github.com/pypa/pipenv/issues/5329) +- Load the dot env earlier so that `PIPENV_CUSTOM_VENV_NAME` is more useful across projects. [#5334](https://github.com/pypa/pipenv/issues/5334) + +## Vendored Libraries + +- Bump version of shellingham to support nushell. [#5336](https://github.com/pypa/pipenv/issues/5336) +- Bump plette to version v0.3.0 [#5337](https://github.com/pypa/pipenv/issues/5337) +- Bump version of pipdeptree [#5343](https://github.com/pypa/pipenv/issues/5343) + +## Removals and Deprecations + +- Add deprecation warning to the --three flag. Pipenv now uses python3 by default. [#5328](https://github.com/pypa/pipenv/issues/5328) + +## Relates to dev process changes + +- Convert the test runner to use `pypiserver` as a standalone process for all tests that referencce internal `pypi` artifacts. + General refactoring of some test cases to create more variety in packages selected--preferring lighter weight packages--in existing test cases. + +# 2022.9.4 (2022-09-04) + +## Bug Fixes + +- Fix the issue from `2022.9.2` where tarball URL packages were being skipped on batch_install. [#5306](https://github.com/pypa/pipenv/issues/5306) + +# 2022.9.2 (2022-09-02) + +## Bug Fixes + +- Fix issue where unnamed constraints were provided but which are not allowed by `pip` resolver. [#5273](https://github.com/pypa/pipenv/issues/5273) + +# 2022.8.31 (2022-08-31) + +## Features & Improvements + +- Performance optimization to `batch_install` results in a faster and less CPU intensive `pipenv sync` or `pipenv install` experience. [#5301](https://github.com/pypa/pipenv/issues/5301) + +## Bug Fixes + +- `pipenv` now uses a `NamedTemporaryFile` for rsolver constraints and drops internal env var `PIPENV_PACKAGES`. [#4925](https://github.com/pypa/pipenv/issues/4925) + +## Removals and Deprecations + +- Remove no longer used method `which_pip`. [#5314](https://github.com/pypa/pipenv/issues/5314) +- Drop progress bar file due to recent performance optimization to combine `batch_install` requirements in at most two invocations of `pip install`. + To see progress of install pass `--verbose` flag and `pip` progress will be output in realtime. [#5315](https://github.com/pypa/pipenv/issues/5315) + +# 2022.8.30 (2022-08-30) + +## Bug Fixes + +- Fix an issue when using `pipenv install --system` on systems that having the `python` executable pointing to Python 2 and a Python 3 executable being `python3`. [#5296](https://github.com/pypa/pipenv/issues/5296) +- Sorting `constraints` before resolving, which fixes `pipenv lock` generates nondeterminism environment markers. [#5299](https://github.com/pypa/pipenv/issues/5299) +- Fix #5273, use our own method for checking if a package is a valid constraint. [#5309](https://github.com/pypa/pipenv/issues/5309) + +## Vendored Libraries + +- Vendor in `requirementslib==2.0.1` which fixes issue with local install not marked editable, and vendor in `vistir==0.6.1` which drops python2 support. + Drops `orderedmultidict` from vendoring. [#5308](https://github.com/pypa/pipenv/issues/5308) + +# 2022.8.24 (2022-08-24) + +## Bug Fixes + +- Remove eager and unnecessary importing of `setuptools` and `pkg_resources` to avoid conflict upgrading `setuptools`. + Roll back `sysconfig` patch of `pip` because it was problematic for some `--system` commands. [#5228](https://github.com/pypa/pipenv/issues/5228) + +## Vendored Libraries + +- Vendor in `requirementslib==2.0.0` and drop `pip-shims` entirely. [#5228](https://github.com/pypa/pipenv/issues/5228) +- Vendor in `pythonfinder==1.3.1` [#5292](https://github.com/pypa/pipenv/issues/5292) + +# 2022.8.19 (2022-08-19) + +## Bug Fixes + +- Fix issue where resolver is provided with `install_requires` constraints from `setup.py` that depend on editable dependencies and could not resolve them. [#5271](https://github.com/pypa/pipenv/issues/5271) +- Fix for `pipenv lock` fails for packages with extras as of `2022.8.13`. [#5274](https://github.com/pypa/pipenv/issues/5274) +- Revert the exclusion of `BAD_PACKAGES` from `batch_install` in order for `pipenv` to install specific versions of `setuptools`. + To prevent issue upgrading `setuptools` this patches `_USE_SYSCONFIG_DEFAULT` to use `sysconfig` for `3.7` and above whereas `pip` default behavior was `3.10` and above. [#5275](https://github.com/pypa/pipenv/issues/5275) + +# 2022.8.17 (2022-08-17) + +## Bug Fixes + +- Fix "The Python interpreter can't be found" error when running `pipenv install --system` with a python3 but no python. [#5261](https://github.com/pypa/pipenv/issues/5261) +- Revise pip import patch to include only `pipenv` from site-packages and removed `--ignore-installed` argument from pip install in order to fix regressions with `--use-site-packages`. [#5265](https://github.com/pypa/pipenv/issues/5265) + +# 2022.8.15 (2022-08-15) + +## Bug Fixes + +- `pip_install` method was using a different way of finding the python executable than other `pipenv` commands, which caused an issue with skipping package installation if it was already installed in site-packages. [#5254](https://github.com/pypa/pipenv/issues/5254) + +# 2022.8.14 (2022-08-14) + +## Bug Fixes + +- Removed `packaging` library from `BAD_PACKAGES` constant to allow it to be installed, which fixes regression from `pipenv==2022.8.13`. [#5247](https://github.com/pypa/pipenv/issues/5247) + +# 2022.8.13 (2022-08-13) + +## Bug Fixes + +- If environment variable `CI` or `TF_BUILD` is set but does not evaluate to `False` it is now treated as `True`. [#5128](https://github.com/pypa/pipenv/issues/5128) +- Fix auto-complete crashing on 'install' and 'uninstall' keywords [#5214](https://github.com/pypa/pipenv/issues/5214) +- Address remaining `pipenv` commands that were still referencing the user or system installed `pip` to use the vendored `pip` internal to `pipenv`. [#5229](https://github.com/pypa/pipenv/issues/5229) +- Use `packages` as constraints when locking `dev-packages` in Pipfile. + Use `packages` as constraints when installing new `dev-packages`. [#5234](https://github.com/pypa/pipenv/issues/5234) + +## Vendored Libraries + +- Vendor in minor `pip` update `22.2.2` [#5230](https://github.com/pypa/pipenv/issues/5230) + +## Improved Documentation + +- Add documentation for environment variables the configure pipenv. [#5235](https://github.com/pypa/pipenv/issues/5235) + +## Removals and Deprecations + +- The deprecated way of generating requirements `install -r` or `lock -r` has been removed in favor of the `pipenv requirements` command. [#5200](https://github.com/pypa/pipenv/issues/5200) + +# 2022.8.5 (2022-08-05) + +## Features & Improvements + +- support PIPENV_CUSTOM_VENV_NAME to be the venv name if specified, update relevant docs. [#4974](https://github.com/pypa/pipenv/issues/4974) + +## Bug Fixes + +- Remove usages of `pip_shims` from the non vendored `pipenv` code, but retain initialization for `requirementslib` still has usages. [#5204](https://github.com/pypa/pipenv/issues/5204) +- Fix case sensitivity of color name `red` in exception when getting hashes from pypi in `_get_hashes_from_pypi`. [#5206](https://github.com/pypa/pipenv/issues/5206) +- Write output from `subprocess_run` directly to `stdout` instead of creating temporary file. + Remove deprecated `distutils.sysconfig`, use `sysconfig`. [#5210](https://github.com/pypa/pipenv/issues/5210) + +## Vendored Libraries + +- - Rename patched `notpip` to `pip` in order to be clear that its a patched version of pip. + - Remove the part of \_post_pip_import.patch that overrode the standalone pip to be the user installed pip, now we fully rely on our vendored and patched `pip`, even for all types of installs. + - Vendor in the next newest version of `pip==22.2` + - Modify patch for `pipdeptree` to not use `pip-shims` [#5188](https://github.com/pypa/pipenv/issues/5188) + - Remove vendored `urllib3` in favor of using it from vendored version in `pip._vendor` [#5215](https://github.com/pypa/pipenv/issues/5215) + +## Removals and Deprecations + +- Remove tests that have been for a while been marked skipped and are no longer relevant. [#5165](https://github.com/pypa/pipenv/issues/5165) + +# 2022.7.24 (2022-07-24) + +## Bug Fixes + +- Re-enabled three installs tests again on the Windows CI as recent refactor work has fixed them. [#5064](https://github.com/pypa/pipenv/issues/5064) +- Support ANSI `NO_COLOR` environment variable and deprecate `PIPENV_COLORBLIND` variable, which will be removed after this release. [#5158](https://github.com/pypa/pipenv/issues/5158) +- Fixed edge case where a non-editable file, url or vcs would overwrite the value `no_deps` for all other requirements in the loop causing a retry condition. [#5164](https://github.com/pypa/pipenv/issues/5164) +- Vendor in latest `requirementslib` for fix to lock when using editable VCS module with specific `@` git reference. [#5179](https://github.com/pypa/pipenv/issues/5179) + +## Vendored Libraries + +- Remove crayons and replace with click.secho and click.styles per <https://github.com/pypa/pipenv/issues/3741> [#3741](https://github.com/pypa/pipenv/issues/3741) +- Vendor in latest version of `pip==22.1.2` which upgrades `pipenv` from `pip==22.0.4`. + Vendor in latest version of `requirementslib==1.6.7` which includes a fix for tracebacks on encountering Annotated variables. + Vendor in latest version of `pip-shims==0.7.3` such that imports could be rewritten to utilize `packaging` from vendor'd `pip`. + Drop the `packaging` requirement from the `vendor` directory in `pipenv`. [#5147](https://github.com/pypa/pipenv/issues/5147) +- Remove unused vendored dependency `normailze-charset`. [#5161](https://github.com/pypa/pipenv/issues/5161) +- Remove obsolete package `funcsigs`. [#5168](https://github.com/pypa/pipenv/issues/5168) +- Bump vendored dependency `pyparsing==3.0.9`. [#5170](https://github.com/pypa/pipenv/issues/5170) + +# 2022.7.4 (2022-07-04) + +## Behavior Changes + +- Adjust `pipenv requirements` to add markers and add an `--exclude-markers` option to allow the exclusion of markers. [#5092](https://github.com/pypa/pipenv/issues/5092) + +## Bug Fixes + +- Stopped expanding environment variables when using `pipenv requirements` [#5134](https://github.com/pypa/pipenv/issues/5134) + +## Vendored Libraries + +- Depend on `requests` and `certifi` from vendored `pip` and remove them as explicit vendor dependencies. [#5000](https://github.com/pypa/pipenv/issues/5000) +- Vendor in the latest version of `requirementslib==1.6.5` which includes bug fixes for beta python versions, projects with an at sign (@) in the path, and a `setuptools` deprecation warning. [#5132](https://github.com/pypa/pipenv/issues/5132) + +## Relates to dev process changes + +- Switch from using type comments to type annotations. + +# 2022.5.3.dev0 (2022-06-07) + +## Bug Fixes + +- Adjust pipenv to work with the newly added `venv` install scheme in Python. + First check if `venv` is among the available install schemes, and use it if it is. Otherwise fall back to the `nt` or `posix_prefix` install schemes as before. This should produce no change for environments where the install schemes were not redefined. [#5096](https://github.com/pypa/pipenv/issues/5096) + +# 2022.5.2 (2022-05-02) + +## Bug Fixes + +- Fixes issue of `pipenv lock -r` command printing to stdout instead of stderr. [#5091](https://github.com/pypa/pipenv/issues/5091) + +# 2022.4.30 (2022-04-30) + +## Bug Fixes + +- Fixes issue of `requirements` command problem by modifying to print `-e` and path of the editable package. [#5070](https://github.com/pypa/pipenv/issues/5070) +- Revert specifier of `setuptools` requirement in `setup.py` back to what it was in order to fix `FileNotFoundError: [Errno 2]` issue report. [#5075](https://github.com/pypa/pipenv/issues/5075) +- Fixes issue of requirements command where git requirements cause the command to fail, solved by using existing convert_deps_to_pip function. [#5076](https://github.com/pypa/pipenv/issues/5076) + +## Vendored Libraries + +- Vendor in `requirementslib==1.6.4` to Fix `SetuptoolsDeprecationWarning` `setuptools.config.read_configuration` became deprecated. [#5081](https://github.com/pypa/pipenv/issues/5081) + +## Removals and Deprecations + +- Remove more usage of misc functions of vistir. Many of this function are available in the STL or in another dependency of pipenv. [#5078](https://github.com/pypa/pipenv/issues/5078) + +# 2022.4.21 (2022-04-21) + +## Removals and Deprecations + +- Updated setup.py to remove support for python 3.6 from built `pipenv` packages' Metadata. [#5065](https://github.com/pypa/pipenv/issues/5065) + +# 2022.4.20 (2022-04-20) + +## Features & Improvements + +- Added new Pipenv option `install_search_all_sources` that allows installation of packages from an + existing `Pipfile.lock` to search all defined indexes for the constrained package version and hash signatures. [#5041](https://github.com/pypa/pipenv/issues/5041) + +## Bug Fixes + +- allow the user to disable the `no_input` flag, so the use of e.g Google Artifact Registry is possible. [#4706](https://github.com/pypa/pipenv/issues/4706) +- Fixes case where packages could fail to install and the exit code was successful. [#5031](https://github.com/pypa/pipenv/issues/5031) + +## Vendored Libraries + +- Updated vendor version of `pip` from `21.2.2` to `22.0.4` which fixes a number of bugs including + several reports of pipenv locking for an infinite amount of time when using certain package constraints. + This also drops support for python 3.6 as it is EOL and support was removed in pip 22.x [#4995](https://github.com/pypa/pipenv/issues/4995) + +## Removals and Deprecations + +- Removed the vendor dependency `more-itertools` as it was originally added for `zipp`, which since stopped using it. [#5044](https://github.com/pypa/pipenv/issues/5044) +- Removed all usages of `pipenv.vendor.vistir.compat.fs_str`, since this function was used for PY2-PY3 compatibility and is no longer needed. [#5062](https://github.com/pypa/pipenv/issues/5062) + +## Relates to dev process changes + +- Added pytest-cov and basic configuration to the project for generating html testing coverage reports. +- Make all CI jobs run only after the lint stage. Also added a makefile target for vendoring the packages. + +# 2022.4.8 (2022-04-08) + +## Features & Improvements + +- Implements a `pipenv requirements` command which generates a requirements.txt compatible output without locking. [#4959](https://github.com/pypa/pipenv/issues/4959) +- Internal to pipenv, the utils.py was split into a utils module with unused code removed. [#4992](https://github.com/pypa/pipenv/issues/4992) + +## Bug Fixes + +- Pipenv will now ignore `.venv` in the project when `PIPENV_VENV_IN_PROJECT` variable is False. + Unset variable maintains the existing behavior of preferring to use the project's `.venv` should it exist. [#2763](https://github.com/pypa/pipenv/issues/2763) +- Fix an edge case of hash collection in index restricted packages whereby the hashes for some packages would + be missing from the `Pipfile.lock` following package index restrictions added in `pipenv==2022.3.23`. [#5023](https://github.com/pypa/pipenv/issues/5023) + +## Improved Documentation + +- Pipenv CLI documentation generation has been fixed. It had broke when `click` was vendored into the project in + `2021.11.9` because by default `sphinx-click` could no longer determine the CLI inherited from click. [#4778](https://github.com/pypa/pipenv/issues/4778) +- Improve documentation around extra indexes and index restricted packages. [#5022](https://github.com/pypa/pipenv/issues/5022) + +## Removals and Deprecations + +- Removes the optional `install` argument `--extra-index-url` as it was not compatible with index restricted packages. + Using the `--index` argument is the correct way to specify a package should be pulled from the non-default index. [#5022](https://github.com/pypa/pipenv/issues/5022) + +## Relates to dev process changes + +- Added code linting using pre-commit-hooks, black, flake8, isort, pygrep-hooks, news-fragments and check-manifest. + Very similar to pip's configuration; adds a towncrier new's type `process` for change to Development processes. + +# 2022.3.28 (2022-03-27) + +## Bug Fixes + +- Environment variables were not being loaded when the `--quiet` flag was set [#5010](https://github.com/pypa/pipenv/issues/5010) +- It would appear that `requirementslib` was not fully specifying the subdirectory to `build_pep517` and + and when a new version of `setuptools` was released, the test `test_lock_nested_vcs_direct_url` + broke indicating the Pipfile.lock no longer contained the extra dependencies that should have been resolved. + This regression affected `pipenv>=2021.11.9` but has been fixed by a patch to `requirementslib`. [#5019](https://github.com/pypa/pipenv/issues/5019) + +## Vendored Libraries + +- Vendor in pip==21.2.4 (from 21.2.2) in order to bring in requested bug fix for python3.6. Note: support for 3.6 will be dropped in a subsequent release. [#5008](https://github.com/pypa/pipenv/issues/5008) + +# 2022.3.24 (2022-03-23) + +## Features & Improvements + +- It is now possible to silence the `Loading .env environment variables` message on `pipenv run` + with the `--quiet` flag or the `PIPENV_QUIET` environment variable. [#4027](https://github.com/pypa/pipenv/issues/4027) + +## Bug Fixes + +- Fixes issue with new index safety restriction, whereby an unnamed extra sources index + caused and error to be thrown during install. [#5002](https://github.com/pypa/pipenv/issues/5002) +- The text `Loading .env environment variables...` has been switched back to stderr as to not + break requirements.txt generation. Also it only prints now when a `.env` file is actually present. [#5003](https://github.com/pypa/pipenv/issues/5003) + +# 2022.3.23 (2022-03-22) + +## Features & Improvements + +- Use environment variable `PIPENV_SKIP_LOCK` to control the behaviour of lock skipping. [#4797](https://github.com/pypa/pipenv/issues/4797) +- New CLI command `verify`, checks the Pipfile.lock is up-to-date [#4893](https://github.com/pypa/pipenv/issues/4893) + +## Behavior Changes + +- Pattern expansion for arguments was disabled on Windows. [#4935](https://github.com/pypa/pipenv/issues/4935) + +## Bug Fixes + +- Python versions on Windows can now be installed automatically through pyenv-win [#4525](https://github.com/pypa/pipenv/issues/4525) +- Patched our vendored Pip to fix: Pipenv Lock (Or Install) Does Not Respect Index Specified For A Package. [#4637](https://github.com/pypa/pipenv/issues/4637) +- If `PIP_TARGET` is set to environment variables, Refer specified directory for calculate delta, instead default directory [#4775](https://github.com/pypa/pipenv/issues/4775) +- Remove remaining mention of python2 and --two flag from codebase. [#4938](https://github.com/pypa/pipenv/issues/4938) +- Use `CI` environment value, over mere existence of name [#4944](https://github.com/pypa/pipenv/issues/4944) +- Environment variables from dot env files are now properly expanded when included in scripts. [#4975](https://github.com/pypa/pipenv/issues/4975) + +## Vendored Libraries + +- Updated vendor version of `pythonfinder` from `1.2.9` to `1.2.10` which fixes a bug with WSL + (Windows Subsystem for Linux) when a path can not be read and Permission Denied error is encountered. [#4976](https://github.com/pypa/pipenv/issues/4976) + +## Removals and Deprecations + +- Removes long broken argument `--code` from `install` and `--unused` from `check`. + Check command no longer takes in arguments to ignore. + Removed the vendored dependencies: `pipreqs` and `yarg` [#4998](https://github.com/pypa/pipenv/issues/4998) + +# 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) + +# 2020.8.13 (2020-08-13) + +## Bug Fixes + +- Fixed behaviour of `pipenv uninstall --all-dev`. + From now on it does not uninstall regular packages. [#3722](https://github.com/pypa/pipenv/issues/3722) +- Fix a bug that incorrect Python path will be used when `--system` flag is on. [#4315](https://github.com/pypa/pipenv/issues/4315) +- Fix falsely flagging a Homebrew installed Python as a virtual environment [#4316](https://github.com/pypa/pipenv/issues/4316) +- Fix a bug that `pipenv uninstall` throws an exception that does not exist. [#4321](https://github.com/pypa/pipenv/issues/4321) +- Fix a bug that Pipenv can't locate the correct file of special directives in `setup.cfg` of an editable package. [#4335](https://github.com/pypa/pipenv/issues/4335) +- Fix a bug that `setup.py` can't be parsed correctly when the assignment is type-annotated. [#4342](https://github.com/pypa/pipenv/issues/4342) +- Fix a bug that `pipenv graph` throws an exception that PipenvCmdError(cmd_string, c.out, c.err, return_code). [#4388](https://github.com/pypa/pipenv/issues/4388) +- Do not copy the whole directory tree of local file package. [#4403](https://github.com/pypa/pipenv/issues/4403) +- Correctly detect whether Pipenv in run under an activated virtualenv. [#4412](https://github.com/pypa/pipenv/issues/4412) + +## Vendored Libraries + +- Update `requirementslib` to `1.5.12`. [#4385](https://github.com/pypa/pipenv/issues/4385) +- - Update `requirements` to `1.5.13`. + - Update `pip-shims` to `0.5.3`. [#4421](https://github.com/pypa/pipenv/issues/4421) + +# 2020.6.2 (2020-06-02) + +## Features & Improvements + +- Pipenv will now detect existing `venv` and `virtualenv` based virtual environments more robustly. [#4276](https://github.com/pypa/pipenv/issues/4276) + +## Bug Fixes + +- `+` signs in URL authentication fragments will no longer be incorrectly replaced with space ( \`\` \`\` ) characters. [#4271](https://github.com/pypa/pipenv/issues/4271) +- Fixed a regression which caused Pipenv to fail when running under `/`. [#4273](https://github.com/pypa/pipenv/issues/4273) +- `setup.py` files with `version` variables read from `os.environ` are now able to be parsed successfully. [#4274](https://github.com/pypa/pipenv/issues/4274) +- Fixed a bug which caused Pipenv to fail to install packages in a virtual environment if those packages were already present in the system global environment. [#4276](https://github.com/pypa/pipenv/issues/4276) +- Fix a bug that caused non-specific versions to be pinned in `Pipfile.lock`. [#4278](https://github.com/pypa/pipenv/issues/4278) +- Corrected a missing exception import and invalid function call invocations in `pipenv.cli.command`. [#4286](https://github.com/pypa/pipenv/issues/4286) +- Fixed an issue with resolving packages with names defined by function calls in `setup.py`. [#4292](https://github.com/pypa/pipenv/issues/4292) +- Fixed a regression with installing the current directory, or `.`, inside a `venv` based virtual environment. [#4295](https://github.com/pypa/pipenv/issues/4295) +- Fixed a bug with the discovery of python paths on Windows which could prevent installation of environments during `pipenv install`. [#4296](https://github.com/pypa/pipenv/issues/4296) +- Fixed an issue in the `requirementslib` AST parser which prevented parsing of `setup.py` files for dependency metadata. [#4298](https://github.com/pypa/pipenv/issues/4298) +- Fix a bug where Pipenv doesn't realize the session is interactive [#4305](https://github.com/pypa/pipenv/issues/4305) + +## Vendored Libraries + +- Updated requirementslib to version `1.5.11`. [#4292](https://github.com/pypa/pipenv/issues/4292) +- Updated vendored dependencies: + : - **pythonfinder**: `1.2.2` => `1.2.4` + - **requirementslib**: `1.5.9` => `1.5.10` [#4302](https://github.com/pypa/pipenv/issues/4302) + +# 2020.5.28 (2020-05-28) + +## Features & Improvements + +- `pipenv install` and `pipenv sync` will no longer attempt to install satisfied dependencies during installation. [#3057](https://github.com/pypa/pipenv/issues/3057), + [#3506](https://github.com/pypa/pipenv/issues/3506) + +- Added support for resolution of direct-url dependencies in `setup.py` files to respect `PEP-508` style URL dependencies. [#3148](https://github.com/pypa/pipenv/issues/3148) + +- Added full support for resolution of all dependency types including direct URLs, zip archives, tarballs, etc. + + - Improved error handling and formatting. + - Introduced improved cross platform stream wrappers for better `stdout` and `stderr` consistency. [#3298](https://github.com/pypa/pipenv/issues/3298) + +- For consistency with other commands and the `--dev` option + description, `pipenv lock --requirements --dev` now emits + both default and development dependencies. + The new `--dev-only` option requests the previous + behaviour (e.g. to generate a `dev-requirements.txt` file). [#3316](https://github.com/pypa/pipenv/issues/3316) + +- Pipenv will now successfully recursively lock VCS sub-dependencies. [#3328](https://github.com/pypa/pipenv/issues/3328) + +- Added support for `--verbose` output to `pipenv run`. [#3348](https://github.com/pypa/pipenv/issues/3348) + +- Pipenv will now discover and resolve the intrinsic dependencies of **all** VCS dependencies, whether they are editable or not, to prevent resolution conflicts. [#3368](https://github.com/pypa/pipenv/issues/3368) + +- Added a new environment variable, `PIPENV_RESOLVE_VCS`, to toggle dependency resolution off for non-editable VCS, file, and URL based dependencies. [#3577](https://github.com/pypa/pipenv/issues/3577) + +- Added the ability for Windows users to enable emojis by setting `PIPENV_HIDE_EMOJIS=0`. [#3595](https://github.com/pypa/pipenv/issues/3595) + +- Allow overriding PIPENV_INSTALL_TIMEOUT environment variable (in seconds). [#3652](https://github.com/pypa/pipenv/issues/3652) + +- Allow overriding PIP_EXISTS_ACTION environment variable (value is passed to pip install). + Possible values here: <https://pip.pypa.io/en/stable/reference/pip/#exists-action-option> + Useful when you need to `PIP_EXISTS_ACTION=i` (ignore existing packages) - great for CI environments, where you need really fast setup. [#3738](https://github.com/pypa/pipenv/issues/3738) + +- Pipenv will no longer forcibly override `PIP_NO_DEPS` on all vcs and file dependencies as resolution happens on these in a pre-lock step. [#3763](https://github.com/pypa/pipenv/issues/3763) + +- Improved verbose logging output during `pipenv lock` will now stream output to the console while maintaining a spinner. [#3810](https://github.com/pypa/pipenv/issues/3810) + +- Added support for automatic python installs via `asdf` and associated `PIPENV_DONT_USE_ASDF` environment variable. [#4018](https://github.com/pypa/pipenv/issues/4018) + +- Pyenv/asdf can now be used whether or not they are available on PATH. Setting PYENV_ROOT/ASDF_DIR in a Pipenv's .env allows Pipenv to install an interpreter without any shell customizations, so long as pyenv/asdf is installed. [#4245](https://github.com/pypa/pipenv/issues/4245) + +- Added `--key` command line parameter for including personal PyUp.io API tokens when running `pipenv check`. [#4257](https://github.com/pypa/pipenv/issues/4257) + +## Behavior Changes + +- Make conservative checks of known exceptions when subprocess returns output, so user won't see the whole traceback - just the error. [#2553](https://github.com/pypa/pipenv/issues/2553) +- Do not touch Pipfile early and rely on it so that one can do `pipenv sync` without a Pipfile. [#3386](https://github.com/pypa/pipenv/issues/3386) +- Re-enable `--help` option for `pipenv run` command. [#3844](https://github.com/pypa/pipenv/issues/3844) +- Make sure `pipenv lock -r --pypi-mirror {MIRROR_URL}` will respect the pypi-mirror in requirements output. [#4199](https://github.com/pypa/pipenv/issues/4199) + +## Bug Fixes + +- Raise `PipenvUsageError` when \[\[source\]\] does not contain url field. [#2373](https://github.com/pypa/pipenv/issues/2373) + +- Fixed a bug which caused editable package resolution to sometimes fail with an unhelpful setuptools-related error message. [#2722](https://github.com/pypa/pipenv/issues/2722) + +- Fixed an issue which caused errors due to reliance on the system utilities `which` and `where` which may not always exist on some systems. + \- Fixed a bug which caused periodic failures in python discovery when executables named `python` were not present on the target `$PATH`. [#2783](https://github.com/pypa/pipenv/issues/2783) + +- Dependency resolution now writes hashes for local and remote files to the lockfile. [#3053](https://github.com/pypa/pipenv/issues/3053) + +- Fixed a bug which prevented `pipenv graph` from correctly showing all dependencies when running from within `pipenv shell`. [#3071](https://github.com/pypa/pipenv/issues/3071) + +- Fixed resolution of direct-url dependencies in `setup.py` files to respect `PEP-508` style URL dependencies. [#3148](https://github.com/pypa/pipenv/issues/3148) + +- Fixed a bug which caused failures in warning reporting when running pipenv inside a virtualenv under some circumstances. + + - Fixed a bug with package discovery when running `pipenv clean`. [#3298](https://github.com/pypa/pipenv/issues/3298) + +- Quote command arguments with carets (`^`) on Windows to work around unintended shell escapes. [#3307](https://github.com/pypa/pipenv/issues/3307) + +- Handle alternate names for UTF-8 encoding. [#3313](https://github.com/pypa/pipenv/issues/3313) + +- Abort pipenv before adding the non-exist package to Pipfile. [#3318](https://github.com/pypa/pipenv/issues/3318) + +- Don't normalize the package name user passes in. [#3324](https://github.com/pypa/pipenv/issues/3324) + +- Fix a bug where custom virtualenv can not be activated with pipenv shell [#3339](https://github.com/pypa/pipenv/issues/3339) + +- Fix a bug that `--site-packages` flag is not recognized. [#3351](https://github.com/pypa/pipenv/issues/3351) + +- Fix a bug where pipenv --clear is not working [#3353](https://github.com/pypa/pipenv/issues/3353) + +- Fix unhashable type error during `$ pipenv install --selective-upgrade` [#3384](https://github.com/pypa/pipenv/issues/3384) + +- Dependencies with direct `PEP508` compliant VCS URLs specified in their `install_requires` will now be successfully locked during the resolution process. [#3396](https://github.com/pypa/pipenv/issues/3396) + +- Fixed a keyerror which could occur when locking VCS dependencies in some cases. [#3404](https://github.com/pypa/pipenv/issues/3404) + +- Fixed a bug that `ValidationError` is thrown when some fields are missing in source section. [#3427](https://github.com/pypa/pipenv/issues/3427) + +- Updated the index names in lock file when source name in Pipfile is changed. [#3449](https://github.com/pypa/pipenv/issues/3449) + +- Fixed an issue which caused `pipenv install --help` to show duplicate entries for `--pre`. [#3479](https://github.com/pypa/pipenv/issues/3479) + +- Fix bug causing `[SSL: CERTIFICATE_VERIFY_FAILED]` when Pipfile `[[source]]` has verify_ssl=false and url with custom port. [#3502](https://github.com/pypa/pipenv/issues/3502) + +- Fix `sync --sequential` ignoring `pip install` errors and logs. [#3537](https://github.com/pypa/pipenv/issues/3537) + +- Fix the issue that lock file can't be created when `PIPENV_PIPFILE` is not under working directory. [#3584](https://github.com/pypa/pipenv/issues/3584) + +- Pipenv will no longer inadvertently set `editable=True` on all vcs dependencies. [#3647](https://github.com/pypa/pipenv/issues/3647) + +- The `--keep-outdated` argument to `pipenv install` and `pipenv lock` will now drop specifier constraints when encountering editable dependencies. + \- In addition, `--keep-outdated` will retain specifiers that would otherwise be dropped from any entries that have not been updated. [#3656](https://github.com/pypa/pipenv/issues/3656) + +- Fixed a bug which sometimes caused pipenv to fail to respect the `--site-packages` flag when passed with `pipenv install`. [#3718](https://github.com/pypa/pipenv/issues/3718) + +- Normalize the package names to lowercase when comparing used and in-Pipfile packages. [#3745](https://github.com/pypa/pipenv/issues/3745) + +- `pipenv update --outdated` will now correctly handle comparisons between pre/post-releases and normal releases. [#3766](https://github.com/pypa/pipenv/issues/3766) + +- Fixed a `KeyError` which could occur when pinning outdated VCS dependencies via `pipenv lock --keep-outdated`. [#3768](https://github.com/pypa/pipenv/issues/3768) + +- Resolved an issue which caused resolution to fail when encountering poorly formatted `python_version` markers in `setup.py` and `setup.cfg` files. [#3786](https://github.com/pypa/pipenv/issues/3786) + +- Fix a bug that installation errors are displayed as a list. [#3794](https://github.com/pypa/pipenv/issues/3794) + +- Update `pythonfinder` to fix a problem that `python.exe` will be mistakenly chosen for + virtualenv creation under WSL. [#3807](https://github.com/pypa/pipenv/issues/3807) + +- Fixed several bugs which could prevent editable VCS dependencies from being installed into target environments, even when reporting successful installation. [#3809](https://github.com/pypa/pipenv/issues/3809) + +- `pipenv check --system` should find the correct Python interpreter when `python` does not exist on the system. [#3819](https://github.com/pypa/pipenv/issues/3819) + +- Resolve the symlinks when the path is absolute. [#3842](https://github.com/pypa/pipenv/issues/3842) + +- Pass `--pre` and `--clear` options to `pipenv update --outdated`. [#3879](https://github.com/pypa/pipenv/issues/3879) + +- Fixed a bug which prevented resolution of direct URL dependencies which have PEP508 style direct url VCS sub-dependencies with subdirectories. [#3976](https://github.com/pypa/pipenv/issues/3976) + +- Honor PIPENV_SPINNER environment variable [#4045](https://github.com/pypa/pipenv/issues/4045) + +- Fixed an issue with `pipenv check` failing due to an invalid API key from `pyup.io`. [#4188](https://github.com/pypa/pipenv/issues/4188) + +- Fixed a bug which caused versions from VCS dependencies to be included in `Pipfile.lock` inadvertently. [#4217](https://github.com/pypa/pipenv/issues/4217) + +- Fixed a bug which caused pipenv to search non-existent virtual environments for `pip` when installing using `--system`. [#4220](https://github.com/pypa/pipenv/issues/4220) + +- `Requires-Python` values specifying constraint versions of python starting from `1.x` will now be parsed successfully. [#4226](https://github.com/pypa/pipenv/issues/4226) + +- Fix a bug of `pipenv update --outdated` that can't print output correctly. [#4229](https://github.com/pypa/pipenv/issues/4229) + +- Fixed a bug which caused pipenv to prefer source distributions over wheels from `PyPI` during the dependency resolution phase. + Fixed an issue which prevented proper build isolation using `pep517` based builders during dependency resolution. [#4231](https://github.com/pypa/pipenv/issues/4231) + +- Don't fallback to system Python when no matching Python version is found. [#4232](https://github.com/pypa/pipenv/issues/4232) + +## Vendored Libraries + +- Updated vendored dependencies: + + > - **attrs**: `18.2.0` => `19.1.0` + > - **certifi**: `2018.10.15` => `2019.3.9` + > - **cached_property**: `1.4.3` => `1.5.1` + > - **cerberus**: `1.2.0` => `1.3.1` + > - **click-completion**: `0.5.0` => `0.5.1` + > - **colorama**: `0.3.9` => `0.4.1` + > - **distlib**: `0.2.8` => `0.2.9` + > - **idna**: `2.7` => `2.8` + > - **jinja2**: `2.10.0` => `2.10.1` + > - **markupsafe**: `1.0` => `1.1.1` + > - **orderedmultidict**: `(new)` => `1.0` + > - **packaging**: `18.0` => `19.0` + > - **parse**: `1.9.0` => `1.12.0` + > - **pathlib2**: `2.3.2` => `2.3.3` + > - **pep517**: `(new)` => `0.5.0` + > - **pexpect**: `4.6.0` => `4.7.0` + > - **pipdeptree**: `0.13.0` => `0.13.2` + > - **pyparsing**: `2.2.2` => `2.3.1` + > - **python-dotenv**: `0.9.1` => `0.10.2` + > - **pythonfinder**: `1.1.10` => `1.2.1` + > - **pytoml**: `(new)` => `0.1.20` + > - **requests**: `2.20.1` => `2.21.0` + > - **requirementslib**: `1.3.3` => `1.5.0` + > - **scandir**: `1.9.0` => `1.10.0` + > - **shellingham**: `1.2.7` => `1.3.1` + > - **six**: `1.11.0` => `1.12.0` + > - **tomlkit**: `0.5.2` => `0.5.3` + > - **urllib3**: `1.24` => `1.25.2` + > - **vistir**: `0.3.0` => `0.4.1` + > - **yaspin**: `0.14.0` => `0.14.3` + + - Removed vendored dependency **cursor**. [#3298](https://github.com/pypa/pipenv/issues/3298) + +- Updated `pip_shims` to support `--outdated` with new pip versions. [#3766](https://github.com/pypa/pipenv/issues/3766) + +- Update vendored dependencies and invocations + + - Update vendored and patched dependencies + - Update patches on `piptools`, `pip`, `pip-shims`, `tomlkit` + - Fix invocations of dependencies + - Fix custom `InstallCommand` instantiation + - Update `PackageFinder` usage + - Fix `Bool` stringify attempts from `tomlkit` + + Updated vendored dependencies: + : - **attrs**: `` `18.2.0 `` => `` `19.1.0 `` + - **certifi**: `` `2018.10.15 `` => `` `2019.3.9 `` + - **cached_property**: `` `1.4.3 `` => `` `1.5.1 `` + - **cerberus**: `` `1.2.0 `` => `` `1.3.1 `` + - **click**: `` `7.0.0 `` => `` `7.1.1 `` + - **click-completion**: `` `0.5.0 `` => `` `0.5.1 `` + - **colorama**: `` `0.3.9 `` => `` `0.4.3 `` + - **contextlib2**: `` `(new) `` => `` `0.6.0.post1 `` + - **distlib**: `` `0.2.8 `` => `` `0.2.9 `` + - **funcsigs**: `` `(new) `` => `` `1.0.2 `` + - **importlib_metadata** `` `1.3.0 `` => `` `1.5.1 `` + - **importlib-resources**: `` `(new) `` => `` `1.4.0 `` + - **idna**: `` `2.7 `` => `` `2.9 `` + - **jinja2**: `` `2.10.0 `` => `` `2.11.1 `` + - **markupsafe**: `` `1.0 `` => `` `1.1.1 `` + - **more-itertools**: `` `(new) `` => `` `5.0.0 `` + - **orderedmultidict**: `` `(new) `` => `` `1.0 `` + - **packaging**: `` `18.0 `` => `` `19.0 `` + - **parse**: `` `1.9.0 `` => `` `1.15.0 `` + - **pathlib2**: `` `2.3.2 `` => `` `2.3.3 `` + - **pep517**: `` `(new) `` => `` `0.5.0 `` + - **pexpect**: `` `4.6.0 `` => `` `4.8.0 `` + - **pip-shims**: `` `0.2.0 `` => `` `0.5.1 `` + - **pipdeptree**: `` `0.13.0 `` => `` `0.13.2 `` + - **pyparsing**: `` `2.2.2 `` => `` `2.4.6 `` + - **python-dotenv**: `` `0.9.1 `` => `` `0.10.2 `` + - **pythonfinder**: `` `1.1.10 `` => `` `1.2.2 `` + - **pytoml**: `` `(new) `` => `` `0.1.20 `` + - **requests**: `` `2.20.1 `` => `` `2.23.0 `` + - **requirementslib**: `` `1.3.3 `` => `` `1.5.4 `` + - **scandir**: `` `1.9.0 `` => `` `1.10.0 `` + - **shellingham**: `` `1.2.7 `` => `` `1.3.2 `` + - **six**: `` `1.11.0 `` => `` `1.14.0 `` + - **tomlkit**: `` `0.5.2 `` => `` `0.5.11 `` + - **urllib3**: `` `1.24 `` => `` `1.25.8 `` + - **vistir**: `` `0.3.0 `` => `` `0.5.0 `` + - **yaspin**: `` `0.14.0 `` => `` `0.14.3 `` + - **zipp**: `` `0.6.0 `` + + - Removed vendored dependency **cursor**. [#4169](https://github.com/pypa/pipenv/issues/4169) + +- Add and update vendored dependencies to accommodate `safety` vendoring: + \- **safety** `(none)` => `1.8.7` + \- **dparse** `(none)` => `0.5.0` + \- **pyyaml** `(none)` => `5.3.1` + \- **urllib3** `1.25.8` => `1.25.9` + \- **certifi** `2019.11.28` => `2020.4.5.1` + \- **pyparsing** `2.4.6` => `2.4.7` + \- **resolvelib** `0.2.2` => `0.3.0` + \- **importlib-metadata** `1.5.1` => `1.6.0` + \- **pip-shims** `0.5.1` => `0.5.2` + \- **requirementslib** `1.5.5` => `1.5.6` [#4188](https://github.com/pypa/pipenv/issues/4188) + +- Updated vendored `pip` => `20.0.2` and `pip-tools` => `5.0.0`. [#4215](https://github.com/pypa/pipenv/issues/4215) + +- Updated vendored dependencies to latest versions for security and bug fixes: + + - **requirementslib** `1.5.8` => `1.5.9` + - **vistir** `0.5.0` => `0.5.1` + - **jinja2** `2.11.1` => `2.11.2` + - **click** `7.1.1` => `7.1.2` + - **dateutil** `(none)` => `2.8.1` + - **backports.functools_lru_cache** `1.5.0` => `1.6.1` + - **enum34** `1.1.6` => `1.1.10` + - **toml** `0.10.0` => `0.10.1` + - **importlib_resources** `1.4.0` => `1.5.0` [#4226](https://github.com/pypa/pipenv/issues/4226) + +- Changed attrs import path in vendored dependencies to always import from `pipenv.vendor`. [#4267](https://github.com/pypa/pipenv/issues/4267) + +## Improved Documentation + +- Added documentation about variable expansion in `Pipfile` entries. [#2317](https://github.com/pypa/pipenv/issues/2317) +- Consolidate all contributing docs in the rst file [#3120](https://github.com/pypa/pipenv/issues/3120) +- Update the out-dated manual page. [#3246](https://github.com/pypa/pipenv/issues/3246) +- Move CLI docs to its own page. [#3346](https://github.com/pypa/pipenv/issues/3346) +- Replace (non-existent) video on docs index.rst with equivalent gif. [#3499](https://github.com/pypa/pipenv/issues/3499) +- Clarify wording in Basic Usage example on using double quotes to escape shell redirection [#3522](https://github.com/pypa/pipenv/issues/3522) +- Ensure docs show navigation on small-screen devices [#3527](https://github.com/pypa/pipenv/issues/3527) +- Added a link to the TOML Spec under General Recommendations & Version Control to clarify how Pipfiles should be written. [#3629](https://github.com/pypa/pipenv/issues/3629) +- Updated the documentation with the new `pytest` entrypoint. [#3759](https://github.com/pypa/pipenv/issues/3759) +- Fix link to GIF in README.md demonstrating Pipenv's usage, and add descriptive alt text. [#3911](https://github.com/pypa/pipenv/issues/3911) +- Added a line describing potential issues in fancy extension. [#3912](https://github.com/pypa/pipenv/issues/3912) +- Documental description of how Pipfile works and association with Pipenv. [#3913](https://github.com/pypa/pipenv/issues/3913) +- Clarify the proper value of `python_version` and `python_full_version`. [#3914](https://github.com/pypa/pipenv/issues/3914) +- Write description for --deploy extension and few extensions differences. [#3915](https://github.com/pypa/pipenv/issues/3915) +- More documentation for `.env` files [#4100](https://github.com/pypa/pipenv/issues/4100) +- Updated documentation to point to working links. [#4137](https://github.com/pypa/pipenv/issues/4137) +- Replace docs.pipenv.org with pipenv.pypa.io [#4167](https://github.com/pypa/pipenv/issues/4167) +- Added functionality to check spelling in documentation and cleaned up existing typographical issues. [#4209](https://github.com/pypa/pipenv/issues/4209) + +# 2018.11.26 (2018-11-26) + +## Bug Fixes + +- Environment variables are expanded correctly before running scripts on POSIX. [#3178](https://github.com/pypa/pipenv/issues/3178) +- Pipenv will no longer disable user-mode installation when the `--system` flag is passed in. [#3222](https://github.com/pypa/pipenv/issues/3222) +- Fixed an issue with attempting to render unicode output in non-unicode locales. [#3223](https://github.com/pypa/pipenv/issues/3223) +- Fixed a bug which could cause failures to occur when parsing python entries from global pyenv version files. [#3224](https://github.com/pypa/pipenv/issues/3224) +- Fixed an issue which prevented the parsing of named extras sections from certain `setup.py` files. [#3230](https://github.com/pypa/pipenv/issues/3230) +- Correctly detect the virtualenv location inside an activated virtualenv. [#3231](https://github.com/pypa/pipenv/issues/3231) +- Fixed a bug which caused spinner frames to be written to standard output during locking operations which could cause redirection pipes to fail. [#3239](https://github.com/pypa/pipenv/issues/3239) +- Fixed a bug that editable packages can't be uninstalled correctly. [#3240](https://github.com/pypa/pipenv/issues/3240) +- Corrected an issue with installation timeouts which caused dependency resolution to fail for longer duration resolution steps. [#3244](https://github.com/pypa/pipenv/issues/3244) +- Adding normal pep 508 compatible markers is now fully functional when using VCS dependencies. [#3249](https://github.com/pypa/pipenv/issues/3249) +- Updated `requirementslib` and `pythonfinder` for multiple bug fixes. [#3254](https://github.com/pypa/pipenv/issues/3254) +- Pipenv will now ignore hashes when installing with `--skip-lock`. [#3255](https://github.com/pypa/pipenv/issues/3255) +- Fixed an issue where pipenv could crash when multiple pipenv processes attempted to create the same directory. [#3257](https://github.com/pypa/pipenv/issues/3257) +- Fixed an issue which sometimes prevented successful creation of a project Pipfile. [#3260](https://github.com/pypa/pipenv/issues/3260) +- `pipenv install` will now unset the `PYTHONHOME` environment variable when not combined with `--system`. [#3261](https://github.com/pypa/pipenv/issues/3261) +- Pipenv will ensure that warnings do not interfere with the resolution process by suppressing warnings' usage of standard output and writing to standard error instead. [#3273](https://github.com/pypa/pipenv/issues/3273) +- Fixed an issue which prevented variables from the environment, such as `PIPENV_DEV` or `PIPENV_SYSTEM`, from being parsed and implemented correctly. [#3278](https://github.com/pypa/pipenv/issues/3278) +- Clear pythonfinder cache after Python install. [#3287](https://github.com/pypa/pipenv/issues/3287) +- Fixed a race condition in hash resolution for dependencies for certain dependencies with missing cache entries or fresh Pipenv installs. [#3289](https://github.com/pypa/pipenv/issues/3289) +- Pipenv will now respect top-level pins over VCS dependency locks. [#3296](https://github.com/pypa/pipenv/issues/3296) + +## Vendored Libraries + +- Update vendored dependencies to resolve resolution output parsing and python finding: + : - `pythonfinder 1.1.9 -> 1.1.10` + - `requirementslib 1.3.1 -> 1.3.3` + - `vistir 0.2.3 -> 0.2.5` [#3280](https://github.com/pypa/pipenv/issues/3280) + +# 2018.11.14 (2018-11-14) + +## Features & Improvements + +- Improved exceptions and error handling on failures. [#1977](https://github.com/pypa/pipenv/issues/1977) +- Added persistent settings for all CLI flags via `PIPENV_{FLAG_NAME}` environment variables by enabling `auto_envvar_prefix=PIPENV` in click (implements PEEP-0002). [#2200](https://github.com/pypa/pipenv/issues/2200) +- Added improved messaging about available but skipped updates due to dependency conflicts when running `pipenv update --outdated`. [#2411](https://github.com/pypa/pipenv/issues/2411) +- Added environment variable `PIPENV_PYUP_API_KEY` to add ability + to override the bundled PyUP.io API key. [#2825](https://github.com/pypa/pipenv/issues/2825) +- Added additional output to `pipenv update --outdated` to indicate that the operation succeeded and all packages were already up to date. [#2828](https://github.com/pypa/pipenv/issues/2828) +- Updated `crayons` patch to enable colors on native powershell but swap native blue for magenta. [#3020](https://github.com/pypa/pipenv/issues/3020) +- Added support for `--bare` to `pipenv clean`, and fixed `pipenv sync --bare` to actually reduce output. [#3041](https://github.com/pypa/pipenv/issues/3041) +- Added windows-compatible spinner via upgraded `vistir` dependency. [#3089](https://github.com/pypa/pipenv/issues/3089) +- - Added support for python installations managed by `asdf`. [#3096](https://github.com/pypa/pipenv/issues/3096) +- Improved runtime performance of no-op commands such as `pipenv --venv` by around 2/3. [#3158](https://github.com/pypa/pipenv/issues/3158) +- Do not show error but success for running `pipenv uninstall --all` in a fresh virtual environment. [#3170](https://github.com/pypa/pipenv/issues/3170) +- Improved asynchronous installation and error handling via queued subprocess parallelization. [#3217](https://github.com/pypa/pipenv/issues/3217) + +## Bug Fixes + +- Remote non-PyPI artifacts and local wheels and artifacts will now include their own hashes rather than including hashes from `PyPI`. [#2394](https://github.com/pypa/pipenv/issues/2394) +- Non-ascii characters will now be handled correctly when parsed by pipenv's `ToML` parsers. [#2737](https://github.com/pypa/pipenv/issues/2737) +- Updated `pipenv uninstall` to respect the `--skip-lock` argument. [#2848](https://github.com/pypa/pipenv/issues/2848) +- Fixed a bug which caused uninstallation to sometimes fail to successfully remove packages from `Pipfiles` with comments on preceding or following lines. [#2885](https://github.com/pypa/pipenv/issues/2885), + [#3099](https://github.com/pypa/pipenv/issues/3099) +- Pipenv will no longer fail when encountering python versions on Windows that have been uninstalled. [#2983](https://github.com/pypa/pipenv/issues/2983) +- Fixed unnecessary extras are added when translating markers [#3026](https://github.com/pypa/pipenv/issues/3026) +- Fixed a virtualenv creation issue which could cause new virtualenvs to inadvertently attempt to read and write to global site packages. [#3047](https://github.com/pypa/pipenv/issues/3047) +- Fixed an issue with virtualenv path derivation which could cause errors, particularly for users on WSL bash. [#3055](https://github.com/pypa/pipenv/issues/3055) +- Fixed a bug which caused `Unexpected EOF` errors to be thrown when `pip` was waiting for input from users who had put login credentials in environment variables. [#3088](https://github.com/pypa/pipenv/issues/3088) +- Fixed a bug in `requirementslib` which prevented successful installation from mercurial repositories. [#3090](https://github.com/pypa/pipenv/issues/3090) +- Fixed random resource warnings when using pyenv or any other subprocess calls. [#3094](https://github.com/pypa/pipenv/issues/3094) +- - Fixed a bug which sometimes prevented cloning and parsing `mercurial` requirements. [#3096](https://github.com/pypa/pipenv/issues/3096) +- Fixed an issue in `delegator.py` related to subprocess calls when using `PopenSpawn` to stream output, which sometimes threw unexpected `EOF` errors. [#3102](https://github.com/pypa/pipenv/issues/3102), + [#3114](https://github.com/pypa/pipenv/issues/3114), + [#3117](https://github.com/pypa/pipenv/issues/3117) +- Fix the path casing issue that makes `pipenv clean` fail on Windows [#3104](https://github.com/pypa/pipenv/issues/3104) +- Pipenv will avoid leaving build artifacts in the current working directory. [#3106](https://github.com/pypa/pipenv/issues/3106) +- Fixed issues with broken subprocess calls leaking resource handles and causing random and sporadic failures. [#3109](https://github.com/pypa/pipenv/issues/3109) +- Fixed an issue which caused `pipenv clean` to sometimes clean packages from the base `site-packages` folder or fail entirely. [#3113](https://github.com/pypa/pipenv/issues/3113) +- Updated `pythonfinder` to correct an issue with unnesting of nested paths when searching for python versions. [#3121](https://github.com/pypa/pipenv/issues/3121) +- Added additional logic for ignoring and replacing non-ascii characters when formatting console output on non-UTF-8 systems. [#3131](https://github.com/pypa/pipenv/issues/3131) +- Fix virtual environment discovery when `PIPENV_VENV_IN_PROJECT` is set, but the in-project `.venv` is a file. [#3134](https://github.com/pypa/pipenv/issues/3134) +- Hashes for remote and local non-PyPI artifacts will now be included in `Pipfile.lock` during resolution. [#3145](https://github.com/pypa/pipenv/issues/3145) +- Fix project path hashing logic in purpose to prevent collisions of virtual environments. [#3151](https://github.com/pypa/pipenv/issues/3151) +- Fix package installation when the virtual environment path contains parentheses. [#3158](https://github.com/pypa/pipenv/issues/3158) +- Azure Pipelines YAML files are updated to use the latest syntax and product name. [#3164](https://github.com/pypa/pipenv/issues/3164) +- Fixed new spinner success message to write only one success message during resolution. [#3183](https://github.com/pypa/pipenv/issues/3183) +- Pipenv will now correctly respect the `--pre` option when used with `pipenv install`. [#3185](https://github.com/pypa/pipenv/issues/3185) +- Fix a bug where exception is raised when run pipenv graph in a project without created virtualenv [#3201](https://github.com/pypa/pipenv/issues/3201) +- When sources are missing names, names will now be derived from the supplied URL. [#3216](https://github.com/pypa/pipenv/issues/3216) + +## Vendored Libraries + +- Updated `pythonfinder` to correct an issue with unnesting of nested paths when searching for python versions. [#3061](https://github.com/pypa/pipenv/issues/3061), + [#3121](https://github.com/pypa/pipenv/issues/3121) +- Updated vendored dependencies: + : - `certifi 2018.08.24 => 2018.10.15` + - `urllib3 1.23 => 1.24` + - `requests 2.19.1 => 2.20.0` + - ``` shellingham ``1.2.6 => 1.2.7 ``` + - `tomlkit 0.4.4. => 0.4.6` + - `vistir 0.1.6 => 0.1.8` + - `pythonfinder 0.1.2 => 0.1.3` + - `requirementslib 1.1.9 => 1.1.10` + - `backports.functools_lru_cache 1.5.0 (new)` + - `cursor 1.2.0 (new)` [#3089](https://github.com/pypa/pipenv/issues/3089) +- Updated vendored dependencies: + : - `requests 2.19.1 => 2.20.1` + - `tomlkit 0.4.46 => 0.5.2` + - `vistir 0.1.6 => 0.2.4` + - `pythonfinder 1.1.2 => 1.1.8` + - `requirementslib 1.1.10 => 1.3.0` [#3096](https://github.com/pypa/pipenv/issues/3096) +- Switch to `tomlkit` for parsing and writing. Drop `prettytoml` and `contoml` from vendors. [#3191](https://github.com/pypa/pipenv/issues/3191) +- Updated `requirementslib` to aid in resolution of local and remote archives. [#3196](https://github.com/pypa/pipenv/issues/3196) + +## Improved Documentation + +- Expanded development and testing documentation for contributors to get started. [#3074](https://github.com/pypa/pipenv/issues/3074) + +# 2018.10.13 (2018-10-13) + +## Bug Fixes + +- Fixed a bug in `pipenv clean` which caused global packages to sometimes be inadvertently targeted for cleanup. [#2849](https://github.com/pypa/pipenv/issues/2849) +- Fix broken backport imports for vendored vistir. [#2950](https://github.com/pypa/pipenv/issues/2950), + [#2955](https://github.com/pypa/pipenv/issues/2955), + [#2961](https://github.com/pypa/pipenv/issues/2961) +- Fixed a bug with importing local vendored dependencies when running `pipenv graph`. [#2952](https://github.com/pypa/pipenv/issues/2952) +- Fixed a bug which caused executable discovery to fail when running inside a virtualenv. [#2957](https://github.com/pypa/pipenv/issues/2957) +- Fix parsing of outline tables. [#2971](https://github.com/pypa/pipenv/issues/2971) +- Fixed a bug which caused `verify_ssl` to fail to drop through to `pip install` correctly as `trusted-host`. [#2979](https://github.com/pypa/pipenv/issues/2979) +- Fixed a bug which caused canonicalized package names to fail to resolve against PyPI. [#2989](https://github.com/pypa/pipenv/issues/2989) +- Enhanced CI detection to detect Azure Devops builds. [#2993](https://github.com/pypa/pipenv/issues/2993) +- Fixed a bug which prevented installing pinned versions which used redirection symbols from the command line. [#2998](https://github.com/pypa/pipenv/issues/2998) +- Fixed a bug which prevented installing the local directory in non-editable mode. [#3005](https://github.com/pypa/pipenv/issues/3005) + +## Vendored Libraries + +- Updated `requirementslib` to version `1.1.9`. [#2989](https://github.com/pypa/pipenv/issues/2989) +- Upgraded `pythonfinder => 1.1.1` and `vistir => 0.1.7`. [#3007](https://github.com/pypa/pipenv/issues/3007) + +# 2018.10.9 (2018-10-09) + +## Features & Improvements + +- Added environment variables `PIPENV_VERBOSE` and `PIPENV_QUIET` to control + output verbosity without needing to pass options. [#2527](https://github.com/pypa/pipenv/issues/2527) + +- Updated test-PyPI add-on to better support json-API access (forward compatibility). + Improved testing process for new contributors. [#2568](https://github.com/pypa/pipenv/issues/2568) + +- Greatly enhanced python discovery functionality: + + - Added pep514 (windows launcher/finder) support for python discovery. + - Introduced architecture discovery for python installations which support different architectures. [#2582](https://github.com/pypa/pipenv/issues/2582) + +- Added support for `pipenv shell` on msys and cygwin/mingw/git bash for Windows. [#2641](https://github.com/pypa/pipenv/issues/2641) + +- Enhanced resolution of editable and VCS dependencies. [#2643](https://github.com/pypa/pipenv/issues/2643) + +- Deduplicate and refactor CLI to use stateful arguments and object passing. See [this issue](https://github.com/pallets/click/issues/108) for reference. [#2814](https://github.com/pypa/pipenv/issues/2814) + +## Behavior Changes + +- Virtual environment activation for `run` is revised to improve interpolation + with other Python discovery tools. [#2503](https://github.com/pypa/pipenv/issues/2503) +- Improve terminal coloring to display better in Powershell. [#2511](https://github.com/pypa/pipenv/issues/2511) +- Invoke `virtualenv` directly for virtual environment creation, instead of depending on `pew`. [#2518](https://github.com/pypa/pipenv/issues/2518) +- `pipenv --help` will now include short help descriptions. [#2542](https://github.com/pypa/pipenv/issues/2542) +- Add `COMSPEC` to fallback option (along with `SHELL` and `PYENV_SHELL`) + if shell detection fails, improving robustness on Windows. [#2651](https://github.com/pypa/pipenv/issues/2651) +- Fallback to shell mode if `run` fails with Windows error 193 to handle non-executable commands. This should improve usability on Windows, where some users run non-executable files without specifying a command, relying on Windows file association to choose the current command. [#2718](https://github.com/pypa/pipenv/issues/2718) + +## Bug Fixes + +- Fixed a bug which prevented installation of editable requirements using `ssh://` style URLs [#1393](https://github.com/pypa/pipenv/issues/1393) +- VCS Refs for locked local editable dependencies will now update appropriately to the latest hash when running `pipenv update`. [#1690](https://github.com/pypa/pipenv/issues/1690) +- `.tar.gz` and `.zip` artifacts will now have dependencies installed even when they are missing from the Lockfile. [#2173](https://github.com/pypa/pipenv/issues/2173) +- The command line parser will now handle multiple `-e/--editable` dependencies properly via click's option parser to help mitigate future parsing issues. [#2279](https://github.com/pypa/pipenv/issues/2279) +- Fixed the ability of pipenv to parse `dependency_links` from `setup.py` when `PIP_PROCESS_DEPENDENCY_LINKS` is enabled. [#2434](https://github.com/pypa/pipenv/issues/2434) +- Fixed a bug which could cause `-i/--index` arguments to sometimes be incorrectly picked up in packages. This is now handled in the command line parser. [#2494](https://github.com/pypa/pipenv/issues/2494) +- Fixed non-deterministic resolution issues related to changes to the internal package finder in `pip 10`. [#2499](https://github.com/pypa/pipenv/issues/2499), + [#2529](https://github.com/pypa/pipenv/issues/2529), + [#2589](https://github.com/pypa/pipenv/issues/2589), + [#2666](https://github.com/pypa/pipenv/issues/2666), + [#2767](https://github.com/pypa/pipenv/issues/2767), + [#2785](https://github.com/pypa/pipenv/issues/2785), + [#2795](https://github.com/pypa/pipenv/issues/2795), + [#2801](https://github.com/pypa/pipenv/issues/2801), + [#2824](https://github.com/pypa/pipenv/issues/2824), + [#2862](https://github.com/pypa/pipenv/issues/2862), + [#2879](https://github.com/pypa/pipenv/issues/2879), + [#2894](https://github.com/pypa/pipenv/issues/2894), + [#2933](https://github.com/pypa/pipenv/issues/2933) +- Fix subshell invocation on Windows for Python 2. [#2515](https://github.com/pypa/pipenv/issues/2515) +- Fixed a bug which sometimes caused pipenv to throw a `TypeError` or to run into encoding issues when writing a Lockfile on python 2. [#2561](https://github.com/pypa/pipenv/issues/2561) +- Improve quoting logic for `pipenv run` so it works better with Windows + built-in commands. [#2563](https://github.com/pypa/pipenv/issues/2563) +- Fixed a bug related to parsing VCS requirements with both extras and subdirectory fragments. + Corrected an issue in the `requirementslib` parser which led to some markers being discarded rather than evaluated. [#2564](https://github.com/pypa/pipenv/issues/2564) +- Fixed multiple issues with finding the correct system python locations. [#2582](https://github.com/pypa/pipenv/issues/2582) +- Catch JSON decoding error to prevent exception when the lock file is of + invalid format. [#2607](https://github.com/pypa/pipenv/issues/2607) +- Fixed a rare bug which could sometimes cause errors when installing packages with custom sources. [#2610](https://github.com/pypa/pipenv/issues/2610) +- Update requirementslib to fix a bug which could raise an `UnboundLocalError` when parsing malformed VCS URIs. [#2617](https://github.com/pypa/pipenv/issues/2617) +- Fixed an issue which prevented passing multiple `--ignore` parameters to `pipenv check`. [#2632](https://github.com/pypa/pipenv/issues/2632) +- Fixed a bug which caused attempted hashing of `ssh://` style URIs which could cause failures during installation of private ssh repositories. + \- Corrected path conversion issues which caused certain editable VCS paths to be converted to `ssh://` URIs improperly. [#2639](https://github.com/pypa/pipenv/issues/2639) +- Fixed a bug which caused paths to be formatted incorrectly when using `pipenv shell` in bash for windows. [#2641](https://github.com/pypa/pipenv/issues/2641) +- Dependency links to private repositories defined via `ssh://` schemes will now install correctly and skip hashing as long as `PIP_PROCESS_DEPENDENCY_LINKS=1`. [#2643](https://github.com/pypa/pipenv/issues/2643) +- Fixed a bug which sometimes caused pipenv to parse the `trusted_host` argument to pip incorrectly when parsing source URLs which specify `verify_ssl = false`. [#2656](https://github.com/pypa/pipenv/issues/2656) +- Prevent crashing when a virtual environment in `WORKON_HOME` is faulty. [#2676](https://github.com/pypa/pipenv/issues/2676) +- Fixed virtualenv creation failure when a .venv file is present in the project root. [#2680](https://github.com/pypa/pipenv/issues/2680) +- Fixed a bug which could cause the `-e/--editable` argument on a dependency to be accidentally parsed as a dependency itself. [#2714](https://github.com/pypa/pipenv/issues/2714) +- Correctly pass `verbose` and `debug` flags to the resolver subprocess so it generates appropriate output. This also resolves a bug introduced by the fix to #2527. [#2732](https://github.com/pypa/pipenv/issues/2732) +- All markers are now included in `pipenv lock --requirements` output. [#2748](https://github.com/pypa/pipenv/issues/2748) +- Fixed a bug in marker resolution which could cause duplicate and non-deterministic markers. [#2760](https://github.com/pypa/pipenv/issues/2760) +- Fixed a bug in the dependency resolver which caused regular issues when handling `setup.py` based dependency resolution. [#2766](https://github.com/pypa/pipenv/issues/2766) +- Updated vendored dependencies: + : - `pip-tools` (updated and patched to latest w/ `pip 18.0` compatibility) + - `pip 10.0.1 => 18.0` + - `click 6.7 => 7.0` + - `toml 0.9.4 => 0.10.0` + - `pyparsing 2.2.0 => 2.2.2` + - `delegator 0.1.0 => 0.1.1` + - `attrs 18.1.0 => 18.2.0` + - `distlib 0.2.7 => 0.2.8` + - `packaging 17.1.0 => 18.0` + - `passa 0.2.0 => 0.3.1` + - `pip_shims 0.1.2 => 0.3.1` + - `plette 0.1.1 => 0.2.2` + - `pythonfinder 1.0.2 => 1.1.0` + - `pytoml 0.1.18 => 0.1.19` + - `requirementslib 1.1.16 => 1.1.17` + - `shellingham 1.2.4 => 1.2.6` + - `tomlkit 0.4.2 => 0.4.4` + - `vistir 0.1.4 => 0.1.6` + [#2802](https://github.com/pypa/pipenv/issues/2802), + [#2867](https://github.com/pypa/pipenv/issues/2867), + [#2880](https://github.com/pypa/pipenv/issues/2880) +- Fixed a bug where `pipenv` crashes when the `WORKON_HOME` directory does not exist. [#2877](https://github.com/pypa/pipenv/issues/2877) +- Fixed pip is not loaded from pipenv's patched one but the system one [#2912](https://github.com/pypa/pipenv/issues/2912) +- Fixed various bugs related to `pip 18.1` release which prevented locking, installation, and syncing, and dumping to a `requirements.txt` file. [#2924](https://github.com/pypa/pipenv/issues/2924) + +## Vendored Libraries + +- Pew is no longer vendored. Entry point `pewtwo`, packages `pipenv.pew` and + `pipenv.patched.pew` are removed. [#2521](https://github.com/pypa/pipenv/issues/2521) +- Update `pythonfinder` to major release `1.0.0` for integration. [#2582](https://github.com/pypa/pipenv/issues/2582) +- Update requirementslib to fix a bug which could raise an `UnboundLocalError` when parsing malformed VCS URIs. [#2617](https://github.com/pypa/pipenv/issues/2617) +- - Vendored new libraries `vistir` and `pip-shims`, `tomlkit`, `modutil`, and `plette`. + - Update vendored libraries: + \- `scandir` to `1.9.0` + \- `click-completion` to `0.4.1` + \- `semver` to `2.8.1` + \- `shellingham` to `1.2.4` + \- `pytoml` to `0.1.18` + \- `certifi` to `2018.8.24` + \- `ptyprocess` to `0.6.0` + \- `requirementslib` to `1.1.5` + \- `pythonfinder` to `1.0.2` + \- `pipdeptree` to `0.13.0` + \- `python-dotenv` to `0.9.1` [#2639](https://github.com/pypa/pipenv/issues/2639) +- Updated vendored dependencies: + : - `pip-tools` (updated and patched to latest w/ `pip 18.0` compatibility) + - `pip 10.0.1 => 18.0` + - `click 6.7 => 7.0` + - `toml 0.9.4 => 0.10.0` + - `pyparsing 2.2.0 => 2.2.2` + - `delegator 0.1.0 => 0.1.1` + - `attrs 18.1.0 => 18.2.0` + - `distlib 0.2.7 => 0.2.8` + - `packaging 17.1.0 => 18.0` + - `passa 0.2.0 => 0.3.1` + - `pip_shims 0.1.2 => 0.3.1` + - `plette 0.1.1 => 0.2.2` + - `pythonfinder 1.0.2 => 1.1.0` + - `pytoml 0.1.18 => 0.1.19` + - `requirementslib 1.1.16 => 1.1.17` + - `shellingham 1.2.4 => 1.2.6` + - `tomlkit 0.4.2 => 0.4.4` + - `vistir 0.1.4 => 0.1.6` + [#2902](https://github.com/pypa/pipenv/issues/2902), + [#2935](https://github.com/pypa/pipenv/issues/2935) + +## Improved Documentation + +- Simplified the test configuration process. [#2568](https://github.com/pypa/pipenv/issues/2568) +- Updated documentation to use working fortune cookie add-on. [#2644](https://github.com/pypa/pipenv/issues/2644) +- Added additional information about troubleshooting `pipenv shell` by using the the `$PIPENV_SHELL` environment variable. [#2671](https://github.com/pypa/pipenv/issues/2671) +- Added a link to `PEP-440` version specifiers in the documentation for additional detail. [#2674](https://github.com/pypa/pipenv/issues/2674) +- Added simple example to README.md for installing from git. [#2685](https://github.com/pypa/pipenv/issues/2685) +- Stopped recommending `--system` for Docker contexts. [#2762](https://github.com/pypa/pipenv/issues/2762) +- Fixed the example url for doing "pipenv install -e + some-repository-url#egg=something", it was missing the "egg=" in the fragment + identifier. [#2792](https://github.com/pypa/pipenv/issues/2792) +- Fixed link to the "be cordial" essay in the contribution documentation. [#2793](https://github.com/pypa/pipenv/issues/2793) +- Clarify `pipenv install` documentation [#2844](https://github.com/pypa/pipenv/issues/2844) +- Replace reference to uservoice with PEEP-000 [#2909](https://github.com/pypa/pipenv/issues/2909) + +# 2018.7.1 (2018-07-01) + +## Features & Improvements + +- All calls to `pipenv shell` are now implemented from the ground up using [shellingham](https://github.com/sarugaku/shellingham), a custom library which was purpose built to handle edge cases and shell detection. [#2371](https://github.com/pypa/pipenv/issues/2371) +- Added support for python 3.7 via a few small compatibility / bug fixes. [#2427](https://github.com/pypa/pipenv/issues/2427), + [#2434](https://github.com/pypa/pipenv/issues/2434), + [#2436](https://github.com/pypa/pipenv/issues/2436) +- Added new flag `pipenv --support` to replace the diagnostic command `python -m pipenv.help`. [#2477](https://github.com/pypa/pipenv/issues/2477), + [#2478](https://github.com/pypa/pipenv/issues/2478) +- Improved import times and CLI run times with minor tweaks. [#2485](https://github.com/pypa/pipenv/issues/2485) + +## Bug Fixes + +- Fixed an ongoing bug which sometimes resolved incompatible versions into the project Lockfile. [#1901](https://github.com/pypa/pipenv/issues/1901) +- Fixed a bug which caused errors when creating virtualenvs which contained leading dash characters. [#2415](https://github.com/pypa/pipenv/issues/2415) +- Fixed a logic error which caused `--deploy --system` to overwrite editable vcs packages in the Pipfile before installing, which caused any installation to fail by default. [#2417](https://github.com/pypa/pipenv/issues/2417) +- Updated requirementslib to fix an issue with properly quoting markers in VCS requirements. [#2419](https://github.com/pypa/pipenv/issues/2419) +- Installed new vendored jinja2 templates for `click-completion` which were causing template errors for users with completion enabled. [#2422](https://github.com/pypa/pipenv/issues/2422) +- Added support for python 3.7 via a few small compatibility / bug fixes. [#2427](https://github.com/pypa/pipenv/issues/2427) +- Fixed an issue reading package names from `setup.py` files in projects which imported utilities such as `versioneer`. [#2433](https://github.com/pypa/pipenv/issues/2433) +- Pipenv will now ensure that its internal package names registry files are written with unicode strings. [#2450](https://github.com/pypa/pipenv/issues/2450) +- Fixed a bug causing requirements input as relative paths to be output as absolute paths or URIs. + Fixed a bug affecting normalization of `git+git@host` URLs. [#2453](https://github.com/pypa/pipenv/issues/2453) +- Pipenv will now always use `pathlib2` for `Path` based filesystem interactions by default on `python<3.5`. [#2454](https://github.com/pypa/pipenv/issues/2454) +- Fixed a bug which prevented passing proxy PyPI indexes set with `--pypi-mirror` from being passed to pip during virtualenv creation, which could cause the creation to freeze in some cases. [#2462](https://github.com/pypa/pipenv/issues/2462) +- Using the `python -m pipenv.help` command will now use proper encoding for the host filesystem to avoid encoding issues. [#2466](https://github.com/pypa/pipenv/issues/2466) +- The new `jinja2` templates for `click_completion` will now be included in pipenv source distributions. [#2479](https://github.com/pypa/pipenv/issues/2479) +- Resolved a long-standing issue with re-using previously generated `InstallRequirement` objects for resolution which could cause `PKG-INFO` file information to be deleted, raising a `TypeError`. [#2480](https://github.com/pypa/pipenv/issues/2480) +- Resolved an issue parsing usernames from private PyPI URIs in `Pipfiles` by updating `requirementslib`. [#2484](https://github.com/pypa/pipenv/issues/2484) + +## Vendored Libraries + +- All calls to `pipenv shell` are now implemented from the ground up using [shellingham](https://github.com/sarugaku/shellingham), a custom library which was purpose built to handle edge cases and shell detection. [#2371](https://github.com/pypa/pipenv/issues/2371) +- Updated requirementslib to fix an issue with properly quoting markers in VCS requirements. [#2419](https://github.com/pypa/pipenv/issues/2419) +- Installed new vendored jinja2 templates for `click-completion` which were causing template errors for users with completion enabled. [#2422](https://github.com/pypa/pipenv/issues/2422) +- Add patch to `prettytoml` to support Python 3.7. [#2426](https://github.com/pypa/pipenv/issues/2426) +- Patched `prettytoml.AbstractTable._enumerate_items` to handle `StopIteration` errors in preparation of release of python 3.7. [#2427](https://github.com/pypa/pipenv/issues/2427) +- Fixed an issue reading package names from `setup.py` files in projects which imported utilities such as `versioneer`. [#2433](https://github.com/pypa/pipenv/issues/2433) +- Updated `requirementslib` to version `1.0.9` [#2453](https://github.com/pypa/pipenv/issues/2453) +- Unraveled a lot of old, unnecessary patches to `pip-tools` which were causing non-deterministic resolution errors. [#2480](https://github.com/pypa/pipenv/issues/2480) +- Resolved an issue parsing usernames from private PyPI URIs in `Pipfiles` by updating `requirementslib`. [#2484](https://github.com/pypa/pipenv/issues/2484) + +## Improved Documentation + +- Added instructions for installing using Fedora's official repositories. [#2404](https://github.com/pypa/pipenv/issues/2404) + +# 2018.6.25 (2018-06-25) + +## Features & Improvements + +- Pipenv-created virtualenvs will now be associated with a `.project` folder + (features can be implemented on top of this later or users may choose to use + `pipenv-pipes` to take full advantage of this.) [#1861](https://github.com/pypa/pipenv/issues/1861) +- Virtualenv names will now appear in prompts for most Windows users. [#2167](https://github.com/pypa/pipenv/issues/2167) +- Added support for cmder shell paths with spaces. [#2168](https://github.com/pypa/pipenv/issues/2168) +- Added nested JSON output to the `pipenv graph` command. [#2199](https://github.com/pypa/pipenv/issues/2199) +- Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. Updated + patched piptools version. [#2255](https://github.com/pypa/pipenv/issues/2255) +- PyPI mirror URLs can now be set to override instances of PyPI URLs by passing + the `--pypi-mirror` argument from the command line or setting the + `PIPENV_PYPI_MIRROR` environment variable. [#2281](https://github.com/pypa/pipenv/issues/2281) +- Virtualenv activation lines will now avoid being written to some shell + history files. [#2287](https://github.com/pypa/pipenv/issues/2287) +- Pipenv will now only search for `requirements.txt` files when creating new + projects, and during that time only if the user doesn't specify packages to + pass in. [#2309](https://github.com/pypa/pipenv/issues/2309) +- Added support for mounted drives via UNC paths. [#2331](https://github.com/pypa/pipenv/issues/2331) +- Added support for Windows Subsystem for Linux bash shell detection. [#2363](https://github.com/pypa/pipenv/issues/2363) +- Pipenv will now generate hashes much more quickly by resolving them in a + single pass during locking. [#2384](https://github.com/pypa/pipenv/issues/2384) +- `pipenv run` will now avoid spawning additional `COMSPEC` instances to + run commands in when possible. [#2385](https://github.com/pypa/pipenv/issues/2385) +- Massive internal improvements to requirements parsing codebase, resolver, and + error messaging. [#2388](https://github.com/pypa/pipenv/issues/2388) +- `pipenv check` now may take multiple of the additional argument + `--ignore` which takes a parameter `cve_id` for the purpose of ignoring + specific CVEs. [#2408](https://github.com/pypa/pipenv/issues/2408) + +## Behavior Changes + +- Pipenv will now parse & capitalize `platform_python_implementation` markers + .. warning:: This could cause an issue if you have an out of date `Pipfile` + which lower-cases the comparison value (e.g. `cpython` instead of + `CPython`). [#2123](https://github.com/pypa/pipenv/issues/2123) +- Pipenv will now only search for `requirements.txt` files when creating new + projects, and during that time only if the user doesn't specify packages to + pass in. [#2309](https://github.com/pypa/pipenv/issues/2309) + +## Bug Fixes + +- Massive internal improvements to requirements parsing codebase, resolver, and + error messaging. [#1962](https://github.com/pypa/pipenv/issues/1962), + [#2186](https://github.com/pypa/pipenv/issues/2186), + [#2263](https://github.com/pypa/pipenv/issues/2263), + [#2312](https://github.com/pypa/pipenv/issues/2312) +- Pipenv will now parse & capitalize `platform_python_implementation` + markers. [#2123](https://github.com/pypa/pipenv/issues/2123) +- Fixed a bug with parsing and grouping old-style `setup.py` extras during + resolution [#2142](https://github.com/pypa/pipenv/issues/2142) +- Fixed a bug causing pipenv graph to throw unhelpful exceptions when running + against empty or non-existent environments. [#2161](https://github.com/pypa/pipenv/issues/2161) +- Fixed a bug which caused `--system` to incorrectly abort when users were in + a virtualenv. [#2181](https://github.com/pypa/pipenv/issues/2181) +- Removed vendored `cacert.pem` which could cause issues for some users with + custom certificate settings. [#2193](https://github.com/pypa/pipenv/issues/2193) +- Fixed a regression which led to direct invocations of `virtualenv`, rather + than calling it by module. [#2198](https://github.com/pypa/pipenv/issues/2198) +- Locking will now pin the correct VCS ref during `pipenv update` runs. + Running `pipenv update` with a new vcs ref specified in the `Pipfile` + will now properly obtain, resolve, and install the specified dependency at + the specified ref. [#2209](https://github.com/pypa/pipenv/issues/2209) +- `pipenv clean` will now correctly ignore comments from `pip freeze` when + cleaning the environment. [#2262](https://github.com/pypa/pipenv/issues/2262) +- Resolution bugs causing packages for incompatible python versions to be + locked have been fixed. [#2267](https://github.com/pypa/pipenv/issues/2267) +- Fixed a bug causing pipenv graph to fail to display sometimes. [#2268](https://github.com/pypa/pipenv/issues/2268) +- Updated `requirementslib` to fix a bug in Pipfile parsing affecting + relative path conversions. [#2269](https://github.com/pypa/pipenv/issues/2269) +- Windows executable discovery now leverages `os.pathext`. [#2298](https://github.com/pypa/pipenv/issues/2298) +- Fixed a bug which caused `--deploy --system` to inadvertently create a + virtualenv before failing. [#2301](https://github.com/pypa/pipenv/issues/2301) +- Fixed an issue which led to a failure to unquote special characters in file + and wheel paths. [#2302](https://github.com/pypa/pipenv/issues/2302) +- VCS dependencies are now manually obtained only if they do not match the + requested ref. [#2304](https://github.com/pypa/pipenv/issues/2304) +- Added error handling functionality to properly cope with single-digit + `Requires-Python` metadata with no specifiers. [#2377](https://github.com/pypa/pipenv/issues/2377) +- `pipenv update` will now always run the resolver and lock before ensuring + dependencies are in sync with project Lockfile. [#2379](https://github.com/pypa/pipenv/issues/2379) +- Resolved a bug in our patched resolvers which could cause nondeterministic + resolution failures in certain conditions. Running `pipenv install` with no + arguments in a project with only a `Pipfile` will now correctly lock first + for dependency resolution before installing. [#2384](https://github.com/pypa/pipenv/issues/2384) +- Patched `python-dotenv` to ensure that environment variables always get + encoded to the filesystem encoding. [#2386](https://github.com/pypa/pipenv/issues/2386) + +## Improved Documentation + +- Update documentation wording to clarify Pipenv's overall role in the packaging ecosystem. [#2194](https://github.com/pypa/pipenv/issues/2194) +- Added contribution documentation and guidelines. [#2205](https://github.com/pypa/pipenv/issues/2205) +- Added instructions for supervisord compatibility. [#2215](https://github.com/pypa/pipenv/issues/2215) +- Fixed broken links to development philosophy and contribution documentation. [#2248](https://github.com/pypa/pipenv/issues/2248) + +## Vendored Libraries + +- Removed vendored `cacert.pem` which could cause issues for some users with + custom certificate settings. [#2193](https://github.com/pypa/pipenv/issues/2193) + +- Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. Updated + patched piptools version. [#2255](https://github.com/pypa/pipenv/issues/2255) + +- Updated `requirementslib` to fix a bug in Pipfile parsing affecting + relative path conversions. [#2269](https://github.com/pypa/pipenv/issues/2269) + +- Added custom shell detection library `shellingham`, a port of our changes + to `pew`. [#2363](https://github.com/pypa/pipenv/issues/2363) + +- Patched `python-dotenv` to ensure that environment variables always get + encoded to the filesystem encoding. [#2386](https://github.com/pypa/pipenv/issues/2386) + +- Updated vendored libraries. The following vendored libraries were updated: + + - distlib from version `0.2.6` to `0.2.7`. + - jinja2 from version `2.9.5` to `2.10`. + - pathlib2 from version `2.1.0` to `2.3.2`. + - parse from version `2.8.0` to `2.8.4`. + - pexpect from version `2.5.2` to `2.6.0`. + - requests from version `2.18.4` to `2.19.1`. + - idna from version `2.6` to `2.7`. + - certifi from version `2018.1.16` to `2018.4.16`. + - packaging from version `16.8` to `17.1`. + - six from version `1.10.0` to `1.11.0`. + - requirementslib from version `0.2.0` to `1.0.1`. + + In addition, scandir was vendored and patched to avoid importing host system binaries when falling back to pathlib2. [#2368](https://github.com/pypa/pipenv/issues/2368) diff --git a/docs/changelog.rst b/docs/changelog.rst deleted file mode 100644 index 82e6d0879f..0000000000 --- a/docs/changelog.rst +++ /dev/null @@ -1,4 +0,0 @@ -Release and Version History -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: ../CHANGELOG.rst diff --git a/docs/cli.md b/docs/cli.md new file mode 100644 index 0000000000..8b48507ac9 --- /dev/null +++ b/docs/cli.md @@ -0,0 +1,147 @@ +# Pipenv CLI Reference + +## pipenv + +```bash +pipenv [OPTIONS] COMMAND [ARGS]... +``` + +## check + +Checks for PyUp Safety security vulnerabilities and against PEP 508 markers provided in Pipfile. + +```bash +pipenv check [OPTIONS] +``` + +## clean + +Uninstalls all packages not specified in Pipfile.lock. + +```bash +pipenv clean [OPTIONS] +``` + +## graph + +Displays currently–installed dependency graph information. + +```bash +pipenv graph [OPTIONS] +``` + +## install + +Installs provided packages and adds them to Pipfile, or (if no packages are given), installs all packages from Pipfile. + +```bash +pipenv install [OPTIONS] [PACKAGES]... +``` + +Environment Variables + +PIP_INDEX_URL + +```bash + Provide a default for -i +``` + +## lock + +Generates Pipfile.lock. + +```bash +pipenv lock [OPTIONS] +``` + +## open + +View a given module in your editor. + +This uses the EDITOR environment variable. You can temporarily override it, for example: + +EDITOR=atom pipenv open requests + +```bash +pipenv open [OPTIONS] MODULE +``` + +## requirements + +Generate a requirements.txt from Pipfile.lock. + +```bash +pipenv requirements [OPTIONS] +``` + +## run + +Spawns a command installed into the virtualenv. + +```bash +pipenv run [OPTIONS] COMMAND [ARGS]... +``` + +## shell + +Spawns a shell within the virtualenv. + +```bash +pipenv shell [OPTIONS] [SHELL_ARGS]... +``` + +## sync + +Installs all packages specified in Pipfile.lock. + +```bash +pipenv sync [OPTIONS] +``` + +## uninstall + +Un-installs a provided package and removes it from Pipfile. + +```bash +pipenv uninstall [OPTIONS] [PACKAGES]... +``` + +## update + +Runs lock when no packages are specified, or upgrade, and then sync. + +```bash +pipenv update [OPTIONS] [PACKAGES]... +``` + +Environment Variables + +PIP_INDEX_URL + +```bash + Provide a default for -i +``` + +## upgrade + +Resolves provided packages and adds them to Pipfile, or (if no packages are given), merges results to Pipfile.lock + +```bash +pipenv upgrade [OPTIONS] [PACKAGES]... +``` + +Environment Variables + +PIP_INDEX_URL + +```bash + Provide a default for -i +``` + +## verify + +Verify the hash in Pipfile.lock is up-to-date. + +```bash +pipenv verify [OPTIONS] +``` diff --git a/docs/cli.rst b/docs/cli.rst deleted file mode 100644 index 873c67d706..0000000000 --- a/docs/cli.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. _cli: - -Pipenv CLI Reference -====================================== - -.. click:: pipenv:cli - :prog: pipenv - :show-nested: diff --git a/docs/conf.py b/docs/conf.py index a03988b063..edd02f6202 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -72,8 +72,8 @@ # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # -# source_suffix = ['.rst', '.md'] -source_suffix = ".rst" +source_suffix = [".rst", ".md"] +# source_suffix = ".rst" # The master toctree document. master_doc = "index" diff --git a/docs/dev/contributing.rst b/docs/dev/contributing.md similarity index 52% rename from docs/dev/contributing.rst rename to docs/dev/contributing.md index d9ca81227f..a6bd1021dd 100644 --- a/docs/dev/contributing.rst +++ b/docs/dev/contributing.md @@ -1,10 +1,9 @@ -Contributing to Pipenv -====================== +# Contributing to Pipenv If you're reading this, you're probably interested in contributing to Pipenv. Thank you very much! Open source projects live-and-die based on the support they receive from others, and the fact that you're even considering -contributing to the Pipenv project is *very* generous of you. +contributing to the Pipenv project is _very_ generous of you. This document lays out guidelines and advice for contributing to this project. If you're thinking of contributing, please start by reading this document and @@ -14,28 +13,19 @@ The guide is split into sections based on the type of contribution you're thinking of making, with a section that covers general guidelines for all contributors. +## General Guidelines -General Guidelines ------------------- +### Be Cordial -Be Cordial -~~~~~~~~~~ - - **Be cordial or be on your way**. *—Kenneth Reitz* - -.. _be cordial or be on your way: https://kennethreitz.org/essays/2013/01/27/be-cordial-or-be-on-your-way +> **Be cordial or be on your way**. _—Kenneth Reitz_ Pipenv has one very important rule governing all forms of contribution, -including reporting bugs or requesting features. This golden rule is -"`be cordial or be on your way`_" +including reporting bugs or requesting features. This golden rule is [be cordial or be on your way](https://kennethreitz.org/essays/2013/01/27/be-cordial-or-be-on-your-way) **All contributions are welcome**, as long as everyone involved is treated with respect. -.. _early-feedback: - -Get Early Feedback -~~~~~~~~~~~~~~~~~~ +### Get Early Feedback If you are contributing, do not feel the need to sit on your contribution until it is perfectly polished and complete. It helps everyone involved for you to @@ -44,8 +34,7 @@ version of your contribution for feedback in no way prejudices your chances of getting that contribution accepted, and can save you from putting a lot of work into a contribution that is not suitable for the project. -Contribution Suitability -~~~~~~~~~~~~~~~~~~~~~~~~ +### Contribution Suitability Our project maintainers have the last word on whether or not a contribution is suitable for Pipenv. All contributions will be considered carefully, but from @@ -56,68 +45,51 @@ If your contribution is rejected, don't despair! As long as you followed these guidelines, you will have a much better chance of getting your next contribution accepted. +## Questions -Questions ---------- - -The GitHub issue tracker is for *bug reports* and *feature requests*. Please do +The GitHub issue tracker is for _bug reports_ and _feature requests_. Please do not use it to ask questions about how to use Pipenv. These questions should -instead be directed to `Stack Overflow`_. Make sure that your question is tagged -with the ``pipenv`` tag when asking it on Stack Overflow, to ensure that it is +instead be directed to [Stack Overflow](https://stackoverflow.com/). Make sure that your question is tagged +with the `pipenv` tag when asking it on Stack Overflow, to ensure that it is answered promptly and accurately. -.. _Stack Overflow: https://stackoverflow.com/ - -Code Contributions ------------------- +## Code Contributions -Steps for Submitting Code -~~~~~~~~~~~~~~~~~~~~~~~~~ +### Steps for Submitting Code When contributing code, you'll want to follow this checklist: -#. Fork the repository on GitHub. -#. Set up your :ref:`dev-setup` -#. Run the tests (:ref:`run-the-tests`) to confirm they all pass on your system. - If they don't, you'll need to investigate why they fail. If you're unable - to diagnose this yourself, raise it as a bug report by following the guidelines - in this document: :ref:`bug-reports`. -#. Write tests that demonstrate your bug or feature. Ensure that they fail. -#. Make your change. -#. Run the entire test suite again, confirming that all tests pass *including - the ones you just added*. -#. Send a GitHub Pull Request to the main repository's ``main`` branch. - GitHub Pull Requests are the expected method of code collaboration on this - project. +1. Fork the repository on GitHub. +2. Set up your [development environment](#development-setup) +3. Run the tests from [here](#run-the-tests) to confirm they all pass on your system. If they don't, you'll need to investigate why they fail. If you're unable to diagnose this yourself, raise it as a bug report by following the guidelines + in this [document](#bug-reports). +4. Write tests that demonstrate your bug or feature. Ensure that they fail. +5. Make your change. +6. Run the entire test suite again, confirming that all tests pass _including the ones you just added_. +7. Send a GitHub Pull Request to the main repository's `main` branch. GitHub Pull Requests are the expected method of code collaboration on this project. The following sub-sections go into more detail on some of the points above. -.. _dev-setup: +### Development Setup -Development Setup -~~~~~~~~~~~~~~~~~ - -The repository version of Pipenv must be installed over other global versions to -resolve conflicts with the ``pipenv`` folder being implicitly added to ``sys.path``. -See `pypa/pipenv#2557`_ for more details. - -.. _pypa/pipenv#2557: https://github.com/pypa/pipenv/issues/2557 +The repository version of Pipenv must be installed over other global versions to resolve conflicts with the `pipenv` folder being implicitly added to `sys.path`. +See [pypa/pipenv#2557](https://github.com/pypa/pipenv/issues/2557) for more details. Pipenv now uses pre-commit hooks similar to Pip in order to apply linting and code formatting automatically! The build now also checks that these linting rules have been applied to the code before running the tests. The build will fail when linting changes are detected so be sure to sync dev requirements -and install the pre-commit hooks locally:: +and install the pre-commit hooks locally: +```bash $ pipenv install --dev # This will configure running the pre-commit checks at start of each commit $ pre-commit install # Should you want to check the pre-commit configuration against all configured project files $ pre-commit run --all-files --verbose +``` - -Code Review -~~~~~~~~~~~ +### Code Review Contributions will not be merged until they have been code reviewed. You should implement any code review feedback unless you strongly object to it. In the @@ -125,98 +97,88 @@ event that you object to the code review feedback, you should make your case clearly and calmly. If, after doing so, the feedback is judged to still apply, you must either apply the feedback or withdraw your contribution. - -Package Index -~~~~~~~~~~~~~ +### Package Index To speed up testing, tests that rely on a package index for locking and installing use a local server that contains vendored packages in the -``tests/pypi`` directory. Each vendored package should have it's own folder +`tests/pypi` directory. Each vendored package should have it's own folder containing the necessary releases. When adding a release for a package, it is -easiest to use either the ``.tar.gz`` or universal wheels (ex: ``py2.py3-none``). If -a ``.tar.gz`` or universal wheel is not available, add wheels for all available +easiest to use either the `.tar.gz` or universal wheels (ex: `py2.py3-none`). If +a `.tar.gz` or universal wheel is not available, add wheels for all available architectures and platforms. - -Documentation Contributions ---------------------------- +## Documentation Contributions Documentation improvements are always welcome! The documentation files live in -the ``docs/`` directory of the codebase. They're written in -`reStructuredText`_, and use `Sphinx`_ to generate the full suite of +the `docs/` directory of the codebase. They're written in +[MarkDown](https://www.markdownguide.org/), and use [Sphinx](http://sphinx-doc.org/index.html) to generate the full suite of documentation. When contributing documentation, please do your best to follow the style of the documentation files. This means a soft-limit of 79 characters wide in your text files and a semi-formal, yet friendly and approachable, prose style. -When presenting Python code, use single-quoted strings (``'hello'`` instead of -``"hello"``). +When presenting Python code, use single-quoted strings (`'hello'` instead of +`"hello"`). -.. _reStructuredText: http://docutils.sourceforge.net/rst.html -.. _Sphinx: http://sphinx-doc.org/index.html +## Bug Reports -.. _bug-reports: - -Bug Reports ------------ - -Bug reports are hugely important! They are recorded as `GitHub issues`_. Please +Bug reports are hugely important! They are recorded as [GitHub issues](https://github.com/pypa/pipenv/issues). Please be aware of the following things when filing bug reports: -.. _GitHub issues: https://github.com/pypa/pipenv/issues - -1. Avoid raising duplicate issues. *Please* use the GitHub issue search feature +1. Avoid raising duplicate issues. _Please_ use the GitHub issue search feature to check whether your bug report or feature request has been mentioned in the past. Duplicate bug reports and feature requests are a huge maintenance burden on the limited resources of the project. If it is clear from your report that you would have struggled to find the original, that's okay, but if searching for a selection of words in your issue title would have found the duplicate then the issue will likely be closed extremely abruptly. + 2. When filing bug reports about exceptions or tracebacks, please include the - *complete* traceback. Partial tracebacks, or just the exception text, are + _complete_ traceback. Partial tracebacks, or just the exception text, are not helpful. Issues that do not contain complete tracebacks may be closed without warning. + 3. Make sure you provide a suitable amount of information to work with. This means you should provide: - - Guidance on **how to reproduce the issue**. Ideally, this should be a - *small* code sample that can be run immediately by the maintainers. - Failing that, let us know what you're doing, how often it happens, what - environment you're using, etc. Be thorough: it prevents us needing to ask - further questions. - - Tell us **what you expected to happen**. When we run your example code, - what are we expecting to happen? What does "success" look like for your - code? - - Tell us **what actually happens**. It's not helpful for you to say "it - doesn't work" or "it fails". Tell us *how* it fails: do you get an - exception? A hang? The packages installed seem incorrect? - How was the actual result different from your expected result? - - Tell us **what version of Pipenv you're using**, and - **how you installed it**. Different versions of Pipenv behave - differently and have different bugs, and some distributors of Pipenv - ship patches on top of the code we supply. + - Guidance on **how to reproduce the issue**. Ideally, this should be a + _small_ code sample that can be run immediately by the maintainers. + Failing that, let us know what you're doing, how often it happens, what + environment you're using, etc. Be thorough: it prevents us needing to ask + further questions. - If you do not provide all of these things, it will take us much longer to - fix your problem. If we ask you to clarify these and you never respond, we - will close your issue without fixing it. + - Tell us **what you expected to happen**. When we run your example code, + what are we expecting to happen? What does "success" look like for your + code? -.. _run-the-tests: + - Tell us **what actually happens**. It's not helpful for you to say "it + doesn't work" or "it fails". Tell us _how_ it fails: do you get an + exception? A hang? The packages installed seem incorrect? + How was the actual result different from your expected result? -Run the tests -------------- + - Tell us **what version of Pipenv you're using**, and + **how you installed it**. Different versions of Pipenv behave + differently and have different bugs, and some distributors of Pipenv + ship patches on top of the code we supply. -Tests are written in ``pytest`` style and can be run very simply: +If you do not provide all of these things, it will take us much longer to +fix your problem. If we ask you to clarify these and you never respond, we +will close your issue without fixing it. -.. code-block:: bash +## Run the tests - pytest +Tests are written in `pytest` style and can be run very simply: + +```bash + pytest +``` However many tests depend on running a private pypi server on localhost:8080. -This can be accomplished by using either the ``run-tests.sh`` or ``run-tests.bat`` scripts -which will start the ``pypiserver`` process ahead of invoking pytest. +This can be accomplished by using either the `run-tests.sh` or `run-tests.bat` scripts +which will start the `pypiserver` process ahead of invoking pytest. -You may also manually perform this step and then invoke pytest as you would normally. Example:: +You may also manually perform this step and then invoke pytest as you would normally. Example: # Linux or MacOS pipenv run pypi-server run -v --host=0.0.0.0 --port=8080 --hash-algo=sha256 --disable-fallback ./tests/pypi/ ./tests/fixtures & @@ -224,60 +186,59 @@ You may also manually perform this step and then invoke pytest as you would norm # Windows cmd /c start pipenv run pypi-server run -v --host=0.0.0.0 --port=8080 --hash-algo=sha256 --disable-fallback ./tests/pypi/ ./tests/fixtures - This will run all Pipenv tests, which can take awhile. To run a subset of the tests, the standard pytest filters are available, such as: -- provide a directory or file: ``pytest tests/unit`` or ``pytest tests/unit/test_cmdparse.py`` -- provide a keyword expression: ``pytest -k test_lock_editable_vcs_without_install`` -- provide a nodeid: ``pytest tests/unit/test_cmdparse.py::test_parse`` -- provide a test marker: ``pytest -m lock`` +- provide a directory or file: `pytest tests/unit` or `pytest tests/unit/test_cmdparse.py` +- provide a keyword expression: `pytest -k test_lock_editable_vcs_without_install` +- provide a nodeid: `pytest tests/unit/test_cmdparse.py::test_parse` +- provide a test marker: `pytest -m lock` There are a few other ways of running the tests: 1. test scripts -The scripts for bash or windows: ``run-tests.sh`` and ``run-tests.bat`` +The scripts for bash or windows: `run-tests.sh` and `run-tests.bat` Note that, you override the default Python Pipenv will use with PIPENV_PYTHON and the Python binary name with PYTHON in case it -is not called ``python`` on your system or in case you have many. +is not called `python` on your system or in case you have many. Here is an example how you can override both variables (you can -override just one too):: +override just one too): - $ PYTHON=python3.8 PIPENV_PYTHON=python3.9 run-tests.sh + $ PYTHON=python3.8 PIPENV_PYTHON=python3.9 run-tests.sh -You can also do:: +You can also do: - $ PYTHON=/opt/python/python3.10/python3 run-tests.sh +$ PYTHON=/opt/python/python3.10/python3 run-tests.sh If you need to change how pytest is invoked, see how to run the -test suite manually. The ``run-tests.sh`` script does the same +test suite manually. The `run-tests.sh` script does the same steps the Github CI workflow does, and as such it is recommended you run it before you open a PR. Taking this second approach, will allow you, for example, to run a single test case, or -``fail fast`` if you need it. +`fail fast` if you need it. 2. Manually This repeats the steps of the scripts above: -.. code-block:: console - - $ git clone https://github.com/pypa/pipenv.git - $ cd pipenv - $ git submodule sync && git submodule update --init --recursive - $ pipenv install --dev - $ pipenv run pytest [--any optional arguments to pytest] +```console +$ git clone https://github.com/pypa/pipenv.git +$ cd pipenv +$ git submodule sync && git submodule update --init --recursive +$ pipenv install --dev +$ pipenv run pytest [--any optional arguments to pytest] +``` -The second options assumes you already have ``pipenv`` on your system. +The second options assumes you already have `pipenv` on your system. And simply repeats all the steps in the script above. Preferably, you should be running your tests in a Linux container (or FreeBSD Jail or even VM). This will guarantee that you don't break stuff, and that the tests run in a pristine environment. -Consider doing something like this:: +Consider doing something like this: $ docker run --rm -v $(pwd):/usr/src -it python:3.7 bash # inside the container @@ -285,17 +246,16 @@ Consider doing something like this:: # su debian && cd /usr/src/ # bash run-tests.sh - 3. Using the Makefile: The Makefile automates all the task as in the script. However, it allows -one more fine grained control on every step. For example:: +one more fine grained control on every step. For example: $ make ramdisk # create a ram disk to preserve your SSDs life $ make ramdisk-virtualenv $ make test suite="-m not cli" # run all tests but cli -or :: +or $ make tests parallel="" suite="tests/integration/test_cli.py::test_pipenv_check" @@ -303,23 +263,23 @@ It is important that your environment is setup correctly, and this may take some work, for example, on a specific Mac installation, the following steps may be needed: -.. code-block:: bash - - # Make sure the tests can access github - if [ "$SSH_AGENT_PID" = "" ] - then - eval ``ssh-agent`` - ssh-add - fi +```bash +# Make sure the tests can access github +if [ "$SSH_AGENT_PID" = "" ] +then + eval ``ssh-agent`` + ssh-add +fi - # Use unix like utilities, installed with brew, - # e.g. brew install coreutils - for d in /usr/local/opt/*/libexec/gnubin /usr/local/opt/python/libexec/bin - do - [[ ":$PATH:" != *":$d:"* ]] && PATH="$d:${PATH}" - done +# Use unix like utilities, installed with brew, +# e.g. brew install coreutils +for d in /usr/local/opt/*/libexec/gnubin /usr/local/opt/python/libexec/bin +do + [[ ":$PATH:" != *":$d:"* ]] && PATH="$d:${PATH}" +done - export PATH +export PATH - # PIP_FIND_LINKS currently breaks test_uninstall.py +# PIP_FIND_LINKS currently breaks test_uninstall.py unset PIP_FIND_LINKS +``` diff --git a/docs/diagnose.md b/docs/diagnose.md new file mode 100644 index 0000000000..c65f6b34b0 --- /dev/null +++ b/docs/diagnose.md @@ -0,0 +1,97 @@ +# Frequently Encountered PiPenv Problems + +Pipenv is constantly being improved by volunteers, but is still a very young +project with limited resources, and has some quirks that needs to be dealt +with. We need everyone’s help (including yours!). + +Here are some common questions people have using Pipenv. Please take a look +below and see if they resolve your problem. + +Note + +**Make sure you’re running the newest Pipenv version first!** + +## ☤ Your dependencies could not be resolved + +Make sure your dependencies actually _do_ resolve. If you’re confident they +are, you may need to clear your resolver cache. Run the following command:: + + pipenv lock --clear + +and try again. + +If this does not work, try manually deleting the whole cache directory. It is +usually one of the following locations: + +- `~/Library/Caches/pipenv` (macOS) +- `%LOCALAPPDATA%\pipenv\pipenv\Cache` (Windows) +- `~/.cache/pipenv` (other operating systems) + +Pipenv does not install pre-releases (i.e. a version with an alpha/beta/etc. +suffix, such as _1.0b1_) by default. You will need to pass the `--pre` flag +in your command, or set + + [pipenv] + allow_prereleases = true + +in your Pipfile. + +## ☤ No module named <module name> + +This is usually a result of mixing Pipenv with system packages. We _strongly_ +recommend installing Pipenv in an isolated environment. Uninstall all existing +Pipenv installations, and see [installing pipenv](./installation.md/#installing-pipenv) to choose one of the recommended way to install Pipenv instead. + +## ☤ My pyenv-installed Python is not found + +Make sure you have `PYENV_ROOT` set correctly. Pipenv only supports CPython +distributions, with version name like `3.6.4` or similar. + +## ☤ Pipenv does not respect pyenv’s global and local Python versions + +Pipenv by default uses the Python it is installed against to create the +virtualenv. You can set the `--python` option to `$(pyenv which python)` to use your current pyenv interpreter. See [specifying versions](./specifiers.md) for more information. + +## ☤ ValueError: unknown locale: UTF-8 + +macOS has a bug in its locale detection that prevents us from detecting your +shell encoding correctly. This can also be an issue on other systems if the +locale variables do not specify an encoding. + +The workaround is to set the following two environment variables to a standard +localization format: + +- `LC_ALL` +- `LANG` + +```bash +export LC_ALL='en_US.UTF-8' +export LANG='en_US.UTF-8' +``` + +For Zsh, the file to edit is `~/.zshrc`. + +Note + +You can change both the `en_US` and `UTF-8` part to the language/locale and encoding you use. + +## ☤ /bin/pip: No such file or directory + +This may be related to your locale setting. See [here](#☤-valueerror-unknown-locale-utf-8) for a possible solution. + +## ☤ Pipenv does not respect dependencies in setup.py + +No, it does not, intentionally. Pipfile and setup.py serve different purposes, and should not consider each other by default. See :ref:`pipfile-vs-setuppy` for more information. + +## ☤ Using `pipenv run` in Supervisor program + +When you configure a supervisor program's `command` with `pipenv run ...`, you need to set locale environment variables properly to make it work. + +Add this line under `[supervisord]` section in `/etc/supervisor/supervisord.conf`:: + + [supervisord] + environment=LC_ALL='en_US.UTF-8',LANG='en_US.UTF-8' + +## ☤ An exception is raised during `Locking dependencies...` + +Run `pipenv lock --clear` and try again. The lock sequence caches results to speed up subsequent runs. The cache may contain faulty results if a bug causes the format to corrupt, even after the bug is fixed. `--clear` flushes the cache, and therefore removes the bad results. diff --git a/docs/diagnose.rst b/docs/diagnose.rst deleted file mode 100644 index 92a1e2649e..0000000000 --- a/docs/diagnose.rst +++ /dev/null @@ -1,123 +0,0 @@ -.. _diagnose: - -Frequently Encountered Pipenv Problems -====================================== - -Pipenv is constantly being improved by volunteers, but is still a very young -project with limited resources, and has some quirks that needs to be dealt -with. We need everyone’s help (including yours!). - -Here are some common questions people have using Pipenv. Please take a look -below and see if they resolve your problem. - -.. Note:: **Make sure you’re running the newest Pipenv version first!** - -☤ Your dependencies could not be resolved ------------------------------------------ - -Make sure your dependencies actually *do* resolve. If you’re confident they -are, you may need to clear your resolver cache. Run the following command:: - - pipenv lock --clear - -and try again. - -If this does not work, try manually deleting the whole cache directory. It is -usually one of the following locations: - -* ``~/Library/Caches/pipenv`` (macOS) -* ``%LOCALAPPDATA%\pipenv\pipenv\Cache`` (Windows) -* ``~/.cache/pipenv`` (other operating systems) - -Pipenv does not install pre-releases (i.e. a version with an alpha/beta/etc. -suffix, such as *1.0b1*) by default. You will need to pass the ``--pre`` flag -in your command, or set - -:: - - [pipenv] - allow_prereleases = true - -in your Pipfile. - -☤ No module named <module name> ---------------------------------- - -This is usually a result of mixing Pipenv with system packages. We *strongly* -recommend installing Pipenv in an isolated environment. Uninstall all existing -Pipenv installations, and see :ref:`installing-pipenv` to choose one of the -recommended way to install Pipenv instead. - -☤ My pyenv-installed Python is not found ----------------------------------------- - -Make sure you have ``PYENV_ROOT`` set correctly. Pipenv only supports CPython -distributions, with version name like ``3.6.4`` or similar. - -☤ Pipenv does not respect pyenv’s global and local Python versions ------------------------------------------------------------------- - -Pipenv by default uses the Python it is installed against to create the -virtualenv. You can set the ``--python`` option to ``$(pyenv which python)`` -to use your current pyenv interpreter. See :ref:`specifying_versions` for more -information. - -.. _unknown-local-diagnose: - -☤ ValueError: unknown locale: UTF-8 ------------------------------------ - -macOS has a bug in its locale detection that prevents us from detecting your -shell encoding correctly. This can also be an issue on other systems if the -locale variables do not specify an encoding. - -The workaround is to set the following two environment variables to a standard -localization format: - -* ``LC_ALL`` -* ``LANG`` - -For Bash, for example, you can add the following to your ``~/.bash_profile``: - -.. code-block:: bash - - export LC_ALL='en_US.UTF-8' - export LANG='en_US.UTF-8' - -For Zsh, the file to edit is ``~/.zshrc``. - -.. Note:: You can change both the ``en_US`` and ``UTF-8`` part to the - language/locale and encoding you use. - -☤ /bin/pip: No such file or directory -------------------------------------- - -This may be related to your locale setting. See :ref:`unknown-local-diagnose` -for a possible solution. - - -☤ Pipenv does not respect dependencies in setup.py --------------------------------------------------- - -No, it does not, intentionally. Pipfile and setup.py serve different purposes, -and should not consider each other by default. See :ref:`pipfile-vs-setuppy` -for more information. - -☤ Using ``pipenv run`` in Supervisor program ---------------------------------------------- - -When you configure a supervisor program's ``command`` with ``pipenv run ...``, you -need to set locale environment variables properly to make it work. - -Add this line under ``[supervisord]`` section in ``/etc/supervisor/supervisord.conf``:: - - [supervisord] - environment=LC_ALL='en_US.UTF-8',LANG='en_US.UTF-8' - -☤ An exception is raised during ``Locking dependencies...`` ------------------------------------------------------------ - -Run ``pipenv lock --clear`` and try again. The lock sequence caches results -to speed up subsequent runs. The cache may contain faulty results if a bug -causes the format to corrupt, even after the bug is fixed. ``--clear`` flushes -the cache, and therefore removes the bad results. diff --git a/docs/requirements.txt b/docs/requirements.txt index e3fd593198..7079f46f1e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -19,5 +19,5 @@ sphinx-click==4.4.0 sphinxcontrib-spelling==7.7.0 sphinxcontrib-websupport==1.2.4 urllib3==1.26.14 -virtualenv==20.20.0 +virtualenv>=20.20.0 virtualenv-clone==0.5.7 diff --git a/pipenv/vendor/click/LICENSE.rst b/pipenv/vendor/click/LICENSE.md similarity index 100% rename from pipenv/vendor/click/LICENSE.rst rename to pipenv/vendor/click/LICENSE.md diff --git a/pipenv/vendor/markupsafe/LICENSE.rst b/pipenv/vendor/markupsafe/LICENSE.md similarity index 100% rename from pipenv/vendor/markupsafe/LICENSE.rst rename to pipenv/vendor/markupsafe/LICENSE.md diff --git a/tests/fixtures/fake-package/README.md b/tests/fixtures/fake-package/README.md new file mode 100644 index 0000000000..4f91c7bbe5 --- /dev/null +++ b/tests/fixtures/fake-package/README.md @@ -0,0 +1 @@ +# fake_package: A fake python package. diff --git a/tests/fixtures/fake-package/README.rst b/tests/fixtures/fake-package/README.rst deleted file mode 100644 index 4256cd1f8e..0000000000 --- a/tests/fixtures/fake-package/README.rst +++ /dev/null @@ -1,3 +0,0 @@ -=============================================================================== -fake_package: A fake python package. -===============================================================================
urllib3__urllib3-708
Error using https and ipv6: InvalidURL("nonnumeric port: '4f7b'",) To reproduce: ``` Python import urllib3 p = urllib3.connection_from_url('https://[2001:0:53aa:64c:104c:2c10:2bef:4f7b]') p.request('GET', '/') ``` produces: ``` Python Traceback (most recent call last): File "/usr/lib/python3.4/http/client.py", line 771, in _set_hostport port = int(host[i+1:]) ValueError: invalid literal for int() with base 10: '4f7b' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 548, in urlopen conn = self._get_conn(timeout=pool_timeout) File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 250, in _get_conn return conn or self._new_conn() File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 770, in _new_conn strict=self.strict, **self.conn_kw) File "/usr/local/lib/python3.4/dist-packages/urllib3/connection.py", line 171, in __init__ timeout=timeout, **kw) File "/usr/local/lib/python3.4/dist-packages/urllib3/connection.py", line 119, in __init__ _HTTPConnection.__init__(self, *args, **kw) File "/usr/lib/python3.4/http/client.py", line 750, in __init__ self._set_hostport(host, port) File "/usr/lib/python3.4/http/client.py", line 776, in _set_hostport raise InvalidURL("nonnumeric port: '%s'" % host[i+1:]) http.client.InvalidURL: nonnumeric port: '4f7b' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.4/dist-packages/urllib3/request.py", line 68, in request **urlopen_kw) File "/usr/local/lib/python3.4/dist-packages/urllib3/request.py", line 89, in request_encode_url return self.urlopen(method, url, **extra_kw) File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 629, in urlopen release_conn=release_conn, **response_kw) File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 629, in urlopen release_conn=release_conn, **response_kw) File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 629, in urlopen release_conn=release_conn, **response_kw) File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 609, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python3.4/dist-packages/urllib3/util/retry.py", line 271, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='2001:0:53aa:64c:104c:2c10:2bef:4f7b', port=None): Max retries exceeded with url: / (Caused by ProtocolError('Connection aborted.', InvalidURL("nonnumeric port: '4f7b'",))) ``` Using `https://[2001:0:53aa:64c:104c:2c10:2bef:4f7b]:443` instead is a workaround.
[ { "content": "import errno\nimport logging\nimport sys\nimport warnings\n\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport socket\n\ntry: # Python 3\n from queue import LifoQueue, Empty, Full\nexcept ImportError:\n from Queue import LifoQueue, Empty, Full\n import Queue as _ ...
[ { "content": "import errno\nimport logging\nimport sys\nimport warnings\n\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport socket\n\ntry: # Python 3\n from queue import LifoQueue, Empty, Full\nexcept ImportError:\n from Queue import LifoQueue, Empty, Full\n import Queue as _ ...
diff --git a/urllib3/connectionpool.py b/urllib3/connectionpool.py index b38ac68d7b..1004511a8e 100644 --- a/urllib3/connectionpool.py +++ b/urllib3/connectionpool.py @@ -68,8 +68,7 @@ def __init__(self, host, port=None): if not host: raise LocationValueError("No host specified.") - # httplib doesn't like it when we include brackets in ipv6 addresses - self.host = host.strip('[]') + self.host = host self.port = port def __str__(self):
cowrie__cowrie-1551
builtins.KeyError: 'log_time' Python error **Describe the bug** Cowrie won't log properly, due that output plugins are not working -> output_splunk Following error occurs: ``` 2021-04-28T07:00:17.796991Z [twisted.logger._observer#critical] Temporarily disabling observer LegacyLogObserverWrapper(<bound method Output.emit of <cowrie.output.virustotal.Output object at 0x7f3a13c9c550>>) due to exception: [Failure instance: Traceback: <class 'KeyError'>: 'log_time' /home/cowrie/cowrie/src/cowrie/ssh/transport.py:246:connectionLost /home/cowrie/cowrie/cowrie-env/lib/python3.8/site-packages/twisted/python/threadable.py:51:sync /home/cowrie/cowrie/cowrie-env/lib/python3.8/site-packages/twisted/python/log.py:281:msg /home/cowrie/cowrie/cowrie-env/lib/python3.8/site-packages/twisted/logger/_legacy.py:147:publishToNewObserver --- <exception caught here> --- /home/cowrie/cowrie/cowrie-env/lib/python3.8/site-packages/twisted/logger/_observer.py:82:__call__ /home/cowrie/cowrie/cowrie-env/lib/python3.8/site-packages/twisted/logger/_legacy.py:55:__call__ ] Traceback (most recent call last): File "/home/cowrie/cowrie/src/cowrie/ssh/transport.py", line 246, in connectionLost log.msg( File "/home/cowrie/cowrie/cowrie-env/lib/python3.8/site-packages/twisted/python/threadable.py", line 51, in sync return function(self, *args, **kwargs) File "/home/cowrie/cowrie/cowrie-env/lib/python3.8/site-packages/twisted/python/log.py", line 281, in msg _publishNew(self._publishPublisher, actualEventDict, textFromEventDict) File "/home/cowrie/cowrie/cowrie-env/lib/python3.8/site-packages/twisted/logger/_legacy.py", line 147, in publishToNewObserver observer(eventDict) --- <exception caught here> --- File "/home/cowrie/cowrie/cowrie-env/lib/python3.8/site-packages/twisted/logger/_observer.py", line 82, in __call__ observer(event) File "/home/cowrie/cowrie/cowrie-env/lib/python3.8/site-packages/twisted/logger/_legacy.py", line 55, in __call__ event["time"] = event["log_time"] builtins.KeyError: 'log_time' ``` **To Reproduce** Steps to reproduce the behavior: 1. git clone cowrie 2. setup venv 3. setup cowrie.cfg 4. include splunk output 5. run cowrie 6. run honeypot session **Expected behavior** Cowrie should properly log. **Server (please complete the following information):** - OS: `Linux cowrie-1 5.4.103-1-pve #1 SMP PVE 5.4.103-1 (Sun, 07 Mar 2021 15:55:09 +0100) x86_64 x86_64 x86_64 GNU/Linux` - Python: Python 3.8.6
[ { "content": "# Copyright (c) 2015 Michel Oosterhof <michel@oosterhof.net>\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the ab...
[ { "content": "# Copyright (c) 2015 Michel Oosterhof <michel@oosterhof.net>\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the ab...
diff --git a/src/cowrie/core/output.py b/src/cowrie/core/output.py index b55dea5f41..7c144aa890 100644 --- a/src/cowrie/core/output.py +++ b/src/cowrie/core/output.py @@ -158,7 +158,7 @@ def emit(self, event: dict) -> None: if "message" not in event and "format" not in event: return - ev: Dict[str, any] = event # type: ignore + ev: Dict[str, any] = event.copy() # type: ignore ev["sensor"] = self.sensor if "isError" in ev:
blakeblackshear__frigate-5031
[Support]: recordings on disk are in -4 timezone (4 hours behind UTC) - 0.12.0-beta2-tensorrt ### Describe the problem you are having All my recordings on 0.12.0-beta2-tensorrt are recording with what appears to be a -4 timezone. I have checked my host and docker config which both display +10 (Australian Eastern Standard time). Everything in the GUI displays in my timezone as expected. ### Version 0.12.0-beta2-tensorrt (0.12.0-0DBF909) ### Frigate config file ```yaml mqtt: host: 192.168.1.150 port: 1883 cameras: garage-cam: ffmpeg: inputs: - path: rtsp://***:****@192.168.1.231:554/h265Preview_01_main roles: - detect detect: width: 3840 # <---- update for your camera's resolution height: 2160 # <---- update for your camera's resolution frontright-cam: ffmpeg: inputs: - path: rtsp://***:****@192.168.1.201:554/h265Preview_01_main roles: - detect detect: width: 3840 # <---- update for your camera's resolution height: 2160 # <---- update for your camera's resolution frontdoor-cam: # motion: # mask: # # top portion of frame (road + harry & joyce driveway) # - 1083,0,0,0,0,197,0,594,108,521,391,368,673,235,893,222,1099,219,1369,213,1560,238,1788,254,2230,305,2709,387,3119,492,3421,565,3840,689,3840,537,3840,0,2595,0,1569,0 ffmpeg: inputs: - path: rtsp://***:****@192.168.1.254:554/h265Preview_01_main roles: - detect detect: width: 3840 # <---- update for your camera's resolution height: 2160 # <---- update for your camera's resolution record: enabled: true retain: days: 7 mode: all snapshots: enabled: true retain: default: 90 birdseye: enabled: true mode: continuous ffmpeg: # input_args: hwaccel_args: preset-nvidia-h265 # output_args: # # -an no audio # # -crf default 28 # # -c:v codec for video # # preset default medium # record: -c:v libx265 -hwaccel hevc_cuvid -vf hwupload -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -an -crf 26 -preset fast -pix_fmt yuv420p10le detectors: tensorrt: type: tensorrt device: 0 #This is the default, select the first GPU model: path: /trt-models/yolov7-tiny-416.trt labelmap_path: /trt-models/coco_91cl.txt input_tensor: nchw input_pixel_format: rgb width: 416 height: 416 ``` ### Relevant log output ```shell - frigate docker container # zdump /etc/localtime /etc/localtime Thu Jan 12 10:58:55 2023 AEST - unraid server root@xxx:~# zdump /etc/localtime /etc/localtime Thu Jan 12 10:59:43 2023 AEST - docker config docker run -d --name='frigate-beta' --net='bridge' --privileged=true -e TZ="Australia/Brisbane" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Thea" -e HOST_CONTAINERNAME="frigate-beta" -e 'FRIGATE_RTSP_PASSWORD'='' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:5000]' -l net.unraid.docker.icon='https://raw.githubusercontent.com/yayitazale/unraid-templates/main/frigate.png' -p '5051:5000/tcp' -p '1935:1935/tcp' -p '505:505/tcp' -v '/mnt/user/appdata/frigate-beta':'/config':'rw' -v '/mnt/user/surveillance/frigate-beta/':'/media/frigate':'rw' -v '/mnt/user/appdata/frigate-beta/trt-models':'/trt-models':'rw' -v '/etc/localtime':'/etc/localtime':'ro' --gpus all --shm-size=256mb --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 --restart unless-stopped 'blakeblackshear/frigate:0.12.0-beta2-tensorrt' f75e5c20040257174b82a719194343839e8af0a33626bebcc17f0d410f1d5437 ``` ### FFprobe output from your camera ```shell N/A ``` ### Frigate stats ```json N/A ``` ### Operating system UNRAID ### Install method Docker Compose ### Coral version CPU (no coral) ### Network connection Wired ### Camera make and model N/A ### Any other information that may be helpful <img width="600" alt="image" src="https://user-images.githubusercontent.com/2231825/211950268-c04b5f85-c1a6-47c7-b653-b148eb71dd26.png"> Here we can see the timestamp of folders (hour 20) in the folder path, and the write time of the local system (hour 10, +10 AEST). UTC time is currently 12.
[ { "content": "import datetime\nimport itertools\nimport logging\nimport multiprocessing as mp\nimport os\nimport queue\nimport random\nimport string\nimport subprocess as sp\nimport threading\nfrom collections import defaultdict\nfrom pathlib import Path\n\nimport psutil\nfrom peewee import JOIN, DoesNotExist\n...
[ { "content": "import datetime\nimport itertools\nimport logging\nimport multiprocessing as mp\nimport os\nimport queue\nimport random\nimport string\nimport subprocess as sp\nimport threading\nfrom collections import defaultdict\nfrom pathlib import Path\n\nimport psutil\nfrom peewee import JOIN, DoesNotExist\n...
diff --git a/frigate/record.py b/frigate/record.py index 53a75a4855..7b112f7f40 100644 --- a/frigate/record.py +++ b/frigate/record.py @@ -278,9 +278,7 @@ def store_segment( directory = os.path.join( RECORD_DIR, - start_time.replace(tzinfo=datetime.timezone.utc) - .astimezone(tz=None) - .strftime("%Y-%m-%d/%H"), + start_time.astimezone(tz=datetime.timezone.utc).strftime("%Y-%m-%d/%H"), camera, )
web2py__web2py-1855
Problem with web2py compilation Hi there Very simple to show this issue: 1. download latest version of web2py (I use Mac OS version for Normal users) 2. From Admin interface compile and pack the 'Welcome' application that comes as standard with web2py 3. Then from the Admin interface upload and install the compiled 'Welcome' application you have just created (calling a different name of course) 4. When you try to run this compiled application you will get an error e.g. Invalid function or similar Kind Regards
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n| This file is part of the web2py Web Framework\n| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>\n| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)\n| Created by Vladyslav Kozlovskyy (Ukraine) <dbdevelop©gmail.com>\n| for...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n| This file is part of the web2py Web Framework\n| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>\n| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)\n| Created by Vladyslav Kozlovskyy (Ukraine) <dbdevelop©gmail.com>\n| for...
diff --git a/gluon/utf8.py b/gluon/utf8.py index 21fd12c4a..34bfa87fe 100644 --- a/gluon/utf8.py +++ b/gluon/utf8.py @@ -11,7 +11,7 @@ ---------------------------------------------- """ from __future__ import print_function -from gluon._compat import builtin as __builtin__, unicodeT, iteritems, to_unicode, to_native +from gluon._compat import builtin as __builtin__, unicodeT, iteritems, to_unicode, to_native, reload __all__ = ['Utf8']
encode__django-rest-framework-9278
_delegate_text was removed in Django 5. ## Checklist - [ ] Raised initially as discussion #... - [x] This cannot be dealt with as a third party library. (We prefer new functionality to be [in the form of third party libraries](https://www.django-rest-framework.org/community/third-party-packages/#about-third-party-packages) where possible.) - [ ] I have reduced the issue to the simplest possible case. https://github.com/encode/django-rest-framework/blob/4c7c693f1555689cda88eb59a4353db69aa6f5b1/rest_framework/utils/representation.py#L30-L31 force_str has a built in parameter called `strings_only`. So the version number should be checked, and then if it is django 5, it should do the following instead of using delegate_text. ```python value = force_str(value, strings_only=True) ```
[ { "content": "\"\"\"\nHelper functions for creating user-friendly representations\nof serializer classes and serializer fields.\n\"\"\"\nimport re\n\nfrom django.db import models\nfrom django.utils.encoding import force_str\nfrom django.utils.functional import Promise\n\n\ndef manager_repr(value):\n model = ...
[ { "content": "\"\"\"\nHelper functions for creating user-friendly representations\nof serializer classes and serializer fields.\n\"\"\"\nimport re\n\nfrom django.db import models\nfrom django.utils.encoding import force_str\nfrom django.utils.functional import Promise\n\n\ndef manager_repr(value):\n model = ...
diff --git a/rest_framework/utils/representation.py b/rest_framework/utils/representation.py index 6f2efee164..b24cc3c759 100644 --- a/rest_framework/utils/representation.py +++ b/rest_framework/utils/representation.py @@ -27,8 +27,8 @@ def smart_repr(value): if isinstance(value, models.Manager): return manager_repr(value) - if isinstance(value, Promise) and value._delegate_text: - value = force_str(value) + if isinstance(value, Promise): + value = force_str(value, strings_only=True) value = repr(value)
networkx__networkx-6478
nx.DiGraph.to_undirected() not working as expected for bidirectional edges when using as_view = True Problem: When using `to_undirected()` on a DiGraph the properties are inconsistent, i.e., differ depending on if as_view was set to True or False. More precisely, the reported degree is not as expected when using `as_view = True`. I guess this might also have an effect on other properties that depend on degree. ### Current Behavior The node degree of the undirected graph returned by `to_undirected()` is different depending on if as_view was set to True or False. If the directed graph had bidirectional edges, the degree is off by approx. a factor of 2 in the graph view. Everything works as expected if as_view is set to false. ### Expected Behavior `G.to_undirected(as_view = False).degree()` and `G.to_undirected(as_view = True).degree()` should behave the same. ### Steps to Reproduce ``` import networkx as nx import sys print(sys.version) # 3.10.8 | packaged by conda-forge | (main, Nov 24 2022, 14:07:00) [MSC v.1916 64 bit (AMD64)] print(nx.__version__) # 2.8.8 G = nx.DiGraph() G.add_nodes_from(["v0","v1","v2"]) G.add_edges_from([("v0","v1"),("v1","v0"),("v1","v2")]) print(G.degree()) # Correct [('v0', 2), ('v1', 3), ('v2', 1)] G_undir_1 = G.to_undirected(as_view = False) print(G_undir_1.degree()) # Correct [('v0', 1), ('v1', 2), ('v2', 1)] G_undir_2 = G.to_undirected(as_view = True) print(G_undir_2.degree()) # Incorrect [('v0', 2), ('v1', 3), ('v2', 1)] ``` ### Environment <!--- Please provide details about your local environment --> Python version: 3.10.8 NetworkX version: 2.8.8 ### Additional context n/a
[ { "content": "\"\"\"Views of core data structures such as nested Mappings (e.g. dict-of-dicts).\nThese ``Views`` often restrict element access, with either the entire view or\nlayers of nested mappings being read-only.\n\"\"\"\nfrom collections.abc import Mapping\n\n__all__ = [\n \"AtlasView\",\n \"Adjace...
[ { "content": "\"\"\"Views of core data structures such as nested Mappings (e.g. dict-of-dicts).\nThese ``Views`` often restrict element access, with either the entire view or\nlayers of nested mappings being read-only.\n\"\"\"\nfrom collections.abc import Mapping\n\n__all__ = [\n \"AtlasView\",\n \"Adjace...
diff --git a/networkx/classes/coreviews.py b/networkx/classes/coreviews.py index c2b835592cf..5c4defe94aa 100644 --- a/networkx/classes/coreviews.py +++ b/networkx/classes/coreviews.py @@ -134,7 +134,7 @@ def __init__(self, succ, pred): self._pred = pred def __len__(self): - return len(self._succ) + len(self._pred) + return len(self._succ.keys() | self._pred.keys()) def __iter__(self): return iter(set(self._succ.keys()) | set(self._pred.keys())) diff --git a/networkx/classes/tests/test_coreviews.py b/networkx/classes/tests/test_coreviews.py index f773b8580c6..07fa5bfa4de 100644 --- a/networkx/classes/tests/test_coreviews.py +++ b/networkx/classes/tests/test_coreviews.py @@ -155,7 +155,7 @@ def test_pickle(self): assert view.__slots__ == pview.__slots__ def test_len(self): - assert len(self.av) == len(self.s) + len(self.p) + assert len(self.av) == len(self.s.keys() | self.p.keys()) == 5 def test_iter(self): assert set(self.av) == set(self.s) | set(self.p) @@ -257,7 +257,7 @@ def setup_method(self): self.adjview = nx.classes.coreviews.UnionMultiInner(self.s, self.p) def test_len(self): - assert len(self.adjview) == len(self.s) + len(self.p) + assert len(self.adjview) == len(self.s.keys() | self.p.keys()) == 4 def test_getitem(self): assert self.adjview[1] is not self.s[1]
vacanza__python-holidays-1420
Add l10n tests Cover at least duplicated entries check. _Originally posted by @arkid15r in https://github.com/vacanza/python-holidays/pull/1416#discussion_r1286008102_
[ { "content": "# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# Authors: dr-prodigy <dr.pro...
[ { "content": "# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# Authors: dr-prodigy <dr.pro...
diff --git a/README.rst b/README.rst index d17c92acd..e0e41ddae 100644 --- a/README.rst +++ b/README.rst @@ -240,7 +240,7 @@ The list of supported countries, their subdivisions and supported languages * - Canada - CA - Provinces and territories: AB, BC, MB, NB, NL, NS, NT, NU, **ON**, PE, QC, SK, YT - - ar, **en**, en_US, fr, th + - ar, **en**, fr, th * - Chad - TD - diff --git a/holidays/countries/canada.py b/holidays/countries/canada.py index 1723f7fff..0f7071c48 100644 --- a/holidays/countries/canada.py +++ b/holidays/countries/canada.py @@ -36,7 +36,7 @@ class Canada(HolidayBase, ChristianHolidays, InternationalHolidays): "SK", "YT", ) - supported_languages = ("ar", "en", "en_US", "fr", "th") + supported_languages = ("ar", "en", "fr", "th") def __init__(self, *args, **kwargs): # Default subdivision to ON; prov for backwards compatibility diff --git a/holidays/locale/en_US/LC_MESSAGES/CA.po b/holidays/locale/en_US/LC_MESSAGES/CA.po deleted file mode 100644 index 12e4c609d..000000000 --- a/holidays/locale/en_US/LC_MESSAGES/CA.po +++ /dev/null @@ -1,140 +0,0 @@ -# Canada holidays en_US localization. -# Authors: Arkadii Yakovets <ark@cho.red>, (c) 2023. -# -msgid "" -msgstr "" -"Project-Id-Version: Python Holidays 0.25\n" -"POT-Creation-Date: 2023-02-15 08:30-0800\n" -"PO-Revision-Date: 2023-02-16 08:52-0800\n" -"Last-Translator: Arkadii Yakovets <ark@cho.red>\n" -"Language-Team: Python Holidays localization team\n" -"Language: en_US\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Lingua 4.15.0\n" -"X-Generator: Poedit 3.2.2\n" - -#. New Year's Day. -msgid "New Year's Day" -msgstr "" - -#, c-format -msgid "%s (Observed)" -msgstr "" - -#. Family Day. -msgid "Family Day" -msgstr "" - -#. Louis Riel Day. -msgid "Louis Riel Day" -msgstr "" - -#. Islander Day. -msgid "Islander Day" -msgstr "" - -#. Heritage Day. -msgid "Heritage Day" -msgstr "" - -#. St. Patrick's Day. -msgid "St. Patrick's Day" -msgstr "" - -#. Good Friday. -msgid "Good Friday" -msgstr "" - -#. Easter Monday. -msgid "Easter Monday" -msgstr "" - -#. St. George's Day. -msgid "St. George's Day" -msgstr "" - -#. Victoria Day. -msgid "Victoria Day" -msgstr "" - -#. National Patriots' Day. -msgid "National Patriots' Day" -msgstr "" - -#. National Aboriginal Day. -msgid "National Aboriginal Day" -msgstr "" - -#. St. Jean Baptiste Day. -msgid "St. Jean Baptiste Day" -msgstr "" - -#. Discovery Day. -msgid "Discovery Day" -msgstr "" - -#. Memorial Day. -msgid "Memorial Day" -msgstr "" - -#. Canada Day. -msgid "Canada Day" -msgstr "" - -#. Dominion Day. -msgid "Dominion Day" -msgstr "" - -#. Nunavut Day. -msgid "Nunavut Day" -msgstr "" - -#. Civic Holiday. -msgid "Civic Holiday" -msgstr "" - -#. British Columbia Day. -msgid "British Columbia Day" -msgstr "" - -#. New Brunswick Day. -msgid "New Brunswick Day" -msgstr "" - -#. Saskatchewan Day. -msgid "Saskatchewan Day" -msgstr "" - -#. Labour Day. -msgid "Labour Day" -msgstr "" - -#. Funeral of Queen Elizabeth II. -msgid "Funeral of Her Majesty the Queen Elizabeth II" -msgstr "" - -#. National Day for Truth and Reconciliation. -msgid "National Day for Truth and Reconciliation" -msgstr "" - -#. Thanksgiving. -msgid "Thanksgiving" -msgstr "" - -#. Remembrance Day. -msgid "Remembrance Day" -msgstr "" - -#. Christmas Day. -msgid "Christmas Day" -msgstr "" - -#. Boxing Day. -msgid "Boxing Day" -msgstr "" - -#. Terry Fox Day. -msgid "Terry Fox Day" -msgstr "" diff --git a/tests/test_l10n.py b/tests/test_l10n.py new file mode 100644 index 000000000..8c053f0f6 --- /dev/null +++ b/tests/test_l10n.py @@ -0,0 +1,68 @@ +# python-holidays +# --------------- +# A fast, efficient Python library for generating country, province and state +# specific sets of holidays on the fly. It aims to make determining whether a +# specific date is a holiday as fast and flexible as possible. +# +# Authors: dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023 +# ryanss <ryanssdev@icloud.com> (c) 2014-2017 +# Website: https://github.com/dr-prodigy/python-holidays +# License: MIT (see LICENSE file) + +import re +import unittest +from pathlib import Path + +from polib import pofile as create_po_file + +import holidays + + +class TestLocalization(unittest.TestCase): + def test_localization(self): + tests_dir = Path(__file__).parent + locale_dir = tests_dir.parent / "holidays" / "locale" + + for po_path in sorted(Path(locale_dir).rglob("*.po")): + try: + po_file = create_po_file(po_path, check_for_duplicates=True) + except ValueError as e: + # Make sure no duplicated entries added. + match = re.match(r"Entry (.*) already exists", str(e)) + self.assertEqual( + 0, + len(match.groups()), + f"Entry `{match.group(1)}` already exists in {po_path}. " + "Please remove the duplicate.", + ) + + raise e + + # Collect `<country_code>` part from + # holidays/locale/<locale>/LC_MESSAGES/<country_code>.po. + entity_code = po_path.stem + # Collect `<locale>` part from + # holidays/locale/<locale>/LC_MESSAGES/<country_code>.po. + language = po_path.parts[-3] + + entity = getattr(holidays, entity_code) + + # Skip original language files. + if entity.default_language == language: + continue + + # Make sure no entries left unlocalized. + coverage = po_file.percent_translated() + self.assertEqual( + 100, + coverage, + f"The {entity_code} {language} localization is incomplete ({coverage}% < 100%)", + ) + + # Make sure no obsolete entries left. + obsolete_entries = po_file.obsolete_entries() + self.assertFalse( + obsolete_entries, + f"The {entity_code} {language} localization contains obsolete entries: " + f"{', '.join((oe.msgid for oe in obsolete_entries))}", + )
pre-commit__pre-commit-2740
/dev/null not found with pre-commit 3.0.2 ### search you tried in the issue tracker /dev/null ### describe your issue After upgrading to pre-commit 3.0.2, one of my users (on up-to-date macos) is reporting that invoking ruby actions fails with `/dev/null` not found. Relevant output: ``` rubocop..................................................................Failed - hook id: rubocop - exit code: 2 /dev/null not found /Users/user/.rvm/rubies/ruby-3.1.3/lib/ruby/3.1.0/bundler/definition.rb:36:in `build' /Users/user/.rvm/rubies/ruby-3.1.3/lib/ruby/3.1.0/bundler.rb:207:in `definition' /Users/user/.rvm/rubies/ruby-3.1.3/lib/ruby/3.1.0/bundler.rb:190:in `load' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/config_loader_resolver.rb:270:in `gem_config_path' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/config_loader_resolver.rb:65:in `block (2 levels) in resolve_inheritance_from_gems' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/config_loader_resolver.rb:63:in `reverse_each' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/config_loader_resolver.rb:63:in `block in resolve_inheritance_from_gems' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/config_loader_resolver.rb:57:in `each_pair' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/config_loader_resolver.rb:57:in `resolve_inheritance_from_gems' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/config_loader.rb:49:in `load_file' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/config_loader.rb:104:in `configuration_from_file' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/config_store.rb:68:in `for_dir' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/config_store.rb:47:in `for_pwd' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/cli.rb:147:in `apply_default_formatter' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/lib/rubocop/cli.rb:47:in `run' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/exe/rubocop:19:in `block in <top (required)>' /Users/user/.rvm/rubies/ruby-3.1.3/lib/ruby/3.1.0/benchmark.rb:311:in `realtime' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/gems/rubocop-1.42.0/exe/rubocop:19:in `<top (required)>' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/bin/rubocop:25:in `load' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/bin/rubocop:25:in `<main>' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/bin/ruby_executable_hooks:22:in `eval' /Users/user/.cache/pre-commit/repojquw8lys/rbenv-default/gems/bin/ruby_executable_hooks:22:in `<main>' ``` This looks closely related to #2727. For what it's worth, I did confirm that the user actually has a working `/dev/null` on their system. ### pre-commit --version pre-commit 3.0.2 ### .pre-commit-config.yaml ```yaml repos: - repo: https://github.com/rubocop/rubocop.git rev: '0f7416a0b3ea4a3d4edb1f2091ce8706ea3e6640' hooks: - id: rubocop additional_dependencies: ["standard:1.22.1"] ``` ### ~/.cache/pre-commit/pre-commit.log (if present) _No response_
[ { "content": "from __future__ import annotations\n\nimport contextlib\nimport functools\nimport os.path\nimport shutil\nimport tarfile\nfrom typing import Generator\nfrom typing import Sequence\n\nimport pre_commit.constants as C\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import P...
[ { "content": "from __future__ import annotations\n\nimport contextlib\nimport functools\nimport os.path\nimport shutil\nimport tarfile\nfrom typing import Generator\nfrom typing import Sequence\n\nimport pre_commit.constants as C\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import P...
diff --git a/pre_commit/languages/ruby.py b/pre_commit/languages/ruby.py index b4d4b45af..4416f7280 100644 --- a/pre_commit/languages/ruby.py +++ b/pre_commit/languages/ruby.py @@ -39,7 +39,6 @@ def get_env_patch( ('GEM_HOME', os.path.join(venv, 'gems')), ('GEM_PATH', UNSET), ('BUNDLE_IGNORE_CONFIG', '1'), - ('BUNDLE_GEMFILE', os.devnull), ) if language_version == 'system': patches += ( diff --git a/tests/languages/ruby_test.py b/tests/languages/ruby_test.py index b312c7fda..9cfaad5d0 100644 --- a/tests/languages/ruby_test.py +++ b/tests/languages/ruby_test.py @@ -123,8 +123,9 @@ def test_ruby_hook_language_version(tmp_path): def test_ruby_with_bundle_disable_shared_gems(tmp_path): workdir = tmp_path.joinpath('workdir') workdir.mkdir() - # this Gemfile is missing `source` - workdir.joinpath('Gemfile').write_text('gem "lol_hai"\n') + # this needs a `source` or there's a deprecation warning + # silencing this with `BUNDLE_GEMFILE` breaks some tools (#2739) + workdir.joinpath('Gemfile').write_text('source ""\ngem "lol_hai"\n') # this bundle config causes things to be written elsewhere bundle = workdir.joinpath('.bundle') bundle.mkdir() @@ -134,5 +135,5 @@ def test_ruby_with_bundle_disable_shared_gems(tmp_path): ) with cwd(workdir): - # `3.2.0` has new enough `gem` requiring `source` and reading `.bundle` + # `3.2.0` has new enough `gem` reading `.bundle` test_ruby_hook_language_version(tmp_path)
scrapy__scrapy-2337
Add a sample middleware to startproject's template It will be nice to have a middleware template inside the template project to serve as an example for people that want to use it.
[ { "content": "from __future__ import print_function\nimport re\nimport os\nimport string\nfrom importlib import import_module\nfrom os.path import join, exists, abspath\nfrom shutil import ignore_patterns, move, copy2, copystat\n\nimport scrapy\nfrom scrapy.commands import ScrapyCommand\nfrom scrapy.utils.templ...
[ { "content": "from __future__ import print_function\nimport re\nimport os\nimport string\nfrom importlib import import_module\nfrom os.path import join, exists, abspath\nfrom shutil import ignore_patterns, move, copy2, copystat\n\nimport scrapy\nfrom scrapy.commands import ScrapyCommand\nfrom scrapy.utils.templ...
diff --git a/scrapy/commands/startproject.py b/scrapy/commands/startproject.py index e3989baafd6..5941066326a 100644 --- a/scrapy/commands/startproject.py +++ b/scrapy/commands/startproject.py @@ -17,6 +17,7 @@ ('${project_name}', 'settings.py.tmpl'), ('${project_name}', 'items.py.tmpl'), ('${project_name}', 'pipelines.py.tmpl'), + ('${project_name}', 'middlewares.py.tmpl'), ) IGNORE = ignore_patterns('*.pyc', '.svn') diff --git a/scrapy/templates/project/module/middlewares.py.tmpl b/scrapy/templates/project/module/middlewares.py.tmpl new file mode 100644 index 00000000000..42318fec214 --- /dev/null +++ b/scrapy/templates/project/module/middlewares.py.tmpl @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- + +# Define here the models for your spider middleware +# +# See documentation in: +# http://doc.scrapy.org/en/latest/topics/spider-middleware.html + +from scrapy import signals + + +class ${ProjectName}SpiderMiddleware(object): + # Not all methods need to be defined. If a method is not defined, + # scrapy acts as if the spider middleware does not modify the + # passed objects. + + @classmethod + def from_crawler(cls, crawler): + # This method is used by Scrapy to create your spiders. + s = cls() + crawler.signals.connect(s.spider_opened, signal=signals.spider_opened) + return s + + def process_spider_input(response, spider): + # Called for each response that goes through the spider + # middleware and into the spider. + + # Should return None or raise an exception. + return None + + def process_spider_output(response, result, spider): + # Called with the results returned from the Spider, after + # it has processed the response. + + # Must return an iterable of Request, dict or Item objects. + for i in result: + yield i + + def process_spider_exception(response, exception, spider): + # Called when a spider or process_spider_input() method + # (from other spider middleware) raises an exception. + + # Should return either None or an iterable of Response, dict + # or Item objects. + pass + + def process_start_requests(start_requests, spider): + # Called with the start requests of the spider, and works + # similarly to the process_spider_output() method, except + # that it doesn’t have a response associated. + + # Must return only requests (not items). + for r in start_requests: + yield r + + def spider_opened(self, spider): + spider.logger.info('Spider opened: %s' % spider.name) diff --git a/scrapy/templates/project/module/settings.py.tmpl b/scrapy/templates/project/module/settings.py.tmpl index f13e8587106..72f25ebefea 100644 --- a/scrapy/templates/project/module/settings.py.tmpl +++ b/scrapy/templates/project/module/settings.py.tmpl @@ -47,7 +47,7 @@ ROBOTSTXT_OBEY = True # Enable or disable spider middlewares # See http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html #SPIDER_MIDDLEWARES = { -# '$project_name.middlewares.MyCustomSpiderMiddleware': 543, +# '$project_name.middlewares.${ProjectName}SpiderMiddleware': 543, #} # Enable or disable downloader middlewares
jazzband__django-oauth-toolkit-1088
Write a test for cleartokens management command **Is your feature request related to a problem? Please describe.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> Code coverage of the cleartokens management command has been 0% since it was created in 2015. **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> Write a test for the cleartokens command. **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> It's not core functionality so could continue to have 0% coverage but it would be nice to add. **Additional context** <!-- Add any other context or screenshots about the feature request here. --> See also #969
[ { "content": "from django.core.management.base import BaseCommand\n\nfrom ...models import clear_expired\n\n\nclass Command(BaseCommand):\n help = \"Can be run as a cronjob or directly to clean out expired tokens\"\n\n def handle(self, *args, **options):\n clear_expired()\n", "path": "oauth2_pr...
[ { "content": "from django.core.management.base import BaseCommand\n\nfrom ...models import clear_expired\n\n\nclass Command(BaseCommand): # pragma: no cover\n help = \"Can be run as a cronjob or directly to clean out expired tokens\"\n\n def handle(self, *args, **options):\n clear_expired()\n", ...
diff --git a/oauth2_provider/management/commands/cleartokens.py b/oauth2_provider/management/commands/cleartokens.py index 3fb1827f6..9d58361bc 100644 --- a/oauth2_provider/management/commands/cleartokens.py +++ b/oauth2_provider/management/commands/cleartokens.py @@ -3,7 +3,7 @@ from ...models import clear_expired -class Command(BaseCommand): +class Command(BaseCommand): # pragma: no cover help = "Can be run as a cronjob or directly to clean out expired tokens" def handle(self, *args, **options): diff --git a/tests/test_models.py b/tests/test_models.py index 7b37486ca..9ce1e5eb7 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,3 +1,5 @@ +from datetime import timedelta + import pytest from django.contrib.auth import get_user_model from django.core.exceptions import ImproperlyConfigured, ValidationError @@ -294,7 +296,11 @@ def test_str(self): class TestClearExpired(BaseTestModels): def setUp(self): super().setUp() - # Insert two tokens on database. + # Insert many tokens, both expired and not, and grants. + self.num_tokens = 100 + now = timezone.now() + earlier = now - timedelta(seconds=100) + later = now + timedelta(seconds=100) app = Application.objects.create( name="test_app", redirect_uris="http://localhost http://example.com http://example.org", @@ -302,23 +308,54 @@ def setUp(self): client_type=Application.CLIENT_CONFIDENTIAL, authorization_grant_type=Application.GRANT_AUTHORIZATION_CODE, ) - AccessToken.objects.create( - token="555", - expires=timezone.now(), - scope=2, - application=app, - user=self.user, - created=timezone.now(), - updated=timezone.now(), + # make 200 access tokens, half current and half expired. + expired_access_tokens = AccessToken.objects.bulk_create( + AccessToken(token="expired AccessToken {}".format(i), expires=earlier) + for i in range(self.num_tokens) ) - AccessToken.objects.create( - token="666", - expires=timezone.now(), - scope=2, - application=app, - user=self.user, - created=timezone.now(), - updated=timezone.now(), + current_access_tokens = AccessToken.objects.bulk_create( + AccessToken(token=f"current AccessToken {i}", expires=later) for i in range(self.num_tokens) + ) + # Give the first half of the access tokens a refresh token, + # alternating between current and expired ones. + RefreshToken.objects.bulk_create( + RefreshToken( + token=f"expired AT's refresh token {i}", + application=app, + access_token=expired_access_tokens[i].pk, + user=self.user, + ) + for i in range(0, len(expired_access_tokens) // 2, 2) + ) + RefreshToken.objects.bulk_create( + RefreshToken( + token=f"current AT's refresh token {i}", + application=app, + access_token=current_access_tokens[i].pk, + user=self.user, + ) + for i in range(1, len(current_access_tokens) // 2, 2) + ) + # Make some grants, half of which are expired. + Grant.objects.bulk_create( + Grant( + user=self.user, + code=f"old grant code {i}", + application=app, + expires=earlier, + redirect_uri="https://localhost/redirect", + ) + for i in range(self.num_tokens) + ) + Grant.objects.bulk_create( + Grant( + user=self.user, + code=f"new grant code {i}", + application=app, + expires=later, + redirect_uri="https://localhost/redirect", + ) + for i in range(self.num_tokens) ) def test_clear_expired_tokens(self): @@ -333,15 +370,21 @@ def test_clear_expired_tokens_incorect_timetype(self): assert result == "ImproperlyConfigured" def test_clear_expired_tokens_with_tokens(self): - self.client.login(username="test_user", password="123456") - self.oauth2_settings.REFRESH_TOKEN_EXPIRE_SECONDS = 0 - ttokens = AccessToken.objects.count() - expiredt = AccessToken.objects.filter(expires__lte=timezone.now()).count() - assert ttokens == 2 - assert expiredt == 2 + self.oauth2_settings.CLEAR_EXPIRED_TOKENS_BATCH_SIZE = 10 + self.oauth2_settings.CLEAR_EXPIRED_TOKENS_BATCH_INTERVAL = 0.0 + at_count = AccessToken.objects.count() + assert at_count == 2 * self.num_tokens, f"{2 * self.num_tokens} access tokens should exist." + rt_count = RefreshToken.objects.count() + assert rt_count == self.num_tokens // 2, f"{self.num_tokens // 2} refresh tokens should exist." + gt_count = Grant.objects.count() + assert gt_count == self.num_tokens * 2, f"{self.num_tokens * 2} grants should exist." clear_expired() - expiredt = AccessToken.objects.filter(expires__lte=timezone.now()).count() - assert expiredt == 0 + at_count = AccessToken.objects.count() + assert at_count == self.num_tokens, "Half the access tokens should not have been deleted." + rt_count = RefreshToken.objects.count() + assert rt_count == self.num_tokens // 2, "Half of the refresh tokens should have been deleted." + gt_count = Grant.objects.count() + assert gt_count == self.num_tokens, "Half the grants should have been deleted." @pytest.mark.django_db
kivy__kivy-2755
Please distribute pxd files, expose c apis. I'm writing some kivy extension code, and i want to cimport kivy's extension types, which is more efficient than python api, but kivy don't distribute pxd files to installation directory. I can set PYTHONPATH to kivy's source directory, and ship cython compiled c file with my library, but it would be better if kivy distribute pxd files with it.
[ { "content": "#\n# Kivy - Crossplatform NUI toolkit\n# http://kivy.org/\n#\n\nimport sys\n\nfrom copy import deepcopy\nimport os\nfrom os.path import join, dirname, sep, exists, basename\nfrom os import walk, environ\nfrom distutils.core import setup\nfrom distutils.extension import Extension\nfrom collections ...
[ { "content": "#\n# Kivy - Crossplatform NUI toolkit\n# http://kivy.org/\n#\n\nimport sys\n\nfrom copy import deepcopy\nimport os\nfrom os.path import join, dirname, sep, exists, basename\nfrom os import walk, environ\nfrom distutils.core import setup\nfrom distutils.extension import Extension\nfrom collections ...
diff --git a/setup.py b/setup.py index 2b7378b4de..f01c59ad5e 100644 --- a/setup.py +++ b/setup.py @@ -727,6 +727,10 @@ def get_extensions_from_sources(sources): 'kivy.uix', ], package_dir={'kivy': 'kivy'}, package_data={'kivy': [ + '*.pxd', + 'core/text/*.pxd', + 'graphics/*.pxd', + 'lib/vidcore_lite/*.pxd', 'data/*.kv', 'data/*.json', 'data/fonts/*.ttf',
google__TensorNetwork-608
Some doc links to github yield error The "Edit on GitHub" links in the top right of some doc pages yield 404 errors when followed, for example [tn.Node](https://tensornetwork.readthedocs.io/en/latest/stubs/tensornetwork.Node.html) and [tn.contractors.optimal](https://tensornetwork.readthedocs.io/en/latest/stubs/tensornetwork.contractors.optimal.html#tensornetwork.contractors.optimal). The links at the top of list pages work, for example [common functions](https://tensornetwork.readthedocs.io/en/latest/network.html) and [contractors](https://tensornetwork.readthedocs.io/en/latest/contractors.html). Possibly those are meant to be links to edit the doc pages themselves, rather than the source code?
[ { "content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------...
[ { "content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------...
diff --git a/.gitignore b/.gitignore index 87f2d2db9..f9b513626 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,6 @@ var/ .installed.cfg *.egg docs/clean -docs/stubs # Installer logs pip-log.txt diff --git a/docs/conf.py b/docs/conf.py index 9fa35a0bf..b3b093c60 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -43,6 +43,7 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] autosummary_generate = True +autosummary_generate_overwrite = False napolean_use_rtype = False # -- Options for HTML output ------------------------------------------------- diff --git a/docs/stubs/tensornetwork.BaseCharge.rst b/docs/stubs/tensornetwork.BaseCharge.rst new file mode 100644 index 000000000..bb1be043b --- /dev/null +++ b/docs/stubs/tensornetwork.BaseCharge.rst @@ -0,0 +1,46 @@ +tensornetwork.BaseCharge +======================== + +.. currentmodule:: tensornetwork + +.. autoclass:: BaseCharge + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~BaseCharge.__init__ + ~BaseCharge.copy + ~BaseCharge.dual + ~BaseCharge.dual_charges + ~BaseCharge.fuse + ~BaseCharge.identity_charge + ~BaseCharge.intersect + ~BaseCharge.isin + ~BaseCharge.random + ~BaseCharge.reduce + ~BaseCharge.sort_unique_charges + ~BaseCharge.unique + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~BaseCharge.charges + ~BaseCharge.degeneracies + ~BaseCharge.dim + ~BaseCharge.dtype + ~BaseCharge.identity_charges + ~BaseCharge.label_dtype + ~BaseCharge.num_symmetries + ~BaseCharge.num_unique + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.BaseNode.rst b/docs/stubs/tensornetwork.BaseNode.rst new file mode 100644 index 000000000..2ec91a19a --- /dev/null +++ b/docs/stubs/tensornetwork.BaseNode.rst @@ -0,0 +1,54 @@ +tensornetwork.BaseNode +====================== + +.. currentmodule:: tensornetwork + +.. autoclass:: BaseNode + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~BaseNode.__init__ + ~BaseNode.add_axis_names + ~BaseNode.add_edge + ~BaseNode.copy + ~BaseNode.disable + ~BaseNode.fresh_edges + ~BaseNode.get_all_dangling + ~BaseNode.get_all_edges + ~BaseNode.get_all_nondangling + ~BaseNode.get_axis_number + ~BaseNode.get_dimension + ~BaseNode.get_edge + ~BaseNode.get_rank + ~BaseNode.get_tensor + ~BaseNode.has_dangling_edge + ~BaseNode.has_nondangling_edge + ~BaseNode.reorder_axes + ~BaseNode.reorder_edges + ~BaseNode.set_name + ~BaseNode.set_tensor + ~BaseNode.tensor_from_edge_order + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~BaseNode.axis_names + ~BaseNode.dtype + ~BaseNode.edges + ~BaseNode.name + ~BaseNode.shape + ~BaseNode.sparse_shape + ~BaseNode.tensor + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.BlockSparseTensor.rst b/docs/stubs/tensornetwork.BlockSparseTensor.rst new file mode 100644 index 000000000..f47814553 --- /dev/null +++ b/docs/stubs/tensornetwork.BlockSparseTensor.rst @@ -0,0 +1,48 @@ +tensornetwork.BlockSparseTensor +=============================== + +.. currentmodule:: tensornetwork + +.. autoclass:: BlockSparseTensor + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~BlockSparseTensor.__init__ + ~BlockSparseTensor.conj + ~BlockSparseTensor.copy + ~BlockSparseTensor.fromdense + ~BlockSparseTensor.ones + ~BlockSparseTensor.randn + ~BlockSparseTensor.random + ~BlockSparseTensor.reshape + ~BlockSparseTensor.todense + ~BlockSparseTensor.transpose + ~BlockSparseTensor.transpose_data + ~BlockSparseTensor.zeros + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~BlockSparseTensor.T + ~BlockSparseTensor.charges + ~BlockSparseTensor.dtype + ~BlockSparseTensor.flat_charges + ~BlockSparseTensor.flat_flows + ~BlockSparseTensor.flat_order + ~BlockSparseTensor.flows + ~BlockSparseTensor.ndim + ~BlockSparseTensor.shape + ~BlockSparseTensor.sparse_shape + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.ChargeArray.rst b/docs/stubs/tensornetwork.ChargeArray.rst new file mode 100644 index 000000000..4dad95d54 --- /dev/null +++ b/docs/stubs/tensornetwork.ChargeArray.rst @@ -0,0 +1,43 @@ +tensornetwork.ChargeArray +========================= + +.. currentmodule:: tensornetwork + +.. autoclass:: ChargeArray + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~ChargeArray.__init__ + ~ChargeArray.conj + ~ChargeArray.random + ~ChargeArray.reshape + ~ChargeArray.todense + ~ChargeArray.transpose + ~ChargeArray.transpose_data + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~ChargeArray.T + ~ChargeArray.charges + ~ChargeArray.dtype + ~ChargeArray.flat_charges + ~ChargeArray.flat_flows + ~ChargeArray.flat_order + ~ChargeArray.flows + ~ChargeArray.ndim + ~ChargeArray.shape + ~ChargeArray.sparse_shape + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.CopyNode.rst b/docs/stubs/tensornetwork.CopyNode.rst new file mode 100644 index 000000000..445c64ed0 --- /dev/null +++ b/docs/stubs/tensornetwork.CopyNode.rst @@ -0,0 +1,57 @@ +tensornetwork.CopyNode +====================== + +.. currentmodule:: tensornetwork + +.. autoclass:: CopyNode + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~CopyNode.__init__ + ~CopyNode.add_axis_names + ~CopyNode.add_edge + ~CopyNode.compute_contracted_tensor + ~CopyNode.copy + ~CopyNode.disable + ~CopyNode.fresh_edges + ~CopyNode.get_all_dangling + ~CopyNode.get_all_edges + ~CopyNode.get_all_nondangling + ~CopyNode.get_axis_number + ~CopyNode.get_dimension + ~CopyNode.get_edge + ~CopyNode.get_partners + ~CopyNode.get_rank + ~CopyNode.get_tensor + ~CopyNode.has_dangling_edge + ~CopyNode.has_nondangling_edge + ~CopyNode.make_copy_tensor + ~CopyNode.reorder_axes + ~CopyNode.reorder_edges + ~CopyNode.set_name + ~CopyNode.set_tensor + ~CopyNode.tensor_from_edge_order + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~CopyNode.axis_names + ~CopyNode.dtype + ~CopyNode.edges + ~CopyNode.name + ~CopyNode.shape + ~CopyNode.sparse_shape + ~CopyNode.tensor + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.Edge.rst b/docs/stubs/tensornetwork.Edge.rst new file mode 100644 index 000000000..414559266 --- /dev/null +++ b/docs/stubs/tensornetwork.Edge.rst @@ -0,0 +1,41 @@ +tensornetwork.Edge +================== + +.. currentmodule:: tensornetwork + +.. autoclass:: Edge + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~Edge.__init__ + ~Edge.disable + ~Edge.disconnect + ~Edge.get_nodes + ~Edge.is_being_used + ~Edge.is_dangling + ~Edge.is_trace + ~Edge.set_name + ~Edge.update_axis + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~Edge.axis1 + ~Edge.axis2 + ~Edge.dimension + ~Edge.name + ~Edge.node1 + ~Edge.node2 + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.FiniteMPS.rst b/docs/stubs/tensornetwork.FiniteMPS.rst new file mode 100644 index 000000000..98b173d46 --- /dev/null +++ b/docs/stubs/tensornetwork.FiniteMPS.rst @@ -0,0 +1,44 @@ +tensornetwork.FiniteMPS +======================= + +.. currentmodule:: tensornetwork + +.. autoclass:: FiniteMPS + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~FiniteMPS.__init__ + ~FiniteMPS.apply_one_site_gate + ~FiniteMPS.apply_transfer_operator + ~FiniteMPS.apply_two_site_gate + ~FiniteMPS.canonicalize + ~FiniteMPS.check_canonical + ~FiniteMPS.check_orthonormality + ~FiniteMPS.get_tensor + ~FiniteMPS.left_envs + ~FiniteMPS.measure_local_operator + ~FiniteMPS.measure_two_body_correlator + ~FiniteMPS.position + ~FiniteMPS.random + ~FiniteMPS.right_envs + ~FiniteMPS.save + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~FiniteMPS.bond_dimensions + ~FiniteMPS.dtype + ~FiniteMPS.physical_dimensions + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.Index.rst b/docs/stubs/tensornetwork.Index.rst new file mode 100644 index 000000000..e8abc8bfd --- /dev/null +++ b/docs/stubs/tensornetwork.Index.rst @@ -0,0 +1,33 @@ +tensornetwork.Index +=================== + +.. currentmodule:: tensornetwork + +.. autoclass:: Index + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~Index.__init__ + ~Index.copy + ~Index.flip_flow + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~Index.charges + ~Index.dim + ~Index.flat_charges + ~Index.flat_flows + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.InfiniteMPS.rst b/docs/stubs/tensornetwork.InfiniteMPS.rst new file mode 100644 index 000000000..98b0b8f58 --- /dev/null +++ b/docs/stubs/tensornetwork.InfiniteMPS.rst @@ -0,0 +1,46 @@ +tensornetwork.InfiniteMPS +========================= + +.. currentmodule:: tensornetwork + +.. autoclass:: InfiniteMPS + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~InfiniteMPS.__init__ + ~InfiniteMPS.apply_one_site_gate + ~InfiniteMPS.apply_transfer_operator + ~InfiniteMPS.apply_two_site_gate + ~InfiniteMPS.canonicalize + ~InfiniteMPS.check_canonical + ~InfiniteMPS.check_orthonormality + ~InfiniteMPS.get_tensor + ~InfiniteMPS.left_envs + ~InfiniteMPS.measure_local_operator + ~InfiniteMPS.measure_two_body_correlator + ~InfiniteMPS.position + ~InfiniteMPS.random + ~InfiniteMPS.right_envs + ~InfiniteMPS.save + ~InfiniteMPS.transfer_matrix_eigs + ~InfiniteMPS.unit_cell_transfer_operator + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~InfiniteMPS.bond_dimensions + ~InfiniteMPS.dtype + ~InfiniteMPS.physical_dimensions + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.Node.rst b/docs/stubs/tensornetwork.Node.rst new file mode 100644 index 000000000..c23e6368b --- /dev/null +++ b/docs/stubs/tensornetwork.Node.rst @@ -0,0 +1,55 @@ +tensornetwork.Node +================== + +.. currentmodule:: tensornetwork + +.. autoclass:: Node + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~Node.__init__ + ~Node.add_axis_names + ~Node.add_edge + ~Node.copy + ~Node.disable + ~Node.fresh_edges + ~Node.get_all_dangling + ~Node.get_all_edges + ~Node.get_all_nondangling + ~Node.get_axis_number + ~Node.get_dimension + ~Node.get_edge + ~Node.get_rank + ~Node.get_tensor + ~Node.has_dangling_edge + ~Node.has_nondangling_edge + ~Node.op_protection + ~Node.reorder_axes + ~Node.reorder_edges + ~Node.set_name + ~Node.set_tensor + ~Node.tensor_from_edge_order + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~Node.axis_names + ~Node.dtype + ~Node.edges + ~Node.name + ~Node.shape + ~Node.sparse_shape + ~Node.tensor + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.NodeCollection.rst b/docs/stubs/tensornetwork.NodeCollection.rst new file mode 100644 index 000000000..ca83f4336 --- /dev/null +++ b/docs/stubs/tensornetwork.NodeCollection.rst @@ -0,0 +1,23 @@ +tensornetwork.NodeCollection +============================ + +.. currentmodule:: tensornetwork + +.. autoclass:: NodeCollection + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~NodeCollection.__init__ + ~NodeCollection.add + + + + + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.U1Charge.rst b/docs/stubs/tensornetwork.U1Charge.rst new file mode 100644 index 000000000..52c614402 --- /dev/null +++ b/docs/stubs/tensornetwork.U1Charge.rst @@ -0,0 +1,46 @@ +tensornetwork.U1Charge +====================== + +.. currentmodule:: tensornetwork + +.. autoclass:: U1Charge + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~U1Charge.__init__ + ~U1Charge.copy + ~U1Charge.dual + ~U1Charge.dual_charges + ~U1Charge.fuse + ~U1Charge.identity_charge + ~U1Charge.intersect + ~U1Charge.isin + ~U1Charge.random + ~U1Charge.reduce + ~U1Charge.sort_unique_charges + ~U1Charge.unique + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~U1Charge.charges + ~U1Charge.degeneracies + ~U1Charge.dim + ~U1Charge.dtype + ~U1Charge.identity_charges + ~U1Charge.label_dtype + ~U1Charge.num_symmetries + ~U1Charge.num_unique + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.Z2Charge.rst b/docs/stubs/tensornetwork.Z2Charge.rst new file mode 100644 index 000000000..1ae534f76 --- /dev/null +++ b/docs/stubs/tensornetwork.Z2Charge.rst @@ -0,0 +1,46 @@ +tensornetwork.Z2Charge +====================== + +.. currentmodule:: tensornetwork + +.. autoclass:: Z2Charge + + + .. automethod:: __init__ + + + .. rubric:: Methods + + .. autosummary:: + + ~Z2Charge.__init__ + ~Z2Charge.copy + ~Z2Charge.dual + ~Z2Charge.dual_charges + ~Z2Charge.fuse + ~Z2Charge.identity_charge + ~Z2Charge.intersect + ~Z2Charge.isin + ~Z2Charge.random + ~Z2Charge.reduce + ~Z2Charge.sort_unique_charges + ~Z2Charge.unique + + + + + + .. rubric:: Attributes + + .. autosummary:: + + ~Z2Charge.charges + ~Z2Charge.degeneracies + ~Z2Charge.dim + ~Z2Charge.dtype + ~Z2Charge.identity_charges + ~Z2Charge.label_dtype + ~Z2Charge.num_symmetries + ~Z2Charge.num_unique + + \ No newline at end of file diff --git a/docs/stubs/tensornetwork.ZNCharge.rst b/docs/stubs/tensornetwork.ZNCharge.rst new file mode 100644 index 000000000..9ab3d484c --- /dev/null +++ b/docs/stubs/tensornetwork.ZNCharge.rst @@ -0,0 +1,6 @@ +tensornetwork.ZNCharge +====================== + +.. currentmodule:: tensornetwork + +.. autofunction:: ZNCharge \ No newline at end of file diff --git a/docs/stubs/tensornetwork.contractors.auto.rst b/docs/stubs/tensornetwork.contractors.auto.rst new file mode 100644 index 000000000..318d50664 --- /dev/null +++ b/docs/stubs/tensornetwork.contractors.auto.rst @@ -0,0 +1,6 @@ +tensornetwork.contractors.auto +============================== + +.. currentmodule:: tensornetwork.contractors + +.. autofunction:: auto \ No newline at end of file diff --git a/docs/stubs/tensornetwork.contractors.branch.rst b/docs/stubs/tensornetwork.contractors.branch.rst new file mode 100644 index 000000000..fab475ce5 --- /dev/null +++ b/docs/stubs/tensornetwork.contractors.branch.rst @@ -0,0 +1,6 @@ +tensornetwork.contractors.branch +================================ + +.. currentmodule:: tensornetwork.contractors + +.. autofunction:: branch \ No newline at end of file diff --git a/docs/stubs/tensornetwork.contractors.bucket.rst b/docs/stubs/tensornetwork.contractors.bucket.rst new file mode 100644 index 000000000..a6c220ea9 --- /dev/null +++ b/docs/stubs/tensornetwork.contractors.bucket.rst @@ -0,0 +1,6 @@ +tensornetwork.contractors.bucket +================================ + +.. currentmodule:: tensornetwork.contractors + +.. autofunction:: bucket \ No newline at end of file diff --git a/docs/stubs/tensornetwork.contractors.custom.rst b/docs/stubs/tensornetwork.contractors.custom.rst new file mode 100644 index 000000000..96ec1952b --- /dev/null +++ b/docs/stubs/tensornetwork.contractors.custom.rst @@ -0,0 +1,6 @@ +tensornetwork.contractors.custom +================================ + +.. currentmodule:: tensornetwork.contractors + +.. autofunction:: custom \ No newline at end of file diff --git a/docs/stubs/tensornetwork.contractors.greedy.rst b/docs/stubs/tensornetwork.contractors.greedy.rst new file mode 100644 index 000000000..396a55624 --- /dev/null +++ b/docs/stubs/tensornetwork.contractors.greedy.rst @@ -0,0 +1,6 @@ +tensornetwork.contractors.greedy +================================ + +.. currentmodule:: tensornetwork.contractors + +.. autofunction:: greedy \ No newline at end of file diff --git a/docs/stubs/tensornetwork.contractors.optimal.rst b/docs/stubs/tensornetwork.contractors.optimal.rst new file mode 100644 index 000000000..3a6e49e7a --- /dev/null +++ b/docs/stubs/tensornetwork.contractors.optimal.rst @@ -0,0 +1,6 @@ +tensornetwork.contractors.optimal +================================= + +.. currentmodule:: tensornetwork.contractors + +.. autofunction:: optimal \ No newline at end of file
vaexio__vaex-1091
[BUG-REPORT] Can't Replace Values in Vaex 4.0.0a4 **Description** Upgrading from previous versions (I cloned the master branch a few weeks ago and installed), I am no longer able to replace values in a dataframe. See below for an example and the traceback. **Software information** - Vaex version (`import vaex; vaex.__version__)`: 'vaex': '4.0.0a4', 'vaex-core': '4.0.0a9', 'vaex-viz': '0.5.0.dev1', 'vaex-hdf5': '0.7.0a4', 'vaex-server': '0.4.0.dev1', 'vaex-astro': '0.8.0.dev1', 'vaex-jupyter': '0.6.0.dev1', 'vaex-ml': '0.11.0a4' - Vaex was installed via: pip / conda-forge / from source: pip install vaex=4.0.0a4 - OS: Windows 10 **Additional information** ``` import numpy as np import vaex dt = vaex.from_arrays( col1 = np.array(['test', '', 'test2', ''], dtype=str) ) dt['col1'] = dt.func.where(dt['col1'] == '', 'fill', dt['col1']) # errors here ``` <details> <summary>Traceback</summary> ``` ERROR:MainThread:vaex:error evaluating: col1 at rows 0-4 Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 161, in __getitem__ raise KeyError("Unknown variables or column: %r" % (variable,)) KeyError: 'Unknown variables or column: "where(str_equals(__col1, \'\'), \'fill\', __col1)"' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 1977, in data_type data = self.evaluate(expression, 0, 1, filtered=False, array_type=array_type, parallel=False) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5528, in _evaluate_implementation value = scope.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 153, in __getitem__ values = self.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 108, in evaluate result = eval(expression, expression_namespace, self) File "<string>", line 1, in <module> File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 149, in wrapper result = f(*args, **kwargs) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\functions.py", line 165, in wrapper result = arg.add_missing(result) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 41, in add_missing ar = combine_missing(ar, self._array) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 20, in combine_missing return pa.Array.from_buffers(a.type, len(a), [nulls_buffer, buffers[1]]) File "pyarrow\array.pxi", line 910, in pyarrow.lib.Array.from_buffers ValueError: Type's expected number of buffers (3) did not match the passed number (2). During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 161, in __getitem__ raise KeyError("Unknown variables or column: %r" % (variable,)) KeyError: 'Unknown variables or column: "where(str_equals(__col1, \'\'), \'fill\', __col1)"' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 3551, in table_part values = dict(zip(column_names, df.evaluate(column_names))) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5441, in _evaluate_implementation dtypes[expression] = dtype = df.data_type(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 1979, in data_type data = self.evaluate(expression, 0, 1, filtered=True, array_type=array_type, parallel=False) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5528, in _evaluate_implementation value = scope.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 153, in __getitem__ values = self.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 108, in evaluate result = eval(expression, expression_namespace, self) File "<string>", line 1, in <module> File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 149, in wrapper result = f(*args, **kwargs) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\functions.py", line 165, in wrapper result = arg.add_missing(result) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 41, in add_missing ar = combine_missing(ar, self._array) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 20, in combine_missing return pa.Array.from_buffers(a.type, len(a), [nulls_buffer, buffers[1]]) File "pyarrow\array.pxi", line 910, in pyarrow.lib.Array.from_buffers ValueError: Type's expected number of buffers (3) did not match the passed number (2). During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 161, in __getitem__ raise KeyError("Unknown variables or column: %r" % (variable,)) KeyError: 'Unknown variables or column: "where(str_equals(__col1, \'\'), \'fill\', __col1)"' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 1977, in data_type data = self.evaluate(expression, 0, 1, filtered=False, array_type=array_type, parallel=False) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5528, in _evaluate_implementation value = scope.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 153, in __getitem__ values = self.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 108, in evaluate result = eval(expression, expression_namespace, self) File "<string>", line 1, in <module> File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 149, in wrapper result = f(*args, **kwargs) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\functions.py", line 165, in wrapper result = arg.add_missing(result) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 41, in add_missing ar = combine_missing(ar, self._array) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 20, in combine_missing return pa.Array.from_buffers(a.type, len(a), [nulls_buffer, buffers[1]]) File "pyarrow\array.pxi", line 910, in pyarrow.lib.Array.from_buffers ValueError: Type's expected number of buffers (3) did not match the passed number (2). During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 161, in __getitem__ raise KeyError("Unknown variables or column: %r" % (variable,)) KeyError: 'Unknown variables or column: "where(str_equals(__col1, \'\'), \'fill\', __col1)"' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 3556, in table_part values[name] = df.evaluate(name) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5441, in _evaluate_implementation dtypes[expression] = dtype = df.data_type(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 1979, in data_type data = self.evaluate(expression, 0, 1, filtered=True, array_type=array_type, parallel=False) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5528, in _evaluate_implementation value = scope.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 153, in __getitem__ values = self.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 108, in evaluate result = eval(expression, expression_namespace, self) File "<string>", line 1, in <module> File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 149, in wrapper result = f(*args, **kwargs) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\functions.py", line 165, in wrapper result = arg.add_missing(result) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 41, in add_missing ar = combine_missing(ar, self._array) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 20, in combine_missing return pa.Array.from_buffers(a.type, len(a), [nulls_buffer, buffers[1]]) File "pyarrow\array.pxi", line 910, in pyarrow.lib.Array.from_buffers ValueError: Type's expected number of buffers (3) did not match the passed number (2). ERROR:MainThread:vaex:error evaluating: col1 at rows 0-4 Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 161, in __getitem__ raise KeyError("Unknown variables or column: %r" % (variable,)) KeyError: 'Unknown variables or column: "where(str_equals(__col1, \'\'), \'fill\', __col1)"' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 1977, in data_type data = self.evaluate(expression, 0, 1, filtered=False, array_type=array_type, parallel=False) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5528, in _evaluate_implementation value = scope.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 153, in __getitem__ values = self.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 108, in evaluate result = eval(expression, expression_namespace, self) File "<string>", line 1, in <module> File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 149, in wrapper result = f(*args, **kwargs) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\functions.py", line 165, in wrapper result = arg.add_missing(result) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 41, in add_missing ar = combine_missing(ar, self._array) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 20, in combine_missing return pa.Array.from_buffers(a.type, len(a), [nulls_buffer, buffers[1]]) File "pyarrow\array.pxi", line 910, in pyarrow.lib.Array.from_buffers ValueError: Type's expected number of buffers (3) did not match the passed number (2). During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 161, in __getitem__ raise KeyError("Unknown variables or column: %r" % (variable,)) KeyError: 'Unknown variables or column: "where(str_equals(__col1, \'\'), \'fill\', __col1)"' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 3551, in table_part values = dict(zip(column_names, df.evaluate(column_names))) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5441, in _evaluate_implementation dtypes[expression] = dtype = df.data_type(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 1979, in data_type data = self.evaluate(expression, 0, 1, filtered=True, array_type=array_type, parallel=False) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5528, in _evaluate_implementation value = scope.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 153, in __getitem__ values = self.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 108, in evaluate result = eval(expression, expression_namespace, self) File "<string>", line 1, in <module> File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 149, in wrapper result = f(*args, **kwargs) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\functions.py", line 165, in wrapper result = arg.add_missing(result) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 41, in add_missing ar = combine_missing(ar, self._array) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 20, in combine_missing return pa.Array.from_buffers(a.type, len(a), [nulls_buffer, buffers[1]]) File "pyarrow\array.pxi", line 910, in pyarrow.lib.Array.from_buffers ValueError: Type's expected number of buffers (3) did not match the passed number (2). During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 161, in __getitem__ raise KeyError("Unknown variables or column: %r" % (variable,)) KeyError: 'Unknown variables or column: "where(str_equals(__col1, \'\'), \'fill\', __col1)"' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 1977, in data_type data = self.evaluate(expression, 0, 1, filtered=False, array_type=array_type, parallel=False) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5528, in _evaluate_implementation value = scope.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 153, in __getitem__ values = self.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 108, in evaluate result = eval(expression, expression_namespace, self) File "<string>", line 1, in <module> File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 149, in wrapper result = f(*args, **kwargs) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\functions.py", line 165, in wrapper result = arg.add_missing(result) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 41, in add_missing ar = combine_missing(ar, self._array) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 20, in combine_missing return pa.Array.from_buffers(a.type, len(a), [nulls_buffer, buffers[1]]) File "pyarrow\array.pxi", line 910, in pyarrow.lib.Array.from_buffers ValueError: Type's expected number of buffers (3) did not match the passed number (2). During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 161, in __getitem__ raise KeyError("Unknown variables or column: %r" % (variable,)) KeyError: 'Unknown variables or column: "where(str_equals(__col1, \'\'), \'fill\', __col1)"' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 3556, in table_part values[name] = df.evaluate(name) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5441, in _evaluate_implementation dtypes[expression] = dtype = df.data_type(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 1979, in data_type data = self.evaluate(expression, 0, 1, filtered=True, array_type=array_type, parallel=False) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 2620, in evaluate return self._evaluate_implementation(expression, i1=i1, i2=i2, out=out, selection=selection, filtered=filtered, array_type=array_type, parallel=parallel, chunk_size=chunk_size) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\dataframe.py", line 5528, in _evaluate_implementation value = scope.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 102, in evaluate result = self[expression] File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 153, in __getitem__ values = self.evaluate(expression) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\scopes.py", line 108, in evaluate result = eval(expression, expression_namespace, self) File "<string>", line 1, in <module> File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 149, in wrapper result = f(*args, **kwargs) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\functions.py", line 165, in wrapper result = arg.add_missing(result) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 41, in add_missing ar = combine_missing(ar, self._array) File "C:\Users\kmcentush\Miniconda3\envs\api\lib\site-packages\vaex\arrow\numpy_dispatch.py", line 20, in combine_missing return pa.Array.from_buffers(a.type, len(a), [nulls_buffer, buffers[1]]) File "pyarrow\array.pxi", line 910, in pyarrow.lib.Array.from_buffers ValueError: Type's expected number of buffers (3) did not match the passed number (2). ``` </details>
[ { "content": "import numpy as np\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport vaex\nfrom ..expression import _binary_ops, _unary_ops, reversable\n\n\ndef combine_missing(a, b):\n assert a.offset == 0\n if a.null_count > 0 or b.null_count > 0:\n # not optimal\n nulls = pc.inver...
[ { "content": "import numpy as np\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport vaex\nfrom ..expression import _binary_ops, _unary_ops, reversable\n\n\ndef combine_missing(a, b):\n assert a.offset == 0\n if a.null_count > 0 or b.null_count > 0:\n # not optimal\n nulls = pc.inver...
diff --git a/packages/vaex-core/vaex/arrow/numpy_dispatch.py b/packages/vaex-core/vaex/arrow/numpy_dispatch.py index 91775a9879..d425456236 100644 --- a/packages/vaex-core/vaex/arrow/numpy_dispatch.py +++ b/packages/vaex-core/vaex/arrow/numpy_dispatch.py @@ -17,7 +17,7 @@ def combine_missing(a, b): else: nulls_buffer = None buffers = a.buffers() - return pa.Array.from_buffers(a.type, len(a), [nulls_buffer, buffers[1]]) + return pa.Array.from_buffers(a.type, len(a), [nulls_buffer] + buffers[1:]) class NumpyDispatch: def __init__(self, ar): diff --git a/tests/compute_test.py b/tests/compute_test.py index fc9663e361..e633fb3252 100644 --- a/tests/compute_test.py +++ b/tests/compute_test.py @@ -62,3 +62,9 @@ def test_mix_string_and_numeric(x, s): assert ((df.s == 'a') | (df.x == 1)).tolist() == [True, True, False, None] assert (('a' == df.s) | (df.x == 1)).tolist() == [True, True, False, None] assert ((df.x == 1) | (df.s == 'a')).tolist() == [True, True, False, None] + + +def test_where(s): + df = vaex.from_arrays(s=s) + expr = df.func.where(df['s'] == 'a', 'A', df['s']) + assert expr.tolist() == ['A', 'b', None, 'd']
pyinstaller__pyinstaller-5568
Support matplotlib-3.4.0rc1 ## Description of the issue `matplotlib._get_data_path` no longer exists since 3.4.0rc1: https://github.com/matplotlib/matplotlib/commit/e1352c71f07aee7eab004b73dd9bda2a260ab31b. This is on schedule for the removal of the deprecations that occurred around the time of #5006. The missing function leads to a traceback output during build, and the whole `cwd` being crammed into `mpl-data`. Finally, `matplotlib` cannot be imported in the packaged app because it cannot find `mpl-data/matplotlibrc`. ## Context information (for bug reports) * Output of `pyinstaller --version`: ```4.2``` * Version of Python: `3.8` * Platform: `Windows` * Did you also try this on another platform? Does it work there? `Surely it is a cross platform bug` > * try the latest development version, using the following command: > > ```shell > pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip > ``` > > * follow *all* the instructions in our "If Things Go Wrong" Guide > (https://github.com/pyinstaller/pyinstaller/wiki/If-Things-Go-Wrong) and > > ### Make sure [everything is packaged correctly](https://github.com/pyinstaller/pyinstaller/wiki/How-to-Report-Bugs#make-sure-everything-is-packaged-correctly) > > * [ ] start with clean installation > * [ ] use the latest development version > * [ ] Run your frozen program **from a command window (shell)** — instead of double-clicking on it > * [ ] Package your program in **--onedir mode** > * [ ] Package **without UPX**, say: use the option `--noupx` or set `upx=False` in your .spec-file > * [ ] Repackage you application in **verbose/debug mode**. For this, pass the option `--debug` to `pyi-makespec` or `pyinstaller` or use `EXE(..., debug=1, ...)` in your .spec file. > This part of the template is irrelevant, as the responsible code is unchanged on `develop` ### A minimal example program which shows the error ``` pip install --pre matplotlib==3.4.0rc1 pyinstaller echo "import matplotlib" > test.py pyinstaller test.py ``` ### Stacktrace / full error message Building `pyinstaller test.py`: ``` 20391 INFO: Loading module hook 'hook-matplotlib.py' from 'XXXXXXX'... Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: module 'matplotlib' has no attribute '_get_data_path' ``` Running `test.exe`: ``` Traceback (most recent call last): File "test.py", line 1, in <module> import matplotlib File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module File "matplotlib\__init__.py", line 820, in <module> File "matplotlib\__init__.py", line 725, in _rc_params_in_file File "contextlib.py", line 113, in __enter__ File "matplotlib\__init__.py", line 703, in _open_file_or_url FileNotFoundError: [Errno 2] No such file or directory: 'xxxxx\\matplotlib\\mpl-data\\matplotlibrc' [2688] Failed to execute script test ``` ## Possible resolution Simply remove the first underscore in `matplotlib._get_data_path` in https://github.com/pyinstaller/pyinstaller/blob/b9fcbbf86bc71addafc830debe289e7edb2a5697/PyInstaller/hooks/hook-matplotlib.py#L16 This works on my system. I'm a little confused as to why the private function was being used in the first place. `matplotlib.get_data_path` has been available for some time.
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2021, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2021, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
diff --git a/PyInstaller/hooks/hook-matplotlib.py b/PyInstaller/hooks/hook-matplotlib.py index baf3a5146e..9e4f92ba9c 100644 --- a/PyInstaller/hooks/hook-matplotlib.py +++ b/PyInstaller/hooks/hook-matplotlib.py @@ -13,7 +13,7 @@ from PyInstaller.utils.hooks import exec_statement mpl_data_dir = exec_statement( - "import matplotlib; print(matplotlib._get_data_path())") + "import matplotlib; print(matplotlib.get_data_path())") datas = [ (mpl_data_dir, "matplotlib/mpl-data"), diff --git a/news/5568.bugfix.rst b/news/5568.bugfix.rst new file mode 100644 index 0000000000..e18a44e3fd --- /dev/null +++ b/news/5568.bugfix.rst @@ -0,0 +1,3 @@ +Remove dependence on a `private function +<https://github.com/matplotlib/matplotlib/commit/e1352c71f07aee7eab004b73dd9bda2a260ab31b>`_ +removed in ``matplotlib`` 3.4.0rc1.
django-json-api__django-rest-framework-json-api-720
Tox using pytest-runner setup scripts leads to invalid deps Currently tox uses pytest-runner setup script wrapper. This way tests are run differently when run locally as stated in README.md. This may lead to different dependencies and errors as for example #634 Best to split up requirements as in [DRF](https://github.com/encode/django-rest-framework/tree/master/requirements) and remove setup pytest-runner script. Once this is done `test_requires` in setup.py would not be needed which remoes the duplication to requirements-development.txt
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Django REST Framework JSON API documentation build configuration file, created by\n# sphinx-quickstart on Fri Jul 24 23:31:15 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all ...
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Django REST Framework JSON API documentation build configuration file, created by\n# sphinx-quickstart on Fri Jul 24 23:31:15 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all ...
diff --git a/.pyup.yml b/.pyup.yml index 02f8ed99..c4b52e37 100644 --- a/.pyup.yml +++ b/.pyup.yml @@ -1,5 +1,17 @@ search: False requirements: - - requirements-development.txt: + - requirements/requirements-codestyle.txt: + update: all + pin: True + - requirements/requirements-documentation.txt: + update: all + pin: True + - requirements/requirements-optionals.txt: + update: all + pin: True + - requirements/requirements-packaging.txt: + update: all + pin: True + - requirements/requirements-testing.txt: update: all pin: True diff --git a/.travis.yml b/.travis.yml index b459f10f..6d6ccfb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,9 @@ matrix: include: - python: 3.6 - env: TOXENV=flake8 + env: TOXENV=lint + - python: 3.6 + env: TOXENV=docs - python: 3.5 env: TOXENV=py35-django111-drf310 diff --git a/README.rst b/README.rst index d9f9dd09..aaa6678c 100644 --- a/README.rst +++ b/README.rst @@ -128,8 +128,7 @@ installed and activated: $ git clone https://github.com/django-json-api/django-rest-framework-json-api.git $ cd django-rest-framework-json-api - $ pip install -r example/requirements.txt - $ pip install -e . + $ pip install -U -e . -r requirements.txt $ django-admin migrate --settings=example.settings $ django-admin loaddata drf_example --settings=example.settings $ django-admin runserver --settings=example.settings @@ -145,7 +144,7 @@ installed and activated: :: - $ pip install -Ur requirements-development.txt + $ pip install -Ur requirements.txt $ flake8 $ pytest diff --git a/docs/conf.py b/docs/conf.py index 88111be3..ee435d36 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -31,7 +31,7 @@ django.setup() # Auto-generate API documentation. -main(['-o', '_build/apidoc', '-f', '-e', '-T', '-M', '../rest_framework_json_api']) +main(['-o', 'apidoc', '-f', '-e', '-T', '-M', '../rest_framework_json_api']) # -- General configuration ------------------------------------------------ diff --git a/docs/getting-started.md b/docs/getting-started.md index 2e93d77a..6f5d60ab 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -77,8 +77,7 @@ From Source cd django-rest-framework-json-api python3 -m venv env source env/bin/activate - pip install -r example/requirements.txt - pip install -e . + pip install -U -e . r requirements.txt django-admin migrate --settings=example.settings django-admin loaddata drf_example --settings=example.settings django-admin runserver --settings=example.settings diff --git a/requirements-development.txt b/requirements-development.txt deleted file mode 100644 index a8115e16..00000000 --- a/requirements-development.txt +++ /dev/null @@ -1,16 +0,0 @@ --e . -django-debug-toolbar==2.0 -django-filter==2.2.0 -django-polymorphic==2.1.2 -Faker==2.0.2 -factory-boy==2.12.0 -flake8==3.7.7 -flake8-isort==2.7.0 -isort==4.3.21 -pytest==5.2.1 -pytest-cov==2.8.1 -pytest-django==3.5.1 -pytest-factoryboy==2.0.3 -recommonmark==0.6.0 -Sphinx==2.2.0 -sphinx_rtd_theme==0.4.3 diff --git a/requirements.txt b/requirements.txt index 8d1c8b69..862b4aa8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,13 @@ - +# The base set of requirements for Django REST framework JSON API is actually +# fairly small, but for the purposes of development and testing +# there are a number of packages that are useful to install. + +# Laying these out as separate requirements files, allows us to +# only included the relevant sets when running tox, and ensures +# we are only ever declaring our dependencies in one place. + +-r requirements/requirements-optionals.txt +-r requirements/requirements-testing.txt +-r requirements/requirements-documentation.txt +-r requirements/requirements-codestyle.txt +-r requirements/requirements-packaging.txt diff --git a/requirements/requirements-codestyle.txt b/requirements/requirements-codestyle.txt new file mode 100644 index 00000000..49ef62ac --- /dev/null +++ b/requirements/requirements-codestyle.txt @@ -0,0 +1,3 @@ +flake8==3.7.7 +flake8-isort==2.7.0 +isort==4.3.21 diff --git a/requirements/requirements-documentation.txt b/requirements/requirements-documentation.txt new file mode 100644 index 00000000..19d59a2e --- /dev/null +++ b/requirements/requirements-documentation.txt @@ -0,0 +1,3 @@ +recommonmark==0.6.0 +Sphinx==2.2.0 +sphinx_rtd_theme==0.4.3 diff --git a/requirements/requirements-optionals.txt b/requirements/requirements-optionals.txt new file mode 100644 index 00000000..cc5f81b3 --- /dev/null +++ b/requirements/requirements-optionals.txt @@ -0,0 +1,2 @@ +django-filter==2.2.0 +django-polymorphic==2.1.2 diff --git a/requirements/requirements-packaging.txt b/requirements/requirements-packaging.txt new file mode 100644 index 00000000..f3c2cd3e --- /dev/null +++ b/requirements/requirements-packaging.txt @@ -0,0 +1 @@ +twine==2.0.0 diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt new file mode 100644 index 00000000..836971ec --- /dev/null +++ b/requirements/requirements-testing.txt @@ -0,0 +1,7 @@ +django-debug-toolbar==2.0 +factory-boy==2.12.0 +Faker==2.0.2 +pytest==5.2.1 +pytest-cov==2.8.1 +pytest-django==3.5.1 +pytest-factoryboy==2.0.3 diff --git a/tox.ini b/tox.ini index 3431b4ea..13992946 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,7 @@ envlist = py{35,36}-django111-drf{310,master}, py{35,36,37}-django{21,22}-drf{310,master}, + lint,docs [testenv] deps = @@ -10,7 +11,8 @@ deps = django22: Django>=2.2,<2.3 drf310: djangorestframework>=3.10.2,<3.11 drfmaster: https://github.com/encode/django-rest-framework/archive/master.zip - -rrequirements-development.txt + -rrequirements/requirements-testing.txt + -rrequirements/requirements-optionals.txt setenv = PYTHONPATH = {toxinidir} @@ -19,15 +21,19 @@ setenv = commands = pytest --cov --no-cov-on-fail --cov-report xml {posargs} -[testenv:flake8] +[testenv:lint] basepython = python3.6 deps = - -rrequirements-development.txt + -rrequirements/requirements-codestyle.txt + -rrequirements/requirements-testing.txt + -rrequirements/requirements-optionals.txt commands = flake8 -[testenv:sphinx] +[testenv:docs] basepython = python3.6 deps = - -rrequirements-development.txt + -rrequirements/requirements-testing.txt + -rrequirements/requirements-optionals.txt + -rrequirements/requirements-documentation.txt commands = - sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html + sphinx-build -W -b html -d docs/_build/doctrees docs docs/_build/html
ansible__ansible-42736
openstack inventory plugin can create group with an 'empty name' when region is not specified in clouds.yml <!--- Verify first that your issue/request is not already reported on GitHub. THIS FORM WILL BE READ BY A MACHINE, COMPLETE ALL SECTIONS AS DESCRIBED. Also test if the latest release, and devel branch are affected too. ALWAYS add information AFTER (OUTSIDE) these html comments. Otherwise it may end up being automatically closed by our bot. --> ##### SUMMARY <!--- Explain the problem briefly --> When region_name is not specified the openstack inventory plugin create empty named group because plugin have not any check for an empty value: https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/inventory/openstack.py#L257 as soon as 'cloud_' group also created: https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/inventory/openstack.py#L260 the empty group can lead to unexpected behavior: https://github.com/ansible/ansible/issues/42040 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME <!--- Insert, BELOW THIS COMMENT, the name of the module, plugin, task or feature. Do not include extra details here, e.g. "vyos_command" not "the network module vyos_command" or the full path--> `contrib/inventory/openstack_inventory.py` ##### ANSIBLE VERSION <!--- Paste, BELOW THIS COMMENT, verbatim output from "ansible --version" between quotes below --> ``` ansible 2.5.5 config file = /Users/igor.tiunov/Sources/ansible-openstack-bug/ansible.cfg configured module search path = [u'/Users/igor.tiunov/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python2.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 2.7.14 (default, Mar 9 2018, 23:57:12) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] ``` ##### CONFIGURATION <!--- If using Ansible 2.4 or above, paste, BELOW THIS COMMENT, the results of "ansible-config dump --only-changed" Otherwise, mention any settings you have changed/added/removed in ansible.cfg (or using the ANSIBLE_* environment variables).--> ``` DEFAULT_HOST_LIST(/Users/igor.tiunov/Sources/ansible-openstack-bug/ansible.cfg) = [u'/Users/igor.tiunov/Sources/ansible-openstack-bug/openstack.yml'] DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = /Users/igor.tiunov/tmp/.vault INVENTORY_ENABLED(/Users/igor.tiunov/Sources/ansible-openstack-bug/ansible.cfg) = ['openstack'] ``` ##### OS / ENVIRONMENT <!--- Mention, BELOW THIS COMMENT, the OS you are running Ansible from, and the OS you are managing, or say "N/A" for anything that is not platform-specific. Also mention the specific version of what you are trying to control, e.g. if this is a network bug the version of firmware on the network device.--> Max OSX and rhel/windows instances on openstack ##### STEPS TO REPRODUCE <!--- For bugs, show exactly how to reproduce the problem, using a minimal test-case. For new features, show how the feature would be used. --> 1. Create clouds.yaml like this: https://github.com/ITD27M01/ansible-openstack-bug/blob/master/clouds.yaml https://docs.openstack.org/os-client-config/latest/user/configuration.html 2. Run ansible-invetnory --list 3. See the empty group in inventory: https://github.com/ITD27M01/ansible-openstack-bug/blob/master/openstack-inventory.json#L2 https://github.com/ITD27M01/ansible-openstack-bug/blob/master/openstack-inventory.json#L260 <!--- Paste example playbooks or commands between quotes below --> ```yaml ``` <!--- You can also paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!--- What did you expect to happen when running the steps above? --> Empty group is not created ##### ACTUAL RESULTS <!--- What actually happened? If possible run with extra verbosity (-vvvv) --> Empty group is created <!--- Paste verbatim command output between quotes below --> ``` ```
[ { "content": "# Copyright (c) 2012, Marco Vito Moscaritolo <marco@agavee.com>\n# Copyright (c) 2013, Jesse Keating <jesse.keating@rackspace.com>\n# Copyright (c) 2015, Hewlett-Packard Development Company, L.P.\n# Copyright (c) 2016, Rackspace Australia\n# Copyright (c) 2017 Ansible Project\n# GNU General Public...
[ { "content": "# Copyright (c) 2012, Marco Vito Moscaritolo <marco@agavee.com>\n# Copyright (c) 2013, Jesse Keating <jesse.keating@rackspace.com>\n# Copyright (c) 2015, Hewlett-Packard Development Company, L.P.\n# Copyright (c) 2016, Rackspace Australia\n# Copyright (c) 2017 Ansible Project\n# GNU General Public...
diff --git a/lib/ansible/plugins/inventory/openstack.py b/lib/ansible/plugins/inventory/openstack.py index d352450ae4c784..2f5717fd3fbd53 100644 --- a/lib/ansible/plugins/inventory/openstack.py +++ b/lib/ansible/plugins/inventory/openstack.py @@ -253,7 +253,8 @@ def _get_groups_from_server(self, server_vars, namegroup=True): groups.append(cloud) # Create a group on region - groups.append(region) + if region: + groups.append(region) # And one by cloud_region groups.append("%s_%s" % (cloud, region))
rucio__rucio-2492
Issue in client_extract download Motivation ---------- Modification ------------
[ { "content": "\n'''\nThis file is automatically generated; Do not edit it. :)\n'''\nVERSION_INFO = {\n 'final': True,\n 'version': '1.19.5',\n 'branch_nick': 'patch-0-1_19_5_preparation',\n 'revision_id': '9e14d56c9d958e5348b19ddc7e5fa45d4a778807',\n 'revno': 7951\n}\n", "path": "lib/rucio/vc...
[ { "content": "\n'''\nThis file is automatically generated; Do not edit it. :)\n'''\nVERSION_INFO = {\n 'final': True,\n 'version': '1.19.6',\n 'branch_nick': 'patch-0-Release__Rucio_1_19_6_preparation',\n 'revision_id': 'a8c639a7a70a9e605ad90535d28d2eab04d89cce',\n 'revno': 7992\n}\n", "path"...
diff --git a/doc/source/releasenotes/1.19.6.rst b/doc/source/releasenotes/1.19.6.rst new file mode 100644 index 0000000000..136b84f446 --- /dev/null +++ b/doc/source/releasenotes/1.19.6.rst @@ -0,0 +1,47 @@ +====== +1.19.6 +====== + +------- +General +------- + +************ +Enhancements +************ + +- Clients: Fix for update_replicas_states function description in replicaclient.py `#2240 <https://github.com/rucio/rucio/issues/2240>`_ +- Documentation: ChangeLog seems to be a COPYRIGHT file? `#2434 <https://github.com/rucio/rucio/issues/2434>`_ +- Rules: Injector should not inject a rule which is about to expire soon `#2219 <https://github.com/rucio/rucio/issues/2219>`_ +- Testing: Test reaper console script `#2149 <https://github.com/rucio/rucio/issues/2149>`_ +- Transfers: Automatically recover requests in state "protocol mismatch" `#2115 <https://github.com/rucio/rucio/issues/2115>`_ + +**** +Bugs +**** + +- Core & Internals: PostgreSQL alembic upgrade problems `#2212 <https://github.com/rucio/rucio/issues/2212>`_ +- Core & Internals: ineffective `list-dids-by-meta` `#2403 <https://github.com/rucio/rucio/issues/2403>`_ +- Core & Internals: New psycopg2-binary release incompatible with current sqlalchemy version `#2446 <https://github.com/rucio/rucio/issues/2446>`_ +- Core & Internals: list_replicas should raise DID not found `#2468 <https://github.com/rucio/rucio/issues/2468>`_ +- Life time model: Atropos doesn’t gracefully handle InvalidRSEExpression `#2432 <https://github.com/rucio/rucio/issues/2432>`_ +- Life time model: Atropos command-line option --unlock-rules has no effect `#2456 <https://github.com/rucio/rucio/issues/2456>`_ +- Rules: Calculation error of progress class for Rule PROGRESS notifications `#2440 <https://github.com/rucio/rucio/issues/2440>`_ +- Testing: nosetests commands override return codes `#2465 <https://github.com/rucio/rucio/issues/2465>`_ + +------- +Clients +------- + +************ +Enhancements +************ + +- Clients: revert xrdcp workaround in downloadclient as soon as gfal is fixed `#1598 <https://github.com/rucio/rucio/issues/1598>`_ + +**** +Bugs +**** + +- Clients: If policy section not available in client config, no exception should be raised `#1485 <https://github.com/rucio/rucio/issues/1485>`_ +- Clients: Issue in client_extract download `#2485 <https://github.com/rucio/rucio/issues/2485>`_ diff --git a/lib/rucio/vcsversion.py b/lib/rucio/vcsversion.py index 619ee28553..d7aab5ed35 100644 --- a/lib/rucio/vcsversion.py +++ b/lib/rucio/vcsversion.py @@ -4,8 +4,8 @@ ''' VERSION_INFO = { 'final': True, - 'version': '1.19.5', - 'branch_nick': 'patch-0-1_19_5_preparation', - 'revision_id': '9e14d56c9d958e5348b19ddc7e5fa45d4a778807', - 'revno': 7951 + 'version': '1.19.6', + 'branch_nick': 'patch-0-Release__Rucio_1_19_6_preparation', + 'revision_id': 'a8c639a7a70a9e605ad90535d28d2eab04d89cce', + 'revno': 7992 } diff --git a/lib/rucio/web/ui/static/webui_version b/lib/rucio/web/ui/static/webui_version index 7a8a49471c..a85b56d4e7 100644 --- a/lib/rucio/web/ui/static/webui_version +++ b/lib/rucio/web/ui/static/webui_version @@ -1 +1 @@ -1.19.5 \ No newline at end of file +1.19.6 \ No newline at end of file
canonical__microk8s-3793
Leaving a worker node always leads to a broken state. #### Summary MicroK8S 1.26: doing a "microk8s leave" command on a worker node that has previously joined a cluster, always leave microk8s in a broken state. MicroK8S will regenerate certificates and will try to restart without success. #### What Should Happen Instead? MicroK8S status should give a "microk8s is running" message. #### Reproduction Steps Create a microk8s cluster with 3 master nodes and 2 worker nodes with "microk8s add-node" command. Finally, when everything is up and running, on both worker nodes do a "microk8s leave" command. You won't be able to restart microk8s anymore on worker nodes. #### Introspection Report "microk8s inspect" will trigger the following error: FAIL: Service snap.microk8s.daemon-kubelite is not running The command "snap logs microk8s.daemon-kubelite" will print: 2023-01-30T00:14:43Z microk8s.daemon-kubelite[234081]: W0130 00:14:43.528692 234081 authentication.go:520] AnonymousAuth is not allowed with the AlwaysAllow authorizer. Resetting AnonymousAuth to false. You should use a different authorizer 2023-01-30T00:14:43Z microk8s.daemon-kubelite[234081]: Error: failed to parse service-account-issuer-key-file: error reading private key file /var/snap/microk8s/4390/certs/serviceaccount.key: data does not contain a valid RSA or ECDSA private key 2023-01-30T00:14:43Z microk8s.daemon-kubelite[234081]: F0130 00:14:43.528708 234081 daemon.go:67] API Server exited failed to parse service-account-issuer-key-file: error reading private key file /var/snap/microk8s/4390/certs/serviceaccount.key: data does not contain a valid RSA or ECDSA private key 2023-01-30T00:14:43Z systemd[1]: snap.microk8s.daemon-kubelite.service: Main process exited, code=exited, status=255/EXCEPTION 2023-01-30T00:14:43Z systemd[1]: snap.microk8s.daemon-kubelite.service: Failed with result 'exit-code'. 2023-01-30T00:14:43Z systemd[1]: snap.microk8s.daemon-kubelite.service: Scheduled restart job, restart counter is at 5. 2023-01-30T00:14:43Z systemd[1]: Stopped Service for snap application microk8s.daemon-kubelite. 2023-01-30T00:14:43Z systemd[1]: snap.microk8s.daemon-kubelite.service: Start request repeated too quickly. 2023-01-30T00:14:43Z systemd[1]: snap.microk8s.daemon-kubelite.service: Failed with result 'exit-code'. 2023-01-30T00:14:43Z systemd[1]: Failed to start Service for snap application microk8s.daemon-kubelite. Report attached: [inspection-report-20230130_002026.tar.gz](https://github.com/canonical/microk8s/files/10531264/inspection-report-20230130_002026.tar.gz)
[ { "content": "#!/usr/bin/python3\nimport base64\nimport random\nimport string\nimport subprocess\nimport os\nimport ssl\nimport sys\nimport time\nimport hashlib\nimport http\n\nimport click\nimport requests\nimport socket\nimport shutil\nimport urllib3\nimport yaml\nimport json\n\nfrom common.cluster.utils impo...
[ { "content": "#!/usr/bin/python3\nimport base64\nimport random\nimport string\nimport subprocess\nimport os\nimport ssl\nimport sys\nimport time\nimport hashlib\nimport http\n\nimport click\nimport requests\nimport socket\nimport shutil\nimport urllib3\nimport yaml\nimport json\n\nfrom common.cluster.utils impo...
diff --git a/scripts/wrappers/join.py b/scripts/wrappers/join.py index 22f0c4d559..d4ee2f8486 100755 --- a/scripts/wrappers/join.py +++ b/scripts/wrappers/join.py @@ -826,7 +826,6 @@ def join_dqlite_worker_node(info, master_ip, master_port, token): exit(1) store_remote_ca(info["ca"]) - store_cert("serviceaccount.key", info["service_account_key"]) store_base_kubelet_args(info["kubelet_args"]) update_kubelet_node_ip(info["kubelet_args"], hostname_override) diff --git a/tests/test-cluster.py b/tests/test-cluster.py index bb5b3268e1..de95ebe3da 100644 --- a/tests/test-cluster.py +++ b/tests/test-cluster.py @@ -458,6 +458,65 @@ def test_worker_node(self): kubelet = vm.run("cat /var/snap/microk8s/current/credentials/kubelet.config") assert "127.0.0.1" in kubelet.decode() + def test_worker_node_leave(self): + """ + Test when a worker node leaves the cluster + """ + print("Setting up a worker node") + vm = VM(backend) + vm.setup(channel_to_test) + self.VM.append(vm) + + # Form cluster + vm_master = self.VM[0] + print("Adding machine {} to cluster".format(vm.vm_name)) + add_node = vm_master.run("/snap/bin/microk8s.add-node") + endpoint = [ep for ep in add_node.decode().split() if ":25000/" in ep] + vm.run("/snap/bin/microk8s.join {} --worker".format(endpoint[0])) + + # Wait for nodes to be ready + print("Waiting for node to register") + attempt = 0 + while attempt < 10: + try: + connected_nodes = vm_master.run("/snap/bin/microk8s.kubectl get no") + if "NotReady" in connected_nodes.decode(): + time.sleep(5) + continue + print(connected_nodes.decode()) + break + except ChildProcessError: + time.sleep(10) + attempt += 1 + if attempt == 10: + raise + + # Leave the worker node from the cluster + print("Leaving the worker node {} from the cluster".format(vm.vm_name)) + vm.run("/snap/bin/microk8s.leave") + + # Wait for worker node to leave the cluster + attempt = 0 + while attempt < 10: + try: + connected_nodes = vm_master.run("/snap/bin/microk8s.kubectl get no") + if "NotReady" in connected_nodes.decode(): + print(connected_nodes.decode()) + break + time.sleep(5) + continue + except ChildProcessError: + time.sleep(10) + attempt += 1 + if attempt == 10: + raise + + # Check that the worker node is Ready + print("Checking that the worker node {} is working and Ready".format(vm.vm_name)) + worker_node = vm.run("/snap/bin/microk8s status --wait-ready") + print(worker_node.decode()) + assert "microk8s is running" in worker_node.decode() + def test_no_cert_reissue_in_nodes(self): """ Test that each node has the cert no-reissue lock.
getsentry__sentry-18644
BufferError: Local: Queue full I am receiving this error once every 2-4 days and I need to restart Sentry to fix it. This started after moving to the Docker version of Sentry. I never noticed this being an issue on 9.1.2 also with Clickhouse and Snuba running, but without Kafka. > https://observ.app/share/issue/4e4f208a500d48cc898770930706959a/ I am not sure where to look / poke / monitor to see this queue that is being spoken of and how I can flush it / enlarge it if needed. `sentry queues list` showed all 0's so it's not looking like there is a massive backlog of events. Any help is appreciated!
[ { "content": "from __future__ import absolute_import\n\nimport redis\nimport logging\n\nfrom threading import Thread\nfrom six.moves.queue import Queue, Full\n\n\nclass QueuedPublisherService(object):\n \"\"\"\n A publisher that queues items locally and publishes them to a\n remote pubsub service on a ...
[ { "content": "from __future__ import absolute_import\n\nimport redis\nimport logging\n\nfrom threading import Thread\nfrom six.moves.queue import Queue, Full\n\n\nclass QueuedPublisherService(object):\n \"\"\"\n A publisher that queues items locally and publishes them to a\n remote pubsub service on a ...
diff --git a/src/sentry/utils/pubsub.py b/src/sentry/utils/pubsub.py index 74cf05ac61cd87..a67ee9e95d8bdb 100644 --- a/src/sentry/utils/pubsub.py +++ b/src/sentry/utils/pubsub.py @@ -73,5 +73,7 @@ def __init__(self, connection, asynchronous=True): def publish(self, channel, value, key=None): self.producer.produce(topic=channel, value=value, key=key) - if not self.asynchronous: + if self.asynchronous: + self.producer.poll(0) + else: self.producer.flush()
pytorch__ignite-751
correct the type hints of this function https://github.com/pytorch/ignite/blob/ca738d8f3f106093aa04b6bce9506129a1059df8/ignite/engine/events.py#L81 this really should read ` def wrapper(engine, event: int) -> bool:`
[ { "content": "\nfrom typing import Callable, Optional, Union, Any\n\nfrom enum import Enum\nimport numbers\nimport weakref\n\nfrom ignite.engine.utils import _check_signature\n\n\n__all__ = [\n 'Events',\n 'State'\n]\n\n\nclass EventWithFilter:\n\n def __init__(self, event: Any, filter: Callable):\n ...
[ { "content": "\nfrom typing import Callable, Optional, Union, Any\n\nfrom enum import Enum\nimport numbers\nimport weakref\n\nfrom ignite.engine.utils import _check_signature\n\n\n__all__ = [\n 'Events',\n 'State'\n]\n\n\nclass EventWithFilter:\n\n def __init__(self, event: Any, filter: Callable):\n ...
diff --git a/ignite/engine/events.py b/ignite/engine/events.py index 74c8951ec8af..65ce2fabb27c 100644 --- a/ignite/engine/events.py +++ b/ignite/engine/events.py @@ -77,7 +77,7 @@ def __call__(self, event_filter: Optional[Callable] = None, @staticmethod def every_event_filter(every: int) -> Callable: - def wrapper(engine, event: bool): + def wrapper(engine, event: int) -> bool: if event % every == 0: return True return False
LMFDB__lmfdb-4407
Server errors in whitelist check The URL https://www.lmfdb.org/L/1 generates the following server error in the white_listed function in app.py ``` Exception on /L/1 [GET] Traceback (most recent call last): File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise raise value File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 1948, in full_dispatch_request rv = self.preprocess_request() File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 2242, in preprocess_request rv = func() File "/home/lmfdb/lmfdb-git-web/lmfdb/app.py", line 249, in netloc_redirect not white_listed(urlparts.path) File "/home/lmfdb/lmfdb-git-web/lmfdb/app.py", line 764, in white_listed return white_listed(url[1:]) or url[3].isdigit() IndexError: string index out of range [2021-02-02 03:59:37 UTC] 500 error on URL https://www.lmfdb.org/L/1 () ```
[ { "content": "\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nimport os\nfrom socket import gethostname\nimport time\nimport six\nfrom urllib.parse import urlparse, urlunparse\n\nfrom flask import (Flask, g, render_template, request, make_response,\n redirect, url_for, curre...
[ { "content": "\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nimport os\nfrom socket import gethostname\nimport time\nimport six\nfrom urllib.parse import urlparse, urlunparse\n\nfrom flask import (Flask, g, render_template, request, make_response,\n redirect, url_for, curre...
diff --git a/lmfdb/app.py b/lmfdb/app.py index 0cae7a623a..284a865921 100644 --- a/lmfdb/app.py +++ b/lmfdb/app.py @@ -761,7 +761,7 @@ def white_listed(url): elif url[:2] == "L/": # if the origin is allowed # or if it is a L-function with a label - return white_listed(url[1:]) or url[3].isdigit() + return white_listed(url[1:]) or len(url) == 2 or url[2].isdigit() else: return False
pytorch__vision-2518
Resize sometimes fails https://github.com/pytorch/vision/blob/300ef76d3b6e9c33c58cd124e5f5514a927cadf1/torchvision/transforms/functional_tensor.py#L589 The specific line above will sometimes cause the image to be returned unresized with no warning even when an explicit size (h,w) is given. This will also cause problems to the transform `RandomResizedCrop`.
[ { "content": "import warnings\nfrom typing import Optional\n\nimport torch\nfrom torch import Tensor\nfrom torch.nn.functional import affine_grid, grid_sample\nfrom torch.jit.annotations import List, BroadcastingList2\n\n\ndef _is_tensor_a_torch_image(x: Tensor) -> bool:\n return x.ndim >= 2\n\n\ndef _get_im...
[ { "content": "import warnings\nfrom typing import Optional\n\nimport torch\nfrom torch import Tensor\nfrom torch.nn.functional import affine_grid, grid_sample\nfrom torch.jit.annotations import List, BroadcastingList2\n\n\ndef _is_tensor_a_torch_image(x: Tensor) -> bool:\n return x.ndim >= 2\n\n\ndef _get_im...
diff --git a/test/test_functional_tensor.py b/test/test_functional_tensor.py index 2e3477ad12b..d01a357d7b5 100644 --- a/test/test_functional_tensor.py +++ b/test/test_functional_tensor.py @@ -337,7 +337,7 @@ def test_resize(self): if dt is not None: # This is a trivial cast to float of uint8 data to test all cases tensor = tensor.to(dt) - for size in [32, [32, ], [32, 32], (32, 32), ]: + for size in [32, 26, [32, ], [32, 32], (32, 32), [26, 35]]: for interpolation in [BILINEAR, BICUBIC, NEAREST]: resized_tensor = F_t.resize(tensor, size=size, interpolation=interpolation) resized_pil_img = F_pil.resize(pil_img, size=size, interpolation=interpolation) diff --git a/test/test_transforms_tensor.py b/test/test_transforms_tensor.py index e05044599ef..e2085b0aaab 100644 --- a/test/test_transforms_tensor.py +++ b/test/test_transforms_tensor.py @@ -226,7 +226,7 @@ def test_resize(self): if dt is not None: # This is a trivial cast to float of uint8 data to test all cases tensor = tensor.to(dt) - for size in [32, [32, ], [32, 32], (32, 32), ]: + for size in [32, 34, [32, ], [32, 32], (32, 32), [34, 35]]: for interpolation in [BILINEAR, BICUBIC, NEAREST]: resized_tensor = F.resize(tensor, size=size, interpolation=interpolation) @@ -250,7 +250,7 @@ def test_resized_crop(self): for scale in [(0.7, 1.2), [0.7, 1.2]]: for ratio in [(0.75, 1.333), [0.75, 1.333]]: - for size in [(32, ), [32, ], [32, 32], (32, 32)]: + for size in [(32, ), [44, ], [32, ], [32, 32], (32, 32), [44, 55]]: for interpolation in [NEAREST, BILINEAR, BICUBIC]: transform = T.RandomResizedCrop( size=size, scale=scale, ratio=ratio, interpolation=interpolation diff --git a/torchvision/transforms/functional_tensor.py b/torchvision/transforms/functional_tensor.py index f2e47b056d3..357f23b88fc 100644 --- a/torchvision/transforms/functional_tensor.py +++ b/torchvision/transforms/functional_tensor.py @@ -586,8 +586,8 @@ def resize(img: Tensor, size: List[int], interpolation: int = 2) -> Tensor: else: size_w = int(size_h * w / h) - if (w <= h and w == size_w) or (h <= w and h == size_h): - return img + if (w <= h and w == size_w) or (h <= w and h == size_h): + return img # make image NCHW need_squeeze = False
redis__redis-py-2674
Canceling async Redis command leaves connection open, in unsafe state for future commands **Version**: 4.5.3 **Platform**: Python 3.8 on Ubuntu / Generic **Description**: Canceling async Redis command leaves connection open, in unsafe state for future commands This is a reincarnation of #2624, which was closed with an incomplete fix and a possibly unreliable test case. This is the same issue that recently got a lot of attention due to ChatGPT outage, and that remains only partially fixed. The cancellation shielding introduced in #2641 addressed only the cancellation of Redis pipeline operation, but non-pipelined ops are still vulnerable. This time I am attaching a script that reproduces the issue reliably without relying on an external, slow Redis server. This is achieved by inserting a small TCP socket proxy between the Redis client and local Redis server, with the proxy introducing a 0.1 second delay when sending data in either direction. Running this script with a Redis server running locally on port 6379 produces the following output: ``` $ python redis_cancel.py managed to cancel the task, connection is left open with unread response bar: b'foo' ping: False foo: b'PONG' ``` ```python import asyncio from redis.asyncio import Redis async def pipe(reader: asyncio.StreamReader, writer: asyncio.StreamWriter, delay: float, name=''): while data := await reader.read(1000): # print(name, 'received:', data) await asyncio.sleep(delay) writer.write(data) await writer.drain() class DelayProxy: def __init__(self, addr, redis_addr, delay: float): self.addr = addr self.redis_addr = redis_addr self.delay = delay async def start(self): server = await asyncio.start_server(self.handle, *self.addr) asyncio.create_task(server.serve_forever()) async def handle(self, reader, writer): # establish connection to redis redis_reader, redis_writer = await asyncio.open_connection(*self.redis_addr) pipe1 = asyncio.create_task(pipe(reader, redis_writer, self.delay, 'to redis:')) pipe2 = asyncio.create_task(pipe(redis_reader, writer, self.delay, 'from redis:')) await asyncio.gather(pipe1, pipe2) async def main(): # create a tcp socket proxy that relays data to Redis and back, inserting 0.1 seconds of delay dp = DelayProxy(addr=('localhost', 6380), redis_addr=('localhost', 6379), delay=0.1) await dp.start() # note that we connect to proxy, rather than to Redis directly async with Redis(host='localhost', port=6380) as r: await r.set('foo', 'foo') await r.set('bar', 'bar') t = asyncio.create_task(r.get('foo')) await asyncio.sleep(0.050) t.cancel() try: await t print('try again, we did not cancel the task in time') except asyncio.CancelledError: print('managed to cancel the task, connection is left open with unread response') print('bar:', await r.get('bar')) print('ping:', await r.ping()) print('foo:', await r.get('foo')) if __name__ == '__main__': asyncio.run(main()) ```
[ { "content": "#!/usr/bin/env python\nfrom setuptools import find_packages, setup\n\nsetup(\n name=\"redis\",\n description=\"Python client for Redis database and key-value store\",\n long_description=open(\"README.md\").read().strip(),\n long_description_content_type=\"text/markdown\",\n keywords...
[ { "content": "#!/usr/bin/env python\nfrom setuptools import find_packages, setup\n\nsetup(\n name=\"redis\",\n description=\"Python client for Redis database and key-value store\",\n long_description=open(\"README.md\").read().strip(),\n long_description_content_type=\"text/markdown\",\n keywords...
diff --git a/setup.py b/setup.py index 3b7347da03..c23038cba7 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ long_description_content_type="text/markdown", keywords=["Redis", "key-value store", "database"], license="MIT", - version="4.5.3", + version="4.5.4", packages=find_packages( include=[ "redis",
buildbot__buildbot-6680
p4port is not renderable Hello, I'm trying to override p4port per-client. I need this because we want some workers to connect to a local perforce proxy but still use the actual perforce server by default. Basically something like this: ``` P4PORT = 'perforce.company.com:1666' P4PORT_PROXY = 'proxy.lan:1666' c = BuildmasterConfig = {} c['workers'] = [ worker.Worker("worker1", "password1"), worker.Worker("worker2", "password2", properties={'P4PORT': P4PORT_PROXY}), ] factory = util.BuildFactory() factory.addStep(steps.P4(p4port=util.Property('P4PORT', default=P4PORT), p4user=P4USER, p4base='//depot', p4branch=getBranch, stream=True, p4client=getClientName, p4client_spec_options='rmdir clobber', mode='incremental')) ... ``` This doesn't work because p4port is not a renderable: > Perforce client error: > Connect to server failed; check $P4PORT. > TCP connect to Unpersistable("Unpersistable data: b'instance of class buildbot.process.properties.Property deemed insecure'") failed. > The specified class was not found. This is similar to #3954 (`p4passwd` was not renderable).
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
diff --git a/master/buildbot/steps/source/p4.py b/master/buildbot/steps/source/p4.py index 8aa679e7069d..0d37f1582969 100644 --- a/master/buildbot/steps/source/p4.py +++ b/master/buildbot/steps/source/p4.py @@ -45,7 +45,7 @@ class P4(Source): name = 'p4' - renderables = ['mode', 'p4base', 'p4client', 'p4viewspec', 'p4branch', 'p4passwd'] + renderables = ['mode', 'p4base', 'p4client', 'p4viewspec', 'p4branch', 'p4passwd', 'p4port'] possible_modes = ('incremental', 'full') def __init__(self, mode='incremental', diff --git a/newsfragments/p4port-renderable.feature b/newsfragments/p4port-renderable.feature new file mode 100644 index 000000000000..58ab81311091 --- /dev/null +++ b/newsfragments/p4port-renderable.feature @@ -0,0 +1 @@ +``p4port`` argument of the ``P4`` step has been marked renderable.
urllib3__urllib3-1017
Multipart request headers do not work properly for values of empty string Continuing the discussion from https://github.com/sigmavirus24/requests-toolbelt/issues/162, attempting to create a `RequestField` which is then made multipart via `make_multipart` does not work properly if the filename given is an empty string. urllib3 test code: ``` from urllib3.fields import RequestField field = RequestField(name="somename", data="somedata", filename="") field.make_multipart(content_type="application/octet-stream") print(field.headers) ``` Expected output: ``` {'Content-Type': 'application/octet-stream', 'Content-Location': None, 'Content-Disposition': 'form-data; name="somename"; filename=""'} ``` Actual output: ``` {'Content-Type': 'application/octet-stream', 'Content-Location': None, 'Content-Disposition': 'form-data; name="somename"'} ``` ##
[ { "content": "from __future__ import absolute_import\nimport email.utils\nimport mimetypes\n\nfrom .packages import six\n\n\ndef guess_content_type(filename, default='application/octet-stream'):\n \"\"\"\n Guess the \"Content-Type\" of a file.\n\n :param filename:\n The filename to guess the \"C...
[ { "content": "from __future__ import absolute_import\nimport email.utils\nimport mimetypes\n\nfrom .packages import six\n\n\ndef guess_content_type(filename, default='application/octet-stream'):\n \"\"\"\n Guess the \"Content-Type\" of a file.\n\n :param filename:\n The filename to guess the \"C...
diff --git a/test/test_fields.py b/test/test_fields.py index 21b44819da..27dad92e64 100644 --- a/test/test_fields.py +++ b/test/test_fields.py @@ -36,6 +36,15 @@ def test_make_multipart(self): 'Content-Location: /test\r\n' '\r\n') + def test_make_multipart_empty_filename(self): + field = RequestField('somename', 'data', '') + field.make_multipart(content_type='application/octet-stream') + self.assertEqual( + field.render_headers(), + 'Content-Disposition: form-data; name="somename"; filename=""\r\n' + 'Content-Type: application/octet-stream\r\n' + '\r\n') + def test_render_parts(self): field = RequestField('somename', 'data') parts = field._render_parts({'name': 'value', 'filename': 'value'}) diff --git a/urllib3/fields.py b/urllib3/fields.py index 8fa2a12767..19b0ae0c88 100644 --- a/urllib3/fields.py +++ b/urllib3/fields.py @@ -130,7 +130,7 @@ def _render_parts(self, header_parts): iterable = header_parts.items() for name, value in iterable: - if value: + if value is not None: parts.append(self._render_part(name, value)) return '; '.join(parts)
RocketMap__RocketMap-2240
If path includes non-ASCII character, several things break (eg icon display) if the installation path includes a non-ASCII character, the function to deliver the icons/sprites/images fails. ## Expected Behavior path should work independently of non-ASCII characters ## Current Behavior no images get displayed ## Possible Solution possibly use functions that are UTF-8 safe ## Steps to Reproduce (for bugs) install RM into a path like $HOME/Pokémon/RocketMap and see what happens. ## Context <!--- How has this issue affected you? What are you trying to accomplish? --> <!--- Providing context helps us come up with a solution that is most useful in the real world --> ## Your Environment * Version used: latest version from git * Environment name and version (e.g. Python 2.7): python 2.7 * Operating System and version (desktop or mobile): ubuntu 16.04 server
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport logging\nimport time\nimport re\nimport ssl\nimport json\n\nfrom distutils.version import StrictVersion\n\nfrom threading import Thread, Event\nfrom queue import Queue\nfrom flask_cors import CORS\nfrom flask_cache_bus...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport logging\nimport time\nimport re\nimport ssl\nimport json\n\nfrom distutils.version import StrictVersion\n\nfrom threading import Thread, Event\nfrom queue import Queue\nfrom flask_cors import CORS\nfrom flask_cache_bus...
diff --git a/runserver.py b/runserver.py index fffd4be055..9d90e747ee 100755 --- a/runserver.py +++ b/runserver.py @@ -258,7 +258,7 @@ def main(): app = None if not args.no_server and not args.clear_db: - app = Pogom(__name__) + app = Pogom(__name__, root_path=os.path.dirname(__file__)) app.before_request(app.validate_request) app.set_current_location(position)
biopython__biopython-4399
682i.cif fails on parse of resolution to structure header ### Setup I am reporting a problem with Biopython 1.77, Python 3.8.3 (anaconda July 2020) , and CentOS 7 as follows: ```(base) [mothcw@localhost biopython]$ python Python 3.8.3 (default, Jul 2 2020, 16:21:59) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys; print(sys.version) 3.8.3 (default, Jul 2 2020, 16:21:59) [GCC 7.3.0] >>> import platform; print(platform.python_implementation()); print(platform.platform()) CPython Linux-3.10.0-1127.18.2.el7.x86_64-x86_64-with-glibc2.10 >>> import Bio; print(Bio.__version__) 1.77 ``` ### Expected behaviour 682i.cif would load, with no halting exception, with the code: ``` from Bio.PDB import MMCIFParser mmCIF_parser = MMCIFParser(QUIET=True) structure_cif = mmCIF_parser.get_structure('6g2i','6g2i.cif') ``` ### Actual behaviour Parsing fails with: Traceback (most recent call last): File "./mmcif_fail.py", line 8, in <module> structure_cif = mmCIF_parser.get_structure('6g2i','6g2i.cif') File "/home/mothcw/anaconda3/lib/python3.8/site-packages/Bio/PDB/MMCIFParser.py", line 63, in get_structure self._structure_builder.set_header(self._get_header()) File "/home/mothcw/anaconda3/lib/python3.8/site-packages/Bio/PDB/MMCIFParser.py", line 112, in _get_header self.header["resolution"] = float(self.header["resolution"]) ValueError: could not convert string to float: '.' ### Steps to reproduce 1) Download (and gunzip) 6g2i.cif from rcsb. It is a 32MB CryoEM structure. 2) Run this code: ``` $ cat mmcif_fail.py #!/usr/bin/env python """Short program to demonstrate that 6g2i.cif fails to load with biopython 1.77""" # Parse in the small 6g2i.cif file downloaded from rcsb from Bio.PDB import MMCIFParser mmCIF_parser = MMCIFParser(QUIET=True) structure_cif = mmCIF_parser.get_structure('6g2i','6g2i.cif') print("Resolution is %s"%structure_cif.header['resolution']) ``` Note the failure message. ### Towards a fix There are a couple of problems afoot here. First, line 113 or so of MMCIFParser.py is not considering _em_3d_reconstruction.resolution to find the 5.8A resolution. I have added that as a 3rd item in the search keys - and it helps. ``` self._update_header_entry( "resolution", ["_refine.ls_d_res_high", "_refine_hist.d_res_high", "_em_3d_reconstruction.resolution"] ) ``` HOWEVER, in 6g2i.cif itself there is an empty '.' entry for _**refine.ls_d_res_high**. _refine.ls_abs_structure_Rogers_esd ? _refine.ls_d_res_high **.** _refine.ls_d_res_low ? This period to right of d_res_high could be a bug in the file itself - but I am not totally sure of the regular expression for this field defined at RCSB. For me right now, I have modifed MMCIFParser.py to treat both lone ? and lone period as missing for purpose of filling in the header. The bug finally went away when I changed line 84 from: if item != "?": to if item != "?" **and item != ".":** To my eye this is redundant with the _unassigned idea of line 332. I recommend that, if this is the same kind of thing, that you centralize the notion of unassigned so we are not patching it multiple places. May I kindly/friendlysuggest that, at minumum, Biopython should be tested against all .cif files available at rcsb/wwwpdb prior to each release? This is not such a painful thing to do. I have to contend that these formally curated and deposited files should not trigger runtime exceptions like this. Idea: Perhaps more importantly for longer term, this could be yet another case where biopython is stuck in a legacy .PDB-oriented worldview. Perhaps we need to stop initializing 'header' when working with MMCIF. For MMCIF files, the parsing of the .cif into the dictionary should be the central/main event, and not have a side-effect of initializing a legacy 'header' (that attempts to recreate PDB REMARK entries). Once the dictionary is parsed, conversion to a Structure for those who want model/chain/residue/atom traversal might be interesting. But, resolution should come from the parsed in dictionary - and not be set by code trying to replicate the old REMARK RESOLUTION of the PDB.
[ { "content": "# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n\n\"\"\"mmCIF parsers.\"\"\"\n\n\nimport numpy as np\nimport warn...
[ { "content": "# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n\n\"\"\"mmCIF parsers.\"\"\"\n\n\nimport numpy as np\nimport warn...
diff --git a/Bio/PDB/MMCIFParser.py b/Bio/PDB/MMCIFParser.py index c98388119fb..2cab625057a 100644 --- a/Bio/PDB/MMCIFParser.py +++ b/Bio/PDB/MMCIFParser.py @@ -93,7 +93,7 @@ def _update_header_entry(self, target_key, keys): item = val[0] except (TypeError, IndexError): continue - if item != "?": + if item != "?" and item != ".": self.header[target_key] = item break diff --git a/NEWS.rst b/NEWS.rst index 78e8fe851da..05b2b836fad 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -57,6 +57,8 @@ methods matching those added to strings in Python 3.9. They also now have a ``search`` method to ``Seq`` and ``MutableSeq`` object to search for multiple subsequences at the same time. +The MMCIFParser now ignores '.' header values. + Calling ``set_angle()`` on a residue dihedral angle previously set only the specified angle, now the default behavior is to update overlapping angles as well. For example, setting Psi (N-CA-CN) now updates the diff --git a/Tests/PDB/1SSU_mod.cif b/Tests/PDB/1SSU_mod.cif index c2f82e1a211..f6c7b86766a 100644 --- a/Tests/PDB/1SSU_mod.cif +++ b/Tests/PDB/1SSU_mod.cif @@ -2,6 +2,7 @@ data_1SSU # _refine.ls_d_res_high . _refine.ls_d_res_low ? +_em_3d_reconstruction.resolution 4.1 # loop_ _atom_site.group_PDB diff --git a/Tests/test_PDB_MMCIFParser.py b/Tests/test_PDB_MMCIFParser.py index 417262aa768..a1d5f6ee4d8 100644 --- a/Tests/test_PDB_MMCIFParser.py +++ b/Tests/test_PDB_MMCIFParser.py @@ -349,9 +349,10 @@ def test_header(self): self.assertEqual("X-RAY DIFFRACTION", structure.header["structure_method"]) self.assertEqual(1.7, structure.header["resolution"]) - # test not confused by '.' + # test not confused by '.' or '?' structure = parser.get_structure("example", "PDB/1SSU_mod.cif") - self.assertIsNone(structure.header["resolution"]) + # self.assertIsNone(structure.header["resolution"]) + self.assertEqual(4.1, structure.header["resolution"]) class CIFtoPDB(unittest.TestCase):
huggingface__transformers-13493
Handling tag with no prefix for aggregation_strategy in TokenClassificationPipeline # 🚀 Feature request Previously the parameter grouped_entities would handle entity with no prefix (like "PER" instead of "B-PER") and would correctly group similar entities next to each others. With the new parameter aggregation_strategy, this is not the case anymore. ## Motivation In some simple models, the prefix add some complexity that is not always required. Because of this we are forced to add a prefix to make aggregation works even if not required by the model. ## Your contribution
[ { "content": "import warnings\nfrom typing import TYPE_CHECKING, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom ..file_utils import ExplicitEnum, add_end_docstrings, is_tf_available, is_torch_available\nfrom ..modelcard import ModelCard\nfrom ..models.bert.tokenization_bert import BasicTokenizer\nfr...
[ { "content": "import warnings\nfrom typing import TYPE_CHECKING, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom ..file_utils import ExplicitEnum, add_end_docstrings, is_tf_available, is_torch_available\nfrom ..modelcard import ModelCard\nfrom ..models.bert.tokenization_bert import BasicTokenizer\nfr...
diff --git a/src/transformers/pipelines/token_classification.py b/src/transformers/pipelines/token_classification.py index 6fc1de1dcb38..4a7bbeb77f7a 100644 --- a/src/transformers/pipelines/token_classification.py +++ b/src/transformers/pipelines/token_classification.py @@ -411,7 +411,8 @@ def get_tag(self, entity_name: str) -> Tuple[str, str]: tag = entity_name[2:] else: # It's not in B-, I- format - bi = "B" + # Default to I- for continuation. + bi = "I" tag = entity_name return bi, tag diff --git a/tests/test_pipelines_token_classification.py b/tests/test_pipelines_token_classification.py index b8b572e51782..dcb4a2e53573 100644 --- a/tests/test_pipelines_token_classification.py +++ b/tests/test_pipelines_token_classification.py @@ -318,6 +318,59 @@ def test_aggregation_strategy_byte_level_tokenizer(self): ], ) + @require_torch + def test_aggregation_strategy_no_b_i_prefix(self): + model_name = "sshleifer/tiny-dbmdz-bert-large-cased-finetuned-conll03-english" + tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True) + token_classifier = pipeline(task="ner", model=model_name, tokenizer=tokenizer, framework="pt") + # Just to understand scores indexes in this test + token_classifier.model.config.id2label = {0: "O", 1: "MISC", 2: "PER", 3: "ORG", 4: "LOC"} + example = [ + { + # fmt : off + "scores": np.array([0, 0, 0, 0, 0.9968166351318359]), + "index": 1, + "is_subword": False, + "word": "En", + "start": 0, + "end": 2, + }, + { + # fmt : off + "scores": np.array([0, 0, 0, 0, 0.9957635998725891]), + "index": 2, + "is_subword": True, + "word": "##zo", + "start": 2, + "end": 4, + }, + { + # fmt: off + "scores": np.array([0, 0, 0, 0.9986497163772583, 0]), + # fmt: on + "index": 7, + "word": "UN", + "is_subword": False, + "start": 11, + "end": 13, + }, + ] + self.assertEqual( + nested_simplify(token_classifier.aggregate(example, AggregationStrategy.NONE)), + [ + {"end": 2, "entity": "LOC", "score": 0.997, "start": 0, "word": "En", "index": 1}, + {"end": 4, "entity": "LOC", "score": 0.996, "start": 2, "word": "##zo", "index": 2}, + {"end": 13, "entity": "ORG", "score": 0.999, "start": 11, "word": "UN", "index": 7}, + ], + ) + self.assertEqual( + nested_simplify(token_classifier.aggregate(example, AggregationStrategy.SIMPLE)), + [ + {"entity_group": "LOC", "score": 0.996, "word": "Enzo", "start": 0, "end": 4}, + {"entity_group": "ORG", "score": 0.999, "word": "UN", "start": 11, "end": 13}, + ], + ) + @require_torch def test_aggregation_strategy(self): model_name = "sshleifer/tiny-dbmdz-bert-large-cased-finetuned-conll03-english"
pyca__cryptography-2436
Add __repr__ for x509.Extensions x509.Extensions should have a **repr**
[ { "content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport abc\nimport hashlib\nimport ipaddress\...
[ { "content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport abc\nimport hashlib\nimport ipaddress\...
diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py index cd75ecdc255e..46ba5a28dd56 100644 --- a/src/cryptography/x509/extensions.py +++ b/src/cryptography/x509/extensions.py @@ -104,6 +104,11 @@ def __iter__(self): def __len__(self): return len(self._extensions) + def __repr__(self): + return ( + "<Extensions({0})>".format(self._extensions) + ) + @utils.register_interface(ExtensionType) class AuthorityKeyIdentifier(object): diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index 1bc14620bcde..8f4693666561 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -857,6 +857,20 @@ def test_one_extension_get_for_class(self, backend): assert ext is not None assert isinstance(ext.value, x509.BasicConstraints) + def test_repr(self, backend): + cert = _load_cert( + os.path.join( + "x509", "custom", "basic_constraints_not_critical.pem" + ), + x509.load_pem_x509_certificate, + backend + ) + assert repr(cert.extensions) == ( + "<Extensions([<Extension(oid=<ObjectIdentifier(oid=2.5.29.19, name" + "=basicConstraints)>, critical=False, value=<BasicConstraints(ca=F" + "alse, path_length=None)>)>])>" + ) + @pytest.mark.requires_backend_interface(interface=RSABackend) @pytest.mark.requires_backend_interface(interface=X509Backend)
ckan__ckan-7808
[Snyk] Security upgrade certifi from 2021.10.8 to 2023.7.22 <p>This PR was automatically created by Snyk using the credentials of a real user.</p><br /><h3>Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.</h3> #### Changes included in this PR - Changes to the following files to upgrade the vulnerable dependencies to a fixed version: - requirements.txt #### Vulnerabilities that will be fixed ##### By pinning: Severity | Priority Score (*) | Issue | Upgrade | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:-------------------------|:------------------------- ![low severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/l.png "low severity") | **471/1000** <br/> **Why?** Recently disclosed, Has a fix available, CVSS 3.7 | Improper Following of a Certificate&#x27;s Chain of Trust <br/>[SNYK-PYTHON-CERTIFI-5805047](https://snyk.io/vuln/SNYK-PYTHON-CERTIFI-5805047) | `certifi:` <br> `2021.10.8 -> 2023.7.22` <br> | No | No Known Exploit (*) Note that the real score may have changed since the PR was raised. Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded. Check the changes in this PR to ensure they won't cause issues with your project. ------------ **Note:** *You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.* For more information: <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI0ZDYxMTQxYy02YTc4LTRjMTctYmU3ZS02OTQ4YjlmODQzMTAiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjRkNjExNDFjLTZhNzgtNGMxNy1iZTdlLTY5NDhiOWY4NDMxMCJ9fQ==" width="0" height="0"/> 🧐 [View latest project report](https://app.snyk.io/org/wardi/project/7696de9f-5904-4fe5-8767-91ee8e4d2b04?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;fix-pr) 🛠 [Adjust project settings](https://app.snyk.io/org/wardi/project/7696de9f-5904-4fe5-8767-91ee8e4d2b04?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;fix-pr/settings) 📚 [Read more about Snyk's upgrade and patch logic](https://support.snyk.io/hc/en-us/articles/360003891078-Snyk-patches-to-fix-vulnerabilities) [//]: # (snyk:metadata:{"prId":"4d61141c-6a78-4c17-be7e-6948b9f84310","prPublicId":"4d61141c-6a78-4c17-be7e-6948b9f84310","dependencies":[{"name":"certifi","from":"2021.10.8","to":"2023.7.22"}],"packageManager":"pip","projectPublicId":"7696de9f-5904-4fe5-8767-91ee8e4d2b04","projectUrl":"https://app.snyk.io/org/wardi/project/7696de9f-5904-4fe5-8767-91ee8e4d2b04?utm_source=github&utm_medium=referral&page=fix-pr","type":"auto","patch":[],"vulns":["SNYK-PYTHON-CERTIFI-5805047"],"upgrade":[],"isBreakingChange":false,"env":"prod","prType":"fix","templateVariants":["updated-fix-title","priorityScore"],"priorityScoreList":[471],"remediationStrategy":"vuln"}) --- **Learn how to fix vulnerabilities with free interactive lessons:** 🦉 [Learn about vulnerability in an interactive lesson of Snyk Learn.](https://learn.snyk.io/?loc&#x3D;fix-pr)
[ { "content": "#!/usr/bin/env python\n# encoding: utf-8\n\nu'''\nAsynchronous background jobs.\n\nNote that most job management functions are not available from this\nmodule but via the various ``job_*`` API functions.\n\nInternally, RQ queue names are prefixed with a string containing the\nCKAN site ID to avoid...
[ { "content": "#!/usr/bin/env python\n# encoding: utf-8\n\nu'''\nAsynchronous background jobs.\n\nNote that most job management functions are not available from this\nmodule but via the various ``job_*`` API functions.\n\nInternally, RQ queue names are prefixed with a string containing the\nCKAN site ID to avoid...
diff --git a/changes/7808.misc b/changes/7808.misc new file mode 100644 index 00000000000..07793606004 --- /dev/null +++ b/changes/7808.misc @@ -0,0 +1 @@ +Because of a new version of Sphinx, the command to rebuild the documentation is now ``sphinx-build doc build/sphinx`` diff --git a/ckan/lib/jobs.py b/ckan/lib/jobs.py index 8d9c0945fb0..641df60a470 100644 --- a/ckan/lib/jobs.py +++ b/ckan/lib/jobs.py @@ -287,7 +287,7 @@ def execute_job(self, job: Job, *args: Any, **kwargs: Any) -> None: meta.engine.dispose() # The original implementation performs the actual fork - queue = remove_queue_name_prefix(cast(str, job.origin)) + queue = remove_queue_name_prefix(job.origin) if not job.meta: job.meta = {} diff --git a/ckan/tests/test_coding_standards.py b/ckan/tests/test_coding_standards.py index 2b7a70ff1ed..b7f6f0e58d0 100644 --- a/ckan/tests/test_coding_standards.py +++ b/ckan/tests/test_coding_standards.py @@ -233,7 +233,7 @@ def test_building_the_docs(): """ try: output = subprocess.check_output( - [b"python", b"setup.py", b"build_sphinx"], stderr=subprocess.STDOUT + [b"sphinx-build", b"doc", b"build/sphinx"], stderr=subprocess.STDOUT ) except subprocess.CalledProcessError as err: assert ( diff --git a/dev-requirements.txt b/dev-requirements.txt index 5d9b83ce5e7..1ea7c6e7b73 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,24 +3,24 @@ beautifulsoup4==4.12.2 cookiecutter==2.1.1 coveralls #Let Unpinned - Requires latest coveralls -docutils==0.18 -Faker==18.5.1 -factory-boy==3.2.1 +docutils==0.18.1 # Needed until sphinx-rtd-theme 2.0 is out +Faker==19.6.2 +factory-boy==3.3.0 flask-debugtoolbar==0.13.1 freezegun==1.2.2 ipdb==0.13.13 -pip-tools==6.13.0 -Pillow==9.5.0 -responses==0.23.1 -sphinx-rtd-theme==1.2.0 +pip-tools==7.3.0 +Pillow==10.0.1 +responses==0.23.3 +sphinx-rtd-theme==1.3.0 sqlalchemy-stubs==0.4 -sphinx==5.3.0 +sphinx==7.1.2 toml==0.10.2 towncrier==22.12.0 -pytest==7.3.1 -pytest-cov==4.0.0 +pytest==7.4.2 +pytest-cov==4.1.0 pytest-factoryboy==2.5.1 pytest-freezegun==0.4.2 -pytest-rerunfailures==11.1.2 +pytest-rerunfailures==12.0 pytest-split==0.8.1 diff --git a/doc/contributing/documentation.rst b/doc/contributing/documentation.rst index 16da3f6b714..03bc4992eec 100644 --- a/doc/contributing/documentation.rst +++ b/doc/contributing/documentation.rst @@ -83,7 +83,7 @@ Build the docs You should now be able to build the CKAN documentation locally. Make sure your virtual environment is activated, and then run this command:: - python setup.py build_sphinx + sphinx-build doc build/sphinx Now you can open the built HTML files in ``build/sphinx/html``, e.g.:: @@ -96,7 +96,7 @@ Edit the reStructuredText files To make changes to the documentation, use a text editor to edit the ``.rst`` files in ``doc/``. Save your changes and then build the docs -again (``python setup.py build_sphinx``) and open the HTML files in a web +again (``sphinx-build doc build/sphinx``) and open the HTML files in a web browser to preview your changes. Once your docs are ready to submit to the CKAN project, follow the steps in @@ -216,7 +216,7 @@ any new ones. It's best to delete the ``build`` directory and completely rebuild the docs, to check for any warnings:: - rm -rf build; python setup.py build_sphinx + rm -rf build; sphinx-build doc build/sphinx Maximum line length diff --git a/doc/contributing/release-process.rst b/doc/contributing/release-process.rst index ded71dd69f1..9a65228f6bd 100644 --- a/doc/contributing/release-process.rst +++ b/doc/contributing/release-process.rst @@ -349,7 +349,7 @@ a release. #. Check that the docs compile correctly:: rm build/sphinx -rf - python setup.py build_sphinx + sphinx-build doc build/sphinx #. Remove the beta letter in the version number. diff --git a/requirements.in b/requirements.in index cdd0fb69a0f..7cf91a1370b 100644 --- a/requirements.in +++ b/requirements.in @@ -1,38 +1,39 @@ # The file contains the direct ckan requirements (python3). # Use pip-compile to create a requirements.txt file from this -alembic==1.10.4 +alembic==1.12.0 Babel==2.12.1 Beaker==1.12.1 bleach==6.0.0 blinker==1.6.2 -click==8.1.3 -dominate==2.7.0 +certifi>=2023.7.22 +click==8.1.7 +dominate==2.8.0 feedgen==0.9.0 -Flask==2.3.1 +Flask==2.3.3 Flask-Babel==3.1.0 Flask-Login==0.6.2 Flask-WTF==1.1.1 # For Python 3.11 support greenlet==2.0.2 Jinja2==3.1.2 -Markdown==3.4.3 +Markdown==3.4.4 passlib==1.7.4 polib==1.2.0 -psycopg2==2.9.6 -PyJWT==2.6.0 +psycopg2==2.9.7 +PyJWT==2.8.0 python-magic==0.4.27 pysolr==3.9.0 python-dateutil==2.8.2 pytz PyUtilib==6.0.0 -pyyaml==6.0 -requests==2.29.0 -rq==1.13.0 -simplejson==3.17.6 -SQLAlchemy[mypy]==1.4.47 +pyyaml==6.0.1 +requests==2.31.0 +rq==1.15.1 +simplejson==3.19.1 +SQLAlchemy[mypy]==1.4.49 sqlparse==0.4.4 -typing_extensions==4.5.0 -tzlocal==4.3 +typing_extensions==4.8.0 +tzlocal==5.0.1 webassets==2.0 -Werkzeug[watchdog]==2.3.1 +Werkzeug[watchdog]==2.3.7 zope.interface==6.0 diff --git a/requirements.txt b/requirements.txt index 95515ecde42..d913217cf6c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,17 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # pip-compile requirements.in # -alembic==1.10.4 +alembic==1.12.0 # via -r requirements.in babel==2.12.1 # via # -r requirements.in # flask-babel +backports-zoneinfo==0.2.1 + # via tzlocal beaker==1.12.1 # via -r requirements.in bleach==6.0.0 @@ -18,22 +20,24 @@ blinker==1.6.2 # via # -r requirements.in # flask -certifi==2021.10.8 - # via requests +certifi==2023.7.22 + # via + # -r requirements.in + # requests charset-normalizer==2.0.12 # via requests -click==8.1.3 +click==8.1.7 # via # -r requirements.in # flask # rq deprecated==1.2.13 # via redis -dominate==2.7.0 +dominate==2.8.0 # via -r requirements.in feedgen==0.9.0 # via -r requirements.in -flask==2.3.1 +flask==2.3.3 # via # -r requirements.in # flask-babel @@ -53,8 +57,11 @@ idna==3.3 # via requests importlib-metadata==6.3.0 # via + # alembic # flask # markdown +importlib-resources==6.1.0 + # via alembic itsdangerous==2.1.2 # via # flask @@ -68,7 +75,7 @@ lxml==4.9.1 # via feedgen mako==1.2.2 # via alembic -markdown==3.4.3 +markdown==3.4.4 # via -r requirements.in markupsafe==2.1.1 # via @@ -88,9 +95,9 @@ passlib==1.7.4 # via -r requirements.in polib==1.2.0 # via -r requirements.in -psycopg2==2.9.6 +psycopg2==2.9.7 # via -r requirements.in -pyjwt==2.6.0 +pyjwt==2.8.0 # via -r requirements.in pyparsing==3.0.7 # via packaging @@ -105,29 +112,28 @@ python-magic==0.4.27 pytz==2022.7.1 # via # -r requirements.in + # babel # flask-babel -pytz-deprecation-shim==0.1.0.post0 - # via tzlocal pyutilib==6.0.0 # via -r requirements.in -pyyaml==6.0 +pyyaml==6.0.1 # via -r requirements.in redis==4.1.4 # via rq -requests==2.29.0 +requests==2.31.0 # via # -r requirements.in # pysolr -rq==1.13.0 +rq==1.15.1 # via -r requirements.in -simplejson==3.17.6 +simplejson==3.19.1 # via -r requirements.in six==1.16.0 # via # bleach # python-dateutil # pyutilib -sqlalchemy[mypy]==1.4.47 +sqlalchemy[mypy]==1.4.49 # via # -r requirements.in # alembic @@ -137,15 +143,13 @@ sqlparse==0.4.4 # via -r requirements.in tomli==2.0.1 # via mypy -typing-extensions==4.5.0 +typing-extensions==4.8.0 # via # -r requirements.in # alembic # mypy # sqlalchemy2-stubs -tzdata==2022.1 - # via pytz-deprecation-shim -tzlocal==4.3 +tzlocal==5.0.1 # via -r requirements.in urllib3==1.26.9 # via requests @@ -155,7 +159,7 @@ webassets==2.0 # via -r requirements.in webencodings==0.5.1 # via bleach -werkzeug[watchdog]==2.3.1 +werkzeug[watchdog]==2.3.7 # via # -r requirements.in # flask @@ -165,7 +169,9 @@ wrapt==1.14.0 wtforms==3.0.1 # via flask-wtf zipp==3.15.0 - # via importlib-metadata + # via + # importlib-metadata + # importlib-resources zope-interface==6.0 # via -r requirements.in
python-poetry__poetry-1577
poetry v1.0.0b4 breaks on zip packages <!-- Checked checkbox should look like this: [x] --> - [x] I am on the [latest](https://github.com/sdispater/poetry/releases/latest) Poetry version. - [x] I have searched the [issues](https://github.com/sdispater/poetry/issues) of this repo and believe that this is not a duplicate. - [x] If an exception occurs when executing a command, I executed it again in debug mode (`-vvv` option). - **OS version and name**: Windows 10 with a virtual environment for Python v3.7.4 - **Poetry version**: 1.0.0b4 - **Link of a [Gist](https://gist.github.com/) with the contents of your pyproject.toml file**: (empty project) ## Issue Summary The newly refactored distribution loading mechanism from [PR 1549](https://github.com/sdispater/poetry/pull/1549/) fails when a zip-based package is present. The presenting problem is that the `zipp.Path` class is not compatible with the `__fspath__` protocol. ## Issue Details After updating to Poetry v1.0.0b4, I get this traceback ``` % poetry update -v Using virtualenv: C:\Users\garyd\devel\video-storage\venv-new [TypeError] expected str, bytes or os.PathLike object, not Path Traceback (most recent call last): File "C:\Users\garyd\.poetry\lib\poetry\_vendor\py3.7\clikit\console_application.py", line 131, in run status_code = command.handle(parsed_args, io) File "C:\Users\garyd\.poetry\lib\poetry\_vendor\py3.7\clikit\api\command\command.py", line 120, in handle status_code = self._do_handle(args, io) File "C:\Users\garyd\.poetry\lib\poetry\_vendor\py3.7\clikit\api\command\command.py", line 171, in _do_handle return getattr(handler, handler_method)(args, io, self) File "C:\Users\garyd\.poetry\lib\poetry\_vendor\py3.7\cleo\commands\command.py", line 92, in wrap_handle return self.handle() File "C:\Users\garyd\.poetry\lib\poetry\console\commands\update.py", line 36, in handle self.io, self.env, self.poetry.package, self.poetry.locker, self.poetry.pool File "C:\Users\garyd\.poetry\lib\poetry\installation\installer.py", line 55, in __init__ installed = self._get_installed() File "C:\Users\garyd\.poetry\lib\poetry\installation\installer.py", line 507, in _get_installed return InstalledRepository.load(self._env) File "C:\Users\garyd\.poetry\lib\poetry\repositories\installed_repository.py", line 30, in load path = Path(distribution._path) File "C:\Users\garyd\AppData\Local\Programs\Python\Python37\lib\pathlib.py", line 1010, in __new__ self = cls._from_parts(args, init=False) ``` When I run the broken part of the code in my console, I find that the broken distribution is: * type == <class 'importlib_metadata.PathDistribution'> * type(dist._path) == <class 'zipp.Path'> * dist._path == C:\Users\garyd\devel\video-storage\venv\lib\site-packages\setuptools-40.8.0-py3.7.egg/EGG-INFO/
[ { "content": "from importlib_metadata import distributions\nfrom poetry.packages import Package\nfrom poetry.utils._compat import Path\nfrom poetry.utils.env import Env\n\nfrom .repository import Repository\n\n\nclass InstalledRepository(Repository):\n @classmethod\n def load(cls, env): # type: (Env) -> ...
[ { "content": "from importlib_metadata import distributions\nfrom poetry.packages import Package\nfrom poetry.utils._compat import Path\nfrom poetry.utils.env import Env\n\nfrom .repository import Repository\n\n\nclass InstalledRepository(Repository):\n @classmethod\n def load(cls, env): # type: (Env) -> ...
diff --git a/.gitignore b/.gitignore index b0c49d1474d..c2d2a72090e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # Packages *.egg +!/tests/**/*.egg /*.egg-info /tests/fixtures/**/*.egg-info /dist/* diff --git a/poetry/repositories/installed_repository.py b/poetry/repositories/installed_repository.py index b0f5330d097..cb8cdf3f27c 100644 --- a/poetry/repositories/installed_repository.py +++ b/poetry/repositories/installed_repository.py @@ -27,7 +27,7 @@ def load(cls, env): # type: (Env) -> InstalledRepository repo.add_package(package) - path = Path(distribution._path) + path = Path(str(distribution._path)) is_standard_package = True try: path.relative_to(env.site_packages) diff --git a/tests/repositories/fixtures/installed/lib/python3.7/site-packages/foo-0.1.0-py3.8.egg b/tests/repositories/fixtures/installed/lib/python3.7/site-packages/foo-0.1.0-py3.8.egg new file mode 100644 index 00000000000..e5bf8f5683c Binary files /dev/null and b/tests/repositories/fixtures/installed/lib/python3.7/site-packages/foo-0.1.0-py3.8.egg differ diff --git a/tests/repositories/test_installed_repository.py b/tests/repositories/test_installed_repository.py index 1ba76c733c5..19d6c65cc98 100644 --- a/tests/repositories/test_installed_repository.py +++ b/tests/repositories/test_installed_repository.py @@ -1,3 +1,5 @@ +import zipp + from importlib_metadata import PathDistribution from poetry.repositories.installed_repository import InstalledRepository from poetry.utils._compat import Path @@ -11,6 +13,7 @@ INSTALLED_RESULTS = [ PathDistribution(SITE_PACKAGES / "cleo-0.7.6.dist-info"), PathDistribution(SRC / "pendulum" / "pendulum.egg-info"), + PathDistribution(zipp.Path(str(SITE_PACKAGES / "foo-0.1.0-py3.8.egg"), "EGG-INFO")), ] @@ -37,7 +40,7 @@ def test_load(mocker): ) repository = InstalledRepository.load(MockEnv(path=ENV_DIR)) - assert len(repository.packages) == 2 + assert len(repository.packages) == 3 cleo = repository.packages[0] assert cleo.name == "cleo" @@ -47,7 +50,11 @@ def test_load(mocker): == "Cleo allows you to create beautiful and testable command-line interfaces." ) - pendulum = repository.packages[1] + foo = repository.packages[1] + assert foo.name == "foo" + assert foo.version.text == "0.1.0" + + pendulum = repository.packages[2] assert pendulum.name == "pendulum" assert pendulum.version.text == "2.0.5" assert pendulum.description == "Python datetimes made easy"
streamlink__streamlink-5023
plugins.vtvgo: '403 Client Error: Forbidden for url: ...' ### Checklist - [X] This is a plugin issue and not a different kind of issue - [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink) - [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22) - [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master) ### Streamlink version Latest build from the master branch ### Description Last month VtvGo added cookie requirements for the stream playlist, and now it seems that they added another security layer. The request to the website returns error 403. ### Debug log ```text streamlink https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html --loglevel=debug [cli][debug] OS: Linux-5.15.0-53-generic-x86_64-with-glibc2.35 [cli][debug] Python: 3.10.6 [cli][debug] Streamlink: 5.1.2+4.g68dad105 [cli][debug] Dependencies: [cli][debug] certifi: 2022.9.24 [cli][debug] isodate: 0.6.1 [cli][debug] lxml: 4.9.1 [cli][debug] pycountry: 22.3.5 [cli][debug] pycryptodome: 3.15.0 [cli][debug] PySocks: 1.7.1 [cli][debug] requests: 2.28.1 [cli][debug] urllib3: 1.26.12 [cli][debug] websocket-client: 1.4.1 [cli][debug] importlib-metadata: 4.6.4 [cli][debug] Arguments: [cli][debug] url=https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html [cli][debug] --loglevel=debug [cli][info] Found matching plugin vtvgo for URL https://vtvgo.vn/xem-truc-tuyen-kenh-vtv3-3.html error: Unable to open URL: https://vtvgo.vn/ajax-get-stream (403 Client Error: Forbidden for url: https://vtvgo.vn/ajax-get-stream) ```
[ { "content": "\"\"\"\n$description Live TV channels from VTV, a Vietnamese public, state-owned broadcaster.\n$url vtvgo.vn\n$type live\n\"\"\"\n\nimport logging\nimport re\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream.hls import HLSStr...
[ { "content": "\"\"\"\n$description Live TV channels from VTV, a Vietnamese public, state-owned broadcaster.\n$url vtvgo.vn\n$type live\n\"\"\"\n\nimport logging\nimport re\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream.hls import HLSStr...
diff --git a/src/streamlink/plugins/vtvgo.py b/src/streamlink/plugins/vtvgo.py index 160a82eadb4..143295d544c 100644 --- a/src/streamlink/plugins/vtvgo.py +++ b/src/streamlink/plugins/vtvgo.py @@ -27,6 +27,7 @@ def _get_streams(self): self.session.http.headers.update({ "Origin": "https://vtvgo.vn", "Referer": self.url, + "Sec-Fetch-Site": "same-origin", "X-Requested-With": "XMLHttpRequest", })
opendatacube__datacube-core-969
"datacube system init" fails when postgres user includes hyphen ### Expected behaviour Running `datacube system init` should init the postgres database, even if the postgres username includes a hyphen. ### Actual behaviour The init fails, causing issues with the sqlalchemy/psycopg2 driver. It looks like it's passing the username string with `"` marks included? Here is a trace: ``` Initialising database... Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1284, in _execute_context cursor, statement, parameters, context File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute cursor.execute(statement, parameters) psycopg2.errors.SyntaxError: zero-length delimited identifier at or near """" LINE 1: set role ""ssdl-admin"" ^ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/opt/conda/bin/datacube", line 10, in <module> sys.exit(cli()) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/opt/conda/lib/python3.6/site-packages/datacube/ui/click.py", line 197, in new_func return f(parsed_config, *args, **kwargs) File "/opt/conda/lib/python3.6/site-packages/datacube/ui/click.py", line 229, in with_index return f(index, *args, **kwargs) File "/opt/conda/lib/python3.6/site-packages/datacube/scripts/system.py", line 48, in database_init with_permissions=init_users) File "/opt/conda/lib/python3.6/site-packages/datacube/index/index.py", line 60, in init_db is_new = self._db.init(with_permissions=with_permissions) File "/opt/conda/lib/python3.6/site-packages/datacube/drivers/postgres/_connections.py", line 180, in init is_new = _core.ensure_db(self._engine, with_permissions=with_permissions) File "/opt/conda/lib/python3.6/site-packages/datacube/drivers/postgres/_core.py", line 88, in ensure_db c.execute('set role "{}"'.format(quoted_user)) File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1012, in execute return self._execute_text(object_, multiparams, params) File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1187, in _execute_text parameters, File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1324, in _execute_context e, statement, parameters, cursor, context File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1518, in _handle_dbapi_exception sqlalchemy_exception, with_traceback=exc_info[2], from_=e File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_ raise exception File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1284, in _execute_context cursor, statement, parameters, context File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.errors.SyntaxError) zero-length delimited identifier at or near """" LINE 1: set role ""ssdl-admin"" ^ [SQL: set role ""ssdl-admin""] (Background on this error at: http://sqlalche.me/e/f405) ``` ### Steps to reproduce the behaviour Run `datacube system init` with a postgres user including a hyphen, such as `ssdl-admin`. ### Environment information * Which ``datacube --version`` are you using? Open Data Cube core, version 1.8.0 * What datacube deployment/enviornment are you running against? Self-hosted "datacube system init" fails when postgres user includes hyphen ### Expected behaviour Running `datacube system init` should init the postgres database, even if the postgres username includes a hyphen. ### Actual behaviour The init fails, causing issues with the sqlalchemy/psycopg2 driver. It looks like it's passing the username string with `"` marks included? Here is a trace: ``` Initialising database... Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1284, in _execute_context cursor, statement, parameters, context File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute cursor.execute(statement, parameters) psycopg2.errors.SyntaxError: zero-length delimited identifier at or near """" LINE 1: set role ""ssdl-admin"" ^ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/opt/conda/bin/datacube", line 10, in <module> sys.exit(cli()) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/opt/conda/lib/python3.6/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/opt/conda/lib/python3.6/site-packages/datacube/ui/click.py", line 197, in new_func return f(parsed_config, *args, **kwargs) File "/opt/conda/lib/python3.6/site-packages/datacube/ui/click.py", line 229, in with_index return f(index, *args, **kwargs) File "/opt/conda/lib/python3.6/site-packages/datacube/scripts/system.py", line 48, in database_init with_permissions=init_users) File "/opt/conda/lib/python3.6/site-packages/datacube/index/index.py", line 60, in init_db is_new = self._db.init(with_permissions=with_permissions) File "/opt/conda/lib/python3.6/site-packages/datacube/drivers/postgres/_connections.py", line 180, in init is_new = _core.ensure_db(self._engine, with_permissions=with_permissions) File "/opt/conda/lib/python3.6/site-packages/datacube/drivers/postgres/_core.py", line 88, in ensure_db c.execute('set role "{}"'.format(quoted_user)) File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1012, in execute return self._execute_text(object_, multiparams, params) File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1187, in _execute_text parameters, File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1324, in _execute_context e, statement, parameters, cursor, context File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1518, in _handle_dbapi_exception sqlalchemy_exception, with_traceback=exc_info[2], from_=e File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_ raise exception File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1284, in _execute_context cursor, statement, parameters, context File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (psycopg2.errors.SyntaxError) zero-length delimited identifier at or near """" LINE 1: set role ""ssdl-admin"" ^ [SQL: set role ""ssdl-admin""] (Background on this error at: http://sqlalche.me/e/f405) ``` ### Steps to reproduce the behaviour Run `datacube system init` with a postgres user including a hyphen, such as `ssdl-admin`. ### Environment information * Which ``datacube --version`` are you using? Open Data Cube core, version 1.8.0 * What datacube deployment/enviornment are you running against? Self-hosted
[ { "content": "# coding=utf-8\n\"\"\"\nCore SQL schema settings.\n\"\"\"\n\nimport logging\n\nfrom sqlalchemy import MetaData\nfrom sqlalchemy.engine import Engine\nfrom sqlalchemy.schema import CreateSchema\n\nfrom datacube.drivers.postgres.sql import TYPES_INIT_SQL, pg_exists, pg_column_exists, escape_pg_ident...
[ { "content": "# coding=utf-8\n\"\"\"\nCore SQL schema settings.\n\"\"\"\n\nimport logging\n\nfrom sqlalchemy import MetaData\nfrom sqlalchemy.engine import Engine\nfrom sqlalchemy.schema import CreateSchema\n\nfrom datacube.drivers.postgres.sql import TYPES_INIT_SQL, pg_exists, pg_column_exists, escape_pg_ident...
diff --git a/datacube/drivers/postgres/_core.py b/datacube/drivers/postgres/_core.py index bef0164447..7594409149 100644 --- a/datacube/drivers/postgres/_core.py +++ b/datacube/drivers/postgres/_core.py @@ -85,7 +85,7 @@ def ensure_db(engine, with_permissions=True): raise finally: if with_permissions: - c.execute('set role "{}"'.format(quoted_user)) + c.execute('set role {}'.format(quoted_user)) if with_permissions: _LOG.info('Adding role grants.')
pypi__warehouse-3928
Missing legacy redirection from pypi.python.org/pypi/ **Describe the bug** Redirections from `https://pypi.python.org/pypi/` are not handled (only redirected to `https://pypi.org/pypi/` by varnish (fastly)). As https://pypi.org/pypi/ does not exists, it creates some broken links. **Expected behavior** A 301 to `https://pypi.org/`, simply. **To Reproduce** ```$ curl -sI https://pypi.python.org/pypi/ HTTP/2 301 server: Varnish retry-after: 0 location: https://pypi.org/pypi/ [...redacted for readability...] ```
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
diff --git a/tests/unit/test_routes.py b/tests/unit/test_routes.py index c7cac6878c54..14dfc2223236 100644 --- a/tests/unit/test_routes.py +++ b/tests/unit/test_routes.py @@ -292,6 +292,7 @@ def add_policy(name, filename): "/project/{name}/{version}/", domain=warehouse, ), + pretend.call("/pypi/", "/", domain=warehouse), pretend.call( "/packages/{path:.*}", "https://files.example.com/packages/{path}", diff --git a/warehouse/routes.py b/warehouse/routes.py index 3fb33293af20..0f9434750108 100644 --- a/warehouse/routes.py +++ b/warehouse/routes.py @@ -330,6 +330,7 @@ def includeme(config): "/project/{name}/{version}/", domain=warehouse, ) + config.add_redirect("/pypi/", "/", domain=warehouse) config.add_redirect("/packages/{path:.*}", files_url, domain=warehouse) # Legacy Action Redirects
StackStorm__st2-3408
st2kv does not resolve in Jinja cast expression In the rule: ` {{ "2" | int }} - 2` Dah `{{ trigger.count | int }} -> 2` OK `{{ st2kv.system.count | int }} -> 0` Wrong.
[ { "content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"Li...
[ { "content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"Li...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0a0c16f8bd..43cc9922dd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -61,6 +61,7 @@ in development * ``st2 role-assignment get <role assignment id>`` * Update ``/v1/rbac/roles`` API endpoint so it includes corresponding permission grant objects. Previously it only included permission grant ids. (improvement) +* Fix a bug where keyvalue objects weren't properly cast to numeric types. (bug fix) 2.2.1 - April 3, 2017 --------------------- diff --git a/st2common/st2common/services/keyvalues.py b/st2common/st2common/services/keyvalues.py index be443eda56..09d56d375b 100644 --- a/st2common/st2common/services/keyvalues.py +++ b/st2common/st2common/services/keyvalues.py @@ -82,6 +82,12 @@ def __init__(self, prefix=None, key_prefix=None, cache=None, scope=FULL_SYSTEM_S def __str__(self): return self._value_cache[self._key_prefix] + def __int__(self): + return int(float(self)) + + def __float__(self): + return float(str(self)) + def __getitem__(self, key): return self._get(key) diff --git a/st2common/tests/unit/test_keyvalue_lookup.py b/st2common/tests/unit/test_keyvalue_lookup.py index 7629ea33aa..fc7627466e 100644 --- a/st2common/tests/unit/test_keyvalue_lookup.py +++ b/st2common/tests/unit/test_keyvalue_lookup.py @@ -145,3 +145,11 @@ def test_secret_lookup(self): user_lookup = UserKeyValueLookup(scope=FULL_USER_SCOPE, user='stanley') self.assertEquals(str(user_lookup.k3), k3.value) + + def test_lookup_cast(self): + KeyValuePair.add_or_update(KeyValuePairDB(name='count', value='5.5')) + + lookup = KeyValueLookup(scope=FULL_SYSTEM_SCOPE) + self.assertEqual(str(lookup.count), '5.5') + self.assertEqual(float(lookup.count), 5.5) + self.assertEqual(int(lookup.count), 5)
PaddlePaddle__PaddleDetection-8421
训练出现长警告 ### 问题确认 Search before asking - [X] 我已经查询[历史issue](https://github.com/PaddlePaddle/PaddleDetection/issues),没有发现相似的bug。I have searched the [issues](https://github.com/PaddlePaddle/PaddleDetection/issues) and found no similar bug report. ### Bug组件 Bug Component _No response_ ### Bug描述 Describe the Bug 训练出现长警告 ``` I0706 13:09:13.075042 3772 eager_method.cc:140] Warning:: 0D Tensor cannot be used as 'Tensor.numpy()[0]' . In order to avoid this problem, 0D Tensor will be changed to 1D numpy currently, but it's not correct and will be removed in release 2.6. For Tensor contain only one element, Please modify 'Tensor.numpy()[0]' to 'float(Tensor)' as soon as possible, otherwise 'Tensor.numpy()[0]' will raise error in release 2.6. I0706 13:09:13.382442 3772 eager_method.cc:140] Warning:: 0D Tensor cannot be used as 'Tensor.numpy()[0]' . In order to avoid this problem, 0D Tensor will be changed to 1D numpy currently, but it's not correct and will be removed in release 2.6. For Tensor contain only one element, Please modify 'Tensor.numpy()[0]' to 'float(Tensor)' as soon as possible, otherwise 'Tensor.numpy()[0]' will raise error in release 2.6. ``` ### 复现环境 Environment PaddleDetection2.6 PaddlePaddle2.5.0 经过排查将`ppdet/utils/stats.py`第77行进行如下修改 `v.update(stats[k].numpy())`→`v.update(float(stats[k]))` ### Bug描述确认 Bug description confirmation - [X] 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced. ### 是否愿意提交PR? Are you willing to submit a PR? - [ ] 我愿意提交PR!I'd like to help by submitting a PR!
[ { "content": "# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
[ { "content": "# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
diff --git a/ppdet/utils/stats.py b/ppdet/utils/stats.py index 4cd36d91cf8..c070e6544ed 100644 --- a/ppdet/utils/stats.py +++ b/ppdet/utils/stats.py @@ -74,7 +74,7 @@ def update(self, stats): for k in stats.keys() } for k, v in self.meters.items(): - v.update(stats[k].numpy()) + v.update(float(stats[k])) def get(self, extras=None): stats = collections.OrderedDict()
googleapis__python-bigquery-942
chore: update system tests and samples to use and `@google.com` email address Re: https://github.com/googleapis/python-bigquery/pull/935#issuecomment-911791623 It may be some time before we can reconfigure our test project(s) to allow permissions for non-google.com folks. I propose we use `cloud-developer-relations@google.com`, which is intended for interacting with the public and most Googlers who support this client are members of but don't have email enabled, so it should be less of a spam risk.
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/samples/update_dataset_access.py b/samples/update_dataset_access.py index 6e844cc90..a5c2670e7 100644 --- a/samples/update_dataset_access.py +++ b/samples/update_dataset_access.py @@ -28,8 +28,8 @@ def update_dataset_access(dataset_id): entry = bigquery.AccessEntry( role="READER", - entity_type="userByEmail", - entity_id="sample.bigquery.dev@gmail.com", + entity_type="groupByEmail", + entity_id="cloud-developer-relations@google.com", ) entries = list(dataset.access_entries)
django-json-api__django-rest-framework-json-api-908
Django 3.2 compatibility Django 3.2 is now out, but we are currently blocked on upgrading to it due to djangorestframework-jsonapi specifically disallows that and newer versions as dependencies: https://github.com/django-json-api/django-rest-framework-json-api/blob/0892e3a8a4dbad9630d70e2b78e18b242a8b057d/setup.py#L101 I couldn't find any other issues related to this so thought I would create one. Are there any specific concerns with loosening the version constraint so users of this library also can upgrade to Django 3.2?
[ { "content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\nneeds_wheel = {\"bdist_wheel\"}.intersection(sys.argv)\nwheel = [\"wheel\"] if needs_wheel else []\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from path...
[ { "content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\nneeds_wheel = {\"bdist_wheel\"}.intersection(sys.argv)\nwheel = [\"wheel\"] if needs_wheel else []\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from path...
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e3e786ae..a48a7915 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false matrix: python-version: ["3.6", "3.7", "3.8", "3.9"] - django: ["2.2", "3.0", "3.1"] + django: ["2.2", "3.0", "3.1", "3.2"] django-rest-framework: ["3.12", "master"] env: PYTHON: ${{ matrix.python-version }} diff --git a/AUTHORS b/AUTHORS index c1a273c4..543274a8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -12,6 +12,7 @@ Felix Viernickel <felix@gedankenspieler.org> Greg Aker <greg@gregaker.net> Jamie Bliss <astronouth7303@gmail.com> Jason Housley <housleyjk@gmail.com> +Jeppe Fihl-Pearson <jeppe@tenzer.dk> Jerel Unruh <mail@unruhdesigns.com> Jonathan Senecal <contact@jonathansenecal.com> Joseba Mendivil <git@jma.email> diff --git a/CHANGELOG.md b/CHANGELOG.md index c64e4a4c..b816f47d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Note that in line with [Django REST Framework policy](http://www.django-rest-framework.org/topics/release-notes/), any parts of the framework not mentioned in the documentation should generally be considered private API, and may be subject to change. +## [Unreleased] + +### Added + +* Added support for Django 3.2. + ## [4.1.0] - 2021-03-08 ### Added diff --git a/README.rst b/README.rst index 2ab48598..03f9d52a 100644 --- a/README.rst +++ b/README.rst @@ -89,7 +89,7 @@ Requirements ------------ 1. Python (3.6, 3.7, 3.8, 3.9) -2. Django (2.2, 3.0, 3.1) +2. Django (2.2, 3.0, 3.1, 3.2) 3. Django REST Framework (3.12) We **highly** recommend and only officially support the latest patch release of each Python, Django and REST Framework series. diff --git a/docs/getting-started.md b/docs/getting-started.md index c305c801..5e374b30 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -52,7 +52,7 @@ like the following: ## Requirements 1. Python (3.6, 3.7, 3.8, 3.9) -2. Django (2.2, 3.0, 3.1) +2. Django (2.2, 3.0, 3.1, 3.2) 3. Django REST Framework (3.12) We **highly** recommend and only officially support the latest patch release of each Python, Django and REST Framework series. diff --git a/setup.cfg b/setup.cfg index 527ddd6b..83f6fa37 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,6 +58,8 @@ DJANGO_SETTINGS_MODULE=example.settings.test filterwarnings = error::DeprecationWarning error::PendingDeprecationWarning + # Django Debug Toolbar currently (2021-04-07) specifies default_app_config which is deprecated in Django 3.2: + ignore:'debug_toolbar' defines default_app_config = 'debug_toolbar.apps.DebugToolbarConfig'. Django now detects this configuration automatically. You can remove default_app_config.:PendingDeprecationWarning testpaths = example tests diff --git a/setup.py b/setup.py index a076a7a5..8cce9a5d 100755 --- a/setup.py +++ b/setup.py @@ -98,7 +98,7 @@ def get_package_data(package): install_requires=[ "inflection>=0.3.0", "djangorestframework>=3.12,<3.13", - "django>=2.2,<3.2", + "django>=2.2,<3.3", ], extras_require={ "django-polymorphic": ["django-polymorphic>=2.0"], diff --git a/tox.ini b/tox.ini index dab1676c..f4160e5a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{36,37,38,39}-django{22,30,31}-drf{312,master}, + py{36,37,38,39}-django{22,30,31,32}-drf{312,master}, lint,docs [gh-actions] @@ -15,6 +15,7 @@ DJANGO = 2.2: django22 3.0: django30 3.1: django31 + 3.2: django32 DJANGO_REST_FRAMEWORK = 3.12: drf312 @@ -25,6 +26,7 @@ deps = django22: Django>=2.2,<2.3 django30: Django>=3.0,<3.1 django31: Django>=3.1,<3.2 + django32: Django>=3.2,<3.3 drf312: djangorestframework>=3.12,<3.13 drfmaster: https://github.com/encode/django-rest-framework/archive/master.zip -rrequirements/requirements-testing.txt
rasterio__rasterio-598
rio warp null transformer error with bad proj4 Currently, if you pass a bad projection, you get the following behavior: ``` $ rio warp --dst-crs "+proj=foobar" tests/data/warp_test.tif /tmp/foo.tif ERROR:GDAL:CPLE_NotSupported in Failed to initialize PROJ.4 with `+proj=foobar +wktext'. Traceback (most recent call last): ... File "/Users/mperry/work/rasterio/rasterio/rio/warp.py", line 198, in warp resolution=res) File "/Users/mperry/work/rasterio/rasterio/warp.py", line 296, in calculate_default_transform left, bottom, right, top) File "rasterio/_warp.pyx", line 535, in rasterio._warp._calculate_default_transform (rasterio/_warp.cpp:9551) with InMemoryRaster( File "rasterio/_warp.pyx", line 542, in rasterio._warp._calculate_default_transform (rasterio/_warp.cpp:9261) raise ValueError("NULL transformer") ValueError: NULL transformer ``` The transformer fails to initialize, which is reasonable considering the invalid proj string. Is there any way to catch that error and report back something more meaningful than "NULL transformer"?
[ { "content": "\"\"\"A module of errors.\"\"\"\n\nfrom click import FileError\n\n\nclass RasterioIOError(IOError):\n \"\"\"A failure to open a dataset using the presently registered drivers.\"\"\"\n\n\nclass RasterioDriverRegistrationError(ValueError):\n \"\"\"To be raised when, eg, _gdal.GDALGetDriverByNa...
[ { "content": "\"\"\"A module of errors.\"\"\"\n\nfrom click import FileError\n\n\nclass RasterioIOError(IOError):\n \"\"\"A failure to open a dataset using the presently registered drivers.\"\"\"\n\n\nclass DriverRegistrationError(ValueError):\n \"\"\"To be raised when, eg, _gdal.GDALGetDriverByName(\"MEM...
diff --git a/rasterio/_io.pyx b/rasterio/_io.pyx index d4ada0fbc..1b5b2e7d8 100644 --- a/rasterio/_io.pyx +++ b/rasterio/_io.pyx @@ -20,7 +20,7 @@ from rasterio._drivers import driver_count, GDALEnv from rasterio._err import cpl_errs, GDALError from rasterio import dtypes from rasterio.coords import BoundingBox -from rasterio.errors import RasterioDriverRegistrationError +from rasterio.errors import DriverRegistrationError from rasterio.five import text_type, string_types from rasterio.transform import Affine from rasterio.enums import ColorInterp, MaskFlags, Resampling @@ -1851,7 +1851,7 @@ cdef class InMemoryRaster: cdef void *memdriver = _gdal.GDALGetDriverByName("MEM") if memdriver == NULL: - raise RasterioDriverRegistrationError( + raise DriverRegistrationError( "MEM driver is not registered.") self.dataset = _gdal.GDALCreate( diff --git a/rasterio/_warp.pyx b/rasterio/_warp.pyx index 8965dbd39..e2ad94020 100644 --- a/rasterio/_warp.pyx +++ b/rasterio/_warp.pyx @@ -10,7 +10,7 @@ from rasterio cimport _base, _gdal, _ogr, _io, _features from rasterio import dtypes from rasterio._err import cpl_errs, GDALError from rasterio._io cimport InMemoryRaster -from rasterio.errors import RasterioDriverRegistrationError +from rasterio.errors import DriverRegistrationError from rasterio.transform import Affine, from_bounds @@ -269,7 +269,7 @@ def _reproject( hrdriver = _gdal.GDALGetDriverByName("MEM") if hrdriver == NULL: - raise RasterioDriverRegistrationError( + raise DriverRegistrationError( "'MEM' driver not found. Check that this call is contained " "in a `with rasterio.drivers()` or `with rasterio.open()` " "block.") @@ -317,7 +317,7 @@ def _reproject( hrdriver = _gdal.GDALGetDriverByName("MEM") if hrdriver == NULL: - raise RasterioDriverRegistrationError( + raise DriverRegistrationError( "'MEM' driver not found. Check that this call is contained " "in a `with rasterio.drivers()` or `with rasterio.open()` " "block.") diff --git a/rasterio/errors.py b/rasterio/errors.py index 4cfbddc3c..3a4f34e7f 100644 --- a/rasterio/errors.py +++ b/rasterio/errors.py @@ -7,7 +7,7 @@ class RasterioIOError(IOError): """A failure to open a dataset using the presently registered drivers.""" -class RasterioDriverRegistrationError(ValueError): +class DriverRegistrationError(ValueError): """To be raised when, eg, _gdal.GDALGetDriverByName("MEM") returns NULL.""" diff --git a/tests/test_warp_transform.py b/tests/test_warp_transform.py index c1c3396f5..8019df640 100644 --- a/tests/test_warp_transform.py +++ b/tests/test_warp_transform.py @@ -3,7 +3,7 @@ from rasterio.transform import Affine, from_bounds -def test_indentity(): +def test_identity(): """Get the same transform and dimensions back for same crs.""" # Tile: [53, 96, 8] # [-11740727.544603072, 4852834.0517692715, -11584184.510675032, 5009377.085697309] @@ -36,3 +36,28 @@ def test_gdal_transform_notnull(): right=-80, top=70) assert True + + +def test_gdal_transform_fail_dst_crs(): + with rasterio.drivers(): + dt, dw, dh = _calculate_default_transform( + {'init': 'EPSG:4326'}, + '+proj=foobar', + width=80, + height=80, + left=-120, + bottom=30, + right=-80, + top=70) + +def test_gdal_transform_fail_src_crs(): + with rasterio.drivers(): + dt, dw, dh = _calculate_default_transform( + '+proj=foobar', + {'init': 'EPSG:32610'}, + width=80, + height=80, + left=-120, + bottom=30, + right=-80, + top=70)
mozilla__bugbug-3850
Optimize the `bug_to_types()` functions to avoid redundant the execution of string lowering The `bug["whiteboard"].lower()` statement is performed multiple times in the function. Instead, we could store the lowercase value in a variable (e.g., `bug_whiteboard`) and reuse it where needed. Examples: https://github.com/mozilla/bugbug/blob/0586c6a49732f03781daf43d8726b53e2049e3db/bugbug/models/bugtype.py#L46 https://github.com/mozilla/bugbug/blob/0586c6a49732f03781daf43d8726b53e2049e3db/bugbug/models/bugtype.py#L50
[ { "content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport logging\nfrom typing import Iterable, Optional\n\nimport numpy...
[ { "content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport logging\nfrom typing import Iterable, Optional\n\nimport numpy...
diff --git a/bugbug/models/bugtype.py b/bugbug/models/bugtype.py index 858ad7d785..71fc1a6afb 100644 --- a/bugbug/models/bugtype.py +++ b/bugbug/models/bugtype.py @@ -62,7 +62,7 @@ def bug_to_types( types.add("performance") if any( - f"[{whiteboard_text}" in bug["whiteboard"].lower() + f"[{whiteboard_text}" in bug_whiteboard for whiteboard_text in ("client-bounty-form", "sec-survey") ): types.add("security")
mirumee__ariadne-232
Update GraphQL Core Next & Starlette Issue for me to remember to update our core dependencies to latest versions before release.
[ { "content": "#! /usr/bin/env python\nimport os\nfrom setuptools import setup\n\nCLASSIFIERS = [\n \"Development Status :: 4 - Beta\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\...
[ { "content": "#! /usr/bin/env python\nimport os\nfrom setuptools import setup\n\nCLASSIFIERS = [\n \"Development Status :: 4 - Beta\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\...
diff --git a/requirements-dev.txt b/requirements-dev.txt index eb710e433..0b76cfa33 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,40 +7,48 @@ appdirs==1.4.3 # via black astroid==2.2.5 # via pylint atomicwrites==1.3.0 # via pytest -attrs==19.1.0 # via black, pytest +attrs==19.1.0 # via black, packaging, pytest black==19.3b0 -certifi==2019.3.9 # via requests +certifi==2019.6.16 # via requests chardet==3.0.4 # via requests click==7.0 # via black, pip-tools codecov==2.0.15 -coverage==4.5.3 # via codecov, pytest-cov +coverage==4.5.4 # via codecov, pytest-cov django==2.2.4 +fastdiff==0.2.0 # via snapshottest freezegun==0.3.12 idna==2.8 # via requests -isort==4.3.18 # via pylint -lazy-object-proxy==1.3.1 # via astroid +importlib-metadata==0.19 # via pluggy, pytest +isort==4.3.21 # via pylint +lazy-object-proxy==1.4.1 # via astroid mccabe==0.6.1 # via pylint -more-itertools==7.0.0 # via pytest +more-itertools==7.2.0 # via pytest mypy-extensions==0.4.1 # via mypy -mypy==0.701 +mypy==0.720 opentracing==2.2.0 -pip-tools==3.6.1 -pluggy==0.9.0 # via pytest +packaging==19.1 # via pytest +pip-tools==4.0.0 +pluggy==0.12.0 # via pytest py==1.8.0 # via pytest pylint==2.3.1 +pyparsing==2.4.2 # via packaging pytest-asyncio==0.10.0 pytest-cov==2.7.1 -pytest-django==3.4.8 +pytest-django==3.5.1 pytest-mock==1.10.4 -pytest==4.4.1 +pytest==5.0.1 python-dateutil==2.8.0 -pytz==2019.1 # via django -requests==2.21.0 -six==1.12.0 # via astroid, freezegun, pip-tools, pytest, python-dateutil, snapshottest -snapshottest==0.5.0 +pytz==2019.2 # via django +requests==2.22.0 +six==1.12.0 # via astroid, freezegun, packaging, pip-tools, python-dateutil, snapshottest +snapshottest==0.5.1 sqlparse==0.3.0 # via django termcolor==1.1.0 # via snapshottest toml==0.10.0 # via black -typed-ast==1.3.5 # via astroid, mypy -urllib3==1.24.3 # via requests -wrapt==1.11.1 # via astroid +typed-ast==1.4.0 # via astroid, mypy +typing-extensions==3.7.4 # via mypy +urllib3==1.25.3 # via requests +wasmer==0.3.0 # via fastdiff +wcwidth==0.1.7 # via pytest +wrapt==1.11.2 # via astroid +zipp==0.5.2 # via importlib-metadata diff --git a/requirements.txt b/requirements.txt index 4b90eb5fd..345cdea2c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,5 @@ graphql-core-next==1.1.1 python-multipart==0.0.5 six==1.12.0 # via python-multipart -starlette==0.12.0 -typing-extensions==3.6.6 +starlette==0.12.7 +typing-extensions==3.7.4 diff --git a/setup.py b/setup.py index f2d03d640..2ece8c7c7 100755 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ packages=["ariadne"], include_package_data=True, install_requires=[ - "graphql-core-next>=1.0.4", + "graphql-core-next<3.0.0", "python-multipart>=0.0.5", "starlette<0.13", "typing_extensions>=3.6.0", diff --git a/tests/test_schema_file_load.py b/tests/test_schema_file_load.py index 4ff09d1b0..622dc85c8 100644 --- a/tests/test_schema_file_load.py +++ b/tests/test_schema_file_load.py @@ -45,7 +45,7 @@ def incorrect_schema_file(tmpdir_factory): def test_loading_schema_fails_on_bad_syntax(incorrect_schema_file): with pytest.raises(exceptions.GraphQLFileSyntaxError) as e: load_schema_from_path(str(incorrect_schema_file)) - assert str(incorrect_schema_file) in str(e) + assert str(incorrect_schema_file) in str(e.value) SECOND_SCHEMA = """ diff --git a/tests/tracing/snapshots/snap_test_apollotracing.py b/tests/tracing/snapshots/snap_test_apollotracing.py index c4e94a12f..d844dc325 100644 --- a/tests/tracing/snapshots/snap_test_apollotracing.py +++ b/tests/tracing/snapshots/snap_test_apollotracing.py @@ -36,43 +36,5 @@ } snapshots['test_apollotracing_extension_handles_exceptions_in_resolvers 1'] = { - 'data': { - 'testError': None - }, - 'errors': [ - { - 'locations': [ - ( - 1, - 3 - ) - ], - 'message': 'Test exception', - 'path': [ - 'testError' - ] - } - ], - 'extensions': { - 'tracing': { - 'duration': 0, - 'endTime': '2012-01-14T03:21:34.000000Z', - 'execution': { - 'resolvers': [ - { - 'duration': 0, - 'fieldName': 'testError', - 'parentType': 'Query', - 'path': [ - 'testError' - ], - 'returnType': 'Boolean', - 'startOffset': 0 - } - ] - }, - 'startTime': '2012-01-14T03:21:34.000000Z', - 'version': 1 - } - } + 'testError': None } diff --git a/tests/tracing/test_apollotracing.py b/tests/tracing/test_apollotracing.py index 1984f52df..1dd4faa57 100644 --- a/tests/tracing/test_apollotracing.py +++ b/tests/tracing/test_apollotracing.py @@ -40,7 +40,7 @@ async def test_apollotracing_extension_handles_exceptions_in_resolvers( _, result = await graphql( schema, {"query": "{ testError }"}, extensions=[ApolloTracingExtension] ) - snapshot.assert_match(result) + snapshot.assert_match(result["data"]) @pytest.mark.asyncio
fonttools__fonttools-337
I find the font's line height is bigger than original font. I have tried pyftsubset with command line option --no-recalc-bounds , but the generated subfont's line height is still bigger than original font. I used html font-face render font. @font-face { font-family: 'freetype'; src: url('font.ttf') format('truetype'); } the font file is microsoft chinese liti.ttf.
[ { "content": "from __future__ import print_function, division, absolute_import\nfrom fontTools.misc.py23 import *\nfrom fontTools.misc import sstruct\nfrom fontTools.misc.textTools import safeEval\nfrom . import DefaultTable\n\nvheaFormat = \"\"\"\n\t\t>\t# big endian\n\t\ttableVersion:\t\t16.16F\n\t\tascent:\t...
[ { "content": "from __future__ import print_function, division, absolute_import\nfrom fontTools.misc.py23 import *\nfrom fontTools.misc import sstruct\nfrom fontTools.misc.textTools import safeEval\nfrom . import DefaultTable\n\nvheaFormat = \"\"\"\n\t\t>\t# big endian\n\t\ttableVersion:\t\t16.16F\n\t\tascent:\t...
diff --git a/Lib/fontTools/ttLib/tables/_v_h_e_a.py b/Lib/fontTools/ttLib/tables/_v_h_e_a.py index 79f4d7637e..d8dfc0a6af 100644 --- a/Lib/fontTools/ttLib/tables/_v_h_e_a.py +++ b/Lib/fontTools/ttLib/tables/_v_h_e_a.py @@ -35,7 +35,8 @@ def decompile(self, data, ttFont): sstruct.unpack(vheaFormat, data, self) def compile(self, ttFont): - self.recalc(ttFont) + if ttFont.isLoaded('glyf') and ttFont.recalcBBoxes: + self.recalc(ttFont) return sstruct.pack(vheaFormat, self) def recalc(self, ttFont):
coala__coala-bears-1082
GofmtBear: Add advanced asciinema The coala bear GofmtBear does not have a proper asciinema. `gofmt` is a command line tool that automatically solves formatting / styling issues to the absolute coding style that Go has. I'm planning to use a working code as the sample where it's filled with mixed indentation (spaces and tabs), semicolons and demonstrate how gofmt formats the code automatically and correctly to the absolute Go coding style.
[ { "content": "from coalib.bearlib.abstractions.Linter import linter\nfrom coalib.bears.requirements.GoRequirement import GoRequirement\n\n\n@linter(executable='gofmt',\n use_stdin=True,\n output_format='corrected',\n result_message='Formatting can be improved.')\nclass GofmtBear:\n \"\"\...
[ { "content": "from coalib.bearlib.abstractions.Linter import linter\nfrom coalib.bears.requirements.GoRequirement import GoRequirement\n\n\n@linter(executable='gofmt',\n use_stdin=True,\n output_format='corrected',\n result_message='Formatting can be improved.')\nclass GofmtBear:\n \"\"\...
diff --git a/bears/go/GofmtBear.py b/bears/go/GofmtBear.py index bdf3b589dc..f385d562ac 100644 --- a/bears/go/GofmtBear.py +++ b/bears/go/GofmtBear.py @@ -20,6 +20,7 @@ class GofmtBear: AUTHORS_EMAILS = {'coala-devel@googlegroups.com'} LICENSE = 'AGPL-3.0' CAN_FIX = {'Formatting'} + ASCIINEMA_URL = 'https://asciinema.org/a/94812' @staticmethod def create_arguments(filename, file, config_file):
getsentry__sentry-1340
do we really need 'redis>=2.7.0,<2.9.0' ? Hi Recently I was trying to use sentry with [django-redis](https://github.com/niwibe/django-redis) as a cache backend and this can't be (easily) done with current versions of both django-redis and sentry since django-redis has a restriction for [redis>=2.10.0](https://github.com/niwibe/django-redis/blob/fcfd73d85d4fc3350d9cdacdb08546a5f4c9a66d/setup.py#L21). A simple installation shows that sentry works fine with `redis==2.10.3` but I guess this would need a more thorough tests. I briefly checked redis-py changelog and it seems the only possible backwards incompatible change is [this](https://github.com/andymccurdy/redis-py/blob/54e1040b576afb4155bf839483428c5edac14df0/CHANGES#L9-L15). Also I noticed that current version of sentry has a builtin redis cache backend, but it doesn't seem to cover other potential apps installed within the project. I also posted similar issue on niwibe/django-redis#113.
[ { "content": "#!/usr/bin/env python\n\"\"\"\nSentry\n======\n\nSentry is a realtime event logging and aggregation platform. It specializes\nin monitoring errors and extracting all the information needed to do a proper\npost-mortem without any of the hassle of the standard user feedback loop.\n\nSentry is a Serv...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nSentry\n======\n\nSentry is a realtime event logging and aggregation platform. It specializes\nin monitoring errors and extracting all the information needed to do a proper\npost-mortem without any of the hassle of the standard user feedback loop.\n\nSentry is a Serv...
diff --git a/setup.py b/setup.py index cddf1334767824..90584c634a635e 100755 --- a/setup.py +++ b/setup.py @@ -92,7 +92,7 @@ 'python-dateutil>=1.5.0,<2.0.0', 'python-memcached>=1.53,<2.0.0', 'raven>=5.0.0', - 'redis>=2.7.0,<2.9.0', + 'redis>=2.7.0,<2.11.0', 'simplejson>=3.1.0,<3.4.0', 'six>=1.6.0,<2.0.0', 'setproctitle>=1.1.7,<1.2.0',
getnikola__nikola-3762
nikola auto: "AttributeError: 'FileOpenedEvent' object has no attribute '_src_path'. Did you mean: 'src_path'?" <!-- Before creating an issue: * make sure you are using an up-to-date version of Nikola * search for existing issues that might be related Make sure to: * provide information about your environment (below) * include all the output you get, and any other information related to your problem Nikola v7.6.4, as provided by Ubuntu, is NOT SUPPORTED. If you are using this version, you should upgrade: https://getnikola.com/getting-started.html --> ### Environment **Python Version:** 3.12.2 **Nikola Version:** SHA #b46b1211128 on my branch **Operating System:** Debian Bullseye ### Description: `nikola auto -b` produces an error ``` Exception in thread Thread-1: Traceback (most recent call last): File "/usr/local/python-3.12.2/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() File "/home/andreas/workspace-famsik/dj3ei/venv/lib/python3.12/site-packages/watchdog/observers/api.py", line 223, in run self.dispatch_events(self.event_queue) File "/home/andreas/workspace-famsik/dj3ei/venv/lib/python3.12/site-packages/watchdog/observers/api.py", line 402, in dispatch_events handler.dispatch(event) File "/home/andreas/comp/nikola/nikola/plugins/command/auto/__init__.py", line 623, in dispatch if event._src_path == self.configuration_filename: ^^^^^^^^^^^^^^^ AttributeError: 'FileOpenedEvent' object has no attribute '_src_path'. Did you mean: 'src_path'? ``` ## Initial analysis: Our dependency `watchdog` came out with a new major release 4.0.0 and 4.0.1. The private attribute `_src_path` has been promoted official to `src_path`. Fix should be easy, forthcoming.
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2024 Chris Warrick, Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restrictio...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2024 Chris Warrick, Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restrictio...
diff --git a/nikola/plugins/command/auto/__init__.py b/nikola/plugins/command/auto/__init__.py index a3e0d1bb34..f05dbcf19e 100644 --- a/nikola/plugins/command/auto/__init__.py +++ b/nikola/plugins/command/auto/__init__.py @@ -620,5 +620,5 @@ def __init__(self, configuration_filename, function, loop): def dispatch(self, event): """Handle file events if they concern the configuration file.""" - if event._src_path == self.configuration_filename: + if event.src_path == self.configuration_filename: super().dispatch(event) diff --git a/requirements-extras.txt b/requirements-extras.txt index 1ad129de3d..d8c2259c89 100644 --- a/requirements-extras.txt +++ b/requirements-extras.txt @@ -10,7 +10,7 @@ notebook>=6.0.0 ipykernel>=6.21.2 ghp-import>=1.0.0 aiohttp>=3.8.6 -watchdog>=0.8.3 +watchdog>=2.3.0 ruamel.yaml>=0.15.98 toml>=0.9.2 html5lib>=1.0.1
nilearn__nilearn-3201
get_cluster_table returns inconsistent result depending on `cluster_threshold` <!--Provide a brief description of the bug.--> <!--Please fill in the following information, to the best of your ability.--> Nilearn version: 0.9.0 ### Expected behavior The example below should return identical information for the large clusters (> 10 voxels) ### Actual behavior I does not ### Steps and code to reproduce bug ``` from nilearn import datasets motor_images = datasets.fetch_neurovault_motor_task() stat_img = motor_images.images[0] from nilearn.reporting import get_clusters_table threshold = 3.0 table1 = get_clusters_table(stat_img, threshold, cluster_threshold=10) table2 = get_clusters_table(stat_img, threshold, cluster_threshold=0) print(table1) print(table2) ```
[ { "content": "\"\"\"\nPreprocessing functions for images.\n\nSee also nilearn.signal.\n\"\"\"\n# Authors: Philippe Gervais, Alexandre Abraham\n# License: simplified BSD\n\nimport collections.abc\nimport copy\nimport warnings\n\nimport nibabel\nimport numpy as np\nfrom joblib import Parallel, delayed\nfrom scipy...
[ { "content": "\"\"\"\nPreprocessing functions for images.\n\nSee also nilearn.signal.\n\"\"\"\n# Authors: Philippe Gervais, Alexandre Abraham\n# License: simplified BSD\n\nimport collections.abc\nimport copy\nimport warnings\n\nimport nibabel\nimport numpy as np\nfrom joblib import Parallel, delayed\nfrom scipy...
diff --git a/doc/changes/latest.rst b/doc/changes/latest.rst index 2be686b36c..8dbda80dcc 100644 --- a/doc/changes/latest.rst +++ b/doc/changes/latest.rst @@ -16,6 +16,7 @@ Fixes - Fix function :func:`~mass_univariate.permuted_ols`, which was only returning the null distribution (``h0_fmax``) for the first regressor (:gh:`3184` by `Taylor Salo`_). - Fix function :func:`~datasets.fetch_abide_pcp` which was returning empty phenotypes and ``func_preproc`` after release ``0.9.0`` due to supporting pandas dataframes in fetchers (:gh:`3174` by `Nicolas Gensollen`_). - Fix function :func:`~datasets.fetch_atlas_harvard_oxford` and :func:`~datasets.fetch_atlas_juelich` which were returning the image in the `filename` attribute instead of the path to the image (:gh:`3179` by `Raphael Meudec`_). +- Fix function ``nilearn.image._apply_cluster_size_threshold``, which resulted in wrong clusters extraction when cluster_size was non-zero (:gh:`3201` by `Bertrand Thirion`_). - Fix colorbars in :func:`~plotting.plot_stat_map`, :func:`~plotting.plot_glass_brain` and :func:`~plotting.plot_surf_stat_map` which could extend beyond the figure for users with newest matplotlib version (>=3.5.1) (:gh:`3188` by `Raphael Meudec`_) Enhancements diff --git a/nilearn/image/image.py b/nilearn/image/image.py index 05770b4ead..68ed191926 100644 --- a/nilearn/image/image.py +++ b/nilearn/image/image.py @@ -795,7 +795,7 @@ def _apply_cluster_size_threshold(arr, cluster_threshold, copy=True): conn_mat[1, :, 1] = 1 conn_mat[1, 1, :] = 1 - for sign in np.sign(arr): + for sign in np.unique(np.sign(arr)): # Binarize using one-sided cluster-defining threshold binarized = ((arr * sign) > 0).astype(int) diff --git a/nilearn/image/tests/test_image.py b/nilearn/image/tests/test_image.py index e76f6a273c..3d7e146721 100644 --- a/nilearn/image/tests/test_image.py +++ b/nilearn/image/tests/test_image.py @@ -585,7 +585,7 @@ def test_threshold_img_with_cluster_threshold(): copy=True, ) assert np.array_equal(np.unique(thr_img.get_fdata()), np.array([-4, 0, 4])) - + assert np.sum(thr_img.get_fdata() == 4) == 8 # With a cluster threshold of 5 we get clusters with |values| > 0.5 and # cluster sizes > 5 thr_img = threshold_img(
apluslms__a-plus-204
Numbers should be safe characters in file names If the attachment for the "Exercise with attachment" is named for example "2.zip", the name for that file will be just ".zip" in the database because numbers are not considered as safe characters: https://github.com/Aalto-LeTech/a-plus/blob/a86bf/lib/helpers.py#L62
[ { "content": "from django.conf import settings\nfrom random import choice\nfrom PIL import Image\nimport string\nimport urllib\n\n\ndef extract_form_errors(form):\n \"\"\"\n Extracts Django form errors to a list of error messages.\n \"\"\"\n errors = []\n for field in form.errors:\n for er...
[ { "content": "from django.conf import settings\nfrom random import choice\nfrom PIL import Image\nimport string\nimport urllib\n\n\ndef extract_form_errors(form):\n \"\"\"\n Extracts Django form errors to a list of error messages.\n \"\"\"\n errors = []\n for field in form.errors:\n for er...
diff --git a/lib/helpers.py b/lib/helpers.py index 46744cf69..3384084ae 100644 --- a/lib/helpers.py +++ b/lib/helpers.py @@ -59,7 +59,7 @@ def has_same_domain(url1, url2): return uri1.netloc == uri2.netloc -FILENAME_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-" +FILENAME_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-0123456789" def safe_file_name(name): safename = "".join(c for c in name if c in FILENAME_CHARS)
conda__conda-2896
conda throws error if allow_other_channels setting is used The feature to lock down what channels your users are allowed to use stopped working http://conda.pydata.org/docs/install/central.html#allow-other-channels-allow-other-channels Reproduced this error in Windows 10 and OS X 10.11.5, if you use this setting in the systemwide .condarc file. ``` $ cat /Users/jenns/anaconda/.condarc allow_other_channels: False channels: - defaults ``` ``` $ conda info Traceback (most recent call last): File "/Users/jenns/anaconda/bin/conda", line 6, in <module> sys.exit(main()) File "/Users/jenns/anaconda/lib/python2.7/site-packages/conda/cli/main.py", line 61, in main from conda.cli import conda_argparse File "/Users/jenns/anaconda/lib/python2.7/site-packages/conda/cli/conda_argparse.py", line 15, in <module> from .common import add_parser_help File "/Users/jenns/anaconda/lib/python2.7/site-packages/conda/cli/common.py", line 12, in <module> from ..config import (envs_dirs, default_prefix, platform, update_dependencies, File "/Users/jenns/anaconda/lib/python2.7/site-packages/conda/config.py", line 331, in <module> allowed_channels = get_allowed_channels() File "/Users/jenns/anaconda/lib/python2.7/site-packages/conda/config.py", line 329, in get_allowed_channels return normalize_urls(base_urls) File "/Users/jenns/anaconda/lib/python2.7/site-packages/conda/config.py", line 253, in normalize_urls urls = get_rc_urls() + urls File "/Users/jenns/anaconda/lib/python2.7/site-packages/conda/config.py", line 197, in get_rc_urls if rc.get('channels') is None: AttributeError: 'NoneType' object has no attribute 'get' ```
[ { "content": "# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import print_function, division, absolute_import\...
[ { "content": "# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import print_function, division, absolute_import\...
diff --git a/conda/config.py b/conda/config.py index 038f2972e16..9e1405b036d 100644 --- a/conda/config.py +++ b/conda/config.py @@ -194,7 +194,7 @@ def get_default_urls(merged=False): return defaults_ def get_rc_urls(): - if rc.get('channels') is None: + if rc is None or rc.get('channels') is None: return [] if 'system' in rc['channels']: raise RuntimeError("system cannot be used in .condarc")
zigpy__zha-device-handlers-184
Philips Remote DIM_DOWN typo? https://github.com/dmulcahey/zha-device-handlers/blob/833ee24710496d317a03b0f0b9f61df31291d75b/zhaquirks/philips/rwl021.py#L137 It seems that it should be: `ARGS: [1, 30, 9],`
[ { "content": "\"\"\"Phillips RWL021 device.\"\"\"\nfrom zigpy.profiles import zha, zll\nfrom zigpy.quirks import CustomCluster, CustomDevice\nimport zigpy.types as t\nfrom zigpy.zcl.clusters.general import (\n Basic,\n BinaryInput,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n ...
[ { "content": "\"\"\"Phillips RWL021 device.\"\"\"\nfrom zigpy.profiles import zha, zll\nfrom zigpy.quirks import CustomCluster, CustomDevice\nimport zigpy.types as t\nfrom zigpy.zcl.clusters.general import (\n Basic,\n BinaryInput,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n ...
diff --git a/zhaquirks/philips/rwl021.py b/zhaquirks/philips/rwl021.py index 32297f7133..2c18700483 100644 --- a/zhaquirks/philips/rwl021.py +++ b/zhaquirks/philips/rwl021.py @@ -134,7 +134,7 @@ class PhilipsRWL021(CustomDevice): COMMAND: COMMAND_STEP, CLUSTER_ID: 8, ENDPOINT_ID: 1, - ARGS: [1, 56, 9], + ARGS: [1, 30, 9], }, (LONG_PRESS, DIM_DOWN): { COMMAND: COMMAND_STEP,
googleapis__python-bigquery-859
Increase default timeout of retry objects to 10 minutes Per internal issue 195337762, the general timeout for jobs.insert API is 4 minutes. We should increase our default deadline to 10 minutes to allow for at least 1 retry if the first request fails.
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
diff --git a/google/cloud/bigquery/retry.py b/google/cloud/bigquery/retry.py index 2df4de08b..bab28aacb 100644 --- a/google/cloud/bigquery/retry.py +++ b/google/cloud/bigquery/retry.py @@ -47,7 +47,7 @@ def _should_retry(exc): return reason in _RETRYABLE_REASONS -DEFAULT_RETRY = retry.Retry(predicate=_should_retry) +DEFAULT_RETRY = retry.Retry(predicate=_should_retry, deadline=600.0) """The default retry object. Any method with a ``retry`` parameter will be retried automatically,
mitmproxy__mitmproxy-4179
TypeError: Subscripted generics cannot be used with class and instance checks under python 3.9.0b1 #### Problem Description Running mitmproxy 5.1.1 under python 3.9.0b1 fails with `TypeError: Subscripted generics cannot be used with class and instance checks`. The test suite fails as well with hundreds of ERROR and FAILED tests. #### Steps to reproduce the behavior: 1. install mitmproxy 5.1.1 on Fedora rawhide 2. mitmproxy 3. pytest -v There are: ``` =================== 303 failed, 994 passed, 2 xfailed, 115 warnings, 182 errors in 72.86s (0:01:12) ==================== ``` Most of them throw a `TypeError: Subscripted generics cannot be used with class and instance checks` and have a stack trace similar to: ``` ___________________________________ ERROR at setup of TestHTTPS.test_clientcert_dir ____________________________________ cls = <class 'test.mitmproxy.proxy.test_server.TestHTTPS'> @classmethod def setup_class(cls): cls.server = pathod.test.Daemon( ssl=cls.ssl, ssloptions=cls.ssloptions) cls.server2 = pathod.test.Daemon( ssl=cls.ssl, ssloptions=cls.ssloptions) > cls.options = cls.get_options() test/mitmproxy/tservers.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/mitmproxy/tservers.py:179: in get_options return options.Options( mitmproxy/options.py:50: in __init__ self.add_option( mitmproxy/optmanager.py:109: in add_option self._options[name] = _Option(name, typespec, default, help, choices) mitmproxy/optmanager.py:34: in __init__ typecheck.check_option_type(name, default, typespec) mitmproxy/utils/typecheck.py:73: in check_option_type elif not isinstance(value, typeinfo): /usr/lib64/python3.9/typing.py:649: in __instancecheck__ return self.__subclasscheck__(type(obj)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = typing.Optional[str], cls = <class 'NoneType'> def __subclasscheck__(self, cls): > raise TypeError("Subscripted generics cannot be used with" " class and instance checks") E TypeError: Subscripted generics cannot be used with class and instance checks /usr/lib64/python3.9/typing.py:652: TypeError ``` #### System Information ``` Traceback (most recent call last): File "/builddir/build/BUILDROOT/mitmproxy-5.1.1-1.fc33.x86_64/usr/bin/./mitmproxy", line 11, in <module> load_entry_point('mitmproxy==5.1.1', 'console_scripts', 'mitmproxy')() File "/builddir/build/BUILDROOT/mitmproxy-5.1.1-1.fc33.x86_64/usr/lib/python3.9/site-packages/mitmproxy/tools/_main.py", line 147, in mitmproxy run(console.master.ConsoleMaster, cmdline.mitmproxy, args) File "/builddir/build/BUILDROOT/mitmproxy-5.1.1-1.fc33.x86_64/usr/lib/python3.9/site-packages/mitmproxy/tools/_main.py", line 71, in run opts = options.Options() File "/builddir/build/BUILDROOT/mitmproxy-5.1.1-1.fc33.x86_64/usr/lib/python3.9/site-packages/mitmproxy/options.py", line 50, in __init__ self.add_option( File "/builddir/build/BUILDROOT/mitmproxy-5.1.1-1.fc33.x86_64/usr/lib/python3.9/site-packages/mitmproxy/optmanager.py", line 109, in add_option self._options[name] = _Option(name, typespec, default, help, choices) File "/builddir/build/BUILDROOT/mitmproxy-5.1.1-1.fc33.x86_64/usr/lib/python3.9/site-packages/mitmproxy/optmanager.py", line 34, in __init__ typecheck.check_option_type(name, default, typespec) File "/builddir/build/BUILDROOT/mitmproxy-5.1.1-1.fc33.x86_64/usr/lib/python3.9/site-packages/mitmproxy/utils/typecheck.py", line 73, in check_option_type elif not isinstance(value, typeinfo): File "/usr/lib64/python3.9/typing.py", line 649, in __instancecheck__ return self.__subclasscheck__(type(obj)) File "/usr/lib64/python3.9/typing.py", line 652, in __subclasscheck__ raise TypeError("Subscripted generics cannot be used with" TypeError: Subscripted generics cannot be used with class and instance checks ```
[ { "content": "import typing\n\nType = typing.Union[\n typing.Any # anything more elaborate really fails with mypy at the moment.\n]\n\n\ndef sequence_type(typeinfo: typing.Type[typing.List]) -> Type:\n \"\"\"Return the type of a sequence, e.g. typing.List\"\"\"\n return typeinfo.__args__[0] # type: i...
[ { "content": "import typing\n\nType = typing.Union[\n typing.Any # anything more elaborate really fails with mypy at the moment.\n]\n\n\ndef sequence_type(typeinfo: typing.Type[typing.List]) -> Type:\n \"\"\"Return the type of a sequence, e.g. typing.List\"\"\"\n return typeinfo.__args__[0] # type: i...
diff --git a/mitmproxy/utils/typecheck.py b/mitmproxy/utils/typecheck.py index b2793e4708..78537cc29b 100644 --- a/mitmproxy/utils/typecheck.py +++ b/mitmproxy/utils/typecheck.py @@ -39,7 +39,7 @@ def check_option_type(name: str, value: typing.Any, typeinfo: Type) -> None: typename = str(typeinfo) - if typename.startswith("typing.Union"): + if typename.startswith("typing.Union") or typename.startswith("typing.Optional"): for T in union_types(typeinfo): try: check_option_type(name, value, T)
cython__cython-5505
[BUG] `cython` command prints stdout-type information to stderr ### Describe the bug As reported on the mailing list, the `cython` command prints things to stderr that should go to stdout. ### Code to reproduce the behaviour: ```python >>> from subprocess import run >>> res = run("cython --version", capture_output=True, shell=True) >>> err = res.stderr.splitlines() >>> print(err) [b'Cython version 0.29.35'] >>> out = res.stdout.splitlines() >>> print(out) >>> [] ``` ### Expected behaviour _No response_ ### OS _No response_ ### Python version _No response_ ### Cython version 0.29.35, probably also master ### Additional context _No response_
[ { "content": "#\n# Cython Top Level\n#\n\nfrom __future__ import absolute_import, print_function\n\nimport os\nimport re\nimport sys\nimport io\n\nif sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 3):\n sys.stderr.write(\"Sorry, Cython requires Python 2.7 or 3.3+, found %d.%d\\n\" % ...
[ { "content": "#\n# Cython Top Level\n#\n\nfrom __future__ import absolute_import, print_function\n\nimport os\nimport re\nimport sys\nimport io\n\nif sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 3):\n sys.stderr.write(\"Sorry, Cython requires Python 2.7 or 3.3+, found %d.%d\\n\" % ...
diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index a03f16c48e3..a5d1c7d5728 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -773,7 +773,7 @@ def main(command_line = 0): if options.show_version: from .. import __version__ - sys.stderr.write("Cython version %s\n" % __version__) + print("Cython version %s" % __version__) if options.working_path!="": os.chdir(options.working_path) try:
hpcaitech__ColossalAI-5321
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "#!/usr/bin/env python\n\nfrom typing import Any, Callable, Dict, List, Optional, Tuple, Union\n\nimport torch\nimport torch.distributed as dist\n\nfrom .base_accelerator import BaseAccelerator\n\ntry:\n import torch_npu # noqa\nexcept ImportError:\n pass\n\n\n__all__ = [\"NpuAccelerator\"]\...
[ { "content": "#!/usr/bin/env python\n\nfrom typing import Any, Callable, Dict, List, Optional, Tuple, Union\n\nimport torch\nimport torch.distributed as dist\n\nfrom .base_accelerator import BaseAccelerator\n\ntry:\n import torch_npu # noqa\nexcept ImportError:\n pass\n\n\n__all__ = [\"NpuAccelerator\"]\...
diff --git a/colossalai/accelerator/npu_accelerator.py b/colossalai/accelerator/npu_accelerator.py index 1a86f84cb2d4..b28492968eeb 100644 --- a/colossalai/accelerator/npu_accelerator.py +++ b/colossalai/accelerator/npu_accelerator.py @@ -31,7 +31,7 @@ def get_version(self) -> str: """ Return the version of the accelerator which torch is built against. """ - return torch.version.npu + return torch.version.cann def get_current_device(self) -> torch.device: """
bookwyrm-social__bookwyrm-1410
Unable to post review in Safari on iPadOS **Describe the bug** When trying to post a long-ish review in Safari on iPadOS (desktop mode, content blockers disabled), the post button shows the spinner introduced with #1388, but the posting never concludes. **To Reproduce** Steps to reproduce the behavior: 1. Get an iPad pro 13.9” running iPadOS 14.7.1 2. Open your bookwyrm.social account in Safari, ensuring it runs in desktop mode and content blockers are disabled 3. Write a review of at least 2700 chars 4. Try to post it **Expected behavior** After some spinning, the review appears on your feed. **Instance** bookwyrm.social **Extra context** [Book I’m trying to review](https://bookwyrm.social/book/214201). --- **Device Info:** - Device: iPad pro 2nd gen 13.9” - OS: iPadOS 14.7.1 - Browser: Safari - Version N/A
[ { "content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom environs import Env\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\n\n\nenv = Env()\nDOMAIN = env(\"DOMAIN\")\nVERSION = \"0.0.1\"\n\nPAGE_LENGTH = env(\"PAGE_LENGTH\", 15)\nDEFAULT_LANGUAGE = env(\"DEFA...
[ { "content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom environs import Env\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\n\n\nenv = Env()\nDOMAIN = env(\"DOMAIN\")\nVERSION = \"0.0.1\"\n\nPAGE_LENGTH = env(\"PAGE_LENGTH\", 15)\nDEFAULT_LANGUAGE = env(\"DEFA...
diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 420d840a6a..452b8d9403 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -13,7 +13,7 @@ PAGE_LENGTH = env("PAGE_LENGTH", 15) DEFAULT_LANGUAGE = env("DEFAULT_LANGUAGE", "English") -JS_CACHE = "19447742" +JS_CACHE = "e5832a26" # email EMAIL_BACKEND = env("EMAIL_BACKEND", "django.core.mail.backends.smtp.EmailBackend") diff --git a/bookwyrm/static/js/status_cache.js b/bookwyrm/static/js/status_cache.js index a6eaf03419..b3e345b192 100644 --- a/bookwyrm/static/js/status_cache.js +++ b/bookwyrm/static/js/status_cache.js @@ -64,9 +64,21 @@ let StatusCache = new class { * @return {undefined} */ submitStatus(event) { - event.preventDefault(); const form = event.currentTarget; - const trigger = event.submitter; + let trigger = event.submitter; + + // Safari doesn't understand "submitter" + if (!trigger) { + trigger = event.currentTarget.querySelector("button[type=submit]"); + } + + // This allows the form to submit in the old fashioned way if there's a problem + + if (!trigger || !form) { + return; + } + + event.preventDefault(); BookWyrm.addRemoveClass(form, 'is-processing', true); trigger.setAttribute('disabled', null);
scverse__scanpy-1002
Plotting triggering copy of view Example using scanpy 9dd2e94846aa and anndata `762fdb924e757cdd758231` ```python import scanpy as sc pbmc = sc.datasets.pbmc3k_processed() sc.pl.umap(pbmc, color="louvain") # To make sure that "louvain_colors" has been made bcells = pbmc[pbmc.obs["louvain"] == "B cells"] # This line triggers a copy being made: sc.pl.umap(bcells) # /Users/isaac/github/anndata/anndata/_core/anndata.py:1120: ImplicitModificationWarning: # Initializing view as actual. # "Initializing view as actual.", ImplicitModificationWarning, assert not bcells.is_view ``` Pretty sure that shouldn't be making a copy, since nothing should be modified in the view. To make sure: ```python from anndata.tests.helpers import assert_equal bcells_view = pbmc[pbmc.obs["louvain"] == "B cells"] assert_equal(bcells, bcells_view, exact=True) ``` This also seems to be happening with some of the other plotting functions, like `sc.pl.rank_genes_groups_dotplot`. Elaborating a bit: To me this is an issue since it will use quite a lot of memory for cases where it isn't needed. Why copy a large number of arrays when you don't need to?
[ { "content": "import warnings\nimport collections.abc as cabc\nfrom typing import Union, List, Sequence, Tuple, Collection, Optional\n\nimport numpy as np\nfrom matplotlib import pyplot as pl\nfrom matplotlib import rcParams, ticker\nfrom matplotlib.axes import Axes\nfrom matplotlib.colors import is_color_like\...
[ { "content": "import warnings\nimport collections.abc as cabc\nfrom typing import Union, List, Sequence, Tuple, Collection, Optional\n\nimport numpy as np\nfrom matplotlib import pyplot as pl\nfrom matplotlib import rcParams, ticker\nfrom matplotlib.axes import Axes\nfrom matplotlib.colors import is_color_like\...
diff --git a/scanpy/plotting/_utils.py b/scanpy/plotting/_utils.py index e33e05f0f7..3712c7ef92 100644 --- a/scanpy/plotting/_utils.py +++ b/scanpy/plotting/_utils.py @@ -320,7 +320,8 @@ def _validate_palette(adata, key): _palette = None break _palette.append(color) - if _palette is not None: + # Don't modify if nothing changed + if (_palette is not None and list(_palette) != list(adata.uns[color_key])): adata.uns[color_key] = _palette diff --git a/scanpy/tests/test_plotting.py b/scanpy/tests/test_plotting.py index e2b76196e1..975ee6808f 100644 --- a/scanpy/tests/test_plotting.py +++ b/scanpy/tests/test_plotting.py @@ -770,3 +770,35 @@ def test_paga(image_comparer): pbmc, basis='X_pca', legend_fontweight='normal', threshold=0.5, show=False, ) save_and_compare_images('master_paga_compare_pca') + + +def test_no_copy(): + # https://github.com/theislab/scanpy/issues/1000 + # Tests that plotting functions don't make a copy from a view unless they + # actually have to + actual = sc.datasets.pbmc68k_reduced() + sc.pl.umap(actual, color=["bulk_labels", "louvain"], show=False) # Set colors + + view = actual[np.random.choice(actual.obs_names, size=actual.shape[0] // 5), :] + + sc.pl.umap(view, color=["bulk_labels", "louvain"], show=False) + assert view.is_view + + rank_genes_groups_plotting_funcs = [ + sc.pl.rank_genes_groups, + sc.pl.rank_genes_groups_dotplot, + sc.pl.rank_genes_groups_heatmap, + sc.pl.rank_genes_groups_matrixplot, + sc.pl.rank_genes_groups_stacked_violin, + # TODO: raises ValueError about empty distance matrix – investigate + # sc.pl.rank_genes_groups_tracksplot, + sc.pl.rank_genes_groups_violin, + ] + + # Only plotting one group at a time to avoid generating dendrogram + # TODO: Generating a dendrogram modifies the object, this should be + # optional and also maybe not modify the object. + for plotfunc in rank_genes_groups_plotting_funcs: + view = actual[actual.obs["bulk_labels"] == "Dendritic"] + plotfunc(view, ["Dendritic"], show=False) + assert view.is_view
encode__django-rest-framework-4273
Serializing "complex" field returns None instead of the value since 3.4 (Not a great title — I hope the description will clarify.) ## Steps to reproduce First: `pip install django-phonenumber-field` With the following model and serializer: ``` python from django.db.models import Model from phonenumber_field.modelfields import PhoneNumberField from rest_framework.serializers import ModelSerializer class PhoneModel(Model): number = PhoneNumberField() class PhoneSerializer(ModelSerializer): class Meta: model = PhoneModel fields = ['number'] ``` ## Expected behavior This test used to pass (until version 3.3.3): ``` python def test_phone_serializer(): phone = models.PhoneModel(number='+33610293847') data = models.PhoneSerializer(phone).data assert data['number'] == '+33610293847' ``` ## Actual behavior The test fails (since version 3.4) with: ``` def test_phone_serializer(): phone = models.PhoneModel(number='+33610293847') data = models.PhoneSerializer(phone).data > assert data['number'] == '+33610293847' E assert None == '+33610293847' ``` ## Analysis I bisected this regression to 9c996d7d2aa4137c8ba29afa2253efec8d6db74f. As far as I can tell, DRF used to get the string representation of the field and no longer does. ``` (Pdb) phone.number PhoneNumber(country_code=33, national_number=610293847, extension=None, italian_leading_zero=None, number_of_leading_zeros=None, country_code_source=1, preferred_domestic_carrier_code='') (Pdb) str(phone.number) '+33610293847' ```
[ { "content": "\"\"\"\nThe `compat` module provides support for backwards compatibility with older\nversions of Django/Python, and compatibility wrappers around optional packages.\n\"\"\"\n\n# flake8: noqa\nfrom __future__ import unicode_literals\n\nimport inspect\n\nimport django\nfrom django.apps import apps\n...
[ { "content": "\"\"\"\nThe `compat` module provides support for backwards compatibility with older\nversions of Django/Python, and compatibility wrappers around optional packages.\n\"\"\"\n\n# flake8: noqa\nfrom __future__ import unicode_literals\n\nimport inspect\n\nimport django\nfrom django.apps import apps\n...
diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 9c69eaa032..94f64265aa 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -125,7 +125,7 @@ def get_related_model(field): def value_from_object(field, obj): if django.VERSION < (1, 9): return field._get_val_from_obj(obj) - field.value_from_object(obj) + return field.value_from_object(obj) # contrib.postgres only supported from 1.8 onwards.
redis__redis-py-3265
Discrepancy in `INFO` response parsing **Version**: `5.0.0` **Description**: The code for parsing the `INFO` response is creating a discrepancy in the new RediSearch index field types field, e.g., `search_fields_text`. If there is more than one section to this field its corresponding value (e.g., `TEXT=1, SORTABLE=1`) is returned as a dictionary (as expected), while if there is only one value for it (e.g., `TEXT=1`) it is returned as a string! This is bad since we later use this value assuming that it is a dictionary, and thus face failures in the case that it is not. The wanted behavior: We always get a dictionary back, whether we have only one section for this value or more. Example: We have one section for the `TEXT` field, and two for the `TAG` field, and this is what we get: ![image](https://github.com/redis/redis-py/assets/74051729/51282024-7e1c-4d2a-bae8-04dcaf0fc53e) The source of the problem is in the `parse_info()` function, [here](https://github.com/redis/redis-py/blob/19b55c62389c890a96dd611e28aaaedba7506720/redis/_parsers/helpers.py#L35-L36). Thanks!
[ { "content": "import datetime\n\nfrom redis.utils import str_if_bytes\n\n\ndef timestamp_to_datetime(response):\n \"Converts a unix timestamp to a Python datetime object\"\n if not response:\n return None\n try:\n response = int(response)\n except ValueError:\n return None\n ...
[ { "content": "import datetime\n\nfrom redis.utils import str_if_bytes\n\n\ndef timestamp_to_datetime(response):\n \"Converts a unix timestamp to a Python datetime object\"\n if not response:\n return None\n try:\n response = int(response)\n except ValueError:\n return None\n ...
diff --git a/redis/_parsers/helpers.py b/redis/_parsers/helpers.py index aa115aa4a1..57b12ab89e 100644 --- a/redis/_parsers/helpers.py +++ b/redis/_parsers/helpers.py @@ -38,7 +38,7 @@ def parse_info(response): response = str_if_bytes(response) def get_value(value): - if "," not in value or "=" not in value: + if "," not in value and "=" not in value: try: if "." in value: return float(value) diff --git a/tests/test_parsers/test_helpers.py b/tests/test_parsers/test_helpers.py new file mode 100644 index 0000000000..6430a237f6 --- /dev/null +++ b/tests/test_parsers/test_helpers.py @@ -0,0 +1,35 @@ +from redis._parsers.helpers import parse_info + + +def test_parse_info(): + info_output = """ +# Modules +module:name=search,ver=999999,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors] + +# search_fields_statistics +search_fields_text:Text=3 +search_fields_tag:Tag=2,Sortable=1 + +# search_version +search_version:99.99.99 +search_redis_version:7.2.2 - oss + +# search_runtime_configurations +search_query_timeout_ms:500 + """ + info = parse_info(info_output) + + assert isinstance(info["modules"], list) + assert isinstance(info["modules"][0], dict) + assert info["modules"][0]["name"] == "search" + + assert isinstance(info["search_fields_text"], dict) + assert info["search_fields_text"]["Text"] == 3 + + assert isinstance(info["search_fields_tag"], dict) + assert info["search_fields_tag"]["Tag"] == 2 + assert info["search_fields_tag"]["Sortable"] == 1 + + assert info["search_version"] == "99.99.99" + assert info["search_redis_version"] == "7.2.2 - oss" + assert info["search_query_timeout_ms"] == 500
redis__redis-py-3264
Discrepancy in `INFO` response parsing **Version**: `5.0.0` **Description**: The code for parsing the `INFO` response is creating a discrepancy in the new RediSearch index field types field, e.g., `search_fields_text`. If there is more than one section to this field its corresponding value (e.g., `TEXT=1, SORTABLE=1`) is returned as a dictionary (as expected), while if there is only one value for it (e.g., `TEXT=1`) it is returned as a string! This is bad since we later use this value assuming that it is a dictionary, and thus face failures in the case that it is not. The wanted behavior: We always get a dictionary back, whether we have only one section for this value or more. Example: We have one section for the `TEXT` field, and two for the `TAG` field, and this is what we get: ![image](https://github.com/redis/redis-py/assets/74051729/51282024-7e1c-4d2a-bae8-04dcaf0fc53e) The source of the problem is in the `parse_info()` function, [here](https://github.com/redis/redis-py/blob/19b55c62389c890a96dd611e28aaaedba7506720/redis/_parsers/helpers.py#L35-L36). Thanks!
[ { "content": "import datetime\n\nfrom redis.utils import str_if_bytes\n\n\ndef timestamp_to_datetime(response):\n \"Converts a unix timestamp to a Python datetime object\"\n if not response:\n return None\n try:\n response = int(response)\n except ValueError:\n return None\n ...
[ { "content": "import datetime\n\nfrom redis.utils import str_if_bytes\n\n\ndef timestamp_to_datetime(response):\n \"Converts a unix timestamp to a Python datetime object\"\n if not response:\n return None\n try:\n response = int(response)\n except ValueError:\n return None\n ...
diff --git a/redis/_parsers/helpers.py b/redis/_parsers/helpers.py index bdd749a5bc..7418cdca53 100644 --- a/redis/_parsers/helpers.py +++ b/redis/_parsers/helpers.py @@ -38,7 +38,7 @@ def parse_info(response): response = str_if_bytes(response) def get_value(value): - if "," not in value or "=" not in value: + if "," not in value and "=" not in value: try: if "." in value: return float(value) diff --git a/tests/test_parsers/test_helpers.py b/tests/test_parsers/test_helpers.py new file mode 100644 index 0000000000..6430a237f6 --- /dev/null +++ b/tests/test_parsers/test_helpers.py @@ -0,0 +1,35 @@ +from redis._parsers.helpers import parse_info + + +def test_parse_info(): + info_output = """ +# Modules +module:name=search,ver=999999,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors] + +# search_fields_statistics +search_fields_text:Text=3 +search_fields_tag:Tag=2,Sortable=1 + +# search_version +search_version:99.99.99 +search_redis_version:7.2.2 - oss + +# search_runtime_configurations +search_query_timeout_ms:500 + """ + info = parse_info(info_output) + + assert isinstance(info["modules"], list) + assert isinstance(info["modules"][0], dict) + assert info["modules"][0]["name"] == "search" + + assert isinstance(info["search_fields_text"], dict) + assert info["search_fields_text"]["Text"] == 3 + + assert isinstance(info["search_fields_tag"], dict) + assert info["search_fields_tag"]["Tag"] == 2 + assert info["search_fields_tag"]["Sortable"] == 1 + + assert info["search_version"] == "99.99.99" + assert info["search_redis_version"] == "7.2.2 - oss" + assert info["search_query_timeout_ms"] == 500
WeblateOrg__weblate-8229
Maintainers not able to add Punjabi translations ### Describe the issue The Punjabi language is used in both Pakistan and India, but with different writing systems. The locales available for this in Weblate are `pa_PK` and `pa` respectively. (This is the same as how the Android locales are set up for this.) I have been translating applications for both scripts, which is easier to do together. However, `pa_PK` is not on the list of languages to choose from in the menu for adding a new translation, which says only a basic list of languages is included. For context, Punjabi is the 10th most spoken language in the world, and the majority of speakers live in Pakistan where it is the most widely apoken language. The language selection menu even includes ancient languages but does not have this option, it is odd that it is omitted entirely. I have tried requesting adding it manually to maintainers, but here the maintainer of F-Droid suggests this may be a bug with Weblate since Android supports this locale but they were not able to add it on their hostes Weblate instance: https://gitlab.com/fdroid/admin/-/issues/342 In the meantime, I have been using the "und" Undetermined language code to store these translationa, but this puts a burden on project maintainers to manually export these and include them under the `pa_PK` locale when the Weblate application is supposed to be able to do this. ### I already tried - [X] I've read and searched [the documentation](https://docs.weblate.org/). - [X] I've searched for similar issues in this repository. ### Steps to reproduce the behavior 1. Click "+" to add "Punjabi (Pakistan)" 2. Error appears saying project maintainer needs to add support for this 3. Project maintainer is not able to do this ### Expected behavior Ability to translate projects on Weblate to Punjabi. ### Screenshots Screenshots in the linked Gitlab issue re: F-Droid ### Exception traceback _No response_ ### How do you run Weblate? weblate.org service ### Weblate versions _No response_ ### Weblate deploy checks _No response_ ### Additional context _No response_
[ { "content": "#\n# Copyright © 2012–2022 Michal Čihař <michal@cihar.com>\n#\n# This file is part of Weblate <https://weblate.org/>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, e...
[ { "content": "#\n# Copyright © 2012–2022 Michal Čihař <michal@cihar.com>\n#\n# This file is part of Weblate <https://weblate.org/>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, e...
diff --git a/weblate/lang/data.py b/weblate/lang/data.py index 88e50e6e92fb..35d7ee7d8c73 100644 --- a/weblate/lang/data.py +++ b/weblate/lang/data.py @@ -24,7 +24,15 @@ NO_CODE_LANGUAGES = {lang[0] for lang in languages.LANGUAGES} -UNDERSCORE_EXCEPTIONS = {"nb_NO", "zh_Hant", "zh_Hans", "be_Latn", "ro_MD", "pt_BR"} +UNDERSCORE_EXCEPTIONS = { + "nb_NO", + "zh_Hant", + "zh_Hans", + "be_Latn", + "ro_MD", + "pt_BR", + "pa_PK", +} AT_EXCEPTIONS = {"ca@valencia"}
bookwyrm-social__bookwyrm-2501
AASIN and isfdb not editable Somehow during the merge some code most be gone lost because... <img width="640" alt="Bildschirm­foto 2022-12-11 um 21 29 47" src="https://user-images.githubusercontent.com/2017105/206927195-f9b27bcc-2f3a-46eb-ab1d-84340e5fa061.png">
[ { "content": "\"\"\" using django model forms \"\"\"\nfrom django import forms\n\nfrom bookwyrm import models\nfrom bookwyrm.models.fields import ClearableFileInputWithWarning\nfrom .custom_form import CustomForm\nfrom .widgets import ArrayWidget, SelectDateWidget, Select\n\n\n# pylint: disable=missing-class-do...
[ { "content": "\"\"\" using django model forms \"\"\"\nfrom django import forms\n\nfrom bookwyrm import models\nfrom bookwyrm.models.fields import ClearableFileInputWithWarning\nfrom .custom_form import CustomForm\nfrom .widgets import ArrayWidget, SelectDateWidget, Select\n\n\n# pylint: disable=missing-class-do...
diff --git a/bookwyrm/forms/books.py b/bookwyrm/forms/books.py index 67b044f05d..623beaa042 100644 --- a/bookwyrm/forms/books.py +++ b/bookwyrm/forms/books.py @@ -40,6 +40,8 @@ class Meta: "goodreads_key", "oclc_number", "asin", + "aasin", + "isfdb", ] widgets = { "title": forms.TextInput(attrs={"aria-describedby": "desc_title"}),
bookwyrm-social__bookwyrm-1809
Unread notifications are no longer visually distinguished from read ones I just forgot to consider this when I re-wrote the notifications page
[ { "content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom environs import Env\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\n\n\nenv = Env()\nenv.read_env()\nDOMAIN = env(\"DOMAIN\")\nVERSION = \"0.1.1\"\n\nPAGE_LENGTH = env(\"PAGE_LENGTH\", 15)\nDEFAULT_LANGU...
[ { "content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom environs import Env\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\n\n\nenv = Env()\nenv.read_env()\nDOMAIN = env(\"DOMAIN\")\nVERSION = \"0.1.1\"\n\nPAGE_LENGTH = env(\"PAGE_LENGTH\", 15)\nDEFAULT_LANGU...
diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index fe2f7467ab..92ff7ecdd5 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -14,7 +14,7 @@ PAGE_LENGTH = env("PAGE_LENGTH", 15) DEFAULT_LANGUAGE = env("DEFAULT_LANGUAGE", "English") -JS_CACHE = "2d3181e1" +JS_CACHE = "9b4cc1f7" # email EMAIL_BACKEND = env("EMAIL_BACKEND", "django.core.mail.backends.smtp.EmailBackend") diff --git a/bookwyrm/static/css/bookwyrm.css b/bookwyrm/static/css/bookwyrm.css index 4d960734e1..cc87e5b813 100644 --- a/bookwyrm/static/css/bookwyrm.css +++ b/bookwyrm/static/css/bookwyrm.css @@ -751,6 +751,13 @@ ol.ordered-list li::before { padding: 0 0.75em; } +/* Notifications page + ******************************************************************************/ + +.notification a.icon { + text-decoration: none !important; +} + /* Breadcrumbs ******************************************************************************/ diff --git a/bookwyrm/templates/notifications/items/accept.html b/bookwyrm/templates/notifications/items/accept.html index 045e232666..5f26008f47 100644 --- a/bookwyrm/templates/notifications/items/accept.html +++ b/bookwyrm/templates/notifications/items/accept.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/add.html b/bookwyrm/templates/notifications/items/add.html index 0e653aeb8d..6a0183ebe9 100644 --- a/bookwyrm/templates/notifications/items/add.html +++ b/bookwyrm/templates/notifications/items/add.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/boost.html b/bookwyrm/templates/notifications/items/boost.html index 5f8962b382..6bb373ef63 100644 --- a/bookwyrm/templates/notifications/items/boost.html +++ b/bookwyrm/templates/notifications/items/boost.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/fav.html b/bookwyrm/templates/notifications/items/fav.html index fbb865e4f9..58964d0331 100644 --- a/bookwyrm/templates/notifications/items/fav.html +++ b/bookwyrm/templates/notifications/items/fav.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/follow.html b/bookwyrm/templates/notifications/items/follow.html index 7220d5d174..3518e7b1b7 100644 --- a/bookwyrm/templates/notifications/items/follow.html +++ b/bookwyrm/templates/notifications/items/follow.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/follow_request.html b/bookwyrm/templates/notifications/items/follow_request.html index febb0a50e2..9cec8116aa 100644 --- a/bookwyrm/templates/notifications/items/follow_request.html +++ b/bookwyrm/templates/notifications/items/follow_request.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/import.html b/bookwyrm/templates/notifications/items/import.html index f3c8b5c099..7f59948117 100644 --- a/bookwyrm/templates/notifications/items/import.html +++ b/bookwyrm/templates/notifications/items/import.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% block primary_link %}{% spaceless %} diff --git a/bookwyrm/templates/notifications/items/invite.html b/bookwyrm/templates/notifications/items/invite.html index abb8cd02fe..aff416b07c 100644 --- a/bookwyrm/templates/notifications/items/invite.html +++ b/bookwyrm/templates/notifications/items/invite.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/join.html b/bookwyrm/templates/notifications/items/join.html index c10def4565..82f8a8c505 100644 --- a/bookwyrm/templates/notifications/items/join.html +++ b/bookwyrm/templates/notifications/items/join.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/item_layout.html b/bookwyrm/templates/notifications/items/layout.html similarity index 70% rename from bookwyrm/templates/notifications/items/item_layout.html rename to bookwyrm/templates/notifications/items/layout.html index 506bda8dd4..6ddbdcc314 100644 --- a/bookwyrm/templates/notifications/items/item_layout.html +++ b/bookwyrm/templates/notifications/items/layout.html @@ -1,9 +1,9 @@ {% load bookwyrm_tags %} {% related_status notification as related_status %} -<div class="box is-shadowless has-background-white-ter {% if notification.id in unread %} is-primary{% endif %}"> - <div class="columns is-mobile"> - <div class="column is-narrow is-size-3 {% if notification.id in unread%}has-text-white{% else %}has-text-grey{% endif %}"> - <a class="has-text-dark" href="{% block primary_link %}{% endblock %}"> +<div class="notification {% if notification.id in unread %}has-background-primary{% endif %}"> + <div class="columns is-mobile {% if notification.id in unread %}has-text-white{% else %}has-text-grey{% endif %}"> + <div class="column is-narrow is-size-3"> + <a class="icon" href="{% block primary_link %}{% endblock %}"> {% block icon %}{% endblock %} </a> </div> diff --git a/bookwyrm/templates/notifications/items/leave.html b/bookwyrm/templates/notifications/items/leave.html index 422a31dead..c17a1986ea 100644 --- a/bookwyrm/templates/notifications/items/leave.html +++ b/bookwyrm/templates/notifications/items/leave.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/mention.html b/bookwyrm/templates/notifications/items/mention.html index cda77163e7..ead3c8a6cb 100644 --- a/bookwyrm/templates/notifications/items/mention.html +++ b/bookwyrm/templates/notifications/items/mention.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/remove.html b/bookwyrm/templates/notifications/items/remove.html index eba18fd899..84160c7bd3 100644 --- a/bookwyrm/templates/notifications/items/remove.html +++ b/bookwyrm/templates/notifications/items/remove.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/reply.html b/bookwyrm/templates/notifications/items/reply.html index 883bbbb5bf..0aa664ce40 100644 --- a/bookwyrm/templates/notifications/items/reply.html +++ b/bookwyrm/templates/notifications/items/reply.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %} diff --git a/bookwyrm/templates/notifications/items/report.html b/bookwyrm/templates/notifications/items/report.html index f537b52556..fdd5f00946 100644 --- a/bookwyrm/templates/notifications/items/report.html +++ b/bookwyrm/templates/notifications/items/report.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} diff --git a/bookwyrm/templates/notifications/items/update.html b/bookwyrm/templates/notifications/items/update.html index be796b7856..7fc52cef10 100644 --- a/bookwyrm/templates/notifications/items/update.html +++ b/bookwyrm/templates/notifications/items/update.html @@ -1,4 +1,4 @@ -{% extends 'notifications/items/item_layout.html' %} +{% extends 'notifications/items/layout.html' %} {% load i18n %} {% load utilities %}
locustio__locust-1573
Misleading log message in distributed mode <!-- If you have a general question about how to use Locust, please check Stack Overflow first https://stackoverflow.com/questions/tagged/locust You can also ask new questions on SO, https://stackoverflow.com/questions/ask just remember to tag your question with "locust". Do not immediately post your issue here after posting to SO, wait for an answer there instead. Use this form only for reporting actual bugs in locust. Be mindful that the developers of locust are unpaid volunteers, so make sure you have tried everything you can think of before filing a bug :) --> ### Describe the bug When running locust in distributed mode you can still get this warning message on the master node: ``` /WARNING/locust.main: System open file limit setting is not high enough for load testing, and the OS didn't allow locust to increase it by itself. See https://github.com/locustio/locust/wiki/Installation#increasing-maximum-number-of-open-files-limit for more info. ``` Since the master won't execute any of the tests this warning is misleading. <!-- A clear and concise description of what the bug is --> ### Expected behavior <!-- Tell us what you think should happen --> No log message about open file limit on master when running distributed ### Actual behavior Log message about low open file limit on instance running master mode <!-- Tell us what happens instead. Include screenshots if this an issue with the GUI. --> ### Steps to reproduce <!-- Please provide a minimal reproducible code example (https://stackoverflow.com/help/minimal-reproducible-example) --> Run `locust --master` on a host with low open file limit (e.g 2048). ### Environment - OS: locust docker image running on Linux host - Python version: Embedded version in docker image with tag `1.2.3` - Locust version: 1.2.3 - Locust command line that you ran: `locust --master` - Locust file contents (anonymized if necessary): N/A
[ { "content": "import inspect\nimport logging\nimport os\nimport importlib\nimport signal\nimport socket\nimport sys\nimport time\n\nimport gevent\n\nimport locust\n\nfrom . import log\nfrom .argument_parser import parse_locustfile_option, parse_options\nfrom .env import Environment\nfrom .log import setup_loggi...
[ { "content": "import inspect\nimport logging\nimport os\nimport importlib\nimport signal\nimport socket\nimport sys\nimport time\n\nimport gevent\n\nimport locust\n\nfrom . import log\nfrom .argument_parser import parse_locustfile_option, parse_options\nfrom .env import Environment\nfrom .log import setup_loggi...
diff --git a/locust/main.py b/locust/main.py index ece30d3763..801ae69878 100644 --- a/locust/main.py +++ b/locust/main.py @@ -168,7 +168,8 @@ def main(): # list() call is needed to consume the dict_view object in Python 3 user_classes = list(user_classes.values()) - if os.name != "nt": + if os.name != "nt" and not options.master: + try: import resource
python-pillow__Pillow-6481
PSD incorrectly loaded ### What did you do? I opened the TIFF in Pillow and converted it to JPG. ### What did you expect to happen? The JPG image to look the same as the original TIFF. ### What actually happened? The converted JPG looks malformed and has messed up colors. ### What are your OS, Python and Pillow versions? * OS: Linux * Python: 3.10.5 * Pillow: 9.1.1 (also tested -git) ```python >>> img = Image.open("3662b8bd397337482862ab1a06bf3366-OA_535_161_17_F_TE.tif") >>> out_img = img.convert("RGB") >>> out_img.save("converted.jpg", quality=95) ``` [original image](https://api.collectie.gent/storage/v1/download/3662b8bd397337482862ab1a06bf3366-OA_535_161_17_F_TE.tif) (beware, 274MB) [converted image](https://api.collectie.gent/storage/v1/download/3a029a4f48b480211286486a6a1f0f0b-transcode-OA_535_161_17_F_TE.jpg) Is it okay to report this here or should I report this to the appropriate library (libtiff, jpeg-turbo, ?)
[ { "content": "#\n# The Python Imaging Library\n# $Id$\n#\n# Adobe PSD 2.5/3.0 file handling\n#\n# History:\n# 1995-09-01 fl Created\n# 1997-01-03 fl Read most PSD images\n# 1997-01-18 fl Fixed P and CMYK support\n# 2001-10-21 fl Added seek/tell support (for layers)\n#\n# Copyright (c) 1997-2001 by Secre...
[ { "content": "#\n# The Python Imaging Library\n# $Id$\n#\n# Adobe PSD 2.5/3.0 file handling\n#\n# History:\n# 1995-09-01 fl Created\n# 1997-01-03 fl Read most PSD images\n# 1997-01-18 fl Fixed P and CMYK support\n# 2001-10-21 fl Added seek/tell support (for layers)\n#\n# Copyright (c) 1997-2001 by Secre...
diff --git a/Tests/images/rgba.psd b/Tests/images/rgba.psd new file mode 100644 index 00000000000..45fb7c3cca0 Binary files /dev/null and b/Tests/images/rgba.psd differ diff --git a/Tests/test_file_psd.py b/Tests/test_file_psd.py index b4b5b7a0c65..4f934375c7c 100644 --- a/Tests/test_file_psd.py +++ b/Tests/test_file_psd.py @@ -4,7 +4,7 @@ from PIL import Image, PsdImagePlugin -from .helper import assert_image_similar, hopper, is_pypy +from .helper import assert_image_equal_tofile, assert_image_similar, hopper, is_pypy test_file = "Tests/images/hopper.psd" @@ -107,6 +107,11 @@ def test_open_after_exclusive_load(): im.load() +def test_rgba(): + with Image.open("Tests/images/rgba.psd") as im: + assert_image_equal_tofile(im, "Tests/images/imagedraw_square.png") + + def test_icc_profile(): with Image.open(test_file) as im: assert "icc_profile" in im.info diff --git a/src/PIL/PsdImagePlugin.py b/src/PIL/PsdImagePlugin.py index 04c2e4fe379..bd10e3b95dd 100644 --- a/src/PIL/PsdImagePlugin.py +++ b/src/PIL/PsdImagePlugin.py @@ -75,6 +75,9 @@ def _open(self): if channels > psd_channels: raise OSError("not enough channels") + if mode == "RGB" and psd_channels == 4: + mode = "RGBA" + channels = 4 self.mode = mode self._size = i32(s, 18), i32(s, 14)
kivy__python-for-android-2447
tarfile failure with long user ID Note this is a follow-on from the same effort which produced #1012, but I think the bugs are independent. I switched to Python 3 and the CrystaxNDK in an attempt to avoid NDK build errors, and got far enough to run into this. While the dist's build.py is building its tar archive, I get `ValueError("overflow in number field")`: ``` Traceback (most recent call last): File "/usr/local/bin/p4a", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python3.5/site-packages/pythonforandroid/toolchain.py", line 754, in main ToolchainCL() File "/usr/local/lib/python3.5/site-packages/pythonforandroid/toolchain.py", line 343, in __init__ getattr(self, command_method_name)(unknown) File "/usr/local/lib/python3.5/site-packages/pythonforandroid/toolchain.py", line 94, in wrapper_func func(self, args) File "/usr/local/lib/python3.5/site-packages/pythonforandroid/toolchain.py", line 589, in apk build_args = build.parse_args(args) File "/Users/testuser/.python-for-android/dists/unnamed_dist_1/build.py", line 488, in parse_args make_package(args) File "/Users/testuser/.python-for-android/dists/unnamed_dist_1/build.py", line 248, in make_package make_tar('assets/private.mp3', tar_dirs, args.ignore_path) File "/Users/testuser/.python-for-android/dists/unnamed_dist_1/build.py", line 197, in make_tar tf.add(fn, afn) File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tarfile.py", line 1938, in add self.addfile(tarinfo, f) File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tarfile.py", line 1960, in addfile buf = tarinfo.tobuf(self.format, self.encoding, self.errors) File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tarfile.py", line 802, in tobuf return self.create_ustar_header(info, encoding, errors) File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tarfile.py", line 821, in create_ustar_header return self._create_header(info, USTAR_FORMAT, encoding, errors) File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tarfile.py", line 916, in _create_header itn(info.get("uid", 0), 8, format), File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tarfile.py", line 211, in itn raise ValueError("overflow in number field") ValueError: overflow in number field ``` It seems the overflow is in the "uid" field, and I notice that my UID on my Mac (part of a corporate domain) is pretty high at 1730938684. Looking at the package in [`tarfile.py`](https://github.com/python/cpython/blob/master/Lib/tarfile.py#L218) it seems this is a limitation of the USTAR format which the python-4-android builder is selecting specifically. The default GNU format can support much larger numbers, though I presume the unpacking code used in the Android package might not support it? I was able to work around this problem by running as a different local user account, so long as that account owns both the .python-for-android directory and the source input directory. Since UID information isn't relevant when unpacking on Android it would be nice to discard it and make this not matter, if using the GNU tar format isn't an option. It doesn't look like the tarfile package gives the ability to do this directly, but you could chmod all the files to root (in a temporary location) before compressing them.
[ { "content": "#!/usr/bin/env python3\n\nfrom gzip import GzipFile\nimport hashlib\nimport json\nfrom os.path import (\n dirname, join, isfile, realpath,\n relpath, split, exists, basename\n)\nfrom os import environ, listdir, makedirs, remove\nimport os\nimport shlex\nimport shutil\nimport subprocess\nimpo...
[ { "content": "#!/usr/bin/env python3\n\nfrom gzip import GzipFile\nimport hashlib\nimport json\nfrom os.path import (\n dirname, join, isfile, realpath,\n relpath, split, exists, basename\n)\nfrom os import environ, listdir, makedirs, remove\nimport os\nimport shlex\nimport shutil\nimport subprocess\nimpo...
diff --git a/pythonforandroid/bootstraps/common/build/build.py b/pythonforandroid/bootstraps/common/build/build.py index 895e599f6c..aa0574072a 100644 --- a/pythonforandroid/bootstraps/common/build/build.py +++ b/pythonforandroid/bootstraps/common/build/build.py @@ -201,6 +201,7 @@ def clean(tinfo): dirs.append(d) tinfo = tarfile.TarInfo(d) tinfo.type = tarfile.DIRTYPE + clean(tinfo) tf.addfile(tinfo) # put the file
svthalia__concrexit-1844
Event (registration) status message in the API ### Is your feature request related to a problem? Please describe. Currently, the event status messages (like 'you cannot cancel your registration without having to pay a fine') are hardcoded and whenever we update them, we must also update the app ### Describe the solution you'd like Put the message in the API ### Additional context Also checkout #1381
[ { "content": "from rest_framework import serializers\n\nfrom activemembers.api.v2.serializers.member_group import MemberGroupSerializer\nfrom announcements.api.v2.serializers import SlideSerializer\nfrom documents.api.v2.serializers.document import DocumentSerializer\nfrom events import services\nfrom events.ap...
[ { "content": "from rest_framework import serializers\n\nfrom activemembers.api.v2.serializers.member_group import MemberGroupSerializer\nfrom announcements.api.v2.serializers import SlideSerializer\nfrom documents.api.v2.serializers.document import DocumentSerializer\nfrom events import services\nfrom events.ap...
diff --git a/website/events/api/v2/serializers/event.py b/website/events/api/v2/serializers/event.py index ccfa35ae3..d3c60ef9a 100644 --- a/website/events/api/v2/serializers/event.py +++ b/website/events/api/v2/serializers/event.py @@ -32,6 +32,7 @@ class Meta: "num_participants", "max_participants", "no_registration_message", + "cancel_too_late_message", "has_fields", "food_event", "maps_url",
google__clusterfuzz-2784
Tolerate empty primary_contact in project setup ``` Traceback (most recent call last): File "/srv/handlers/base_handler.py", line 277, in dispatch_request return super(Handler, self).dispatch_request(*args, **kwargs) File "/layers/google.python.pip/pip/lib/python3.7/site-packages/flask/views.py", line 163, in dispatch_request return meth(*args, **kwargs) File "/srv/libs/handler.py", line 100, in wrapper result = func(self) File "/srv/handlers/cron/project_setup.py", line 1052, in get result = config.set_up(projects) File "/srv/handlers/cron/project_setup.py", line 942, in set_up self.sync_user_permissions(project, info) File "/srv/handlers/cron/project_setup.py", line 883, in sync_user_permissions ccs = ccs_from_info(info) File "/srv/handlers/cron/project_setup.py", line 445, in ccs_from_info ccs.extend(_get_ccs('primary_contact', allow_list=False)) File "/srv/handlers/cron/project_setup.py", line 442, in _get_ccs raise ProjectSetupError(f'Bad value for field {field_name}: {field_value}.') handlers.cron.project_setup.ProjectSetupError: Bad value for field primary_contact: None. ```
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/src/appengine/handlers/cron/project_setup.py b/src/appengine/handlers/cron/project_setup.py index 69f3479b16..b075a98aa2 100644 --- a/src/appengine/handlers/cron/project_setup.py +++ b/src/appengine/handlers/cron/project_setup.py @@ -438,6 +438,8 @@ def _get_ccs(field_name, allow_list=True): return field_value if isinstance(field_value, str): return [field_value] + if field_value is None: + return [] raise ProjectSetupError(f'Bad value for field {field_name}: {field_value}.') diff --git a/src/clusterfuzz/_internal/tests/appengine/handlers/cron/project_setup_test.py b/src/clusterfuzz/_internal/tests/appengine/handlers/cron/project_setup_test.py index e884e345d4..62f086467b 100644 --- a/src/clusterfuzz/_internal/tests/appengine/handlers/cron/project_setup_test.py +++ b/src/clusterfuzz/_internal/tests/appengine/handlers/cron/project_setup_test.py @@ -244,6 +244,7 @@ def test_execute(self): 'User@example.com', 'user2@googlemail.com', ], + 'vendor_ccs': None, }), ('lib2', { 'homepage': 'http://example2.com',
cloudtools__troposphere-1740
SageMaker Model ContainerDefinition object does not support attribute Mode Setting a `Mode` attribute within the ContainerDefinition for both the `PrimaryContainer` and `Containers` attributes for creating a Model resources keeps throwing error - `AttributeError: ContainerDefinition object does not support attribute Mode`. Within the latest cloudformation docs https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-model-containerdefinition.html the `Mode` attribute is supported. Without this support, multiple models container(s) creates/updates cannot be configured. Would you prefer I open a PR or can I wait if it won't take much. Thanks.
[ { "content": "# Copyright (c) 2012-2018, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Tags\nfrom .validators import integer\n\n\nclass GitConfig(AWSProperty):\n props = {\n 'Branch': (basestring, False),\n 'R...
[ { "content": "# Copyright (c) 2012-2018, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Tags\nfrom .validators import integer\n\n\nclass GitConfig(AWSProperty):\n props = {\n 'Branch': (basestring, False),\n 'R...
diff --git a/troposphere/sagemaker.py b/troposphere/sagemaker.py index 6bd90952d..a172945cf 100644 --- a/troposphere/sagemaker.py +++ b/troposphere/sagemaker.py @@ -59,6 +59,7 @@ class ContainerDefinition(AWSProperty): props = { 'ContainerHostname': (basestring, False), 'Environment': (dict, False), + 'Mode': (basestring, False), 'ModelDataUrl': (basestring, False), 'Image': (basestring, True) }