- update to 1.6.0:
* Resolve an internal source of potential flakiness on the
bind/close port
* checks when used in active environments by calling
`.shutdown()` before `.close()`.
* Add `-h` and `--help` text to the command line tool.
* The command line interface now defaults to associating the
returned port with its parent process PID (usually the calling
script) when no argument was given as that makes more sense.
* When portpicker is used as a command line tool from a
script, if a port is chosen without a portserver it can now
be kept bound to a socket by a child process for a user
specified timeout. When successful, this helps
minimize race conditions as subsequent portpicker CLI
invocations within the timeout window cannot choose the same
port.
* Some pylint based refactorings to portpicker and
portpicker\_test.
* Drop 3.6 from our CI test matrix and metadata. It probably
still works there, but expect our unittests to include
3.7-ism's in the future. We'll *attempt* to avoid modern
constructs in portpicker.py itself but zero
guarantees. Using an old Python? Use an old portpicker.
OBS-URL: https://build.opensuse.org/request/show/1137821
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-portpicker?expand=0&rev=7
* Resolve an internal source of potential flakiness on the
bind/close port
* checks when used in active environments by calling
`.shutdown()` before `.close()`.
* Add `-h` and `--help` text to the command line tool.
* The command line interface now defaults to associating the
returned port with its parent process PID (usually the calling
script) when no argument was given as that makes more sense.
* When portpicker is used as a command line tool from a
script, if a port is chosen without a portserver it can now
be kept bound to a socket by a child process for a user
specified timeout. When successful, this helps
minimize race conditions as subsequent portpicker CLI
invocations within the timeout window cannot choose the same
port.
* Some pylint based refactorings to portpicker and
portpicker\_test.
* Drop 3.6 from our CI test matrix and metadata. It probably
still works there, but expect our unittests to include
3.7-ism's in the future. We'll *attempt* to avoid modern
constructs in portpicker.py itself but zero
guarantees. Using an old Python? Use an old portpicker.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-portpicker?expand=0&rev=16
- version update to 1.3.1
* Fix a race condition in `pick_unused_port()` involving the free ports set.
* Adds an optional `portserver_address` parameter to `pick_unused_port()` so
that callers can specify their own regardless of `os.environ`.
* `pick_unused_port()` now raises `NoFreePortFoundError` when no available port
could be found rather than spinning in a loop trying forever.
* Fall back to `socket.AF_INET` when `socket.AF_UNIX` support is not available
to communicate with a portserver.
* Introduced `add_reserved_port()` and `return_port()` APIs to allow ports to
be recycled and allow users to bring ports of their own.
* Changed default port range to 15000-24999 to avoid ephemeral ports.
* Portserver bugfix.
- convert to single spec
- run test
OBS-URL: https://build.opensuse.org/request/show/704702
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-portpicker?expand=0&rev=2