These are chat archives for cherrypy/cherrypy

6th
Oct 2017
Jason R. Coombs
@jaraco
Oct 06 2017 10:16
Looks like I broke the build with a recent commit. I’ll see if I can ascertain why.
Sviatoslav Sydorenko
@webknjaz
Oct 06 2017 10:31

@jaraco I'm not sure why you do this check: https://github.com/cherrypy/cherrypy/commit/094f0c135b9b66c4e130bda774b2768fe854c276#diff-77ecec7793055dabedd551bc3a4001b3R39

If you're trying to avoid importing cherrypy from the folder in CWD it won't work anyway. import picks package from CWD first

Here's a better way: https://hynek.me/articles/testing-packaging/#src

Jason R. Coombs
@jaraco
Oct 06 2017 11:15
I do that check to ensure that cherrypy wasn’t somehow imported by test discovery or other behaviors.
I’m pretty sure by removing sys.path[0], I eliminate the possibility of cherrypy being imported from CWD, though you’re welcome to prove me wrong.
I don’t want to use a src directory. It adds a layer of abstraction that causes problems with develop installs, adds more boilerplate code, and means the package can’t be used naturally. I very much prefer the natural form of the package.
Sviatoslav Sydorenko
@webknjaz
Oct 06 2017 11:53
seems you're right