You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/12/20 12:51:43 UTC

[incubator-ponymail-foal] branch master updated (ca4387f -> 699e6ef)

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git.


    from ca4387f  Update versions
     new 70de0e1  Simplify
     new 699e6ef  Update versions

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 server/main.py           | 4 +---
 server/server_version.py | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

Re: [incubator-ponymail-foal] 01/02: Simplify

Posted by sebb <se...@gmail.com>.
On Wed, 29 Dec 2021 at 17:41, Daniel Gruno <hu...@apache.org> wrote:
>
> On 20/12/2021 06.51, sebb@apache.org wrote:
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > sebb pushed a commit to branch master
> > in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
> >
> > commit 70de0e188d52ef300e31c9d3abf952bef44650d4
> > Author: Sebb <se...@apache.org>
> > AuthorDate: Mon Dec 20 12:51:18 2021 +0000
> >
> >      Simplify
> > ---
> >   server/main.py | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/server/main.py b/server/main.py
> > index 7288429..6f31a44 100644
> > --- a/server/main.py
> > +++ b/server/main.py
> > @@ -206,12 +206,10 @@ class Server(plugins.server.BaseServer):
> >           await plugins.background.run_tasks(self)
> >
> >       def run(self):
> > -        loop = asyncio.get_event_loop()
> >           try:
> > -            loop.run_until_complete(self.server_loop())
> > +            asyncio.run(self.server_loop())
>
> This breaks foal badly when running multiple instances, as they will all
> attempt to attach themselves to the same master loop, so I've reverted
> the code.

I changed it partly because I was seeing the following:

/server/main.py:215: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()

See:
https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop

The call will likely fail when it becomes an alias for
get_running_loop(), so I think it needs to be fixed.


>
> >           except KeyboardInterrupt:
> >               pass
> > -        loop.close()
> >
> >
> >   if __name__ == "__main__":
>

Re: [incubator-ponymail-foal] 01/02: Simplify

Posted by Daniel Gruno <hu...@apache.org>.
On 20/12/2021 06.51, sebb@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> sebb pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
> 
> commit 70de0e188d52ef300e31c9d3abf952bef44650d4
> Author: Sebb <se...@apache.org>
> AuthorDate: Mon Dec 20 12:51:18 2021 +0000
> 
>      Simplify
> ---
>   server/main.py | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/server/main.py b/server/main.py
> index 7288429..6f31a44 100644
> --- a/server/main.py
> +++ b/server/main.py
> @@ -206,12 +206,10 @@ class Server(plugins.server.BaseServer):
>           await plugins.background.run_tasks(self)
>   
>       def run(self):
> -        loop = asyncio.get_event_loop()
>           try:
> -            loop.run_until_complete(self.server_loop())
> +            asyncio.run(self.server_loop())

This breaks foal badly when running multiple instances, as they will all 
attempt to attach themselves to the same master loop, so I've reverted 
the code.


>           except KeyboardInterrupt:
>               pass
> -        loop.close()
>   
>   
>   if __name__ == "__main__":


[incubator-ponymail-foal] 01/02: Simplify

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 70de0e188d52ef300e31c9d3abf952bef44650d4
Author: Sebb <se...@apache.org>
AuthorDate: Mon Dec 20 12:51:18 2021 +0000

    Simplify
---
 server/main.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/server/main.py b/server/main.py
index 7288429..6f31a44 100644
--- a/server/main.py
+++ b/server/main.py
@@ -206,12 +206,10 @@ class Server(plugins.server.BaseServer):
         await plugins.background.run_tasks(self)
 
     def run(self):
-        loop = asyncio.get_event_loop()
         try:
-            loop.run_until_complete(self.server_loop())
+            asyncio.run(self.server_loop())
         except KeyboardInterrupt:
             pass
-        loop.close()
 
 
 if __name__ == "__main__":

[incubator-ponymail-foal] 02/02: Update versions

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 699e6efaadd93bfe9a28b34dc6e099ed145af15d
Author: Sebb <se...@apache.org>
AuthorDate: Mon Dec 20 12:51:36 2021 +0000

    Update versions
---
 server/server_version.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/server_version.py b/server/server_version.py
index 21b9751..b1093cc 100644
--- a/server/server_version.py
+++ b/server/server_version.py
@@ -1,2 +1,2 @@
 # This file is generated by server/update_version.sh
-PONYMAIL_SERVER_VERSION = 'cc41f2c'
+PONYMAIL_SERVER_VERSION = '70de0e1'