Skip to content

Commit

Permalink
Explain why warnings happen on import in README
Browse files Browse the repository at this point in the history
- Relates to #42.
- Bump CI Python versions to latest non-EOL Python 3.
- Drop Python2 from CI for now.
  • Loading branch information
metatoaster committed Oct 27, 2023
1 parent 4ff2504 commit cbe9aa1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,29 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, "3.10", pypy2, pypy3]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "pypy3.9"]
include:
- os: windows-latest
python-version: 3.9
- os: windows-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.12"
exclude:
- os: macos-latest
python-version: 3.5
- os: macos-latest
python-version: 3.6
- os: macos-latest
python-version: pypy2
- os: macos-latest
python-version: pypy3
python-version: "pypy3.9"


steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
18 changes: 18 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,24 @@ A workaround helper script is provided, it may be executed like so:
Further details on this topic may be found in the `manual optimization`_
section of this document.

WARNING: There are unused tokens on import
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This indicates that the installation method or source for this package
being imported isn't optimized. A quick workaround is to follow the
instructions at the `manual optimization`_ section of this document to
ensure these messages are no longer generated (and if this warning
happens every time the module is imported, it means the symbol tables
are regenerated every time that happens and this extra computational
overhead should be corrected through the generation of that optimization
module).

This optimization module is included with the wheel release and the
source release on PyPI, but it is not part of the source repository as
generated code are never committed. Should a binary release made by
a third-party results in this warning upon import, their release should
be corrected to include the optimization module.

Slow performance
~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit cbe9aa1

Please sign in to comment.