Skip to content

Conversation

@jfcherng
Copy link
Contributor

@jfcherng jfcherng commented Nov 13, 2023

As the title., for Python 3.12.

Signed-off-by: Jun-Fei Cherng <jfcherng@realtek.com>
@jfcherng
Copy link
Contributor Author

If you need more information for reproduction,

test.py

from blackduck.Utils import get_resource_name get_resource_name({'_meta': { 'href': 'https://a.b' }})

and then

$ python -Walways test.py # where python is python 3.12 

You will get

/home/jfcherng/repos/sdlc/hub-rest-api-python/.venv/lib/python3.12/site-packages/blackduck/Utils.py:104: SyntaxWarning: invalid escape sequence '\w' if re.search("^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$", part): /home/jfcherng/repos/sdlc/hub-rest-api-python/.venv/lib/python3.12/site-packages/blackduck/Utils.py:35: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). def iso8601_timespan(days_ago, from_date=datetime.utcnow(), delta=timedelta(weeks=1)): parts = https://a.b 
@jwsapienza
Copy link

I too an having this same issue. Can we get this PR merged ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants