Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 compatibility test #1505

Closed
cserf opened this issue Aug 29, 2018 · 5 comments

Comments

@cserf
Copy link
Contributor

commented Aug 29, 2018

Motivation

Many files are now python3 compatible. It would be good to have a flag to identify them. The files found as python3 compatible must stay compatible. Any PR submitted that would break the compatibility should be automatically reject by Travis

@XeBoris

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2018

Here are two files which are not py3 compatible:
modified: lib/rucio/rse/protocols/gfal.py:

try:
    import urlparse
except ImportError:
    from urllib import parse as urlparse

modified: lib/rucio/rse/protocols/protocol.py

try:
    import urlparse
except ImportError:
    from urllib import parse as urlparse

try:
    from ConfigParser import NoOptionError, NoSectionError
except:
    from configparser import NoOptionError, NoSectionError
@bari12 bari12 referenced this issue Sep 10, 2018
5 of 5 tasks complete

@bari12 bari12 added the enhancement label Sep 10, 2018

@bari12 bari12 assigned hahahannes and unassigned bari12 Sep 27, 2018

@bari12

This comment has been minimized.

Copy link
Member

commented Sep 27, 2018

Hi @hahahannes can you please prepare some kind of mini-proposal for the Dev meeting in 2 weeks (11.10.) Thanks 😄

hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 5, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 5, 2018

@bari12 bari12 changed the title Python3 compatibility Python3 compatibility test Oct 11, 2018

@bari12 bari12 added Testing and removed Release management labels Oct 11, 2018

@bari12

This comment has been minimized.

Copy link
Member

commented Oct 11, 2018

As discussed in the meeting on 2010-10-11: We should tag the files in the header if they are py3 compatible. This script should be added as a separate test in the travis test matrix. If a file, which is already tagged py3 compatible fails the pylint test, the test should fail.

hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 12, 2018
@hahahannes

This comment has been minimized.

Copy link
Contributor

commented Oct 12, 2018

List of python3 compatible files/directories according to the command:

pylint --py3k -d no-absolute-import [path]

I removed warnings about missing absolute imports. Only the files in bin/ are compatible when it is activated. Not sure if this mandatory for python3 ?

