Skip to content

Commit

Permalink
Merge pull request #212 from CastXML/version
Browse files Browse the repository at this point in the history
utils: drop is_str
  • Loading branch information
iMichka authored Nov 14, 2024
2 parents d616307 + 1ac3245 commit 556bc42
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changes
=======

Version 2.6.0

1. Drop utils.is_str function

Version 2.5.0
-------------

Expand Down
1 change: 0 additions & 1 deletion src/pygccxml/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"""

from .utils import is_str
from .utils import get_architecture
from .utils import loggers
from .utils import create_temp_file_name
Expand Down
24 changes: 0 additions & 24 deletions src/pygccxml/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,12 @@

import os
import sys
import platform
import logging
import tempfile
import shutil
import subprocess
import warnings


def is_str(string):
"""
Python 2 and 3 compatible string checker.
Args:
string (str | basestring): the string to check
Returns:
bool: True or False
"""
warnings.warn(
"The is_str function is deprecated. \
Use isinstance(string, str) instead.",
DeprecationWarning)

if sys.version_info[:2] >= (3, 0):
return isinstance(string, str)

return isinstance(string, basestring)


def find_xml_generator(name="castxml", search_path=None):
"""
Try to find a c++ parser (xml generator)
Expand Down

0 comments on commit 556bc42

Please sign in to comment.