Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PythonNest/PyNest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: PythonNest/PyNest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: auspicious-dart
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 19 commits
  • 55 files changed
  • 2 contributors

Commits on May 7, 2026

  1. feat(di): add InjectionToken, Scope, ProviderDescriptor, normalize_pr…

    …ovider
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 7, 2026
    Configuration menu
    Copy the full SHA
    4e7e9a7 View commit details
    Browse the repository at this point in the history
  2. feat(di): add DependencyGraph with cycle detection and topological sort

    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 7, 2026
    Configuration menu
    Copy the full SHA
    c22a98f View commit details
    Browse the repository at this point in the history
  3. feat(di): add CompiledModule dataclass and update ModuleCompiler to n…

    …ormalize providers
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 7, 2026
    Configuration menu
    Copy the full SHA
    8719963 View commit details
    Browse the repository at this point in the history
  4. feat(di): add PyNestInjectorModule and build_injector — bridges Provi…

    …derDescriptors to injector bindings
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 7, 2026
    Configuration menu
    Copy the full SHA
    37f5fd2 View commit details
    Browse the repository at this point in the history
  5. feat(di): rewrite PyNestContainer — non-singleton, build() + get() AP…

    …I, instance-based injection
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 7, 2026
    Configuration menu
    Copy the full SHA
    a916606 View commit details
    Browse the repository at this point in the history
  6. feat(di): rewrite @Injectable — proper @Inject, Scope support, no cla…

    …ss mutation
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 7, 2026
    Configuration menu
    Copy the full SHA
    11e0a28 View commit details
    Browse the repository at this point in the history
  7. feat(di): rewrite @controller — metadata-only, no __init__ deletion, …

    …no class mutation
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 7, 2026
    Configuration menu
    Copy the full SHA
    6000f47 View commit details
    Browse the repository at this point in the history
  8. feat(di): rewrite RoutesResolver — instance-based routing with bound …

    …methods
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 7, 2026
    Configuration menu
    Copy the full SHA
    89cc71d View commit details
    Browse the repository at this point in the history

