Skip to content

v0.13.0, "Jane"

Choose a tag to compare

@tony tony released this 31 May 08:06
· 1563 commits to master since this release

Breaking changes

  • #343: libvcs.cmd.core moved to libvcs._internal.run to make it more clear the API is
    closed.

    This includes ~libvcs._internal.run.run

    Before in 0.13:

    from libvcs.cmd.core import run

    New module in >=0.13:

    from libvcs._internal.run import run
  • #361: ~libvcs._internal.run.run's params are now a pass-through to
    subprocess.Popen.

    • run(cmd, ...) is now run(args, ...) to match Popen's convention.
  • {class}libvcs.projects.base.BaseProject:

    • Removed parent_dir:

      Before: project.parent_dir

      After: project.parent.dir.

    • repo_name switched from attribute to property

  • Keyword-only arguments via PEP 3102, PEP 570

    • #366: libvcs.cmd for hg, git, and svn updated to use

    • #364: Project classes no longer accept positional arguments.

      Deprecated in >=0.13:

      GitProject('https://github.com/vcs-python/libvcs.git')

      New style in >=0.13:

      GitProject(url='https://github.com/vcs-python/libvcs.git')

What's new

  • Commands: Experimental command wrappers added ({issue}346):

    • libvcs.cmd.git.Git

      • libvcs.cmd.git.Git.help
      • libvcs.cmd.git.Git.reset
      • libvcs.cmd.git.Git.checkout
      • libvcs.cmd.git.Git.status
      • libvcs.cmd.git.Git.config via #360
  • Command: Now support -C (which accepts .git dirs, see git's manual) in addition to cwd
    (subprocess-passthrough), #360

Bug fixes

  • Fix argument input for commands, e.g. git config --get color.diff would not properly
    pass-through to subprocess. git: #360, svn and hg: #365

Internals

  • #362 mypy support added:

    • Basic mypy tests now pass

    • Type annotations added, including improved typings for:

      • libvcs._internal.subprocess.SubprocessCommand.run
      • libvcs._internal.subprocess.SubprocessCommand.Popen
      • libvcs._internal.subprocess.SubprocessCommand.check_output
      • libvcs._internal.subprocess.run.run
    • make mypy and make watch_mypy

    • Automatic checking on CI

  • #345 libvcs.utils -> libvcs._internal to make it more obvious the APIs are strictly
    closed.

  • StrOrPath -> StrPath

  • #336: ~libvcs._internal.subprocess.SubprocessCommand: Encapsulated
    subprocess call in a dataclasses.dataclass for introspecting, modifying, mocking
    and controlling execution.

  • Dataclass helper: ~libvcs._internal.dataclasses.SkipDefaultFieldsReprMixin

    Skip default fields in object representations.

    Credit: Pietro Oldrati, 2022-05-08,
    StackOverflow Post

Documentation

  • Document libvcs.types
  • #362 Improve developer documentation to note mypy and have tabbed examples for flake8.

Packaging

  • Update description and keywords

PRs

  • Controllable subprocess wrapper by @tony in #336
  • refactor!: cmd.core -> utils.run by @tony in #343
  • tests (doctest): Remove unused doctest flags by @tony in #344
  • refactor!: libvcs.utils -> libvcs._internal by @tony in #345
  • More git commands by @tony in #346
  • cmd.git: Command fixes, add git config by @tony in #360
  • chore(run): Pass through to subprocess.Popen by @tony in #361
  • refactor!(projects): Make arguments kw-only by @tony in #364
  • fix(cmd[hg,svn]): Fix argument flag passing by @tony in #365
  • refactor!(cmd): Keyword-only params by @tony in #366
  • chore: mypy and additional type annotations by @tony in #362

Full Changelog: v0.12.0...v0.13.0