lp:~lttng/babeltrace/trunk

Created by Ubuntu LTTng and last modified
Get this branch:
bzr branch lp:~lttng/babeltrace/trunk

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Ubuntu LTTng
Project:
Babeltrace
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://git.efficios.com/babeltrace.git.

The next import is scheduled to run .

Last successful import was .

Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 25 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-5 and finished taking 20 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-4 and finished taking 20 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-4 and finished taking 25 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 25 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 20 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-2 and finished taking 20 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 25 seconds — see the log

Recent revisions

4501. By Simon Marchi <email address hidden>

tests: fix all basic type check issues of lttng_live_server.py

Do the necessary changes such that this comment passes cleanly:

    $ PYTHONPATH=/home/smarchi/src/babeltrace/tests/utils/python pyright tests/data/plugins/src.ctf.lttng-live/lttng_live_server.py

Pyright pointed out that field _trace_session_state didn't exist, in:

    @property
    def trace_session_state(self):
        return self._trace_session_state

The actual field name is _ts_state. However, it shows that this
property is never used, so remove it.

Change-Id: I115fe473310ecdb1e2fd2e5d369aae33afe963f1
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10893
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4500. By Simon Marchi <email address hidden>

tests/python: add local copy of typing module

Add a local copy of the typing module [1], in order to be able to use
the typing module features with Python 3.4.

Add notes about the license in the top-level LICENSE file.

Add exclusions to avoid this file being reformatted by black, analyzed
by flake8 and its imports sorted by isort.

Add the tests/utils/python/utils.py with an import
er files will be able to use the
typing module using:

    typing = utils._typing_mod

... and not care where the typing module comes from.

[1] https://raw.githubusercontent.com/python/typing/3.10.0.2/src/typing.py

Signed-off-by: Simon Marchi <email address hidden>
Change-Id: I7648e700f7e350acc595004c697a89e1fc97de4a
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10892
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4499. By Simon Marchi <email address hidden>

tests: move classes around in lttng_live_server.py

In preparation for an upcoming patch, which fixes typing issues in
lttng_live_server.py, move some types around to avoid forward-references
when possible.

Change-Id: If7c14db977fa8b5c5d050badf2d8f1254fb1279a
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10870
Reviewed-by: Philippe Proulx <email address hidden>
Tested-by: jenkins <email address hidden>

4498. By Simon Marchi <email address hidden>

python: run isort on everything

Run isort on the whole repo, to nicely sort Python imports.

Add a mention in CONTRIBUTING.adoc, that all Python imports must be
sorted using the version of isort specified in dev-requirements.txt.

Add `isort ~= 5.12` to dev-requirements.txt. 5.12 is the latest stable
version available on PyPi as of writing.

Tell isort to use its `black` profile, in pyproject.toml, so that
black remains happy. The details of that profile are here:

  https://pycqa.github.io/isort/docs/configuration/profiles.html

Tell isort to ignore `tests/utils/python/tap`, since it's code copied
from elsewhere.

Use the `length_sort` option, because Philippe prefers it like that.
See:

  https://pycqa.github.io/isort/docs/configuration/custom_sections_and_ordering.html

Change-Id: I8778f908342d0feeb97d4442506113d9252559e7
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10871
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4497. By Simon Marchi <email address hidden>

Document usage of Black in CONTRIBUTING.adoc

Mention that all Python code must be formatted using Black.

Change-Id: I420c4e5a75b34eae40da83ae09d5fd76d8eddb0f
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10888
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4496. By Simon Marchi <email address hidden>

python: remove internal `import bt2` imports

Standardize the internal imports to import specific modules like this:

    from bt2 import foo as bt2_foo

... instead of importing the complete bt2 package.

Change-Id: I32eb223a8bcfe841020a2aafb976f121dadd8680
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10388
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4495. By Simon Marchi <email address hidden>

python: move exception types out of __init__.py

Move exception types defined in __init__.py.

 - Move _MemoryError to error.py
 - Move _IncompleteUserClass to component.py
 - Move the others to utils.py

I initially moved them to a new exceptions.py file, but I think that
it's just fine to move them in the existing files. But it's a
possibility too, if y'all prefer that.

The goal of this commit is to make it easier to use these types
internally, using the form:

    from bt2 import utils as bt2_utils

    ... use bt2_utils.TryAgain ...

... in order to get rid of the internal `import bt2` imports.

Note that it would be possible to keep the exception types in
__init__.py and do:

    from bt2 import TryAgain

... and then use `TryAgain` in the code, but I think we prefer using a
module qualifier for whatever is imported.

Change-Id: I7d8dbdc28a3a2e3e38093903d622487a45fe7637
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10387
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4494. By Simon Marchi <email address hidden>

python: standardize intra-bt2 imports

A subsequent patch wants to refer to `object` (the Python type), but it
is shadowed by our `from bt2 import object` import. It seems like a
good time to standardize how we import intra-bt2 modules, to use the
pattern:

    from bt2 import potato as bt2_potato

Note that I didn't add the bt2_ prefix to the native_bt import, since it
would be a bit redundant.

Change-Id: Icdb4339075a1888463c4f84b292deb272ad49943
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10386
Tested-by: jenkins <email address hidden>
Reviewed-by: Philippe Proulx <email address hidden>

4493. By Simon Marchi <email address hidden>

Bump black to version 23

Bump to the latest available black version.

Change-Id: I62360ab9137ab2a5eb7fcc4dbbed913bfacee2e1
Signed-off-by: Simon Marchi <email address hidden>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/9650
Reviewed-by: Philippe Proulx <email address hidden>

4492. By Simon Marchi <email address hidden>

ctf: fix formatting in ctf-meta-resolve.cpp

Run tools/format-cpp.

Signed-off-by: Simon Marchi <email address hidden>
Change-Id: Iea7165c5996b5ce62790ddb9df69e4e8e5014240
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10891
Reviewed-by: Philippe Proulx <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers