Skip to content

Commit

Permalink
package upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
iiPythonx committed Nov 18, 2024
1 parent 081cab0 commit 38c31bc
Show file tree
Hide file tree
Showing 4 changed files with 867 additions and 18 deletions.
2 changes: 1 addition & 1 deletion nightwatch/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self) -> None:

def add_client(self, client: WebSocketCommonProtocol) -> None:
self.clients[client] = None
setattr(client, "ip", client.request_headers.get("CF-Connecting-IP", client.remote_address[0]))
setattr(client, "ip", client.request.headers.get("CF-Connecting-IP", client.remote_address[0]))

def remove_client(self, client: WebSocketCommonProtocol) -> None:
if client in self.clients:
Expand Down
2 changes: 1 addition & 1 deletion nightwatch/server/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import asyncio

from websockets.server import serve
from websockets.asyncio.server import serve

from . import connection

Expand Down
29 changes: 13 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ build-backend = "hatchling.build"
packages = ["nightwatch"]
exclude = ["nightwatch/desktop"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.version]
path = "nightwatch/__init__.py"

Expand All @@ -27,23 +24,23 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"urwid",
"orjson",
"nanoid",
"websockets",
"emoji"
"emoji>=2.14.0",
"nanoid>=2.0.0",
"orjson>=3.10.11",
"urwid>=2.6.16",
"websockets>=14.1",
]

[project.optional-dependencies]
serve = [
"fastapi",
"pymongo",
"pydantic",
"pydantic-extra-types",
"starlette",
"argon2-cffi",
"redis[hiredis]",
"uvicorn[standard]"
"argon2-cffi>=23.1.0",
"fastapi>=0.115.5",
"pydantic>=2.9.2",
"pydantic-extra-types>=2.10.0",
"pymongo>=4.10.1",
"redis[hiredis]>=5.2.0",
"starlette>=0.41.2",
"uvicorn[standard]>=0.32.0",
]

[project.urls]
Expand Down
Loading

0 comments on commit 38c31bc

Please sign in to comment.