python-chargepoint 2.3.1__tar.gz → 2.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-chargepoint
3
- Version: 2.3.1
3
+ Version: 2.3.2
4
4
  Summary: A simple, Pythonic wrapper for the ChargePoint API.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-chargepoint"
3
- version = "2.3.1"
3
+ version = "2.3.2"
4
4
  description = "A simple, Pythonic wrapper for the ChargePoint API."
5
5
  authors = ["Marc Billow <mbillow@users.noreply.github.compoetry>"]
6
6
  license = "MIT"
@@ -20,7 +20,7 @@ chargepoint = "python_chargepoint.__main__:cli"
20
20
 
21
21
  [tool.poetry.group.dev.dependencies]
22
22
  tox = "^3.24.5"
23
- black = "^25.1.0"
23
+ black = "^26.1.0"
24
24
  pytest = "^7.0"
25
25
  aioresponses = "^0.7"
26
26
  pytest-asyncio = "^0.23"
@@ -13,7 +13,6 @@ from .constants import _LOGGER
13
13
  from .exceptions import CommunicationError, InvalidSession, LoginError
14
14
  from .types import MapFilter, ZoomBounds
15
15
 
16
-
17
16
  # ---------------------------------------------------------------------------
18
17
  # Helpers
19
18
  # ---------------------------------------------------------------------------
@@ -41,6 +41,7 @@ USER_AGENT = f"{MODULE_NAME}/{MODULE_VERSION}"
41
41
  COULOMB_SESSION = "coulomb_sess"
42
42
  SSO_SESSION = "auth-session"
43
43
  COOKIE_DOMAIN = ".chargepoint.com"
44
+ _COULOMB_SESSION_MAX_AGE = 10 * 365 * 24 * 3600
44
45
 
45
46
 
46
47
  def _require_login(func):
@@ -115,6 +116,7 @@ class ChargePoint:
115
116
  cookie[COULOMB_SESSION] = parsed
116
117
  cookie[COULOMB_SESSION]["domain"] = COOKIE_DOMAIN
117
118
  cookie[COULOMB_SESSION]["path"] = "/"
119
+ cookie[COULOMB_SESSION]["max-age"] = str(_COULOMB_SESSION_MAX_AGE)
118
120
  self._session.cookie_jar.update_cookies(
119
121
  cookie, response_url=URL(f"https://account{COOKIE_DOMAIN}/")
120
122
  )