GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: error type hints in Python3.12 (#1147) by 954-Ivory · Pull Request #1840 · docarray/docarray

This repository was archived by the owner on Sep 9, 2026. It is now read-only.

Conversation

@954-Ivory

@954-Ivory 954-Ivory commented Dec 22, 2023

Copy link
Copy Markdown
Contributor

Issue: #1839


Description

I encountered the following issue when using langchain in Python 3.12:

langchain-ai/langchain#15016

    return Generic.__class_getitem__.__func__(cls, item)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'builtin_function_or_method' object has no attribute '__func__'. Did you mean: '__doc__'?

It caused by this PR (#1147)

Example Code

https://learn.deeplearning.ai/langchain/lesson/5/question-and-answer

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
samsja
samsja suggested changes Dec 22, 2023
View reviewed changes

@samsja samsja left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thank you very much for the PR.

I am not sure about the implementation. I think it would be nicer if do a if else on the python version rather that relying on catching the exception

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@samsja
samsja requested a review from JoanFM December 22, 2023 07:57
@JoanFM

JoanFM commented Dec 22, 2023

Copy link
Copy Markdown
Member

Hey @954-Ivory , we need you to sign off the commits and to comply with our guidelines as per lur CONTRIBUTING_GUIDELINES

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Dec 22, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (a2421a6) 85.07% compared to head (127abab) 85.06%.

Files Patch % Lines
docarray/array/any_array.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1840      +/-   ##
==========================================
- Coverage   85.07%   85.06%   -0.02%     
==========================================
  Files         136      136              
  Lines        9255     9260       +5     
==========================================
+ Hits         7874     7877       +3     
- Misses       1381     1383       +2     
Flag Coverage Δ
docarray 85.06% <66.66%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

samsja
samsja reviewed Dec 22, 2023
View reviewed changes
Comment thread docarray/array/any_array.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

samsja
samsja approved these changes Dec 22, 2023
View reviewed changes
@samsja

samsja commented Dec 22, 2023

Copy link
Copy Markdown
Member

I approved, but before merging can you apply black @954-Ivory ? and DCO as well ( you can do git rebase HEAD~2 --signoff and the git push -f

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@954-Ivory
954-Ivory force-pushed the dev branch from 7e457cd to 40858cb Compare December 22, 2023 08:47
@954-Ivory

954-Ivory commented Dec 22, 2023

Copy link
Copy Markdown
Contributor Author

I approved, but before merging can you apply black @954-Ivory ? and DCO as well ( you can do git rebase HEAD~2 --signoff and the git push -f

Can you help me check if I have made any mistakes?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@954-Ivory
954-Ivory force-pushed the dev branch 2 times, most recently from 2d08f10 to 9391424 Compare December 22, 2023 09:38
@954-Ivory
fix: error type hints in Python3.12 (docarray#1147)
127abab
Signed-off-by: 954 <[email protected]>
@954-Ivory
954-Ivory force-pushed the dev branch from 9391424 to 127abab Compare December 22, 2023 09:52
@JoanFM
JoanFM merged commit 1f86e26 into docarray:main Dec 22, 2023
@JoanFM JoanFM mentioned this pull request Dec 22, 2023
Release Note #1842
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@JoanFM JoanFM Awaiting requested review from JoanFM
1 more reviewer
@samsja samsja samsja approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@954-Ivory @JoanFM @samsja
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.