Skip to content

Commit

Permalink
Merge pull request #329 from MarcCote/fix_pkg_resources
Browse files Browse the repository at this point in the history
Fix pkg resources deprecation
  • Loading branch information
MarcCote committed Nov 21, 2023
2 parents ba3369f + ba42631 commit 08ab525
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .azure/pipelines/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ stages:
value: true
readonly: true
jobs:
- template: linux-template.yml
parameters:
vmImages: [ 'ubuntu-20.04' ]
pythonVersions: [ '3.8' ]
- template: linux-template.yml
parameters:
vmImages: [ 'ubuntu-latest' ]
Expand Down
5 changes: 3 additions & 2 deletions textworld/envs/glulx/git_glulx.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import sys
import textwrap
import subprocess
from pkg_resources import Requirement, resource_filename
import importlib
from os.path import join as pjoin

from typing import Union

Expand All @@ -17,7 +18,7 @@
from textworld.core import GameState
from textworld.core import GameNotRunningError

GLULX_PATH = resource_filename(Requirement.parse('textworld'), 'textworld/thirdparty/glulx/Git-Glulx')
GLULX_PATH = pjoin(importlib.resources.files("textworld"), "thirdparty", "glulx", "Git-Glulx")


def _strip_input_prompt_symbol(text: str) -> str:
Expand Down
4 changes: 2 additions & 2 deletions textworld/generator/inform7/world2inform7.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import os
import shutil
import warnings
import importlib
import subprocess
import textwrap
from os.path import join as pjoin
from typing import Iterable, Optional, List
from pkg_resources import Requirement, resource_filename

import numpy as np

Expand All @@ -21,7 +21,7 @@
from textworld.logic import Signature, Proposition, Action, Variable


I7_DEFAULT_PATH = resource_filename(Requirement.parse('textworld'), 'textworld/thirdparty/inform7-6M62')
I7_DEFAULT_PATH = pjoin(importlib.resources.files("textworld"), "thirdparty", "inform7-6M62")


class TextworldInform7Warning(UserWarning):
Expand Down

0 comments on commit 08ab525

Please sign in to comment.