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

[deps!] Upgraded Django and dropped support for Python 3.6 #117 #127

Merged
merged 3 commits into from
Jan 5, 2022

Conversation

pandafy
Copy link
Member

@pandafy pandafy commented Jan 4, 2022

  • Dropped support for Python 3.6
  • Added support for Django 3.2 and Django 4.0
  • Replaced xlrd with openpyxl
  • Bumped django-reversion~=4.0.1

Closes #96
Closes #102
Closes #120
Closes #117

Backward incompatible change: Subnets with /32 prefixlen
can provision an IP address same as the network address.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some conflicts with master.

@pandafy pandafy force-pushed the issues/117-django-deps branch 2 times, most recently from 8059208 to fcd297d Compare January 5, 2022 11:15
@coveralls
Copy link

coveralls commented Jan 5, 2022

Coverage Status

Coverage decreased (-0.003%) to 99.853% when pulling cd51f0a on issues/117-django-deps into 5a89d3e on master.

Comment on lines -215 to +229
if file.name.endswith(('.xls', '.xlsx')):
book = xlrd.open_workbook(file_contents=file.read())
sheet = book.sheet_by_index(0)
row = []
for row_num in range(sheet.nrows):
row.append(sheet.row_values(row_num))
reader = iter(row)
if file.name.endswith(('.xlsx')):
book = openpyxl.load_workbook(filename=file)
sheet = book.worksheets[0]
reader = sheet.values
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earlier the project was using xlrd package for reading xls and xlsx files. But the latest version of xlrd now only processes xls files. Hence, I swapped the package for openxlpy which can read xlsx files (but not xls files). I changed the dependency with the thought that more and more people will be using xlsx files in the current time.

We can look for other alternatives if we really want to support xls files.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we can do csv that's fine

Copy link
Member Author

@pandafy pandafy Jan 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we can do CSV and XLSX.

The library for parsing CSV is ships with Python. (no external library/package is required)
For parsing XLSX we will be using openxlpy

With this PR, we will be dropping support for XLS. Should we also drop support for XLSX?

I believe dropping support for XLSX might make our lives easier.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's fine as it is, let's not touch this further right now, there's no reason to.

- Dropped support for Python 3.6
- Added support for Django 3.2 and Django 4.0
- Replaced xlrd with openpyxl
- Bumped django-reversion~=4.0.1

Closes #96
Closes #102
Closes #120
Closes #117

**Backward incompatible change**: Subnets with /32 prefixlen
can provision an IP address same as the network address.
@nemesifier nemesifier merged commit 4f15237 into master Jan 5, 2022
@nemesifier nemesifier deleted the issues/117-django-deps branch April 28, 2022 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment