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

Drop support for Python 3.4 #32

Closed
8 tasks done
JWCook opened this issue Jun 11, 2020 · 9 comments · Fixed by #40
Closed
8 tasks done

Drop support for Python 3.4 #32

JWCook opened this issue Jun 11, 2020 · 9 comments · Fixed by #40
Assignees
Labels
logistics CI Builds, deployments, packaging, project config, and other logistical details
Milestone

Comments

@JWCook
Copy link
Member

JWCook commented Jun 11, 2020

Python 3.4 reached EOL in March 2019, and it's been adding a bit of extra work to keep compatibility with it. I'd like to drop this in the release after the next one (which would be v0.11).

Things to clean up/restrictions that would no longer apply:

  • Remove from tests and classifiers
  • Remove typing backport and use the stdlib version
  • Remove merge_two_dicts() and use {**dict, **dict} and other PEP 448 syntax
  • Use latest pytest (4.7+)
  • Use latest tox (3.15+)
  • Use json.JSONDecodeError
  • Remove other python 3.4-specific exceptions/workarounds
  • Remove requirements.txt; known minimum required package versions are all specified in setup.py now, and remaining version pins are not needed
@JWCook JWCook added the logistics CI Builds, deployments, packaging, project config, and other logistical details label Jun 11, 2020
@JWCook JWCook added this to the v0.11 milestone Jun 11, 2020
@JWCook JWCook self-assigned this Jun 11, 2020
@JWCook JWCook closed this as completed Jun 17, 2020
@JWCook JWCook changed the title Drop Python 3.4 Drop support for Python 3.4 Sep 25, 2020
@abubelinha
Copy link

I have a machine at work which uses Windows XP 32bit.
Latest Python version for that OS is 3.4
Would it be possible to use pip to install pyinaturalist's latest python-3.4-compatible version?
If so, what's the pip command I should use?

Thanks a lot

@JWCook
Copy link
Member Author

JWCook commented Jun 19, 2021

@abubelinha

pyinaturalist 0.10 was the last version that supported python 3.4. You should be able to pip install pyinaturalist and it will install the latest version available for your current python version. If for some reason that doesn't work (for example, if older releases are missing some package metadata), you can manually install the version you want with:

pip install pyinaturalist==0.10

To go back in time and see project info for past versions, you can use the version tags on:

Screenshots for how to get there:

GitHub

Branches/Tags drop-down in the upper left:
2021-06-19 14_12_45-niconoe_pyinaturalist at v0 10 — Mozilla Firefox

Readthedocs

Version drop-down in the lower left (Note: 'stable' is the current stable release, and 'latest' is the development version/main branch):
2021-06-19 14_16_29-pyinaturalist — pyinaturalist 0 13 0 documentation — Mozilla Firefox

PyPI

Release History in the upper left:
2021-06-19 14_12_21-pyinaturalist · PyPI — Mozilla Firefox

@JWCook
Copy link
Member Author

JWCook commented Jun 19, 2021

Would it help if I added a section to the docs that lists the last supported pyinaturalist version for each python version? Or let me know if you have any other suggestions for the documentation.

@abubelinha
Copy link

Yes, that would be useful.
But you decide it it worths the pain
(because you are really fast answering issues, thanks a lot !!).

@JWCook
Copy link
Member Author

JWCook commented Jun 21, 2021

Added that info here under 'Python version compatibility': https://pyinaturalist.readthedocs.io/en/latest/user_guide.html#installation

@abubelinha
Copy link

abubelinha commented Jun 22, 2021

How could I check the installed version of pyinaturalist from my pyinat.py script at runtime, before importing it?

I want to run the script in several machines, some of them with Python 3.8 and some others with 3.4 (so pyinaturalist 0.10)

As import syntax was different in old versions I need the script to know which one to use, so I can adapt it to follow the old doc examples when needed.

@JWCook
Copy link
Member Author

JWCook commented Jun 22, 2021

Some thoughts on this:

  • The previous imports (like from pyinaturalist.node_api import ...) will still work. They will show a DeprecationWarning starting in 0.14, and will eventually be removed in a future release.
  • Windows XP and python 3.4 are ancient history, so it's going to be very hard to support if you run into problems... But I'm sure you already know that! Is there any possibility of installing a modern Linux distro as a dual-boot option, or using a live boot CD, or a VM, or Cygwin, or... anything but XP?
  • If not: besides imports, there have been several changes to behavior since pyinaturalist 0.10, so I wouldn't recommend switching back and forth between versions. It might be better to just stick with 0.10.
  • With 0.10, you may need to use add_photo_to_observation() for uploading photos after create_observation()
  • If you need to, you can check the installed version like this:
    >>> from pyinaturalist import __version__
    >>> print(__version__)
    '0.13.0'

@abubelinha
Copy link

Thanks a lot for the recommendations and warnings.
Looks like it is a bad idea, so I think I'll try to avoid using WinXP computers for this.

@JWCook
Copy link
Member Author

JWCook commented Jun 22, 2021

Great! I'd like to help support your classroom project if I can, and it will be much easier to make bugfixes, new features, etc. if you're using the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logistics CI Builds, deployments, packaging, project config, and other logistical details
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants