Repository: python-telegram-bot/python-telegram-bot

Issue:
[FEATURE] Incorrect HTTPVersion type-alias
### Steps to Reproduce

1. Use `ApplicationBuilder().http_version("2")` to enable http2, as it said in the docs


### Expected behaviour

Type-checkers accept literal '2'

### Actual behaviour

Type-checker complains that Literal["1.1", "2.0"] was expected.
![image](https://github.com/python-telegram-bot/python-telegram-bot/assets/37223374/fc0ad68e-a1c8-42aa-b5cd-0cb064576c23)


### Operating System

Debian sid

### Version of Python, python-telegram-bot & dependencies

```shell
python-telegram-bot 20.4
Bot API 6.7
Python 3.11.4 (main, Jun  7 2023, 10:13:09) [GCC 12.2.0]
```


### Relevant log output

_No response_

### Additional Context

In `telegram._utils.types` it defines `HTTPVersion = Literal["1.1", "2.0"]`. The correct one will be `HTTPVersion = Literal["1.1", "2"]`.


Discussion:
And I would like to fix it
Hey! Thanks for the catch! I would say it would make more sense to fix the docstring of [AppBuilder.http_version](https://docs.python-telegram-bot.org/en/stable/telegram.ext.applicationbuilder.html#telegram.ext.ApplicationBuilder.http_version). I think it's nice to have uniformity of version formats.
OTOH, I do see that HTTP 2.0 is now called HTTP/2, so maybe you're right that the literal too should have the members "1.1" and "2". Let's see what others think :)
yeah, we should add "2" to the list, i.e. "1.1", "2.0" and "2"
Well, in fact, "2.0" isn't a valid argument and HTTPXRequest throws an exception, when I use it 
That would ofc also have to be adapted :) Would you maybe like to send a PR yourself? If so, please be sure to check out our contribution guide (linked in the PR template and in the sidebar on docs.python-telegram-bot.org).

Resolving patch:
diff --git a/telegram/_utils/types.py b/telegram/_utils/types.py
--- a/telegram/_utils/types.py
+++ b/telegram/_utils/types.py
@@ -87,7 +87,7 @@
 UploadFileDict = Dict[str, FieldTuple]
 """Dictionary containing file data to be uploaded to the API."""
 
-HTTPVersion = Literal["1.1", "2.0"]
+HTTPVersion = Literal["1.1", "2.0", "2"]
 """Allowed HTTP versions.
 
 .. versionadded:: 20.4"""
diff --git a/telegram/ext/_applicationbuilder.py b/telegram/ext/_applicationbuilder.py
--- a/telegram/ext/_applicationbuilder.py
+++ b/telegram/ext/_applicationbuilder.py
@@ -592,8 +592,11 @@ def http_version(self: BuilderType, http_version: HTTPVersion) -> BuilderType:
             Reset the default version to 1.1.
 
         Args:
-            http_version (:obj:`str`): Pass ``"2"`` if you'd like to use HTTP/2 for making
-                requests to Telegram. Defaults to ``"1.1"``, in which case HTTP/1.1 is used.
+            http_version (:obj:`str`): Pass ``"2"`` or ``"2.0"`` if you'd like to use HTTP/2 for
+                making requests to Telegram. Defaults to ``"1.1"``, in which case HTTP/1.1 is used.
+
+                .. versionchanged:: NEXT.VERSION
+                    Accept ``"2"`` as a valid value.
 
         Returns:
             :class:`ApplicationBuilder`: The same builder with the updated argument.
@@ -751,8 +754,12 @@ def get_updates_http_version(
             Reset the default version to 1.1.
 
         Args:
-            get_updates_http_version (:obj:`str`): Pass ``"2"`` if you'd like to use HTTP/2 for
-                making requests to Telegram. Defaults to ``"1.1"``, in which case HTTP/1.1 is used.
+            get_updates_http_version (:obj:`str`): Pass ``"2"`` or ``"2.0"`` if you'd like to use
+                HTTP/2 for making requests to Telegram. Defaults to ``"1.1"``, in which case
+                HTTP/1.1 is used.
+
+                .. versionchanged:: NEXT.VERSION
+                    Accept ``"2"`` as a valid value.
 
         Returns:
             :class:`ApplicationBuilder`: The same builder with the updated argument.
diff --git a/telegram/request/_httpxrequest.py b/telegram/request/_httpxrequest.py
--- a/telegram/request/_httpxrequest.py
+++ b/telegram/request/_httpxrequest.py
@@ -82,13 +82,16 @@ class HTTPXRequest(BaseRequest):
                 With a finite pool timeout, you must expect :exc:`telegram.error.TimedOut`
                 exceptions to be thrown when more requests are made simultaneously than there are
                 connections in the connection pool!
-        http_version (:obj:`str`, optional): If ``"2"``, HTTP/2 will be used instead of HTTP/1.1.
-            Defaults to ``"1.1"``.
+        http_version (:obj:`str`, optional): If ``"2"`` or ``"2.0"``, HTTP/2 will be used instead
+            of HTTP/1.1. Defaults to ``"1.1"``.
 
             .. versionadded:: 20.1
             .. versionchanged:: 20.2
                 Reset the default version to 1.1.
 
+            .. versionchanged:: NEXT.VERSION
+                Accept ``"2"`` as a valid value.
+
     """
 
     __slots__ = ("_client", "_client_kwargs", "_http_version")
@@ -115,8 +118,8 @@ def __init__(
             max_keepalive_connections=connection_pool_size,
         )
 
-        if http_version not in ("1.1", "2"):
-            raise ValueError("`http_version` must be either '1.1' or '2'.")
+        if http_version not in ("1.1", "2", "2.0"):
+            raise ValueError("`http_version` must be either '1.1', '2.0' or '2'.")
 
         http1 = http_version == "1.1"
 


Test patch:
diff --git a/tests/request/test_request.py b/tests/request/test_request.py
--- a/tests/request/test_request.py
+++ b/tests/request/test_request.py
@@ -85,8 +85,9 @@ async def test_init(self, bot):
 
 @pytest.mark.skipif(not TEST_WITH_OPT_DEPS, reason="Optional dependencies not installed")
 class TestHTTP2WithRequest:
-    async def test_http_2_response(self):
-        httpx_request = HTTPXRequest(http_version="2")
+    @pytest.mark.parametrize("http_version", ["2", "2.0"])
+    async def test_http_2_response(self, http_version):
+        httpx_request = HTTPXRequest(http_version=http_version)
         async with httpx_request:
             resp = await httpx_request._client.request(
                 url="https://python-telegram-bot.org",