dyyyyyyyy/swe-rebench-filtered-1150 huggingface dataset:
task: metadata: install: pip install -e .[dev]
patch: diff --git a/pre_commit/meta_hooks/check_useless_excludes.py b/pre_commit/meta_hooks/check_useless_excludes.py
index 12be03f..6116597 100644
--- a/pre_commit/meta_hooks/check_useless_excludes.py
+++ b/pre_commit/meta_hooks/check_useless_excludes.py
@@ -43,6 +43,9 @@ def check_useless_excludes(config_file: str) -> int:
 
     for repo in config['repos']:
         for hook in repo['hooks']:
+            # the default of manifest hooks is `types: [file]` but we may
+            # be configuring a symlink hook while there's a broken symlink
+            hook.setdefault('types', [])
             # Not actually a manifest dict, but this more accurately reflects
             # the defaults applied during runtime
             hook = apply_defaults(hook, MANIFEST_HOOK_DICT)

problem_statement: `check-useless-excludes` meta hook doesn't seem to work well with broken symlinks
Repro steps
1. Add a submodule
2. Add a symlink to somewhere inside this submodule
3. Use `check-symlinks`
4. Deinit submodule (to simulate the case when people clone without `--recursive`)
4. Notice that it now complains about the symlink created on 2
5. Add an exclude entry with the path to that symlink
6. Use `check-useless-excludes`
7. Notice that it complains that the added exclude entry doesn't apply.

For a working example, check out https://github.com/pkoch/test-check-useless-excludes (without `--recursive`, or run `git submodule deinit --all`) and run `pre-commit run --all`.
repo: pre-commit/pre-commit
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/meta_hooks/check_useless_excludes_test.py b/tests/meta_hooks/check_useless_excludes_test.py
index d261e81..703bd25 100644
--- a/tests/meta_hooks/check_useless_excludes_test.py
+++ b/tests/meta_hooks/check_useless_excludes_test.py
@@ -1,5 +1,10 @@
+from pre_commit import git
 from pre_commit.meta_hooks import check_useless_excludes
+from pre_commit.util import cmd_output
 from testing.fixtures import add_config_to_repo
+from testing.fixtures import make_config_from_repo
+from testing.fixtures import make_repo
+from testing.util import xfailif_windows
 
 
 def test_useless_exclude_global(capsys, in_git_dir):
@@ -113,3 +118,20 @@ def test_valid_exclude(capsys, in_git_dir):
 
     out, _ = capsys.readouterr()
     assert out == ''
+
+
+@xfailif_windows  # pragma: win32 no cover
+def test_useless_excludes_broken_symlink(capsys, in_git_dir, tempdir_factory):
+    path = make_repo(tempdir_factory, 'script_hooks_repo')
+    config = make_config_from_repo(path)
+    config['hooks'][0]['exclude'] = 'broken-symlink'
+    add_config_to_repo(in_git_dir.strpath, config)
+
+    in_git_dir.join('broken-symlink').mksymlinkto('DNE')
+    cmd_output('git', 'add', 'broken-symlink')
+    git.commit()
+
+    assert check_useless_excludes.main(('.pre-commit-config.yaml',)) == 0
+
+    out, _ = capsys.readouterr()
+    assert out == ''
task: metadata: install: pip install -e .[dev]
patch: diff --git a/pre_commit/resources/hook-tmpl b/pre_commit/resources/hook-tmpl
index cb25ec5..f455ca3 100755
--- a/pre_commit/resources/hook-tmpl
+++ b/pre_commit/resources/hook-tmpl
@@ -123,14 +123,15 @@ def _pre_push(stdin):
         elif remote_sha != Z40 and _rev_exists(remote_sha):
             opts = ('--origin', local_sha, '--source', remote_sha)
         else:
