Just an update to the below.
It seems that the from . import 'whatever' is where the issue is with the
reloader as if I do for example import os or import datetime in the
__init__.py they both show up in the list of dependencies. Anything with a
from . import 'whatever' just lists the apps/myapp as a dependency
BR
John
On Sunday, 19 May 2019 11:38:07 UTC+2, John Bannister wrote:
>
> Hi Guys,
>
> Couple of things.
>
> 1: I added a print('Dependancies %s ' % reloader.get_dependencies(module))
> just before the output to console in web3py/core.py.
>
> Here is the output (not formatted):-
>
> Dashboard is at: http://127.0.0.1:8000/_dashboard
> [ ] loading examples ...
> Dependancies None
> [A[OK] loaded examples
> [ ] loading myapp ...
> Dependancies None
> [A[OK] loaded myapp
> [ ] loading superheroes ...
> Dependancies None
> [A[OK] loaded superheroes
> [ ] loading todo ...
> Dependancies None
> [A[OK] loaded todo
> [ ] loading _dashboard ...
> Dependancies None
> [A[OK] loaded _dashboard
> [ ] loading _scaffold ...
> Dependancies None
> [A[OK] loaded _scaffold
> Bottle v0.12.16 server starting up (using TornadoServer())...
> Listening on http://127.0.0.1:8010/
> Hit Ctrl-C to quit.
>
> As expected no dependancies on initial load
>
> After reload :-
>
> [ ] reloading examples ...
> Dependancies [<module 'os' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\os.py'>,
> <module 'web3py' from 'C:\\Users\\johhb\\web3py\\web3py\\__init__.py'>,
> <module 'web3py.utils.form' from
> 'C:\\Users\\johhb\\web3py\\web3py\\utils\\form.py'>, <module
> 'pydal.validators' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\validators.py'>,
>
> <module 'yatl.helpers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\yatl\\helpers.py'>,
>
> <module 'pydal.drivers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\drivers.py'>,
>
> <module 'pydal.adapters' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\adapters\\__init__.py'>,
>
> <module 'pydal.dialects' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\dialects\\__init__.py'>,
>
> <module 'pydal.parsers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\parsers\\__init__.py'>,
>
> <module 'pydal.representers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\representers\\__init__.py'>,
>
> <module 'pydal.base' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\base.py'>]
> [A[OK] reloaded examples
> [ ] reloading myapp ...
> Dependancies [<module 'apps.myapp' from
> 'C:\\Users\\johhb\\web3py\\apps\\myapp\\__init__.py'>, <module 'apps.myapp'
> from 'C:\\Users\\johhb\\web3py\\apps\\myapp\\__init__.py'>]
> [A[OK] reloaded myapp
> [ ] reloading superheroes ...
> Dependancies [<module 'os' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\os.py'>,
> <module 'web3py' from 'C:\\Users\\johhb\\web3py\\web3py\\__init__.py'>,
> <module 'pydal.drivers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\drivers.py'>,
>
> <module 'pydal.adapters' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\adapters\\__init__.py'>,
>
> <module 'pydal.dialects' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\dialects\\__init__.py'>,
>
> <module 'pydal.parsers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\parsers\\__init__.py'>,
>
> <module 'pydal.representers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\representers\\__init__.py'>,
>
> <module 'pydal.base' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\base.py'>,
>
> <module 'pydal.base' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\base.py'>,
>
> <module 'pydal.base' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\base.py'>,
>
> <module 'pydal.base' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\base.py'>]
> [A[OK] reloaded superheroes
> [ ] reloading todo ...
> Dependancies [<module 'os' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\os.py'>,
> <module 'web3py' from 'C:\\Users\\johhb\\web3py\\web3py\\__init__.py'>,
> <module 'pydal.drivers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\drivers.py'>,
>
> <module 'pydal.adapters' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\adapters\\__init__.py'>,
>
> <module 'pydal.dialects' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\dialects\\__init__.py'>,
>
> <module 'pydal.parsers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\parsers\\__init__.py'>,
>
> <module 'pydal.representers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\representers\\__init__.py'>,
>
> <module 'pydal.base' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\pydal\\base.py'>]
> [A[OK] reloaded todo
> [ ] reloading _dashboard ...
> Dependancies [<module 'os' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\os.py'>,
> <module 'datetime' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\datetime.py'>,
>
> <module 'web3py' from 'C:\\Users\\johhb\\web3py\\web3py\\__init__.py'>,
> <module 'web3py.core' from 'C:\\Users\\johhb\\web3py\\web3py\\core.py'>,
> <module 'yatl.helpers' from
> 'C:\\Users\\johhb\\AppData\\Local\\Programs\\Python\\Python3\\lib\\site-packages\\yatl\\helpers.py'>]
> [A[OK] reloaded _dashboard
> [ ] reloading _scaffold ...
> Dependancies [<module 'apps._scaffold' from
> 'C:\\Users\\johhb\\web3py\\apps\\_scaffold\\__init__.py'>, <module
> 'apps._scaffold.models' from
> 'C:\\Users\\johhb\\web3py\\apps\\_scaffold\\models.py'>]
> [A[OK] reloaded _scaffold
>
> I was actually expecting to see the models and controllers as dependancies
> as they are imported via __init__.py but they are not listed (dont know if
> this is taken care of by __init__.py. @Massimo ??
>
> So for the sake of completeness I add a print() message to the last line
> of myapp/__init__.py and to controllers.py and on reload I see the output
> from __init__.py but not the print() I put in controllers.py which to me
> indicates that neither the controllers.py nor the models.py are being
> reloaded.
>
> Hope this helps
> BR
> John
>
>
>
> On Sunday, 19 May 2019 02:37:38 UTC+2, 黄祥 wrote:
>>
>> understood, my bad, just test it n report it what think related with the
>> problem
>> @massimo
>> should this thing address an issue in github, so that you can focus
>> release the first version of web3py ?
>>
>> best regards,
>> stifan
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/5a936eef-a7d2-4efc-829e-0e5a93a24ab9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.