Commits on May 8, 2026

  1. feat(di): update PyNestFactory to call container.build() — wires new …

    …engine end-to-end
    
    - PyNestFactory.create() now calls container.build() before creating PyNestApp
    - PyNestApp rewritten: no longer inherits PyNestApplicationContext, no select_context_module/register_routes methods; RoutesResolver called inline in __init__
    - test_pynest_factory.py replaced with 6 focused TDD tests covering e2e routes, isolation, and DI correctness
    - test_pynest_application.py updated to match new PyNestApp API
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 8, 2026
    Configuration menu
    Copy the full SHA
    27b596f View commit details
    Browse the repository at this point in the history
  2. chore(di): remove dead code (parse_dependencies, ClassBasedView), exp…

    …ort InjectionToken + Scope
    
    - Drop parse_dependencies, get_instance_variables, get_non_dependencies_params from utils.py
    - Remove dead imports from cli_decorators.py (only parse_params remains)
    - Delete class_based_view.py (replaced by instance-based routing)
    - Richer docstrings on all three exception classes in exceptions.py
    - Export InjectionToken and Scope from nest.core.__init__
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 8, 2026
    Configuration menu
    Copy the full SHA
    b641783 View commit details
    Browse the repository at this point in the history
  3. Merge origin/main: uv tooling, exception filters, v0.4.1

    Resolved conflicts:
    - nest/core/pynest_application.py: kept new DI structure, added use_global_filters() + _register_global_handler() from main
    - nest/core/decorators/class_based_view.py: deleted (replaced by RoutesResolver); ported _wrap_route_with_filters() logic into route_resolver._wrap_with_filters()
    
    Also fixed nest/common/module.py forward-ref NameError by adding `from __future__ import annotations`.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 8, 2026
    Configuration menu
    Copy the full SHA
    1a5f05c View commit details
    Browse the repository at this point in the history
  4. fix(cli): update CLIAppFactory to use module.compiled.controllers

    The new ModuleRef stores controllers as compiled.controllers (list),
    not module.controllers (dict). Fixes integration test boot failure.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 8, 2026
    Configuration menu
    Copy the full SHA
    38b4af0 View commit details
    Browse the repository at this point in the history
  5. fix(cli): properly resolve CLI controller instances via DI

    CLIAppFactory now calls container.build() then manually resolves
    each CLI controller's constructor deps from the injector, instead of
    passing the class as 'self' (which relied on the old class-mutation DI).
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 8, 2026
    Configuration menu
    Copy the full SHA
    9a8620a View commit details
    Browse the repository at this point in the history
  6. fix(cli): auto-register module in AppModule after 'generate module'

    pynest generate module -n <name> now automatically adds the import and
    registers the new module in src/app_module.py, matching the behavior of
    'generate resource' and NestJS CLI convention.
    
    Also fixes generate_empty_module_file to scaffold with proper
    `@Module(imports=[], controllers=[], providers=[])` instead of `@Module()`.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 8, 2026
    Configuration menu
    Copy the full SHA
    76d5c60 View commit details
    Browse the repository at this point in the history
  7. fix(cli): use find_target_folder to locate src/ in generate module

    Hardcoded Path.cwd() / 'src' doubled the path when running from inside
    src/. Now uses the same find_target_folder() logic as generate resource,
    which walks up/down the directory tree to find src/ regardless of cwd.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 8, 2026
    Configuration menu
    Copy the full SHA
    02bd18f View commit details
    Browse the repository at this point in the history
  8. fix(cli): fix Swagger grouping and generate module UX

    Two issues:
    1. AppController scaffold was missing tag="app" — its routes appeared in
       Swagger's unnamed "default" bucket instead of an "app" section.
       Fixed by adding tag="app" to app_controller_file() template.
    
    2. 'generate module' created a silent empty skeleton — no output, no hint,
       leaving the user wondering why nothing appeared in /docs.
       Now prints CREATE/UPDATE messages and a hint pointing to
       'generate resource' for a full CRUD scaffold.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 8, 2026
    Configuration menu
    Copy the full SHA
    c9b3a45 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2026

  1. fix(orm): fix three session/exception bugs in the sync ORM layer

    1. db_request_handler: change 'return HTTPException(...)' to
       'raise HTTPException(...)'. Returning an exception object lets it
       propagate silently as a truthy value, poisoning any multi-hop
       service call chain with confusing TypeErrors instead of HTTP 500s.
       Also removed session lifecycle from the decorator — session
       management belongs in each service method, not in a cross-cutting
       decorator.
    
    2. OrmProvider.get_db(): the try/finally block was closing the session
       immediately after returning it, so the caller always received an
       already-closed session. Removed the finally; added get_session()
       context manager (rollback on exception, always close) as the
       canonical way to obtain a per-call session.
    
    3. Service template: replaced 'self.session = self.config.get_db()' in
       __init__ (one shared session for the entire singleton lifetime) with
       'with self.config.get_session() as session:' inside each method,
       giving every request its own isolated session and preventing
       concurrent-request data corruption.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 9, 2026
    Configuration menu
    Copy the full SHA
    941e3d4 View commit details
    Browse the repository at this point in the history
  2. feat(di): enforce NestJS-style module encapsulation at build time

    Previously every provider from every module landed in one flat injector
    pool — a service in module A could inject a service from module B even
    when A never imported B and B never exported the service. Encapsulation
    was a documentation-only contract, not a check.
    
    Now PyNestContainer.build() runs a validation pass after cycle detection:
    
    - Each module gets a 'visible' set:
        own providers + own controllers
        + transitively-resolved exports of its imports (re-exports supported)
        + every provider from any @module(is_global=True)
    - Every consumer's __init__ annotations are walked; class-typed deps that
      are registered providers but not in the consumer's visible set raise
      ProviderNotExportedException listing every violation with a concrete
      fix ('add imports=[X] to A and exports=[Y] to X, or move Y into A').
    
    Updated test_imported_module_providers_are_resolvable to declare the
    export it was implicitly relying on. Added 8 new tests covering:
    same-module deps, proper import+export, global modules, module re-exports,
    missing import, missing export, controller violations, and unrelated
    sibling modules.
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    ItayTheDar and claude committed May 9, 2026
    Configuration menu
    Copy the full SHA
    38d6e8f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4661ca9 View commit details
    Browse the repository at this point in the history
Loading