Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Use portend for port checking/waiting #1332
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.
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.
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.