Skip to content

Commit

Permalink
Merge pull request #8 from pappasam/windows-unicode-fix
Browse files Browse the repository at this point in the history
Explicity set encoding to "UTF-8"
  • Loading branch information
pappasam authored May 7, 2021
2 parents bd6295d + 47c494c commit 5239581
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 4 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release
on:
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.9']
poetry-version: ['1.1.6']
pip-version: ['21.1.1']
steps:
- uses: actions/checkout@v2
- name: Setup, Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Deploy with Python ${{ matrix.python-version }}
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
# Set up Python
python -m pip install --upgrade pip==${{ matrix.pip-version }}
# Set up Poetry
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py > get-poetry.py
python get-poetry.py
rm get-poetry.py
source "$HOME/.poetry/env"
poetry self update ${{ matrix.poetry-version }}
# Release with Poetry
poetry build
poetry publish --username="$PYPI_USERNAME" --password="$PYPI_PASSWORD"
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.5.1

### Fixed

- Explicitly set file format to "UTF-8" when reading data files from disk. This resolves <https://github.com/pappasam/nginx-language-server/issues/7>, in which Windows Python incorrectly identified the file formats as "cp932".

## 0.5.0

### Changed
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Nginx Language Server

[![image-version](https://img.shields.io/pypi/v/nginx-language-server.svg)](https://python.org/pypi/nginx-language-server)
[![image-license](https://img.shields.io/pypi/l/nginx-language-server.svg)](https://python.org/pypi/nginx-language-server)
[![image-python-versions](https://img.shields.io/pypi/pyversions/nginx-language-server.svg)](https://python.org/pypi/nginx-language-server)
[![image-license](https://img.shields.io/badge/license-GPL%203.0--only-orange)](https://python.org/pypi/jedi-language-server)
[![image-python-versions](https://img.shields.io/badge/python->=3.6-blue)](https://python.org/pypi/jedi-language-server)

A [Language Server](https://microsoft.github.io/language-server-protocol/) for `nginx.conf`.

Expand Down
2 changes: 1 addition & 1 deletion nginx_language_server/parser/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_ls_documentation(cls, v, values) -> str:
def load_raw_data(basename: str) -> ListDicts:
"""Pull in raw JSON data from directives file."""
path_data = pathlib.Path(__file__).parent.parent.joinpath("data")
with path_data.joinpath(basename).open() as outfile:
with path_data.joinpath(basename).open(encoding="UTF-8") as outfile:
data_raw = json.load(outfile)
return data_raw

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ line_length = 79

[tool.poetry]
name = "nginx-language-server"
version = "0.5.0"
version = "0.5.1"
description = "A language server for nginx.conf"
authors = ["Sam Roeca <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 5239581

Please sign in to comment.