Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disable or shadow package for Python 3.7 #50

Closed
Labels
Milestone
@jaraco

Description

@jaraco

In GitLab by@warsaw on Feb 12, 2018, 15:02

I've been thinking about Python 3.7 support (really >= 3.7), since I'm working on sync'ing the APIs with what's in the stdlib. It's actually a little difficult to get 100% coverage for 3.7 without going through a bunch of hoops that make the code uglier. That got me to asking, should we even support >= 3.7 for the standalone package?

We actually don't need to, since theonly difference would be that code that needs to straddle multiple versions would just do:

try:fromimportlibimportresourcesexceptImportError:importimportlib_resourcesasresources

(or similar of course, if you only need some functions out of the module).

The other option would be to shadow the stdlib bits, by doing something like:

try:fromimportlib.resourcesimport*exceptImportError:fromimportlib_resourcesimport*

Or some such. I think I prefer the first approach, i.e. document what straddling code should do. Then I'd delete all the workarounds for 3.7, and actually prevent installation in thesetup.py (or throw an exception on import ifsys.version_info >= (3, 7).

I'm open to other suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp