pybgpkit-parser 0.6.1__tar.gz → 0.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/.gitignore +2 -0
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/BUILD.md +4 -5
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/CHANGELOG.md +12 -1
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/Cargo.lock +3 -1
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/Cargo.toml +3 -1
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/Dockerfile +3 -1
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/PKG-INFO +1 -1
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/examples/filter_count_print.py +3 -2
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/src/lib.rs +8 -2
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/.github/workflows/release.yml +0 -0
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/.github/workflows/rust.yaml +0 -0
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/LICENSE +0 -0
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/README.md +0 -0
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/build.rs +0 -0
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/build.sh +0 -0
- {pybgpkit_parser-0.6.1 → pybgpkit_parser-0.6.2}/pyproject.toml +0 -0
|
@@ -13,7 +13,10 @@
|
|
|
13
13
|
3. run [`build.sh`](./build.sh) on Intel Mac
|
|
14
14
|
4. run [`build.sh`](./build.sh) inside docker on Intel Mac
|
|
15
15
|
|
|
16
|
-
Then run
|
|
16
|
+
Then run
|
|
17
|
+
```
|
|
18
|
+
twine upload --skip-existing target/wheels/*
|
|
19
|
+
```
|
|
17
20
|
|
|
18
21
|
## Build Linux packages in Docker
|
|
19
22
|
|
|
@@ -24,9 +27,5 @@ docker build -t bgpkit-builder:latest .
|
|
|
24
27
|
|
|
25
28
|
Run `docker run --rm -it bgpkit-builder:latest bash` to open a shell in the container
|
|
26
29
|
```bash
|
|
27
|
-
####
|
|
28
|
-
# TODO: copy the content of .pypirc to the root folder
|
|
29
|
-
####
|
|
30
|
-
|
|
31
30
|
bash build.sh
|
|
32
31
|
```
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.6.2 - 2025-06-06
|
|
6
|
+
|
|
7
|
+
### Fix regressions
|
|
8
|
+
|
|
9
|
+
* Fix a regression in the `Elem` class that the default string representation was missing
|
|
10
|
+
* Fix a regression that the `Parser` class requires `filters` and `cache_dir` to be passed in the constructor,
|
|
11
|
+
which should be and was optional priority to `v0.6.0`.
|
|
12
|
+
|
|
5
13
|
## 0.6.1 - 2025-06-06
|
|
6
14
|
|
|
7
15
|
### Highlights
|
|
@@ -11,11 +19,14 @@ All notable changes to this project will be documented in this file.
|
|
|
11
19
|
## 0.6.0 - 2025-06-04
|
|
12
20
|
|
|
13
21
|
### Highlights
|
|
22
|
+
|
|
14
23
|
* Update `bgpkit-parser` to v0.11.0, which includes several bug fixes and performance improvements.
|
|
15
24
|
* Add support for Python 3.13.
|
|
16
25
|
|
|
17
26
|
### Breaking changes
|
|
18
|
-
|
|
27
|
+
|
|
28
|
+
* The `Elem` class's fields can only be access by their getter methods now. Direct access to fields is no longer
|
|
29
|
+
allowed. This change improves encapsulation and ensures that the internal state of `Elem` is managed correctly.
|
|
19
30
|
|
|
20
31
|
## 0.5.1 - 2024-02-28
|
|
21
32
|
|
|
@@ -1121,11 +1121,13 @@ dependencies = [
|
|
|
1121
1121
|
|
|
1122
1122
|
[[package]]
|
|
1123
1123
|
name = "pybgpkit-parser"
|
|
1124
|
-
version = "0.6.
|
|
1124
|
+
version = "0.6.2"
|
|
1125
1125
|
dependencies = [
|
|
1126
1126
|
"bgpkit-parser",
|
|
1127
1127
|
"pyo3",
|
|
1128
1128
|
"pyo3-build-config",
|
|
1129
|
+
"serde",
|
|
1130
|
+
"serde_json",
|
|
1129
1131
|
]
|
|
1130
1132
|
|
|
1131
1133
|
[[package]]
|
|
@@ -4,7 +4,7 @@ description = "BGPKIT Parser Python Binding"
|
|
|
4
4
|
keywords = ["bgp", "mrt", "parser"]
|
|
5
5
|
repository = "https://github.com/bgpkit/bgpkit-parser-py"
|
|
6
6
|
documentation = "https://docs.rs/bgpkit-parser-py"
|
|
7
|
-
version = "0.6.
|
|
7
|
+
version = "0.6.2"
|
|
8
8
|
authors = ["Mingwei Zhang <mingwei@bgpkit.com>"]
|
|
9
9
|
edition = "2021"
|
|
10
10
|
license = "MIT"
|
|
@@ -17,6 +17,8 @@ crate-type = ["cdylib", "rlib"]
|
|
|
17
17
|
[dependencies]
|
|
18
18
|
bgpkit-parser = "0.11.1"
|
|
19
19
|
pyo3 = { version = "0.25", features = ["extension-module"] }
|
|
20
|
+
serde = { version = "1.0", features = ["derive"] }
|
|
21
|
+
serde_json = "1"
|
|
20
22
|
|
|
21
23
|
[build-dependencies]
|
|
22
24
|
pyo3-build-config = "0.25"
|
|
@@ -18,7 +18,7 @@ RUN curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.12 ge
|
|
|
18
18
|
RUN curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.13 get-pip.py --break-system-packages && rm get-pip.py
|
|
19
19
|
|
|
20
20
|
# install maturin
|
|
21
|
-
RUN python3.13 -m pip install maturin patchelf
|
|
21
|
+
RUN python3.13 -m pip install maturin patchelf twine
|
|
22
22
|
# install Rust
|
|
23
23
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
24
24
|
|
|
@@ -29,3 +29,5 @@ COPY ./build.sh .
|
|
|
29
29
|
COPY ./Cargo.toml .
|
|
30
30
|
COPY ./README.md .
|
|
31
31
|
COPY ./pyproject.toml .
|
|
32
|
+
|
|
33
|
+
COPY ./.pypirc /root/.pypirc
|
|
@@ -13,8 +13,9 @@ for elem in parser:
|
|
|
13
13
|
print(elem.as_path)
|
|
14
14
|
|
|
15
15
|
# Optional fields can be checked for None
|
|
16
|
-
print(elem.aggr_ip
|
|
16
|
+
print(elem.aggr_ip is None)
|
|
17
17
|
|
|
18
18
|
# Print the entire parsed BGP update as a dictionary
|
|
19
|
-
print(json.dumps(elem.to_dict()
|
|
19
|
+
print(json.dumps(elem.to_dict()))
|
|
20
|
+
print(elem)
|
|
20
21
|
break
|
|
@@ -2,6 +2,7 @@ use bgpkit_parser::models::*;
|
|
|
2
2
|
use bgpkit_parser::*;
|
|
3
3
|
use pyo3::exceptions::PyValueError;
|
|
4
4
|
use pyo3::prelude::*;
|
|
5
|
+
use serde::Serialize;
|
|
5
6
|
use std::collections::HashMap;
|
|
6
7
|
use std::io::Read;
|
|
7
8
|
|
|
@@ -38,7 +39,7 @@ fn pybgpkit_parser(_py: Python, m: &Bound<PyModule>) -> PyResult<()> {
|
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
#[pyclass]
|
|
41
|
-
#[derive(Clone, PartialEq)]
|
|
42
|
+
#[derive(Clone, PartialEq, Serialize)]
|
|
42
43
|
pub struct Elem {
|
|
43
44
|
#[pyo3(get, set)]
|
|
44
45
|
pub timestamp: f64,
|
|
@@ -100,6 +101,11 @@ fn pybgpkit_parser(_py: Python, m: &Bound<PyModule>) -> PyResult<()> {
|
|
|
100
101
|
fn __getstate__(&self, py: Python) -> PyObject {
|
|
101
102
|
self.to_dict(py)
|
|
102
103
|
}
|
|
104
|
+
|
|
105
|
+
#[pyo3(name = "__str__")]
|
|
106
|
+
fn str_repr(&self) -> PyResult<String> {
|
|
107
|
+
Ok(serde_json::to_string(self).unwrap().to_string())
|
|
108
|
+
}
|
|
103
109
|
}
|
|
104
110
|
|
|
105
111
|
#[pyclass]
|
|
@@ -113,7 +119,7 @@ fn pybgpkit_parser(_py: Python, m: &Bound<PyModule>) -> PyResult<()> {
|
|
|
113
119
|
#[pymethods]
|
|
114
120
|
impl Parser {
|
|
115
121
|
#[new]
|
|
116
|
-
#[pyo3(
|
|
122
|
+
#[pyo3(signature = (url, filters=None, cache_dir=None))]
|
|
117
123
|
fn new(
|
|
118
124
|
url: String,
|
|
119
125
|
filters: Option<HashMap<String, String>>,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|