Skip to content

Commit fc2ab71

Browse files
author
Gal Ben David
committed
upload source distribution to support more platforms. remove once_cell dependency. update suffix list
1 parent c47580e commit fc2ab71

File tree

5 files changed

+33
-15
lines changed

5 files changed

+33
-15
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ jobs:
3535
uses: messense/maturin-action@v1
3636
with:
3737
command: publish
38-
args: --username=__token__ --no-sdist --interpreter=python${{ !startsWith(matrix.os, 'windows') && matrix.python-version || '' }}
38+
args: --username=__token__ ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7' && '--no-sdist' || '' }} --interpreter=python${{ !startsWith(matrix.os, 'windows') && matrix.python-version || '' }}
3939
env:
4040
MATURIN_PASSWORD: ${{ secrets.pypi_password }}

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pydomainextractor"
3-
version = "0.11.0"
3+
version = "0.11.1"
44
authors = ["Gal Ben David <[email protected]>"]
55
edition = "2021"
66
description = "A blazingly fast domain extraction library written in Rust"
@@ -39,10 +39,9 @@ crate-type = ["cdylib"]
3939
ahash = "0.7"
4040
idna = "0.2"
4141
memchr = "2"
42-
once_cell = "1"
4342

4443
[dependencies.pyo3]
45-
version = "0.16.4"
44+
version = "0.16.5"
4645
features = ["extension-module"]
4746

4847
[profile.release]

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
[build-system]
2-
requires = ["maturin>=0.11,<0.12"]
2+
requires = ["maturin>=0.12,<0.13"]
33
build-backend = "maturin"
44

55
[tool.maturin]
66
sdist-include = [
7-
"src/*",
87
"Cargo.toml",
98
"pydomainextractor/*.py",
10-
"pydomainextractor/*.pyi"
9+
"pydomainextractor/*.pyi",
10+
"pyproject.toml",
11+
"src/*",
1112
]
1213

1314
[tool.poetry]
1415
name = "pydomainextractor"
15-
version = "0.11.0"
16+
version = "0.11.1"
1617
authors = ["Gal Ben David <[email protected]>"]
1718
description = "A blazingly fast domain extraction library written in Rust"
1819
readme = "README.md"

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use pyo3::exceptions::PyValueError;
33
use pyo3::prelude::*;
44
use pyo3::types::PyString;
55
use std::ptr;
6-
use once_cell::sync::OnceCell;
6+
use pyo3::once_cell::GILOnceCell;
77

88
#[derive(Default)]
99
struct Suffix {
@@ -17,7 +17,7 @@ static mut SUFFIX_STRING: *mut pyo3::ffi::PyObject = ptr::null_mut();
1717
static mut DOMAIN_STRING: *mut pyo3::ffi::PyObject = ptr::null_mut();
1818
static mut SUBDOMAIN_STRING: *mut pyo3::ffi::PyObject = ptr::null_mut();
1919
static PUBLIC_SUFFIX_LIST_DATA: &str = include_str!("public_suffix_list.dat");
20-
static mut TEMP_DOMAIN_STRING: OnceCell<String> = OnceCell::new();
20+
static mut TEMP_DOMAIN_STRING: GILOnceCell<String> = GILOnceCell::new();
2121

2222

2323
#[pyclass]
@@ -363,7 +363,7 @@ fn parse_suffix_list(
363363

364364
#[pymodule]
365365
fn pydomainextractor(
366-
_py: Python,
366+
py: Python,
367367
m: &PyModule,
368368
) -> PyResult<()> {
369369
unsafe {
@@ -380,7 +380,7 @@ fn pydomainextractor(
380380
"subdomain".as_ptr() as *const i8,
381381
"subdomain".len() as isize,
382382
);
383-
TEMP_DOMAIN_STRING.get_or_init(|| String::with_capacity(1024));
383+
TEMP_DOMAIN_STRING.set(py, String::with_capacity(1024)).unwrap();
384384
}
385385

386386
m.add_class::<DomainExtractor>()?;

src/public_suffix_list.dat

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7130,7 +7130,7 @@ org.zw
71307130

71317131
// newGTLDs
71327132

7133-
// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2022-04-30T15:14:46Z
7133+
// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2022-05-18T15:16:02Z
71347134
// This list is auto-generated, don't edit it manually.
71357135
// aaa : 2015-02-26 American Automobile Association, Inc.
71367136
aaa
@@ -8851,7 +8851,7 @@ lincoln
88518851
// linde : 2014-12-04 Linde Aktiengesellschaft
88528852
linde
88538853

8854-
// link : 2013-11-14 UNR Corp.
8854+
// link : 2013-11-14 Nova Registry Ltd
88558855
link
88568856

88578857
// lipsy : 2015-06-25 Lipsy Ltd
@@ -12281,6 +12281,10 @@ blogspot.vn
1228112281
// Submitted by Niels Martignene <[email protected]>
1228212282
goupile.fr
1228312283

12284+
// Government of the Netherlands: https://www.government.nl
12285+
// Submitted by <[email protected]>
12286+
gov.nl
12287+
1228412288
// Group 53, LLC : https://www.group53.com
1228512289
// Submitted by Tyler Todd <[email protected]>
1228612290
awsmppl.com
@@ -12357,7 +12361,6 @@ ltd.ng
1235712361
ngo.ng
1235812362
edu.scot
1235912363
sch.so
12360-
org.yt
1236112364

1236212365
// HostyHosting (hostyhosting.com)
1236312366
hostyhosting.io
@@ -13389,6 +13392,12 @@ rocky.page
1338913392
спб.рус
1339013393
я.рус
1339113394

13395+
// Salesforce.com, Inc. https://salesforce.com/
13396+
// Submitted by Michael Biven <[email protected]>
13397+
builder.code.com
13398+
dev-builder.code.com
13399+
stg-builder.code.com
13400+
1339213401
// Sandstorm Development Group, Inc. : https://sandcats.io/
1339313402
// Submitted by Asheesh Laroia <[email protected]>
1339413403
sandcats.io
@@ -13812,6 +13821,15 @@ hk.org
1381213821
ltd.hk
1381313822
inc.hk
1381413823

13824+
// UNIVERSAL DOMAIN REGISTRY : https://www.udr.org.yt/
13825+
// see also: whois -h whois.udr.org.yt help
13826+
// Submitted by Atanunu Igbunuroghene <[email protected]>
13827+
name.pm
13828+
sch.tf
13829+
biz.wf
13830+
sch.wf
13831+
org.yt
13832+
1381513833
// United Gameserver GmbH : https://united-gameserver.de
1381613834
// Submitted by Stefan Schwarz <[email protected]>
1381713835
virtualuser.de

0 commit comments

Comments
 (0)