librus-python-api 1.11.4__py3-none-any.whl → 1.11.5__py3-none-any.whl

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.
@@ -1,7 +1,7 @@
1
1
  """Independent bounded async client. General live compatibility is unqualified."""
2
2
 
3
3
  # Before the imports: config reads it for the User-Agent.
4
- __version__ = "1.11.4"
4
+ __version__ = "1.11.5"
5
5
 
6
6
  from librus_python_api.attachments import AttachmentStream, ModernAttachmentStream
7
7
  from librus_python_api.budget import RequestBudget
@@ -807,6 +807,9 @@ GRADE_POINT_RESULT_PERIODS = MappingProxyType({"I": 1, "II": 2, "R": 0})
807
807
  GRADE_MAX_RECORDS = 2048
808
808
  GRADE_MAX_METADATA_LENGTH = 8192
809
809
  GRADE_MAX_METADATA_FIELDS = 32
810
+ # Non-blank tooltip lines. Free text may span more lines than the tooltip has
811
+ # fields (librus-mcp#136); each line is parsed on its own, so lines stay bounded.
812
+ GRADE_MAX_METADATA_LINES = 256
810
813
  GRADE_MAX_WINDOW_DAYS = 371
811
814
  GRADE_PERIOD_HEADERS = MappingProxyType(
812
815
  {
@@ -13,6 +13,7 @@ from librus_python_api.config import (
13
13
  GRADE_MAX_COLUMNS,
14
14
  GRADE_MAX_METADATA_FIELDS,
15
15
  GRADE_MAX_METADATA_LENGTH,
16
+ GRADE_MAX_METADATA_LINES,
16
17
  TOOLTIP_LABELS,
17
18
  TOOLTIP_MULTILINE_LABELS,
18
19
  TOOLTIP_REPEATABLE_LABELS,
@@ -110,10 +111,14 @@ def tooltip_fields(
110
111
  raise LibrusError(ErrorKind.LIMIT)
111
112
  result: dict[str, str] = {}
112
113
  last: str | None = None
113
- chunks = re.split(r"<br\s*/?>|\n", title, flags=re.I)
114
- if len(chunks) > GRADE_MAX_METADATA_FIELDS:
114
+ # Fields and lines are bounded apart: free text may span more lines than
115
+ # there are fields, and blank lines count toward neither (librus-mcp#136).
116
+ chunks = [
117
+ chunk for chunk in re.split(r"<br\s*/?>|\n", title, flags=re.I) if chunk.strip()
118
+ ]
119
+ if len(chunks) > GRADE_MAX_METADATA_LINES:
115
120
  raise LibrusError(ErrorKind.LIMIT)
116
- lines = [tooltip_line(chunk) for chunk in chunks if chunk.strip()]
121
+ lines = [tooltip_line(chunk) for chunk in chunks]
117
122
  # Start of the closing run of known-label lines, such as Kategoria, Data.
118
123
  closing = len(lines)
119
124
  while closing and _known_label(lines[closing - 1]):
@@ -143,6 +148,8 @@ def tooltip_fields(
143
148
  continue
144
149
  if not separator or not key or key in result:
145
150
  raise LibrusError(ErrorKind.PARSE)
151
+ if len(result) == GRADE_MAX_METADATA_FIELDS:
152
+ raise LibrusError(ErrorKind.LIMIT)
146
153
  result[key] = value
147
154
  last = key
148
155
  return result
@@ -1422,7 +1422,10 @@ class _NumericReferenceWire(BaseModel):
1422
1422
 
1423
1423
  class _AttendanceWire(BaseModel):
1424
1424
  model_config = ConfigDict(strict=True, extra="ignore", hide_input_in_errors=True)
1425
- Id: Annotated[str | None, Field(pattern=r"^[0-9]{1,64}$")] = None
1425
+ # Opaque: a parent login's rows failed a digits-only pattern (librus-mcp#136,
1426
+ # shape unseen). szkolny-android strips non-digits from this ID, which
1427
+ # suggests a prefix such as `t`. It only detects duplicate rows.
1428
+ Id: Annotated[str | None, Field(pattern=r"^[!-~]{1,64}$")] = None
1426
1429
  Date: Annotated[str, Field(pattern=r"^[0-9]{4}-[0-9]{2}-[0-9]{2}$")]
1427
1430
  Semester: Literal[1, 2]
1428
1431
  Type: _NumericReferenceWire
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: librus-python-api
3
- Version: 1.11.4
3
+ Version: 1.11.5
4
4
  Summary: Independent bounded async Librus Synergia client
5
5
  Project-URL: Repository, https://github.com/krzysztofbury/librus-python-api
6
6
  Project-URL: Issues, https://github.com/krzysztofbury/librus-python-api/issues
@@ -42,7 +42,8 @@ private ACLs. Windows installations include `pywin32` and `tzdata` automatically
42
42
  Network paths, reparse-point paths and unsafe storage permissions fail closed.
43
43
  See [platform requirements](contracts/persistence.md#windows-disk-boundary-25).
44
44
 
45
- **Status:** `1.11.4` recovers the messages sign-in after a page that ended the
45
+ **Status:** `1.11.5` reads gateway attendance records whose ID is not a
46
+ number and grade tooltips longer than 32 lines. `1.11.4` recovers the messages sign-in after a page that ended the
46
47
  session, reports e-Justifications switched off for a parent login as
47
48
  `ViewDisabledError`, reads descriptive grade skills that wrap onto a second
48
49
  tooltip line and names the failing field of a gateway JSON envelope.
@@ -89,7 +90,7 @@ See [limitations](#supported-features-and-limitations) below.
89
90
  Install the exact release from PyPI after its gated publication completes:
90
91
 
91
92
  ```sh
92
- python -m pip install librus-python-api==1.11.4
93
+ python -m pip install librus-python-api==1.11.5
93
94
  ```
94
95
 
95
96
  Pin the exact version qualified by your application. Before publication, use a
@@ -105,7 +106,7 @@ python -m pip install .
105
106
  To install a locally built wheel instead:
106
107
 
107
108
  ```sh
108
- python -m pip install ./dist/librus_python_api-1.11.4-py3-none-any.whl
109
+ python -m pip install ./dist/librus_python_api-1.11.5-py3-none-any.whl
109
110
  ```
110
111
 
111
112
  No console script or background process is installed: import the library in your
@@ -1,4 +1,4 @@
1
- librus_python_api/__init__.py,sha256=U3Zvb7FOlKfiyeaO5-b9vY92KJWXhxLXuZG_3AqGN88,6846
1
+ librus_python_api/__init__.py,sha256=dzCJiwjOU6kul6qnJRB1wxnoUF6O2tfDc1VYgy3fKF4,6846
2
2
  librus_python_api/_notification_bootstrap.py,sha256=18nzH0doXBNaZXCz-_ckIvRrlHTWV5Mm1t5m2-5eYGI,4669
3
3
  librus_python_api/_notification_codec.py,sha256=hU6G3zGJ5fR8wfPC6fV2OqBKs-7XpT9eRnKO3FGsTzY,13451
4
4
  librus_python_api/_storage.py,sha256=M_6ZAzN4zs7laOdKJBRH1I2rvy3pgqYgC_MZtsd2xtM,15893
@@ -12,7 +12,7 @@ librus_python_api/budget.py,sha256=8fvqT7eIxyVX2P2OBG27XsYHk_HbtSS4lzuecYpHtgs,2
12
12
  librus_python_api/checkpoint.py,sha256=QBmG9GtpyaGRaFq-FXuGA3yR1BjuMFN9V3RTvvi_FNQ,1930
13
13
  librus_python_api/class_free_days.py,sha256=IwoCgr-9ZgEYYQ6717s4cDpyFzbosHMzESMabXJLGqA,2422
14
14
  librus_python_api/completed_lessons.py,sha256=7TwLbUo67hbxO2Te6PzRfe7UzP94P1eRqfbttn9S3KA,11139
15
- librus_python_api/config.py,sha256=gzFI0gx3sIZU_NiI2JYKT3ernMPzhQ5fG_0WDoHVtFI,67046
15
+ librus_python_api/config.py,sha256=QSmBvOA_QGceFbBDuSv4BeP7T2QjWhuXfOGFUHgwY7I,67237
16
16
  librus_python_api/detail_fields.py,sha256=vDDi5sV-e30-42SF0hwAUoldiZ5wvYtb1UlLt03lBHw,1708
17
17
  librus_python_api/diagnostics.py,sha256=LxcN4BwX1Bn9lk70v0CxWd23-q2H_KlyJzKC6vm2SMQ,21989
18
18
  librus_python_api/exceptions.py,sha256=lymPWTInw_ZBPXWftyHtolnKGfeY2Z4gB5WrqtAVYQ4,6087
@@ -25,10 +25,10 @@ librus_python_api/homework_range.py,sha256=erYfvS6PhHU5XhnR6LkiLNy677hGVflY3UAuH
25
25
  librus_python_api/inspect_page.py,sha256=uSFJRcEd5m36kqqP6kf2uowB4x2RGNqyfnmaakVzL94,5938
26
26
  librus_python_api/justifications.py,sha256=ZzfeZR5TvYyArQ5Oqi6VM5JmBKS2lZok4UR7hc3dI4o,7799
27
27
  librus_python_api/lifecycle.py,sha256=XzA5CEdZFo7iL5IMUrawnRvf2m9BFe0OseP-fpQFaAE,856
28
- librus_python_api/markup.py,sha256=UxZVG9cWZz8VWE--uAPLfyv1Ghcu6ZbFM6E5ysA3YLs,8041
28
+ librus_python_api/markup.py,sha256=KUjlpMwOx_wXGs8znLhCyw2T-T7Eqn0HtxC4GlcIgLc,8361
29
29
  librus_python_api/message_content.py,sha256=v_qoEAoaYS0_9MQBaj57i5XnC7pzv_HHWefgTt4CNyM,9043
30
30
  librus_python_api/messages.py,sha256=K9F8XVs1SojfFpdxxLV8gx9E0g81YxEHjigDzLHmDCg,10230
31
- librus_python_api/models.py,sha256=Eeg0tQhhcP5r6cfU3JpT7I9MZ1ybQR6RnklJ1mgOznI,47125
31
+ librus_python_api/models.py,sha256=668mjX_izi92i2328bGNxnjsRyrZmQjFMVV1hoTdUyo,47351
32
32
  librus_python_api/modern_body.py,sha256=SocXJTyGm1Q_2owzh1PE1zcCB2kqZTz1KPJ2R4yMyoc,3895
33
33
  librus_python_api/modern_mailbox.py,sha256=2jF9UnJZ5AF6dip-GrMcv_z2kSLpp87dIpVeXk9jMzA,20600
34
34
  librus_python_api/modern_messages.py,sha256=qt2CXtrxCZQ-jTt0aQCD6ZaPAJQZXf0BxmvacPo9B0w,10653
@@ -48,7 +48,7 @@ librus_python_api/sending.py,sha256=Nvvk2r-6D6Us53a2fH5GW9PcA6bWEfuOvy6c3M5QVcE,
48
48
  librus_python_api/service.py,sha256=XbC2ZkYQnrTEScpOgK9T1mz2L0i_9GKHUdvtlZQzNCM,107844
49
49
  librus_python_api/timetable.py,sha256=tX1QK9fQABxzfLaHHqTe8e6rAgdOkCoTOfAHdPwNmLE,9836
50
50
  librus_python_api/transport.py,sha256=SAg-LovpilhgmBghjw0snm5DXYQPpgYazyOQzM2T1Aw,35571
51
- librus_python_api-1.11.4.dist-info/METADATA,sha256=TP_m8tG7Jt9khvfGJqno675mGb01xfqethAVbctWWKE,16188
52
- librus_python_api-1.11.4.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
53
- librus_python_api-1.11.4.dist-info/licenses/LICENSE,sha256=IuerLb3cnZCsaB23znydjjvKqP-LmSJd3syKa9NGUts,1071
54
- librus_python_api-1.11.4.dist-info/RECORD,,
51
+ librus_python_api-1.11.5.dist-info/METADATA,sha256=AzH8GtTR1RxK_9259u4iBrYkWXGIH3ZILH1znGsFHJM,16296
52
+ librus_python_api-1.11.5.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
53
+ librus_python_api-1.11.5.dist-info/licenses/LICENSE,sha256=IuerLb3cnZCsaB23znydjjvKqP-LmSJd3syKa9NGUts,1071
54
+ librus_python_api-1.11.5.dist-info/RECORD,,