From 2c3631fbe67c68cb11cb5a9cb9b4f577caebfed4fe8b6d27c651b4cab8d7a993 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 14 Nov 2024 09:46:41 +0000 Subject: [PATCH] - drop black dependency from tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesmith?expand=0&rev=27 --- .gitattributes | 23 ++++++ .gitignore | 1 + _multibuild | 3 + hypothesmith-0.3.3.tar.gz | 3 + python-hypothesmith.changes | 152 ++++++++++++++++++++++++++++++++++++ python-hypothesmith.spec | 93 ++++++++++++++++++++++ 6 files changed, 275 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 hypothesmith-0.3.3.tar.gz create mode 100644 python-hypothesmith.changes create mode 100644 python-hypothesmith.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/hypothesmith-0.3.3.tar.gz b/hypothesmith-0.3.3.tar.gz new file mode 100644 index 0000000..991ce8f --- /dev/null +++ b/hypothesmith-0.3.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96c14802d6c8e85d8975264176878db54b28d2ed921fdbfedc2e6b8ce3c81716 +size 25529 diff --git a/python-hypothesmith.changes b/python-hypothesmith.changes new file mode 100644 index 0000000..3cd8e71 --- /dev/null +++ b/python-hypothesmith.changes @@ -0,0 +1,152 @@ +------------------------------------------------------------------- +Thu Nov 14 09:46:30 UTC 2024 - Dirk Müller + +- drop black dependency from tests + +------------------------------------------------------------------- +Tue Mar 19 07:02:34 UTC 2024 - Dirk Müller + +- update to 0.3.3: + * Add Python 3.12 and 3.13 to CI + * Can now be imported on Python 3.13 + +------------------------------------------------------------------- +Mon Jan 22 23:31:11 UTC 2024 - Dirk Müller + +- update to 0.3.2: + * Performance improvements based on Hypothesis 6.93.0 + +------------------------------------------------------------------- +Mon Dec 18 12:21:38 UTC 2023 - Dirk Müller + +- update to 0.3.1: + * Hypothesis >= 6.89.0 made some internal changes which broke + our `from_grammar()`. This patch restores compatibility, and + requires the new Hypothesis. + +------------------------------------------------------------------- +Thu Oct 12 13:53:09 UTC 2023 - Ondřej Súkup + +- update to 0.3.0 + * Even more efficient generation of Python identifiers, using Hypothesis 6.84.1 + * Dropped support for Python 3.7 + +------------------------------------------------------------------- +Fri Apr 21 12:26:38 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Wed Apr 19 01:17:27 UTC 2023 - Matej Cepl + +- Switch to single spec version build for PSP + +------------------------------------------------------------------- +Thu Dec 15 06:26:48 UTC 2022 - Daniel Garcia + +- Update requirements + +------------------------------------------------------------------- +Tue Dec 13 15:35:43 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 0.2.3 + * Actually package up the renamed grammar file this time. + +- Update to 0.2.2 - 2022-11-29 + * Correct the minimum required version of LibCST + * Use importlib.resources to load the Python grammar (zip-safe) + +------------------------------------------------------------------- +Tue Dec 6 03:35:17 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 0.2.1 - 2022-11-25 + * Use the lark package on PyPI, for Lark version 1.0+ (requires recent Hypothesis) + * Use updated Python grammar for from_grammar(), thanks to Lark updates + * Drop support for Python 3.6, add 3.10 and 3.11 to CI + +------------------------------------------------------------------- +Thu Oct 20 13:24:58 UTC 2022 - Torsten Gruner + +- Update to v0.2.0 + * More efficient generation of Python identifiers + * Workaround for CPython parser bug in 3.9.8 (#16) Yes, yet another one - still, + that's why hypothesmith exists... +- Release v0.1.9 + * Fixed rare internal error when from_node() generated misplaced except: clauses + +------------------------------------------------------------------- +Thu Sep 29 02:26:11 UTC 2022 - Yogalakshmi Arunachalam + +- Update to 0.2.0 - 2021-11-27 + More efficient generation of Python identifiers + Workaround for CPython parser bug in 3.9.8 (#16) Yes, yet another one - still, that's why hypothesmith exists... +- Update to 0.1.9 - 2021-08-19 + Fixed rare internal error when from_node() generated misplaced except: clauses + +------------------------------------------------------------------- +Sun Mar 21 20:41:41 UTC 2021 - Ben Greiner + +- Update to v0.1.8 + * Now compatible with Hypothesis 5.46 and later + * Increased diversity of examples generated by from_node() +- Release v0.1.7 + * Adds a workaround for BPO-42218 + * Bumped Hypothesis requirement to version 5.41 or later + (better internal error messages) + * Added MANIFEST.in so the sdist includes license, tests, etc. + +------------------------------------------------------------------- +Sat Nov 14 05:23:01 UTC 2020 - John Vandenberg + +- Update to v0.1.6 + * Improved error messages from internal compiler errors again + * Bumped Hypothesis requirement to version 5.39 or later +- from v0.1.5 + * Emit additional debug info when Python fails to compile a string + +------------------------------------------------------------------- +Wed Aug 19 15:46:37 UTC 2020 - Benjamin Greiner + +- Update to 0.1.4 + * Improve handling of identifiers + * Fix internal error in `from_grammar("single_input") +- do not install myself on multibuild test flavor + +------------------------------------------------------------------- +Sat Aug 8 18:44:29 UTC 2020 - Benjamin Greiner + +- Use github repository download for LICENSE, CHANGELOG.md (needed + by tests) and test directory gh#Zac-HD/hypothesmith#5 +- run tests in multibuild flavor, they are quite time-consuming and + the test requirements create dependency loops +- filter empty types file python-hypothesmith-rpmlintrc + +------------------------------------------------------------------- +Thu Aug 6 13:31:26 UTC 2020 - Benjamin Greiner + +- Update to 0.1.3 + * Update to latest versions of LibCST and Hypothesis, for Python + 3.9 support +- 0.1.2 - 2020-05-17 + * Emit more debug info to diagnose a compile() issue in CPython + nightly +- 0.1.1 - 2020-05-17 + * Emit some debug info to help diagnose a possible upstream bug + in CPython nightly +- 0.1.0 - 2020-04-24 + * Added auto_target=True argument to the from_node() strategy. + * Improved from_node() generation of comments and trailing + whitespace. +- 0.0.8 - 2020-04-23 + * Added a from_node() strategy which uses LibCST to generate + source code. This is a proof-of-concept rather than a robust + tool, but IMO it's a pretty cool concept. +- 0.0.7 - 2020-04-19 + * The from_grammar() strategy now takes an auto_target=True + argument, to drive generated examples towards (relatively) + larger and more complex programs. + +------------------------------------------------------------------- +Thu Apr 16 10:54:35 UTC 2020 - Tomáš Chvátal + +- Initial commit, needed by flake8-builtins diff --git a/python-hypothesmith.spec b/python-hypothesmith.spec new file mode 100644 index 0000000..9a3cacd --- /dev/null +++ b/python-hypothesmith.spec @@ -0,0 +1,93 @@ +# +# spec file for package python-hypothesmith +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +%{?sle15_python_module_pythons} +Name: python-hypothesmith%{psuffix} +Version: 0.3.3 +Release: 0 +Summary: Hypothesis strategies for generating Python programs, something like CSmith +License: MPL-2.0 +URL: https://github.com/Zac-HD/hypothesmith +Source: https://files.pythonhosted.org/packages/source/h/hypothesmith/hypothesmith-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-base >= 3.7 +Requires: python-hypothesis >= 6.93.0 +Requires: python-lark >= 0.10.1 +Requires: python-libcst >= 0.4.0 +%if %{with test} +BuildRequires: %{python_module exceptiongroup} +BuildRequires: %{python_module hypothesis >= 6.93.0} +BuildRequires: %{python_module lark >= 0.10.1} +BuildRequires: %{python_module libcst >= 0.4.0} +BuildRequires: %{python_module parso} +BuildRequires: %{python_module pytest-xdist} +BuildRequires: %{python_module pytest} +%endif +BuildArch: noarch +%python_subpackages + +%description +Hypothesis strategies for generating Python programs, something like CSmith. + +%prep +%setup -q -n hypothesmith-%{version} +# remove pytest coverage opts +rm tox.ini + +%build +%if !%{with test} +%pyproject_wheel +%endif + +%install +%if !%{with test} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} +# multibuild: test the source dir, nothing is installed +export PYTHONPATH=$(pwd)/src +# depend on black +rm -v tests/test_cst.py tests/test_syntactic.py +%pytest -n %{?jobs} +%endif + +%if !%{with test} +%files %{python_files} +%doc README.md CHANGELOG.md +%license LICENSE +%{python_sitelib}/hypothesmith +%{python_sitelib}/hypothesmith-%{version}.dist-info +%endif + +%changelog