-            # First ancestor not found in remote
-            first_ancestor = subprocess.check_output((
-                'git', 'rev-list', '--max-count=1', '--topo-order',
-                '--reverse', local_sha, '--not', '--remotes={}'.format(remote),
+            # ancestors not found in remote
+            ancestors = subprocess.check_output((
+                'git', 'rev-list', local_sha, '--topo-order', '--reverse',
+                '--not', '--remotes={}'.format(remote),
             )).decode().strip()
-            if not first_ancestor:
+            if not ancestors:
                 continue
             else:
+                first_ancestor = ancestors.splitlines()[0]
                 cmd = ('git', 'rev-list', '--max-parents=0', local_sha)
                 roots = set(subprocess.check_output(cmd).decode().splitlines())
                 if first_ancestor in roots:

problem_statement: Pre-push not getting all relevant files
I seem to experiencing the case where the list of files passed to my hooks pre-push are only from the most recent commit.
repo: pre-commit/pre-commit
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/commands/install_uninstall_test.py b/tests/commands/install_uninstall_test.py
index 40d9bee..76ab14f 100644
--- a/tests/commands/install_uninstall_test.py
+++ b/tests/commands/install_uninstall_test.py
@@ -527,11 +527,13 @@ def test_pre_push_integration_failing(tempdir_factory, store):
         install(Runner(path, C.CONFIG_FILE), store, hook_type='pre-push')
         # commit succeeds because pre-commit is only installed for pre-push
         assert _get_commit_output(tempdir_factory)[0] == 0
+        assert _get_commit_output(tempdir_factory, touch_file='zzz')[0] == 0
 
         retc, output = _get_push_output(tempdir_factory)
         assert retc == 1
         assert 'Failing hook' in output
         assert 'Failed' in output
+        assert 'foo zzz' in output  # both filenames should be printed
         assert 'hookid: failing_hook' in output
task: metadata: install: pip install -e .
patch: diff --git a/pre_commit_hooks/requirements_txt_fixer.py b/pre_commit_hooks/requirements_txt_fixer.py
index 4575975..eff7935 100644
--- a/pre_commit_hooks/requirements_txt_fixer.py
+++ b/pre_commit_hooks/requirements_txt_fixer.py
@@ -40,11 +40,16 @@ class Requirement(object):
 
 def fix_requirements(f):  # type: (IO[bytes]) -> int
     requirements = []  # type: List[Requirement]
-    before = tuple(f)
+    before = list(f)
     after = []  # type: List[bytes]
 
     before_string = b''.join(before)
 
+    # adds new line in case one is missing
+    # AND a change to the requirements file is needed regardless:
+    if before and not before[-1].endswith(b'\n'):
+        before[-1] += b'\n'
+
     # If the file is empty (i.e. only whitespace/newlines) exit early
     if before_string.strip() == b'':
         return PASS

problem_statement: requirements-txt-fixer corrupts file if no new line at end
a file with
```
a
b
c
```
(no new line)
will get "fixed" to:
```
a
bc

```

I was able to debug and identify the issue, I'll be happy to also PR a fix but I was wondering if there is really a use for it? I've not seen any input without a new line at the end in the tests cases and as a work around I can add `end-of-file-fixer` before it.


repo: pre-commit/pre-commit-hooks
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/requirements_txt_fixer_test.py b/tests/requirements_txt_fixer_test.py
index c7c6e47..2e2eab6 100644
--- a/tests/requirements_txt_fixer_test.py
+++ b/tests/requirements_txt_fixer_test.py
@@ -15,6 +15,9 @@ from pre_commit_hooks.requirements_txt_fixer import Requirement
         (b'foo\n# comment at end\n', PASS, b'foo\n# comment at end\n'),
         (b'foo\nbar\n', FAIL, b'bar\nfoo\n'),
         (b'bar\nfoo\n', PASS, b'bar\nfoo\n'),
+        (b'a\nc\nb\n', FAIL, b'a\nb\nc\n'),
+        (b'a\nc\nb', FAIL, b'a\nb\nc\n'),
+        (b'a\nb\nc', FAIL, b'a\nb\nc\n'),
         (
             b'#comment1\nfoo\n#comment2\nbar\n',
             FAIL,
task: metadata: install: pip install -e .[dev]
patch: diff --git a/pre_commit_hooks/removed.py b/pre_commit_hooks/removed.py
index 9710b2d..60df096 100644
--- a/pre_commit_hooks/removed.py
+++ b/pre_commit_hooks/removed.py
@@ -5,7 +5,7 @@ from typing import Sequence
 
 def main(argv: Optional[Sequence[str]] = None) -> int:
     argv = argv if argv is not None else sys.argv[1:]
-    hookid, new_hookid, url = argv
+    hookid, new_hookid, url = argv[:3]
     raise SystemExit(
         f'`{hookid}` has been removed -- use `{new_hookid}` from {url}',
     )

problem_statement: error loading a removed hook
when load a removed hook throw this error

```
Flake8 (removed).........................................................Failed
- hook id: flake8
- exit code: 1

Traceback (most recent call last):
  File "/Users/pedro/.cache/pre-commit/repo3ku28fr9/py_env-python3.8/bin/pre-commit-hooks-removed", line 8, in <module>
    sys.exit(main())
  File "/Users/pedro/.cache/pre-commit/repo3ku28fr9/py_env-python3.8/lib/python3.8/site-packages/pre_commit_hooks/removed.py", line 8, in main
    hookid, new_hookid, url = argv
ValueError: too many values to unpack (expected 3)
```
repo: pre-commit/pre-commit-hooks
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/removed_test.py b/tests/removed_test.py
index 83df164..d635eb1 100644
--- a/tests/removed_test.py
+++ b/tests/removed_test.py
@@ -8,6 +8,7 @@ def test_always_fails():
         main((
             'autopep8-wrapper', 'autopep8',
             'https://github.com/pre-commit/mirrors-autopep8',
+            '--foo', 'bar',
         ))
     msg, = excinfo.value.args
     assert msg == (
task: metadata: install: pip install -e .[dev]
patch: diff --git a/pre_commit_hooks/file_contents_sorter.py b/pre_commit_hooks/file_contents_sorter.py
index c5691f0..02bdbcc 100644
--- a/pre_commit_hooks/file_contents_sorter.py
+++ b/pre_commit_hooks/file_contents_sorter.py
@@ -37,7 +37,10 @@ def sort_file_contents(
     after = sorted(lines, key=key)
 
     before_string = b''.join(before)
-    after_string = b'\n'.join(after) + b'\n'
+    after_string = b'\n'.join(after)
+
+    if after_string:
+        after_string += b'\n'
 
     if before_string == after_string:
         return PASS

problem_statement: `file-contents-sorter` adds an extra blank line if the file to be sorted is empty
I am on `v.4.4.0`, Python `3.11.4`, macOS Ventura `13.4.1`.

My `.pre-commit-config.yaml`:

```yaml
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: "v4.4.0"
    hooks:
      - id: end-of-file-fixer
      - id: file-contents-sorter
        files: ^requirements\/.+\.in$
        # args: [--unique, --ignore-case]
```

The files are intentionally **empty** &ndash; I'm in the planning stage, they are just placeholders for requriements[^1].

To the point: `file-contents-sorter` adds an extra blank to them, what results in a confict with `end-of-file-fixer`. I am not sure if that is the expected behavior... Updating `args` doesn't have any effect.

```bash
$ git:(install-and-configure-pre-commit) : pre-commit run --all-files
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing requirements/build.in
Fixing requirements/lint.in
Fixing requirements/test.in

file contents sorter.....................................................Failed
- hook id: file-contents-sorter
- exit code: 1
- files were modified by this hook

Sorting requirements/build.in
Sorting requirements/lint.in
Sorting requirements/test.in
```

[^1]: Yes, I know that I can use `requirements-txt-fixer` particularly for requirements. 😄 I will do. For that issue it doesn't matter.
repo: pre-commit/pre-commit-hooks
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/file_contents_sorter_test.py b/tests/file_contents_sorter_test.py
index 5e79e40..49b3b79 100644
--- a/tests/file_contents_sorter_test.py
+++ b/tests/file_contents_sorter_test.py
@@ -10,7 +10,9 @@ from pre_commit_hooks.file_contents_sorter import PASS
 @pytest.mark.parametrize(
     ('input_s', 'argv', 'expected_retval', 'output'),
     (
-        (b'', [], FAIL, b'\n'),
+        (b'', [], PASS, b''),
+        (b'\n', [], FAIL, b''),
+        (b'\n\n', [], FAIL, b''),
         (b'lonesome\n', [], PASS, b'lonesome\n'),
         (b'missing_newline', [], FAIL, b'missing_newline\n'),
         (b'newline\nmissing', [], FAIL, b'missing\nnewline\n'),
task: metadata: install: pip install -e .
patch: diff --git a/beautifultable/beautifultable.py b/beautifultable/beautifultable.py
index 0835eca..804e7a6 100644
--- a/beautifultable/beautifultable.py
+++ b/beautifultable/beautifultable.py
@@ -622,7 +622,8 @@ class BeautifulTable(object):
         actual_space = sum_ - temp_sum
         for i, _ in enumerate(widths):
             if not flag[i]:
-                widths[i] = int(round(widths[i] * avail_space / actual_space))
+                new_width = int(round(widths[i] * avail_space / actual_space))
+                widths[i] = min(widths[i], new_width)
         self.column_widths = widths
 
     def set_padding_widths(self, pad_width):

problem_statement: Incorrect calculation of column width
Minimal example:
```py
table = beautifultable.BeautifulTable(max_width=150)
table.column_headers = ['t', 'u', 'v', 'w', 'x', 'y', 'z']
table.append_row(['q123456789012345678', 'a', 'b', 'c', 'd', 'e', 'f'])
print(table)
```

Output:
```
+----------------------------------------------------------------------------------------------------------------------------+---+---+---+---+---+---+
|                                                             t                                                              | u | v | w | x | y | z |
+----------------------------------------------------------------------------------------------------------------------------+---+---+---+---+---+---+
|                                                    q123456789012345678                                                     | a | b | c | d | e | f |
+----------------------------------------------------------------------------------------------------------------------------+---+---+---+---+---+---+
```

The first column is too wide. If I omit the last character, it works as expected:
```py
table.append_row(['q12345678901234567', 'a', 'b', 'c', 'd', 'e', 'f'])
```
```
+--------------------+---+---+---+---+---+---+
|         t          | u | v | w | x | y | z |
+--------------------+---+---+---+---+---+---+
| q12345678901234567 | a | b | c | d | e | f |
+--------------------+---+---+---+---+---+---+
```

It also seems to work as expected if I change the `max_width`, or if I use fewer columns.

repo: pri22296/beautifultable
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/test.py b/test.py
index a02b6bc..edc0c45 100644
--- a/test.py
+++ b/test.py
@@ -371,6 +371,18 @@ class TableOperationsTestCase(unittest.TestCase):
         width = self.table.get_table_width()
         self.assertEqual(width, 0)
 
+    def test_table_auto_width(self):
+        row_list = ['abcdefghijklmopqrstuvwxyz', 1234, 'none']
+
+        self.create_table(200)
+        self.table.append_row(row_list)
+        len_for_max_width_200 = len(str(self.table))
+
+        self.create_table(80)
+        self.table.append_row(row_list)
+        len_for_max_width_80 = len(str(self.table))
+
+        self.assertEqual(len_for_max_width_80, len_for_max_width_200)
 
 if __name__ == '__main__':
     unittest.main()
task: metadata: install: pip install -e './skore[test,sphinx]'
patch: diff --git a/skore/src/skore/sklearn/find_ml_task.py b/skore/src/skore/sklearn/find_ml_task.py
index 0af490d..7ba71f5 100644
--- a/skore/src/skore/sklearn/find_ml_task.py
+++ b/skore/src/skore/sklearn/find_ml_task.py
@@ -71,6 +71,9 @@ def _find_ml_task(y, estimator=None) -> MLTask:
                     if estimator.classes_.size > 2:
                         return "multiclass-classification"
             else:  # fallback on the target
+                if y is None:
+                    return "unsupported"
+
                 target_type = type_of_target(y)
                 if target_type == "binary":
                     return "binary-classification"

problem_statement: We should bullet proof the `find_ml_task` in `EstimatorReport`
It is not an actual bug but reading again this line:

```python
self._ml_task = _find_ml_task(self._y_test, estimator=self._estimator)
```

in the initialization stage makes me think that we should double check that we are fine (and maybe more tests). Basically, since we allow `y_test` to be None sometimes, I want just to be sure that `estimator` is not in a stage where everything is unifitted and `None`.

From the top of the head, we should be fine because we should a fitted estimator when `y_test` is None but we should double check.
repo: probabl-ai/skore
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/skore/tests/unit/sklearn/test_utils.py b/skore/tests/unit/sklearn/test_utils.py
index 631d645..680b748 100644
--- a/skore/tests/unit/sklearn/test_utils.py
+++ b/skore/tests/unit/sklearn/test_utils.py
@@ -62,3 +62,10 @@ def test_find_ml_task_with_estimator(X, y, estimator, expected_task, should_fit)
 )
 def test_find_ml_task_without_estimator(target, expected_task):
     assert _find_ml_task(target) == expected_task
+
+
+def test_find_ml_task_unfitted_estimator():
+    from sklearn.dummy import DummyClassifier
+
+    estimator = DummyClassifier()
+    assert _find_ml_task(None, estimator) == "unsupported"
task: metadata: install: pip install -e .
patch: diff --git a/pyccel/codegen/printing/ccode.py b/pyccel/codegen/printing/ccode.py
index 45f6242a..9a5f4601 100644
--- a/pyccel/codegen/printing/ccode.py
+++ b/pyccel/codegen/printing/ccode.py
@@ -396,6 +396,17 @@ class CCodePrinter(CodePrinter):
 
     # ============ Elements ============ #
 
+    def _print_PythonAbs(self, expr):
+        if expr.arg.dtype is NativeReal():
+            self._additional_imports.add("math")
+            func = "fabs"
+        elif expr.arg.dtype is NativeComplex():
+            self._additional_imports.add("complex")
+            func = "cabs"
+        else:
+            func = "abs"
+        return "{}({})".format(func, self._print(expr.arg))
+
     def _print_PythonFloat(self, expr):
         value = self._print(expr.arg)
         type_name = self.find_in_dtype_registry('real', expr.precision)

problem_statement: Builtin abs function not working in c language
**Describe the bug**
Builtin abs function not implemented in c language

**To Reproduce**
Provide code to reproduce the behavior:
```python
@types('int')
def f(x):
    return abs(x)
```

**Error : **
ERROR at code generation stage
pyccel:
 |fatal [codegen]: first.py [3,11]| Pyccel has encountered syntax that has not been implemented yet. (<pyccel.ast.builtins.PythonAbs object at 0x7fa62ca792b0>)


**Language**
c

repo: pyccel/pyccel
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/epyccel/test_builtins.py b/tests/epyccel/test_builtins.py
new file mode 100644
index 00000000..2b597fb1
--- /dev/null
+++ b/tests/epyccel/test_builtins.py
@@ -0,0 +1,41 @@
+# pylint: disable=missing-function-docstring, missing-module-docstring/
+
+from pyccel.epyccel import epyccel
+from pyccel.decorators import types
+
+def test_abs_i(language):
+    @types('int')
+    def f1(x):
+        return abs(x)
+
+    f2 = epyccel(f1, language=language)
+
+    assert f1(0) == f2(0)
+    assert f1(-5) == f2(-5)
+    assert f1(11) == f2(11)
+
+def test_abs_r(language):
+    @types('real')
+    def f1(x):
+        return abs(x)
+
+    f2 = epyccel(f1, language=language)
+
+    assert f1(0.00000) == f2(0.00000)
+    assert f1(-3.1415) == f2(-3.1415)
+    assert f1(2.71828) == f2(2.71828)
+
+
+
+def test_abs_c(language):
+    @types('complex')
+    def f1(x):
+        return abs(x)
+
+    f2 = epyccel(f1, language=language)
+
+    assert f1(3j + 4) == f2(3j + 4)
+    assert f1(3j - 4) == f2(3j - 4)
+    assert f1(5j + 0) == f2(5j + 0)
+    assert f1(0j + 5) == f2(0j + 5)
+    assert f1(0j + 0) == f2(0j + 0)
task: metadata: install: pip install -e .[server,netcdf]
patch: diff --git a/src/pydap/parsers/dmr.py b/src/pydap/parsers/dmr.py
index 08782dc..1651702 100644
--- a/src/pydap/parsers/dmr.py
+++ b/src/pydap/parsers/dmr.py
@@ -54,6 +54,10 @@ def get_variables(node, prefix="") -> dict:
                 name = prefix + "/" + name
             variables[name] = {"element": subnode, "parent": node.tag}
         variables.update(get_variables(subnode, prefix))
+    strings = node.findall("String")
+    for string in strings:
+        name = string.get("name")
+        variables[name] = {"element": string, "parent": node.tag}
     return variables
 
 

problem_statement: pydap dmr parser skips String variable arrays
<!-- Thank you very much for your input! -->

### Description

I was using the [123bears](http://test.opendap.org:8080/opendap/data/nc/123bears.nc.dmr.html) file for testing, and it turns out that when opening the remote dataset with protocol='dap4' (i.e. making use of the dmr parser) the variable `bears` is not included in the dataset. dap2 works fine, but somehow the dmr parser skips this variable.

### Minimal example that reproduces the bug, or a new desired feature

```python
from pydap.client import open_url
url = 'http://test.opendap.org:8080/opendap/data/nc/123bears.nc'
ds = open_url(url, protocol='dap4')
ds.tree()
```
yields:

```
.123bears.nc
├──i
├──j
├──order
├──shot
├──aloan
├──cross
└──l
```

The variable `bears` is completely missing from the pydap dataset.

repo: pydap/pydap
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/src/pydap/tests/test_parsers_dmr.py b/src/pydap/tests/test_parsers_dmr.py
index 743dabf..9ec3a4d 100644
--- a/src/pydap/tests/test_parsers_dmr.py
+++ b/src/pydap/tests/test_parsers_dmr.py
@@ -265,3 +265,12 @@ class TestAttrsTypesDMRParser(unittest.TestCase):
                                 </Int32>\n</Dataset>"""
         ds = dmr_to_dataset(dmr)
         assert isinstance(ds["x"].attributes["attr"], float)
+
+    def test_string(self):
+        dmr = """<Dataset name="foo">\n    <String name="bears">\n
+                <Attribute name="attr" type="Float32">\n
+                            <Value></Value>\n        </Attribute>\n
+                                </String>\n</Dataset>"""
+        ds = dmr_to_dataset(dmr)
+        assert "bears" in ds.variables()
+        assert ds["bears"].dtype == "S128"
task: metadata: install: pip install -e .
patch: diff --git a/doc/whatsnew/v1.2.0.rst b/doc/whatsnew/v1.2.0.rst
index 0def5e071..40f6b0a47 100644
--- a/doc/whatsnew/v1.2.0.rst
+++ b/doc/whatsnew/v1.2.0.rst
@@ -4,6 +4,9 @@ Version 1.2.0
 Changelog
 ---------
 
+* ``DeferredDataElement`` class deprecated and will be removed in v1.3
+  (:issue:`291`)
+
 Fixes
 .....
 
diff --git a/pydicom/dataelem.py b/pydicom/dataelem.py
index 2b0c6dd01..1c4e8e4a9 100644
--- a/pydicom/dataelem.py
+++ b/pydicom/dataelem.py
@@ -13,6 +13,7 @@ A DataElement has a tag,
 #
 from __future__ import absolute_import
 from collections import namedtuple
+import warnings
 
 from pydicom import config  # don't import datetime_conversion directly
 from pydicom import compat
@@ -400,6 +401,12 @@ class DeferredDataElement(DataElement):
         data_element_tell -- file position at start of data element,
            (not the start of the value part, but start of whole element)
         """
+        warnings.warn(
+            "DeferredDataElement is deprecated and will be removed in "
+            "pydicom v1.3",
+            DeprecationWarning
+        )
+
         if not isinstance(tag, BaseTag):
             tag = Tag(tag)
         self.tag = tag

problem_statement: DeferredDataElement deprecation
I've been looking through the code in `dataelem.py` and noticed that `DeferredDataElement` seems to be broken. The `value` getter calls `self.read_value()` which doesn't exist, as far as I can tell. The class doesn't seem to be used anywhere, doesn't have test coverage and hasn't changed since you moved to github, so I was wondering if it's still supported or if it should be removed?
repo: pydicom/pydicom
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/pydicom/tests/test_dataelem.py b/pydicom/tests/test_dataelem.py
index ce233a548..f39ca068d 100644
--- a/pydicom/tests/test_dataelem.py
+++ b/pydicom/tests/test_dataelem.py
@@ -13,9 +13,15 @@ import unittest
 import pytest
 
 from pydicom.charset import default_encoding
-from pydicom.dataelem import (DataElement, RawDataElement,
-                              DataElement_from_raw, isStringOrStringList)
+from pydicom.dataelem import (
+    DataElement,
+    RawDataElement,
+    DataElement_from_raw,
+    isStringOrStringList,
+    DeferredDataElement
+)
 from pydicom.dataset import Dataset
+from pydicom.filebase import DicomBytesIO
 from pydicom.tag import Tag
 from pydicom.uid import UID
 from pydicom.valuerep import DSfloat
@@ -375,5 +381,10 @@ class RawDataElementTests(unittest.TestCase):
             DataElement_from_raw(raw, default_encoding)
 
 
-if __name__ == "__main__":
-    unittest.main()
+def test_deferred_data_element_deprecated():
+    """Test the deprecation warning is working"""
+    fp = DicomBytesIO()
+    fp.is_little_endian = True
+    fp.is_implicit_VR = True
+    with pytest.deprecated_call():
+        elem = DeferredDataElement(0x00000000, 'UL', fp, 0, 0, 4)
task: metadata: install: pip install -e .[dev]
patch: diff --git a/src/pymor/algorithms/svd_va.py b/src/pymor/algorithms/svd_va.py
index d8e364358..d636dada0 100644
--- a/src/pymor/algorithms/svd_va.py
+++ b/src/pymor/algorithms/svd_va.py
@@ -96,6 +96,10 @@ def method_of_snapshots(A, product=None, modes=None, rtol=1e-7, atol=0., l2_err=
         if modes is not None:
             selected_modes = min(selected_modes, modes)
 
+        if selected_modes > A.dim:
+            logger.warning('Number of computed singular vectors larger than array dimension! Truncating ...')
+            selected_modes = A.dim
+
         s = np.sqrt(evals[:selected_modes])
         V = V[:selected_modes]
         Vh = V.conj()

problem_statement: Better default tolerances for method of snapshots?
See discussion in #1012.

@lbalicki, as I understand https://www.netlib.org/lapack/lug/node89.html, then every EV smaller than the largest eigenvalue times machine precision should be considered as potentially zero. Everything else should be guaranteed to be a non-zero EV. So maybe it would make sense to throw everything away below that threshold (or a fixed constant times this threshold) and trust that the corresponding eigenvectors are at least not linearly dependent? 
repo: pymor/pymor
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/src/pymortests/algorithms/svd_va.py b/src/pymortests/algorithms/svd_va.py
index 43b0d326c..175258c81 100644
--- a/src/pymortests/algorithms/svd_va.py
+++ b/src/pymortests/algorithms/svd_va.py
@@ -11,6 +11,7 @@ from pymor.algorithms.basic import almost_equal
 from pymor.algorithms.svd_va import method_of_snapshots, qr_svd
 from pymor.algorithms.basic import contains_zero_vector
 from pymor.core.logger import log_levels
+from pymor.vectorarrays.numpy import NumpyVectorSpace
 from pymortests.base import runmodule
 from pymortests.fixtures.operator import operator_with_arrays_and_products
 from pymortests.strategies import given_vector_arrays
@@ -57,5 +58,12 @@ def test_method_of_snapshots_with_product(operator_with_arrays_and_products, met
     assert np.all(almost_equal(A, UsVh, rtol=4e-8))
 
 
+@pytest.mark.parametrize('method', methods)
+def test_not_too_many_modes(method):
+    vec_array = NumpyVectorSpace.from_numpy(np.logspace(-5, 0, 10).reshape((-1, 1)))
+    U, s, V = method(vec_array, atol=0, rtol=0)
+    assert len(U) == len(s) == len(V) == 1
+
+
 if __name__ == "__main__":
     runmodule(filename=__file__)
task: metadata: install: pip install -e .[dev]
patch: diff --git a/src/auditwheel/policy/external_references.py b/src/auditwheel/policy/external_references.py
index 1c05b10..23afde8 100644
--- a/src/auditwheel/policy/external_references.py
+++ b/src/auditwheel/policy/external_references.py
@@ -8,7 +8,7 @@ from ..elfutils import filter_undefined_symbols, is_subdir
 from . import load_policies
 
 log = logging.getLogger(__name__)
-LIBPYTHON_RE = re.compile(r"^libpython\d\.\dm?.so(.\d)*$")
+LIBPYTHON_RE = re.compile(r"^libpython\d+\.\d+m?.so(.\d)*$")
 
 
 def lddtree_external_references(lddtree: dict, wheel_path: str) -> dict:

problem_statement: libpython3.x is skipped but libpython3.xx is included
howdy,

i noticed when running auditwheel repair on a wheel with dependency on libpython3.8.so or libpython3.9.so, they are not added to the wheel libs directory, but libpython3.10.so and libpython3.11.so are added. I'm not very familiar with the project, but i suspect [the regex detecting libpython](https://github.com/pypa/auditwheel/blob/63c30761e6857491af50fbb1922ecfd4c034ef76/src/auditwheel/policy/external_references.py#L11) could be the culprit
repo: pypa/auditwheel
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/unit/test_policy.py b/tests/unit/test_policy.py
index 9fa21c9..adbdad8 100644
--- a/tests/unit/test_policy.py
+++ b/tests/unit/test_policy.py
@@ -10,6 +10,7 @@ from auditwheel.policy import (
     get_policy_name,
     get_priority_by_name,
     get_replace_platforms,
+    lddtree_external_references,
 )
 
 
@@ -202,3 +203,32 @@ class TestPolicyAccess:
     def test_get_by_name_duplicate(self):
         with pytest.raises(RuntimeError):
             get_priority_by_name("duplicate")
+
+
+class TestLddTreeExternalReferences:
+    """Tests for lddtree_external_references."""
+
+    def test_filter_libs(self):
+        """Test the nested filter_libs function."""
+        filtered_libs = [
+            "ld-linux-x86_64.so.1",
+            "ld64.so.1",
+            "ld64.so.2",
+            "libpython3.7m.so.1.0",
+            "libpython3.9.so.1.0",
+            "libpython3.10.so.1.0",
+            "libpython999.999.so.1.0",
+        ]
+        unfiltered_libs = ["libfoo.so.1.0", "libbar.so.999.999.999"]
+        libs = filtered_libs + unfiltered_libs
+
+        lddtree = {
+            "realpath": "/path/to/lib",
+            "needed": libs,
+            "libs": {lib: {"needed": [], "realpath": "/path/to/lib"} for lib in libs},
+        }
+        full_external_refs = lddtree_external_references(lddtree, "/path/to/wheel")
+
+        # Assert that each policy only has the unfiltered libs.
+        for policy in full_external_refs:
+            assert set(full_external_refs[policy]["libs"]) == set(unfiltered_libs)
task: metadata: install: pip install -e .[dev]
patch: diff --git a/docs/history.md b/docs/history.md
index af473ac4..8627607c 100644
--- a/docs/history.md
+++ b/docs/history.md
@@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 
 ### Unreleased
 
+***Fixed:***
+
+- Support `-h`/`--help` flag for the `run` command
+
 ### [1.3.0](https://github.com/pypa/hatch/releases/tag/hatch-v1.3.0) - 2022-07-10 ### {: #hatch-v1.3.0 }
 
 ***Changed:***
diff --git a/src/hatch/cli/run/__init__.py b/src/hatch/cli/run/__init__.py
index b442c280..0559fc7d 100644
--- a/src/hatch/cli/run/__init__.py
+++ b/src/hatch/cli/run/__init__.py
@@ -50,6 +50,10 @@ def run(ctx, app, args):
     would execute `pytest` in the environments `test.py310-42` and `test.py310-3.14`.
     Note that `py` may be used as an alias for `python`.
     """
+    if args[0] in ('-h', '--help'):
+        app.display_info(ctx.get_help())
+        return
+
     from hatch.cli.env.run import run as run_command
 
     command_start = 0

problem_statement: hatch run --help does not work as expected
This is a minor issue.

Unlike the other `hatch` CLI commands, `hatch run --help` does not print the full help output. Instead, the result is:

```
Missing argument `MATRIX:ARGS...`
```

A nice docstring is already defined in `hatch.cli.run.run`:

https://github.com/pypa/hatch/blob/9022c6df9602a0c2bb3b748be95a3d3114caf39d/src/hatch/cli/run/__init__.py#L12-L52

At a glance, it seems like this could be fixed by adding special handling of the argument `--help` in that function:

https://github.com/pypa/hatch/blob/9022c6df9602a0c2bb3b748be95a3d3114caf39d/src/hatch/cli/run/__init__.py#L55-L71
repo: pypa/hatch
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/cli/run/test_run.py b/tests/cli/run/test_run.py
index e9536642..12cbbc5a 100644
--- a/tests/cli/run/test_run.py
+++ b/tests/cli/run/test_run.py
@@ -7,6 +7,16 @@ from hatch.project.core import Project
 from hatch.utils.structures import EnvVars
 
 
+def test_help(hatch):
+    short = hatch('run', '-h')
+    assert short.exit_code == 0, short.output
+
+    long = hatch('run', '--help')
+    assert long.exit_code == 0, long.output
+
+    assert short.output == long.output
+
+
 def test_automatic_creation(hatch, helpers, temp_dir, config_file):
     config_file.model.template.plugins['default']['tests'] = False
     config_file.save()
task: metadata: install: pip install -e .
patch: diff --git a/news/3236.bugfix b/news/3236.bugfix
new file mode 100644
index 000000000..51d358458
--- /dev/null
+++ b/news/3236.bugfix
@@ -0,0 +1,1 @@
+"Support URL-encoded characters in URL credentials."
diff --git a/pip/download.py b/pip/download.py
index 41709db5e..894d0ff9a 100644
--- a/pip/download.py
+++ b/pip/download.py
@@ -21,6 +21,7 @@ except ImportError:
 
 from pip._vendor.six.moves.urllib import parse as urllib_parse
 from pip._vendor.six.moves.urllib import request as urllib_request
+from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote
 
 import pip
 
@@ -207,8 +208,9 @@ class MultiDomainBasicAuth(AuthBase):
         if "@" in netloc:
             userinfo = netloc.rsplit("@", 1)[0]
             if ":" in userinfo:
-                return userinfo.split(":", 1)
-            return userinfo, None
+                user, pwd = userinfo.split(":", 1)
+                return (urllib_unquote(user), urllib_unquote(pwd))
+            return urllib_unquote(userinfo), None
         return None, None
 
 

problem_statement: Failure to authenticate private repository when URL-encoded character in password
See https://github.com/pypa/pip/issues/51#issuecomment-128548720 

I have this issue with pip 7.1.2. There's a symbol in the password that needs url-encoding.

With the password url-encoded, pip fails to authenticate (gets a 401 response) and prompts for username/password interactively. It then works fine if I enter the user/pass interactively. Like @bcbrown I suspect it's not url-decoding the password.

repo: pypa/pip
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/unit/test_download.py b/tests/unit/test_download.py
index ee4b11c7d..1630393f0 100644
--- a/tests/unit/test_download.py
+++ b/tests/unit/test_download.py
@@ -13,7 +13,7 @@ import pip
 from pip.exceptions import HashMismatch
 from pip.download import (
     PipSession, SafeFileCache, path_to_url, unpack_http_url, url_to_path,
-    unpack_file_url,
+    unpack_file_url, MultiDomainBasicAuth
 )
 from pip.index import Link
 from pip.utils.hashes import Hashes
@@ -333,3 +333,14 @@ class TestPipSession:
         )
 
         assert not hasattr(session.adapters["https://example.com/"], "cache")
+
+
+def test_parse_credentials():
+    auth = MultiDomainBasicAuth()
+    assert auth.parse_credentials("foo:bar@example.com") == ('foo', 'bar')
+    assert auth.parse_credentials("foo@example.com") == ('foo', None)
+    assert auth.parse_credentials("example.com") == (None, None)
+
+    # URL-encoded reserved characters:
+    assert auth.parse_credentials("user%3Aname:%23%40%5E@example.com") \
+        == ("user:name", "#@^")
task: metadata: install: pip install -e .[dev]
patch: diff --git a/changelog.d/20240305_102047_allow_non_normalized_semver.md b/changelog.d/20240305_102047_allow_non_normalized_semver.md
new file mode 100644
index 0000000..f5d8567
--- /dev/null
+++ b/changelog.d/20240305_102047_allow_non_normalized_semver.md
@@ -0,0 +1,4 @@
+
+### Fixed
+
+- fix #1018: allow non-normalized versions for semver
diff --git a/src/setuptools_scm/version.py b/src/setuptools_scm/version.py
index 742abe6..0a36742 100644
--- a/src/setuptools_scm/version.py
+++ b/src/setuptools_scm/version.py
@@ -244,10 +244,13 @@ def guess_next_dev_version(version: ScmVersion) -> str:
 def guess_next_simple_semver(
     version: ScmVersion, retain: int, increment: bool = True
 ) -> str:
-    try:
-        parts = [int(i) for i in str(version.tag).split(".")[:retain]]
-    except ValueError:
-        raise ValueError(f"{version} can't be parsed as numeric version") from None
+    if isinstance(version.tag, _v.Version):
+        parts = list(version.tag.release[:retain])
+    else:
+        try:
+            parts = [int(i) for i in str(version.tag).split(".")[:retain]]
+        except ValueError:
+            raise ValueError(f"{version} can't be parsed as numeric version") from None
     while len(parts) < retain:
         parts.append(0)
     if increment:

problem_statement: get_version(): normalize=False incompatible with several version schemes
running anything that calls this function with 
-release-branch-semver
-python-simplified-semver

an error is thrown:

e.g. `ValueError: <ScmVersion v2.0.0 dist=0 node=g17520db dirty=True branch=branch-name> can't be parsed as numeric version`
repo: pypa/setuptools_scm
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/testing/test_version.py b/testing/test_version.py
index 8a823d8..371c754 100644
--- a/testing/test_version.py
+++ b/testing/test_version.py
@@ -54,6 +54,11 @@ c_non_normalize = Configuration(version_cls=NonNormalizedVersion)
             "1.1.0.dev2",
             id="feature_in_branch",
         ),
+        pytest.param(
+            meta(NonNormalizedVersion("v1.0"), distance=2, branch="default", config=c),
+            "1.0.1.dev2",
+            id="non-normalized-allowed",
+        ),
     ],
 )
 def test_next_semver(version: ScmVersion, expected_next: str) -> None:
task: metadata: install: pip install -e .[dev]
patch: diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 2bfe2d9..ecbcf81 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,3 +1,8 @@
+v6.0.1
+=======
+
+*  fix #537: drop node_date on old git to avoid errors on missing %cI
+
 v6.0.0
 ======
 
diff --git a/src/setuptools_scm/git.py b/src/setuptools_scm/git.py
index b1a85ab..c7f301b 100644
--- a/src/setuptools_scm/git.py
+++ b/src/setuptools_scm/git.py
@@ -61,6 +61,9 @@ class GitWorkdir:
             return
         # TODO, when dropping python3.6 use fromiso
         date_part = timestamp.split("T")[0]
+        if "%c" in date_part:
+            trace("git too old -> timestamp is ", timestamp)
+            return None
         return datetime.strptime(date_part, r"%Y-%m-%d").date()
 
     def is_shallow(self):

problem_statement: v6 breaks on Centos7 due to older git
Hi,

Changes between v5 and v6 results in downstream packages failing to build/install on Centos7, e.g. black

Centos7 seems to come with git 1.8.3.1 which doesn't support the `%cI` format as used by `get_head_date()` resulting in the following error when using pre-commit+black:
```
File "/tmp/pip-build-env-y421rvu8/overlay/lib/python3.7/site-packages/setuptools_scm/git.py", line 124, in parse
        node_date = wd.get_head_date() or date.today()
      File "/tmp/pip-build-env-y421rvu8/overlay/lib/python3.7/site-packages/setuptools_scm/git.py", line 64, in get_head_date
        return datetime.strptime(date_part, r"%Y-%m-%d").date()
      File "/opt/checksec/canopy/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
        tt, fraction, gmtoff_fraction = _strptime(data_string, format)
      File "/opt/checksec/canopy/lib/python3.7/_strptime.py", line 359, in _strptime
        (data_string, format))
    ValueError: time data '%cI' does not match format '%Y-%m-%d'
```

Installing either a newer git or `setuptools_scm~=5.0` works around the issue.
repo: pypa/setuptools_scm
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/testing/test_git.py b/testing/test_git.py
index d934c02..8080574 100644
--- a/testing/test_git.py
+++ b/testing/test_git.py
@@ -8,7 +8,7 @@ from datetime import datetime
 from os.path import join as opj
 from setuptools_scm.file_finder_git import git_find_files
 from datetime import date
-
+from unittest.mock import patch, Mock
 
 pytestmark = pytest.mark.skipif(
     not has_command("git", warn=False), reason="git executable not found"
@@ -307,3 +307,12 @@ def test_git_getdate(wd):
     assert git_wd.get_head_date() == today
     meta = git.parse(os.fspath(wd.cwd))
     assert meta.node_date == today
+
+
+def test_git_getdate_badgit(
+    wd,
+):
+    wd.commit_testfile()
+    git_wd = git.GitWorkdir(os.fspath(wd.cwd))
+    with patch.object(git_wd, "do_ex", Mock(return_value=("%cI", "", 0))):
+        assert git_wd.get_head_date() is None
task: metadata: install: pip install -e .[dev]
patch: diff --git a/src/setuptools_scm/__init__.py b/src/setuptools_scm/__init__.py
index bc5797d..97061f2 100644
--- a/src/setuptools_scm/__init__.py
+++ b/src/setuptools_scm/__init__.py
@@ -5,6 +5,11 @@
 import os
 import warnings
 
+try:
+    from packaging.version import parse
+except ImportError:
+    from pkg_resources import parse_version as parse
+
 from .config import (
     Configuration,
     DEFAULT_VERSION_SCHEME,
@@ -83,15 +88,12 @@ def dump_version(root, version, write_to, template=None):
             )
         )
 
-    # version_tuple: each field is converted to an int if possible or kept as string
-    fields = tuple(version.split("."))
-    version_fields = []
-    for field in fields:
-        try:
-            v = int(field)
-        except ValueError:
-            v = field
-        version_fields.append(v)
+    parsed_version = parse(version)
+    version_fields = parsed_version.release
+    if parsed_version.dev is not None:
+        version_fields += (f"dev{parsed_version.dev}",)
+    if parsed_version.local is not None:
+        version_fields += (parsed_version.local,)
 
     with open(target, "w") as fp:
         fp.write(template.format(version=version, version_tuple=tuple(version_fields)))

problem_statement: weird version_tuple when hardcoding version_scheme
I would like to use setuptools_scm to append a git sha if applicable, and in any case use a hard-coded version number as base (instead of a Git tag). To this end, I use the `"version_scheme"`:
```python
      use_scm_version={
          "version_scheme": lambda _: "4.1.0",
          "write_to": "foobar/version.py"
      }
```
The command
```
python3 setup.py --version
```
correctly produces
```
4.1.0+g4ac9d2c
```
but the `version_tuple` in `version.py` is weird:
```python
version = '4.1.0+g4ac9d2c'
version_tuple = (4, 1, '0+g4ac9d2c')
```
I would have expected
```python
version_tuple = (4, 1, 0, 'g4ac9d2c')
# or perhaps
version_tuple = (4, 1, 0, '+g4ac9d2c')
```
What's going wrong here?
repo: pypa/setuptools_scm
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:unraisableexception
test_patch: diff --git a/testing/test_basic_api.py b/testing/test_basic_api.py
index 5e35a9e..5aaf8fa 100644
--- a/testing/test_basic_api.py
+++ b/testing/test_basic_api.py
@@ -112,6 +112,18 @@ def test_dump_version(tmpdir):
     assert "version = '1.0.dev42'" in lines
     assert "version_tuple = (1, 0, 'dev42')" in lines
 
+    dump_version(sp, "1.0.1+g4ac9d2c", "second.py")
+    content = tmpdir.join("second.py").read()
+    lines = content.splitlines()
+    assert "version = '1.0.1+g4ac9d2c'" in lines
+    assert "version_tuple = (1, 0, 1, 'g4ac9d2c')" in lines
+
+    dump_version(sp, "1.2.3.dev18+gb366d8b.d20210415", "third.py")
+    content = tmpdir.join("third.py").read()
+    lines = content.splitlines()
+    assert "version = '1.2.3.dev18+gb366d8b.d20210415'" in lines
+    assert "version_tuple = (1, 2, 3, 'dev18', 'gb366d8b.d20210415')" in lines
+
     import ast
 
     ast.parse(content)
task: metadata: install: pip install -e .
patch: diff --git a/cmd2.py b/cmd2.py
index 3755ef56..13169a17 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -1610,8 +1610,11 @@ class Cmd(cmd.Cmd):
         if arg:
             # If a character indicating a slice is present, retrieve a slice of the history
             if '..' in arg or ':' in arg:
-                # Get a slice of history
-                history = self.history.span(arg)
+                try:
+                    # Get a slice of history
+                    history = self.history.span(arg)
+                except IndexError:
+                    history = self.history.get(arg)
             else:
                 # Get item(s) from history by index or string search
                 history = self.history.get(arg)

problem_statement: Unhandled exception in history command introduced by recent changes
A bug was introduced by the recent changes which merged the list functionality into the history command.

When attempting to do a span of history indices, an index error can occur and that exception needs to be caught and default history behavior needs to occur at that point instead.
repo: python-cmd2/cmd2
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 5783d944..2198d5c0 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -206,6 +206,17 @@ shortcuts
 """)
     assert out == expected
 
+def test_history_with_span_index_error(base_app):
+    run_cmd(base_app, 'help')
+    run_cmd(base_app, 'help history')
+    run_cmd(base_app, '!ls -hal :')
+    out = run_cmd(base_app, 'history "hal :"')
+    expected = normalize("""
+-------------------------[3]
+!ls -hal :
+""")
+    assert out == expected
+
 
 def test_base_cmdenvironment(base_app):
     out = run_cmd(base_app, 'cmdenvironment')
task: metadata: install: pip install -e .
patch: diff --git a/src/outcome/_async.py b/src/outcome/_async.py
index a9ec1ba..4fd64af 100644
--- a/src/outcome/_async.py
+++ b/src/outcome/_async.py
@@ -48,13 +48,13 @@ class Outcome(OutcomeBase):
         """
 
 
-class Value(ValueBase):
+class Value(Outcome, ValueBase):
     async def asend(self, agen):
         self._set_unwrapped()
         return await agen.asend(self.value)
 
 
-class Error(ErrorBase):
+class Error(Outcome, ErrorBase):
     async def asend(self, agen):
         self._set_unwrapped()
         return await agen.athrow(self.error)

problem_statement: Unintuitive inheritance in Python 3.5+
```python
v = outcome.Value(100)
isinstance(v, outcome.Outcome)
# False
e = outcome.Error(Exception('Boom!'))
isinstance(e, outcome.Outcome)
# False
```
I would expect both inherit from `outcome.Outcome`.
repo: python-trio/outcome
test_cmd: pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
test_patch: diff --git a/tests/test_sync.py b/tests/test_sync.py
index 192ac21..10d1ee8 100644
--- a/tests/test_sync.py
+++ b/tests/test_sync.py
@@ -103,3 +103,8 @@ def test_capture():
     assert type(e) == Error
     assert type(e.error) is ValueError
     assert e.error.args == ("two",)
+
+
+def test_inheritance():
+    assert issubclass(Value, outcome.Outcome)
+    assert issubclass(Error, outcome.Outcome)