Skip to content

Commit

Permalink
Merge pull request #5 from namecheap/feat/update-deps
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
sokyrko authored Aug 6, 2021
2 parents e6b3e78 + 4bfa6b6 commit a2e4aef
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 68 deletions.
99 changes: 40 additions & 59 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2018"
name = "fast_mail_parser"
version = "0.2.0"
version = "0.2.1"
authors = ["Andrey Sokirko <[email protected]>"]
license = "Apache-2.0"

Expand All @@ -24,7 +24,7 @@ classifier = [
"Topic :: Communications :: Email",
"Topic :: Software Development :: Libraries",
]
requires-python = ">3.5"
requires-python = ">=3.6.0"
maintainer-email = "[email protected]"
maintainer = "Andrey Sokirko"

Expand All @@ -43,7 +43,7 @@ crate-type = ["cdylib"]

[dependencies]
mailparse = "0.13.0"
pyo3 = "0.11.1"
pyo3 = "0.14.1"

[features]
default = ["pyo3/extension-module"]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["maturin"]
requires = ["maturin>=0.11,<0.12"]
build-backend = "maturin"

[tool.maturin]
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
setuptools==50.1.0
setuptools-rust==0.11.3
setuptools-rust==0.12.1
wheel==0.35.1
twine~=3.2.0
toml==0.10.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
with open("Cargo.toml") as fp:
version = toml.load(fp)["package"]["version"]

setup_requires = ["setuptools-rust>=0.10.1", "wheel"]
setup_requires = ["setuptools-rust>=0.12.1", "wheel"]
install_requires = ["toml~=0.10.0"]
tests_require = install_requires + ["pytest", "pytest-benchmark", "mail-parser"]

Expand Down
6 changes: 3 additions & 3 deletions src/fast_mail_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use pyo3::types::PyBytes;

pub mod mail_parser;

create_exception!(fast_mail_parser, ParseError, exceptions::Exception);
create_exception!(fast_mail_parser, ParseError, exceptions::PyException);

#[pyclass]
#[derive(Clone)]
Expand Down Expand Up @@ -61,7 +61,7 @@ impl PyToBytes for PyObject {
result = self.extract::<String>(py)
.map(|s| s.chars().map(|c| c as u8).collect::<Vec<_>>().into_iter())
.map_err(|_| {
PyErr::new::<exceptions::TypeError, _>("The argument cannot be interpreted as bytes.")
PyErr::new::<exceptions::PyTypeError, _>("The argument cannot be interpreted as bytes.")
})
}

Expand All @@ -75,7 +75,7 @@ pub fn parse_email(py: Python, payload: PyObject) -> PyResult<PyMail> {

mail_parser::parse_email(message.as_slice())
.map_err(|e| {
ParseError::py_err(format!("Message parsing error: {}", e))
ParseError::new_err(format!("Message parsing error: {}", e))
})
.map(|m| {
PyMail {
Expand Down

0 comments on commit a2e4aef

Please sign in to comment.