prisma-client-py icon indicating copy to clipboard operation
prisma-client-py copied to clipboard

fix(config): read using utf-8

Open AmaseCocoa opened this issue 1 year ago • 1 comments

Change Summary

Changed path.read_text to explicitly use utf-8 to avoid UnicodeEncodeError that may be caused by cp932 in Japanese Windows environments.

src/prisma/_config.py and tests/test_config.py was changed.

(This is my first time contributing to another repository, so there may be some clumsiness, but I'd appreciate it if you could let me know if that's the case.)

Checklist

  • [x] Unit tests for the changes exist
  • [x] Tests pass without significant drop in coverage
  • [ ] Documentation reflects changes where applicable
  • [ ] Test snapshots have been updated if applicable

Agreement

By submitting this pull request, I confirm that you can use, modify, copy and redistribute this contribution, under the terms of your choice.

AmaseCocoa avatar Aug 09 '24 07:08 AmaseCocoa

Added Unit Test (test_with_file) to tests/test_config.py :)

AmaseCocoa avatar Aug 09 '24 11:08 AmaseCocoa