Skip to content

Commit 891f303

Browse files
committed
Remove deprecated features.
1 parent 87f7f5a commit 891f303

File tree

10 files changed

+5
-57
lines changed

10 files changed

+5
-57
lines changed

core/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
install_requires=[
1414
"docker>=4.0.0",
1515
"wrapt",
16-
"deprecation",
1716
],
1817
python_requires=">=3.7",
1918
)

core/testcontainers/core/container.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
from deprecation import deprecated
32
from docker.models.containers import Container
43

54
from testcontainers.core.waiting_utils import wait_container_is_ready
@@ -36,10 +35,6 @@ def with_exposed_ports(self, *ports) -> 'DockerContainer':
3635
self.ports[port] = None
3736
return self
3837

39-
@deprecated(details='Use `with_kwargs`.')
40-
def with_kargs(self, **kargs) -> 'DockerContainer':
41-
return self.with_kwargs(**kargs)
42-
4338
def with_kwargs(self, **kwargs) -> 'DockerContainer':
4439
self._kwargs = kwargs
4540
return self

core/testcontainers/core/generic.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
from testcontainers.core.container import DockerContainer
1515
from testcontainers.core.waiting_utils import wait_container_is_ready
16-
from deprecation import deprecated
1716
ADDITIONAL_TRANSIENT_ERRORS = []
17+
1818
try:
1919
from sqlalchemy.exc import DBAPIError
2020
ADDITIONAL_TRANSIENT_ERRORS.append(DBAPIError)
@@ -57,9 +57,3 @@ def start(self):
5757

5858
def _configure(self):
5959
raise NotImplementedError
60-
61-
62-
class GenericContainer(DockerContainer):
63-
@deprecated(details="Use `DockerContainer`.")
64-
def __init__(self, image):
65-
super(GenericContainer, self).__init__(image)

elasticsearch/testcontainers/elasticsearch/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
import urllib
1616
from typing import Dict
1717

18-
from deprecation import deprecated
19-
2018
from testcontainers.core.container import DockerContainer
2119
from testcontainers.core.waiting_utils import wait_container_is_ready
2220

@@ -100,9 +98,3 @@ def start(self):
10098
super().start()
10199
self._connect()
102100
return self
103-
104-
105-
@deprecated(details='Use `ElasticSearchContainer` with a capital S instead '
106-
'of `ElasticsearchContainer`.')
107-
class ElasticsearchContainer(ElasticSearchContainer):
108-
pass

mysql/testcontainers/mysql/__init__.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1111
# License for the specific language governing permissions and limitations
1212
# under the License.
13-
from deprecation import deprecated
1413
from os import environ
1514

1615
from testcontainers.core.generic import DbContainer
@@ -69,20 +68,3 @@ def get_connection_url(self):
6968
password=self.MYSQL_PASSWORD,
7069
db_name=self.MYSQL_DATABASE,
7170
port=self.port_to_expose)
72-
73-
74-
class MariaDbContainer(MySqlContainer):
75-
"""
76-
Maria database container, a commercially-supported fork of MySql.
77-
78-
Example
79-
-------
80-
.. doctest::
81-
82-
with MariaDbContainer("mariadb:latest") as mariadb:
83-
e = sqlalchemy.create_engine(mariadb.get_connection_url())
84-
result = e.execute("select version()")
85-
"""
86-
@deprecated(details="Use `MySqlContainer` with 'mariadb:latest' image.")
87-
def __init__(self, image="mariadb:latest", **kwargs):
88-
super(MariaDbContainer, self).__init__(image, **kwargs)

nginx/testcontainers/nginx/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1111
# License for the specific language governing permissions and limitations
1212
# under the License.
13-
from deprecation import deprecated
1413
from testcontainers.core.container import DockerContainer
1514

1615

1716
class NginxContainer(DockerContainer):
18-
@deprecated(details="Use `DockerContainer` with 'nginx:latest' image and expose port 80.")
1917
def __init__(self, image="nginx:latest", port_to_expose=80, **kwargs):
2018
super(NginxContainer, self).__init__(image, **kwargs)
2119
self.port_to_expose = port_to_expose

requirements/3.10.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ cryptography==36.0.2
134134
# secretstorage
135135
cx-oracle==8.3.0
136136
# via testcontainers-oracle
137-
deprecation==2.1.0
138-
# via testcontainers-core
139137
distro==1.8.0
140138
# via docker-compose
141139
dnspython==2.2.1
@@ -237,7 +235,6 @@ outcome==1.2.0
237235
# via trio
238236
packaging==22.0
239237
# via
240-
# deprecation
241238
# docker
242239
# pytest
243240
# sphinx
@@ -344,7 +341,7 @@ requests-toolbelt==0.9.1
344341
# twine
345342
rfc3986==2.0.0
346343
# via twine
347-
rich==13.0.0
344+
rich==13.0.1
348345
# via twine
349346
rsa==4.9
350347
# via

requirements/3.7.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ cryptography==36.0.2
140140
# secretstorage
141141
cx-oracle==8.3.0
142142
# via testcontainers-oracle
143-
deprecation==2.1.0
144-
# via testcontainers-core
145143
distro==1.8.0
146144
# via docker-compose
147145
dnspython==2.2.1
@@ -253,7 +251,6 @@ outcome==1.2.0
253251
# via trio
254252
packaging==22.0
255253
# via
256-
# deprecation
257254
# docker
258255
# pytest
259256
# sphinx
@@ -360,7 +357,7 @@ requests-toolbelt==0.9.1
360357
# twine
361358
rfc3986==2.0.0
362359
# via twine
363-
rich==13.0.0
360+
rich==13.0.1
364361
# via twine
365362
rsa==4.9
366363
# via

requirements/3.8.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ cryptography==36.0.2
138138
# secretstorage
139139
cx-oracle==8.3.0
140140
# via testcontainers-oracle
141-
deprecation==2.1.0
142-
# via testcontainers-core
143141
distro==1.8.0
144142
# via docker-compose
145143
dnspython==2.2.1
@@ -244,7 +242,6 @@ outcome==1.2.0
244242
# via trio
245243
packaging==22.0
246244
# via
247-
# deprecation
248245
# docker
249246
# pytest
250247
# sphinx
@@ -351,7 +348,7 @@ requests-toolbelt==0.9.1
351348
# twine
352349
rfc3986==2.0.0
353350
# via twine
354-
rich==13.0.0
351+
rich==13.0.1
355352
# via twine
356353
rsa==4.9
357354
# via

requirements/3.9.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ cryptography==36.0.2
134134
# secretstorage
135135
cx-oracle==8.3.0
136136
# via testcontainers-oracle
137-
deprecation==2.1.0
138-
# via testcontainers-core
139137
distro==1.8.0
140138
# via docker-compose
141139
dnspython==2.2.1
@@ -238,7 +236,6 @@ outcome==1.2.0
238236
# via trio
239237
packaging==22.0
240238
# via
241-
# deprecation
242239
# docker
243240
# pytest
244241
# sphinx
@@ -345,7 +342,7 @@ requests-toolbelt==0.9.1
345342
# twine
346343
rfc3986==2.0.0
347344
# via twine
348-
rich==13.0.0
345+
rich==13.0.1
349346
# via twine
350347
rsa==4.9
351348
# via

0 commit comments

Comments
 (0)