bin
lib/rucio/client/accountclient.py
lib/rucio/client/accountlimitclient.py
lib/rucio/client/baseclient.py
lib/rucio/client/client.py
lib/rucio/client/configclient.py
lib/rucio/client/lifetimeclient.py
lib/rucio/client/lockclient.py
lib/rucio/client/metaclients.py
lib/rucio/client/objectstoreclient.py
lib/rucio/client/pingclient.py
lib/rucio/client/replicaclient.py
lib/rucio/client/rseclient.py
lib/rucio/client/ruleclient.py
lib/rucio/client/scopeclient.py
lib/rucio/client/subscriptionclient.py
lib/rucio/client/touchclient.py
lib/rucio/client/uploadclient.py
lib/rucio/api/account.py
lib/rucio/api/account_limit.py
lib/rucio/api/authentication.py
lib/rucio/api/config.py
lib/rucio/api/credential.py
lib/rucio/api/heartbeat.py
lib/rucio/api/identity.py
lib/rucio/api/lifetime_exception.py
lib/rucio/api/lock.py
lib/rucio/api/meta.py
lib/rucio/api/permission.py
lib/rucio/api/replica.py
lib/rucio/api/request.py
lib/rucio/api/rse.py
lib/rucio/api/rule.py
lib/rucio/api/scope.py
lib/rucio/api/subscription.py
lib/rucio/api/temporary_did.py
lib/rucio/common/config.py
lib/rucio/common/constants.py
lib/rucio/common/exception.py
lib/rucio/common/log.py
lib/rucio/common/rse_attributes.py
lib/rucio/common/schema/atlas.py
lib/rucio/common/schema/cms.py
lib/rucio/common/schema/icecube.py
lib/rucio/common/schema/generic.py
lib/rucio/common/dumper/consistency.py
lib/rucio/core/config.py
lib/rucio/core/distance.py
lib/rucio/core/identity.py
lib/rucio/core/lock.py
lib/rucio/core/message.py
lib/rucio/core/nongrid_trace.py
lib/rucio/core/quarantined_replica.py
lib/rucio/core/rse_selector.py
lib/rucio/core/scope.py
lib/rucio/core/staging.py
lib/rucio/core/temporary_did.py
lib/rucio/core/transfer_limits.py
lib/rucio/core/volatile_replica.py
lib/rucio/daemons/sonar_v3/distribution/distribution_daemon.py
lib/rucio/daemons/c3po/utils/dataset_cache.py
lib/rucio/daemons/c3po/utils/expiring_dataset_cache.py
lib/rucio/daemons/c3po/utils/expiring_list.py
lib/rucio/daemons/c3po/utils/popularity.py
lib/rucio/daemons/c3po/utils/timeseries.py
lib/rucio/daemons/c3po/collectors/agis.py
lib/rucio/daemons/c3po/collectors/free_space.py
lib/rucio/daemons/c3po/collectors/jedi_did.py
lib/rucio/daemons/c3po/collectors/mock_did.py
lib/rucio/daemons/auditor/hdfs.py
lib/rucio/db/sqla/constants.py
lib/rucio/db/sqla/sautils.py
lib/rucio/db/sqla/types.py
lib/rucio/db/sqla/migrate_repo/env.py
lib/rucio/rse/rsemanager.py
lib/rucio/rse/protocols/cache.py
lib/rucio/rse/protocols/dummy.py
lib/rucio/rse/protocols/gfal2.py
lib/rucio/rse/protocols/gsiftp.py
lib/rucio/rse/protocols/http_cache.py
lib/rucio/rse/protocols/mock.py
lib/rucio/rse/protocols/ngarc.py
lib/rucio/rse/protocols/posix.py
lib/rucio/rse/protocols/s3es.py
lib/rucio/rse/protocols/sftp.py
lib/rucio/rse/protocols/xrootd.py
lib/rucio/transfertool/fts3_myproxy.py
lib/rucio/web/ui/main.py
lib/rucio/web/rest/webpy/v1/config.py
lib/rucio/web/rest/webpy/v1/heartbeat.py
lib/rucio/web/rest/webpy/v1/lifetime_exception.py
lib/rucio/web/rest/webpy/v1/meta.py
lib/rucio/web/rest/webpy/v1/ping.py
lib/rucio/web/rest/webpy/v1/request.py
lib/rucio/web/rest/webpy/v1/scope.py
lib/rucio/web/rest/flaskapi/v1/config.py
lib/rucio/web/rest/flaskapi/v1/heartbeat.py
lib/rucio/web/rest/flaskapi/v1/lifetime_exception.py
lib/rucio/web/rest/flaskapi/v1/lock.py
lib/rucio/web/rest/flaskapi/v1/meta.py
lib/rucio/web/rest/flaskapi/v1/ping.py
lib/rucio/web/rest/flaskapi/v1/request.py
lib/rucio/web/rest/flaskapi/v1/scope.py

@bari12

This comment has been minimized.

Copy link
Member

commented Oct 12, 2018

I see, I think it is a bit too clustered to do this based on directories. It might be better if we add a "tag" such as # PY3K COMPATIBLE in the header of the file (below the authors for example) and the test essentially only tests if these tagged files stayed compatible. We just have to be consistent in the future to keep tagging the newly compatible files.

hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 12, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 12, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 12, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 12, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 12, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 15, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018
hahahannes added a commit to hahahannes/rucio that referenced this issue Oct 16, 2018

@bari12 bari12 closed this in #1652 Oct 16, 2018

bari12 added a commit that referenced this issue Oct 16, 2018
Merge pull request #1652 from hahahannes/patch-1505-check_python_3_co…
…mpatibility

Testing: Check python3 compatibility; Fix #1505

@bari12 bari12 added this to the 1.18.4 milestone Oct 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.