Original comment byJason R. Coombs (Bitbucket: jaraco, GitHub: jaraco):
In my fork, I've added this commit as a point of discussion. I've not tested the patch, only drafted it, but please do comment on the approach.
I note that while this patch does add the first dependency on CherryPy, the concept of dependencies has been already approved. The focus here should be on the value of using the implementation in portend or keeping a separate implementation in CherryPy.
@jaraco to use it, first switch tests to run against all supported versions.
And there's a dependency for tempora.timing. Don't you think it's an overhead to depend on another package just to use a stopwatch?
It is extra overhead, and yes, it's worth the overhead. After several years of accepting that 'copy/paste' is acceptable, I'm of the opinion that if someone is willing to maintain a library with suitable functionality that it's better to use that library than to create a fork of that functionality (by inlining it). The maintenance costs of subtly divergent implementations of essentially the same functionality are far greater than the costs of incorporating dependencies.
Originally reported by: Jason R. Coombs (Bitbucket: jaraco, GitHub: jaraco)
I've extracted and made more general purpose the port checking routines in cherrypy.process.servers in a new package called portend.
CherryPy should consider using that package.
The text was updated successfully, but these errors were encountered: