c2cgeoportal-commons 2.9rc80__py3-none-any.whl → 2.9rc82__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.

Potentially problematic release.


This version of c2cgeoportal-commons might be problematic. Click here for more details.

@@ -1,4 +1,4 @@
1
- # Copyright (c) 2013-2024, Camptocamp SA
1
+ # Copyright (c) 2013-2025, Camptocamp SA
2
2
  # All rights reserved.
3
3
 
4
4
  # Redistribution and use in source and binary forms, with or without
@@ -74,15 +74,11 @@ def send_email(
74
74
  msg["Subject"] = subject
75
75
  msg.attach(MIMEText(body, "plain", "utf-8"))
76
76
 
77
- # Connect to server
78
- if smtp_config.get("ssl", False):
79
- smtp: smtplib.SMTP = smtplib.SMTP_SSL(smtp_config["host"])
80
- else:
81
- smtp = smtplib.SMTP(smtp_config["host"])
82
- if smtp_config.get("starttls", False):
83
- smtp.starttls()
84
- if smtp_config.get("user", False):
85
- smtp.login(smtp_config["user"], smtp_config["password"])
86
-
87
- smtp.sendmail(from_addr, to_address, msg.as_string())
88
- smtp.close()
77
+ SMTPClass = smtplib.SMTP_SSL if smtp_config.get("ssl", False) else smtplib.SMTP
78
+ with SMTPClass(smtp_config["host"]) as smtp:
79
+ if smtp_config.get("starttls", False):
80
+ smtp.starttls()
81
+ if smtp_config.get("user", False):
82
+ smtp.login(smtp_config["user"], smtp_config["password"])
83
+
84
+ smtp.sendmail(from_addr, to_address, msg.as_string())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: c2cgeoportal-commons
3
- Version: 2.9rc80
3
+ Version: 2.9rc82
4
4
  Summary: c2cgeoportal commons
5
5
  Home-page: https://github.com/camptocamp/c2cgeoportal/
6
6
  Author: Camptocamp
@@ -71,7 +71,7 @@ c2cgeoportal_commons/alembic/static/aa41e9613256_wip_add_openid_connect_support.
71
71
  c2cgeoportal_commons/alembic/static/ae5e88f35669_add_table_user_role.py,sha256=nDmtAfB90VflhXJDXDUwZQxR0yVpOHhx3zn-GvZB8CU,3436
72
72
  c2cgeoportal_commons/alembic/static/bd029dbfc11a_fill_tech_data_column.py,sha256=OUJuuib1CQYJnPlpv6L7NA6oJfhxIJ4KZbSvU8vVZlE,2132
73
73
  c2cgeoportal_commons/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- c2cgeoportal_commons/lib/email_.py,sha256=2JPWMYJ0CHx-qUMBC6YnFjLwUSAOWtgeDgCS1tTvy-Y,3475
74
+ c2cgeoportal_commons/lib/email_.py,sha256=dKvscltXet1COmtE3ejJtakm3wx3OYHCQl-2o9-nr74,3423
75
75
  c2cgeoportal_commons/lib/literal.py,sha256=AUvu_Gj-fiYgXTdorJV1XLPW0i5bzpWeMxGPl1hTKLg,2023
76
76
  c2cgeoportal_commons/lib/url.py,sha256=yl9vYJmgfoRTAH79UPp6Dt-e5JKwV3cYfELS10O3w0M,8244
77
77
  c2cgeoportal_commons/lib/validators.py,sha256=dF0Qlg6ghMrxwNqV675Juz5fIx9-58f4JimV7SC-sqc,1805
@@ -83,7 +83,7 @@ c2cgeoportal_commons/testing/__init__.py,sha256=E_CJMEWjf87NZMNNp-2OhgcZD6LvxGHp
83
83
  c2cgeoportal_commons/testing/initializedb.py,sha256=jsFzMimA_wPbp0DwniGiM_ekngDyX57mqoI6_ioNPUY,3224
84
84
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
85
85
  tests/conftest.py,sha256=DdCNLXAzOwjztauMELLHQsdzcuQgx83Jfy-0JUu-OCs,1450
86
- c2cgeoportal_commons-2.9rc80.dist-info/METADATA,sha256=Y_-G1ZAl36tpNZSkwX7o7fiFEHzFZJiaPTxuUVYHKs0,1803
87
- c2cgeoportal_commons-2.9rc80.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
88
- c2cgeoportal_commons-2.9rc80.dist-info/top_level.txt,sha256=NWDBsLJav5VgJVX1XzTwUvFShioh9XSi5IaJU_9_YDc,27
89
- c2cgeoportal_commons-2.9rc80.dist-info/RECORD,,
86
+ c2cgeoportal_commons-2.9rc82.dist-info/METADATA,sha256=BJ5IH1TiImPLSVWvwnpZ0t8pYH1JCjaLpBX48SJHaW4,1803
87
+ c2cgeoportal_commons-2.9rc82.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
88
+ c2cgeoportal_commons-2.9rc82.dist-info/top_level.txt,sha256=NWDBsLJav5VgJVX1XzTwUvFShioh9XSi5IaJU_9_YDc,27
89
+ c2cgeoportal_commons-2.9rc82.dist-info/RECORD,,