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

BOM-1538 : Add Python 3.8 to testing #123

Merged
merged 8 commits into from
Apr 30, 2020
Merged

Conversation

mzulqarnain1
Copy link

@mzulqarnain1 mzulqarnain1 commented Apr 20, 2020

Relevant JIRA : https://openedx.atlassian.net/browse/BOM-1538

  • Removed Python 2.7
  • Added Python 3.8 to testing
  • Removed Django versions < 2.2
  • Ran make upgrade
  • Fixed some quality failures

@coveralls
Copy link

coveralls commented Apr 20, 2020

Coverage Status

Coverage decreased (-0.003%) to 95.675% when pulling 76976d0 on zulqarnain/BOM-1538 into 7627a57 on master.

@mzulqarnain1 mzulqarnain1 marked this pull request as ready for review April 20, 2020 11:31
@@ -48,7 +47,7 @@ class Locator(OpaqueKey):
ALLOWED_ID_CHARS = r'[\w\-~.:]'
DEPRECATED_ALLOWED_ID_CHARS = r'[\w\-~.:%]'

@abstractproperty
@property
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why changing this from abstractproperty to property

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abstractproperty is depracated since Python 3.3. This was a failing in quality.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add documentation link.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.travis.yml Outdated Show resolved Hide resolved
@@ -40,7 +40,7 @@ def test_description_locator_url(self):
def test_description_locator_version(self):
object_id = '{:024x}'.format(random.randrange(16 ** 24))
definition_locator = DefinitionLocator('html', object_id)
self.assertEqual(object_id, str(definition_locator.version()))
self.assertEqual(object_id, str(definition_locator.version))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you made this change ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quality failure
definition_locator.version is not callable (not-callable)
we are accessing a property here.

@mzulqarnain1 mzulqarnain1 force-pushed the zulqarnain/BOM-1538 branch 4 times, most recently from ce855da to 99e12c8 Compare April 29, 2020 10:52
@mzulqarnain1 mzulqarnain1 force-pushed the zulqarnain/BOM-1538 branch 2 times, most recently from d57a687 to 15366d8 Compare April 29, 2020 11:35
@mzulqarnain1
Copy link
Author

Hi @jmbowman, every travis job in this PR and code-annotations is failing with following error, @UsamaSadiq and I tried to figure out the problem but no progress so far. Do you have any idea what could be the reason for this?

$ tox -- --hypothesis-profile=ci
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.5.6/bin/tox", line 11, in <module>
    sys.exit(cmdline())
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/tox/session/__init__.py", line 44, in cmdline
    main(args)
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/tox/session/__init__.py", line 64, in main
    config = load_config(args)
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/tox/session/__init__.py", line 80, in load_config
    config = parseconfig(args)
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/tox/config/__init__.py", line 270, in parseconfig
    pm.hook.tox_configure(config=config)  # post process config object
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/toxbat/requirements.py", line 60, in tox_configure
    return _ensure_envs_recreated_on_requirements_update(config)
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/toxbat/requirements.py", line 72, in _ensure_envs_recreated_on_requirements_update
    requires_recreation = are_requirements_changed(env)
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/toxbat/requirements.py", line 95, in are_requirements_changed
    for reqfile in requirement_files
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/toxbat/requirements.py", line 96, in <listcomp>
    if reqfile and os.path.isfile(reqfile)])
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/toxbat/requirements.py", line 126, in is_changed
    new_requirements = parse_pip_requirements(fpath)
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/toxbat/requirements.py", line 109, in parse_pip_requirements
    session=PipSession())
  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/toxbat/requirements.py", line 110, in <genexpr>
    if r.req
AttributeError: 'ParsedRequirement' object has no attribute 'req'
The command "tox -- --hypothesis-profile=ci" exited with 1.

@jmbowman
Copy link
Contributor

pip-tools was upgraded to 5.1.0 (which requires pip>=20), but pip is still pinned at 18.1. The installation of pip-tools noticed that and forced installation of a newer pip version (20.1, released yesterday) which tox-battery doesn't yet work with. Should probably explicitly install pip 20.0.2 for now to maintain compatibility with both pip-tools and tox-battery.

@mzulqarnain1
Copy link
Author

pip-tools was upgraded to 5.1.0 (which requires pip>=20), but pip is still pinned at 18.1. The installation of pip-tools noticed that and forced installation of a newer pip version (20.1, released yesterday) which tox-battery doesn't yet work with. Should probably explicitly install pip 20.0.2 for now to maintain compatibility with both pip-tools and tox-battery.

Thans @jmbowman , It worked like a charm.

@mzulqarnain1 mzulqarnain1 merged commit ec41f7c into master Apr 30, 2020
@feanil feanil deleted the zulqarnain/BOM-1538 branch July 13, 2021 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants