4 Commits

Author SHA1 Message Date
Kay Hayen
718ab60539 Bump copyright year 2025-04-28 11:04:36 +02: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
909d41f02d Bump copyright year 2023-06-02 15:07:22 +02:00
Kay Hayen
4968773f3d Optimization: Massive generated children mixin work.
* All expression nodes now use a dedicated generated children mixin
  class, aimed at optimal use.

* Some select expression nodes now use dedicated base classes with
  automatic computations done in there.

* When cloning nodes or getting visitable nodes, more more compact
  code is used that should perform better.

* Named chilren now have types, and "tuple" is handled explicitely
  without checking values for their type, so updates, iteration etc.
  is all directl.

* Remove useless checker for "kw_defaults" from function creation nodes,
  they are only ever "None" when the node is created. No need to check
  afterwards anymore.

* Only when a function node is created, is there a chance for "kw_defaults"
  to be empty dict, so use a factory function instead.

* With useless checkers removed, generated children mixins now do apply
  the checkers statically rather than checking on every update if there
  is one, and the checkers dictionary per expression can be dropped as
  result, making things perform much better for child replacement.

* Attach type shapes to methods specs for use in attribute node
  generation, such that the proper mixin class for the result
  type shape can be chosen automatically, but we do have some types,
  that depend on Python version looking at it, and won't be suitable yet.

* Factories for nodes are now detected automatically in node generation,
  making them easier to use.

* Added support for "importlib.metadata.entry_points" and its
  backport variant "importlib_metadata" too.

* Added operations for all "bytes" methods as well, such that the
  existing few ones are automatically generated as well.

* Added "auto_compute" for annotations of nodes that never change and do
  annotate and potentially raise an exception or not. This will allow to
  do stub method implementations, and rather have the base class contain
  this directly.

* The "iter" node for 2 arguments was not annotating its exception exit,
  which was discovered when looking for a boiler plate node to migrate
  to "auto_compute" which then of course resolves the bug.

* Make sure we pass tuple values when creating nodes that have children
  with that type. We created node lists only to always convert them to
  tuple value when the node is created. This is now avoided in many
  cases.

* Sequences had dead attribute "sequence_kind", removed that attribute.

* Made a new sequence mixin for reuse in "importlib.metadata.EntryPoints"
  values which are more or less a sequence derived class.

* Made dictionary mixin for reuse in "importlib.metadata.SelectableGroups"
  as these are more or less a dict derived class.

* Replaced "willRaiseException" with "willRaiseAnyException" which will be
  more accurate and faster, and matches what the result of the function
  is more closely anyway. We do not ask the other question at all yet.

* Remove useless raise checks in sequence making nodes, they were
  repeating the effort done in the base class for no good reason,
  potentially wasting a lot of time.

* Made meta data using test cover the new entry_points method without
  arguments at least.
2023-01-09 16:44:30 +01:00