random-port 0.0.3__tar.gz → 0.0.5__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.

Potentially problematic release.


This version of random-port might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: random_port
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: Generate a free TCP or UDP random port
5
5
  Author-email: Fabrício Barros Cabral <fabriciofx@gmail.com>
6
6
  License-Expression: MIT
@@ -37,7 +37,7 @@ in your project folder.
37
37
  - To use a TCP random port:
38
38
 
39
39
  ```python
40
- from random_port.core import TcpRandomPort
40
+ from random_port.pool import TcpRandomPort
41
41
 
42
42
  port = TcpRandomPort().value()
43
43
  ```
@@ -45,7 +45,7 @@ port = TcpRandomPort().value()
45
45
  - To use a UDP random port:
46
46
 
47
47
  ```python
48
- from random_port.core import UdpRandomPort
48
+ from random_port.pool import UdpRandomPort
49
49
 
50
50
  port = UdpRandomPort().value()
51
51
  ```
@@ -21,7 +21,7 @@ in your project folder.
21
21
  - To use a TCP random port:
22
22
 
23
23
  ```python
24
- from random_port.core import TcpRandomPort
24
+ from random_port.pool import TcpRandomPort
25
25
 
26
26
  port = TcpRandomPort().value()
27
27
  ```
@@ -29,7 +29,7 @@ port = TcpRandomPort().value()
29
29
  - To use a UDP random port:
30
30
 
31
31
  ```python
32
- from random_port.core import UdpRandomPort
32
+ from random_port.pool import UdpRandomPort
33
33
 
34
34
  port = UdpRandomPort().value()
35
35
  ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "random_port"
7
- version = "0.0.3"
7
+ version = "0.0.5"
8
8
  description = "Generate a free TCP or UDP random port"
9
9
  authors = [{ name = "Fabrício Barros Cabral", email = "fabriciofx@gmail.com" }]
10
10
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: random_port
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: Generate a free TCP or UDP random port
5
5
  Author-email: Fabrício Barros Cabral <fabriciofx@gmail.com>
6
6
  License-Expression: MIT
@@ -37,7 +37,7 @@ in your project folder.
37
37
  - To use a TCP random port:
38
38
 
39
39
  ```python
40
- from random_port.core import TcpRandomPort
40
+ from random_port.pool import TcpRandomPort
41
41
 
42
42
  port = TcpRandomPort().value()
43
43
  ```
@@ -45,7 +45,7 @@ port = TcpRandomPort().value()
45
45
  - To use a UDP random port:
46
46
 
47
47
  ```python
48
- from random_port.core import UdpRandomPort
48
+ from random_port.pool import UdpRandomPort
49
49
 
50
50
  port = UdpRandomPort().value()
51
51
  ```
@@ -2,7 +2,7 @@ LICENSE.txt
2
2
  README.md
3
3
  pyproject.toml
4
4
  random_port/__init__.py
5
- random_port/core.py
5
+ random_port/pool.py
6
6
  random_port.egg-info/PKG-INFO
7
7
  random_port.egg-info/SOURCES.txt
8
8
  random_port.egg-info/dependency_links.txt
@@ -21,7 +21,7 @@
21
21
  # SOFTWARE.
22
22
  import socket
23
23
 
24
- from random_port.core import TcpRandomPort, UdpRandomPort
24
+ from random_port.pool import TcpRandomPort, UdpRandomPort
25
25
 
26
26
 
27
27
  def test_tcp_random_port() -> None:
@@ -47,9 +47,9 @@ def test_tcp_in_use() -> None:
47
47
  server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
48
48
  server.setblocking(False)
49
49
  server.bind((host, begin))
50
- free_port = TcpRandomPort(host, begin, end).value()
51
- assert free_port == end
50
+ port = TcpRandomPort(host, begin, end).value()
52
51
  server.close()
52
+ assert port == end
53
53
 
54
54
 
55
55
  def test_udp_in_use() -> None:
@@ -59,6 +59,6 @@ def test_udp_in_use() -> None:
59
59
  server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
60
60
  server.setblocking(False)
61
61
  server.bind((host, begin))
62
- free_port = UdpRandomPort(host, begin, end).value()
63
- assert free_port == end
62
+ port = UdpRandomPort(host, begin, end).value()
64
63
  server.close()
64
+ assert port == end
File without changes
File without changes