1
0

Compare commits

6 Commits

Author SHA256 Message Date
f8b275878b Accepting request 1316370 from devel:languages:python
- Add patch support-python314.patch:
  * Do not use removed ast class.

OBS-URL: https://build.opensuse.org/request/show/1316370
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pscript?expand=0&rev=12
2025-11-07 17:22:44 +00:00
ac60aa9b05 - Add patch support-python314.patch:
* Do not use removed ast class.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pscript?expand=0&rev=24
2025-11-07 05:24:06 +00:00
350cbf8898 Accepting request 1247412 from devel:languages:python
Forwarded request #1247396 from glaubitz

- Update to 0.8.0
    * Modernize repo.
    * Officially support Python up to 3.13.
  - Update BuildRequires from pyproject.toml

OBS-URL: https://build.opensuse.org/request/show/1247412
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pscript?expand=0&rev=11
2025-02-20 16:39:53 +00:00
3d358dba7a - Update to 0.8.0
* Modernize repo.
  * Officially support Python up to 3.13.
- Update BuildRequires from pyproject.toml

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pscript?expand=0&rev=22
2025-02-20 13:22:01 +00:00
6745686e25 Accepting request 1229975 from devel:languages:python
- Skip a test broken by nodejs feature.

OBS-URL: https://build.opensuse.org/request/show/1229975
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pscript?expand=0&rev=10
2024-12-11 20:03:54 +00:00
cc489d3742 - Skip a test broken by nodejs feature.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pscript?expand=0&rev=20
2024-12-11 01:22:27 +00:00
5 changed files with 46 additions and 9 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f02f4bba234aac0088dd674f72de63d16baf4827fbeaf5150515eac90bbf2761
size 116963

3
pscript-0.8.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1c7fcb8fa1f6ed7c33b82ee9462628ff7090357cf8de2888b088123eebd6d06b
size 102038

View File

@@ -1,3 +1,22 @@
-------------------------------------------------------------------
Fri Nov 7 05:23:28 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-python314.patch:
* Do not use removed ast class.
-------------------------------------------------------------------
Thu Feb 20 12:16:53 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 0.8.0
* Modernize repo.
* Officially support Python up to 3.13.
- Update BuildRequires from pyproject.toml
-------------------------------------------------------------------
Wed Dec 11 01:21:50 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Skip a test broken by nodejs feature.
-------------------------------------------------------------------
Mon Jul 31 06:13:34 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pscript
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,16 @@
%define modname pscript
Name: python-pscript
Version: 0.7.7
Version: 0.8.0
Release: 0
Summary: Python to JavaScript compiler
License: BSD-2-Clause
URL: https://github.com/flexxui/pscript
Source: https://github.com/flexxui/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE Do not use removed ast class
Patch0: support-python314.patch
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
@@ -52,13 +53,13 @@ of Python that this compiler supports.
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest pscript/tests
# https://github.com/flexxui/pscript/issues/69
%pytest -k 'not test_async_and_await' tests
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/pscript
%{python_sitelib}/pscript_legacy
%{python_sitelib}/pscript-%{version}.dist-info
%changelog

17
support-python314.patch Normal file
View File

@@ -0,0 +1,17 @@
Index: pscript-0.8.0/pscript/commonast.py
===================================================================
--- pscript-0.8.0.orig/pscript/commonast.py
+++ pscript-0.8.0/pscript/commonast.py
@@ -1032,7 +1032,11 @@ class NativeAstConverter:
def _convert_index_like(self, n):
c = self._convert
- if isinstance(n, (ast.Slice, ast.Index, ast.ExtSlice, ast.Ellipsis)):
+ if sys.version_info[:2] >= (3, 14):
+ check_inst = (ast.Slice, ast.Index, ast.ExtSlice)
+ else:
+ check_inst = (ast.Slice, ast.Index, ast.ExtSlice, ast.Ellipsis)
+ if isinstance(n, check_inst):
return c(n) # Python < 3.8 (and also 3.8 on Windows?)
elif isinstance(n, ast.Tuple):
assert isinstance(n, ast.Tuple)