Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest release of Pandas (1.4.3) cannot be used with the latest release of pandas-stubs (1.4.2.220626) #62

Closed
aholmes opened this issue Jul 1, 2022 · 8 comments · Fixed by #66

Comments

@aholmes
Copy link
Contributor

aholmes commented Jul 1, 2022

Hi,
The latest version of pandas-stubs (1.4.2.220626) depends on Pandas version 1.4.2. This prevents updating to Pandas 1.4.3 if we want to use the latest version of pandas-stubs.

ERROR: Cannot install -r requirements.txt (line 22) and pandas==1.4.3 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested pandas==1.4.3
    pandas-stubs 1.4.2.220626 depends on pandas==1.4.2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
@breno-jesus-fernandes
Copy link
Contributor

hmm I see, I think the package version should be based on api version and the date like "1.4.220626" or "1.4.0.220626", so the minor version would not be affected.

@breno-jesus-fernandes
Copy link
Contributor

hmm I see, I think the package version should be based on api version and the date like "1.4.220626" or "1.4.0.220626", so the minor version would not be affected.

@Dr-Irv

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Jul 1, 2022

I'll work on a new release this weekend that should address this issue

aholmes added a commit to aholmes/pandas-stubs that referenced this issue Jul 1, 2022
@aholmes
Copy link
Contributor Author

aholmes commented Jul 1, 2022

Out of curiosity I made the changes above. I attempted to run the tests locally (following this), but pyright fails. All of the workflows succeed in GitHub actions though. What am I missing, and is f9f0b0f sufficient?

@breno-jesus-fernandes
Copy link
Contributor

Try to delete .cache folders

@aholmes
Copy link
Contributor Author

aholmes commented Jul 1, 2022

None exist. I had tried removing __pycache__ folders though.

┌──(aholmes)-[~/repos/pandas-stubs] (update-pandas-to-1.4.3)
└─$ mv .gitignore ../
(pandas-stubs-95Q6RBOr-py3.9)
┌──(aholmes)-[~/repos/pandas-stubs] (update-pandas-to-1.4.3)
└─$ git status
On branch update-pandas-to-1.4.3
Your branch is up to date with 'aholmes/update-pandas-to-1.4.3'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    .gitignore

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        poetry.lock
        scripts/__pycache__/
        scripts/test/__pycache__/

no changes added to commit (use "git add" and/or "git commit -a")
(pandas-stubs-95Q6RBOr-py3.9)
┌──(aholmes)-[~/repos/pandas-stubs] (update-pandas-to-1.4.3)
└─$ rm -rf poetry.lock scripts/__pycache__/ scripts/test/__pycache__/
(pandas-stubs-95Q6RBOr-py3.9)
┌──(aholmes)-[~/repos/pandas-stubs] (update-pandas-to-1.4.3)
└─$ poe test_all
Poe => test_all

===========================================
Beginning: 'Run Mypy Against Source Code'
===========================================

Success: no issues found in 176 source files

===========================================
End: 'Run Mypy Against Source Code', runtime: 8.548 seconds.
===========================================


===========================================
Beginning: 'Run Pyright Against Source Code'
===========================================

No configuration file found.
pyproject.toml file found at /home/aholmes/repos/pandas-stubs.
Loading pyproject.toml file at /home/aholmes/repos/pandas-stubs/pyproject.toml
Assuming Python version 3.9
Assuming Python platform Linux
Auto-excluding **/node_modules
Auto-excluding **/__pycache__
Auto-excluding **/.*
Searching for source files
Found 176 source files
pyright 1.1.256
/home/aholmes/repos/pandas-stubs/pandas-stubs/__init__.pyi
  /home/aholmes/repos/pandas-stubs/pandas-stubs/__init__.pyi:16:5 - error: "CategoricalIndex" is unknown import symbol (reportGeneralTypeIssues)
...

@breno-jesus-fernandes
Copy link
Contributor

When you changed the pandas and project version did you update poetry.lock file with poetry update ?

@aholmes
Copy link
Contributor Author

aholmes commented Jul 1, 2022

I had initially done poetry lock --no-update, which did update the versions in the file. However, deleting poetry.lock and going through the process again had the same effect.

Good news though - I noticed which python came from ~/.cache when I was in the poetry shell. I removed the directory and started over. The tests pass locally now. Thanks for the tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants