repo stringclasses 37
values | instance_id stringlengths 17 34 | base_commit stringlengths 40 40 | patch stringlengths 291 1.62M | test_patch stringlengths 307 76.5k | problem_statement stringlengths 40 59.9k | hints_text stringlengths 0 149k | created_at stringdate 2018-06-13 17:01:37 2024-12-20 00:40:00 | merged_at stringdate 2018-09-24 06:57:54 2024-12-20 20:16:12 | PASS_TO_PASS stringlengths 2 601k | PASS_TO_FAIL stringclasses 11
values | FAIL_TO_PASS stringlengths 18 605k | FAIL_TO_FAIL stringclasses 60
values | install stringlengths 217 12.7k | test_framework stringclasses 10
values | test_commands stringclasses 10
values | version null | environment_setup_commit null | docker_image_root stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hynek/structlog | hynek__structlog-198 | 53ec2bbd011c9c2fad77bfb310ba102b4c3abcac | diff --git a/src/structlog/stdlib.py b/src/structlog/stdlib.py
index fff4e28c..95ef0fdb 100644
--- a/src/structlog/stdlib.py
+++ b/src/structlog/stdlib.py
@@ -120,9 +120,52 @@ def _proxy_to_logger(self, method_name, event, *event_args, **event_kw):
)
#
- # Pass-through methods to mimick the stdlib's ... | diff --git a/tests/test_stdlib.py b/tests/test_stdlib.py
index c02e3f6e..d0209b9e 100644
--- a/tests/test_stdlib.py
+++ b/tests/test_stdlib.py
@@ -191,6 +191,21 @@ def test_positional_args_proxied(self):
assert "baz" == kwargs.get("bar")
assert ("foo",) == kwargs.get("positional_args")
+ @pytest.... | Inconsistency of BoundLogger with logging.Logger
There are no public attributes of `logging.Logger` available within `BoundLogger` (`propagate` for instance).
Also there are no attributes or methods of `logging.Filterer` (which is parent class of `logging.Logger`) available within `BoundLogger`.
| That’s on purpose…what would you expect them to do?
@hynek I expect them to proxy to original attributes or methods.
The problem occured when I tried to replace my Flask app's default logger with `BoundLogger`. I use `raven` library and it checks `propagate` attribute of logger: https://github.com/getsentry/raven-py... | 2019-03-11T18:06:23Z | 2019-03-13T14:10:55Z | ["tests/test_stdlib.py::TestProcessorFormatter::test_log_dict", "tests/test_stdlib.py::TestBoundLogger::test_exception_exc_info", "tests/test_stdlib.py::TestBoundLogger::test_proxies_to_correct_method[critical]", "tests/test_stdlib.py::TestFilterByLevel::test_passes_higher_levels", "tests/test_stdlib.py::TestAddLogLeve... | [] | ["tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_attributes[propagate]", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_attributes[parent]", "tests/test_stdlib.py::TestProcessorFormatter::test_native", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_attributes[disabled]"... | [] | {"install": [], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = # lint,{py27,py34,py35,py36,py37,pypy,pypy3}-threads,{py27,py37,pypy}-{greenlets,colorama,oldtwisted},# docs,pypi-description,manifest,coverage-report\nisolated_build = True\n\n\n[testenv:lint]\nbasepython = python3.7\nskip_install = true\n... | tox -- | null | null | null | swa-bench:sw.eval |
simonw/datasette | simonw__datasette-1766 | 9f1eb0d4eac483b953392157bd9fd6cc4df37de7 | diff --git a/datasette/app.py b/datasette/app.py
index f43700d45e..9243bf21fe 100644
--- a/datasette/app.py
+++ b/datasette/app.py
@@ -218,6 +218,7 @@ def __init__(
assert config_dir is None or isinstance(
config_dir, Path
), "config_dir= should be a pathlib.Path"
+ self.config_dir... | diff --git a/tests/test_config_dir.py b/tests/test_config_dir.py
index 015c6aceeb..fe927c42a6 100644
--- a/tests/test_config_dir.py
+++ b/tests/test_config_dir.py
@@ -1,4 +1,5 @@
import json
+import pathlib
import pytest
from datasette.app import Datasette
@@ -150,3 +151,11 @@ def test_metadata_yaml(tmp_path_facto... | Keep track of config_dir in directory mode (for plugins)
I started working on using `config_dir` with my [datasette-query-files plugin](https://github.com/eyeseast/datasette-query-files) and realized Datasette doesn't actually hold onto the `config_dir` argument. It gets used in `__init__` but then forgotten. It would ... | 2022-07-03T17:37:02Z | 2022-07-18T01:12:45Z | ["tests/test_config_dir.py::test_metadata_yaml[metadata.yml]", "tests/test_config_dir.py::test_settings", "tests/test_config_dir.py::test_static_directory_browsing_not_allowed", "tests/test_config_dir.py::test_databases", "tests/test_config_dir.py::test_templates_and_plugin", "tests/test_config_dir.py::test_plugins", "... | [] | ["tests/test_config_dir.py::test_store_config_dir", "tests/test_config_dir.py::test_metadata_yaml[metadata.yaml]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nfilterwarnings = \n\tignore:Using or importing the ABCs::jinja2\n\tignore:Using or importing the ABCs::bs4.element\n\tignore:.*current_task.*:PendingDeprecationWarning\nmarkers = \n\tserial: tests to avoid using with pytest... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
python-pillow/Pillow | python-pillow__Pillow-8485 | 331e4e751733eb0af018602ef26746a7e0571107 | diff --git a/src/PIL/WmfImagePlugin.py b/src/PIL/WmfImagePlugin.py
index 68f8a74f599..cad6c98d53f 100644
--- a/src/PIL/WmfImagePlugin.py
+++ b/src/PIL/WmfImagePlugin.py
@@ -128,7 +128,7 @@ def _open(self) -> None:
size = x1 - x0, y1 - y0
# calculate dots per inch from bbox and frame
- ... | diff --git a/Tests/test_file_wmf.py b/Tests/test_file_wmf.py
index 79e707263d6..424640d7b18 100644
--- a/Tests/test_file_wmf.py
+++ b/Tests/test_file_wmf.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+from io import BytesIO
from pathlib import Path
from typing import IO
@@ -61,6 +62,12 @@ def test_load_f... | EMF aspect ratio issues
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackoverflow.com/questions/tagged/... | Investigating, I found that the DPI has two dimensions in your image.
See what you think of this.
```python
filein = 'image100.emf'
conversion_path = 'image100.png'
from PIL import Image
with open(filein, "rb") as file:
with Image.open(file) as im:
width, height = im.size
new_width = 400
... | 2024-10-19T09:44:43Z | 2024-10-26T09:45:53Z | ["Tests/test_file_wmf.py::test_register_handler", "Tests/test_file_wmf.py::test_load_set_dpi", "Tests/test_file_wmf.py::test_load", "Tests/test_file_wmf.py::test_save[.wmf]", "Tests/test_file_wmf.py::test_load_raw"] | [] | ["Tests/test_file_wmf.py::test_load_float_dpi", "Tests/test_file_wmf.py::test_save[.emf]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-8366 | 22c333289e3009f8dd5f345e3328220daf11d929 | diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py
index f206fbb9cef..57c29179273 100644
--- a/src/PIL/GifImagePlugin.py
+++ b/src/PIL/GifImagePlugin.py
@@ -553,7 +553,9 @@ def _normalize_palette(
if im.mode == "P":
if not source_palette:
- source_palette = im.im.getpalette("R... | diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py
index 571fe1b9ac0..16c8466f331 100644
--- a/Tests/test_file_gif.py
+++ b/Tests/test_file_gif.py
@@ -1429,3 +1429,21 @@ def test_saving_rgba(tmp_path: Path) -> None:
with Image.open(out) as reloaded:
reloaded_rgba = reloaded.convert("RGBA")
... | GIF optimizer acts wrongly with black pixels when `disposal=2`
### What did you do?
- Create a GIF with these two identically sized (250x217) frames: `green.png` and `red.png`

\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
python-pillow/Pillow | python-pillow__Pillow-8350 | 6377321625b93f5241305a7b301026cbbcd21e96 | diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index 1c0cf293633..2fb677ead3f 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -3968,7 +3968,7 @@ def load(self, data: bytes) -> None:
self._data.clear()
self._hidden_data.clear()
self._ifds.clear()
- if data and data.startswith(... | diff --git a/Tests/test_image.py b/Tests/test_image.py
index b0d71966779..97e97acaabd 100644
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -775,6 +775,14 @@ def test_empty_exif(self) -> None:
exif.load(b"Exif\x00\x00")
assert not dict(exif)
+ def test_duplicate_exif_header(self) -> None:... | Error reading EXIF from file: SyntaxError: not a TIFF file (header b'' not valid)
### What did you do?
Tried to load image (attached below) and rotate it using `image = ImageOps.exif_transpose(image)`
Related to #4852 and #6123
### What did you expect to happen?
Image rotated according to EXIF
### What ac... | For an immediate solution, you can use this code to repair the EXIF data yourself.
```python
from PIL import Image, ImageOps
image = Image.open("in.jpg")
if "exif" in image.info and image.info["exif"].startswith(b"Exif\x00\x00Exif\x00\x00"):
image.info["exif"] = image.info["exif"][6:]
image = ImageOps.exif_tr... | 2024-09-05T11:36:03Z | 2024-09-07T09:31:19Z | ["Tests/test_image.py::TestImage::test_dump", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16B]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/test_image.py... | [] | ["Tests/test_image.py::TestImage::test_duplicate_exif_header"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-8231 | 6a9acfa5ca2b3ba462b086e4af776993bbd94a72 | diff --git a/src/PIL/PpmImagePlugin.py b/src/PIL/PpmImagePlugin.py
index 16c9ccbba72..211577e16ac 100644
--- a/src/PIL/PpmImagePlugin.py
+++ b/src/PIL/PpmImagePlugin.py
@@ -333,7 +333,7 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
rawmode, head = "1;I", b"P4"
elif im.mode =... | diff --git a/Tests/test_file_ppm.py b/Tests/test_file_ppm.py
index d6451ec18b5..fa50274480f 100644
--- a/Tests/test_file_ppm.py
+++ b/Tests/test_file_ppm.py
@@ -95,7 +95,9 @@ def test_16bit_pgm_write(tmp_path: Path) -> None:
with Image.open("Tests/images/16_bit_binary.pgm") as im:
filename = str(tmp_path ... | Save 16-bit PGM Image?
I am attempting to convert an image in PNG format to a 16-bit PGM format and save it using Python's [PIL](https://python-pillow.org/) library. I'm using Python 3.12.4 in all examples shown.
---
Using the following `test.png` image:
\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
python-pillow/Pillow | python-pillow__Pillow-8230 | 4721c31b19523e3c86f8d2fef62fdad25d2eb11d | diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index fbeecef0e6a..e1cbf533571 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -4111,7 +4111,7 @@ def get_ifd(self, tag: int) -> dict[int, Any]:
ifd = self._get_ifd_dict(tag_data, tag)
if ifd is not None:
... | diff --git a/Tests/test_image.py b/Tests/test_image.py
index 5795f6c5cb7..2d35cd277ce 100644
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -774,6 +774,14 @@ def test_empty_exif(self) -> None:
exif.load(b"Exif\x00\x00")
assert not dict(exif)
+ def test_empty_get_ifd(self) -> None:
+ ... | Possible to add an IFD to an image's EXIF data?
(apologies if I'm using wrong/weird terminology)
I'm trying to add EXIF tags to an image that doesn't initially have any. Some of the tags I'm trying to set belong to `IFD.Exif` . When I run `img.getexif().get_ifd(IFD.Exif)` I get back an empty `dict` that doesn't pers... | 2024-07-13T02:41:18Z | 2024-09-04T11:46:18Z | ["Tests/test_image.py::TestImage::test_dump", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16B]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/test_image.py... | [] | ["Tests/test_image.py::TestImage::test_empty_get_ifd"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
python-pillow/Pillow | python-pillow__Pillow-8304 | b14142462e1d4f0205b7e77c647a02c760b99a05 | diff --git a/Tests/images/imagedraw_rounded_rectangle_joined_x_different_corners.png b/Tests/images/imagedraw_rounded_rectangle_joined_x_different_corners.png
new file mode 100644
index 00000000000..b225afc2dc1
Binary files /dev/null and b/Tests/images/imagedraw_rounded_rectangle_joined_x_different_corners.png differ
d... | diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py
index e397978cbbf..e852b847188 100644
--- a/Tests/test_imagedraw.py
+++ b/Tests/test_imagedraw.py
@@ -857,6 +857,27 @@ def test_rounded_rectangle_corners(
)
+def test_rounded_rectangle_joined_x_different_corners() -> None:
+ # Arrange
+ im = ... | ImageDraw.rounded_rectangle: wrong ValueError
There is a problem in `ImageDraw.ImageDraw.rounded_rectangle`. There is no problem in code's logic. I'll share the code & error.
Code:
```python
from PIL import Image, ImageDraw
board = Image.new("RGBA", (1000, 1000))
draw = ImageDraw.Draw(board)
draw.rounded_re... | 2024-08-15T04:46:43Z | 2024-08-15T13:06:42Z | ["Tests/test_pickle.py::test_pickle_image[1-Tests/images/pil123p.png-None]", "Tests/test_image_reduce.py::test_mode_F[factor17]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_mode[RGBA-RGBA-3-3]", "Tests/test_image_filter.py::test_sanity[L-ModeFilter]", "Tests/test_imageops.py::test_colorize_3color_off... | [] | ["Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_joined_x_different_corners.png]"] | ["Tests/test_features.py::test_webp_anim - Failed: DID NOT WARN. No warnings of type (<class 'DeprecationWarning'>,) w...", "Tests/test_features.py::test_webp_transparency - Failed: DID NOT WARN. No warnings of type (<class 'DeprecationWarning'>,) w...", "Tests/test_features.py::test_check - Failed: DID NOT WARN. No wa... | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | null | ["pytest --tb=no -rA -p no:cacheprovider"] | null | null | swa-bench:sw.eval | |
python-pillow/Pillow | python-pillow__Pillow-8086 | 920698eea7693012d945300b2b87a16ae8f0706a | diff --git a/docs/reference/ImageFont.rst b/docs/reference/ImageFont.rst
index 6edf4b05c55..edbdd9a32a6 100644
--- a/docs/reference/ImageFont.rst
+++ b/docs/reference/ImageFont.rst
@@ -53,6 +53,7 @@ Functions
.. autofunction:: PIL.ImageFont.load_path
.. autofunction:: PIL.ImageFont.truetype
.. autofunction:: PIL.Ima... | diff --git a/Tests/test_imagefontpil.py b/Tests/test_imagefontpil.py
index c4a39d1faf2..695aecbded2 100644
--- a/Tests/test_imagefontpil.py
+++ b/Tests/test_imagefontpil.py
@@ -9,51 +9,57 @@
from .helper import assert_image_equal_tofile
-original_core = ImageFont.core
-
-
-def setup_module() -> None:
- if featu... | New (since 10.1.0) font display is worse than "better than nothing font" for small sizes
I'm using a small (128x32) [OLED display](https://www.adafruit.com/product/3527), which is setup as 4 lines of text on a Raspberry Pi 5 running Ubuntu Server 24.04 LTS.
### What did you do?
Upgraded my version of pillow (to a... | If our default font isn't suitable for your purposes, would the easiest solution not be to simply find another font to use? Or are you requesting that provide a way to access to the previous default font?
I guess I'm asking for a way to access the previous default font.
I'm dubious that raterizing a vector font is goi... | 2024-05-27T07:09:52Z | 2024-06-28T06:18:55Z | [] | [] | ["Tests/test_imagefontpil.py::test_textbbox[font1]", "Tests/test_imagefontpil.py::test_default_font[font0]", "Tests/test_imagefontpil.py::test_oom", "Tests/test_imagefontpil.py::test_unicode[font0]", "Tests/test_imagefontpil.py::test_textbbox[font0]", "Tests/test_imagefontpil.py::test_without_freetype", "Tests/test_ima... | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-8063 | d879f397112d1cb50af7d27f16eaf2c7bb221043 | diff --git a/docs/reference/Image.rst b/docs/reference/Image.rst
index 0d9b4d93d77..f25c9cd9d46 100644
--- a/docs/reference/Image.rst
+++ b/docs/reference/Image.rst
@@ -374,6 +374,11 @@ Constants
Set to 89,478,485, approximately 0.25GB for a 24-bit (3 bpp) image.
See :py:meth:`~PIL.Image.open` for more inform... | diff --git a/Tests/test_image.py b/Tests/test_image.py
index 742d0dfe406..a03e5eced07 100644
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -116,6 +116,15 @@ def test_open_formats(self) -> None:
assert im.mode == "RGB"
assert im.size == (128, 128)
+ def test_open_verbose_f... | cannot identify image file (PNG file from scanner)
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackove... | If I run [pngcheck](http://www.libpng.org/pub/png/apps/pngcheck.html) over your image, I get
> CRC error in chunk pHYs (computed eee74573, expected c76fa864)
To skip the check in Pillow, use
```python
from PIL import Image, ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
image_path = "bug.png"
image = Imag... | 2024-05-16T07:51:54Z | 2024-06-28T06:18:10Z | ["Tests/test_image.py::TestImage::test_dump", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16B]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/test_image.py... | [] | ["Tests/test_image.py::TestImage::test_open_verbose_failure"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-8104 | 48a921b31f4d1b84ed9b93d3ba2a8061366e8229 | diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py
index d723c199283..d2834929b8f 100644
--- a/src/PIL/PngImagePlugin.py
+++ b/src/PIL/PngImagePlugin.py
@@ -1115,7 +1115,7 @@ def write(self, data: bytes) -> None:
def _write_multiple_frames(im, fp, chunk, mode, rawmode, default_image, append_images)... | diff --git a/Tests/test_file_apng.py b/Tests/test_file_apng.py
index 1b393a3ff5d..e95850212a5 100644
--- a/Tests/test_file_apng.py
+++ b/Tests/test_file_apng.py
@@ -706,10 +706,21 @@ def test_different_modes_in_later_frames(
assert reloaded.mode == mode
-def test_apng_repeated_seeks_give_correct_info() -> ... | Saving to apng has wrong durations
Using https://github.com/python-pillow/Pillow/blob/main/Tests/images/apng/different_durations.png
```python
from PIL import Image, ImageSequence
ddp = Image.open('different_durations.png')
print([frame.info.get('duration') for frame in ImageSequence.Iterator(ddp)]) # [4000.0, ... | 2024-06-04T08:58:00Z | 2024-06-25T18:58:32Z | ["Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-RGBA]", "Tests/test_file_apng.py::test_apng_num_plays", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-RGB]", "Tests/test_file_apng.py::test_apng_chunk_errors", "Tests/test_file_apng.py::test_apng_save", "Tests/test_fil... | [] | ["Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-P]", "Tests/test_file_apng.py::test_different_durations"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
python-pillow/Pillow | python-pillow__Pillow-8087 | bbe1effd63149eb3d43d59efb5fe2659f93700d0 | diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py
index 0d5751962c0..6b6c01d1b8e 100644
--- a/src/PIL/PngImagePlugin.py
+++ b/src/PIL/PngImagePlugin.py
@@ -1104,7 +1104,7 @@ def write(self, data: bytes) -> None:
self.seq_num += 1
-def _write_multiple_frames(im, fp, chunk, rawmode, default_... | diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py
index 19462dcb5a4..55db5ef852f 100644
--- a/Tests/test_file_png.py
+++ b/Tests/test_file_png.py
@@ -655,11 +655,12 @@ def test_truncated_chunks(self, cid: bytes) -> None:
png.call(cid, 0, 0)
ImageFile.LOAD_TRUNCATED_IMAGES = False
... | Saving all frames of a paletted PNG with few colors can fail
```python
>>> image.save('copy.png',save_all=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\...\.venv\Lib\site-packages\PIL\Image.py", line 2459, in save
save_handler(self, fp, filename)
File "C:\...\.ven... | I've created #8087 | 2024-05-27T07:37:44Z | 2024-06-25T12:21:44Z | ["Tests/test_file_png.py::TestFilePng::test_verify_not_ignores_crc_error_in_required_chunk", "Tests/test_file_png.py::TestFilePng::test_seek", "Tests/test_file_png.py::TestFilePng::test_save_p_single_transparency", "Tests/test_file_png.py::TestFilePng::test_exif_argument", "Tests/test_file_png.py::TestFilePng::test_rou... | [] | ["Tests/test_file_png.py::TestFilePng::test_specify_bits[True]", "Tests/test_file_png.py::TestTruncatedPngPLeaks::test_leak_load"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-7948 | f8ec9f7974361c835405daf8a7c5acdf1ff98a8c | diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py
index 8bfcd29075e..c3683efb35e 100644
--- a/src/PIL/TiffImagePlugin.py
+++ b/src/PIL/TiffImagePlugin.py
@@ -1653,6 +1653,16 @@ def _save(im, fp, filename):
except Exception:
pass # might not be an IFD. Might not have populated t... | diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py
index 8821fb46a84..0bc1e2d0e6b 100644
--- a/Tests/test_file_tiff.py
+++ b/Tests/test_file_tiff.py
@@ -621,6 +621,19 @@ def test_roundtrip_tiff_uint16(self, tmp_path: Path) -> None:
assert_image_equal_tofile(im, tmpfile)
+ def test_iptc(s... | Saving tiff triggers segfault
### What did you do?
I used the following simple script:
```python
from PIL import Image
img = Image.open("Image00386.tiff")
img.save("toto2.tiff", compression="tiff_deflate")
```
on the file contained in this zip:
https://eroux.fr/Image00386.zip
(too big to upload on ... | The problem is tag 33723. It is specified as LONG in the image, when it should be BYTE or UNDEFINED according to https://www.awaresystems.be/imaging/tiff/tifftags/iptc.html
If I adjust Pillow to not preserve LONG tag 33723 by default, then it starts raising a `RuntimeError` instead.
Is it just the segfault you ar... | 2024-04-06T08:30:14Z | 2024-06-25T11:26:53Z | ["Tests/test_file_tiff.py::TestFileTiff::test_getxmp", "Tests/test_file_tiff.py::TestFileTiff::test_dict", "Tests/test_file_tiff.py::TestFileTiff::test_tiled_planar_raw", "Tests/test_file_tiff.py::TestFileTiff::test_save_rgba", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[True]", "Tests/test_file_tiff.py::Tes... | [] | ["Tests/test_file_tiff.py::TestFileTiff::test_iptc"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-8085 | 8b14ed741a1c757734c65535ca1db4ab4162c843 | diff --git a/docs/reference/ImageDraw.rst b/docs/reference/ImageDraw.rst
index 4ccfacae75e..1404869ca6c 100644
--- a/docs/reference/ImageDraw.rst
+++ b/docs/reference/ImageDraw.rst
@@ -227,6 +227,18 @@ Methods
.. versionadded:: 5.3.0
+.. py:method:: ImageDraw.circle(xy, radius, fill=None, outline=None, wid... | diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py
index 0a699e2ab6a..69d09e03d86 100644
--- a/Tests/test_imagedraw.py
+++ b/Tests/test_imagedraw.py
@@ -2,6 +2,7 @@
import contextlib
import os.path
+from typing import Sequence
import pytest
@@ -265,6 +266,21 @@ def test_chord_too_fat() -> None:
... | Missing ImageDraw.Draw.circle function
### What did you do?
I find it frustrating that Pillow's ImageDraw does still not have a function to draw a circle. Every time I come around to do it, I find that I must use ImageDraw.Draw.ellipse instead, which costs time. It must be even more frustrating for beginners who don... | Sounds like a useful shortcut, would you like to propose a PR? | 2024-05-26T22:24:32Z | 2024-05-28T09:35:31Z | ["Tests/test_imagedraw.py::test_polygon[points3]", "Tests/test_imagedraw.py::test_arc[0-180-bbox1]", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox2]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox3]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox1]", "Tests/test_imagedraw.py::test_rounded_... | [] | ["Tests/test_imagedraw.py::test_circle[xy0-RGB]", "Tests/test_imagedraw.py::test_circle[xy0-L]", "Tests/test_imagedraw.py::test_circle[xy1-RGB]", "Tests/test_imagedraw.py::test_circle[xy1-L]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-7900 | 19cd94bdb3699abe11d5e437406daa66f7f5cc17 | diff --git a/Tests/images/9bit.j2k b/Tests/images/9bit.j2k
new file mode 100644
index 00000000000..174f565fc64
Binary files /dev/null and b/Tests/images/9bit.j2k differ
diff --git a/src/PIL/Jpeg2KImagePlugin.py b/src/PIL/Jpeg2KImagePlugin.py
index 27f8fbbd0b5..be000c351b6 100644
--- a/src/PIL/Jpeg2KImagePlugin.py
+++ b... | diff --git a/Tests/test_file_jpeg2k.py b/Tests/test_file_jpeg2k.py
index bd114aa1181..81f75cc72cf 100644
--- a/Tests/test_file_jpeg2k.py
+++ b/Tests/test_file_jpeg2k.py
@@ -446,3 +446,9 @@ def test_plt_marker() -> None:
hdr = out.read(2)
length = _binary.i16be(hdr)
out.seek(length - 2, os.SEE... | JPEG2000: 9-bit images use L mode instead of I;16
### What did you do?
9-bit precision JPEG 2000 codestream with a .txt extension: [9bit.txt](https://github.com/python-pillow/Pillow/files/14734392/9bit.txt) (rename to 9bit.j2k)
```python
with Image.open("9bit.j2k") as im:
assert im.mode == "I;16"
assert im... | 2024-03-24T04:47:02Z | 2024-03-25T10:03:22Z | ["Tests/test_pickle.py::test_pickle_image[1-Tests/images/pil123p.png-None]", "Tests/test_image_reduce.py::test_mode_F[factor17]", "Tests/test_image_filter.py::test_sanity[L-ModeFilter]", "Tests/test_imageops.py::test_colorize_3color_offset", "Tests/test_image.py::TestImage::test_repr_pretty", "Tests/test_imagedraw.py::... | [] | ["Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/9bit.j2k]"] | ["Tests/test_tiff_ifdrational.py::test_ifd_rational_save - OSError: encoder libtiff not available", "Tests/test_file_palm.py::test_p_mode - Palm P image is wrong"] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | null | ["pytest --tb=no -rA -p no:cacheprovider"] | null | null | swa-bench:sw.eval | |
python-pillow/Pillow | python-pillow__Pillow-7893 | ca973709a079b5152b9670e5cd684003aa71f913 | diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py
index b59139f5858..bcb3547eb8e 100644
--- a/src/PIL/TiffImagePlugin.py
+++ b/src/PIL/TiffImagePlugin.py
@@ -74,6 +74,7 @@
# Read TIFF files
# a few tag names, just to make the code below a bit more readable
+OSUBFILETYPE = 255
IMAGEWIDTH = 256
I... | diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py
index 908464a11b7..14504e58999 100644
--- a/Tests/test_file_libtiff.py
+++ b/Tests/test_file_libtiff.py
@@ -12,7 +12,7 @@
import pytest
from PIL import Image, ImageFilter, ImageOps, TiffImagePlugin, TiffTags, features
-from PIL.TiffImagePlugin imp... | Saving binary tiff files with `tiff_deflate` compression fails under certain conditions
### What did you do?
I have this file:
[20210415185447038_0158.zip](https://github.com/python-pillow/Pillow/files/14720473/20210415185447038_0158.zip)
(you'll have to unzip it to test, I zipped it so that I could upload it ... | 2024-03-22T13:02:32Z | 2024-03-22T16:00:04Z | [] | [] | ["Tests/test_pickle.py::test_pickle_image[1-Tests/images/pil123p.png-None]", "Tests/test_image_reduce.py::test_mode_F[factor17]", "Tests/test_image_filter.py::test_sanity[L-ModeFilter]", "Tests/test_imageops.py::test_colorize_3color_offset", "Tests/test_image.py::TestImage::test_repr_pretty", "Tests/test_imagedraw.py::... | ["Tests/test_tiff_ifdrational.py::test_ifd_rational_save - OSError: encoder libtiff not available", "Tests/test_file_palm.py::test_p_mode - Palm P image is wrong"] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | null | ["pytest --tb=no -rA -p no:cacheprovider"] | null | null | swa-bench:sw.eval | |
python-pillow/Pillow | python-pillow__Pillow-7788 | 6782a07b8e404271dbd2e5ddf5fbb93e575ed2bc | diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py
index dc842d7a30b..9368dd7e7c4 100644
--- a/src/PIL/GifImagePlugin.py
+++ b/src/PIL/GifImagePlugin.py
@@ -629,7 +629,7 @@ def _write_multiple_frames(im, fp, palette):
"duration"
]
... | diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py
index db9d3586c4d..6527d90de96 100644
--- a/Tests/test_file_gif.py
+++ b/Tests/test_file_gif.py
@@ -647,6 +647,9 @@ def test_dispose2_palette(tmp_path: Path) -> None:
# Center remains red every frame
assert rgb_img.getpixel((50, 50))... | Setting disposal=2 on gif export can cause issues with transparency
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
*... | 2024-02-09T08:55:44Z | 2024-03-11T15:48:13Z | ["Tests/test_file_gif.py::test_dispose_none", "Tests/test_file_gif.py::test_transparency_in_second_frame", "Tests/test_file_gif.py::test_context_manager", "Tests/test_file_gif.py::test_seek_info", "Tests/test_file_gif.py::test_append_images", "Tests/test_file_gif.py::test_transparent_dispose[0-expected_colors0]", "Test... | [] | ["Tests/test_file_gif.py::test_dispose2_palette", "Tests/test_file_gif.py::test_dispose2_previous_frame"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
python-pillow/Pillow | python-pillow__Pillow-7779 | 1b6723967440cf8474a9bd1e1c394c90c5c2f986 | diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py
index 57d87078bca..935b95ca8c6 100644
--- a/src/PIL/GifImagePlugin.py
+++ b/src/PIL/GifImagePlugin.py
@@ -649,9 +649,7 @@ def _write_multiple_frames(im, fp, palette):
if "transparency" in encoderinfo:
# When... | diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py
index 3f550fd1109..263c897ef51 100644
--- a/Tests/test_file_gif.py
+++ b/Tests/test_file_gif.py
@@ -1105,6 +1105,21 @@ def im_generator(ims):
assert reread.n_frames == 10
+def test_append_different_size_image(tmp_path: Path) -> None:
+ out = s... | ValueError: images do not match
Without changing code, only upgrading from 10.1.0 to 10.2.0, started getting this error when generating animated GIFs:
```pytb
File "wakatime/insights/utils.py", line 481, in get_animated_insight
images[0].save(out, format="gif", append_images=images[1:-1], save_all=True, dura... | Thank you for reporting an issue.
Please include a self-contained, copy-pastable example that generates the issue if possible. Be concise with code posted. Guidelines on how to provide a good bug report:
* https://stackoverflow.com/help/mcve
Bug reports which follow these guidelines are easier to diagnose, and... | 2024-02-05T08:20:06Z | 2024-03-01T10:14:06Z | ["Tests/test_file_gif.py::test_dispose_none", "Tests/test_file_gif.py::test_transparency_in_second_frame", "Tests/test_file_gif.py::test_context_manager", "Tests/test_file_gif.py::test_seek_info", "Tests/test_file_gif.py::test_append_images", "Tests/test_file_gif.py::test_transparent_dispose[0-expected_colors0]", "Test... | [] | ["Tests/test_file_gif.py::test_append_different_size_image"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-7654 | 109c6bf6c0abc00c37b0819ebd573390647692e4 | diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py
index fc242ca64c2..e9db64e5fc5 100644
--- a/src/PIL/TiffImagePlugin.py
+++ b/src/PIL/TiffImagePlugin.py
@@ -1705,20 +1705,23 @@ def _save(im, fp, filename):
ifd[COLORMAP] = colormap
# data orientation
stride = len(bits) * ((im.size[... | diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py
index 0851796d000..0737c8a2af2 100644
--- a/Tests/test_file_tiff.py
+++ b/Tests/test_file_tiff.py
@@ -612,6 +612,14 @@ def test_roundtrip_tiff_uint16(self, tmp_path):
assert_image_equal_tofile(im, tmpfile)
+ def test_rowsperstrip(self, t... | TiffImagePlugin doesn't honor the ROWSPERSTRIP tag value
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://st... | As context, ROWSPERSTRIP has been set by TiffImagePlugin since PIL.
If I make a change to allow ROWSPERSTRIP to be set by the user, the following test code starts failing.
https://github.com/python-pillow/Pillow/blob/53b6e5f4bf9a6a68e29109c457b12d17761d0035/Tests/test_file_tiff_metadata.py#L124-L128
The error is... | 2023-12-29T12:05:58Z | 2023-12-31T15:29:26Z | ["Tests/test_file_tiff.py::TestFileTiff::test_getxmp", "Tests/test_file_tiff.py::TestFileTiff::test_dict", "Tests/test_file_tiff.py::TestFileTiff::test_tiled_planar_raw", "Tests/test_file_tiff.py::TestFileTiff::test_save_rgba", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[True]", "Tests/test_file_tiff_metadat... | [] | ["Tests/test_file_tiff.py::TestFileTiff::test_rowsperstrip"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-7493 | d05ff5059f2bb9a46c512f8d303e8e3f8cc6939e | diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index 771cb33c3de..cb092f1ae1f 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -791,6 +791,9 @@ def frombytes(self, data, decoder_name="raw", *args):
but loads data into this image instead of creating a new image object.
"""
+ if self.w... | diff --git a/Tests/test_image.py b/Tests/test_image.py
index 83dac70802f..039eb33d1ef 100644
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -906,6 +906,13 @@ def test_zero_tobytes(self, size):
im = Image.new("RGB", size)
assert im.tobytes() == b""
+ @pytest.mark.parametrize("size", ((1, 0... | `Image.frombytes` throws on empty image
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackoverflow.com/q... | Looks like I constructed a minimal example incorrectly. The issue was actually from trying to render empty string, due to a pagination step in between getting the text and rendering it. In that case, the issue would actually be that `Image.frombytes` throws an error when initializing it with size `(0, 0)` and bytes `[]... | 2023-10-24T21:57:40Z | 2023-11-03T07:56:35Z | ["Tests/test_image.py::TestImage::test_dump", "Tests/test_image.py::TestImage::test_load_on_nonexclusive_multiframe", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/test_imag... | [] | ["Tests/test_image.py::TestImage::test_zero_frombytes[size1]", "Tests/test_image.py::TestImage::test_zero_frombytes[size2]", "Tests/test_image.py::TestImage::test_zero_frombytes[size0]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-7481 | a10dec01b5a3f63c43f7095dbc7aec5658aad251 | diff --git a/CHANGES.rst b/CHANGES.rst
index d2f2bb46231..f4d11ba48e6 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -2191,7 +2191,7 @@ Changelog (Pillow)
- Cache EXIF information #3498
[Glandos]
-- Added transparency for all PNG greyscale modes #3744
+- Added transparency for all PNG grayscale modes #3744
[rad... | diff --git a/Tests/test_file_apng.py b/Tests/test_file_apng.py
index 57928880882..fffbc54caf5 100644
--- a/Tests/test_file_apng.py
+++ b/Tests/test_file_apng.py
@@ -231,13 +231,13 @@ def test_apng_mode():
assert im.getpixel((0, 0)) == (0, 0, 128, 191)
assert im.getpixel((64, 32)) == (0, 0, 128, 191)
... | Mix use of grayscale/greyscale in document and code
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackov... | 2023-10-19T08:19:08Z | 2023-10-20T05:52:47Z | ["Tests/test_file_png.py::TestFilePng::test_broken", "Tests/test_imagechops.py::test_subtract", "Tests/test_file_png.py::TestFilePng::test_specify_bits", "Tests/test_file_gif.py::test_seek_info", "Tests/test_file_gif.py::test_append_images", "Tests/test_file_gif.py::test_dispose_previous", "Tests/test_file_gif.py::test... | [] | ["Tests/test_file_apng.py::test_apng_mode", "Tests/test_file_bmp.py::test_rle8"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
AtsushiSakai/PythonRobotics | AtsushiSakai__PythonRobotics-812 | 5093342d35b914c125f1a857d254083887574444 | diff --git a/PathPlanning/RRTStar/rrt_star.py b/PathPlanning/RRTStar/rrt_star.py
index f875d3a76d..b2884fe21b 100644
--- a/PathPlanning/RRTStar/rrt_star.py
+++ b/PathPlanning/RRTStar/rrt_star.py
@@ -225,13 +225,11 @@ def rewire(self, new_node, near_inds):
improved_cost = near_node.cost > edge_node.cost
... | diff --git a/tests/test_rrt_star_reeds_shepp.py b/tests/test_rrt_star_reeds_shepp.py
index cb6b586b33..20d4916f96 100644
--- a/tests/test_rrt_star_reeds_shepp.py
+++ b/tests/test_rrt_star_reeds_shepp.py
@@ -6,6 +6,43 @@ def test1():
m.show_animation = False
m.main(max_iter=5)
+obstacleList = [
+ (5, 5, 1... | RRT* with reeds-sheep seems to produce illegal paths
**Describe the bug**
Sometimes the path produced by RRT* with reeds-sheep script rrt_star_reeds_shepp.py seems not allowed: there are sharp corners in the path.
**Expected behavior**
allowed path
**Screenshots**
:
+ m.show_animation =... | Clean up Clothoid path planner
Ref #551
| 2022-02-06T13:30:23Z | 2022-04-10T10:30:31Z | [] | [] | ["tests/test_clothoidal_paths.py::test_1"] | [] | {"install": [], "pre_install": [], "python": "3.10", "pip_packages": ["attrs==21.4.0", "cvxpy==1.1.18", "cycler==0.11.0", "ecos==2.0.10", "execnet==1.9.0", "flake8==4.0.1", "fonttools==4.32.0", "iniconfig==1.1.1", "kiwisolver==1.4.2", "matplotlib==3.5.1", "mccabe==0.6.1", "mypy==0.931", "mypy-extensions==0.4.3", "numpy... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
sabnzbd/sabnzbd | sabnzbd__sabnzbd-2554 | fde8f9d13370ba19b6b3c7dcc679af2ebdf8fb29 | diff --git a/sabnzbd/api.py b/sabnzbd/api.py
index a5e00555aa3..5c913c33c72 100644
--- a/sabnzbd/api.py
+++ b/sabnzbd/api.py
@@ -50,6 +50,7 @@
KIBI,
MEBI,
GIGI,
+ AddNzbFileResult,
)
import sabnzbd.config as config
import sabnzbd.cfg as cfg
@@ -305,7 +306,7 @@ def _api_addfile(name, kwargs):
... | diff --git a/tests/test_dirscanner.py b/tests/test_dirscanner.py
index 180f3ef29d6..cb22472cf6c 100644
--- a/tests/test_dirscanner.py
+++ b/tests/test_dirscanner.py
@@ -21,6 +21,7 @@
import pyfakefs.fake_filesystem_unittest as ffs
+from sabnzbd.constants import AddNzbFileResult
from tests.testhelper import *
#... | Files which match a watched extension, but are not valid nzb's, fail to parse and get deleted
SABnzbd version: 4.0.0
OS: Windows 10 22H2
Category: Watched folder handling
I use a simple watch folder on my browser downloads folder for adhoc nzb's, and I'd like to prevent SABnzbd from attempting to parse all *.gz fi... | why not just set your watch folder to a clean folder where you really only in fact place things you want sab to watch?
Looking at current code we will pickup `.nzb, .gz, .bz2, .zip, .rar, .7z`
For .zip/rar/.7z we extract those and look for a .nzb to add.
For .nzb/.gz/.bz2 we assume its a single nzb.
While *.... | 2023-05-08T22:17:51Z | 2023-05-15T12:28:50Z | [] | [] | ["tests/test_dirscanner.py::TestDirScanner::test_ignores_empty_files[file.zip]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.rar-tv]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.bz2-tv]", "tests/test_dirscanner.py::TestDirScanner::test_ignores_empty_files[file.7z]", "t... | [] | {"install": [], "pre_install": [], "python": "3.11", "pip_packages": ["async-generator==1.10", "attrs==23.1.0", "babelfish==0.6.0", "black==23.3.0", "blinker==1.6.2", "brotlipy==0.7.0", "certifi==2023.5.7", "cffi==1.15.1", "chardet==5.1.0", "charset-normalizer==3.1.0", "cheetah3==3.2.6.post1", "cheroot==9.0.0", "cherry... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
sabnzbd/sabnzbd | sabnzbd__sabnzbd-2463 | 9129b681dc372509a1927df320974efe8c643694 | diff --git a/sabnzbd/filesystem.py b/sabnzbd/filesystem.py
index 7e53fc501ed..62abeb73fa0 100644
--- a/sabnzbd/filesystem.py
+++ b/sabnzbd/filesystem.py
@@ -184,10 +184,13 @@ def has_win_device(filename: str) -> bool:
return False
-CH_ILLEGAL = "/"
-CH_LEGAL = "+"
-CH_ILLEGAL_WIN = '\\/<>?*|"\t:'
-CH_LEGAL_WIN... | diff --git a/tests/test_filesystem.py b/tests/test_filesystem.py
index b78959572c0..e54c0428a5b 100644
--- a/tests/test_filesystem.py
+++ b/tests/test_filesystem.py
@@ -89,6 +89,23 @@ def test_win_devices_not_win(self):
assert filesystem.sanitize_filename("$mft") == "$mft"
assert filesystem.sanitize_f... | 3.7.2 - traceback on extracting job with unicode ? in filename
discord user reported issue with sab 3.7.2 not handling a download on windows:
```
2023-02-17 22:06:07,992::DEBUG::[assembler:85] Decoding part of \\?\D:\Cache\In-Progress\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A... | trying nzb out with newsbin, it extracts and replaces the unicode ! with _ in the final name

while the nzb completes and works just fine in newsbin, trying it in sab develop latest it says articles arent there and aborts the job... which i know is incorrect... | 2023-02-18T09:26:50Z | 2023-02-18T21:48:00Z | ["tests/test_filesystem.py::TestCheckMountWin::test_dir_nonexistent_win", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_foldername_empty_result", "tests/test_filesystem.py::TestClipLongPath::test_nothing_to_clip_win", "tests/test_filesystem.py::TestSameFile::test_same", "tests/test_filesystem.py::TestFil... | [] | ["tests/test_filesystem.py::TestFileFolderNameSanitizer::test_folder_illegal_chars_win32", "tests/test_filesystem.py::TestCreateAllDirs::test_permissions_770", "tests/test_filesystem.py::TestCreateAllDirs::test_permissions_600", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_file_illegal_chars_win32", "te... | ["tests", "tests/test_filesystem.py::TestCreateAllDirs::test_permissions_450 - Fa..."] | {"install": [], "pre_install": [], "python": "3.11", "pip_packages": ["async-generator==1.10", "attrs==21.4.0", "babelfish==0.6.0", "black==23.1.0", "blinker==1.5", "brotlipy==0.7.0", "certifi==2022.12.7", "cffi==1.15.1", "chardet==5.1.0", "charset-normalizer==3.0.1", "cheetah3==3.2.6.post1", "cheroot==9.0.0", "cherryp... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
sabnzbd/sabnzbd | sabnzbd__sabnzbd-2253 | 4b42b1f55d857a9a21cb9162f4f1b5145d8e2a3e | diff --git a/sabnzbd/cfg.py b/sabnzbd/cfg.py
index fb4dd437c33..fcfa46d5233 100644
--- a/sabnzbd/cfg.py
+++ b/sabnzbd/cfg.py
@@ -22,6 +22,8 @@
import logging
import re
import argparse
+import socket
+import ipaddress
from typing import List, Tuple
import sabnzbd
@@ -147,6 +149,48 @@ def validate_server(value):
... | diff --git a/tests/test_cfg.py b/tests/test_cfg.py
index 9a5891fe423..4ce5aa2fc79 100644
--- a/tests/test_cfg.py
+++ b/tests/test_cfg.py
@@ -19,6 +19,7 @@
tests.test_cfg - Testing functions in cfg.py
"""
import sabnzbd.cfg as cfg
+import socket
class TestValidators:
@@ -97,3 +98,19 @@ def test_lower_case_ext(se... | SABnzbd's GUI accepts non-valid IP address or name as input for Config -> General -> SABnzbd Host
Triggered by https://forums.sabnzbd.org/viewtopic.php?p=127870#p127870
SAB's GUI accepts `0.0.0.0.` (note the trailing dot) and other incorrect as input, but then refuses startup.
I'll come up with a solution, probab... | 2022-07-27T09:47:21Z | 2022-08-12T14:43:41Z | ["tests/test_cfg.py::TestValidators::test_clean_nice_ionice_parameters_blocked", "tests/test_cfg.py::TestValidators::test_validate_single_tag", "tests/test_cfg.py::TestValidators::test_clean_nice_ionice_parameters_allowed"] | [] | ["tests/test_cfg.py::TestValidators::test_validate_host", "tests/test_cfg.py::TestValidators::test_lower_case_ext"] | [] | {"install": [], "pre_install": [], "python": "3.10", "pip_packages": ["async-generator==1.10", "attrs==22.1.0", "babelfish==0.6.0", "black==22.6.0", "blinker==1.5", "brotlipy==0.7.0", "certifi==2022.6.15", "cffi==1.15.1", "chardet==5.0.0", "charset-normalizer==2.1.0", "cheetah3==3.2.6", "cheroot==8.6.0", "cherrypy==18.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
sabnzbd/sabnzbd | sabnzbd__sabnzbd-1794 | c7b54856c5fd4182263133dc3e03827471ca981e | diff --git a/interfaces/Config/templates/config_sorting.tmpl b/interfaces/Config/templates/config_sorting.tmpl
index 2fdd0caa766..322a0a155f4 100644
--- a/interfaces/Config/templates/config_sorting.tmpl
+++ b/interfaces/Config/templates/config_sorting.tmpl
@@ -130,6 +130,11 @@
<td>%... | diff --git a/tests/test_sorting.py b/tests/test_sorting.py
new file mode 100644
index 00000000000..a5086c97fc7
--- /dev/null
+++ b/tests/test_sorting.py
@@ -0,0 +1,46 @@
+#!/usr/bin/python3 -OO
+# Copyright 2007-2021 The SABnzbd-Team <team@sabnzbd.org>
+#
+# This program is free software; you can redistribute it and/or... | Movie Sorting - Please add resolution under Pattern key
Here's my sort string. I want resolution (720p/1080p depending on the movie) in my folder name currently not available in the pattern key. %.title.%y/%.title.%y.%ext
Example result.
Movie.Name.2009.720p or 1080p\Movie.Name.2009 CD1.mkv
| 2021-02-10T10:17:54Z | 2021-02-10T13:12:06Z | [] | [] | ["tests/test_sorting.py::TestSorting::test_get_resolution[not_keeping_1440idistance_either-]", "tests/test_sorting.py::TestSorting::test_get_resolution[None-]", "tests/test_sorting.py::TestSorting::test_get_resolution[-]", "tests/test_sorting.py::TestSorting::test_get_resolution[480-]", "tests/test_sorting.py::TestSort... | [] | {"install": [], "pre_install": [], "python": "3.9", "pip_packages": ["attrs==20.3.0", "blinker==1.4", "brotlipy==0.7.0", "certifi==2020.12.5", "cffi==1.14.4", "chardet==4.0.0", "cheetah3==3.2.6", "cheroot==8.5.2", "cherrypy==18.6.0", "click==7.1.2", "configobj==5.0.6", "cryptography==3.4.4", "decorator==4.4.2", "docopt... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
mkdocs/mkdocs | mkdocs__mkdocs-3700 | 30e8142315127bcc2b05ee14ff99f300a7126a87 | diff --git a/mkdocs/theme.py b/mkdocs/theme.py
index bf5872015e..b45f107920 100644
--- a/mkdocs/theme.py
+++ b/mkdocs/theme.py
@@ -138,6 +138,9 @@ def _load_theme_config(self, name: str) -> None:
f"Please upgrade to a current version of the theme."
)
+ if theme_config is None:
+ ... | diff --git a/mkdocs/tests/theme_tests.py b/mkdocs/tests/theme_tests.py
index f9989fb3f4..ddc526bfed 100644
--- a/mkdocs/tests/theme_tests.py
+++ b/mkdocs/tests/theme_tests.py
@@ -104,3 +104,22 @@ def test_inherited_theme(self):
],
)
self.assertEqual(theme.static_templates, {'s... | Empty mkdocs_theme.yml breaks build
Hello! In the docs its [stated](https://www.mkdocs.org/dev-guide/themes/#theme-configuration) that a theme **can** have an empty `mkdocs_theme.yml` file:
> However, if the theme offers no configuration options, the file is still required and can be left blank.
Unfortunately thi... | 2024-05-09T14:28:04Z | 2024-05-10T08:31:09Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_gh_deploy_remote_name (tests.cl... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval | |
mkdocs/mkdocs | mkdocs__mkdocs-3451 | 8833edcc947698949803457c9131e55330607519 | diff --git a/mkdocs/commands/build.py b/mkdocs/commands/build.py
index 3a09a0146c..f111bcdc05 100644
--- a/mkdocs/commands/build.py
+++ b/mkdocs/commands/build.py
@@ -131,8 +131,7 @@ def _build_extra_template(template_name: str, files: Files, config: MkDocsConfig
return
try:
- with open(file.abs_... | diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index 9e9d6c0ae4..2ad9353200 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -274,14 +274,14 @@ def test_skip_theme_template_empty_output(self, mock_build_template, mock_write_
# Test build._build_extra_template
... | POC: demonstrate mkdocs generated_by detection wrt #3344
With regards to my [comment](https://github.com/mkdocs/mkdocs/pull/3344#issuecomment-1689841586) in #3344
Sample result:
```bash
$ hatch -e docs shell
$ mkdocs build
INFO - Cleaning site directory
INFO - Building documentation to directory: /ho... | 2023-10-30T00:51:25Z | 2024-01-26T20:01:51Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_gh_deploy_remote_name (tests.cl... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval | |
mkdocs/mkdocs | mkdocs__mkdocs-3485 | 9e443d212058306984e20ef6daf6939ca402d6bc | diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index b6267beed4..680987e24b 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -382,7 +382,9 @@ Configure the strictness of MkDocs' diagnostic messages when validating links to
This is a tree of con... | diff --git a/mkdocs/tests/structure/nav_tests.py b/mkdocs/tests/structure/nav_tests.py
index 04846111ae..11b7464f16 100644
--- a/mkdocs/tests/structure/nav_tests.py
+++ b/mkdocs/tests/structure/nav_tests.py
@@ -131,6 +131,44 @@ def test_nav_external_links(self):
self.assertEqual(len(site_navigation.items), 3)
... | Option to prefix absolute links with sub-page or turn them relative.
## Problem
Using absolute URLs may not work, if the final page is on a sub-page. For example, if a page is hosted on `https://example.com/blog` will an absolute URL such as `/foo/bar` result in a link pointing to `https://example.com/foo/bar`, brea... | Hi, @oprypin I would be happy to take a crack at a PR for this feature if no one is working on it yet.
I prefer to use absolute paths in my documentation to make it easier to move things around, and I think having namespaced prefixes like in a Flask Blueprint but just for internal URL resolution would be helpful for... | 2023-11-25T17:25:24Z | 2023-12-15T10:57:31Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_gh_deploy_remote_name (tests.cl... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3463 | dc45916aa1cc4b4d4796dd45656bd1ff60d4ce44 | diff --git a/.markdownlintrc b/.markdownlintrc
index aa9fc26c74..c0e8a9b353 100644
--- a/.markdownlintrc
+++ b/.markdownlintrc
@@ -20,5 +20,8 @@
"MD024": { "siblings_only": true },
// Allow inline HTML
- "MD033": false
+ "MD033": false,
+
+ // Disable named references validation
+ "MD052": false
}
diff --g... | diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index 275aad3709..4dc85c77a2 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -609,7 +609,7 @@ def test_exclude_pages_with_invalid_links(self, site_dir, docs_dir):
server = testing_server(site_dir, mount_path='/... | Validate links to anchors on Markdown documents
We do a reasonable job of checking that links to local markdown files are valid. However, the standard pattern for linking to sections is to use anchors in headers. This doesn't work well if the title is moved or renamed.
With the TOC code, we should be able to keep a se... | :+1: Was going to submit an issue for this.
Should take into account if a user is using a custom slugify function. Don't think this should be an issue if you continue to parse the `toc` output from markdown.
True, that is one advantage of parsing the HTML output, which is otherwise pretty hacky :)
Its not clear how ... | 2023-11-11T15:09:51Z | 2023-12-09T17:08:16Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (te... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3503 | df2dffd8a62f312e98987998af3114f3e1e552fb | diff --git a/mkdocs/plugins.py b/mkdocs/plugins.py
index 98a99f38d7..aaf3b203d7 100644
--- a/mkdocs/plugins.py
+++ b/mkdocs/plugins.py
@@ -506,9 +506,15 @@ def _register_event(
for sub in method.methods:
self._register_event(event_name, sub, plugin_name=plugin_name)
else:
- ... | diff --git a/mkdocs/tests/plugin_tests.py b/mkdocs/tests/plugin_tests.py
index 8c09cf4f2c..7f32146f00 100644
--- a/mkdocs/tests/plugin_tests.py
+++ b/mkdocs/tests/plugin_tests.py
@@ -159,7 +159,13 @@ def on_post_build(self, **kwargs) -> None:
collection = plugins.PluginCollection()
collection['dummy... | Allow multiple hook files
When there are multiple hook files, only one instance of a type of plugin can be used. For example, I had a hook file that defined `on_page_read_source` and when I added a second that defined the same, only the hook that came last executed which by sheer luck I discovered while debugging somet... | There are many options for this:
* Just do the 2 actions in 1 function
* Use multiple files (wait, are you saying that multiple hooks files have a problem?)
* Use this upcoming feature, though I should double-check whether it actually works for hooks
https://github.com/mkdocs/mkdocs/pull/3448
Or actually... | 2023-12-03T21:52:25Z | 2023-12-08T20:42:42Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (te... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3500 | 646987da4502becf346bfaabb6ba40934307399b | diff --git a/mkdocs/__main__.py b/mkdocs/__main__.py
index 0df2069be8..41377cf56c 100644
--- a/mkdocs/__main__.py
+++ b/mkdocs/__main__.py
@@ -110,6 +110,7 @@ def __del__(self):
"Provide a specific MkDocs config. This can be a file name, or '-' to read from stdin."
)
dev_addr_help = "IP address and port to serve... | diff --git a/mkdocs/tests/cli_tests.py b/mkdocs/tests/cli_tests.py
index 6ce03db109..abd1286e5d 100644
--- a/mkdocs/tests/cli_tests.py
+++ b/mkdocs/tests/cli_tests.py
@@ -21,6 +21,7 @@ def test_serve_default(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
... | Start the default browser, when starting the `mkdocs serve` command?
See discussion in #3494
It would be good to open the page in the default browser, when typing `mkdocs serve` (as happens when running the `jupyter notebook` command.
### Various points
1. This should be done once, not every time a change i... | I'll implement this :+1:
See also @pawamoy's comment:
> If it can detect that the URL is already open in a tab, then that would be best.
OK let's say the URL is already open in a tab, what should it do then? Just not open the browser? I think that's worse than opening the browser even if the tab will be duplicate... | 2023-12-03T10:26:37Z | 2023-12-03T21:00:13Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (te... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3501 | 646987da4502becf346bfaabb6ba40934307399b | diff --git a/mkdocs/commands/build.py b/mkdocs/commands/build.py
index 4a21a3da70..2c9e97931d 100644
--- a/mkdocs/commands/build.py
+++ b/mkdocs/commands/build.py
@@ -22,8 +22,6 @@
if TYPE_CHECKING:
from mkdocs.config.defaults import MkDocsConfig
-if TYPE_CHECKING:
- from mkdocs.livereload import LiveReloadS... | diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index 4b7596bf5c..951452988d 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -16,7 +16,6 @@
from mkdocs.commands import build
from mkdocs.config import base
from mkdocs.exceptions import PluginError
-from mkdocs.live... | refactor: only pass server url to build function
Small refactor, dont pass the whole Live server instance to the build function.
Right now, the builder method knows about the live server and the live server knows about the build method.
(see https://github.com/mkdocs/mkdocs/compare/master...phil65:mkdocs:untangle_bui... | 2023-12-03T10:37:10Z | 2023-12-03T20:59:47Z | [] | [] | ["test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_prebuild_index (te... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval | |
mkdocs/mkdocs | mkdocs__mkdocs-3466 | dc45916aa1cc4b4d4796dd45656bd1ff60d4ce44 | diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py
index aacff40347..9b16e3025c 100644
--- a/mkdocs/config/config_options.py
+++ b/mkdocs/config/config_options.py
@@ -10,6 +10,7 @@
import types
import warnings
from collections import Counter, UserString
+from types import SimpleNamespace
... | diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index 275aad3709..4b7596bf5c 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -814,7 +814,7 @@ def run(self, lines: list[str]) -> list[str]:
class _TestExtension(markdown.extensions.Extension):
def __init__(self,... | Wrong example for `!relative` option
The Configuration page lists an example using `pymdownx.snippets` for the `!relative` YAML tag.
The issue with this example is, that the `base_path` option of snippets is expecting a list and not a single String, which breaks the configuration itself.
In fact, the relative optio... | Yes that is true. There's currently a problem with both examples. I actually ran into it just yesterday.
The 1st example has a bug that is fixed in https://github.com/facelessuser/pymdown-extensions/pull/2206 but not released yet. But then it will run into the same bug as the 2nd example.
The 2nd example runs int... | 2023-11-12T17:02:57Z | 2023-11-14T17:35:30Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (te... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3449 | 994ffff114e59dfcb5c955db373c2a4448f69cac | diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index b7204b94ef..84c1430f1e 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -392,6 +392,9 @@ def path_to_url(self, url: str) -> str:
)
if warning:
+ if self.file.inclusion.is_excluded():
... | diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index f668f369c5..275aad3709 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -582,7 +582,7 @@ def _assert_build_logs(self, expected):
@tempdir(
files={
'test/foo.md': 'page1 content, [bar](bar... | Log excluded links only if referring page is included
I have several excluded folders in my site (via the `exclude_docs` setting). The excluded folders contain pages that refer to images and other files in the same folder. Would you consider not logging INFO messages for excluded targets when the referring page is also... | 2023-10-29T13:59:04Z | 2023-10-30T01:04:51Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (te... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval | |
mkdocs/mkdocs | mkdocs__mkdocs-3395 | 994ffff114e59dfcb5c955db373c2a4448f69cac | diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index 9c6eff4ede..db1d01dbc3 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -798,6 +798,8 @@ You might have seen this feature in the [mkdocs-simple-hooks plugin](https://git
A list of plugins (with... | diff --git a/mkdocs/tests/config/config_options_tests.py b/mkdocs/tests/config/config_options_tests.py
index 2c8a33ae88..ecab870798 100644
--- a/mkdocs/tests/config/config_options_tests.py
+++ b/mkdocs/tests/config/config_options_tests.py
@@ -1926,6 +1926,15 @@ class FakePlugin2(BasePlugin[_FakePlugin2Config]):
su... | `enabled` setting for all plugins
It seems that so many plugins have an `enabled` setting these days that we may as well just add it in MkDocs. It will not run the plugin at all then. But if a plugin already has this setting explicitly, then MkDocs will not do anything, so the plugin can still decide what to do when it... | Yep, definitely agree. This will standardize the way to enable/disable plugins, which would be a great thing to have.
Likewise, I think that'd be useful
> But if a plugin already has this setting explicitly, then MkDocs will not do anything, so the plugin can still decide what to do when it's disabled.
Yes, yes, yes... | 2023-09-14T21:24:18Z | 2023-10-30T00:58:27Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (te... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3443 | b5250bf9e2a58fae1dc7742d06318aae051a6303 | diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index 9c6eff4ede..eaccea55e3 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -333,7 +333,9 @@ exclude_docs: |
NEW: **New in version 1.5.**
-NOTE: This option does *not* actually exclude anything... | diff --git a/mkdocs/tests/structure/nav_tests.py b/mkdocs/tests/structure/nav_tests.py
index 44ae2adc21..04846111ae 100644
--- a/mkdocs/tests/structure/nav_tests.py
+++ b/mkdocs/tests/structure/nav_tests.py
@@ -3,7 +3,7 @@
import sys
import unittest
-from mkdocs.structure.files import File, Files
+from mkdocs.struc... | Setting `InclusionLevel.NOT_IN_NAV` still adds pages to `nav`
[As discussed on Gitter](https://app.gitter.im/#/room/#mkdocs_community:gitter.im/$MBc6guuJOmcU1MUR2U_H3arjzqK4tXClo_ncOpCo-pI), we should consider excluding pages from auto-populated navigation if they are tagged as `NOT_IN_NAV` within a plugin as part of `... | 2023-10-28T15:43:21Z | 2023-10-29T23:56:09Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (te... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval | |
mkdocs/mkdocs | mkdocs__mkdocs-3367 | b0915b4697ffb9b0c538ec8d4b0b8976a28b0e2c | diff --git a/mkdocs/structure/nav.py b/mkdocs/structure/nav.py
index e674419000..f01d917674 100644
--- a/mkdocs/structure/nav.py
+++ b/mkdocs/structure/nav.py
@@ -1,6 +1,7 @@
from __future__ import annotations
import logging
+import warnings
from typing import TYPE_CHECKING, Iterator, TypeVar
from urllib.parse im... | diff --git a/mkdocs/tests/structure/nav_tests.py b/mkdocs/tests/structure/nav_tests.py
index 3e4aba5f90..44ae2adc21 100644
--- a/mkdocs/tests/structure/nav_tests.py
+++ b/mkdocs/tests/structure/nav_tests.py
@@ -378,6 +378,34 @@ def test_nav_from_nested_files(self):
self.assertEqual(len(site_navigation.pages), ... | Allow plugins to override `Page` when populating navigation
Following up on https://github.com/squidfunk/mkdocs-material/issues/5909#issuecomment-1696958973, I'm suggesting to adjust the logic that MkDocs implies to create `Page` objects from/in files, i.e., `File` objects. Currently, [`_data_to_navigation`](https://gi... | 2023-08-31T08:03:19Z | 2023-09-07T20:17:36Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_... | [] | ["test_nav_page_subclass (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval | |
mkdocs/mkdocs | mkdocs__mkdocs-3324 | fcb2da399f029bd569b708479a39a5f2c700b5a2 | diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py
index cb95e74117..c0c827ffa8 100644
--- a/mkdocs/config/config_options.py
+++ b/mkdocs/config/config_options.py
@@ -945,11 +945,18 @@ def __fspath__(self):
return self.path
-class ExtraScript(SubConfig[ExtraScriptValue]):
- d... | diff --git a/mkdocs/tests/config/config_options_tests.py b/mkdocs/tests/config/config_options_tests.py
index abd7cb201a..6101c2e567 100644
--- a/mkdocs/tests/config/config_options_tests.py
+++ b/mkdocs/tests/config/config_options_tests.py
@@ -9,7 +9,7 @@
import sys
import textwrap
import unittest
-from typing import... | Unhashable type: 'ExtraScriptValue' Error
I have been encountering the following error when I add an extra_javascript to my yml file:
```
INFO - DeprecationWarning: warning_filter doesn't do anything since MkDocs 1.2 and will be removed soon. All messages on the
`mkdocs` logger get counted automatical... | Seems to be an issue with the [mkdocs-print-site-plugin](https://github.com/timvink/mkdocs-print-site-plugin) and the change in MkDocs 1.5 about extra javascript files. Mentioning @timvink, the author. | 2023-08-01T17:29:04Z | 2023-08-02T10:11:53Z | ["test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_capitaliz... | [] | ["test_js_async (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_js_async)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3320 | 2865b0fcc4dd9b636963a8fd7e306725e1ac8ab2 | diff --git a/mkdocs/__main__.py b/mkdocs/__main__.py
index bf589b75d6..77618fb29e 100644
--- a/mkdocs/__main__.py
+++ b/mkdocs/__main__.py
@@ -251,8 +251,8 @@ def cli():
@cli.command(name="serve")
@click.option('-a', '--dev-addr', help=dev_addr_help, metavar='<IP:PORT>')
-@click.option('--livereload', 'livereload',... | diff --git a/mkdocs/tests/cli_tests.py b/mkdocs/tests/cli_tests.py
index ae60991a05..6ce03db109 100644
--- a/mkdocs/tests/cli_tests.py
+++ b/mkdocs/tests/cli_tests.py
@@ -21,7 +21,7 @@ def test_serve_default(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
... | --no-livereload not usable in 1.5
Hello,
the option `--no-livereload` on `mkdocs serve` is no longer usable since version 1.5.
The livereload function is still active.
| That's true, sorry :( | 2023-07-31T17:30:26Z | 2023-08-01T16:57:57Z | ["test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_capitaliz... | [] | ["test_serve_dirtyreload (mkdocs.tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_serve_theme (mkdocs.tests.cli_tests.CLITests.test_serve_theme)", "test_serve_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_serve_no_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3283 | de0c913fca6da1f192b6cfdc2297dc7d82b26234 | diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index bfb025ead9..25d0216a55 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -343,17 +343,81 @@ Example:
```yaml
nav:
- - Foo: foo.md
- - Bar: bar.md
+ - Foo: foo.md
+ - Bar: bar.md
no... | diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index 24b2fa6c6a..3ea64d42fd 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -58,9 +58,7 @@ def test_context_base_url_homepage(self):
{'Home': 'index.md'},
]
cfg = load_config(nav=nav_cfg,... | Add ability to warn about pages existing in the docs directory but not included in the "nav" configuration
## Use case
A team uses a CI system and would like to ensure documentation quality never regresses.
To this end, the CI job has a step that runs `mkdocs build --strict` which reports a failure if building the ... | So, this used to be a warning, but was changed to an info message because we got complaints. I initially made it a warning for this very use case. Unfortunately, for users who want to have pages not included in the nav, this would mean they can't use `--strict`.
We could create a new setting, but we generally try to... | 2023-07-02T16:54:55Z | 2023-07-09T14:04:38Z | ["test_event_on_post_build_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_mkdocs_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_unrecogni... | [] | ["test_incorrect_type_error (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAd... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3258 | 7b1bc92926029058c09ac86649fb51dd7758353b | diff --git a/docs/dev-guide/plugins.md b/docs/dev-guide/plugins.md
index 9fdc410f1c..705faf571b 100644
--- a/docs/dev-guide/plugins.md
+++ b/docs/dev-guide/plugins.md
@@ -110,7 +110,7 @@ class MyPlugin(mkdocs.plugins.BasePlugin):
> from mkdocs.config import base, config_options as c
>
> class _ValidationOptions(base... | diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index bc161fce87..24b2fa6c6a 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -2,13 +2,19 @@
from __future__ import annotations
import contextlib
+import io
+import os.path
+import re
import textwrap
import unittes... | Support for relative base_path in markdown_extensions
Many extensions need to know the base path of the currently rendered Markdown file, as they are supposed to include assets relative to the markdown file. Two of them are:
- [markdown-include](https://github.com/cmacmackin/markdown-include)
- [pymdownx.snippets](... | I just first time tried `pymdownx.snippets` and yeah, indeed, this would be an awesome feature. I'm still structuring my document tree and probably I have to change all those paths to snippets yet so many times...
Patched version of mkdocs: https://github.com/dersimn/mkdocs
..the change is quite small by the way: http... | 2023-06-11T23:04:05Z | 2023-07-01T13:42:30Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_... | [] | ["test_markdown_extension_with_relative (mkdocs.tests.build_tests.BuildTests.test_markdown_extension_with_relative)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3268 | 285461a3e7557a02b79d26839c629f276be79553 | diff --git a/docs/dev-guide/themes.md b/docs/dev-guide/themes.md
index 32496f0404..1ba3a021cc 100644
--- a/docs/dev-guide/themes.md
+++ b/docs/dev-guide/themes.md
@@ -408,7 +408,7 @@ on the homepage:
show_root_full_path: false
heading_level: 5
-::: mkdocs.structure.pages.Page.parent
+::: mkdocs.stru... | diff --git a/mkdocs/tests/base.py b/mkdocs/tests/base.py
index 28e3fd3c1f..c480eaa26e 100644
--- a/mkdocs/tests/base.py
+++ b/mkdocs/tests/base.py
@@ -23,20 +23,17 @@ def get_markdown_toc(markdown_source):
return md.toc_tokens
-def load_config(**cfg) -> MkDocsConfig:
+def load_config(config_file_path: str | No... | Feature idea: Allow to override docs_dir with commandline option
The build command offers several options. One of them is `--site-dir` to override the setting `site_dir` in a `mkdocs.yml`.
Is it possible to add an option `--docs-dir` to override the setting `docs_dir` as well?
Use case: Use the same mkdocs.yml co... | This might have made (some) sense in the past, however, in #1376 , which will be available in the next release, we are changing the behavior so that all paths in the config file are relative to the config file. Therefore, the config file will be more specific to a given set of files and not likely to work with multiple... | 2023-06-18T16:07:10Z | 2023-06-19T20:22:11Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_... | ["test_multiple_dirs_changes_rebuild_only_once (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)"] | ["test_run_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_run_undefined_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_e... | ["(failures=1, skipped=4)"] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3191 | 8ecdfb2510a481c89d0659ba103aa9a87eb94d62 | diff --git a/docs/user-guide/writing-your-docs.md b/docs/user-guide/writing-your-docs.md
index 4697abd5d0..66a100672d 100644
--- a/docs/user-guide/writing-your-docs.md
+++ b/docs/user-guide/writing-your-docs.md
@@ -380,10 +380,14 @@ specific page. The following keys are supported:
MkDocs will attempt to determine ... | diff --git a/mkdocs/tests/structure/page_tests.py b/mkdocs/tests/structure/page_tests.py
index 9ccd9ff87e..30a90f6813 100644
--- a/mkdocs/tests/structure/page_tests.py
+++ b/mkdocs/tests/structure/page_tests.py
@@ -4,6 +4,7 @@
import unittest
from unittest import mock
+from mkdocs.config.defaults import MkDocsConfi... | Add support to extract underline-ish title (setext-style headings)
The util function [`get_markdown_title`](https://github.com/mkdocs/mkdocs/blob/master/mkdocs/utils/__init__.py#L332) supports only ATX-style headers. It should also support:
```markdown
A level-one heading
===================
A level-two heading
... | I'm closing this as a duplicate of #1826. As the discussion there is long and covers multiple issues, I've copied the relevant [comment][0] below. Also note that in #1843 we have explicitly documented that setext style headers are not supported.
> The page title is set in [`mkdocs.structure.pages.Page._set_title`][1... | 2023-04-21T20:05:32Z | 2023-05-29T19:59:32Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_... | [] | ["test_page_title_from_markdown_strip_formatting (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_page_title_from_markdown_stripped_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_page_title_from_setext_... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3010 | 2a232bf153a5bc22b73f5142030e1101ee96d5b2 | diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index 6592495b97..9330a84696 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -88,7 +88,10 @@ def _indent_print(self, depth=0):
@property
def url(self) -> str:
"""The URL of the page relative to the MkDocs `si... | diff --git a/mkdocs/tests/structure/file_tests.py b/mkdocs/tests/structure/file_tests.py
index 8d8257f0d9..67dc36b60e 100644
--- a/mkdocs/tests/structure/file_tests.py
+++ b/mkdocs/tests/structure/file_tests.py
@@ -444,7 +444,6 @@ def test_get_relative_url_use_directory_urls(self):
'foo/bar.md',
... | relative url start with "../" in nav no longer works
When I tried to make a link to an external resource in `nav` section of mkdos.yml, using the following example, the actual output HTML omits "../" in the relative URL and I couldn't point to external resources out of mkdocs with relative URL.
https://www.mkdocs.org/... | I just encountered the same issue. Surprised such a killer bug has not received any response
I confirm that https://github.com/mkdocs/mkdocs/pull/2296 (released in 1.2) changed this behavior.
The thing is, this usage was never supported and always showed warnings anyway:
```
WARNING - A relative path to '../' ... | 2022-10-17T20:39:06Z | 2023-05-09T18:56:54Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_... | [] | ["test_normalize_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3022 | 1fa2af7926b334a5b02229c3ea1649ff04955b77 | diff --git a/mkdocs/livereload/__init__.py b/mkdocs/livereload/__init__.py
index c2e52ab8e2..e136ff05b4 100644
--- a/mkdocs/livereload/__init__.py
+++ b/mkdocs/livereload/__init__.py
@@ -246,7 +246,7 @@ def condition():
self._epoch_cond.wait_for(condition, timeout=self.poll_response_timeout)
... | diff --git a/mkdocs/tests/structure/file_tests.py b/mkdocs/tests/structure/file_tests.py
index 7f5fd1ee17..8d8257f0d9 100644
--- a/mkdocs/tests/structure/file_tests.py
+++ b/mkdocs/tests/structure/file_tests.py
@@ -168,7 +168,7 @@ def test_md_index_file_use_directory_urls(self):
self.assertPathsEqual(f.abs_src... | Link to paragraph on index.md breaks
I try to link from a subpage to a paragraph on my root index.md:
`[MyLink](../index.md#contact)`
This results when clicking in a 404 trying to open the following URL:
`documentation#contact`
Correct would be to link to
`documentation/#contact` (note the slash)
Jus... | Hi. This sounds like something that's happening only in your specific case.
If you don't provide a way for me to see exactly what that case is, I can't start guessing.
Please provide a complete MkDocs site with `mkdocs.yml` that exhibits the problem, which page I should look at, what's going wrong there and what you ... | 2022-10-25T21:45:07Z | 2022-10-29T12:41:50Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_... | [] | ["test_md_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_relative_html_link_parent_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_get_relative_url_use_directory_urls (mkdocs.test... | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"To... | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2271 | fde47b4b4f978f179b9dff34583cb2b99021f482 | diff --git a/CHANGES.rst b/CHANGES.rst
index aedea8894..a90ff58f1 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -79,6 +79,16 @@ Unreleased
allows the user to search for future output of the generator when
using less and then aborting the program using ctrl-c.
+- ``deprecated: bool | str`` can now ... | diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index 5dc56a468..8c1ff0064 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -275,6 +275,44 @@ def cli(f):
assert result.output == "test\n"
+def test_deprecated_usage(runner):
+ @click.command()
+ @click.argument("f", requ... | Mark parameter as deprecated
Thanks for this great project!
Perhaps it's just me who feels that it is rather cumbersome mark a single parameter as deprecated (the closet I found was https://stackoverflow.com/a/50402799). Is there perhaps a more official method to mark a single parameter as deprecated?
That would some... | I'll work on this
@davidism I just implemented to show the message with `--help`.
Is it better to show same message running without `--help`? | 2022-05-02T21:09:55Z | 2024-11-29T00:31:31Z | ["tests/test_commands.py::test_other_command_invoke_with_defaults", "tests/test_arguments.py::test_nargs_envvar[-1-a b c-expect4]", "tests/test_arguments.py::test_duplicate_names_warning[args_one0-args_two0]", "tests/test_commands.py::test_group_with_args[args3-2-Show this message and exit.]", "tests/test_options.py::t... | [] | ["tests/test_arguments.py::test_deprecated_required", "tests/test_commands.py::test_deprecated_in_help_messages[True-CLI HELP]", "tests/test_arguments.py::test_deprecated_warning[True]", "tests/test_options.py::test_deprecated_usage[USE B INSTEAD]", "tests/test_arguments.py::test_deprecated_usage", "tests/test_options.... | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\... | tox -- | null | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2800 | d8763b93021c416549b5f8b4b5497234619410db | diff --git a/CHANGES.rst b/CHANGES.rst
index 540bbe2de..01e8d8b15 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -59,6 +59,9 @@ Unreleased
- If help is shown because ``no_args_is_help`` is enabled (defaults to ``True``
for groups, ``False`` for commands), the exit code is 2 instead of 0.
:issue:`1489` :pr:`... | diff --git a/tests/test_shell_completion.py b/tests/test_shell_completion.py
index 3e7a2bd7f..3511f0743 100644
--- a/tests/test_shell_completion.py
+++ b/tests/test_shell_completion.py
@@ -1,3 +1,5 @@
+import warnings
+
import pytest
import click.shell_completion
@@ -414,3 +416,27 @@ class MyshComplete(ShellComplet... | Click doesn't close file options during shell completion
Click doesn't close file options during shell completion, which causes a resource warning if a program uses a file option.
For example, I have group like this:
```python
@click.group()
@click.option('--config_file',
default=CONFIG,
... | 2024-11-03T13:31:59Z | 2024-11-03T20:38:31Z | ["tests/test_shell_completion.py::test_choice_conflicting_prefix", "tests/test_shell_completion.py::test_option_multiple", "tests/test_shell_completion.py::test_type_choice", "tests/test_shell_completion.py::test_full_source[zsh]", "tests/test_shell_completion.py::test_chained", "tests/test_shell_completion.py::test_fu... | [] | ["tests/test_shell_completion.py::test_add_completion_class_decorator", "tests/test_shell_completion.py::test_files_closed"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-1489 | 4271fe283dc9365563aebb369ada8d20eee015a8 | diff --git a/CHANGES.rst b/CHANGES.rst
index 387f84fe3..540bbe2de 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -56,6 +56,9 @@ Unreleased
:issue:`2746` :pr:`2788`
- Add ``Choice.get_invalid_choice_message`` method for customizing the
invalid choice message. :issue:`2621` :pr:`2622`
+- If help is shown be... | diff --git a/tests/test_commands.py b/tests/test_commands.py
index 5a56799ad..02c4a3043 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -95,13 +95,9 @@ def long():
)
-def test_no_args_is_help(runner):
- @click.command(no_args_is_help=True)
- def cli():
- pass
-
- result = ru... | Not specifying a group's command exits with code 0
When a group is created with multiple commands, but the script is called without any commands, the exit code is 0. It looks like [this line](https://github.com/pallets/click/blob/466d0add86f48502db9c02c32e30287d39ab866b/click/core.py#L1028) just needs to be changed to ... | 2020-03-06T22:34:03Z | 2024-11-03T19:56:42Z | ["tests/test_commands.py::test_other_command_invoke_with_defaults", "tests/test_commands.py::test_group_invoke_collects_used_option_prefixes", "tests/test_commands.py::test_other_command_forward", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[EOFError]", "tests/test_commands.py::test_auto... | [] | ["tests/test_commands.py::test_command_no_args_is_help", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[KeyboardInterrupt]", "tests/test_commands.py::test_group_with_args[args3-2-Show this message and exit.]"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2622 | 1787497713fa389435ed732c9b26274c3cdc458d | diff --git a/CHANGES.rst b/CHANGES.rst
index 495eb2a55..387f84fe3 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -54,6 +54,8 @@ Unreleased
- When using ``Option.envvar`` with ``Option.flag_value``, the ``flag_value``
will always be used instead of the value of the environment variable.
:issue:`2746` :pr:`27... | diff --git a/tests/test_types.py b/tests/test_types.py
index 79068e189..667953a47 100644
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -244,3 +244,9 @@ def test_invalid_path_with_esc_sequence():
click.Path(dir_okay=False).convert(tempdir, None, None)
assert "my\\ndir" in exc_info.value.mess... | Allow customizing fail message for invalid choice in `click.types.Choice`
Move the fail art of `convert()` in the `Choice` class to a new method `get_invalid_choice_fail_message(self)` so in my subclass of `click.Choice` I can customize the way it shows the failing value for the choice
Some CLI option choices are mu... | 2023-10-04T21:40:39Z | 2024-11-03T14:54:03Z | ["tests/test_types.py::test_cast_multi_default[2-False-default1-expect1]", "tests/test_types.py::test_path_type[Path-expect3]", "tests/test_types.py::test_file_error_surrogates", "tests/test_types.py::test_range_fail[type2-6-6 is not in the range x<=5.]", "tests/test_types.py::test_cast_multi_default[None-True-None-exp... | [] | ["tests/test_types.py::test_choice_get_invalid_choice_message", "tests/test_types.py::test_invalid_path_with_esc_sequence"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2788 | 380008389b32ca2b7de7c73f670a9eee1562004e | diff --git a/CHANGES.rst b/CHANGES.rst
index 7bb076285..495eb2a55 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -51,6 +51,9 @@ Unreleased
- Add ``ProgressBar(hidden: bool)`` to allow hiding the progressbar. :issue:`2609`
- A ``UserWarning`` will be shown when multiple parameters attempt to use the
same name.... | diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index 825bcc487..5dc56a468 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -198,6 +198,19 @@ def cmd(arg):
assert result.return_value == expect
+def test_envvar_flag_value(runner):
+ @click.command()
+ # is_flag is i... | `flag_value` is not taken into account with `envvar`
When using the ~~--debug option~~ `DEBUG` environment variable in the sample command, the debug value is not correctly set (`flag_value`). It is expected to be either `logging.DEBUG` or `None`, but it seems to be getting the integer value directly from the environmen... | 2024-10-13T20:47:53Z | 2024-11-03T14:40:46Z | ["tests/test_arguments.py::test_nargs_envvar[2-a b-expect2]", "tests/test_arguments.py::test_nargs_envvar[-1-a b c-expect4]", "tests/test_arguments.py::test_stdout_default", "tests/test_arguments.py::test_nargs_bad_default[value2]", "tests/test_arguments.py::test_nargs_envvar[-1--expect5]", "tests/test_arguments.py::te... | [] | ["tests/test_arguments.py::test_envvar_flag_value", "tests/test_arguments.py::test_duplicate_names_warning[args_one0-args_two0]"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2397 | fcd85032cff78aa536a6d2b455fb83bfcc02b228 | diff --git a/CHANGES.rst b/CHANGES.rst
index e6032649a..7bb076285 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -49,6 +49,8 @@ Unreleased
``Context.call_on_close`` callbacks and context managers added via
``Context.with_resource`` to be closed on exit as well. :pr:`2680`
- Add ``ProgressBar(hidden: bool)``... | diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index 7f6629fba..825bcc487 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -401,3 +401,23 @@ def bar(arg):
assert isinstance(foo.params[0], CustomArgument)
assert isinstance(bar.params[0], CustomArgument)
+
+
+@pytest.mark.... | Issue UserWarning when overriding Parameter name
When a command is given multiple parameters that use the same name, a UserWarning should be fired to highlight the conflict. Currently, the command will quietly allow one parameter to override the names of another.
(This is a slightly different problem than https://gi... | 2022-11-07T03:47:35Z | 2024-11-03T14:11:59Z | ["tests/test_arguments.py::test_nargs_envvar[-1-a b c-expect4]", "tests/test_options.py::test_show_default_precedence[False-one-extra_value9-True]", "tests/test_options.py::test_do_not_show_default_empty_multiple", "tests/test_options.py::test_flag_duplicate_names", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH... | [] | ["tests/test_options.py::test_duplicate_names_warning[opts_one0-opts_two0]", "tests/test_options.py::test_duplicate_names_warning[opts_one1-opts_two1]", "tests/test_arguments.py::test_duplicate_names_warning[args_one0-args_two0]"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2727 | c326df95e9e3da0425360e030413f6a3ee25fdee | diff --git a/.gitignore b/.gitignore
index 62c1b887d..787c22259 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,8 @@
.vscode/
.venv*/
venv*/
+.env*/
+env*/
__pycache__/
dist/
.coverage*
diff --git a/CHANGES.rst b/CHANGES.rst
index 59c5b58f7..e6032649a 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -48,6 +48,7 ... | diff --git a/tests/test_termui.py b/tests/test_termui.py
index 0dcd2330c..8fdfe8d64 100644
--- a/tests/test_termui.py
+++ b/tests/test_termui.py
@@ -71,7 +71,7 @@ def cli():
assert result.exception is None
-def test_progressbar_hidden(runner, monkeypatch):
+def test_progressbar_no_tty(runner, monkeypatch):
... | `progressbar(hide=True)` option for hiding the progress bar
Often when I use the Click `progressbar` I find myself wanting to conditionally hide it. Sometimes it's because there's another option in play which means I have output to display in place of it - others it's because I added a `--silent` option (as seen in `cu... | Here's [one workaround](https://github.com/simonw/sqlite-utils/blob/622c3a5a7dd53a09c029e2af40c2643fe7579340/sqlite_utils/utils.py#L432-L450) I've used for this, which feels pretty messy:
```python
class NullProgressBar:
def __init__(self, *args):
self.args = args
def __iter__(self):
y... | 2024-05-20T22:11:49Z | 2024-11-03T13:12:06Z | ["tests/test_termui.py::test_progressbar_format_eta[900-00:15:00]", "tests/test_termui.py::test_file_prompt_default_format[file_kwargs1]", "tests/test_termui.py::test_progressbar_format_eta[0-00:00:00]", "tests/test_termui.py::test_prompt_required_false[short sep value]", "tests/test_termui.py::test_progressbar_update_... | [] | ["tests/test_termui.py::test_progressbar_hidden_manual"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\... | tox -- | null | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2696 | 0e0c00324a5af35f8995c7ff88df67b0f5594a58 | diff --git a/CHANGES.rst b/CHANGES.rst
index f3997a546..086ccf4cc 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -43,6 +43,8 @@ Unreleased
collect stderr output and never raise an exception. Add a new
output` stream to simulate what the user sees in its terminal. Removes
the ``mix_stderr`` parameter in ``... | diff --git a/tests/test_options.py b/tests/test_options.py
index 293f2532a..74ccc5ff9 100644
--- a/tests/test_options.py
+++ b/tests/test_options.py
@@ -531,6 +531,22 @@ def cmd(foo):
assert "bar" in choices
+def test_missing_envvar(runner):
+ cli = click.Command(
+ "cli", params=[click.Option(["--fo... | show envvar in error hint
```py
@click.command()
@click.option('--a', required=True, envvar="b", show_envvar=True)
def f(a): ...
f()
```
Here I would want the error message to show the env var.
| 2024-03-27T23:54:11Z | 2024-11-03T12:21:04Z | ["tests/test_options.py::test_show_default_precedence[False-one-extra_value9-True]", "tests/test_options.py::test_do_not_show_default_empty_multiple", "tests/test_options.py::test_flag_duplicate_names", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH]", "tests/test_options.py::test_show_true_default_boolean_flag_... | [] | ["tests/test_options.py::test_missing_envvar"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2517 | a6e0d2936891030f5092c9869c7391104f6721d9 | diff --git a/CHANGES.rst b/CHANGES.rst
index ad6271262..a43a5531f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -36,6 +36,9 @@ Unreleased
:issue:`2356`
- Do not display default values in prompts when ``Option.show_default`` is
``False``. :pr:`2509`
+- Add ``get_help_extra`` method on ``Option`` to fetch ... | diff --git a/tests/test_options.py b/tests/test_options.py
index 49df83bbd..293f2532a 100644
--- a/tests/test_options.py
+++ b/tests/test_options.py
@@ -316,6 +316,7 @@ def __str__(self):
opt = click.Option(["-a"], default=Value(), show_default=True)
ctx = click.Context(click.Command("cli"))
+ assert opt... | Split extra help item computing with help record rendering
I maintain [Click Extra, a drop-in replacement for Click which adds colorization](https://github.com/kdeldycke/click-extra/tree/main#readme) of the help screen.
I am currently relying on finicky regular expressions to identify and match the extra items that ... | 2023-05-16T14:13:34Z | 2024-11-02T23:35:57Z | ["tests/test_options.py::test_flag_duplicate_names", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH]", "tests/test_options.py::test_prefixes", "tests/test_options.py::test_unknown_options[--foo]", "tests/test_options.py::test_invalid_option", "tests/test_options.py::test_invalid_flag_combinations[kwargs1-'count'... | [] | ["tests/test_options.py::test_dynamic_default_help_special_method", "tests/test_options.py::test_hide_false_default_boolean_flag_value[False]", "tests/test_options.py::test_show_default_precedence[None-False-extra_value1-False]", "tests/test_options.py::test_show_default_precedence[False-one-extra_value9-True]", "tests... | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2365 | 02046e7a19480f85fff7e4577486518abe47e401 | diff --git a/CHANGES.rst b/CHANGES.rst
index b5d970117..097a79f75 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -31,6 +31,9 @@ Unreleased
- When generating a command's name from a decorated function's name, the
suffixes ``_command``, ``_cmd``, ``_group``, and ``_grp`` are removed.
:issue:`2322`
+- Show t... | diff --git a/tests/test_options.py b/tests/test_options.py
index 7397f3667..49df83bbd 100644
--- a/tests/test_options.py
+++ b/tests/test_options.py
@@ -926,3 +926,39 @@ def test_invalid_flag_combinations(runner, kwargs, message):
click.Option(["-a"], **kwargs)
assert message in str(e.value)
+
+
+@pytes... | `show_choices=False` seems to have no effect
I noticed when using Typer that even if you pass `show_choices=False`, the choices still get shown in the help. It seems that this is related to Click.
Example:
```python
import click
@click.command()
@click.option('-s', '--string-to-echo', type=click.Choice(['hello... | 2022-10-02T03:14:28Z | 2024-11-02T22:45:04Z | ["tests/test_options.py::test_show_default_precedence[True-None-True]", "tests/test_options.py::test_show_default_precedence[False-one-True]", "tests/test_options.py::test_do_not_show_default_empty_multiple", "tests/test_options.py::test_flag_duplicate_names", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH]", "t... | [] | ["tests/test_options.py::test_usage_show_choices[text choices]", "tests/test_options.py::test_usage_show_choices[text/int choices]", "tests/test_options.py::test_usage_show_choices[int choices]", "tests/test_options.py::test_usage_show_choices[bool choices]", "tests/test_options.py::test_usage_show_choices[float choice... | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2730 | 5b1624bf09947d6f10eaffd63d6fb737dfe7656a | diff --git a/CHANGES.rst b/CHANGES.rst
index 8a09daf35..7ca76f967 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -12,6 +12,8 @@ Unreleased
the help for an option. :issue:`2500`
- The test runner handles stripping color consistently on Windows.
:issue:`2705`
+- Show correct value for flag default when usin... | diff --git a/tests/test_defaults.py b/tests/test_defaults.py
index 5ab05edb8..5c5e168ab 100644
--- a/tests/test_defaults.py
+++ b/tests/test_defaults.py
@@ -59,3 +59,28 @@ def cli(y, f, v):
result = runner.invoke(cli, ["-y", "-n", "-f", "-v", "-q"], standalone_mode=False)
assert result.return_value == ((Tru... | Flag option with secondary opts: show_default=True does not show value from default_map in "help" output
I'm setting the `default_map` from a config file, and it seems the values from the `default_map` are not correctly shown in the `--help` output if I set `show_default=True` on my option.
My Option looks like this... | Hi, I'm at PyCon 2024 and picked up this issue. I wrote a unit tests to re-produce this issue and I believe this is a bug in latest main. I also think the OP is correct about what is causing it, when I replace `self.default` with `default_value` in this line of `core.py` the tests pass: https://github.com/pallets/cli... | 2024-05-21T20:43:18Z | 2024-05-22T21:13:00Z | ["tests/test_defaults.py::test_nargs_plus_multiple", "tests/test_defaults.py::test_multiple_defaults", "tests/test_defaults.py::test_basic_defaults"] | [] | ["tests/test_defaults.py::test_multiple_flag_default", "tests/test_defaults.py::test_flag_default_map"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = tru... | tox -- | null | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2728 | e88c11239971d309744fd3f9139259f64787f45a | diff --git a/CHANGES.rst b/CHANGES.rst
index 4188303ed..aba1bbe07 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,6 +6,9 @@ Version 8.1.8
Unreleased
- Fix an issue with type hints for ``click.open_file()``. :issue:`2717`
+- Fix issue where error message for invalid ``click.Path`` displays on
+ multiple line... | diff --git a/tests/test_types.py b/tests/test_types.py
index 0a2508882..79068e189 100644
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -1,5 +1,6 @@
import os.path
import pathlib
+import platform
import tempfile
import pytest
@@ -232,3 +233,14 @@ def test_file_surrogates(type, tmp_path):
def test_file_er... | Broken message about invalid argument value for template "File ... is a directory"
**User Actions**
```sh
mkdir $'my\ndir'
my-tool $'my\ndir'
```
**Expected Output**
```
Invalid value for 'PATH': File 'my\ndir' is a directory.
```
**Actual Output**
```
Invalid value for 'PATH': File 'my
dir' is a dire... | I'm going to work on this at the PyCon 2024 sprints. | 2024-05-20T23:23:43Z | 2024-05-21T14:46:21Z | ["tests/test_types.py::test_cast_multi_default[2-False-default1-expect1]", "tests/test_types.py::test_path_type[Path-expect3]", "tests/test_types.py::test_range_fail[type2-6-6 is not in the range x<=5.]", "tests/test_types.py::test_cast_multi_default[None-True-None-expect2]", "tests/test_types.py::test_range[type5--1-0... | [] | ["tests/test_types.py::test_invalid_path_with_esc_sequence", "tests/test_types.py::test_file_error_surrogates"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = tru... | tox -- | null | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2604 | b63ace28d50b53e74b5260f6cb357ccfe5560133 | diff --git a/CHANGES.rst b/CHANGES.rst
index b2fad81de..7f1530ab4 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -28,6 +28,9 @@ Unreleased
- Enable deferred evaluation of annotations with
``from __future__ import annotations``. :pr:`2270`
+- When generating a command's name from a decorated function's name, ... | diff --git a/tests/test_command_decorators.py b/tests/test_command_decorators.py
index cfdab3c31..5bd268c0a 100644
--- a/tests/test_command_decorators.py
+++ b/tests/test_command_decorators.py
@@ -1,3 +1,5 @@
+import pytest
+
import click
@@ -69,3 +71,22 @@ def cli(a, b):
assert cli.params[1].name == "b"
... | strip "_command" suffix when generating command name
You often want a command to have the same name as a function it is wrapping. However, this will cause a name collision, if your command is going to call `init_data` its function can't also be called `init_data`. So instead it's written as `init_data_command`, and the... | Hi @davidism, Am I right in assuming the expected behaviour would be that both `_command` and `_cmd` suffixes are dropped?
An example using `_cmd` as a suffix:
https://github.com/pallets/click/blob/fb4327216543d751e2654a0d3bf6ce3d31c435cc/examples/imagepipe/imagepipe.py#L74-L98 | 2023-09-01T21:14:41Z | 2023-09-01T21:17:53Z | ["tests/test_commands.py::test_group_invoke_collects_used_option_prefixes", "tests/test_commands.py::test_other_command_forward", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[EOFError]", "tests/test_commands.py::test_auto_shorthelp", "tests/test_commands.py::test_object_propagation", "te... | [] | ["tests/test_command_decorators.py::test_generate_name[init_data_group]", "tests/test_commands.py::test_other_command_invoke_with_defaults", "tests/test_command_decorators.py::test_generate_name[init_data_cmd]", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[KeyboardInterrupt]", "tests/tes... | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest --c... | tox -- | null | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2312 | c77966e092edc9b8835e7327294b9177059fc90e | diff --git a/CHANGES.rst b/CHANGES.rst
index cf27f573a..14cc09da0 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -24,6 +24,8 @@ Unreleased
``command_class``. :issue:`2416`
- ``multiple=True`` is allowed for flag options again and does not require
setting ``default=()``. :issue:`2246, 2292, 2295`
+- Make t... | diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index 3395c552b..7f6629fba 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -381,3 +381,23 @@ def subcmd():
result = runner.invoke(cli, ["arg1", "cmd", "arg2", "subcmd", "--help"])
assert not result.exception
assert "Usag... | Parameter decorator factories shouldn't pop `cls` from `attrs`
Popping `cls` introduces a side-effect that prevents the reuse of the returned decorator. For example, consider the code below. The function `my_shared_argument` is a decorator that is expected to register an argument of type `ArgumentWithHelp`. Instead, wh... | 2022-06-18T22:37:29Z | 2023-07-04T01:29:36Z | ["tests/test_arguments.py::test_nargs_envvar[2-a b-expect2]", "tests/test_arguments.py::test_nargs_envvar[-1-a b c-expect4]", "tests/test_arguments.py::test_stdout_default", "tests/test_arguments.py::test_nargs_bad_default[value2]", "tests/test_arguments.py::test_nargs_envvar[-1--expect5]", "tests/test_arguments.py::te... | [] | ["tests/test_arguments.py::test_when_argument_decorator_is_used_multiple_times_cls_is_preserved", "tests/test_arguments.py::test_nested_subcommand_help"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest -... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2550 | d34d31f6dde4350f9508f0327698f851c595d91c | diff --git a/CHANGES.rst b/CHANGES.rst
index 2debd7814..cf27f573a 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -22,6 +22,8 @@ Unreleased
``standalone_mode`` is disabled. :issue:`2380`
- ``@group.command`` does not fail if the group was created with a custom
``command_class``. :issue:`2416`
+- ``multiple... | diff --git a/tests/test_defaults.py b/tests/test_defaults.py
index 0e438eb89..8ef5ea292 100644
--- a/tests/test_defaults.py
+++ b/tests/test_defaults.py
@@ -38,3 +38,24 @@ def cli(arg):
result = runner.invoke(cli, [])
assert not result.exception
assert result.output.splitlines() == ["<1|2>", "<3|4>"]
+
+... | can't get list of bools using multiple flag
I have an option that is a list of `bool`s, but I'm pairing each boolean value with another `multiple` option. So I do actually need a list of booleans and not just a count of values because order matters.
I'm not using `is_flag`, but I assume this translates to the same und... | 2023-07-03T16:10:28Z | 2023-07-03T16:31:19Z | ["tests/test_options.py::test_show_default_precedence[True-None-True]", "tests/test_options.py::test_show_default_precedence[False-one-True]", "tests/test_options.py::test_do_not_show_default_empty_multiple", "tests/test_options.py::test_flag_duplicate_names", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH]", "t... | [] | ["tests/test_defaults.py::test_multiple_flag_default"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest -... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2417 | e4066e1f325088ee42ae7bc0bc6c2e47533ff2c3 | diff --git a/CHANGES.rst b/CHANGES.rst
index 37646a9c7..2debd7814 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -20,6 +20,8 @@ Unreleased
- ZSH completion script works when loaded from ``fpath``. :issue:`2344`.
- ``EOFError`` and ``KeyboardInterrupt`` tracebacks are not suppressed when
``standalone_mode`` is... | diff --git a/tests/test_command_decorators.py b/tests/test_command_decorators.py
index 9d54d7b27..cfdab3c31 100644
--- a/tests/test_command_decorators.py
+++ b/tests/test_command_decorators.py
@@ -11,6 +11,26 @@ def cli():
assert result.output == "hello\n"
+def test_custom_command_no_parens(runner):
+ class... | Cannot use parameterless command decorator with custom command_class
Click throws an assertion error if you try to use the parameterless command decorator on a group with a command_class defined. The error is due to the command_class being added to kwargs before the assertion for no kwargs.
# minimal repro
```
... | 2022-12-15T22:06:00Z | 2023-06-30T19:29:14Z | ["tests/test_command_decorators.py::test_command_no_parens", "tests/test_command_decorators.py::test_group_no_parens"] | [] | ["tests/test_command_decorators.py::test_params_argument", "tests/test_command_decorators.py::test_custom_command_no_parens"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest -... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2380 | df9ad4085d60710b507b54c8fc369ee186eb1d64 | diff --git a/CHANGES.rst b/CHANGES.rst
index 674e44901..37646a9c7 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -18,6 +18,8 @@ Unreleased
- Improve command name detection when using Shiv or PEX. :issue:`2332`
- Avoid showing empty lines if command help text is empty. :issue:`2368`
- ZSH completion script works... | diff --git a/tests/test_commands.py b/tests/test_commands.py
index d72a1825e..ed9d96f3c 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -397,3 +397,15 @@ def command2(e):
runner.invoke(group, ["command1"])
assert opt_prefixes == {"-", "--", "~", "+"}
+
+
+@pytest.mark.parametrize("exc", ... | Unable to see EOFError exception in the traceback with disabled standalone mode
According to the [docs](https://click.palletsprojects.com/en/8.0.x/exceptions/?highlight=standalone%20mode#what-if-i-don-t-want-that) disabled standalone mode disables exception handling. However, click still suppresses `EOFError` (as well ... | 2022-10-17T18:57:10Z | 2023-06-30T19:19:42Z | ["tests/test_commands.py::test_other_command_invoke_with_defaults", "tests/test_commands.py::test_other_command_forward", "tests/test_commands.py::test_auto_shorthelp", "tests/test_commands.py::test_object_propagation", "tests/test_commands.py::test_group_add_command_name", "tests/test_commands.py::test_group_with_args... | [] | ["tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[EOFError]", "tests/test_commands.py::test_group_invoke_collects_used_option_prefixes", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[KeyboardInterrupt]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest -... | tox -- | null | null | null | swa-bench:sw.eval | |
pallets/click | pallets__click-2369 | a4f5450a2541e2f2f8cacf57f50435eb78422f99 | diff --git a/CHANGES.rst b/CHANGES.rst
index 66808a83c..76c234f6b 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -16,6 +16,7 @@ Unreleased
- Improve type annotations for pyright type checker. :issue:`2268`
- Improve responsiveness of ``click.clear()``. :issue:`2284`
- Improve command name detection when using S... | diff --git a/tests/test_commands.py b/tests/test_commands.py
index 3a0d4b9c6..d72a1825e 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -95,20 +95,6 @@ def long():
)
-def test_help_truncation(runner):
- @click.command()
- def cli():
- """This is a command with truncated help.
-... | Spurious empty lines in the help output (regression)
Click since version 8.1.0 doesn't properly account for a scenario that the callback's docstring can have no "help text" part, like so:
```python
@click.command()
def callback():
"""
\f
More stuff.
"""
```
This results in empty lines in the ... | 2022-10-05T12:39:42Z | 2023-06-30T16:43:46Z | ["tests/test_commands.py::test_other_command_invoke_with_defaults", "tests/test_formatting.py::test_formatting_with_options_metavar_empty", "tests/test_commands.py::test_group_invoke_collects_used_option_prefixes", "tests/test_commands.py::test_other_command_forward", "tests/test_formatting.py::test_basic_functionality... | [] | ["tests/test_formatting.py::test_help_formatter_write_text", "tests/test_formatting.py::test_truncating_docstring_no_help"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest -... | tox -- | null | null | null | swa-bench:sw.eval | |
cowrie/cowrie | cowrie__cowrie-1405 | 0df3cd9e187fd2c90b152a9dc57d2f6b9652256b | diff --git a/src/cowrie/shell/filetransfer.py b/src/cowrie/shell/filetransfer.py
index 2eed756977..976b69a27d 100644
--- a/src/cowrie/shell/filetransfer.py
+++ b/src/cowrie/shell/filetransfer.py
@@ -147,7 +147,7 @@ class SFTPServerForCowrieUser(object):
def __init__(self, avatar):
self.avatar = avatar
-... | diff --git a/src/cowrie/test/fake_server.py b/src/cowrie/test/fake_server.py
index 5a172b255b..94f085ff10 100644
--- a/src/cowrie/test/fake_server.py
+++ b/src/cowrie/test/fake_server.py
@@ -18,7 +18,7 @@ def __init__(self):
self.arch = 'linux-x64-lsb'
self.hostname = "unitTest"
- self.fs = f... | Resolving paths with ~/
**Describe the bug**
Quite often I see the following input from my visitors:
```
cd ~ && rm -rf .ssh && mkdir .ssh && echo "ssh-rsa [SSH_KEY] [USERNAME]">>.ssh/authorized_keys && chmod -R go= ~/.ssh && cd ~
```
There is an issue with chmod argument `~/.ssh`. Cowrie can not resolve this path... | 2020-09-05T18:36:34Z | 2020-10-04T09:36:29Z | [] | [] | ["(successes=70)"] | [] | {"install": [], "pre_install": [], "python": "3.8", "pip_packages": ["alabaster==0.7.13", "appdirs==1.4.4", "attrs==19.3.0", "automat==24.8.1", "babel==2.16.0", "bcrypt==3.1.7", "certifi==2024.8.30", "cffi==1.17.1", "charset-normalizer==3.4.0", "click==8.1.7", "configparser==5.0.0", "constantly==23.10.4", "cryptography... | tox -- | null | null | null | swa-bench:sw.eval | |
ipython/ipython | ipython__ipython-14486 | ad07901d8cf6fb874262c6387bd24d9e5a284144 | diff --git a/IPython/core/prefilter.py b/IPython/core/prefilter.py
index e611b4b834..a29df0c27a 100644
--- a/IPython/core/prefilter.py
+++ b/IPython/core/prefilter.py
@@ -476,8 +476,8 @@ def check(self, line_info):
any python operator, we should simply execute the line (regardless of
whether or not th... | diff --git a/IPython/core/tests/test_handlers.py b/IPython/core/tests/test_handlers.py
index 604dadee1a..905d9abe07 100644
--- a/IPython/core/tests/test_handlers.py
+++ b/IPython/core/tests/test_handlers.py
@@ -7,17 +7,13 @@
# our own packages
from IPython.core import autocall
from IPython.testing import tools as tt... | Bug with autocall
Hi,
We are seeing the following bug with autocall (where below is showing valid code for a type hint):
```
$ ipython
Python 3.11.8 (main, Mar 15 2024, 12:37:54) [GCC 10.3.1 20210422 (Red Hat 10.3.1-1)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.22.2 -- An enhanced... | 2024-07-22T13:06:38Z | 2024-07-29T06:58:46Z | ["IPython/core/tests/test_handlers.py::test_handlers_I[0-autocallable()-autocallable()]", "IPython/core/tests/test_handlers.py::test_handlers_I[2-len \"abc\"-len(\"abc\")]", "IPython/core/tests/test_splitinput.py::test_split_user_input[??x-output5]", "IPython/core/tests/test_splitinput.py::test_split_user_input[ ;ls-o... | [] | ["IPython/core/tests/test_handlers.py::test_handlers_I[1-Callable[[int], None]-Callable[[int], None]1]", "IPython/core/tests/test_splitinput.py::test_split_user_input[P\\xe9rez Fernando-output21]", "IPython/core/tests/test_handlers.py::test_handlers_I[1-Callable[[int], None]-Callable[[int], None]0]", "IPython/core/test... | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.12", "pip_packages": ["asttokens==2.4.1", "decorator==5.1.1", "executing==2.0.1", "iniconfig==2.0.0", "jedi==0.19.1", "matplotlib-inline==0.1.7", "packaging==24.1", "parso==0.8.4", "pexpect==4.9.0", "pickleshare==0.7.5", "pluggy==1.5.0", "prom... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
ipython/ipython | ipython__ipython-14466 | 1454013b8b615ce75d30d38b7710e3fccca16263 | diff --git a/IPython/lib/pretty.py b/IPython/lib/pretty.py
index 631445b24e..8a24632d60 100644
--- a/IPython/lib/pretty.py
+++ b/IPython/lib/pretty.py
@@ -406,8 +406,16 @@ def pretty(self, obj):
meth = cls._repr_pretty_
if callable(meth):
... | diff --git a/IPython/core/tests/test_formatters.py b/IPython/core/tests/test_formatters.py
index c642befacc..cd8c83e555 100644
--- a/IPython/core/tests/test_formatters.py
+++ b/IPython/core/tests/test_formatters.py
@@ -103,7 +103,7 @@ def set_fp(p):
def test_for_type():
f = PlainTextFormatter()
-
+
# i... | `display` does not honor custom `__repr__` for `NamedTuple` when defined by `partialmethod`
The issue occurs when the custom `__repr__` is defined via `partialmethod`:
```python
from functools import partialmethod
from typing import NamedTuple
def my_pprint(obj, **options):
return "Hello World"
def add_... | The culprit:
https://github.com/ipython/ipython/blob/1454013b8b615ce75d30d38b7710e3fccca16263/IPython/lib/pretty.py#L409-L411
This check is incorrect, because `partialmethod` is a descriptor and not callable. Instead, the test should be replaced with `callable(getattr(cls, "__repr__", None))`. | 2024-06-20T11:01:28Z | 2024-06-25T08:24:04Z | ["IPython/core/tests/test_formatters.py::test_lookup_by_type_string", "IPython/core/tests/test_formatters.py::test_print_method_bound", "IPython/core/tests/test_formatters.py::test_string_in_formatter", "IPython/core/tests/test_formatters.py::test_error_method", "IPython/core/tests/test_formatters.py::test_lookup_by_ty... | [] | ["IPython/core/tests/test_formatters.py::test_custom_repr_namedtuple_partialmethod", "IPython/core/tests/test_formatters.py::test_repr_mime_failure"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.12", "pip_packages": ["asttokens==2.4.1", "decorator==5.1.1", "executing==2.0.1", "iniconfig==2.0.0", "jedi==0.19.1", "matplotlib-inline==0.1.7", "packaging==24.1", "parso==0.8.4", "pexpect==4.9.0", "pickleshare==0.7.5", "pluggy==1.5.0", "prom... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-14231 | 4977b5d92b4b46327e78fc60ae9aa45db8db24b1 | diff --git a/IPython/core/events.py b/IPython/core/events.py
index 90ff8f746d7..ef39c4fd0a4 100644
--- a/IPython/core/events.py
+++ b/IPython/core/events.py
@@ -82,7 +82,11 @@ def trigger(self, event, *args, **kwargs):
func(*args, **kwargs)
except (Exception, KeyboardInterrupt):
... | diff --git a/IPython/extensions/tests/test_autoreload.py b/IPython/extensions/tests/test_autoreload.py
index 89a4add328a..781885dd9d3 100644
--- a/IPython/extensions/tests/test_autoreload.py
+++ b/IPython/extensions/tests/test_autoreload.py
@@ -21,6 +21,7 @@
import shutil
import random
import time
+import traceback
... | Using autoreload magic fails with the latest version
<!-- This is the repository for IPython command line, if you can try to make sure this question/bug/feature belong here and not on one of the Jupyter repositories.
If it's a generic Python/Jupyter question, try other forums or discourse.jupyter.org.
If you are... | From a quick look the event manager callback code was modified by #14216. There may be some functionality that needs to be restored in handling callbacks there.
I'm astonished this was not found by tests. | 2023-10-31T08:35:01Z | 2023-10-31T09:21:21Z | ["IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_aimport_parsing", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_verbose_names", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_reload_enums", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_re... | [] | ["IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_smoketest_autoreload", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_autoreload_output", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_autoload_newly_added_objects", "IPython/extensions/tests/test_autoreload.py... | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.12", "pip_packages": ["asttokens==2.4.1", "attrs==23.1.0", "decorator==5.1.1", "executing==2.0.1", "iniconfig==2.0.0", "jedi==0.19.1", "matplotlib-inline==0.1.6", "packaging==23.2", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "plug... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-14185 | 6004e9b0bb0c702b840dfec54df8284234720817 | diff --git a/IPython/core/guarded_eval.py b/IPython/core/guarded_eval.py
index 5d405b2208e..a304affc35d 100644
--- a/IPython/core/guarded_eval.py
+++ b/IPython/core/guarded_eval.py
@@ -1,3 +1,4 @@
+from inspect import signature, Signature
from typing import (
Any,
Callable,
@@ -335,6 +336,7 @@ def __getitem_... | diff --git a/IPython/core/tests/test_guarded_eval.py b/IPython/core/tests/test_guarded_eval.py
index 6fb321abe12..13f909188f9 100644
--- a/IPython/core/tests/test_guarded_eval.py
+++ b/IPython/core/tests/test_guarded_eval.py
@@ -253,16 +253,36 @@ def test_method_descriptor():
assert guarded_eval("list.copy.__name_... | Tab complete for class __call__ not working
<!-- This is the repository for IPython command line, if you can try to make sure this question/bug/feature belong here and not on one of the Jupyter repositories.
If it's a generic Python/Jupyter question, try other forums or discourse.jupyter.org.
If you are unsure, ... | Indeed, neither jedi nor our standard `limited` evaluation policy for fallback completer handles this. Only `unsafe` policy or higher works:

This is because we do not currently use type hints for completion, something... | 2023-09-30T10:17:38Z | 2023-10-01T17:20:23Z | ["IPython/core/tests/test_guarded_eval.py::test_access_builtins[context0]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-0xXXXXXXXXX-3740122863]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-True is True-True]", "IPython/core/tests/test_guarded_eval.py::te... | [] | ["IPython/core/tests/test_guarded_eval.py::test_evaluates_calls[data3-data()-data.__class__()-frozenset-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_calls[data2-data()-data.__class__()-HeapType-False]"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.4.0", "attrs==23.1.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.19.0", "matplotlib-inline==0.1.6", "packaging==23.2", "parso==0.8.3", "pexpect==4.8.0", "pickles... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-14146 | 46c7ccf03476e6b52fca007625a0f8bca8cf0864 | diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py
index 5964d0288cb..30be9fc0d19 100644
--- a/IPython/core/debugger.py
+++ b/IPython/core/debugger.py
@@ -108,6 +108,7 @@
import os
from IPython import get_ipython
+from contextlib import contextmanager
from IPython.utils import PyColorize
from IPytho... | diff --git a/IPython/terminal/tests/test_debug_magic.py b/IPython/terminal/tests/test_debug_magic.py
index faa3b7c4993..16ed53d31af 100644
--- a/IPython/terminal/tests/test_debug_magic.py
+++ b/IPython/terminal/tests/test_debug_magic.py
@@ -68,8 +68,10 @@ def test_debug_magic_passes_through_generators():
child.exp... | ipdb: support for chained exceptions
This is a common pattern to enrich an exception with more information:
```
def foo(x):
try:
bar(x)
except Exception as e:
raise ValueError("foo(): bar failed") from e
def bar(x):
1/x
```
This is common when a second exception occurs during exc... | Apologies for the late reply to this issue. After a bit of investigating it should be possible with some refactor; I believe in both case.
One limitation is that pdb get a Traceback by default instead of a full Exception and you can go from Exception to TB but not the other way around.
I can mess around with th... | 2023-08-29T09:57:51Z | 2023-08-29T12:16:00Z | [] | [] | ["IPython/terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==23.1.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.19.0", "matplotlib-inline==0.1.6", "packaging==23.1", "parso==0.8.3", "pexpect==4.8.0", "pickles... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13991 | 4db24c349d2e211b5cfb51f3b1485c6d7f037290 | diff --git a/IPython/terminal/shortcuts/__init__.py b/IPython/terminal/shortcuts/__init__.py
index 41533c8071c..f71ce498fa0 100644
--- a/IPython/terminal/shortcuts/__init__.py
+++ b/IPython/terminal/shortcuts/__init__.py
@@ -181,30 +181,45 @@ def create_identifier(handler: Callable):
]
AUTO_SUGGEST_BINDINGS = [
+ ... | diff --git a/IPython/terminal/tests/test_shortcuts.py b/IPython/terminal/tests/test_shortcuts.py
index 18c9daba929..45bb327988b 100644
--- a/IPython/terminal/tests/test_shortcuts.py
+++ b/IPython/terminal/tests/test_shortcuts.py
@@ -1,7 +1,7 @@
import pytest
from IPython.terminal.shortcuts.auto_suggest import (
... | Auto suggestions cannot be completed when in the middle of multi-line input
<!-- This is the repository for IPython command line, if you can try to make sure this question/bug/feature belong here and not on one of the Jupyter repositories.
If it's a generic Python/Jupyter question, try other forums or discourse.jup... | Thank you for the report, I can reproduce it. Here are two workarounds for now:
- you can use <kbd>End</kbd>
- you can update to 8.11 where <kbd>right</kbd> was changed back to complete full line (whereas <kbd>ctrl</kbd> + <kbd>right</kbd> completes token-by-token and <kbd>alt</kbd> + <kbd>right</kbd> completes chara... | 2023-03-26T14:28:40Z | 2023-03-30T08:29:49Z | [] | [] | ["IPython/terminal/tests/test_shortcuts.py::test_other_providers", "IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_with_filters", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[d-ef out(tag: str, n=50):-ef ]", "IPython/terminal/tests/test_shortcuts.py::test_add_shortcut_for_new_command", "I... | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==22.2.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.18.2", "matplotlib-inline==0.1.6", "packaging==23.0", "parso==0.8.3", "pexpect==4.8.0", "pickles... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13943 | 2a5fdf9dab8e5fa50a03ce686aaf11cb38844587 | diff --git a/IPython/core/completer.py b/IPython/core/completer.py
index f0bbb4e5619..a41f492b04e 100644
--- a/IPython/core/completer.py
+++ b/IPython/core/completer.py
@@ -1162,11 +1162,36 @@ def attr_matches(self, text):
raise
except Exception:
# Silence errors from completion funct... | diff --git a/IPython/core/tests/test_completer.py b/IPython/core/tests/test_completer.py
index 7783798eb36..3ff6569ed62 100644
--- a/IPython/core/tests/test_completer.py
+++ b/IPython/core/tests/test_completer.py
@@ -543,6 +543,7 @@ def test_greedy_completions(self):
"""
ip = get_ipython()
ip... | ipython==8.8.0 has weird tab completion bug
<!-- This is the repository for IPython command line, if you can try to make sure this question/bug/feature belong here and not on one of the Jupyter repositories.
If it's a generic Python/Jupyter question, try other forums or discourse.jupyter.org.
If you are unsure, ... | @suewonjp thank you for opening this issue. A reproducer would really help. Based on your example I tried:
```python
class A:
def my_method(self):
pass
class B:
my_attr = A()
field = 1
def test(self):
self.my_attr.my_method(self.f<tab>
```
but it worked correctly, completi... | 2023-02-12T22:41:00Z | 2023-02-13T09:34:50Z | ["IPython/core/tests/test_completer.py::TestCompleter::test_import_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing", "IPython/core/tests/test_completer.py::test_line_split", "IPython/core/tests/test_completer.py::test_protect_filename", "IPython/core/tests/test_c... | [] | ["IPython/core/tests/test_completer.py::TestCompleter::test_greedy_completions"] | ["IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions Known failure on jedi<=0.18.0"] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==22.2.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.18.2", "matplotlib-inline==0.1.6", "packaging==23.0", "parso==0.8.3", "pexpect==4.8.0", "pickles... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13928 | 87de97f2b6e09eb32fe931e65c18e11b0f12bbde | diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py
index b5fc148ab1c..41a3321b039 100644
--- a/IPython/terminal/interactiveshell.py
+++ b/IPython/terminal/interactiveshell.py
@@ -16,6 +16,7 @@
Unicode,
Dict,
Integer,
+ List,
observe,
Instance,
Type,... | diff --git a/IPython/terminal/tests/test_interactivshell.py b/IPython/terminal/tests/test_interactivshell.py
index 01008d78369..ae7da217f1d 100644
--- a/IPython/terminal/tests/test_interactivshell.py
+++ b/IPython/terminal/tests/test_interactivshell.py
@@ -9,9 +9,8 @@
from prompt_toolkit.auto_suggest import AutoSugg... | Improve autocomplete UX
Hi,
IPython recently introduced hinted suggestions as input is being typed. The user can accept the suggestion by pressing END or RIGHT. Alternatively, the user can scroll through other prefix matches in the history by pressing UP (and DOWN). However, all these modes of navigation move the c... | I like this proposal, especially suggestions (1), (2), (3), (4).
Currently accepting word-by-word is possible using <kbd>Alt</kbd> + <kbd>f</kbd> shortcut (or <kbd>Esc</kbd> followed by <kbd>f</kbd>), but the behaviour could be improved and better documented. Currently the definition of "word" is very simplistic (ba... | 2023-02-05T22:56:36Z | 2023-02-13T09:29:11Z | ["IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=50)-:-:]", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[d-ef out(tag: str, n=50):-e]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def ou-t(tag: str, n=50):-t(]", "IPython/terminal/tests/test... | [] | ["IPython/terminal/tests/test_shortcuts.py::test_other_providers", "IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_with_filters", "IPython/terminal/tests/test_shortcuts.py::test_add_shortcut_for_new_command", "IPython/terminal/tests/test_shortcuts.py::test_add_shortcut_for_existing_command", "IPython/te... | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==22.2.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.18.2", "matplotlib-inline==0.1.6", "packaging==23.0", "parso==0.8.3", "pexpect==4.8.0", "pickles... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13888 | 5d26cb25bb454d538ebe9db77afd3661aed2a3c5 | diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml
index 52f3e79ab9c..c7fa22c7210 100644
--- a/.github/workflows/mypy.yml
+++ b/.github/workflows/mypy.yml
@@ -29,11 +29,13 @@ jobs:
pip install mypy pyflakes flake8
- name: Lint with mypy
run: |
+ set -e
mypy -p IPyt... | diff --git a/IPython/terminal/tests/test_shortcuts.py b/IPython/terminal/tests/test_shortcuts.py
new file mode 100644
index 00000000000..309205d4f54
--- /dev/null
+++ b/IPython/terminal/tests/test_shortcuts.py
@@ -0,0 +1,318 @@
+import pytest
+from IPython.terminal.shortcuts.auto_suggest import (
+ accept,
+ acce... | Improve autocomplete UX
Hi,
IPython recently introduced hinted suggestions as input is being typed. The user can accept the suggestion by pressing END or RIGHT. Alternatively, the user can scroll through other prefix matches in the history by pressing UP (and DOWN). However, all these modes of navigation move the c... | I like this proposal, especially suggestions (1), (2), (3), (4).
Currently accepting word-by-word is possible using <kbd>Alt</kbd> + <kbd>f</kbd> shortcut (or <kbd>Esc</kbd> followed by <kbd>f</kbd>), but the behaviour could be improved and better documented. Currently the definition of "word" is very simplistic (ba... | 2023-01-08T23:32:31Z | 2023-01-23T08:36:38Z | [] | [] | ["IPython/core/tests/test_magic.py::test_magic_parse_options", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_push_accepts_more3", "IPython/core/tests/test_inputtransformer.py::test_cellmagic", "IPython/core/tests/test_interactiveshell.py::test_run_cell_async", "IPython/utils/tests/test_path.py::... | ["IPython/core/tests/test_debugger.py::test_decorator_skip_with_breakpoint", "IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions Known failure on jedi<=0.18.0"] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==22.2.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.18.2", "matplotlib-inline==0.1.6", "packaging==23.0", "parso==0.8.3", "pexpect==4.8.0", "pickles... | null | ["pytest --tb=no -rA -p no:cacheprovider"] | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13848 | 3f0bf05f072a91b2a3042d23ce250e5e906183fd | diff --git a/setup.cfg b/setup.cfg
index 226506f08f0..769bfda14a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -105,12 +105,6 @@ IPython.core.tests = *.png, *.jpg, daft_extension/*.py
IPython.lib.tests = *.wav
IPython.testing.plugin = *.txt
-[options.entry_points]
-pygments.lexers =
- ipythonconsole = IPython.lib.l... | diff --git a/IPython/lib/tests/test_pygments.py b/IPython/lib/tests/test_pygments.py
new file mode 100644
index 00000000000..877b4221ffe
--- /dev/null
+++ b/IPython/lib/tests/test_pygments.py
@@ -0,0 +1,26 @@
+from typing import List
+
+import pytest
+import pygments.lexers
+import pygments.lexer
+
+from IPython.lib.le... | BUG: 8.7.0 removes `code-block:: ipython` pygment lexer support
Installed via pip / PyPI -- previously this RST worked:
```
.. code-block:: ipython
In [1]: %matplotlib qt
```
but now we get:
```
/home/circleci/project/doc/install/advanced.rst:33: WARNING: Pygments lexer name 'ipython' is not known
```
At... | I ran into the same problem. I think this is due to the Pygments entry points not being correctly installed with 8.6.0
Compare
```
Python 3.10.8 | packaged by conda-forge | (main, Nov 4 2022, 13:42:51) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.6.0 -- A... | 2022-12-01T13:24:40Z | 2022-12-21T11:19:53Z | [] | [] | ["IPython/lib/tests/test_pygments.py::test_pygments_entry_points[IPython console session]", "IPython/lib/tests/test_pygments.py::test_pygments_entry_points[IPython3]", "IPython/lib/tests/test_pygments.py::test_pygments_entry_points[IPython]"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==22.2.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==1.1.1", "jedi==0.18.2", "matplotlib-inline==0.1.6", "packaging==22.0", "parso==0.8.3", "pexpect==4.8.0", "pickles... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13825 | f3a9322efdbacc6cdb99b025574ff63cb3a0ebc8 | diff --git a/IPython/core/completer.py b/IPython/core/completer.py
index fc3aea7b611..25b780be3da 100644
--- a/IPython/core/completer.py
+++ b/IPython/core/completer.py
@@ -671,6 +671,19 @@ def __call__(self, context: CompletionContext) -> MatcherResult:
Matcher: TypeAlias = Union[MatcherAPIv1, MatcherAPIv2]
+def ... | diff --git a/IPython/core/tests/test_completer.py b/IPython/core/tests/test_completer.py
index fd72cf7d57a..98ec814a769 100644
--- a/IPython/core/tests/test_completer.py
+++ b/IPython/core/tests/test_completer.py
@@ -1396,6 +1396,65 @@ def configure(suppression_config):
configure({"b_matcher": True})
... | TypeError on completions using version "8.6.0"
I was using `IPCompleter.merge_completions = False` configuration, and after update to version `8.6.0` I got an error.
I created a fresh virtual environment:
```
poetry init
poetry add ipython
```
and still got the error:
```
Traceback (most recent call last):
... | 2022-11-11T20:23:20Z | 2022-11-16T16:09:09Z | ["IPython/core/tests/test_completer.py::TestCompleter::test_import_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_order", "IPython/core/tests/test_completer.py::TestCompleter::test_nes... | [] | ["IPython/core/tests/test_completer.py::TestCompleter::test_mix_terms", "IPython/core/tests/test_completer.py::TestCompleter::test_quoted_file_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression_with_jedi"] | ["IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions Known failure on jedi<=0.18.0"] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.1.0", "attrs==22.1.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==1.1.1", "jedi==0.18.1", "matplotlib-inline==0.1.6", "packaging==21.3", "parso==0.8.3", "pexpect==4.8.0", "pickles... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
ipython/ipython | ipython__ipython-13745 | ae0dfcd9d4fb221f0278f07b022f9837b0e51e67 | diff --git a/IPython/core/completer.py b/IPython/core/completer.py
index cffd0866f42..fc3aea7b611 100644
--- a/IPython/core/completer.py
+++ b/IPython/core/completer.py
@@ -100,6 +100,73 @@
Be sure to update :any:`jedi` to the latest stable version or to try the
current development version to get better completions... | diff --git a/IPython/core/tests/test_completer.py b/IPython/core/tests/test_completer.py
index 746a1e68261..fd72cf7d57a 100644
--- a/IPython/core/tests/test_completer.py
+++ b/IPython/core/tests/test_completer.py
@@ -24,6 +24,9 @@
provisionalcompleter,
match_dict_keys,
_deduplicate_completions,
+ comp... | Add completion type (_jupyter_types_experimental) for dictionary keys, file paths, etc
I would very much like the IPython to return completion type for all completions, not just for the completions from Jedi. This would not only make it possible to display the type ot the user in frontends, but also allow users to crea... | An alternative approach would be to modify the matcher functions to return either a string representing text (as today) or a (named) tuple (text, origin, type). This alternative has a benefit of allowing to return multiple types per matcher function, but this is not what most of the built-in matchers were designed for.... | 2022-09-05T06:47:45Z | 2022-10-05T10:35:44Z | [] | [] | ["IPython/core/tests/test_completer.py::TestCompleter::test_import_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_order", "IPython/core/tests/test_completer.py::TestCompleter::test_nes... | ["IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions Known failure on jedi<=0.18.0"] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.10", "pip_packages": ["asttokens==2.0.8", "attrs==22.1.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.1.0", "iniconfig==1.1.1", "jedi==0.18.1", "matplotlib-inline==0.1.6", "packaging==21.3", "parso==0.8.3", "pexpect==4.8.0", "pickles... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13730 | b9c796a6a3a32f510c235041813ccb904888f14a | diff --git a/IPython/terminal/shortcuts.py b/IPython/terminal/shortcuts.py
index 615397abc5f..6c1ba0418bc 100644
--- a/IPython/terminal/shortcuts.py
+++ b/IPython/terminal/shortcuts.py
@@ -32,6 +32,22 @@ def cursor_in_leading_ws():
return (not before) or before.isspace()
+# Needed for to accept autosuggestions... | diff --git a/IPython/tests/test_shortcuts.py b/IPython/tests/test_shortcuts.py
new file mode 100644
index 00000000000..42edb92ba58
--- /dev/null
+++ b/IPython/tests/test_shortcuts.py
@@ -0,0 +1,40 @@
+import pytest
+from IPython.terminal.shortcuts import _apply_autosuggest
+
+from unittest.mock import Mock
+
+
+def mak... | END key inserts autosuggestion in the middle of a line
Hitting END in the middle of a line inserts an autosuggestion at the cursor instead of the end of the line.
From a new IPython profile (hence ensuring no history), type these keystrokes:
```
123456789<Enter>
123456<End><Enter>
123456<Left arrow><Left arrow... | 2022-08-15T13:42:10Z | 2022-08-16T08:15:38Z | [] | [] | ["IPython/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456 \\n789-6-123456789-True]", "IPython/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456-6-123456789-True]", "IPython/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456-3-123456789-False]"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.10", "pip_packages": ["asttokens==2.0.8", "attrs==22.1.0", "backcall==0.2.0", "decorator==5.1.1", "executing==0.10.0", "iniconfig==1.1.1", "jedi==0.18.1", "matplotlib-inline==0.1.5", "packaging==21.3", "parso==0.8.3", "pexpect==4.8.0", "pickle... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
ipython/ipython | ipython__ipython-13625 | 4d73f5c6919c1140b0f908595728beddf97bb1df | diff --git a/IPython/core/inputtransformer.py b/IPython/core/inputtransformer.py
index f668f466aae..77f69f388f8 100644
--- a/IPython/core/inputtransformer.py
+++ b/IPython/core/inputtransformer.py
@@ -193,7 +193,7 @@ def assemble_logical_lines():
line = ''.join(parts)
# Utilities
-def _make_help_call(target... | diff --git a/IPython/core/tests/test_inputtransformer.py b/IPython/core/tests/test_inputtransformer.py
index 4de97b87cb8..bfc936d3176 100644
--- a/IPython/core/tests/test_inputtransformer.py
+++ b/IPython/core/tests/test_inputtransformer.py
@@ -59,108 +59,93 @@ def transform_checker(tests, transformer, **kwargs):
... | Transformer for `pinfo` line magic incorrectly sets next input when the line contains parentheses
In JupyterLab we experience an annoyance with pinfo magic which results in some expressions creating a new cell instead of providing help (https://github.com/jupyterlab/jupyterlab/issues/12269). The following example creat... | I think the reason for set_next_input is/was for the terminal as you can't (couldn't) easily edit your previous entry for multiline (which is now untrue for prompt toolkit. So I thik we can remove set_next_input. | 2022-04-05T12:28:09Z | 2022-04-05T13:05:01Z | ["IPython/core/tests/test_inputtransformer.py::test_classic_prompt", "IPython/core/tests/test_inputtransformer.py::test_cellmagic", "IPython/core/tests/test_inputtransformer2.py::test_find_magic_escape", "IPython/core/tests/test_inputtransformer.py::test_assemble_python_lines", "IPython/core/tests/test_inputtransformer... | [] | ["IPython/core/tests/test_inputtransformer2.py::test_transform_help", "IPython/core/tests/test_inputtransformer.py::test_help_end", "IPython/core/tests/test_inputtransformer2.py::test_side_effects_II"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no -rA --tb=no --durations=10\n\t-p IPython.testing.plugin.pytest_ipdoctest --ipdoctest-modules\n\t--ignore=docs\n\t--ignore=examples\n\t--ignore=htmlcov\n\t--ignore=ipython_kernel\n\t--ignore=ipyt... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-6072 | 95df3fd6495544eed7835fbf677069d401d3ed9d | diff --git a/news/6072.bugfix.rst b/news/6072.bugfix.rst
new file mode 100644
index 000000000..a62100343
--- /dev/null
+++ b/news/6072.bugfix.rst
@@ -0,0 +1,1 @@
+Remove logic that treats ``CI`` variable to use ``do_run_nt`` shell logic, as the original reasons for that patch were no longer valid.
diff --git a/pipenv/r... | diff --git a/tests/conftest.py b/tests/conftest.py
index 13778403e..fc75b6b57 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,14 +1,4 @@
import pytest
-import os
-
-# Note that we have to do this *before* `pipenv.environments` gets imported,
-# which is why we're doing it here as a side effect of importin... | Test suite immediately aborts with a successful exit code whenever a test that does a `pipenv run` executes
Check this out:
```python
$ time pytest
=============================================== test session starts ================================================
platform linux -- Python 3.8.10, pytest-6.2.5, py... | @jfly I haven't experienced this issue before in the last months of running pipenv tests locally on almost daily basis. Could you re-check this behavior with `pipenv==2022.4.21`?
@matteius that's because of [this workaround I added](https://github.com/pypa/pipenv/blob/114eb8f80a63e519fe9d12ac9e7cb60444cf47c0/tests/c... | 2024-01-30T19:47:26Z | 2024-02-01T02:40:52Z | ["tests/integration/test_run.py::test_env", "tests/integration/test_run.py::test_pipenv_run_pip_freeze_has_expected_output[True]", "tests/integration/test_run.py::test_scripts_resolve_dot_env_vars[False]", "tests/integration/test_run.py::test_scripts_resolve_dot_env_vars[True]", "tests/integration/test_run.py::test_scr... | [] | ["tests/integration/test_run.py::test_scripts", "tests/integration/test_run.py::test_pipenv_run_pip_freeze_has_expected_output[False]"] | [] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-6017 | acbcdcc14273ad55f31e0cd14309f0a8d3f5470b | diff --git a/news/6017.bugfix.rst b/news/6017.bugfix.rst
new file mode 100644
index 000000000..b13de4078
--- /dev/null
+++ b/news/6017.bugfix.rst
@@ -0,0 +1,1 @@
+Fix regression with path installs on most recent release ``2023.11.14``
diff --git a/pipenv/utils/dependencies.py b/pipenv/utils/dependencies.py
index 05cc9c... | diff --git a/tests/integration/test_install_twists.py b/tests/integration/test_install_twists.py
index 4bb250180..4979a06ef 100644
--- a/tests/integration/test_install_twists.py
+++ b/tests/integration/test_install_twists.py
@@ -7,6 +7,35 @@
from pipenv.utils.shell import temp_environ
+@pytest.mark.extras
+@pytest... | PosixPath' object has no attribute 'strip' since 2023.11.14 on Python 3.11.6
### Issue description
Starting with 2023.11.14 we get an error in pipenv in all our python builds (Linux on upstream python 3.11 container) and locally on Linux/Mac.
### Expected result
`pipenv install .` succeeds as in `2023.10.24`.
... | Will take a look tonight.
+1 getting the same error on Python 3.10.13 | 2023-11-15T22:58:01Z | 2023-11-15T23:31:00Z | ["tests/integration/test_install_twists.py::test_normalize_name_install", "tests/integration/test_install_twists.py::test_install_local_uri_special_character", "tests/integration/test_install_twists.py::test_local_extras_install", "tests/integration/test_install_twists.py::test_install_remote_wheel_file_with_extras"] | [] | ["tests/integration/test_install_twists.py::test_local_path_issue_6016"] | ["tests/integration/test_install_twists.py::test_multiple_editable_packages_should_not_race - assert 1 == 0", "tests/integration/test_install_twists.py::test_install_skip_lock - assert 1 == 0", "tests/integration/test_install_twists.py::test_local_tar_gz_file - assert 1 == 0", "tests/integration/test_install_twists.py:... | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-5826 | 549c6611c6d0a3943478064a1bd55ed3bde7075a | diff --git a/news/5722.feature.rst b/news/5722.feature.rst
new file mode 100644
index 0000000000..e4e835ec70
--- /dev/null
+++ b/news/5722.feature.rst
@@ -0,0 +1,1 @@
+The ``--categories`` option now works with requirements.txt file.
diff --git a/pipenv/routines/install.py b/pipenv/routines/install.py
index a411bfddb0.... | diff --git a/tests/integration/test_install_categories.py b/tests/integration/test_install_categories.py
index 9da45b051e..5d33fdf443 100644
--- a/tests/integration/test_install_categories.py
+++ b/tests/integration/test_install_categories.py
@@ -18,7 +18,29 @@ def test_basic_category_install(pipenv_instance_private_py... | Specifying categories when installing from a requirements.txt
I am converting an in-house python project to use pipenv.
We have 9 different requirements.txt depending on what stage of the build/testing we're at, each with a different name.
As such we're looking to use [categories](https://pipenv.pypa.io/en/latest... | It makes sense, I am just short on time to work on all these enhancement requests, so I am hoping that someone else will pick this one up since it seems straight forward.
No worries Matt! If I get some free time myself, I might have a looksie.
Hi, is this still open and if so can I work on this?
if yes, should I add a... | 2023-08-10T12:55:51Z | 2023-08-17T20:30:53Z | [] | [] | ["tests/integration/test_install_categories.py::test_basic_category_install_from_requirements", "tests/integration/test_install_categories.py::test_multiple_category_install_from_requirements"] | ["tests/integration/test_install_categories.py::test_basic_category_install - assert 1 == 0", "tests/integration/test_install_categories.py::test_multiple_category_install_proceeds_in_order_specified", "tests/integration/test_install_categories.py::test_multiple_category_install[prereq, other] - assert 1 == 0", "tests/... | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-5784 | 374b7064e3c3c5e8e2ea74bb21826988c063ea87 | diff --git a/news/5784.bugfix.rst b/news/5784.bugfix.rst
new file mode 100644
index 0000000000..eeb9a08dff
--- /dev/null
+++ b/news/5784.bugfix.rst
@@ -0,0 +1,1 @@
+Fix regressions in the ``requirements`` command related to standard index extras and handling of local file requirements.
diff --git a/pipenv/routines/requ... | diff --git a/tests/integration/test_requirements.py b/tests/integration/test_requirements.py
index ed957e892a..94a98530f1 100644
--- a/tests/integration/test_requirements.py
+++ b/tests/integration/test_requirements.py
@@ -3,7 +3,7 @@
import pytest
from pipenv.utils.shell import temp_environ
-
+from pipenv.routines... | Pipenv requirements has problem with packages from files
### Issue description
Command `pipenv requirements` doesn't respect package with source from file. The following example shows a Pipfile where we try to install the package `https://gitlab.com/eVotUM/Cripto-py/-/archive/develop/Cripto-py-develop.zip`.
### E... | I can confirm this is an issue.
From what I can tell it was introduced in `2023.7.1`, more specifically https://github.com/pypa/pipenv/pull/5757.
I can't tell if this is intended as per that PR, but it doesn't look like it.
In my case, I have the following in my `Pipfile`:
`dc-django-utils = {file = "https:... | 2023-07-07T03:28:43Z | 2023-07-09T09:14:52Z | ["tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_multiple_sources", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_from_categ... | [] | ["tests/integration/test_requirements.py::test_requirements_from_deps[deps1-True-True-expected1]", "tests/integration/test_requirements.py::test_requirements_from_deps[deps0-True-True-expected0]", "tests/integration/test_requirements.py::test_requirements_from_deps[deps2-True-True-expected2]"] | [] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-5765 | 2e913386cc8ee781f7e902139c95ffc4c99243b9 | diff --git a/news/5765.bugfix.rst b/news/5765.bugfix.rst
new file mode 100644
index 0000000000..06c57c4b47
--- /dev/null
+++ b/news/5765.bugfix.rst
@@ -0,0 +1,1 @@
+Fixes regression on Pipfile requirements syntax. Ensure default operator is provided to requirement lib to avoid crash.
diff --git a/pipenv/vendor/requirem... | diff --git a/tests/integration/test_install_basic.py b/tests/integration/test_install_basic.py
index 54bf7e8e56..cbbf052c29 100644
--- a/tests/integration/test_install_basic.py
+++ b/tests/integration/test_install_basic.py
@@ -90,6 +90,22 @@ def test_install_without_dev(pipenv_instance_private_pypi):
assert c.... | Default specifier operator regression from v2023.6.18
### Issue description
Describe the issue briefly here.
Look like requirement lib update change the format expected in a Pipfile to specify version requirements
### Expected result
Expecting `package = "X.Y.Z"` to be a valid spec
### Actual result
... | You are probably right, this is likely a regression. If you see where to patch requirementslib or pipenv for this issue feel free to open a PR against pipenv and we can handle porting the fix over to reqlib -- otherwise I will look into it when I can get some more time. | 2023-06-30T18:14:50Z | 2023-07-04T20:43:45Z | ["tests/integration/test_install_basic.py::test_install_creates_pipfile", "tests/integration/test_install_basic.py::test_basic_dev_install", "tests/integration/test_install_basic.py::test_editable_no_args", "tests/integration/test_install_basic.py::test_install_does_not_exclude_packaging", "tests/integration/test_insta... | [] | ["tests/integration/test_install_basic.py::test_install_with_version_req_default_operator"] | ["tests/integration/test_install_basic.py::test_basic_install - assert 1 == 0", "tests/integration/test_install_basic.py::test_system_and_deploy_work - assert 1 == 0", "tests/integration/test_install_basic.py::test_extras_install - assert 1 == 0", "tests/integration/test_install_basic.py::test_requirements_to_pipfile -... | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-5778 | 2e913386cc8ee781f7e902139c95ffc4c99243b9 | diff --git a/news/5777.bugfix.rst b/news/5777.bugfix.rst
new file mode 100644
index 0000000000..8ad522f389
--- /dev/null
+++ b/news/5777.bugfix.rst
@@ -0,0 +1,1 @@
+Ensure hashes included in a generated requirements file are after any markers.
diff --git a/pipenv/routines/requirements.py b/pipenv/routines/requirements.... | diff --git a/tests/integration/test_requirements.py b/tests/integration/test_requirements.py
index 00fe63437e..ed957e892a 100644
--- a/tests/integration/test_requirements.py
+++ b/tests/integration/test_requirements.py
@@ -192,6 +192,33 @@ def test_requirements_markers_get_excluded(pipenv_instance_pypi):
asser... | Requirements output different since 2023.7.1 causing pip install issues
### Issue description
The output of `pipenv requirements --hash` has changed slightly in `2023.7.1` (#5757) and `pip` appears to be sensitive to it in some scenarios, causing `pip` to be unable to install the package(s) from the generated requir... | 2023-07-04T00:22:16Z | 2023-07-04T01:53:46Z | ["tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_multiple_sources", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_from_categ... | [] | ["tests/integration/test_requirements.py::test_requirements_hashes_get_included", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_without_env_var_expansion"] | [] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
pypa/pipenv | pypa__pipenv-5757 | 7c3f6866a3c9676f79a9388014869b07cd8279cc | diff --git a/news/5755.bugfix.rst b/news/5755.bugfix.rst
new file mode 100644
index 0000000000..6cbf807c8b
--- /dev/null
+++ b/news/5755.bugfix.rst
@@ -0,0 +1,1 @@
+Fix regression in ``requirements`` command that was causing package installs after upgrade to ``requirementslib==3.0.0``.
diff --git a/pipenv/cli/command.p... | diff --git a/tests/integration/test_requirements.py b/tests/integration/test_requirements.py
index fb0a8b0c3b..9ffad56b04 100644
--- a/tests/integration/test_requirements.py
+++ b/tests/integration/test_requirements.py
@@ -163,7 +163,7 @@ def test_requirements_markers_get_included(pipenv_instance_pypi):
c = ... | `pipenv requirements` now requiring installation of VCS modules
### Issue description
This is less a "bug" per se, but it is absolutely a change in behavior that was not marked in the release notes, so I'm not sure if it was intended or not. Also, it's not clear *why* `pipenv requirements` needs to install via VCS, ... | This was a side-effect in my larger refactor of requirementslib to version 3.0.0 -- while the goal was to migrate away from attrs to pydantic, I encountered some weird behaviors with some of the prior requirementslib code. The problem here is the requirementslib method is used to just go with the name `pyjwt` from you... | 2023-06-28T12:41:36Z | 2023-06-30T03:52:19Z | ["tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_from_categories", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile", "tests/integration/test_requirements.py::test_requirements_markers_get_excluded", "tests/integration/test_r... | [] | ["tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_without_env_var_expansion", "tests/integration/test_requirements.py::test_requirements_markers_get_included"] | [] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/bandersnatch | pypa__bandersnatch-1765 | ee74573c12cbed7941efaae038a0055ecff4d15d | diff --git a/CHANGES.md b/CHANGES.md
index 6973aa850..c42e6924c 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -9,13 +9,14 @@
- Move Docker images to 3.12 (PR #1733)
- Removing swift builds due to lack or assistance - Happy to bring back if you're willing to help maintian
- Move black, mypy + pyupgrade to >= 3.11 cod... | diff --git a/src/bandersnatch/tests/test_configuration.py b/src/bandersnatch/tests/test_configuration.py
index 900574144..b4969b96a 100644
--- a/src/bandersnatch/tests/test_configuration.py
+++ b/src/bandersnatch/tests/test_configuration.py
@@ -59,6 +59,7 @@ def test_single_config__default__mirror__setting_attributes(s... | Add config/CLI arg to override https:// check for local mirrors (development)
When attempting to run a banderstnatch mirror against a locally-running index on port 80, a an exception is raised.
https://github.com/pypa/bandersnatch/blob/131438f40536c83c5074af90e2e337dfdadffebb/src/bandersnatch/master.py#L50-L53
Feat... | 2024-07-02T17:27:32Z | 2024-07-05T15:33:33Z | ["src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_invalid_diff_file_reference_throws_exception", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config_custom_setting_boolean", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_conf... | [] | ["src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config__default__mirror__setting_attributes", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_values_release_files_false_sets_root_uri"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nlog_cli_level = DEBUG\nlog_level = DEBUG\nasyncio_mode = strict\nnorecursedirs = src/bandersnatch_docker_compose\nmarkers = \n\ts3: mark tests that require an S3/MinIO bucket\naddopts = --color=no -rA --tb=no -p no:cachepro... | tox -e py3 -- | null | null | null | swa-bench:sw.eval | |
pypa/bandersnatch | pypa__bandersnatch-1740 | 1561917a21d691b8dd482236a62441b5db0b6926 | diff --git a/CHANGES.md b/CHANGES.md
index 63fb44432..0a0833305 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -17,6 +17,7 @@
- Fix config file value interpolation for the `diff-file` option `PR #1715`
- Fix diff-file being created when the option wasn't set `PR #1716`
+- Provide default values for most config options... | diff --git a/src/bandersnatch/tests/mock_config.py b/src/bandersnatch/tests/mock_config.py
index b9830aecb..0db5c707b 100644
--- a/src/bandersnatch/tests/mock_config.py
+++ b/src/bandersnatch/tests/mock_config.py
@@ -3,13 +3,18 @@
def mock_config(contents: str, filename: str = "test.conf") -> BandersnatchConfig:
... | Many options do not have a configured fallback value even if the documentation says so
**What's the issue:**
Some of the configurable knobs don't actually have a fallback value defined even though the documentation explicitly states these values do have a default. Case in point, let's take a gander at the `[mirror].... | The quoting of default refers to the [default.conf](https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/default.conf) file have in the repo for people to use to get started.
I just hit this same issue — I wrote a config file from scratch based on the documentation, and was surprised to find that "the defaul... | 2024-05-27T20:47:16Z | 2024-05-29T00:42:40Z | ["src/bandersnatch/tests/test_main.py::test_main_create_config", "src/bandersnatch/tests/test_simple.py::test_json_package_page", "src/bandersnatch/tests/test_mirror.py::test_limit_workers", "src/bandersnatch/tests/test_main.py::test_main_reads_custom_config_values", "src/bandersnatch/tests/test_configuration.py::TestB... | [] | ["src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_delete_file", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_multiple_instances_custom_setting_str", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_read_file... | ["src/bandersnatch/tests/test_mirror.py::test_package_sync_downloads_release_file", "src/bandersnatch/tests/test_mirror.py::test_package_sync_does_not_touch_existing_local_file", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_copy_file", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_... | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nlog_cli_level = DEBUG\nlog_level = DEBUG\nasyncio_mode = strict\nnorecursedirs = src/bandersnatch_docker_compose\nmarkers = \n\ts3: mark tests that require an S3/MinIO bucket\naddopts = --color=no -rA --tb=no -p no:cachepro... | tox -e py3 -- | null | null | null | swa-bench:sw.eval |
pypa/bandersnatch | pypa__bandersnatch-1557 | 963f9ef61500b5794006bc5029cfc89a84b8e76a | diff --git a/CHANGES.md b/CHANGES.md
index 0776235f5..fb6e904d6 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,6 @@
# 6.4.0 (Unreleased)
+- Move JSON Simple API to version 1.1 (as per PEP700) `PR #1557`
- Move to >= 3.10 project `PR #1457`
## Bug Fixes
diff --git a/src/bandersnatch/default.conf b/src/bander... | diff --git a/src/bandersnatch/tests/test_simple.py b/src/bandersnatch/tests/test_simple.py
index 997253099..039ee81b9 100644
--- a/src/bandersnatch/tests/test_simple.py
+++ b/src/bandersnatch/tests/test_simple.py
@@ -18,8 +18,8 @@
from bandersnatch.storage import Storage
from bandersnatch.tests.test_simple_fixtures i... | Ensure bandersnatch implements pep700 fields
https://peps.python.org/pep-0700/
- The api-version must specify version 1.1 or later.
- A new versions key is added at the top level.
- Two new “file information” keys, size and upload-time, are added to the files data.
Keys (at any level) with a leading underscore are re... | 2023-09-23T02:03:32Z | 2023-09-26T02:11:15Z | ["src/bandersnatch/tests/test_simple.py::test_format_invalid", "src/bandersnatch/tests/test_simple.py::test_digest_invalid", "src/bandersnatch/tests/test_simple.py::test_digest_valid", "src/bandersnatch/tests/test_simple.py::test_format_valid"] | [] | ["src/bandersnatch/tests/test_simple.py::test_json_index_page", "src/bandersnatch/tests/test_simple.py::test_json_package_page", "src/bandersnatch/tests/test_simple.py::test_digest_config_default"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nlog_cli_level = DEBUG\nlog_level = DEBUG\nasyncio_mode = strict\nnorecursedirs = src/bandersnatch_docker_compose\nmarkers = \n\ts3: mark tests that require an S3/MinIO bucket\naddopts = --color=no -rA --tb=no -p no:cachepro... | tox -e py3 -- | null | null | null | swa-bench:sw.eval | |
pypa/bandersnatch | pypa__bandersnatch-1495 | 052f1b2c5bcb775baeffe53703a95cc657eed469 | diff --git a/CHANGES.md b/CHANGES.md
index fc57d8147..0776235f5 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,10 @@
- Move to >= 3.10 project `PR #1457`
+## Bug Fixes
+
+- Support `py2` + `py3` bdist file name filtering `PR #1495`
+
# 6.3.0
## Bug Fixes
diff --git a/src/bandersnatch_filter_plugins/filena... | diff --git a/src/bandersnatch/tests/plugins/test_filename.py b/src/bandersnatch/tests/plugins/test_filename.py
index 15d48b407..fa960c1aa 100644
--- a/src/bandersnatch/tests/plugins/test_filename.py
+++ b/src/bandersnatch/tests/plugins/test_filename.py
@@ -40,6 +40,7 @@ class TestExcludePlatformFilter(BasePluginTestCas... | Sync only python 2 packages
I'm trying to sync only packages compatible with Python 2 but it's not working
```
[mirror]
directory = /data/MINI_PYPI/bandersnatch/packages/
master = https://pypi.org
timeout = 20
workers = 3
hash-index = false
stop-on-error = false
json = true
[plugins]
enabled =
... | What is happening? I'm guessing it's downloading lots of python3 only packages you don't want? Describing that is always an advantage when you open an issue to help people find the bug / config error. Attaching run logs is always super helpful too.
I always recommend using as little plugins as possible, as there is ... | 2023-07-12T21:13:56Z | 2023-07-12T22:43:28Z | ["src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_delete_file", "src/bandersnatch/tests/plugins/test_filename.py::TestExcludePlatformFilter::test_plugin_compiles_patterns", "src/bandersnatch/tests/test_mirror.py::test_package_sync_downloads_release_file", "src/bandersnatch/test... | [] | ["src/bandersnatch/tests/plugins/test_filename.py::TestExcludePlatformFilter::test_exclude_platform"] | ["src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_copy_file", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_scandir", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_mkdir_rmdir", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_path_glob", "src/bandersnat... | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nlog_cli_level = DEBUG\nlog_level = DEBUG\nasyncio_mode = strict\nnorecursedirs = src/bandersnatch_docker_compose\nmarkers = \n\ts3: mark tests that require an S3/MinIO bucket\naddopts = --color=no -rA --tb=no -p no:cachepro... | null | ["tox -e py3"] | null | null | swa-bench:sw.eval |
pypa/bandersnatch | pypa__bandersnatch-1248 | 9ac0603304f534feffd9a4fe3a766a10a44cc7ce | diff --git a/CHANGES.md b/CHANGES.md
index 4a181b733..059aac7ed 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -4,6 +4,7 @@
## Bug Fixes
+- Fixed JSON only mirroring adding correct path to diff_file_list `PR #1248`
- Fixed requirements file parsing when it contains pip options `PR #1231`
## New Features
diff --gi... | diff --git a/src/bandersnatch/tests/test_mirror.py b/src/bandersnatch/tests/test_mirror.py
index ec257e5af..0c16b5b41 100644
--- a/src/bandersnatch/tests/test_mirror.py
+++ b/src/bandersnatch/tests/test_mirror.py
@@ -14,6 +14,7 @@
from bandersnatch.master import Master
from bandersnatch.mirror import BandersnatchMirr... | Errors when using `simple-format = JSON`
Hello,
When using the `simple-format = JSON' option, bandersnatch 6.0.0 crashes when downloading package.
The error come from [the write_simple_page function](https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/mirror.py#L712):
If `content.html` does not evalua... | 2022-10-11T21:46:36Z | 2022-10-24T10:33:26Z | ["src/bandersnatch/tests/test_mirror.py::test_mirror_empty_resume_from_todo_list", "src/bandersnatch/tests/test_mirror.py::test_mirror_generation_4_resets_status_files", "src/bandersnatch/tests/test_mirror.py::test_package_sync_downloads_release_file", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_do... | [] | ["src/bandersnatch/tests/test_mirror.py::test_write_simple_pages", "src/bandersnatch/tests/test_mirror.py::test_determine_packages_to_sync"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nlog_cli_level = DEBUG\nlog_level = DEBUG\nasyncio_mode = strict\nnorecursedirs = src/bandersnatch_docker_compose\nmarkers = \n\ts3: mark tests that require an S3/MinIO bucket\naddopts = --color=no -rA --tb=no -p no:cachepro... | tox -e py3 -- | null | null | null | swa-bench:sw.eval | |
streamlink/streamlink | streamlink__streamlink-6127 | 903cd93a43163bd69c84fbdfc33ff8f25e2fdeeb | diff --git a/src/streamlink/plugins/nicolive.py b/src/streamlink/plugins/nicolive.py
index 514114638bb..45596cc6ffe 100644
--- a/src/streamlink/plugins/nicolive.py
+++ b/src/streamlink/plugins/nicolive.py
@@ -116,9 +116,9 @@ def set_wsclient(self, wsclient: NicoLiveWsClient):
self.wsclient = wsclient
-@plu... | diff --git a/tests/plugins/test_nicolive.py b/tests/plugins/test_nicolive.py
index 9e4b8eb03ac..6be23fa00d1 100644
--- a/tests/plugins/test_nicolive.py
+++ b/tests/plugins/test_nicolive.py
@@ -10,12 +10,12 @@ class TestPluginCanHandleUrlNicoLive(PluginCanHandleUrl):
__plugin__ = NicoLive
should_match = [
- ... | plugins.nicolive: Community has been deprecated
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/stream... | 2024-08-12T10:07:55Z | 2024-08-12T10:10:47Z | ["tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_all_matchers_match[#0]", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_negative[https://example.com/index.html]", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_negative[http://e... | [] | ["tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_positive_unnamed[https://live.nicovideo.jp/watch/user/789]", "tests/plugins/test_nicolive.py::TestNicoLiveArguments::test_timeshift_offset[123.45]"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==24.2.0", "babel==2.16.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.7.4", "charset-normalizer==3.3.2", "coverage==7.6.1", "docutils==0.21.2", "docutils-stubs==... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
streamlink/streamlink | streamlink__streamlink-6111 | bb070a7d912866805fad67482b1a029908e0eab4 | diff --git a/src/streamlink/plugin/api/aws_waf.py b/src/streamlink/plugin/api/aws_waf.py
index d9594dce920..fd7e84f413c 100644
--- a/src/streamlink/plugin/api/aws_waf.py
+++ b/src/streamlink/plugin/api/aws_waf.py
@@ -24,9 +24,8 @@ class AWSWAF:
TOKEN = "aws-waf-token"
EXPIRATION = 3600 * 24 * 4
- def __i... | diff --git a/tests/webbrowser/test_chromium.py b/tests/webbrowser/test_chromium.py
index cacece5828e..e516c813fec 100644
--- a/tests/webbrowser/test_chromium.py
+++ b/tests/webbrowser/test_chromium.py
@@ -11,6 +11,7 @@
from streamlink.compat import is_win32
from streamlink.exceptions import PluginError
from streamli... | webbrowser: Cloak headless Chrome user agent string
### Checklist
- [X] This is a feature request and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contr... | 2024-08-04T11:06:58Z | 2024-08-04T13:38:00Z | ["tests/webbrowser/test_chromium.py::test_get_websocket_address[Success-IPv4]", "tests/webbrowser/test_chromium.py::test_launch[1234-::1]", "tests/webbrowser/test_chromium.py::TestLaunchArgs::test_launch_args", "tests/webbrowser/test_chromium.py::TestInit::test_resolve_executable[Success with custom path]", "tests/webb... | [] | ["tests/webbrowser/test_chromium.py::test_get_websocket_address[Timeout/Failure-IPv6]", "tests/webbrowser/test_chromium.py::TestLaunchArgs::test_headless[True]"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==24.1.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.7.4", "charset-normalizer==3.3.2", "coverage==7.6.1", "docutils==0.21.2", "docutils-stubs==... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
streamlink/streamlink | streamlink__streamlink-6085 | ab30b0cfb12a1822b572cdff69a1633c21730031 | diff --git a/src/streamlink/plugins/okru.py b/src/streamlink/plugins/okru.py
index 78e9587b39f..2c1dceb87ca 100644
--- a/src/streamlink/plugins/okru.py
+++ b/src/streamlink/plugins/okru.py
@@ -22,8 +22,14 @@
log = logging.getLogger(__name__)
-@pluginmatcher(re.compile(r"https?://(?:www\.)?ok\.ru/"))
-@pluginmatche... | diff --git a/tests/plugins/test_okru.py b/tests/plugins/test_okru.py
index aa28f2a885e..d2f4c278e8b 100644
--- a/tests/plugins/test_okru.py
+++ b/tests/plugins/test_okru.py
@@ -6,10 +6,10 @@ class TestPluginCanHandleUrlOKru(PluginCanHandleUrl):
__plugin__ = OKru
should_match = [
- "http://ok.ru/live/... | plugins.okru: Unable to validate value of key 'author'
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/st... | 2024-07-17T12:48:31Z | 2024-07-17T12:52:08Z | ["tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_class_name", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_class_setup", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_url_matches_negative[https://example.com/]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test... | [] | ["tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_all_matchers_match[mobile]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_all_named_matchers_have_tests[mobile]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_all_matchers_match[default]", "tests/plugins/test_okru.py::TestP... | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.7.4", "charset-normalizer==3.3.2", "coverage==7.6.0", "docutils==0.21.2", "docutils-stubs==... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
streamlink/streamlink | streamlink__streamlink-6073 | 7d641b261c81caab496f0af7d2cb5215a9cdf6be | diff --git a/src/streamlink/plugins/tiktok.py b/src/streamlink/plugins/tiktok.py
new file mode 100644
index 00000000000..c5d467c326b
--- /dev/null
+++ b/src/streamlink/plugins/tiktok.py
@@ -0,0 +1,124 @@
+"""
+$description TikTok is a short-form video hosting service owned by ByteDance.
+$url www.tiktok.com
+$type live... | diff --git a/tests/plugins/test_tiktok.py b/tests/plugins/test_tiktok.py
new file mode 100644
index 00000000000..64a02075fa0
--- /dev/null
+++ b/tests/plugins/test_tiktok.py
@@ -0,0 +1,16 @@
+from streamlink.plugins.tiktok import TikTok
+from tests.plugins import PluginCanHandleUrl
+
+
+class TestPluginCanHandleUrlTikT... | tiktok support
### Checklist
- [X] This is a plugin request and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have chec... | 2024-07-08T12:29:02Z | 2024-07-08T22:18:06Z | [] | [] | ["tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_url_matches_groups_unnamed[URL=https://www.tiktok.com/@CHANNEL/live GROUPS={'channel': 'CHANNEL'}]", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_url_matches_negative[https://example.com/]", "tests/plugins/test_tiktok.py::TestPlugin... | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.7.4", "charset-normalizer==3.3.2", "coverage==7.5.4", "docutils==0.21.2", "docutils-stubs==... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
streamlink/streamlink | streamlink__streamlink-6059 | 6d953efb7f9c2012c497f9f3059117c3bcfd07be | diff --git a/src/streamlink/plugins/douyin.py b/src/streamlink/plugins/douyin.py
new file mode 100644
index 00000000000..b0afc9d275e
--- /dev/null
+++ b/src/streamlink/plugins/douyin.py
@@ -0,0 +1,153 @@
+"""
+$description Chinese live-streaming platform owned by ByteDance.
+$url live.douyin.com
+$type live
+$metadata ... | diff --git a/tests/plugins/test_douyin.py b/tests/plugins/test_douyin.py
new file mode 100644
index 00000000000..2315d207ca1
--- /dev/null
+++ b/tests/plugins/test_douyin.py
@@ -0,0 +1,14 @@
+from streamlink.plugins.douyin import Douyin
+from tests.plugins import PluginCanHandleUrl
+
+
+class TestPluginCanHandleUrlDouy... | douyin support
### Checklist
- [X] This is a plugin request and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have chec... | 2024-07-02T09:11:07Z | 2024-07-03T14:41:55Z | [] | [] | ["tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_url_matches_positive_unnamed[https://live.douyin.com/ROOM_ID]", "tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_all_matchers_match[#0]", "tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_url_matches_negative[https://liv... | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.6.2", "charset-normalizer==3.3.2", "coverage==7.5.4", "docutils==0.21.2", "docutils-stubs==... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
streamlink/streamlink | streamlink__streamlink-6048 | 97d8e6d81433a5077fcd622ec16d40e587e937f1 | diff --git a/src/streamlink/plugins/pluzz.py b/src/streamlink/plugins/pluzz.py
index ce8de45f0e5..4b7c6efd206 100644
--- a/src/streamlink/plugins/pluzz.py
+++ b/src/streamlink/plugins/pluzz.py
@@ -16,23 +16,23 @@
from streamlink.stream.dash import DASHStream
from streamlink.stream.hls import HLSStream
from streamlin... | diff --git a/tests/plugins/test_pluzz.py b/tests/plugins/test_pluzz.py
index f1e2e4ce29c..b5e47915ca4 100644
--- a/tests/plugins/test_pluzz.py
+++ b/tests/plugins/test_pluzz.py
@@ -6,17 +6,31 @@ class TestPluginCanHandleUrlPluzz(PluginCanHandleUrl):
__plugin__ = Pluzz
should_match = [
- "https://www.... | plugins.pluzz: live or replay from francetv doesn't work anymore
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/str... | Perhaps related to this issue https://github.com/yt-dlp/yt-dlp/issues/10197
The workaround given in the issue seems to work for `yt-dlp` but not for `streamlink`:
```
python3 -m pip install -U --pre "yt-dlp[default]"
```
_Originally posted by @bashonly in https://github.com/yt-dlp/yt-dlp/issues/10197#issueco... | 2024-06-22T15:30:06Z | 2024-06-23T15:59:12Z | ["tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_negative[https://example.com/]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_class_setup", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_negative[http://example.com/]", "tests/plugins/test_pluz... | [] | ["tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_all_named_matchers_have_tests[francetv]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_all_named_matchers_have_tests[francetvinfofr]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_all_matchers_match[francetv]", "tests... | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.6.2", "charset-normalizer==3.3.2", "coverage==7.5.4", "docutils==0.21.2", "docutils-stubs==... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
streamlink/streamlink | streamlink__streamlink-6022 | 97d8e6d81433a5077fcd622ec16d40e587e937f1 | diff --git a/src/streamlink/plugins/twitch.py b/src/streamlink/plugins/twitch.py
index 7ae078e9ad5..06278b094d4 100644
--- a/src/streamlink/plugins/twitch.py
+++ b/src/streamlink/plugins/twitch.py
@@ -71,26 +71,45 @@ class TwitchM3U8Parser(M3U8Parser[TwitchM3U8, TwitchHLSSegment, HLSPlaylist]):
__m3u8__: ClassVar[... | diff --git a/tests/plugins/test_twitch.py b/tests/plugins/test_twitch.py
index e8997dbbc22..00bdd0237cf 100644
--- a/tests/plugins/test_twitch.py
+++ b/tests/plugins/test_twitch.py
@@ -363,6 +363,7 @@ def test_hls_low_latency_has_prefetch_disable_ads_no_preroll_with_prefetch_ads(s
Tag("EXT-X-DISCONTINUITY"... | plugins.twitch: incorrect discontinuity tags lead to warnings being spammed
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://git... | This has nothing to do with Twitch. It's a bug in the HLS implementation which warns when there's a stream discontinuity, which is not supported by Streamlink, as two different bitstreams are concatenated. This happens during ad transitions. The warning however is not supposed to be written to the log output every time... | 2024-06-05T19:14:35Z | 2024-06-23T15:58:14Z | ["tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://www.twitch.tv/dota2ti/video/]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_no_low_latency_has_prefetch", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=vod... | [] | ["tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_ignored_discontinuity", "tests/plugins/test_twitch.py::TestTwitchMetadata::test_metadata_clip_no_data[False-https://clips.twitch.tv/foo]"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.6.2", "charset-normalizer==3.3.2", "coverage==7.5.4", "docutils==0.21.2", "docutils-stubs==... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
streamlink/streamlink | streamlink__streamlink-6029 | 7780833480fc25350a5ed84eae64d65ed9e91706 | diff --git a/src/streamlink/plugins/cnbce.py b/src/streamlink/plugins/cnbce.py
new file mode 100644
index 00000000000..3ab158b3ae5
--- /dev/null
+++ b/src/streamlink/plugins/cnbce.py
@@ -0,0 +1,38 @@
+"""
+$description Turkish live TV channel owned by NBCUniversal Media.
+$url cnbce.com
+$type live
+$region Turkey
+"""... | diff --git a/tests/plugins/test_cnbce.py b/tests/plugins/test_cnbce.py
new file mode 100644
index 00000000000..10fd4205fe0
--- /dev/null
+++ b/tests/plugins/test_cnbce.py
@@ -0,0 +1,10 @@
+from streamlink.plugins.cnbce import CNBCE
+from tests.plugins import PluginCanHandleUrl
+
+
+class TestPluginCanHandleUrlCNBCE(Plu... | cnbce.com / ercdn.net
### Checklist
- [X] This is a plugin request and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I ha... | 2024-06-11T12:54:16Z | 2024-06-13T18:50:53Z | [] | [] | ["tests/plugins/test_cnbce.py::TestPluginCanHandleUrlCNBCE::test_class_setup", "tests/plugins/test_cnbce.py::TestPluginCanHandleUrlCNBCE::test_url_matches_positive_unnamed[https://www.cnbce.com/canli-yayin]", "tests/plugins/test_cnbce.py::TestPluginCanHandleUrlCNBCE::test_url_matches_negative[http://example.com/]", "te... | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.6.2", "charset-normalizer==3.3.2", "coverage==7.5.3", "docutils==0.21.2", "docutils-stubs==... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.