Skip to content

Commit

Permalink
Merge pull request #519 from linsword13/py12-support
Browse files Browse the repository at this point in the history
Cleanup items
  • Loading branch information
douglasjacobsen authored Jun 1, 2024
2 parents 4fb6c71 + 0bbab19 commit 90490cb
Show file tree
Hide file tree
Showing 34 changed files with 42 additions and 163 deletions.
7 changes: 2 additions & 5 deletions bin/ramble
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ from __future__ import print_function
import os
import sys

if sys.version_info[:2] < (2, 6):
if sys.version_info[:2] < (3, 6):
v_info = sys.version_info[:3]
sys.exit("Ramble requires Python 2.6 or higher." "This is Python %d.%d.%d." % v_info)
sys.exit("Ramble requires Python 3.6 or higher." "This is Python %d.%d.%d." % v_info)

# Find ramble's location and its prefix.
ramble_file = os.path.realpath(os.path.expanduser(__file__))
Expand All @@ -45,9 +45,6 @@ sys.path.insert(0, ramble_lib_path)
# Add external libs
ramble_external_libs = os.path.join(ramble_lib_path, "external")

if sys.version_info[:2] == (2, 6):
sys.path.insert(0, os.path.join(ramble_external_libs, "py26"))

sys.path.insert(0, ramble_external_libs)

# Here we delete ruamel.yaml in case it has been already imported from site
Expand Down
127 changes: 0 additions & 127 deletions lib/ramble/external/py26/ordereddict.py

This file was deleted.

5 changes: 5 additions & 0 deletions lib/ramble/ramble/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from ramble.util.logger import logger
import spack.util.debug
import spack.util.environment
from spack.util.executable import CommandNotFoundError
import spack.util.path
from ramble.error import RambleError

Expand Down Expand Up @@ -979,6 +980,10 @@ def main(argv=None):
logger.debug(e)
e.die() # gracefully die on any RambleErrors

except CommandNotFoundError as e:
e.message = e.message.replace("spack requires", "ramble requires")
raise

except KeyboardInterrupt:
if ramble.config.get("config:debug"):
raise
Expand Down
6 changes: 5 additions & 1 deletion lib/ramble/ramble/test/cmd/flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
@deprecation.fail_if_not_removed
def test_flake8_deprecation():
# Call `ramble flake8` to trigger the deprecation assertion.
flake8("-U")
# Do not test on actual sources, since we don't actually want
# to verify styles using this command, which may diverge from
# `ramble style`. One such divergence is on modifiers, where
# the style command has additional flake8 exemptions.
flake8("-U", "/dev/null")
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 99
target-version = ["py36", "py37", "py38", "py39", "py310", "py311"]
target-version = ["py36", "py37", "py38", "py39", "py310", "py311", "py312"]
include = '''
\.pyi?$
'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class AppendEnvVarModPaths(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class AppendEnvVarModVars(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class GlobPatternsMod(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class Maintained1(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class Maintained2(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *
from ramble.util.logger import logger


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class MultipleModesNoDefault(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class MultipleModesWithDefault(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class NoDocstringMod(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class NoVariableMods(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class PrepareAnalysis(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class PrependEnvVarModPaths(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class SetEnvVarMod(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class SpackFailedReqs(SpackModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class SpackMod(SpackModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class SuccessCriteria(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class Tagged1(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class TestMod(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class Unmaintained1(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class UnsetEnvVarMod(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class Untagged1(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import re

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class ConditionalPsm3(BasicModifier):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# option. This file may not be copied, modified, or distributed
# except according to those terms.

from ramble.modkit import * # noqa: F403
from ramble.modkit import *


class ExecutionDate(BasicModifier):
Expand Down
Loading

0 comments on commit 90490cb

Please sign in to comment.