Matthew Feickert

Results 460 comments of Matthew Feickert

Additional context managers still needed in `tests/test_scripts.py`.

> ``` > [...]/pyhf/src/pyhf/tensor/pytorch_backend.py:201: DeprecationWarning: In future, it will be an error for 'np.bool_' scalars to be interpreted as an index > return torch.as_tensor(tensor_in, dtype=dtype) > ``` I need to...

This refactor should also rename `mega_mods` to `builder_data` everywhere in [`tests/test_combined_modifiers.py`](https://github.com/scikit-hep/pyhf/blob/121903b3412756e8f6a8597f0c0eb5c28f4e2192/tests/test_combined_modifiers.py) ```console $ git grep "mega_mods" tests/test_combined_modifiers.py: mega_mods = { tests/test_combined_modifiers.py: [('hello', 'histosys'), ('world', 'histosys')], mc, mega_mods tests/test_combined_modifiers.py: [('hello', 'histosys'),...

@backmanification Thanks for an excellent reproducer. :+1: We'll take a look at this, but realistically it might not be until the weekend or next week as the dev team has...

@kratsg @lukasheinrich I'm unable to replicate the error that the GHA runners in PR #1841 are seeing when I (on the same branch) run ```console $ pytest --override-ini filterwarnings= tests/test_notebooks.py...

Oh. It fails if you add `PYTHONWARNINGS='default'` into the environment ```console $ PYTHONWARNINGS='default' pytest --override-ini filterwarnings= tests/test_notebooks.py -k test_xml_importexport &> /tmp/pythonwarnings_log.txt ``` [pythonwarnings_log.txt](https://github.com/scikit-hep/pyhf/files/8425002/pythonwarnings_log.txt) pythonwarnings_log.txt: ```pytb /home/feickert/.pyenv/versions/pyhf-dev-CPU/lib/python3.9/site-packages/requests_mock/contrib/_pytest_plugin.py:15: DeprecationWarning: distutils Version classes...

As @agoose77 points out, `build` runs in a new process by default, and Python isn't passing along the warning flag, so by setting the shell environmental variable `PYTHONWARNINGS` the information...

> So > > ``` > $ PYTHONWARNINGS=error python -m build . > ``` > > works as desired. +1 That was spoken too soon. I guess I really just...

> Can't you use colons? If colons worked, then shouldn't this ```console $ PYTHONWARNINGS=error::SetuptoolsDeprecationWarning python -m build . ``` work? This allows for ``` /tmp/build-env-mnsbs_hq/lib/python3.10/site-packages/setuptools/config/setupcfg.py:459: SetuptoolsDeprecationWarning: The license_file parameter is...

> You _could_ raise _any_ warnings from setuptools instead of the specific deprecation warning. > > I've tested that it works, though it will not discriminate between warning kinds. Hm,...