signinwithethereum 5.0.1__tar.gz → 5.0.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.
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/PKG-INFO +2 -2
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/pyproject.toml +1 -1
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/siwe/grammars/eip4361.py +1 -8
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/siwe/grammars/rfc3339.py +1 -8
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/tests/test_siwe.py +15 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/uv.lock +5 -5
- signinwithethereum-5.0.1/siwe/grammars/rfc5234.py +0 -20
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/.codex +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/.github/workflows/publish.yml +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/.gitignore +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/.gitmodules +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/LICENSE-APACHE +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/LICENSE-MIT +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/README.md +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/siwe/__init__.py +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/siwe/defs.py +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/siwe/grammars/__init__.py +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/siwe/parsed.py +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/siwe/siwe.py +0 -0
- {signinwithethereum-5.0.1 → signinwithethereum-5.0.2}/tests/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: signinwithethereum
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.2
|
|
4
4
|
Summary: A Python implementation of Sign in with Ethereum (EIP-4361).
|
|
5
5
|
Project-URL: Homepage, https://siwe.xyz
|
|
6
6
|
Project-URL: Repository, https://github.com/signinwithethereum/siwe-py
|
|
@@ -6,7 +6,7 @@ from abnf.grammars import rfc3986
|
|
|
6
6
|
from abnf.grammars.misc import load_grammar_rules
|
|
7
7
|
from abnf.parser import Rule as _Rule
|
|
8
8
|
|
|
9
|
-
from . import rfc3339
|
|
9
|
+
from . import rfc3339
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
@load_grammar_rules(
|
|
@@ -17,13 +17,7 @@ from . import rfc3339, rfc5234
|
|
|
17
17
|
("scheme", rfc3986.Rule("scheme")),
|
|
18
18
|
("reserved", rfc3986.Rule("reserved")),
|
|
19
19
|
("unreserved", rfc3986.Rule("unreserved")),
|
|
20
|
-
("reserved", rfc3986.Rule("reserved")),
|
|
21
20
|
("pchar", rfc3986.Rule("pchar")),
|
|
22
|
-
# RFC 5234
|
|
23
|
-
("LF", rfc5234.Rule("LF")),
|
|
24
|
-
("HEXDIG", rfc5234.Rule("HEXDIG")),
|
|
25
|
-
("ALPHA", rfc5234.Rule("ALPHA")),
|
|
26
|
-
("DIGIT", rfc5234.Rule("DIGIT")),
|
|
27
21
|
# RFC 3339
|
|
28
22
|
("date-time", rfc3339.Rule("date-time")),
|
|
29
23
|
]
|
|
@@ -41,7 +35,6 @@ class Rule(_Rule):
|
|
|
41
35
|
"domain = authority",
|
|
42
36
|
'address = "0x" 40HEXDIG',
|
|
43
37
|
'statement = *( reserved / unreserved / " " )',
|
|
44
|
-
"uri = URI",
|
|
45
38
|
'version = "1"',
|
|
46
39
|
"nonce = 8*( ALPHA / DIGIT )",
|
|
47
40
|
"issued-at = date-time",
|
|
@@ -5,15 +5,8 @@ from typing import ClassVar, List
|
|
|
5
5
|
from abnf.grammars.misc import load_grammar_rules
|
|
6
6
|
from abnf.parser import Rule as _Rule
|
|
7
7
|
|
|
8
|
-
from . import rfc5234
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
@load_grammar_rules(
|
|
12
|
-
[
|
|
13
|
-
# RFC 5234
|
|
14
|
-
("DIGIT", rfc5234.Rule("DIGIT")),
|
|
15
|
-
]
|
|
16
|
-
)
|
|
9
|
+
@load_grammar_rules()
|
|
17
10
|
class Rule(_Rule):
|
|
18
11
|
"""Rules from RFC 3339."""
|
|
19
12
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import os
|
|
3
|
+
import subprocess
|
|
4
|
+
import sys
|
|
3
5
|
|
|
4
6
|
import abnf
|
|
5
7
|
import pytest
|
|
@@ -541,3 +543,16 @@ class TestValidSpecification:
|
|
|
541
543
|
siwe_message = SiweMessage.from_message(message=test["msg"], abnf=abnf_mode)
|
|
542
544
|
for key, value in test["items"].items():
|
|
543
545
|
assert getattr(siwe_message, key) == value
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
def test_grammar_loads_without_grammar_warnings():
|
|
549
|
+
# Grammars load once per process at import, so check in a fresh interpreter.
|
|
550
|
+
code = (
|
|
551
|
+
"import warnings, abnf\n"
|
|
552
|
+
"warnings.simplefilter('error', getattr(abnf, 'GrammarWarning', UserWarning))\n"
|
|
553
|
+
"import siwe.grammars.eip4361\n"
|
|
554
|
+
)
|
|
555
|
+
result = subprocess.run(
|
|
556
|
+
[sys.executable, "-c", code], capture_output=True, text=True
|
|
557
|
+
)
|
|
558
|
+
assert result.returncode == 0, result.stderr
|
|
@@ -4,11 +4,11 @@ requires-python = ">=3.10, <4.0"
|
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "abnf"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.9.0"
|
|
8
8
|
source = { registry = "https://pypi.org/simple" }
|
|
9
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
9
|
+
sdist = { url = "https://files.pythonhosted.org/packages/78/55/5514e564539e23a4948795695d5f25c184f0e02ac18695db1c8d5e6f3d05/abnf-2.9.0.tar.gz", hash = "sha256:45af3643da2281e34b03fba467bdeb09797f5552d140907a578c2d8ec10fcdd5", size = 1088572, upload-time = "2026-08-27T11:12:45.963Z" }
|
|
10
10
|
wheels = [
|
|
11
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
11
|
+
{ url = "https://files.pythonhosted.org/packages/43/4c/cb77419f4dd5e6086550a05f4bce9eb521c80a2b877215065331c2b476b7/abnf-2.9.0-py3-none-any.whl", hash = "sha256:8592e174c05cc6010f5250f2292b832993f92e2ae136d7618368ee89d649435e", size = 78100, upload-time = "2026-08-27T11:12:44.185Z" },
|
|
12
12
|
]
|
|
13
13
|
|
|
14
14
|
[[package]]
|
|
@@ -774,7 +774,7 @@ name = "exceptiongroup"
|
|
|
774
774
|
version = "1.3.1"
|
|
775
775
|
source = { registry = "https://pypi.org/simple" }
|
|
776
776
|
dependencies = [
|
|
777
|
-
{ name = "typing-extensions"
|
|
777
|
+
{ name = "typing-extensions" },
|
|
778
778
|
]
|
|
779
779
|
sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" }
|
|
780
780
|
wheels = [
|
|
@@ -1633,7 +1633,7 @@ wheels = [
|
|
|
1633
1633
|
|
|
1634
1634
|
[[package]]
|
|
1635
1635
|
name = "signinwithethereum"
|
|
1636
|
-
version = "5.0.
|
|
1636
|
+
version = "5.0.1"
|
|
1637
1637
|
source = { editable = "." }
|
|
1638
1638
|
dependencies = [
|
|
1639
1639
|
{ name = "abnf" },
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"""Primitive ABNF definition."""
|
|
2
|
-
|
|
3
|
-
from typing import ClassVar, List
|
|
4
|
-
|
|
5
|
-
from abnf.grammars.misc import load_grammar_rules
|
|
6
|
-
from abnf.parser import Rule as _Rule
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@load_grammar_rules()
|
|
10
|
-
class Rule(_Rule):
|
|
11
|
-
"""Rules from RFC 5234."""
|
|
12
|
-
|
|
13
|
-
grammar: ClassVar[List] = [
|
|
14
|
-
"ALPHA = %x41-5A / %x61-7A ; A-Z / a-z",
|
|
15
|
-
"LF = %x0A \
|
|
16
|
-
; linefeed",
|
|
17
|
-
"DIGIT = %x30-39 \
|
|
18
|
-
; 0-9",
|
|
19
|
-
'HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"',
|
|
20
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|