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

Python 3.12 compat issues #1655

Open
jay0lee opened this issue Aug 17, 2023 · 0 comments
Open

Python 3.12 compat issues #1655

jay0lee opened this issue Aug 17, 2023 · 0 comments
Assignees
Labels

Comments

@jay0lee
Copy link
Member

jay0lee commented Aug 17, 2023

Tests against Python 3.12.0rc1 which is due to be released in October are currently failing. See:

https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667

/home/runner/work/GAM/GAM/src/gam/gdata/service.py:1094: SyntaxWarning: invalid escape sequence '\?'
  m = re.compile('[\?\&]gsessionid=(\w*)').search(location)
/home/runner/work/GAM/GAM/src/gam/gdata/service.py:1342: SyntaxWarning: invalid escape sequence '\?'
  m = re.compile('[\?\&]gsessionid=(\w*)').search(location)
/home/runner/work/GAM/GAM/src/gam/gdata/service.py:1440: SyntaxWarning: invalid escape sequence '\?'
  m = re.compile('[\?\&]gsessionid=(\w*)').search(location)
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/Python_RSAKey.py:188: SyntaxWarning: invalid escape sequence '\Z'
  xmltools.getReqAttribute(element, "xmlns", "http://trevp.net/rsa\Z")
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:137: SyntaxWarning: invalid escape sequence '\Z'
  nsRegEx = "http://trevp.net/cryptoID\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:138: SyntaxWarning: invalid escape sequence '\.'
  cryptoIDRegEx = "([a-km-z3-9]{5}\.){3}[a-km-z3-9]{5}\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:1[39](https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667#step:36:40): SyntaxWarning: invalid escape sequence '\Z'
  urlRegEx = "http(s)?://.{1,100}\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:1[40](https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667#step:36:41): SyntaxWarning: invalid escape sequence '\Z'
  sha1Base64RegEx = "[A-Za-z0-9+/]{27}=\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:1[41](https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667#step:36:42): SyntaxWarning: invalid escape sequence '\Z'
  base64RegEx = "[A-Za-z0-9+/]+={0,4}\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:1[42](https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667#step:36:43): SyntaxWarning: invalid escape sequence '\Z'
  certsListRegEx = "(0)?(1)?(2)?(3)?(4)?(5)?(6)?(7)?(8)?(9)?\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:1[43](https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667#step:36:44): SyntaxWarning: invalid escape sequence '\Z'
  keyRegEx = "[A-Z]\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:1[44](https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667#step:36:45): SyntaxWarning: invalid escape sequence '\Z'
  keysListRegEx = "(A)?(B)?(C)?(D)?(E)?(F)?(G)?(H)?(I)?(J)?(K)?(L)?(M)?(N)?(O)?(P)?(Q)?(R)?(S)?(T)?(U)?(V)?(W)?(X)?(Y)?(Z)?\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:1[45](https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667#step:36:46): SyntaxWarning: invalid escape sequence '\d'
  dateTimeRegEx = "\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:1[46](https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667#step:36:47): SyntaxWarning: invalid escape sequence '\Z'
  shortStringRegEx = ".{1,100}\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:1[47](https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667#step:36:48): SyntaxWarning: invalid escape sequence '\Z'
  exprRegEx = "[a-zA-Z0-9 ,()]{1,200}\Z"
/home/runner/work/GAM/GAM/src/gam/gdata/tlslite/utils/xmltools.py:1[48](https://github.com/GAM-team/GAM/actions/runs/5890842881/job/15976761667#step:36:49): SyntaxWarning: invalid escape sequence '\Z'
  notAfterDeltaRegEx = "0|([1-9][0-9]{0,8})\Z" #A number from 0 to (1 billion)-1

we need to either cleanup these regex expressions or cleanup the files they are in.

@taers232c FYI - I recall removing the "tlslite" directory" from gdata a looong time ago because it wasn't really used by GAM at all. Do you know if it's actually being used here?

It looks like the first 3 warnings against gdata/service.py just need the backslashes removed, I don't think it's necessary for those to be escaped and Python 3.12 is much more picky about this sort of thing.

@jay0lee jay0lee added the bug label Aug 17, 2023
@jay0lee jay0lee self-assigned this Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant