182 Commits

Author SHA1 Message Date
Kay Hayen 501b4006a4 Standalone: Added support for "anyio" process forking 2026-05-04 12:21:17 +02:00
Kay Hayen 472d4e9869 Fix, bytecode files were not working properly for importing scans 2026-05-02 21:18:47 +02:00
Kay Hayen 08a1a7f2b0 Tests: Enable multiprocessing test for macOS
* This has been working for a long time already.
2026-04-30 19:29:07 +02:00
Kay Hayen 1f62db9721 Fix, fake modules were still located and could conflict with existing modules
* This is mostly a cleanup, to make the report not say "not-found" when
  in fact it will be found at runtime.

* Also using more namedtuples and other cleanups so importing code
  becomes more readable.
2026-04-30 19:29:07 +02:00
Kay Hayen b4dfff180d Tests: Avoid running program test suite with useless variant 2026-03-25 10:44:11 +01:00
Kay Hayen a0e1d3fcc1 Tests: Cover "post-import-code" with a new test 2026-03-25 10:44:11 +01:00
Kay Hayen 3bc6d24068 Bump copyright year. 2026-03-18 17:28:58 +01:00
Kay Hayen 76994650a7 Tests: Cleanup test case name 2026-01-31 11:30:11 +01:00
Kay Hayen b4e135ce68 Cleanup, prefer "os.getenv" over "os.environ.get" 2026-01-28 13:47:29 +01:00
Kay Hayen 0ac329ec01 Scons: Changed error message for using MinGW64 on newer Python to also mention Zig
* Also enhanced reporting error exit reporting through the scons logger to provide
  the exception in the compilation report.

* More error exits in scons should do this.
2026-01-28 13:44:29 +01:00
Kay Hayen 46527eb455 Cleanup, attach copyright during code generation for specialiations
* This also enhances the formatting for almost all files by making
  leading and trailing new lines more consistent.

* One C file turns out unused, was probably a left over.
2025-10-10 17:05:56 +02:00
Kay Hayen 16401b2346 Tests: Added support for test variants into the test runner
* This is mainly used to cover commercial features,
  but for PGO coverage we can use it too if we provide
  a validation hook.
2025-04-28 11:04:37 +02:00
Kay Hayen 718ab60539 Bump copyright year 2025-04-28 11:04:36 +02:00
Kay Hayen c565533711 Tests: Make this test clean the dictionary before printing it 2024-12-18 11:37:43 +01:00
Kay Hayen 4a0a21ff98 Tests: Remove 2to3 conversion code, we don't want to use it anymore 2024-12-18 11:10:21 +01:00
Kay Hayen 4f2cc6ae93 Optimization: Enhanced exception handling
* Use exception state to abstract 3.12 or before differences. This
  solves a TODO about more very in-efficient code generated that
  also requires many conversions of exceptions back and forth from
  3 value form to normalized.

* Moved compile time debug settings to separate file.

* Pass the exception state into unpacking function for more
  efficient code. No need to fetch exceptions per use of
  those into the exception state, but it can directly write to
  there.

* Solve TODO and have helper for unpacking length check. When
  migrating to Python3, this became a custom template with a
  lot of manual code that pre-defined the error messages to
  give too.

* Have our own variant of "_PyGen_FetchStopIterationValue" to
  avoid API calls in generator handling.

* Generate more efficient code for raising exceptions of builtin
  type. Rather than calling them as a function, create them via
  base exception new directly which will be much quicker.

* Faster exception creation, avoid having "args" and a tuple need
  to hole them for empty exceptions avoiding one more allocation.

* Remove uses of "PyTuple_Pack" and replace with our own helpers
  to avoid API calls.

* Avoid implicit exception raise nodes with delayed creation, have
  exception making nodes instead.
2024-12-18 11:09:55 +01:00
Kay Hayen 5d80bd8d03 Tests: Avoid random output from set order for this test 2024-12-18 10:52:22 +01:00
Kay Hayen 695d23ca76 Quality: Updated to latest version of black
* Many improvements, esp. for the ternary expressions
  that are frequently used, they are now formatted
  much better.
2024-12-18 10:51:12 +01:00
Kay Hayen e6badc3c17 Merge tag '2.0.6' into develop 2024-12-18 10:49:53 +01:00
Kay Hayen f34f8d0c63 Bump copyright year
* Also split copyright notices between the top and bottom,
  such that readability of just opened files is not harmed
  by license text.
2024-12-18 10:48:16 +01:00
Kay Hayen 30f19c2755 Release: Avoid chinese names in the repo
* These have been seen as preventing installation on some systems
  that are not UTF8 capable.
2024-12-18 10:45:33 +01:00
Kay Hayen 4b016ff015 Tests: Make this directly executable 2024-12-18 10:42:34 +01:00
Kay Hayen 52baffad52 Tests: Added case with Chinese module names
* This was causing issues previously with the star import of a
  module containing non-UTF8 names and "__file__" values in accelerated
  and encoding issues of generated source code not being latin1 as
  it should be.
2024-12-18 10:40:06 +01:00
Kay Hayen 7de21eb195 Tests: Make this directly compile with project options 2024-12-18 10:35:16 +01:00
Kay Hayen 909d41f02d Bump copyright year 2023-06-02 15:07:22 +02:00
Kay Hayen f83a8244d2 Tests: Was not really applying import check in programs tests 2023-04-16 13:44:59 +02:00
Kay Hayen fa2af13e01 Tests: Fixup missing importlib for 2.6 on OBS 2023-04-14 13:27:07 +02:00
Kay Hayen 04e00a1d1a Tests: Minor cleanups 2023-04-14 13:27:07 +02:00
Kay Hayen 3c4fdb93b9 Python2: Expose "__loader__" for modules and register with "pkg_resources" too
* Also avoid using "__loader__" from the post module hook, so it's safer
  in case the hooks are not compiled themselves.
2023-04-14 13:23:01 +02:00
John Vandenberg 5d15c7c704 Quality: Update and expand auto-formatting tools
* Update auto-formatting tools with newest isort and rstfmt.

* Also format of "tests/*/*.rst" and many test files.
2023-02-13 14:20:27 +01:00
Kay Hayen 3353e9c724 Tests: Fix, older Python was not having all it needs 2022-09-18 11:21:04 +02:00
Kay Hayen 8fd8c35d2e Fix, module code needs to hold a reference to their object. 2022-09-18 10:56:35 +02:00
Kay Hayen 4cfdd9f9c0 Bump copyright year 2022-05-23 10:28:11 +02:00
Kay Hayen f708d8bade Tests: Enhanced pyproject test to run automatically 2022-05-15 23:11:34 +02:00
Kay Hayen dea6488815 Plugins: More data file improvements 2022-04-04 15:09:58 +02:00
Kay Hayen c2e2b6fd58 Plugins: Cleanups to how data files are handled 2022-03-20 13:57:13 +01:00
Kay Hayen abfb99b0a0 Plugins: Massive cleanup of data file handling
* Move data file handling out of standalone only, allowing support
  for other modes as well.

* Attach logger and tags to data file objects.
2022-03-19 18:10:13 +01:00
Kay Hayen abbd511f8c Optimization: Added nodes for pkgutil.get_data usage 2022-03-19 18:10:13 +01:00
Kay Hayen 70b7eee955 Python3.7+: Added support for get_resource_reader to our loader
* This allows to avoid a useless file copy to a temporary file
  in case a "importlib.resources.path" is used.

* Also fixed a few typos in tests.

* And avoid compiling the meta path based loader separately, so it
  can use compiled code helpers easily.
2022-03-12 09:02:32 +01:00
Kay Hayen 5f26368b1b Optimization: Allow exclusion of some stdlib modules
* This is in preparation of making following to stdlib the default.

* For now it's used to make multiprocessing plugin not fire in the
  standard configuration.
2022-02-13 13:03:55 +01:00
Kay Hayen 4ac3779f30 Plugins: Make sure the define for multiprocessing is only set when plugin had added module. 2022-02-02 18:20:45 +01:00
Kay Hayen 9d32889d9d Tests: Added project option to make it directly usable 2022-01-16 15:08:09 +01:00
Kay Hayen 2e120382e1 Tests: Do test -m flag with 2.6 where it's badly supported 2022-01-11 10:17:25 +01:00
Kay Hayen a9d4b99325 Added proper support for "__main__" inside packages and "-m" flag mode.
* The package must be imported and run before the main code to be
  fully compatible.

* Package values and name values differ in these cases from the
  normal setup.

* Enhanced test runner to support variant, so we can run the
  package test as a directory and as a module.
2022-01-09 09:02:02 +01:00
Kay Hayen 081848aadf Tests: Make PGO test runner working
* For two step execution, compilation output is ignored in comparisons.

* Make the scanning for main programs reusable.

* Enhanced test case.
2021-12-21 23:18:31 +01:00
Kay Hayen e3f4d92e97 Tests: Move program main file detector code to common code 2021-12-07 09:40:03 +01:00
Kay Hayen 5ed76123b8 Tests: Add suite names and minor fixups 2021-12-07 09:38:43 +01:00
Kay Hayen 5a62fd80dd Tests: Do not use multiprocessing plugin unless necessary on the platform. 2021-12-07 09:36:11 +01:00
Kay Hayen c6ca075439 Tests: Remove obsolete wordings for test runner as well 2021-09-19 16:53:12 +02:00
Kay Hayen b6e8bba523 Plugins: Add support for multiprocess resource tracker
* This enables support for spawn mode on Linux.

* Make the multiprocessing platform no more limited to Windows.

* Also make sure to exit when forked main exits, that was missing.
2021-09-12 13:59:56 +02:00