amusecode / amuse

Astrophysical Multipurpose Software Environment. This is the main repository for AMUSE
http://www.amusecode.org
Apache License 2.0
158 stars 99 forks source link

Remove keyword collisions #305

Open rieder opened 6 years ago

rieder commented 6 years ago

Describe the bug amuse/rfi/core.py line 126 defines an "async" function. In Python 3.5+, async is a reserved keyword (https://www.python.org/dev/peps/pep-0492/). We may need to rename this function to prevent "invalid syntax" errors.

ipelupessy commented 6 years ago

I don't think its a big problem since the async are class methods?? (there are other collisions in the code..)

ipelupessy commented 6 years ago

we can maybe gather those here?

rieder commented 6 years ago

we can maybe gather those here?

good idea. I'll rename the issue.

ipelupessy commented 5 years ago

new option for async as keyword argument to function calls (#339 )

evertrol commented 5 years ago

FWIW: the use of async is a definite showstopper for trying to use Amuse with Python 3.7, since it's a reserved keyword as of 3.7.

ipelupessy commented 5 years ago

ok, asyncawait was introduced in 3.5 and 3.6 but 3.7 makes it reserved..so will change

fjansson commented 5 years ago

After discussing with Inti, I like the following:

rieder commented 5 years ago

sounds good to me.

ipelupessy commented 5 years ago

async is fixed (4b48747)

ipelupessy commented 5 years ago

other cases (not specific to python 3):

ipelupessy commented 5 years ago
rieder commented 5 years ago

359 is a duplicate of this issue

ipelupessy commented 5 years ago

i think for "object" as used in the interface definitions (define_parameters, define_methods etc ) this can be replaced by "handler" (these instances of amuse.support.interface.HandleParameters etc)

rieder commented 5 years ago

yes, that sounds good.

rieder commented 5 years ago
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.