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

Timeout due to https://search.maven.org/ being unreachable #18

Open
Ria700 opened this issue Sep 19, 2024 · 4 comments
Open

Timeout due to https://search.maven.org/ being unreachable #18

Ria700 opened this issue Sep 19, 2024 · 4 comments

Comments

@Ria700
Copy link

Ria700 commented Sep 19, 2024

with urlopen(f"https://search.maven.org/solrsearch/select?q=a:antlr4-master+g:org.antlr",
timeout=10) as response:

Facing timeout at L26 antlr4_tool_runner.py since https://search.maven.org/ users are now redirected to https://central.sonatype.com/
Reference:
https://central.sonatype.org/faq/what-happened-to-search-maven-org/#what-about-the-searchmavenorg-api

The link used in antlr4_tool_runner.py: https://search.maven.org/solrsearch/select?q=a:antlr4-master+g:org.antlr is unreachable.

@parrt
Copy link
Member

parrt commented Sep 22, 2024

Thanks. Could you send a pull request?

@izhirov
Copy link

izhirov commented Sep 24, 2024

@parrt Hello, I did the PR for this issue: #19. Can you look at it? Thanks

@moogman
Copy link

moogman commented Oct 4, 2024

antlr4 python is unusable again because there's an outage with https://status.maven.org/ (and would still be the case if central.sonatype.com/ went down).

This should be a soft failure with antlr4, warning instead of erroring out.
--help and --version should work even if maven is down, and we also should have a --skip-version-check cmdline option.

@moogman
Copy link

moogman commented Oct 4, 2024

I started to fix this, then realised TimeoutError is already added and committed[1] but not released. So currently, users via pip will see:

...
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1104, in read
    return self._sslobj.read(len, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: The read operation timed out

instead of

Could not get latest version number, attempting to fall back to latest downloaded version...
Found version '4.13.2', this version may be out of date

Could we get an updated release on pip please? This would fix this issue and antlr/antlr4#4703

[1] ee5c134#diff-21162dbe8ccb0f459c574307a41c0452f7b910d7540de6642549b0c810690989L31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants